Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2016-10-07 02:14:38 +0300
committerRebecca Turner <me@re-becca.org>2016-10-07 05:34:20 +0300
commit9d209107ce49a7424c50459284280cd2e6e215d1 (patch)
treefce67fc7a8a7db1f0fc1314687b329f2209a6b2b /node_modules/request
parent5707e6e55b220439c3f83e77daf4c70d72eb46f0 (diff)
request@2.75.0
Subdep updates. Credit: @simov
Diffstat (limited to 'node_modules/request')
-rw-r--r--node_modules/request/.travis.yml2
-rw-r--r--node_modules/request/CHANGELOG.md18
-rw-r--r--node_modules/request/README.md2
-rw-r--r--node_modules/request/node_modules/form-data/.dockerignore7
-rw-r--r--node_modules/request/node_modules/form-data/.editorconfig10
-rw-r--r--node_modules/request/node_modules/form-data/.eslintignore1
-rw-r--r--node_modules/request/node_modules/form-data/README.md15
-rw-r--r--node_modules/request/node_modules/form-data/lib/browser.js2
-rw-r--r--node_modules/request/node_modules/form-data/lib/form_data.js160
-rw-r--r--node_modules/request/node_modules/form-data/lib/populate.js11
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md125
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/README.md1877
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/dist/async.js1265
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/dist/async.min.js2
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/lib/async.js1265
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/async/package.json158
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/LICENSE21
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/README.md233
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/bench.js76
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/index.js6
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/lib/abort.js29
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/lib/async.js34
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/lib/defer.js26
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/lib/iterate.js75
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_asynckit.js91
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_parallel.js25
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial.js25
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial_ordered.js29
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/lib/state.js37
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/lib/streamify.js141
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/lib/terminator.js29
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/package.json126
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/parallel.js43
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/serial.js17
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/serialOrdered.js75
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/asynckit/stream.js21
-rw-r--r--node_modules/request/node_modules/form-data/package.json95
-rw-r--r--node_modules/request/node_modules/form-data/wercker.yml36
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js10
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml7
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/LICENSE.md (renamed from node_modules/request/node_modules/form-data/node_modules/async/LICENSE)4
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md27
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/benchmark.js56
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js129
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json55
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js175
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json33
-rw-r--r--node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js24
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md4
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js20
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js23
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json39
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json23
-rwxr-xr-xnode_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv6
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js4
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js157
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js44
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/README.md39
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/index.js559
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/package.json72
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md53
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt9
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md66
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js74
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js4
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js72
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js2
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json83
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json25
-rw-r--r--node_modules/request/node_modules/mime-types/HISTORY.md7
-rw-r--r--node_modules/request/node_modules/mime-types/index.js16
-rw-r--r--node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md24
-rw-r--r--node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json67
-rw-r--r--node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json45
-rw-r--r--node_modules/request/node_modules/mime-types/package.json30
-rw-r--r--node_modules/request/package.json58
-rw-r--r--node_modules/request/request.js4
77 files changed, 2958 insertions, 5401 deletions
diff --git a/node_modules/request/.travis.yml b/node_modules/request/.travis.yml
index 6f2d753b6..9be8247c7 100644
--- a/node_modules/request/.travis.yml
+++ b/node_modules/request/.travis.yml
@@ -3,9 +3,9 @@ language: node_js
node_js:
- node
+ - 6
- 4
- 0.12
- - 0.10
after_script:
- npm run test-cov
diff --git a/node_modules/request/CHANGELOG.md b/node_modules/request/CHANGELOG.md
index 2b5d17765..042c6e526 100644
--- a/node_modules/request/CHANGELOG.md
+++ b/node_modules/request/CHANGELOG.md
@@ -1,5 +1,13 @@
## Change Log
+### v2.75.0 (2016/09/17)
+- [#2381](https://github.com/request/request/pull/2381) Drop support for Node 0.10 (@simov)
+- [#2377](https://github.com/request/request/pull/2377) Update form-data to version 2.0.0 🚀 (@greenkeeperio-bot)
+- [#2353](https://github.com/request/request/pull/2353) Add greenkeeper ignored packages (@simov)
+- [#2351](https://github.com/request/request/pull/2351) Update karma-tap to version 3.0.1 🚀 (@greenkeeperio-bot)
+- [#2348](https://github.com/request/request/pull/2348) form-data@1.0.1 breaks build 🚨 (@greenkeeperio-bot)
+- [#2349](https://github.com/request/request/pull/2349) Check error type instead of string (@scotttrinh)
+
### v2.74.0 (2016/07/22)
- [#2295](https://github.com/request/request/pull/2295) Update tough-cookie to 2.3.0 (@stash-sfdc)
- [#2280](https://github.com/request/request/pull/2280) Update karma-tap to version 2.0.1 🚀 (@greenkeeperio-bot)
@@ -196,9 +204,9 @@
- [#1469](https://github.com/request/request/pull/1469) Feature/base url (@froatsnook)
- [#1459](https://github.com/request/request/pull/1459) Add option to time request/response cycle (including rollup of redirects) (@aaron-em)
- [#1468](https://github.com/request/request/pull/1468) Re-enable io.js/node 0.12 build (@simov, @mikeal, @BBB)
-- [#1442](https://github.com/request/request/pull/1442) Fixed the issue with strictSSL tests on 0.12 & io.js by explicitly setting a cipher that matches the cert. (@BBB, @nicolasmccurdy, @demohi, @simov, @0x4139)
+- [#1442](https://github.com/request/request/pull/1442) Fixed the issue with strictSSL tests on 0.12 & io.js by explicitly setting a cipher that matches the cert. (@BBB, @nickmccurdy, @demohi, @simov, @0x4139)
- [#1460](https://github.com/request/request/pull/1460) localAddress or proxy config is lost when redirecting (@simov, @0x4139)
-- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nicolasmccurdy, @demohi)
+- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nickmccurdy, @demohi)
- [#1426](https://github.com/request/request/pull/1426) Fixing tests to pass on io.js and node 0.12 (only test-https.js stiff failing) (@mikeal)
- [#1446](https://github.com/request/request/pull/1446) Missing HTTP referer header with redirects Fixes #1038 (@simov, @guimon)
- [#1428](https://github.com/request/request/pull/1428) Deprecate Node v0.8.x (@nylen)
@@ -328,7 +336,7 @@
- [#1131](https://github.com/request/request/pull/1131) Update pool documentation (@FredKSchott)
- [#1143](https://github.com/request/request/pull/1143) Rewrite all tests to use tape (@nylen)
- [#1137](https://github.com/request/request/pull/1137) Add ability to specifiy querystring lib in options. (@jgrund)
-- [#1138](https://github.com/request/request/pull/1138) allow hostname and port in place of host on uri (@slimelabs)
+- [#1138](https://github.com/request/request/pull/1138) allow hostname and port in place of host on uri (@cappslock)
- [#1134](https://github.com/request/request/pull/1134) Fix multiple redirects and `self.followRedirect` (@blakeembrey)
- [#1130](https://github.com/request/request/pull/1130) documentation fix: add note about npm test for contributing (@FredKSchott)
- [#1120](https://github.com/request/request/pull/1120) Support/refactor request setup tunnel (@seanstrom)
@@ -493,7 +501,7 @@
- [#613](https://github.com/request/request/pull/613) Fixes #583, moved initialization of self.uri.pathname (@lexander)
- [#605](https://github.com/request/request/pull/605) Only include ":" + pass in Basic Auth if it's defined (fixes #602) (@bendrucker)
-### v2.24.0 (2013/07/23)
+### v2.25.0 (2013/07/23)
- [#596](https://github.com/request/request/pull/596) Global agent is being used when pool is specified (@Cauldrath)
- [#594](https://github.com/request/request/pull/594) Emit complete event when there is no callback (@RomainLK)
- [#601](https://github.com/request/request/pull/601) Fixed a small typo (@michalstanko)
@@ -559,7 +567,7 @@
- [#343](https://github.com/request/request/pull/343) Allow AWS to work in more situations, added a note in the README on its usage (@nlf)
- [#320](https://github.com/request/request/pull/320) request.defaults() doesn't need to wrap jar() (@StuartHarris)
- [#322](https://github.com/request/request/pull/322) Fix + test for piped into request bumped into redirect. #321 (@alexindigo)
-- [#326](https://github.com/request/request/pull/326) Do not try to remove listener from an undefined connection (@strk)
+- [#326](https://github.com/request/request/pull/326) Do not try to remove listener from an undefined connection (@CartoDB)
- [#318](https://github.com/request/request/pull/318) Pass servername to tunneling secure socket creation (@isaacs)
- [#317](https://github.com/request/request/pull/317) Workaround for #313 (@isaacs)
- [#293](https://github.com/request/request/pull/293) Allow parser errors to bubble up to request (@mscdex)
diff --git a/node_modules/request/README.md b/node_modules/request/README.md
index 81ecac509..6eaaa0547 100644
--- a/node_modules/request/README.md
+++ b/node_modules/request/README.md
@@ -811,7 +811,7 @@ default in Linux can be anywhere from 20-120 seconds][linux-timeout]).
---
-- `time` - If `true`, the request-response cycle (including all redirects) is timed at millisecond resolution, and the result provided on the response's `elapsedTime` property.
+- `time` - If `true`, the request-response cycle (including all redirects) is timed at millisecond resolution, and the result provided on the response's `elapsedTime` property. The `responseStartTime` property is also available to indicate the timestamp when the response begins.
- `har` - A [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)*
- `callback` - alternatively pass the request's callback in the options object
diff --git a/node_modules/request/node_modules/form-data/.dockerignore b/node_modules/request/node_modules/form-data/.dockerignore
deleted file mode 100644
index c67305cf9..000000000
--- a/node_modules/request/node_modules/form-data/.dockerignore
+++ /dev/null
@@ -1,7 +0,0 @@
-*.iml
-*.sublime-*
-*.un~
-.idea
-sftp-config.json
-node_modules/
-test/tmp/
diff --git a/node_modules/request/node_modules/form-data/.editorconfig b/node_modules/request/node_modules/form-data/.editorconfig
deleted file mode 100644
index 0f099897b..000000000
--- a/node_modules/request/node_modules/form-data/.editorconfig
+++ /dev/null
@@ -1,10 +0,0 @@
-# editorconfig.org
-root = true
-
-[*]
-indent_style = space
-indent_size = 2
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
diff --git a/node_modules/request/node_modules/form-data/.eslintignore b/node_modules/request/node_modules/form-data/.eslintignore
deleted file mode 100644
index 8d87b1d26..000000000
--- a/node_modules/request/node_modules/form-data/.eslintignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules/*
diff --git a/node_modules/request/node_modules/form-data/README.md b/node_modules/request/node_modules/form-data/README.md
index e857db6e2..5864d82db 100644
--- a/node_modules/request/node_modules/form-data/README.md
+++ b/node_modules/request/node_modules/form-data/README.md
@@ -5,20 +5,19 @@ A library to create readable ```"multipart/form-data"``` streams. Can be used to
The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].
[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
-[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions
-[![Linux Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=linux:0.10-5.x)](https://travis-ci.org/form-data/form-data)
-[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/master.svg?label=windows:0.10-5.x)](https://ci.appveyor.com/project/alexindigo/form-data)
-[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/master.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master)
+[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.0.0.svg?label=linux:0.12-6.x)](https://travis-ci.org/form-data/form-data)
+[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.0.0.svg?label=macos:0.12-6.x)](https://travis-ci.org/form-data/form-data)
+[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.0.0.svg?label=windows:0.12-6.x)](https://ci.appveyor.com/project/alexindigo/form-data)
+[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.0.0.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master)
[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data)
-[![Codacy Badge](https://img.shields.io/codacy/43ece80331c246179695e41f81eeffe2.svg)](https://www.codacy.com/app/form-data/form-data)
[![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data)
## Install
```
-npm install form-data
+npm install --save form-data
```
## Usage
@@ -211,8 +210,8 @@ fetch('http://example.com', { method: 'POST', body: form })
## Notes
- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.
-- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing]
+- Starting version `2.x` FormData has dropped support for `node@0.10.x`.
## License
-Form-Data is licensed under the MIT license.
+Form-Data is released under the [MIT](License) license.
diff --git a/node_modules/request/node_modules/form-data/lib/browser.js b/node_modules/request/node_modules/form-data/lib/browser.js
index 8141d6589..f42221cd6 100644
--- a/node_modules/request/node_modules/form-data/lib/browser.js
+++ b/node_modules/request/node_modules/form-data/lib/browser.js
@@ -1,2 +1,2 @@
/* eslint-env browser */
-module.exports = FormData;
+module.exports = window.FormData;
diff --git a/node_modules/request/node_modules/form-data/lib/form_data.js b/node_modules/request/node_modules/form-data/lib/form_data.js
index 55328b463..8252e6588 100644
--- a/node_modules/request/node_modules/form-data/lib/form_data.js
+++ b/node_modules/request/node_modules/form-data/lib/form_data.js
@@ -6,7 +6,7 @@ var https = require('https');
var parseUrl = require('url').parse;
var fs = require('fs');
var mime = require('mime-types');
-var async = require('async');
+var asynckit = require('asynckit');
var populate = require('./populate.js');
// Public API
@@ -24,12 +24,12 @@ util.inherits(FormData, CombinedStream);
*/
function FormData() {
if (!(this instanceof FormData)) {
- throw new TypeError('Failed to construct FormData: Please use the _new_ operator, this object constructor cannot be called as a function.');
+ return new FormData();
}
this._overheadLength = 0;
this._valueLength = 0;
- this._lengthRetrievers = [];
+ this._valuesToMeasure = [];
CombinedStream.call(this);
}
@@ -101,60 +101,62 @@ FormData.prototype._trackLength = function(header, value, options) {
// no need to bother with the length
if (!options.knownLength) {
- this._lengthRetrievers.push(function(next) {
-
- if (value.hasOwnProperty('fd')) {
-
- // take read range into a account
- // `end` = Infinity –> read file till the end
- //
- // TODO: Looks like there is bug in Node fs.createReadStream
- // it doesn't respect `end` options without `start` options
- // Fix it when node fixes it.
- // https://github.com/joyent/node/issues/7819
- if (value.end != undefined && value.end != Infinity && value.start != undefined) {
-
- // when end specified
- // no need to calculate range
- // inclusive, starts with 0
- next(null, value.end + 1 - (value.start ? value.start : 0));
-
- // not that fast snoopy
- } else {
- // still need to fetch file size from fs
- fs.stat(value.path, function(err, stat) {
-
- var fileSize;
-
- if (err) {
- next(err);
- return;
- }
-
- // update final size based on the range options
- fileSize = stat.size - (value.start ? value.start : 0);
- next(null, fileSize);
- });
+ this._valuesToMeasure.push(value);
+ }
+};
+
+FormData.prototype._lengthRetriever = function(value, callback) {
+
+ if (value.hasOwnProperty('fd')) {
+
+ // take read range into a account
+ // `end` = Infinity –> read file till the end
+ //
+ // TODO: Looks like there is bug in Node fs.createReadStream
+ // it doesn't respect `end` options without `start` options
+ // Fix it when node fixes it.
+ // https://github.com/joyent/node/issues/7819
+ if (value.end != undefined && value.end != Infinity && value.start != undefined) {
+
+ // when end specified
+ // no need to calculate range
+ // inclusive, starts with 0
+ callback(null, value.end + 1 - (value.start ? value.start : 0));
+
+ // not that fast snoopy
+ } else {
+ // still need to fetch file size from fs
+ fs.stat(value.path, function(err, stat) {
+
+ var fileSize;
+
+ if (err) {
+ callback(err);
+ return;
}
- // or http response
- } else if (value.hasOwnProperty('httpVersion')) {
- next(null, +value.headers['content-length']);
-
- // or request stream http://github.com/mikeal/request
- } else if (value.hasOwnProperty('httpModule')) {
- // wait till response come back
- value.on('response', function(response) {
- value.pause();
- next(null, +response.headers['content-length']);
- });
- value.resume();
-
- // something else
- } else {
- next('Unknown stream');
- }
+ // update final size based on the range options
+ fileSize = stat.size - (value.start ? value.start : 0);
+ callback(null, fileSize);
+ });
+ }
+
+ // or http response
+ } else if (value.hasOwnProperty('httpVersion')) {
+ callback(null, +value.headers['content-length']);
+
+ // or request stream http://github.com/mikeal/request
+ } else if (value.hasOwnProperty('httpModule')) {
+ // wait till response come back
+ value.on('response', function(response) {
+ value.pause();
+ callback(null, +response.headers['content-length']);
});
+ value.resume();
+
+ // something else
+ } else {
+ callback('Unknown stream');
}
};
@@ -162,7 +164,7 @@ FormData.prototype._multiPartHeader = function(field, value, options) {
// custom header specified (as string)?
// it becomes responsible for boundary
// (e.g. to handle extra CRLFs on .NET servers)
- if (options.header) {
+ if (typeof options.header == 'string') {
return options.header;
}
@@ -177,9 +179,28 @@ FormData.prototype._multiPartHeader = function(field, value, options) {
'Content-Type': [].concat(contentType || [])
};
+ // allow custom headers.
+ if (typeof options.header == 'object') {
+ populate(headers, options.header);
+ }
+
+ var header;
for (var prop in headers) {
- if (headers[prop].length) {
- contents += prop + ': ' + headers[prop].join('; ') + FormData.LINE_BREAK;
+ header = headers[prop];
+
+ // skip nullish headers.
+ if (header == null) {
+ continue;
+ }
+
+ // convert all headers to arrays.
+ if (!Array.isArray(header)) {
+ header = [header];
+ }
+
+ // add non-empty headers.
+ if (header.length) {
+ contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
}
}
@@ -192,7 +213,8 @@ FormData.prototype._getContentDisposition = function(value, options) {
// custom filename takes precedence
// fs- and request- streams have path property
- var filename = options.filename || value.path;
+ // formidable and the browser add a name property.
+ var filename = options.filename || value.name || value.path;
// or try http response
if (!filename && value.readable && value.hasOwnProperty('httpVersion')) {
@@ -211,6 +233,11 @@ FormData.prototype._getContentType = function(value, options) {
// use custom content-type above all
var contentType = options.contentType;
+ // or try `name` from formidable, browser
+ if (!contentType && value.name) {
+ contentType = mime.lookup(value.name);
+ }
+
// or try `path` from fs-, request- streams
if (!contentType && value.path) {
contentType = mime.lookup(value.path);
@@ -266,17 +293,6 @@ FormData.prototype.getHeaders = function(userHeaders) {
return formHeaders;
};
-FormData.prototype.getCustomHeaders = function(contentType) {
- contentType = contentType ? contentType : 'multipart/form-data';
-
- var formHeaders = {
- 'content-type': contentType + '; boundary=' + this.getBoundary(),
- 'content-length': this.getLengthSync()
- };
-
- return formHeaders;
-};
-
FormData.prototype.getBoundary = function() {
if (!this._boundary) {
this._generateBoundary();
@@ -309,7 +325,7 @@ FormData.prototype.getLengthSync = function() {
}
// https://github.com/form-data/form-data/issues/40
- if (this._lengthRetrievers.length) {
+ if (this._valuesToMeasure.length) {
// Some async length retrievers are present
// therefore synchronous length calculation is false.
// Please use getLength(callback) to get proper length
@@ -326,12 +342,12 @@ FormData.prototype.getLength = function(cb) {
knownLength += this._lastBoundary().length;
}
- if (!this._lengthRetrievers.length) {
+ if (!this._valuesToMeasure.length) {
process.nextTick(cb.bind(this, null, knownLength));
return;
}
- async.parallel(this._lengthRetrievers, function(err, values) {
+ asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
if (err) {
cb(err);
return;
diff --git a/node_modules/request/node_modules/form-data/lib/populate.js b/node_modules/request/node_modules/form-data/lib/populate.js
index 6f64a6d32..4d35738dd 100644
--- a/node_modules/request/node_modules/form-data/lib/populate.js
+++ b/node_modules/request/node_modules/form-data/lib/populate.js
@@ -1,9 +1,10 @@
// populates missing values
module.exports = function(dst, src) {
- for (var prop in src) {
- if (src.hasOwnProperty(prop) && !dst[prop]) {
- dst[prop] = src[prop];
- }
- }
+
+ Object.keys(src).forEach(function(prop)
+ {
+ dst[prop] = dst[prop] || src[prop];
+ });
+
return dst;
};
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md b/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md
deleted file mode 100644
index f15e08121..000000000
--- a/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md
+++ /dev/null
@@ -1,125 +0,0 @@
-# v1.5.2
-- Allow using `"consructor"` as an argument in `memoize` (#998)
-- Give a better error messsage when `auto` dependency checking fails (#994)
-- Various doc updates (#936, #956, #979, #1002)
-
-# v1.5.1
-- Fix issue with `pause` in `queue` with concurrency enabled (#946)
-- `while` and `until` now pass the final result to callback (#963)
-- `auto` will properly handle concurrency when there is no callback (#966)
-- `auto` will now properly stop execution when an error occurs (#988, #993)
-- Various doc fixes (#971, #980)
-
-# v1.5.0
-
-- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) (#892)
-- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. (#873)
-- `auto` now accepts an optional `concurrency` argument to limit the number of running tasks (#637)
-- Added `queue#workersList()`, to retrieve the list of currently running tasks. (#891)
-- Various code simplifications (#896, #904)
-- Various doc fixes :scroll: (#890, #894, #903, #905, #912)
-
-# v1.4.2
-
-- Ensure coverage files don't get published on npm (#879)
-
-# v1.4.1
-
-- Add in overlooked `detectLimit` method (#866)
-- Removed unnecessary files from npm releases (#861)
-- Removed usage of a reserved word to prevent :boom: in older environments (#870)
-
-# v1.4.0
-
-- `asyncify` now supports promises (#840)
-- Added `Limit` versions of `filter` and `reject` (#836)
-- Add `Limit` versions of `detect`, `some` and `every` (#828, #829)
-- `some`, `every` and `detect` now short circuit early (#828, #829)
-- Improve detection of the global object (#804), enabling use in WebWorkers
-- `whilst` now called with arguments from iterator (#823)
-- `during` now gets called with arguments from iterator (#824)
-- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0))
-
-
-# v1.3.0
-
-New Features:
-- Added `constant`
-- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. (#671, #806)
-- Added `during` and `doDuring`, which are like `whilst` with an async truth test. (#800)
-- `retry` now accepts an `interval` parameter to specify a delay between retries. (#793)
-- `async` should work better in Web Workers due to better `root` detection (#804)
-- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` (#642)
-- Various internal updates (#786, #801, #802, #803)
-- Various doc fixes (#790, #794)
-
-Bug Fixes:
-- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. (#740, #744, #783)
-
-
-# v1.2.1
-
-Bug Fix:
-
-- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
-
-
-# v1.2.0
-
-New Features:
-
-- Added `timesLimit` (#743)
-- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. (#747, #772)
-
-Bug Fixes:
-
-- Fixed a regression in `each` and family with empty arrays that have additional properties. (#775, #777)
-
-
-# v1.1.1
-
-Bug Fix:
-
-- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. (#782)
-
-
-# v1.1.0
-
-New Features:
-
-- `cargo` now supports all of the same methods and event callbacks as `queue`.
-- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. (#769)
-- Optimized `map`, `eachOf`, and `waterfall` families of functions
-- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array (#667).
-- The callback is now optional for the composed results of `compose` and `seq`. (#618)
-- Reduced file size by 4kb, (minified version by 1kb)
-- Added code coverage through `nyc` and `coveralls` (#768)
-
-Bug Fixes:
-
-- `forever` will no longer stack overflow with a synchronous iterator (#622)
-- `eachLimit` and other limit functions will stop iterating once an error occurs (#754)
-- Always pass `null` in callbacks when there is no error (#439)
-- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue (#668)
-- `each` and family will properly handle an empty array (#578)
-- `eachSeries` and family will finish if the underlying array is modified during execution (#557)
-- `queue` will throw if a non-function is passed to `q.push()` (#593)
-- Doc fixes (#629, #766)
-
-
-# v1.0.0
-
-No known breaking changes, we are simply complying with semver from here on out.
-
-Changes:
-
-- Start using a changelog!
-- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) (#168 #704 #321)
-- Detect deadlocks in `auto` (#663)
-- Better support for require.js (#527)
-- Throw if queue created with concurrency `0` (#714)
-- Fix unneeded iteration in `queue.resume()` (#758)
-- Guard against timer mocking overriding `setImmediate` (#609 #611)
-- Miscellaneous doc fixes (#542 #596 #615 #628 #631 #690 #729)
-- Use single noop function internally (#546)
-- Optimize internal `_each`, `_map` and `_keys` functions.
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/README.md b/node_modules/request/node_modules/form-data/node_modules/async/README.md
deleted file mode 100644
index 316c40505..000000000
--- a/node_modules/request/node_modules/form-data/node_modules/async/README.md
+++ /dev/null
@@ -1,1877 +0,0 @@
-# Async.js
-
-[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async)
-[![NPM version](http://img.shields.io/npm/v/async.svg)](https://www.npmjs.org/package/async)
-[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master)
-[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
-
-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 async`,
-it can also be used directly in the browser.
-
-Async is also installable via:
-
-- [bower](http://bower.io/): `bower install async`
-- [component](https://github.com/component/component): `component install
- caolan/async`
-- [jam](http://jamjs.org/): `jam install async`
-- [spm](http://spmjs.io/): `spm install async`
-
-Async provides around 20 functions that include the usual 'functional'
-suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns
-for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these
-functions assume you follow the Node.js convention of providing a single
-callback as the last argument of your `async` function.
-
-
-## Quick Examples
-
-```javascript
-async.map(['file1','file2','file3'], fs.stat, function(err, results){
- // results is now an array of stats for each file
-});
-
-async.filter(['file1','file2','file3'], fs.exists, function(results){
- // results now equals an array of the existing files
-});
-
-async.parallel([
- function(){ ... },
- function(){ ... }
-], callback);
-
-async.series([
- function(){ ... },
- function(){ ... }
-]);
-```
-
-There are many more functions available so take a look at the docs below for a
-full list. This module aims to be comprehensive, so if you feel anything is
-missing please create a GitHub issue for it.
-
-## Common Pitfalls <sub>[(StackOverflow)](http://stackoverflow.com/questions/tagged/async.js)</sub>
-### Synchronous iteration functions
-
-If you get an error like `RangeError: Maximum call stack size exceeded.` or other stack overflow issues when using async, you are likely using a synchronous iterator. By *synchronous* we mean a function that calls its callback on the same tick in the javascript event loop, without doing any I/O or using any timers. Calling many callbacks iteratively will quickly overflow the stack. If you run into this issue, just defer your callback with `async.setImmediate` to start a new call stack on the next tick of the event loop.
-
-This can also arise by accident if you callback early in certain cases:
-
-```js
-async.eachSeries(hugeArray, function iterator(item, callback) {
- if (inCache(item)) {
- callback(null, cache[item]); // if many items are cached, you'll overflow
- } else {
- doSomeIO(item, callback);
- }
-}, function done() {
- //...
-});
-```
-
-Just change it to:
-
-```js
-async.eachSeries(hugeArray, function iterator(item, callback) {
- if (inCache(item)) {
- async.setImmediate(function () {
- callback(null, cache[item]);
- });
- } else {
- doSomeIO(item, callback);
- //...
-```
-
-Async guards against synchronous functions in some, but not all, cases. If you are still running into stack overflows, you can defer as suggested above, or wrap functions with [`async.ensureAsync`](#ensureAsync) Functions that are asynchronous by their nature do not have this problem and don't need the extra callback deferral.
-
-If JavaScript's event loop is still a bit nebulous, check out [this article](http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/) or [this talk](http://2014.jsconf.eu/speakers/philip-roberts-what-the-heck-is-the-event-loop-anyway.html) for more detailed information about how it works.
-
-
-### Multiple callbacks
-
-Make sure to always `return` when calling a callback early, otherwise you will cause multiple callbacks and unpredictable behavior in many cases.
-
-```js
-async.waterfall([
- function (callback) {
- getSomething(options, function (err, result) {
- if (err) {
- callback(new Error("failed getting something:" + err.message));
- // we should return here
- }
- // since we did not return, this callback still will be called and
- // `processData` will be called twice
- callback(null, result);
- });
- },
- processData
-], done)
-```
-
-It is always good practice to `return callback(err, result)` whenever a callback call is not the last statement of a function.
-
-
-### Binding a context to an iterator
-
-This section is really about `bind`, not about `async`. If you are wondering how to
-make `async` execute your iterators in a given context, or are confused as to why
-a method of another library isn't working as an iterator, study this example:
-
-```js
-// Here is a simple object with an (unnecessarily roundabout) squaring method
-var AsyncSquaringLibrary = {
- squareExponent: 2,
- square: function(number, callback){
- var result = Math.pow(number, this.squareExponent);
- setTimeout(function(){
- callback(null, result);
- }, 200);
- }
-};
-
-async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){
- // result is [NaN, NaN, NaN]
- // This fails because the `this.squareExponent` expression in the square
- // function is not evaluated in the context of AsyncSquaringLibrary, and is
- // therefore undefined.
-});
-
-async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){
- // result is [1, 4, 9]
- // With the help of bind we can attach a context to the iterator before
- // passing it to async. Now the square function will be executed in its
- // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`
- // will be as expected.
-});
-```
-
-## Download
-
-The source is available for download from
-[GitHub](https://github.com/caolan/async/blob/master/lib/async.js).
-Alternatively, you can install using Node Package Manager (`npm`):
-
- npm install async
-
-As well as using Bower:
-
- bower install async
-
-__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed
-
-## In the Browser
-
-So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5.
-
-Usage:
-
-```html
-<script type="text/javascript" src="async.js"></script>
-<script type="text/javascript">
-
- async.map(data, asyncProcess, function(err, results){
- alert(results);
- });
-
-</script>
-```
-
-## Documentation
-
-Some functions are also available in the following forms:
-* `<name>Series` - the same as `<name>` but runs only a single async operation at a time
-* `<name>Limit` - the same as `<name>` but runs a maximum of `limit` async operations at a time
-
-### Collections
-
-* [`each`](#each), `eachSeries`, `eachLimit`
-* [`forEachOf`](#forEachOf), `forEachOfSeries`, `forEachOfLimit`
-* [`map`](#map), `mapSeries`, `mapLimit`
-* [`filter`](#filter), `filterSeries`, `filterLimit`
-* [`reject`](#reject), `rejectSeries`, `rejectLimit`
-* [`reduce`](#reduce), [`reduceRight`](#reduceRight)
-* [`detect`](#detect), `detectSeries`, `detectLimit`
-* [`sortBy`](#sortBy)
-* [`some`](#some), `someLimit`
-* [`every`](#every), `everyLimit`
-* [`concat`](#concat), `concatSeries`
-
-### Control Flow
-
-* [`series`](#seriestasks-callback)
-* [`parallel`](#parallel), `parallelLimit`
-* [`whilst`](#whilst), [`doWhilst`](#doWhilst)
-* [`until`](#until), [`doUntil`](#doUntil)
-* [`during`](#during), [`doDuring`](#doDuring)
-* [`forever`](#forever)
-* [`waterfall`](#waterfall)
-* [`compose`](#compose)
-* [`seq`](#seq)
-* [`applyEach`](#applyEach), `applyEachSeries`
-* [`queue`](#queue), [`priorityQueue`](#priorityQueue)
-* [`cargo`](#cargo)
-* [`auto`](#auto)
-* [`retry`](#retry)
-* [`iterator`](#iterator)
-* [`times`](#times), `timesSeries`, `timesLimit`
-
-### Utils
-
-* [`apply`](#apply)
-* [`nextTick`](#nextTick)
-* [`memoize`](#memoize)
-* [`unmemoize`](#unmemoize)
-* [`ensureAsync`](#ensureAsync)
-* [`constant`](#constant)
-* [`asyncify`](#asyncify)
-* [`wrapSync`](#wrapSync)
-* [`log`](#log)
-* [`dir`](#dir)
-* [`noConflict`](#noConflict)
-
-## Collections
-
-<a name="forEach" />
-<a name="each" />
-### each(arr, iterator, [callback])
-
-Applies the function `iterator` to each item in `arr`, in parallel.
-The `iterator` is called with an item from the list, and a callback for when it
-has finished. If the `iterator` 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 `iterator` to each item in parallel,
-there is no guarantee that the iterator functions will complete in order.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err)` which must be called once it has
- completed. If no error has occurred, the `callback` should be run without
- arguments or with an explicit `null` argument. The array index is not passed
- to the iterator. If you need the index, use [`forEachOf`](#forEachOf).
-* `callback(err)` - *Optional* A callback which is called when all `iterator` functions
- have finished, or an error occurs.
-
-__Examples__
-
-
-```js
-// 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
-});
-```
-
-```js
-// 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');
- }
-});
-```
-
-__Related__
-
-* eachSeries(arr, iterator, [callback])
-* eachLimit(arr, limit, iterator, [callback])
-
----------------------------------------
-
-<a name="forEachOf" />
-<a name="eachOf" />
-
-### forEachOf(obj, iterator, [callback])
-
-Like `each`, except that it iterates over objects, and passes the key as the second argument to the iterator.
-
-__Arguments__
-
-* `obj` - An object or array to iterate over.
-* `iterator(item, key, callback)` - A function to apply to each item in `obj`.
-The `key` is the item's key, or index in the case of an array. The iterator is
-passed a `callback(err)` which must be called once it has completed. If no
-error has occurred, the callback should be run without arguments or with an
-explicit `null` argument.
-* `callback(err)` - *Optional* A callback which is called when all `iterator` functions have finished, or an error occurs.
-
-__Example__
-
-```js
-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);
-})
-```
-
-__Related__
-
-* forEachOfSeries(obj, iterator, [callback])
-* forEachOfLimit(obj, limit, iterator, [callback])
-
----------------------------------------
-
-<a name="map" />
-### map(arr, iterator, [callback])
-
-Produces a new array of values by mapping each value in `arr` through
-the `iterator` function. The `iterator` is called with an item from `arr` and a
-callback for when it has finished processing. Each of these callback takes 2 arguments:
-an `error`, and the transformed item from `arr`. If `iterator` 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 `iterator` to each item in parallel,
-there is no guarantee that the `iterator` functions will complete in order.
-However, the results array will be in the same order as the original `arr`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, transformed)` which must be called once
- it has completed with an error (which can be `null`) and a transformed item.
-* `callback(err, results)` - *Optional* A callback which is called when all `iterator`
- functions have finished, or an error occurs. Results is an array of the
- transformed items from the `arr`.
-
-__Example__
-
-```js
-async.map(['file1','file2','file3'], fs.stat, function(err, results){
- // results is now an array of stats for each file
-});
-```
-
-__Related__
-* mapSeries(arr, iterator, [callback])
-* mapLimit(arr, limit, iterator, [callback])
-
----------------------------------------
-
-<a name="select" />
-<a name="filter" />
-### filter(arr, iterator, [callback])
-
-__Alias:__ `select`
-
-Returns a new array of all the values in `arr` which pass an async truth test.
-_The callback for each `iterator` call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`. This operation is
-performed in parallel, but the results array will be in the same order as the
-original.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
- The `iterator` is passed a `callback(truthValue)`, which must be called with a
- boolean argument once it has completed.
-* `callback(results)` - *Optional* A callback which is called after all the `iterator`
- functions have finished.
-
-__Example__
-
-```js
-async.filter(['file1','file2','file3'], fs.exists, function(results){
- // results now equals an array of the existing files
-});
-```
-
-__Related__
-
-* filterSeries(arr, iterator, [callback])
-* filterLimit(arr, limit, iterator, [callback])
-
----------------------------------------
-
-<a name="reject" />
-### reject(arr, iterator, [callback])
-
-The opposite of [`filter`](#filter). Removes values that pass an `async` truth test.
-
-__Related__
-
-* rejectSeries(arr, iterator, [callback])
-* rejectLimit(arr, limit, iterator, [callback])
-
----------------------------------------
-
-<a name="reduce" />
-### reduce(arr, memo, iterator, [callback])
-
-__Aliases:__ `inject`, `foldl`
-
-Reduces `arr` into a single value using an async `iterator` to return
-each successive step. `memo` is the initial state of the reduction.
-This function only operates in series.
-
-For performance reasons, it may make sense to split a call to this function into
-a parallel map, and then use the normal `Array.prototype.reduce` on the results.
-This function is for situations where each step in the reduction needs to be async;
-if you can get the data before reducing it, then it's probably a good idea to do so.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `memo` - The initial state of the reduction.
-* `iterator(memo, item, callback)` - A function applied to each item in the
- array to produce the next step in the reduction. The `iterator` is passed a
- `callback(err, reduction)` which accepts an optional error as its first
- argument, and the state of the reduction as the second. If an error is
- passed to the callback, the reduction is stopped and the main `callback` is
- immediately called with the error.
-* `callback(err, result)` - *Optional* A callback which is called after all the `iterator`
- functions have finished. Result is the reduced value.
-
-__Example__
-
-```js
-async.reduce([1,2,3], 0, function(memo, item, callback){
- // pointless async:
- process.nextTick(function(){
- callback(null, memo + item)
- });
-}, function(err, result){
- // result is now equal to the last value of memo, which is 6
-});
-```
-
----------------------------------------
-
-<a name="reduceRight" />
-### reduceRight(arr, memo, iterator, [callback])
-
-__Alias:__ `foldr`
-
-Same as [`reduce`](#reduce), only operates on `arr` in reverse order.
-
-
----------------------------------------
-
-<a name="detect" />
-### detect(arr, iterator, [callback])
-
-Returns the first value in `arr` that passes an async truth test. The
-`iterator` is applied in parallel, meaning the first iterator to return `true` will
-fire the detect `callback` with that result. That means the result might not be
-the first item in the original `arr` (in terms of order) that passes the test.
-
-If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries).
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
- The iterator is passed a `callback(truthValue)` which must be called with a
- boolean argument once it has completed. **Note: this callback does not take an error as its first argument.**
-* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns
- `true`, or after all the `iterator` functions have finished. Result will be
- the first item in the array that passes the truth test (iterator) or the
- value `undefined` if none passed. **Note: this callback does not take an error as its first argument.**
-
-__Example__
-
-```js
-async.detect(['file1','file2','file3'], fs.exists, function(result){
- // result now equals the first file in the list that exists
-});
-```
-
-__Related__
-
-* detectSeries(arr, iterator, [callback])
-* detectLimit(arr, limit, iterator, [callback])
-
----------------------------------------
-
-<a name="sortBy" />
-### sortBy(arr, iterator, [callback])
-
-Sorts a list by the results of running each `arr` value through an async `iterator`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, sortValue)` which must be called once it
- has completed with an error (which can be `null`) and a value to use as the sort
- criteria.
-* `callback(err, results)` - *Optional* A callback which is called after all the `iterator`
- functions have finished, or an error occurs. Results is the items from
- the original `arr` sorted by the values returned by the `iterator` calls.
-
-__Example__
-
-```js
-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
-});
-```
-
-__Sort Order__
-
-By modifying the callback parameter the sorting order can be influenced:
-
-```js
-//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
-} );
-```
-
----------------------------------------
-
-<a name="some" />
-### some(arr, iterator, [callback])
-
-__Alias:__ `any`
-
-Returns `true` if at least one element in the `arr` satisfies an async test.
-_The callback for each iterator call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`. Once any iterator
-call returns `true`, the main `callback` is immediately called.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in the array
- in parallel. The iterator is passed a `callback(truthValue)`` which must be
- called with a boolean argument once it has completed.
-* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns
- `true`, or after all the iterator functions have finished. Result will be
- either `true` or `false` depending on the values of the async tests.
-
- **Note: the callbacks do not take an error as their first argument.**
-__Example__
-
-```js
-async.some(['file1','file2','file3'], fs.exists, function(result){
- // if result is true then at least one of the files exists
-});
-```
-
-__Related__
-
-* someLimit(arr, limit, iterator, callback)
-
----------------------------------------
-
-<a name="every" />
-### every(arr, iterator, [callback])
-
-__Alias:__ `all`
-
-Returns `true` if every element in `arr` satisfies an async test.
-_The callback for each `iterator` call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in the array
- in parallel. The iterator is passed a `callback(truthValue)` which must be
- called with a boolean argument once it has completed.
-* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns
- `false`, or after all the iterator functions have finished. Result will be
- either `true` or `false` depending on the values of the async tests.
-
- **Note: the callbacks do not take an error as their first argument.**
-
-__Example__
-
-```js
-async.every(['file1','file2','file3'], fs.exists, function(result){
- // if result is true then every file exists
-});
-```
-
-__Related__
-
-* everyLimit(arr, limit, iterator, callback)
-
----------------------------------------
-
-<a name="concat" />
-### concat(arr, iterator, [callback])
-
-Applies `iterator` to each item in `arr`, concatenating the results. Returns the
-concatenated list. The `iterator`s are called in parallel, and the results are
-concatenated as they return. There is no guarantee that the results array will
-be returned in the original order of `arr` passed to the `iterator` function.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, results)` which must be called once it
- has completed with an error (which can be `null`) and an array of results.
-* `callback(err, results)` - *Optional* A callback which is called after all the `iterator`
- functions have finished, or an error occurs. Results is an array containing
- the concatenated results of the `iterator` function.
-
-__Example__
-
-```js
-async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){
- // files is now a list of filenames that exist in the 3 directories
-});
-```
-
-__Related__
-
-* concatSeries(arr, iterator, [callback])
-
-
-## Control Flow
-
-<a name="series" />
-### series(tasks, [callback])
-
-Run the functions in the `tasks` array 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
-[`series`](#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.
-
-__Arguments__
-
-* `tasks` - An array or object 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.
-* `callback(err, results)` - 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.
-
-__Example__
-
-```js
-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']
-});
-
-
-// an example using an object instead of an array
-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}
-});
-```
-
----------------------------------------
-
-<a name="parallel" />
-### parallel(tasks, [callback])
-
-Run the `tasks` array 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.
-
-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
-[`parallel`](#parallel).
-
-
-__Arguments__
-
-* `tasks` - An array or object containing functions to run. Each function is passed
- a `callback(err, result)` which it must call on completion with an error `err`
- (which can be `null`) and an optional `result` value.
-* `callback(err, results)` - 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.
-
-__Example__
-
-```js
-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}
-});
-```
-
-__Related__
-
-* parallelLimit(tasks, limit, [callback])
-
----------------------------------------
-
-<a name="whilst" />
-### whilst(test, fn, callback)
-
-Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped,
-or an error occurs.
-
-__Arguments__
-
-* `test()` - synchronous truth test to perform before each execution of `fn`.
-* `fn(callback)` - A function which is called each time `test` passes. The function is
- passed a `callback(err)`, which must be called once it has completed with an
- optional `err` argument.
-* `callback(err, [results])` - A callback which is called after the test
- function has failed and repeated execution of `fn` has stopped. `callback`
- will be passed an error and any arguments passed to the final `fn`'s callback.
-
-__Example__
-
-```js
-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
- }
-);
-```
-
----------------------------------------
-
-<a name="doWhilst" />
-### doWhilst(fn, test, callback)
-
-The post-check version of [`whilst`](#whilst). To reflect the difference in
-the order of operations, the arguments `test` and `fn` are switched.
-
-`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
-
----------------------------------------
-
-<a name="until" />
-### until(test, fn, callback)
-
-Repeatedly call `fn` 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 `fn`'s callback.
-
-The inverse of [`whilst`](#whilst).
-
----------------------------------------
-
-<a name="doUntil" />
-### doUntil(fn, test, callback)
-
-Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`.
-
----------------------------------------
-
-<a name="during" />
-### during(test, fn, callback)
-
-Like [`whilst`](#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.
-
-__Example__
-
-```js
-var count = 0;
-
-async.during(
- function (callback) {
- return callback(null, count < 5);
- },
- function (callback) {
- count++;
- setTimeout(callback, 1000);
- },
- function (err) {
- // 5 seconds have passed
- }
-);
-```
-
----------------------------------------
-
-<a name="doDuring" />
-### doDuring(fn, test, callback)
-
-The post-check version of [`during`](#during). To reflect the difference in
-the order of operations, the arguments `test` and `fn` are switched.
-
-Also a version of [`doWhilst`](#doWhilst) with asynchronous `test` function.
-
----------------------------------------
-
-<a name="forever" />
-### forever(fn, [errback])
-
-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.
-
-```js
-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.
- }
-);
-```
-
----------------------------------------
-
-<a name="waterfall" />
-### waterfall(tasks, [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.
-
-__Arguments__
-
-* `tasks` - An array of functions to run, each function is passed a
- `callback(err, result1, result2, ...)` it must call on completion. The first
- argument is an error (which can be `null`) and any further arguments will be
- passed as arguments in order to the next task.
-* `callback(err, [results])` - An optional callback to run once all the functions
- have completed. This will be passed the results of the last task's callback.
-
-
-
-__Example__
-
-```js
-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:
-
-```js
-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');
-}
-```
-
-Or, if you need to pass any argument to the first function:
-
-```js
-async.waterfall([
- async.apply(myFirstFunction, 'zero'),
- mySecondFunction,
- myLastFunction,
-], function (err, result) {
- // result now equals 'done'
-});
-function myFirstFunction(arg1, callback) {
- // arg1 now equals 'zero'
- 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');
-}
-```
-
----------------------------------------
-<a name="compose" />
-### compose(fn1, fn2...)
-
-Creates a function which is a composition of the passed asynchronous
-functions. Each function consumes the return value of the function that
-follows. Composing functions `f()`, `g()`, and `h()` would produce the result of
-`f(g(h()))`, only this version uses callbacks to obtain the return values.
-
-Each function is executed with the `this` binding of the composed function.
-
-__Arguments__
-
-* `functions...` - the asynchronous functions to compose
-
-
-__Example__
-
-```js
-function add1(n, callback) {
- setTimeout(function () {
- callback(null, n + 1);
- }, 10);
-}
-
-function mul3(n, callback) {
- setTimeout(function () {
- callback(null, n * 3);
- }, 10);
-}
-
-var add1mul3 = async.compose(mul3, add1);
-
-add1mul3(4, function (err, result) {
- // result now equals 15
-});
-```
-
----------------------------------------
-<a name="seq" />
-### seq(fn1, fn2...)
-
-Version of the compose function that is more natural to read.
-Each function consumes the return value of the previous function.
-It is the equivalent of [`compose`](#compose) with the arguments reversed.
-
-Each function is executed with the `this` binding of the composed function.
-
-__Arguments__
-
-* `functions...` - the asynchronous functions to compose
-
-
-__Example__
-
-```js
-// Requires lodash (or underscore), express3 and dresende's orm2.
-// Part of an app, that fetches cats of the logged user.
-// This example uses `seq` function to avoid overnesting and error
-// handling clutter.
-app.get('/cats', function(request, response) {
- var User = request.models.User;
- async.seq(
- _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))
- function(user, fn) {
- user.getCats(fn); // 'getCats' has signature (callback(err, data))
- }
- )(req.session.user_id, function (err, cats) {
- if (err) {
- console.error(err);
- response.json({ status: 'error', message: err.message });
- } else {
- response.json({ status: 'ok', message: 'Cats found', data: cats });
- }
- });
-});
-```
-
----------------------------------------
-<a name="applyEach" />
-### applyEach(fns, args..., callback)
-
-Applies the provided arguments to each function in the array, calling
-`callback` after all functions have completed. If you only provide the first
-argument, then it will return a function which lets you pass in the
-arguments as if it were a single function call.
-
-__Arguments__
-
-* `fns` - the asynchronous functions to all call with the same arguments
-* `args...` - any number of separate arguments to pass to the function
-* `callback` - the final argument should be the callback, called when all
- functions have completed processing
-
-
-__Example__
-
-```js
-async.applyEach([enableSearch, updateSchema], 'bucket', callback);
-
-// partial application example:
-async.each(
- buckets,
- async.applyEach([enableSearch, updateSchema]),
- callback
-);
-```
-
-__Related__
-
-* applyEachSeries(tasks, args..., [callback])
-
----------------------------------------
-
-<a name="queue" />
-### queue(worker, [concurrency])
-
-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.
-
-__Arguments__
-
-* `worker(task, callback)` - An asynchronous function for processing a queued
- task, which must call its `callback(err)` argument when finished, with an
- optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`.
-* `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.
-
-__Queue objects__
-
-The `queue` object returned by this function has the following properties and
-methods:
-
-* `length()` - a function returning the number of items waiting to be processed.
-* `started` - a function returning whether or not any items have been pushed and processed by the queue
-* `running()` - a function returning the number of items currently being processed.
-* `workersList()` - a function returning the array of items currently being processed.
-* `idle()` - a function returning false if there are items waiting or being processed, or true if not.
-* `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.
-* `push(task, [callback])` - 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.
-* `unshift(task, [callback])` - add a new task to the front of the `queue`.
-* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit,
- and further tasks will be queued.
-* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`.
-* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`.
-* `paused` - a boolean for determining whether the queue is in a paused state
-* `pause()` - a function that pauses the processing of tasks until `resume()` is called.
-* `resume()` - a function that resumes the processing of queued tasks when the queue is paused.
-* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle.
-
-__Example__
-
-```js
-// 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');
-});
-```
-
-
----------------------------------------
-
-<a name="priorityQueue" />
-### priorityQueue(worker, concurrency)
-
-The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. 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.
-
----------------------------------------
-
-<a name="cargo" />
-### cargo(worker, [payload])
-
-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](#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.
-
-__Arguments__
-
-* `worker(tasks, callback)` - An asynchronous function for processing an array of
- queued tasks, which must call its `callback(err)` argument when finished, with
- an optional `err` argument.
-* `payload` - An optional `integer` for determining how many tasks should be
- processed per round; if omitted, the default is unlimited.
-
-__Cargo objects__
-
-The `cargo` object returned by this function has the following properties and
-methods:
-
-* `length()` - A function returning the number of items waiting to be processed.
-* `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.
-* `push(task, [callback])` - 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.
-* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued.
-* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`.
-* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`.
-* `idle()`, `pause()`, `resume()`, `kill()` - cargo inherits all of the same methods and event calbacks as [`queue`](#queue)
-
-__Example__
-
-```js
-// create a cargo object with payload 2
-
-var cargo = async.cargo(function (tasks, callback) {
- for(var i=0; i<tasks.length; i++){
- console.log('hello ' + tasks[i].name);
- }
- callback();
-}, 2);
-
-
-// add some items
-
-cargo.push({name: 'foo'}, function (err) {
- console.log('finished processing foo');
-});
-cargo.push({name: 'bar'}, function (err) {
- console.log('finished processing bar');
-});
-cargo.push({name: 'baz'}, function (err) {
- console.log('finished processing baz');
-});
-```
-
----------------------------------------
-
-<a name="auto" />
-### auto(tasks, [concurrency], [callback])
-
-Determines the best order for running the functions 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 functions 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. Functions also receive an object containing the results of functions which have completed so far.
-
-Note, all functions are called with a `results` object as a second argument,
-so it is unsafe to pass functions in the `tasks` object which cannot handle the
-extra argument.
-
-For example, this snippet of code:
-
-```js
-async.auto({
- readData: async.apply(fs.readFile, 'data.txt', 'utf-8')
-}, callback);
-```
-
-will have the effect of calling `readFile` with the results object as the last
-argument, which will fail:
-
-```js
-fs.readFile('data.txt', 'utf-8', cb, {});
-```
-
-Instead, wrap the call to `readFile` in a function which does not forward the
-`results` object:
-
-```js
-async.auto({
- readData: function(cb, results){
- fs.readFile('data.txt', 'utf-8', cb);
- }
-}, callback);
-```
-
-__Arguments__
-
-* `tasks` - An object. Each of its properties is either a function or an array of
- requirements, with the function 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 two arguments: (1) 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, and (2) a `results` object, containing the results of
- the previously executed functions.
-* `concurrency` - An optional `integer` for determining the maximum number of tasks that can be run in parallel. By default, as many as possible.
-* `callback(err, results)` - 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.
-
-
-__Example__
-
-```js
-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(callback, results){
- 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(callback, results){
- 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);
-});
-```
-
-This is a fairly trivial example, but to do this using the basic parallel and
-series functions would look like this:
-
-```js
-async.parallel([
- function(callback){
- console.log('in get_data');
- // async code to get some data
- callback(null, 'data', 'converted to array');
- },
- 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');
- }
-],
-function(err, results){
- async.series([
- function(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
- results.push('filename');
- callback(null);
- },
- function(callback){
- console.log('in email_link', JSON.stringify(results));
- // once the file is written let's email a link to it...
- callback(null, {'file':results.pop(), 'email':'user@example.com'});
- }
- ]);
-});
-```
-
-For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding
-new tasks much easier (and the code more readable).
-
-
----------------------------------------
-
-<a name="retry" />
-### retry([opts = {times: 5, interval: 0}| 5], task, [callback])
-
-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.
-
-__Arguments__
-
-* `opts` - 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`.
- * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`.
-* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)`
- which must be called when finished, passing `err` (which can be `null`) and the `result` of
- the function's execution, and (2) a `results` object, containing the results of
- the previously executed functions (if nested inside another control flow).
-* `callback(err, results)` - 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`.
-
-The [`retry`](#retry) function can be used as a stand-alone control flow by passing a callback, as shown below:
-
-```js
-// try calling apiMethod 3 times
-async.retry(3, apiMethod, function(err, result) {
- // do something with the result
-});
-```
-
-```js
-// 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
-});
-```
-
-```js
-// try calling apiMethod the default 5 times no delay between each retry
-async.retry(apiMethod, function(err, result) {
- // do something with the result
-});
-```
-
-It can also be embedded within other control flow functions to retry individual methods
-that are not as reliable, like this:
-
-```js
-async.auto({
- users: api.getUsers.bind(api),
- payments: async.retry(3, api.getPayments.bind(api))
-}, function(err, results) {
- // do something with the results
-});
-```
-
-
----------------------------------------
-
-<a name="iterator" />
-### iterator(tasks)
-
-Creates an iterator function which calls the next function in the `tasks` array,
-returning a continuation to call the next one after that. It's also possible to
-“peek” at the next iterator with `iterator.next()`.
-
-This function is used internally by the `async` module, but can be useful when
-you want to manually control the flow of functions in series.
-
-__Arguments__
-
-* `tasks` - An array of functions to run.
-
-__Example__
-
-```js
-var iterator = async.iterator([
- function(){ sys.p('one'); },
- function(){ sys.p('two'); },
- function(){ sys.p('three'); }
-]);
-
-node> var iterator2 = iterator();
-'one'
-node> var iterator3 = iterator2();
-'two'
-node> iterator3();
-'three'
-node> var nextfn = iterator2.next();
-node> nextfn();
-'three'
-```
-
----------------------------------------
-
-<a name="apply" />
-### apply(function, arguments..)
-
-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.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to automatically apply when the
- continuation is called.
-
-__Example__
-
-```js
-// 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:
-
-```js
-node> var fn = async.apply(sys.puts, 'one');
-node> fn('two', 'three');
-one
-two
-three
-```
-
----------------------------------------
-
-<a name="nextTick" />
-### nextTick(callback), setImmediate(callback)
-
-Calls `callback` on a later loop around the event loop. In Node.js this just
-calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)`
-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.
-
-__Arguments__
-
-* `callback` - The function to call on a later loop around the event loop.
-
-__Example__
-
-```js
-var call_order = [];
-async.nextTick(function(){
- call_order.push('two');
- // call_order now equals ['one','two']
-});
-call_order.push('one')
-```
-
-<a name="times" />
-### times(n, iterator, [callback])
-
-Calls the `iterator` function `n` times, and accumulates results in the same manner
-you would use with [`map`](#map).
-
-__Arguments__
-
-* `n` - The number of times to run the function.
-* `iterator` - The function to call `n` times.
-* `callback` - see [`map`](#map)
-
-__Example__
-
-```js
-// 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
-});
-```
-
-__Related__
-
-* timesSeries(n, iterator, [callback])
-* timesLimit(n, limit, iterator, [callback])
-
-
-## Utils
-
-<a name="memoize" />
-### memoize(fn, [hasher])
-
-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`.
-
-__Arguments__
-
-* `fn` - The function to proxy and cache results from.
-* `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.
-
-__Example__
-
-```js
-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
-});
-```
-
-<a name="unmemoize" />
-### unmemoize(fn)
-
-Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized
-form. Handy for testing.
-
-__Arguments__
-
-* `fn` - the memoized function
-
----------------------------------------
-
-<a name="ensureAsync" />
-### ensureAsync(fn)
-
-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.
-
-__Arguments__
-
-* `fn` - an async function, one that expects a node-style callback as its last argument
-
-Returns a wrapped function with the exact same call signature as the function passed in.
-
-__Example__
-
-```js
-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);
-
-```
-
----------------------------------------
-
-<a name="constant">
-### constant(values...)
-
-Returns a function that when called, calls-back with the values provided. Useful as the first function in a `waterfall`, or for plugging values in to `auto`.
-
-__Example__
-
-```js
-async.waterfall([
- async.constant(42),
- function (value, next) {
- // value === 42
- },
- //...
-], callback);
-
-async.waterfall([
- async.constant(filename, "utf8"),
- fs.readFile,
- function (fileData, next) {
- //...
- }
- //...
-], callback);
-
-async.auto({
- hostname: async.constant("https://server.net/"),
- port: findFreePort,
- launchServer: ["hostname", "port", function (cb, options) {
- startServer(options, cb);
- }],
- //...
-}, callback);
-
-```
-
----------------------------------------
-
-<a name="asyncify">
-<a name="wrapSync">
-### asyncify(func)
-
-__Alias:__ `wrapSync`
-
-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.
-
-__Example__
-
-```js
-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)
-```
-
-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. Example:
-
-```js
-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)
-```
-
-This also means you can asyncify ES2016 `async` functions.
-
-```js
-var q = async.queue(async.asyncify(async function (file) {
- var intermediateStep = await processFile(file);
- return await somePromise(intermediateStep)
-}));
-
-q.push(files);
-```
-
----------------------------------------
-
-<a name="log" />
-### log(function, arguments)
-
-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.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to apply to the function.
-
-__Example__
-
-```js
-var hello = function(name, callback){
- setTimeout(function(){
- callback(null, 'hello ' + name);
- }, 1000);
-};
-```
-```js
-node> async.log(hello, 'world');
-'hello world'
-```
-
----------------------------------------
-
-<a name="dir" />
-### dir(function, arguments)
-
-Logs the result of an `async` function 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.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to apply to the function.
-
-__Example__
-
-```js
-var hello = function(name, callback){
- setTimeout(function(){
- callback(null, {hello: name});
- }, 1000);
-};
-```
-```js
-node> async.dir(hello, 'world');
-{hello: 'world'}
-```
-
----------------------------------------
-
-<a name="noConflict" />
-### noConflict()
-
-Changes the value of `async` back to its original value, returning a reference to the
-`async` object.
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/dist/async.js b/node_modules/request/node_modules/form-data/node_modules/async/dist/async.js
deleted file mode 100644
index 31e7620fb..000000000
--- a/node_modules/request/node_modules/form-data/node_modules/async/dist/async.js
+++ /dev/null
@@ -1,1265 +0,0 @@
-/*!
- * async
- * https://github.com/caolan/async
- *
- * Copyright 2010-2014 Caolan McMahon
- * Released under the MIT license
- */
-(function () {
-
- var async = {};
- function noop() {}
- function identity(v) {
- return v;
- }
- function toBool(v) {
- return !!v;
- }
- function notId(v) {
- return !v;
- }
-
- // global on the server, window in the browser
- var previous_async;
-
- // Establish the root object, `window` (`self`) in the browser, `global`
- // on the server, or `this` in some virtual machines. We use `self`
- // instead of `window` for `WebWorker` support.
- var root = typeof self === 'object' && self.self === self && self ||
- typeof global === 'object' && global.global === global && global ||
- this;
-
- if (root != null) {
- previous_async = root.async;
- }
-
- async.noConflict = function () {
- root.async = previous_async;
- return async;
- };
-
- function only_once(fn) {
- return function() {
- if (fn === null) throw new Error("Callback was already called.");
- fn.apply(this, arguments);
- fn = null;
- };
- }
-
- function _once(fn) {
- return function() {
- if (fn === null) return;
- fn.apply(this, arguments);
- fn = null;
- };
- }
-
- //// cross-browser compatiblity functions ////
-
- var _toString = Object.prototype.toString;
-
- var _isArray = Array.isArray || function (obj) {
- return _toString.call(obj) === '[object Array]';
- };
-
- // Ported from underscore.js isObject
- var _isObject = function(obj) {
- var type = typeof obj;
- return type === 'function' || type === 'object' && !!obj;
- };
-
- function _isArrayLike(arr) {
- return _isArray(arr) || (
- // has a positive integer length property
- typeof arr.length === "number" &&
- arr.length >= 0 &&
- arr.length % 1 === 0
- );
- }
-
- function _arrayEach(arr, iterator) {
- var index = -1,
- length = arr.length;
-
- while (++index < length) {
- iterator(arr[index], index, arr);
- }
- }
-
- function _map(arr, iterator) {
- var index = -1,
- length = arr.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = iterator(arr[index], index, arr);
- }
- return result;
- }
-
- function _range(count) {
- return _map(Array(count), function (v, i) { return i; });
- }
-
- function _reduce(arr, iterator, memo) {
- _arrayEach(arr, function (x, i, a) {
- memo = iterator(memo, x, i, a);
- });
- return memo;
- }
-
- function _forEachOf(object, iterator) {
- _arrayEach(_keys(object), function (key) {
- iterator(object[key], key);
- });
- }
-
- function _indexOf(arr, item) {
- for (var i = 0; i < arr.length; i++) {
- if (arr[i] === item) return i;
- }
- return -1;
- }
-
- var _keys = Object.keys || function (obj) {
- var keys = [];
- for (var k in obj) {
- if (obj.hasOwnProperty(k)) {
- keys.push(k);
- }
- }
- return keys;
- };
-
- function _keyIterator(coll) {
- var i = -1;
- var len;
- var keys;
- if (_isArrayLike(coll)) {
- len = coll.length;
- return function next() {
- i++;
- return i < len ? i : null;
- };
- } else {
- keys = _keys(coll);
- len = keys.length;
- return function next() {
- i++;
- return i < len ? keys[i] : null;
- };
- }
- }
-
- // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html)
- // This accumulates the arguments passed into an array, after a given index.
- // From underscore.js (https://github.com/jashkenas/underscore/pull/2140).
- function _restParam(func, startIndex) {
- startIndex = startIndex == null ? func.length - 1 : +startIndex;
- return function() {
- var length = Math.max(arguments.length - startIndex, 0);
- var rest = Array(length);
- for (var index = 0; index < length; index++) {
- rest[index] = arguments[index + startIndex];
- }
- switch (startIndex) {
- case 0: return func.call(this, rest);
- case 1: return func.call(this, arguments[0], rest);
- }
- // Currently unused but handle cases outside of the switch statement:
- // var args = Array(startIndex + 1);
- // for (index = 0; index < startIndex; index++) {
- // args[index] = arguments[index];
- // }
- // args[startIndex] = rest;
- // return func.apply(this, args);
- };
- }
-
- function _withoutIndex(iterator) {
- return function (value, index, callback) {
- return iterator(value, callback);
- };
- }
-
- //// exported async module functions ////
-
- //// nextTick implementation with browser-compatible fallback ////
-
- // capture the global reference to guard against fakeTimer mocks
- var _setImmediate = typeof setImmediate === 'function' && setImmediate;
-
- var _delay = _setImmediate ? function(fn) {
- // not a direct alias for IE10 compatibility
- _setImmediate(fn);
- } : function(fn) {
- setTimeout(fn, 0);
- };
-
- if (typeof process === 'object' && typeof process.nextTick === 'function') {
- async.nextTick = process.nextTick;
- } else {
- async.nextTick = _delay;
- }
- async.setImmediate = _setImmediate ? _delay : async.nextTick;
-
-
- async.forEach =
- async.each = function (arr, iterator, callback) {
- return async.eachOf(arr, _withoutIndex(iterator), callback);
- };
-
- async.forEachSeries =
- async.eachSeries = function (arr, iterator, callback) {
- return async.eachOfSeries(arr, _withoutIndex(iterator), callback);
- };
-
-
- async.forEachLimit =
- async.eachLimit = function (arr, limit, iterator, callback) {
- return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback);
- };
-
- async.forEachOf =
- async.eachOf = function (object, iterator, callback) {
- callback = _once(callback || noop);
- object = object || [];
-
- var iter = _keyIterator(object);
- var key, completed = 0;
-
- while ((key = iter()) != null) {
- completed += 1;
- iterator(object[key], key, only_once(done));
- }
-
- if (completed === 0) callback(null);
-
- function done(err) {
- completed--;
- if (err) {
- callback(err);
- }
- // Check key is null in case iterator isn't exhausted
- // and done resolved synchronously.
- else if (key === null && completed <= 0) {
- callback(null);
- }
- }
- };
-
- async.forEachOfSeries =
- async.eachOfSeries = function (obj, iterator, callback) {
- callback = _once(callback || noop);
- obj = obj || [];
- var nextKey = _keyIterator(obj);
- var key = nextKey();
- function iterate() {
- var sync = true;
- if (key === null) {
- return callback(null);
- }
- iterator(obj[key], key, only_once(function (err) {
- if (err) {
- callback(err);
- }
- else {
- key = nextKey();
- if (key === null) {
- return callback(null);
- } else {
- if (sync) {
- async.setImmediate(iterate);
- } else {
- iterate();
- }
- }
- }
- }));
- sync = false;
- }
- iterate();
- };
-
-
-
- async.forEachOfLimit =
- async.eachOfLimit = function (obj, limit, iterator, callback) {
- _eachOfLimit(limit)(obj, iterator, callback);
- };
-
- function _eachOfLimit(limit) {
-
- return function (obj, iterator, callback) {
- callback = _once(callback || noop);
- obj = obj || [];
- var nextKey = _keyIterator(obj);
- if (limit <= 0) {
- return callback(null);
- }
- var done = false;
- var running = 0;
- var errored = false;
-
- (function replenish () {
- if (done && running <= 0) {
- return callback(null);
- }
-
- while (running < limit && !errored) {
- var key = nextKey();
- if (key === null) {
- done = true;
- if (running <= 0) {
- callback(null);
- }
- return;
- }
- running += 1;
- iterator(obj[key], key, only_once(function (err) {
- running -= 1;
- if (err) {
- callback(err);
- errored = true;
- }
- else {
- replenish();
- }
- }));
- }
- })();
- };
- }
-
-
- function doParallel(fn) {
- return function (obj, iterator, callback) {
- return fn(async.eachOf, obj, iterator, callback);
- };
- }
- function doParallelLimit(fn) {
- return function (obj, limit, iterator, callback) {
- return fn(_eachOfLimit(limit), obj, iterator, callback);
- };
- }
- function doSeries(fn) {
- return function (obj, iterator, callback) {
- return fn(async.eachOfSeries, obj, iterator, callback);
- };
- }
-
- function _asyncMap(eachfn, arr, iterator, callback) {
- callback = _once(callback || noop);
- arr = arr || [];
- var results = _isArrayLike(arr) ? [] : {};
- eachfn(arr, function (value, index, callback) {
- iterator(value, function (err, v) {
- results[index] = v;
- callback(err);
- });
- }, function (err) {
- callback(err, results);
- });
- }
-
- async.map = doParallel(_asyncMap);
- async.mapSeries = doSeries(_asyncMap);
- async.mapLimit = doParallelLimit(_asyncMap);
-
- // reduce only has a series version, as doing reduce in parallel won't
- // work in many situations.
- async.inject =
- async.foldl =
- async.reduce = function (arr, memo, iterator, callback) {
- async.eachOfSeries(arr, function (x, i, callback) {
- iterator(memo, x, function (err, v) {
- memo = v;
- callback(err);
- });
- }, function (err) {
- callback(err, memo);
- });
- };
-
- async.foldr =
- async.reduceRight = function (arr, memo, iterator, callback) {
- var reversed = _map(arr, identity).reverse();
- async.reduce(reversed, memo, iterator, callback);
- };
-
- async.transform = function (arr, memo, iterator, callback) {
- if (arguments.length === 3) {
- callback = iterator;
- iterator = memo;
- memo = _isArray(arr) ? [] : {};
- }
-
- async.eachOf(arr, function(v, k, cb) {
- iterator(memo, v, k, cb);
- }, function(err) {
- callback(err, memo);
- });
- };
-
- function _filter(eachfn, arr, iterator, callback) {
- var results = [];
- eachfn(arr, function (x, index, callback) {
- iterator(x, function (v) {
- if (v) {
- results.push({index: index, value: x});
- }
- callback();
- });
- }, function () {
- callback(_map(results.sort(function (a, b) {
- return a.index - b.index;
- }), function (x) {
- return x.value;
- }));
- });
- }
-
- async.select =
- async.filter = doParallel(_filter);
-
- async.selectLimit =
- async.filterLimit = doParallelLimit(_filter);
-
- async.selectSeries =
- async.filterSeries = doSeries(_filter);
-
- function _reject(eachfn, arr, iterator, callback) {
- _filter(eachfn, arr, function(value, cb) {
- iterator(value, function(v) {
- cb(!v);
- });
- }, callback);
- }
- async.reject = doParallel(_reject);
- async.rejectLimit = doParallelLimit(_reject);
- async.rejectSeries = doSeries(_reject);
-
- function _createTester(eachfn, check, getResult) {
- return function(arr, limit, iterator, cb) {
- function done() {
- if (cb) cb(getResult(false, void 0));
- }
- function iteratee(x, _, callback) {
- if (!cb) return callback();
- iterator(x, function (v) {
- if (cb && check(v)) {
- cb(getResult(true, x));
- cb = iterator = false;
- }
- callback();
- });
- }
- if (arguments.length > 3) {
- eachfn(arr, limit, iteratee, done);
- } else {
- cb = iterator;
- iterator = limit;
- eachfn(arr, iteratee, done);
- }
- };
- }
-
- async.any =
- async.some = _createTester(async.eachOf, toBool, identity);
-
- async.someLimit = _createTester(async.eachOfLimit, toBool, identity);
-
- async.all =
- async.every = _createTester(async.eachOf, notId, notId);
-
- async.everyLimit = _createTester(async.eachOfLimit, notId, notId);
-
- function _findGetResult(v, x) {
- return x;
- }
- async.detect = _createTester(async.eachOf, identity, _findGetResult);
- async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult);
- async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult);
-
- async.sortBy = function (arr, iterator, callback) {
- async.map(arr, function (x, callback) {
- iterator(x, function (err, criteria) {
- if (err) {
- callback(err);
- }
- else {
- callback(null, {value: x, criteria: criteria});
- }
- });
- }, function (err, results) {
- if (err) {
- return callback(err);
- }
- else {
- callback(null, _map(results.sort(comparator), function (x) {
- return x.value;
- }));
- }
-
- });
-
- function comparator(left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- }
- };
-
- async.auto = function (tasks, concurrency, callback) {
- if (typeof arguments[1] === 'function') {
- // concurrency is optional, shift the args.
- callback = concurrency;
- concurrency = null;
- }
- callback = _once(callback || noop);
- var keys = _keys(tasks);
- var remainingTasks = keys.length;
- if (!remainingTasks) {
- return callback(null);
- }
- if (!concurrency) {
- concurrency = remainingTasks;
- }
-
- var results = {};
- var runningTasks = 0;
-
- var hasError = false;
-
- var listeners = [];
- function addListener(fn) {
- listeners.unshift(fn);
- }
- function removeListener(fn) {
- var idx = _indexOf(listeners, fn);
- if (idx >= 0) listeners.splice(idx, 1);
- }
- function taskComplete() {
- remainingTasks--;
- _arrayEach(listeners.slice(0), function (fn) {
- fn();
- });
- }
-
- addListener(function () {
- if (!remainingTasks) {
- callback(null, results);
- }
- });
-
- _arrayEach(keys, function (k) {
- if (hasError) return;
- var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
- var taskCallback = _restParam(function(err, args) {
- runningTasks--;
- if (args.length <= 1) {
- args = args[0];
- }
- if (err) {
- var safeResults = {};
- _forEachOf(results, function(val, rkey) {
- safeResults[rkey] = val;
- });
- safeResults[k] = args;
- hasError = true;
-
- callback(err, safeResults);
- }
- else {
- results[k] = args;
- async.setImmediate(taskComplete);
- }
- });
- var requires = task.slice(0, task.length - 1);
- // prevent dead-locks
- var len = requires.length;
- var dep;
- while (len--) {
- if (!(dep = tasks[requires[len]])) {
- throw new Error('Has nonexistent dependency in ' + requires.join(', '));
- }
- if (_isArray(dep) && _indexOf(dep, k) >= 0) {
- throw new Error('Has cyclic dependencies');
- }
- }
- function ready() {
- return runningTasks < concurrency && _reduce(requires, function (a, x) {
- return (a && results.hasOwnProperty(x));
- }, true) && !results.hasOwnProperty(k);
- }
- if (ready()) {
- runningTasks++;
- task[task.length - 1](taskCallback, results);
- }
- else {
- addListener(listener);
- }
- function listener() {
- if (ready()) {
- runningTasks++;
- removeListener(listener);
- task[task.length - 1](taskCallback, results);
- }
- }
- });
- };
-
-
-
- async.retry = function(times, task, callback) {
- var DEFAULT_TIMES = 5;
- var DEFAULT_INTERVAL = 0;
-
- var attempts = [];
-
- var opts = {
- times: DEFAULT_TIMES,
- interval: DEFAULT_INTERVAL
- };
-
- function parseTimes(acc, t){
- if(typeof t === 'number'){
- acc.times = parseInt(t, 10) || DEFAULT_TIMES;
- } else if(typeof t === 'object'){
- acc.times = parseInt(t.times, 10) || DEFAULT_TIMES;
- acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL;
- } else {
- throw new Error('Unsupported argument type for \'times\': ' + typeof t);
- }
- }
-
- var length = arguments.length;
- if (length < 1 || length > 3) {
- throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)');
- } else if (length <= 2 && typeof times === 'function') {
- callback = task;
- task = times;
- }
- if (typeof times !== 'function') {
- parseTimes(opts, times);
- }
- opts.callback = callback;
- opts.task = task;
-
- function wrappedTask(wrappedCallback, wrappedResults) {
- function retryAttempt(task, finalAttempt) {
- return function(seriesCallback) {
- task(function(err, result){
- seriesCallback(!err || finalAttempt, {err: err, result: result});
- }, wrappedResults);
- };
- }
-
- function retryInterval(interval){
- return function(seriesCallback){
- setTimeout(function(){
- seriesCallback(null);
- }, interval);
- };
- }
-
- while (opts.times) {
-
- var finalAttempt = !(opts.times-=1);
- attempts.push(retryAttempt(opts.task, finalAttempt));
- if(!finalAttempt && opts.interval > 0){
- attempts.push(retryInterval(opts.interval));
- }
- }
-
- async.series(attempts, function(done, data){
- data = data[data.length - 1];
- (wrappedCallback || opts.callback)(data.err, data.result);
- });
- }
-
- // If a callback is passed, run this as a controll flow
- return opts.callback ? wrappedTask() : wrappedTask;
- };
-
- async.waterfall = function (tasks, callback) {
- callback = _once(callback || noop);
- if (!_isArray(tasks)) {
- var err = new Error('First argument to waterfall must be an array of functions');
- return callback(err);
- }
- if (!tasks.length) {
- return callback();
- }
- function wrapIterator(iterator) {
- return _restParam(function (err, args) {
- if (err) {
- callback.apply(null, [err].concat(args));
- }
- else {
- var next = iterator.next();
- if (next) {
- args.push(wrapIterator(next));
- }
- else {
- args.push(callback);
- }
- ensureAsync(iterator).apply(null, args);
- }
- });
- }
- wrapIterator(async.iterator(tasks))();
- };
-
- function _parallel(eachfn, tasks, callback) {
- callback = callback || noop;
- var results = _isArrayLike(tasks) ? [] : {};
-
- eachfn(tasks, function (task, key, callback) {
- task(_restParam(function (err, args) {
- if (args.length <= 1) {
- args = args[0];
- }
- results[key] = args;
- callback(err);
- }));
- }, function (err) {
- callback(err, results);
- });
- }
-
- async.parallel = function (tasks, callback) {
- _parallel(async.eachOf, tasks, callback);
- };
-
- async.parallelLimit = function(tasks, limit, callback) {
- _parallel(_eachOfLimit(limit), tasks, callback);
- };
-
- async.series = function(tasks, callback) {
- _parallel(async.eachOfSeries, tasks, callback);
- };
-
- async.iterator = function (tasks) {
- function makeCallback(index) {
- function fn() {
- if (tasks.length) {
- tasks[index].apply(null, arguments);
- }
- return fn.next();
- }
- fn.next = function () {
- return (index < tasks.length - 1) ? makeCallback(index + 1): null;
- };
- return fn;
- }
- return makeCallback(0);
- };
-
- async.apply = _restParam(function (fn, args) {
- return _restParam(function (callArgs) {
- return fn.apply(
- null, args.concat(callArgs)
- );
- });
- });
-
- function _concat(eachfn, arr, fn, callback) {
- var result = [];
- eachfn(arr, function (x, index, cb) {
- fn(x, function (err, y) {
- result = result.concat(y || []);
- cb(err);
- });
- }, function (err) {
- callback(err, result);
- });
- }
- async.concat = doParallel(_concat);
- async.concatSeries = doSeries(_concat);
-
- async.whilst = function (test, iterator, callback) {
- callback = callback || noop;
- if (test()) {
- var next = _restParam(function(err, args) {
- if (err) {
- callback(err);
- } else if (test.apply(this, args)) {
- iterator(next);
- } else {
- callback.apply(null, [null].concat(args));
- }
- });
- iterator(next);
- } else {
- callback(null);
- }
- };
-
- async.doWhilst = function (iterator, test, callback) {
- var calls = 0;
- return async.whilst(function() {
- return ++calls <= 1 || test.apply(this, arguments);
- }, iterator, callback);
- };
-
- async.until = function (test, iterator, callback) {
- return async.whilst(function() {
- return !test.apply(this, arguments);
- }, iterator, callback);
- };
-
- async.doUntil = function (iterator, test, callback) {
- return async.doWhilst(iterator, function() {
- return !test.apply(this, arguments);
- }, callback);
- };
-
- async.during = function (test, iterator, callback) {
- callback = callback || noop;
-
- var next = _restParam(function(err, args) {
- if (err) {
- callback(err);
- } else {
- args.push(check);
- test.apply(this, args);
- }
- });
-
- var check = function(err, truth) {
- if (err) {
- callback(err);
- } else if (truth) {
- iterator(next);
- } else {
- callback(null);
- }
- };
-
- test(check);
- };
-
- async.doDuring = function (iterator, test, callback) {
- var calls = 0;
- async.during(function(next) {
- if (calls++ < 1) {
- next(null, true);
- } else {
- test.apply(this, arguments);
- }
- }, iterator, callback);
- };
-
- function _queue(worker, concurrency, payload) {
- if (concurrency == null) {
- concurrency = 1;
- }
- else if(concurrency === 0) {
- throw new Error('Concurrency must not be zero');
- }
- function _insert(q, data, pos, 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 async.setImmediate(function() {
- q.drain();
- });
- }
- _arrayEach(data, function(task) {
- var item = {
- data: task,
- callback: callback || noop
- };
-
- if (pos) {
- q.tasks.unshift(item);
- } else {
- q.tasks.push(item);
- }
-
- if (q.tasks.length === q.concurrency) {
- q.saturated();
- }
- });
- async.setImmediate(q.process);
- }
- function _next(q, tasks) {
- return function(){
- workers -= 1;
-
- var removed = false;
- var args = arguments;
- _arrayEach(tasks, function (task) {
- _arrayEach(workersList, function (worker, index) {
- if (worker === task && !removed) {
- workersList.splice(index, 1);
- removed = true;
- }
- });
-
- task.callback.apply(task, args);
- });
- if (q.tasks.length + workers === 0) {
- q.drain();
- }
- q.process();
- };
- }
-
- var workers = 0;
- var workersList = [];
- var q = {
- tasks: [],
- concurrency: concurrency,
- payload: payload,
- saturated: noop,
- empty: noop,
- drain: noop,
- started: false,
- paused: false,
- push: function (data, callback) {
- _insert(q, data, false, callback);
- },
- kill: function () {
- q.drain = noop;
- q.tasks = [];
- },
- unshift: function (data, callback) {
- _insert(q, data, true, callback);
- },
- process: function () {
- while(!q.paused && workers < q.concurrency && q.tasks.length){
-
- var tasks = q.payload ?
- q.tasks.splice(0, q.payload) :
- q.tasks.splice(0, q.tasks.length);
-
- var data = _map(tasks, function (task) {
- return task.data;
- });
-
- if (q.tasks.length === 0) {
- q.empty();
- }
- workers += 1;
- workersList.push(tasks[0]);
- var cb = only_once(_next(q, tasks));
- worker(data, cb);
- }
- },
- length: function () {
- return q.tasks.length;
- },
- running: function () {
- return workers;
- },
- workersList: function () {
- return workersList;
- },
- idle: function() {
- return q.tasks.length + workers === 0;
- },
- pause: function () {
- q.paused = true;
- },
- resume: function () {
- if (q.paused === false) { return; }
- q.paused = false;
- var resumeCount = Math.min(q.concurrency, q.tasks.length);
- // Need to call q.process once per concurrent
- // worker to preserve full concurrency after pause
- for (var w = 1; w <= resumeCount; w++) {
- async.setImmediate(q.process);
- }
- }
- };
- return q;
- }
-
- async.queue = function (worker, concurrency) {
- var q = _queue(function (items, cb) {
- worker(items[0], cb);
- }, concurrency, 1);
-
- return q;
- };
-
- async.priorityQueue = function (worker, concurrency) {
-
- function _compareTasks(a, b){
- return a.priority - b.priority;
- }
-
- function _binarySearch(sequence, item, compare) {
- var beg = -1,
- end = sequence.length - 1;
- while (beg < end) {
- var mid = beg + ((end - beg + 1) >>> 1);
- if (compare(item, sequence[mid]) >= 0) {
- beg = mid;
- } else {
- end = mid - 1;
- }
- }
- return beg;
- }
-
- function _insert(q, data, priority, 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) {
- // call drain immediately if there are no tasks
- return async.setImmediate(function() {
- q.drain();
- });
- }
- _arrayEach(data, function(task) {
- var item = {
- data: task,
- priority: priority,
- callback: typeof callback === 'function' ? callback : noop
- };
-
- q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);
-
- if (q.tasks.length === q.concurrency) {
- q.saturated();
- }
- async.setImmediate(q.process);
- });
- }
-
- // Start with a normal queue
- var q = async.queue(worker, concurrency);
-
- // Override push to accept second parameter representing priority
- q.push = function (data, priority, callback) {
- _insert(q, data, priority, callback);
- };
-
- // Remove unshift function
- delete q.unshift;
-
- return q;
- };
-
- async.cargo = function (worker, payload) {
- return _queue(worker, 1, payload);
- };
-
- function _console_fn(name) {
- return _restParam(function (fn, args) {
- fn.apply(null, args.concat([_restParam(function (err, args) {
- if (typeof console === 'object') {
- if (err) {
- if (console.error) {
- console.error(err);
- }
- }
- else if (console[name]) {
- _arrayEach(args, function (x) {
- console[name](x);
- });
- }
- }
- })]));
- });
- }
- async.log = _console_fn('log');
- async.dir = _console_fn('dir');
- /*async.info = _console_fn('info');
- async.warn = _console_fn('warn');
- async.error = _console_fn('error');*/
-
- async.memoize = function (fn, hasher) {
- var memo = {};
- var queues = {};
- var has = Object.prototype.hasOwnProperty;
- hasher = hasher || identity;
- var memoized = _restParam(function memoized(args) {
- var callback = args.pop();
- var key = hasher.apply(null, args);
- if (has.call(memo, key)) {
- async.setImmediate(function () {
- callback.apply(null, memo[key]);
- });
- }
- else if (has.call(queues, key)) {
- queues[key].push(callback);
- }
- else {
- queues[key] = [callback];
- fn.apply(null, args.concat([_restParam(function (args) {
- 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;
- };
-
- async.unmemoize = function (fn) {
- return function () {
- return (fn.unmemoized || fn).apply(null, arguments);
- };
- };
-
- function _times(mapper) {
- return function (count, iterator, callback) {
- mapper(_range(count), iterator, callback);
- };
- }
-
- async.times = _times(async.map);
- async.timesSeries = _times(async.mapSeries);
- async.timesLimit = function (count, limit, iterator, callback) {
- return async.mapLimit(_range(count), limit, iterator, callback);
- };
-
- async.seq = function (/* functions... */) {
- var fns = arguments;
- return _restParam(function (args) {
- var that = this;
-
- var callback = args[args.length - 1];
- if (typeof callback == 'function') {
- args.pop();
- } else {
- callback = noop;
- }
-
- async.reduce(fns, args, function (newargs, fn, cb) {
- fn.apply(that, newargs.concat([_restParam(function (err, nextargs) {
- cb(err, nextargs);
- })]));
- },
- function (err, results) {
- callback.apply(that, [err].concat(results));
- });
- });
- };
-
- async.compose = function (/* functions... */) {
- return async.seq.apply(null, Array.prototype.reverse.call(arguments));
- };
-
-
- function _applyEach(eachfn) {
- return _restParam(function(fns, args) {
- var go = _restParam(function(args) {
- var that = this;
- var callback = args.pop();
- return eachfn(fns, function (fn, _, cb) {
- fn.apply(that, args.concat([cb]));
- },
- callback);
- });
- if (args.length) {
- return go.apply(this, args);
- }
- else {
- return go;
- }
- });
- }
-
- async.applyEach = _applyEach(async.eachOf);
- async.applyEachSeries = _applyEach(async.eachOfSeries);
-
-
- async.forever = function (fn, callback) {
- var done = only_once(callback || noop);
- var task = ensureAsync(fn);
- function next(err) {
- if (err) {
- return done(err);
- }
- task(next);
- }
- next();
- };
-
- function ensureAsync(fn) {
- return _restParam(function (args) {
- var callback = args.pop();
- args.push(function () {
- var innerArgs = arguments;
- if (sync) {
- async.setImmediate(function () {
- callback.apply(null, innerArgs);
- });
- } else {
- callback.apply(null, innerArgs);
- }
- });
- var sync = true;
- fn.apply(this, args);
- sync = false;
- });
- }
-
- async.ensureAsync = ensureAsync;
-
- async.constant = _restParam(function(values) {
- var args = [null].concat(values);
- return function (callback) {
- return callback.apply(this, args);
- };
- });
-
- async.wrapSync =
- async.asyncify = function asyncify(func) {
- return _restParam(function (args) {
- var callback = args.pop();
- 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) {
- callback(null, value);
- })["catch"](function(err) {
- callback(err.message ? err : new Error(err));
- });
- } else {
- callback(null, result);
- }
- });
- };
-
- // Node.js
- if (typeof module === 'object' && module.exports) {
- module.exports = async;
- }
- // AMD / RequireJS
- else if (typeof define === 'function' && define.amd) {
- define([], function () {
- return async;
- });
- }
- // included directly via <script> tag
- else {
- root.async = async;
- }
-
-}());
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/dist/async.min.js b/node_modules/request/node_modules/form-data/node_modules/async/dist/async.min.js
deleted file mode 100644
index 2490016a0..000000000
--- a/node_modules/request/node_modules/form-data/node_modules/async/dist/async.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function(){function n(){}function t(n){return n}function e(n){return!!n}function r(n){return!n}function u(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function i(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}function o(n){return M(n)||"number"==typeof n.length&&n.length>=0&&n.length%1===0}function c(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function a(n,t){for(var e=-1,r=n.length,u=Array(r);++e<r;)u[e]=t(n[e],e,n);return u}function f(n){return a(Array(n),function(n,t){return t})}function l(n,t,e){return c(n,function(n,r,u){e=t(e,n,r,u)}),e}function s(n,t){c(W(n),function(e){t(n[e],e)})}function p(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}function h(n){var t,e,r=-1;return o(n)?(t=n.length,function(){return r++,t>r?r:null}):(e=W(n),t=e.length,function(){return r++,t>r?e[r]:null})}function m(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),u=0;e>u;u++)r[u]=arguments[u+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r)}}}function y(n){return function(t,e,r){return n(t,r)}}function v(t){return function(e,r,o){o=i(o||n),e=e||[];var c=h(e);if(0>=t)return o(null);var a=!1,f=0,l=!1;!function s(){if(a&&0>=f)return o(null);for(;t>f&&!l;){var n=c();if(null===n)return a=!0,void(0>=f&&o(null));f+=1,r(e[n],n,u(function(n){f-=1,n?(o(n),l=!0):s()}))}}()}}function d(n){return function(t,e,r){return n(P.eachOf,t,e,r)}}function g(n){return function(t,e,r,u){return n(v(e),t,r,u)}}function k(n){return function(t,e,r){return n(P.eachOfSeries,t,e,r)}}function b(t,e,r,u){u=i(u||n),e=e||[];var c=o(e)?[]:{};t(e,function(n,t,e){r(n,function(n,r){c[t]=r,e(n)})},function(n){u(n,c)})}function w(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(e){e&&u.push({index:t,value:n}),r()})},function(){r(a(u.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function O(n,t,e,r){w(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function S(n,t,e){return function(r,u,i,o){function c(){o&&o(e(!1,void 0))}function a(n,r,u){return o?void i(n,function(r){o&&t(r)&&(o(e(!0,n)),o=i=!1),u()}):u()}arguments.length>3?n(r,u,a,c):(o=i,i=u,n(r,a,c))}}function E(n,t){return t}function L(t,e,r){r=r||n;var u=o(e)?[]:{};t(e,function(n,t,e){n(m(function(n,r){r.length<=1&&(r=r[0]),u[t]=r,e(n)}))},function(n){r(n,u)})}function j(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(n,t){u=u.concat(t||[]),r(n)})},function(n){r(n,u)})}function I(t,e,r){function i(t,e,r,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");return t.started=!0,M(e)||(e=[e]),0===e.length&&t.idle()?P.setImmediate(function(){t.drain()}):(c(e,function(e){var i={data:e,callback:u||n};r?t.tasks.unshift(i):t.tasks.push(i),t.tasks.length===t.concurrency&&t.saturated()}),void P.setImmediate(t.process))}function o(n,t){return function(){f-=1;var e=!1,r=arguments;c(t,function(n){c(l,function(t,r){t!==n||e||(l.splice(r,1),e=!0)}),n.callback.apply(n,r)}),n.tasks.length+f===0&&n.drain(),n.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var f=0,l=[],s={tasks:[],concurrency:e,payload:r,saturated:n,empty:n,drain:n,started:!1,paused:!1,push:function(n,t){i(s,n,!1,t)},kill:function(){s.drain=n,s.tasks=[]},unshift:function(n,t){i(s,n,!0,t)},process:function(){for(;!s.paused&&f<s.concurrency&&s.tasks.length;){var n=s.payload?s.tasks.splice(0,s.payload):s.tasks.splice(0,s.tasks.length),e=a(n,function(n){return n.data});0===s.tasks.length&&s.empty(),f+=1,l.push(n[0]);var r=u(o(s,n));t(e,r)}},length:function(){return s.tasks.length},running:function(){return f},workersList:function(){return l},idle:function(){return s.tasks.length+f===0},pause:function(){s.paused=!0},resume:function(){if(s.paused!==!1){s.paused=!1;for(var n=Math.min(s.concurrency,s.tasks.length),t=1;n>=t;t++)P.setImmediate(s.process)}}};return s}function x(n){return m(function(t,e){t.apply(null,e.concat([m(function(t,e){"object"==typeof console&&(t?console.error&&console.error(t):console[n]&&c(e,function(t){console[n](t)}))})]))})}function A(n){return function(t,e,r){n(f(t),e,r)}}function T(n){return m(function(t,e){var r=m(function(e){var r=this,u=e.pop();return n(t,function(n,t,u){n.apply(r,e.concat([u]))},u)});return e.length?r.apply(this,e):r})}function z(n){return m(function(t){var e=t.pop();t.push(function(){var n=arguments;r?P.setImmediate(function(){e.apply(null,n)}):e.apply(null,n)});var r=!0;n.apply(this,t),r=!1})}var q,P={},C="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;null!=C&&(q=C.async),P.noConflict=function(){return C.async=q,P};var H=Object.prototype.toString,M=Array.isArray||function(n){return"[object Array]"===H.call(n)},U=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},W=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t},B="function"==typeof setImmediate&&setImmediate,D=B?function(n){B(n)}:function(n){setTimeout(n,0)};"object"==typeof process&&"function"==typeof process.nextTick?P.nextTick=process.nextTick:P.nextTick=D,P.setImmediate=B?D:P.nextTick,P.forEach=P.each=function(n,t,e){return P.eachOf(n,y(t),e)},P.forEachSeries=P.eachSeries=function(n,t,e){return P.eachOfSeries(n,y(t),e)},P.forEachLimit=P.eachLimit=function(n,t,e,r){return v(t)(n,y(e),r)},P.forEachOf=P.eachOf=function(t,e,r){function o(n){f--,n?r(n):null===c&&0>=f&&r(null)}r=i(r||n),t=t||[];for(var c,a=h(t),f=0;null!=(c=a());)f+=1,e(t[c],c,u(o));0===f&&r(null)},P.forEachOfSeries=P.eachOfSeries=function(t,e,r){function o(){var n=!0;return null===a?r(null):(e(t[a],a,u(function(t){if(t)r(t);else{if(a=c(),null===a)return r(null);n?P.setImmediate(o):o()}})),void(n=!1))}r=i(r||n),t=t||[];var c=h(t),a=c();o()},P.forEachOfLimit=P.eachOfLimit=function(n,t,e,r){v(t)(n,e,r)},P.map=d(b),P.mapSeries=k(b),P.mapLimit=g(b),P.inject=P.foldl=P.reduce=function(n,t,e,r){P.eachOfSeries(n,function(n,r,u){e(t,n,function(n,e){t=e,u(n)})},function(n){r(n,t)})},P.foldr=P.reduceRight=function(n,e,r,u){var i=a(n,t).reverse();P.reduce(i,e,r,u)},P.transform=function(n,t,e,r){3===arguments.length&&(r=e,e=t,t=M(n)?[]:{}),P.eachOf(n,function(n,r,u){e(t,n,r,u)},function(n){r(n,t)})},P.select=P.filter=d(w),P.selectLimit=P.filterLimit=g(w),P.selectSeries=P.filterSeries=k(w),P.reject=d(O),P.rejectLimit=g(O),P.rejectSeries=k(O),P.any=P.some=S(P.eachOf,e,t),P.someLimit=S(P.eachOfLimit,e,t),P.all=P.every=S(P.eachOf,r,r),P.everyLimit=S(P.eachOfLimit,r,r),P.detect=S(P.eachOf,t,E),P.detectSeries=S(P.eachOfSeries,t,E),P.detectLimit=S(P.eachOfLimit,t,E),P.sortBy=function(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return r>e?-1:e>r?1:0}P.map(n,function(n,e){t(n,function(t,r){t?e(t):e(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,a(t.sort(r),function(n){return n.value}))})},P.auto=function(t,e,r){function u(n){g.unshift(n)}function o(n){var t=p(g,n);t>=0&&g.splice(t,1)}function a(){h--,c(g.slice(0),function(n){n()})}"function"==typeof arguments[1]&&(r=e,e=null),r=i(r||n);var f=W(t),h=f.length;if(!h)return r(null);e||(e=h);var y={},v=0,d=!1,g=[];u(function(){h||r(null,y)}),c(f,function(n){function i(){return e>v&&l(k,function(n,t){return n&&y.hasOwnProperty(t)},!0)&&!y.hasOwnProperty(n)}function c(){i()&&(v++,o(c),h[h.length-1](g,y))}if(!d){for(var f,h=M(t[n])?t[n]:[t[n]],g=m(function(t,e){if(v--,e.length<=1&&(e=e[0]),t){var u={};s(y,function(n,t){u[t]=n}),u[n]=e,d=!0,r(t,u)}else y[n]=e,P.setImmediate(a)}),k=h.slice(0,h.length-1),b=k.length;b--;){if(!(f=t[k[b]]))throw new Error("Has nonexistent dependency in "+k.join(", "));if(M(f)&&p(f,n)>=0)throw new Error("Has cyclic dependencies")}i()?(v++,h[h.length-1](g,y)):u(c)}})},P.retry=function(n,t,e){function r(n,t){if("number"==typeof t)n.times=parseInt(t,10)||i;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);n.times=parseInt(t.times,10)||i,n.interval=parseInt(t.interval,10)||o}}function u(n,t){function e(n,e){return function(r){n(function(n,t){r(!n||e,{err:n,result:t})},t)}}function r(n){return function(t){setTimeout(function(){t(null)},n)}}for(;a.times;){var u=!(a.times-=1);c.push(e(a.task,u)),!u&&a.interval>0&&c.push(r(a.interval))}P.series(c,function(t,e){e=e[e.length-1],(n||a.callback)(e.err,e.result)})}var i=5,o=0,c=[],a={times:i,interval:o},f=arguments.length;if(1>f||f>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");return 2>=f&&"function"==typeof n&&(e=t,t=n),"function"!=typeof n&&r(a,n),a.callback=e,a.task=t,a.callback?u():u},P.waterfall=function(t,e){function r(n){return m(function(t,u){if(t)e.apply(null,[t].concat(u));else{var i=n.next();i?u.push(r(i)):u.push(e),z(n).apply(null,u)}})}if(e=i(e||n),!M(t)){var u=new Error("First argument to waterfall must be an array of functions");return e(u)}return t.length?void r(P.iterator(t))():e()},P.parallel=function(n,t){L(P.eachOf,n,t)},P.parallelLimit=function(n,t,e){L(v(t),n,e)},P.series=function(n,t){L(P.eachOfSeries,n,t)},P.iterator=function(n){function t(e){function r(){return n.length&&n[e].apply(null,arguments),r.next()}return r.next=function(){return e<n.length-1?t(e+1):null},r}return t(0)},P.apply=m(function(n,t){return m(function(e){return n.apply(null,t.concat(e))})}),P.concat=d(j),P.concatSeries=k(j),P.whilst=function(t,e,r){if(r=r||n,t()){var u=m(function(n,i){n?r(n):t.apply(this,i)?e(u):r.apply(null,[null].concat(i))});e(u)}else r(null)},P.doWhilst=function(n,t,e){var r=0;return P.whilst(function(){return++r<=1||t.apply(this,arguments)},n,e)},P.until=function(n,t,e){return P.whilst(function(){return!n.apply(this,arguments)},t,e)},P.doUntil=function(n,t,e){return P.doWhilst(n,function(){return!t.apply(this,arguments)},e)},P.during=function(t,e,r){r=r||n;var u=m(function(n,e){n?r(n):(e.push(i),t.apply(this,e))}),i=function(n,t){n?r(n):t?e(u):r(null)};t(i)},P.doDuring=function(n,t,e){var r=0;P.during(function(n){r++<1?n(null,!0):t.apply(this,arguments)},n,e)},P.queue=function(n,t){var e=I(function(t,e){n(t[0],e)},t,1);return e},P.priorityQueue=function(t,e){function r(n,t){return n.priority-t.priority}function u(n,t,e){for(var r=-1,u=n.length-1;u>r;){var i=r+(u-r+1>>>1);e(t,n[i])>=0?r=i:u=i-1}return r}function i(t,e,i,o){if(null!=o&&"function"!=typeof o)throw new Error("task callback must be a function");return t.started=!0,M(e)||(e=[e]),0===e.length?P.setImmediate(function(){t.drain()}):void c(e,function(e){var c={data:e,priority:i,callback:"function"==typeof o?o:n};t.tasks.splice(u(t.tasks,c,r)+1,0,c),t.tasks.length===t.concurrency&&t.saturated(),P.setImmediate(t.process)})}var o=P.queue(t,e);return o.push=function(n,t,e){i(o,n,t,e)},delete o.unshift,o},P.cargo=function(n,t){return I(n,1,t)},P.log=x("log"),P.dir=x("dir"),P.memoize=function(n,e){var r={},u={},i=Object.prototype.hasOwnProperty;e=e||t;var o=m(function(t){var o=t.pop(),c=e.apply(null,t);i.call(r,c)?P.setImmediate(function(){o.apply(null,r[c])}):i.call(u,c)?u[c].push(o):(u[c]=[o],n.apply(null,t.concat([m(function(n){r[c]=n;var t=u[c];delete u[c];for(var e=0,i=t.length;i>e;e++)t[e].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o},P.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},P.times=A(P.map),P.timesSeries=A(P.mapSeries),P.timesLimit=function(n,t,e,r){return P.mapLimit(f(n),t,e,r)},P.seq=function(){var t=arguments;return m(function(e){var r=this,u=e[e.length-1];"function"==typeof u?e.pop():u=n,P.reduce(t,e,function(n,t,e){t.apply(r,n.concat([m(function(n,t){e(n,t)})]))},function(n,t){u.apply(r,[n].concat(t))})})},P.compose=function(){return P.seq.apply(null,Array.prototype.reverse.call(arguments))},P.applyEach=T(P.eachOf),P.applyEachSeries=T(P.eachOfSeries),P.forever=function(t,e){function r(n){return n?i(n):void o(r)}var i=u(e||n),o=z(t);r()},P.ensureAsync=z,P.constant=m(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),P.wrapSync=P.asyncify=function(n){return m(function(t){var e,r=t.pop();try{e=n.apply(this,t)}catch(u){return r(u)}U(e)&&"function"==typeof e.then?e.then(function(n){r(null,n)})["catch"](function(n){r(n.message?n:new Error(n))}):r(null,e)})},"object"==typeof module&&module.exports?module.exports=P:"function"==typeof define&&define.amd?define([],function(){return P}):C.async=P}();
-//# sourceMappingURL=dist/async.min.map \ No newline at end of file
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js b/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
deleted file mode 100644
index 31e7620fb..000000000
--- a/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
+++ /dev/null
@@ -1,1265 +0,0 @@
-/*!
- * async
- * https://github.com/caolan/async
- *
- * Copyright 2010-2014 Caolan McMahon
- * Released under the MIT license
- */
-(function () {
-
- var async = {};
- function noop() {}
- function identity(v) {
- return v;
- }
- function toBool(v) {
- return !!v;
- }
- function notId(v) {
- return !v;
- }
-
- // global on the server, window in the browser
- var previous_async;
-
- // Establish the root object, `window` (`self`) in the browser, `global`
- // on the server, or `this` in some virtual machines. We use `self`
- // instead of `window` for `WebWorker` support.
- var root = typeof self === 'object' && self.self === self && self ||
- typeof global === 'object' && global.global === global && global ||
- this;
-
- if (root != null) {
- previous_async = root.async;
- }
-
- async.noConflict = function () {
- root.async = previous_async;
- return async;
- };
-
- function only_once(fn) {
- return function() {
- if (fn === null) throw new Error("Callback was already called.");
- fn.apply(this, arguments);
- fn = null;
- };
- }
-
- function _once(fn) {
- return function() {
- if (fn === null) return;
- fn.apply(this, arguments);
- fn = null;
- };
- }
-
- //// cross-browser compatiblity functions ////
-
- var _toString = Object.prototype.toString;
-
- var _isArray = Array.isArray || function (obj) {
- return _toString.call(obj) === '[object Array]';
- };
-
- // Ported from underscore.js isObject
- var _isObject = function(obj) {
- var type = typeof obj;
- return type === 'function' || type === 'object' && !!obj;
- };
-
- function _isArrayLike(arr) {
- return _isArray(arr) || (
- // has a positive integer length property
- typeof arr.length === "number" &&
- arr.length >= 0 &&
- arr.length % 1 === 0
- );
- }
-
- function _arrayEach(arr, iterator) {
- var index = -1,
- length = arr.length;
-
- while (++index < length) {
- iterator(arr[index], index, arr);
- }
- }
-
- function _map(arr, iterator) {
- var index = -1,
- length = arr.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = iterator(arr[index], index, arr);
- }
- return result;
- }
-
- function _range(count) {
- return _map(Array(count), function (v, i) { return i; });
- }
-
- function _reduce(arr, iterator, memo) {
- _arrayEach(arr, function (x, i, a) {
- memo = iterator(memo, x, i, a);
- });
- return memo;
- }
-
- function _forEachOf(object, iterator) {
- _arrayEach(_keys(object), function (key) {
- iterator(object[key], key);
- });
- }
-
- function _indexOf(arr, item) {
- for (var i = 0; i < arr.length; i++) {
- if (arr[i] === item) return i;
- }
- return -1;
- }
-
- var _keys = Object.keys || function (obj) {
- var keys = [];
- for (var k in obj) {
- if (obj.hasOwnProperty(k)) {
- keys.push(k);
- }
- }
- return keys;
- };
-
- function _keyIterator(coll) {
- var i = -1;
- var len;
- var keys;
- if (_isArrayLike(coll)) {
- len = coll.length;
- return function next() {
- i++;
- return i < len ? i : null;
- };
- } else {
- keys = _keys(coll);
- len = keys.length;
- return function next() {
- i++;
- return i < len ? keys[i] : null;
- };
- }
- }
-
- // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html)
- // This accumulates the arguments passed into an array, after a given index.
- // From underscore.js (https://github.com/jashkenas/underscore/pull/2140).
- function _restParam(func, startIndex) {
- startIndex = startIndex == null ? func.length - 1 : +startIndex;
- return function() {
- var length = Math.max(arguments.length - startIndex, 0);
- var rest = Array(length);
- for (var index = 0; index < length; index++) {
- rest[index] = arguments[index + startIndex];
- }
- switch (startIndex) {
- case 0: return func.call(this, rest);
- case 1: return func.call(this, arguments[0], rest);
- }
- // Currently unused but handle cases outside of the switch statement:
- // var args = Array(startIndex + 1);
- // for (index = 0; index < startIndex; index++) {
- // args[index] = arguments[index];
- // }
- // args[startIndex] = rest;
- // return func.apply(this, args);
- };
- }
-
- function _withoutIndex(iterator) {
- return function (value, index, callback) {
- return iterator(value, callback);
- };
- }
-
- //// exported async module functions ////
-
- //// nextTick implementation with browser-compatible fallback ////
-
- // capture the global reference to guard against fakeTimer mocks
- var _setImmediate = typeof setImmediate === 'function' && setImmediate;
-
- var _delay = _setImmediate ? function(fn) {
- // not a direct alias for IE10 compatibility
- _setImmediate(fn);
- } : function(fn) {
- setTimeout(fn, 0);
- };
-
- if (typeof process === 'object' && typeof process.nextTick === 'function') {
- async.nextTick = process.nextTick;
- } else {
- async.nextTick = _delay;
- }
- async.setImmediate = _setImmediate ? _delay : async.nextTick;
-
-
- async.forEach =
- async.each = function (arr, iterator, callback) {
- return async.eachOf(arr, _withoutIndex(iterator), callback);
- };
-
- async.forEachSeries =
- async.eachSeries = function (arr, iterator, callback) {
- return async.eachOfSeries(arr, _withoutIndex(iterator), callback);
- };
-
-
- async.forEachLimit =
- async.eachLimit = function (arr, limit, iterator, callback) {
- return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback);
- };
-
- async.forEachOf =
- async.eachOf = function (object, iterator, callback) {
- callback = _once(callback || noop);
- object = object || [];
-
- var iter = _keyIterator(object);
- var key, completed = 0;
-
- while ((key = iter()) != null) {
- completed += 1;
- iterator(object[key], key, only_once(done));
- }
-
- if (completed === 0) callback(null);
-
- function done(err) {
- completed--;
- if (err) {
- callback(err);
- }
- // Check key is null in case iterator isn't exhausted
- // and done resolved synchronously.
- else if (key === null && completed <= 0) {
- callback(null);
- }
- }
- };
-
- async.forEachOfSeries =
- async.eachOfSeries = function (obj, iterator, callback) {
- callback = _once(callback || noop);
- obj = obj || [];
- var nextKey = _keyIterator(obj);
- var key = nextKey();
- function iterate() {
- var sync = true;
- if (key === null) {
- return callback(null);
- }
- iterator(obj[key], key, only_once(function (err) {
- if (err) {
- callback(err);
- }
- else {
- key = nextKey();
- if (key === null) {
- return callback(null);
- } else {
- if (sync) {
- async.setImmediate(iterate);
- } else {
- iterate();
- }
- }
- }
- }));
- sync = false;
- }
- iterate();
- };
-
-
-
- async.forEachOfLimit =
- async.eachOfLimit = function (obj, limit, iterator, callback) {
- _eachOfLimit(limit)(obj, iterator, callback);
- };
-
- function _eachOfLimit(limit) {
-
- return function (obj, iterator, callback) {
- callback = _once(callback || noop);
- obj = obj || [];
- var nextKey = _keyIterator(obj);
- if (limit <= 0) {
- return callback(null);
- }
- var done = false;
- var running = 0;
- var errored = false;
-
- (function replenish () {
- if (done && running <= 0) {
- return callback(null);
- }
-
- while (running < limit && !errored) {
- var key = nextKey();
- if (key === null) {
- done = true;
- if (running <= 0) {
- callback(null);
- }
- return;
- }
- running += 1;
- iterator(obj[key], key, only_once(function (err) {
- running -= 1;
- if (err) {
- callback(err);
- errored = true;
- }
- else {
- replenish();
- }
- }));
- }
- })();
- };
- }
-
-
- function doParallel(fn) {
- return function (obj, iterator, callback) {
- return fn(async.eachOf, obj, iterator, callback);
- };
- }
- function doParallelLimit(fn) {
- return function (obj, limit, iterator, callback) {
- return fn(_eachOfLimit(limit), obj, iterator, callback);
- };
- }
- function doSeries(fn) {
- return function (obj, iterator, callback) {
- return fn(async.eachOfSeries, obj, iterator, callback);
- };
- }
-
- function _asyncMap(eachfn, arr, iterator, callback) {
- callback = _once(callback || noop);
- arr = arr || [];
- var results = _isArrayLike(arr) ? [] : {};
- eachfn(arr, function (value, index, callback) {
- iterator(value, function (err, v) {
- results[index] = v;
- callback(err);
- });
- }, function (err) {
- callback(err, results);
- });
- }
-
- async.map = doParallel(_asyncMap);
- async.mapSeries = doSeries(_asyncMap);
- async.mapLimit = doParallelLimit(_asyncMap);
-
- // reduce only has a series version, as doing reduce in parallel won't
- // work in many situations.
- async.inject =
- async.foldl =
- async.reduce = function (arr, memo, iterator, callback) {
- async.eachOfSeries(arr, function (x, i, callback) {
- iterator(memo, x, function (err, v) {
- memo = v;
- callback(err);
- });
- }, function (err) {
- callback(err, memo);
- });
- };
-
- async.foldr =
- async.reduceRight = function (arr, memo, iterator, callback) {
- var reversed = _map(arr, identity).reverse();
- async.reduce(reversed, memo, iterator, callback);
- };
-
- async.transform = function (arr, memo, iterator, callback) {
- if (arguments.length === 3) {
- callback = iterator;
- iterator = memo;
- memo = _isArray(arr) ? [] : {};
- }
-
- async.eachOf(arr, function(v, k, cb) {
- iterator(memo, v, k, cb);
- }, function(err) {
- callback(err, memo);
- });
- };
-
- function _filter(eachfn, arr, iterator, callback) {
- var results = [];
- eachfn(arr, function (x, index, callback) {
- iterator(x, function (v) {
- if (v) {
- results.push({index: index, value: x});
- }
- callback();
- });
- }, function () {
- callback(_map(results.sort(function (a, b) {
- return a.index - b.index;
- }), function (x) {
- return x.value;
- }));
- });
- }
-
- async.select =
- async.filter = doParallel(_filter);
-
- async.selectLimit =
- async.filterLimit = doParallelLimit(_filter);
-
- async.selectSeries =
- async.filterSeries = doSeries(_filter);
-
- function _reject(eachfn, arr, iterator, callback) {
- _filter(eachfn, arr, function(value, cb) {
- iterator(value, function(v) {
- cb(!v);
- });
- }, callback);
- }
- async.reject = doParallel(_reject);
- async.rejectLimit = doParallelLimit(_reject);
- async.rejectSeries = doSeries(_reject);
-
- function _createTester(eachfn, check, getResult) {
- return function(arr, limit, iterator, cb) {
- function done() {
- if (cb) cb(getResult(false, void 0));
- }
- function iteratee(x, _, callback) {
- if (!cb) return callback();
- iterator(x, function (v) {
- if (cb && check(v)) {
- cb(getResult(true, x));
- cb = iterator = false;
- }
- callback();
- });
- }
- if (arguments.length > 3) {
- eachfn(arr, limit, iteratee, done);
- } else {
- cb = iterator;
- iterator = limit;
- eachfn(arr, iteratee, done);
- }
- };
- }
-
- async.any =
- async.some = _createTester(async.eachOf, toBool, identity);
-
- async.someLimit = _createTester(async.eachOfLimit, toBool, identity);
-
- async.all =
- async.every = _createTester(async.eachOf, notId, notId);
-
- async.everyLimit = _createTester(async.eachOfLimit, notId, notId);
-
- function _findGetResult(v, x) {
- return x;
- }
- async.detect = _createTester(async.eachOf, identity, _findGetResult);
- async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult);
- async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult);
-
- async.sortBy = function (arr, iterator, callback) {
- async.map(arr, function (x, callback) {
- iterator(x, function (err, criteria) {
- if (err) {
- callback(err);
- }
- else {
- callback(null, {value: x, criteria: criteria});
- }
- });
- }, function (err, results) {
- if (err) {
- return callback(err);
- }
- else {
- callback(null, _map(results.sort(comparator), function (x) {
- return x.value;
- }));
- }
-
- });
-
- function comparator(left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- }
- };
-
- async.auto = function (tasks, concurrency, callback) {
- if (typeof arguments[1] === 'function') {
- // concurrency is optional, shift the args.
- callback = concurrency;
- concurrency = null;
- }
- callback = _once(callback || noop);
- var keys = _keys(tasks);
- var remainingTasks = keys.length;
- if (!remainingTasks) {
- return callback(null);
- }
- if (!concurrency) {
- concurrency = remainingTasks;
- }
-
- var results = {};
- var runningTasks = 0;
-
- var hasError = false;
-
- var listeners = [];
- function addListener(fn) {
- listeners.unshift(fn);
- }
- function removeListener(fn) {
- var idx = _indexOf(listeners, fn);
- if (idx >= 0) listeners.splice(idx, 1);
- }
- function taskComplete() {
- remainingTasks--;
- _arrayEach(listeners.slice(0), function (fn) {
- fn();
- });
- }
-
- addListener(function () {
- if (!remainingTasks) {
- callback(null, results);
- }
- });
-
- _arrayEach(keys, function (k) {
- if (hasError) return;
- var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
- var taskCallback = _restParam(function(err, args) {
- runningTasks--;
- if (args.length <= 1) {
- args = args[0];
- }
- if (err) {
- var safeResults = {};
- _forEachOf(results, function(val, rkey) {
- safeResults[rkey] = val;
- });
- safeResults[k] = args;
- hasError = true;
-
- callback(err, safeResults);
- }
- else {
- results[k] = args;
- async.setImmediate(taskComplete);
- }
- });
- var requires = task.slice(0, task.length - 1);
- // prevent dead-locks
- var len = requires.length;
- var dep;
- while (len--) {
- if (!(dep = tasks[requires[len]])) {
- throw new Error('Has nonexistent dependency in ' + requires.join(', '));
- }
- if (_isArray(dep) && _indexOf(dep, k) >= 0) {
- throw new Error('Has cyclic dependencies');
- }
- }
- function ready() {
- return runningTasks < concurrency && _reduce(requires, function (a, x) {
- return (a && results.hasOwnProperty(x));
- }, true) && !results.hasOwnProperty(k);
- }
- if (ready()) {
- runningTasks++;
- task[task.length - 1](taskCallback, results);
- }
- else {
- addListener(listener);
- }
- function listener() {
- if (ready()) {
- runningTasks++;
- removeListener(listener);
- task[task.length - 1](taskCallback, results);
- }
- }
- });
- };
-
-
-
- async.retry = function(times, task, callback) {
- var DEFAULT_TIMES = 5;
- var DEFAULT_INTERVAL = 0;
-
- var attempts = [];
-
- var opts = {
- times: DEFAULT_TIMES,
- interval: DEFAULT_INTERVAL
- };
-
- function parseTimes(acc, t){
- if(typeof t === 'number'){
- acc.times = parseInt(t, 10) || DEFAULT_TIMES;
- } else if(typeof t === 'object'){
- acc.times = parseInt(t.times, 10) || DEFAULT_TIMES;
- acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL;
- } else {
- throw new Error('Unsupported argument type for \'times\': ' + typeof t);
- }
- }
-
- var length = arguments.length;
- if (length < 1 || length > 3) {
- throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)');
- } else if (length <= 2 && typeof times === 'function') {
- callback = task;
- task = times;
- }
- if (typeof times !== 'function') {
- parseTimes(opts, times);
- }
- opts.callback = callback;
- opts.task = task;
-
- function wrappedTask(wrappedCallback, wrappedResults) {
- function retryAttempt(task, finalAttempt) {
- return function(seriesCallback) {
- task(function(err, result){
- seriesCallback(!err || finalAttempt, {err: err, result: result});
- }, wrappedResults);
- };
- }
-
- function retryInterval(interval){
- return function(seriesCallback){
- setTimeout(function(){
- seriesCallback(null);
- }, interval);
- };
- }
-
- while (opts.times) {
-
- var finalAttempt = !(opts.times-=1);
- attempts.push(retryAttempt(opts.task, finalAttempt));
- if(!finalAttempt && opts.interval > 0){
- attempts.push(retryInterval(opts.interval));
- }
- }
-
- async.series(attempts, function(done, data){
- data = data[data.length - 1];
- (wrappedCallback || opts.callback)(data.err, data.result);
- });
- }
-
- // If a callback is passed, run this as a controll flow
- return opts.callback ? wrappedTask() : wrappedTask;
- };
-
- async.waterfall = function (tasks, callback) {
- callback = _once(callback || noop);
- if (!_isArray(tasks)) {
- var err = new Error('First argument to waterfall must be an array of functions');
- return callback(err);
- }
- if (!tasks.length) {
- return callback();
- }
- function wrapIterator(iterator) {
- return _restParam(function (err, args) {
- if (err) {
- callback.apply(null, [err].concat(args));
- }
- else {
- var next = iterator.next();
- if (next) {
- args.push(wrapIterator(next));
- }
- else {
- args.push(callback);
- }
- ensureAsync(iterator).apply(null, args);
- }
- });
- }
- wrapIterator(async.iterator(tasks))();
- };
-
- function _parallel(eachfn, tasks, callback) {
- callback = callback || noop;
- var results = _isArrayLike(tasks) ? [] : {};
-
- eachfn(tasks, function (task, key, callback) {
- task(_restParam(function (err, args) {
- if (args.length <= 1) {
- args = args[0];
- }
- results[key] = args;
- callback(err);
- }));
- }, function (err) {
- callback(err, results);
- });
- }
-
- async.parallel = function (tasks, callback) {
- _parallel(async.eachOf, tasks, callback);
- };
-
- async.parallelLimit = function(tasks, limit, callback) {
- _parallel(_eachOfLimit(limit), tasks, callback);
- };
-
- async.series = function(tasks, callback) {
- _parallel(async.eachOfSeries, tasks, callback);
- };
-
- async.iterator = function (tasks) {
- function makeCallback(index) {
- function fn() {
- if (tasks.length) {
- tasks[index].apply(null, arguments);
- }
- return fn.next();
- }
- fn.next = function () {
- return (index < tasks.length - 1) ? makeCallback(index + 1): null;
- };
- return fn;
- }
- return makeCallback(0);
- };
-
- async.apply = _restParam(function (fn, args) {
- return _restParam(function (callArgs) {
- return fn.apply(
- null, args.concat(callArgs)
- );
- });
- });
-
- function _concat(eachfn, arr, fn, callback) {
- var result = [];
- eachfn(arr, function (x, index, cb) {
- fn(x, function (err, y) {
- result = result.concat(y || []);
- cb(err);
- });
- }, function (err) {
- callback(err, result);
- });
- }
- async.concat = doParallel(_concat);
- async.concatSeries = doSeries(_concat);
-
- async.whilst = function (test, iterator, callback) {
- callback = callback || noop;
- if (test()) {
- var next = _restParam(function(err, args) {
- if (err) {
- callback(err);
- } else if (test.apply(this, args)) {
- iterator(next);
- } else {
- callback.apply(null, [null].concat(args));
- }
- });
- iterator(next);
- } else {
- callback(null);
- }
- };
-
- async.doWhilst = function (iterator, test, callback) {
- var calls = 0;
- return async.whilst(function() {
- return ++calls <= 1 || test.apply(this, arguments);
- }, iterator, callback);
- };
-
- async.until = function (test, iterator, callback) {
- return async.whilst(function() {
- return !test.apply(this, arguments);
- }, iterator, callback);
- };
-
- async.doUntil = function (iterator, test, callback) {
- return async.doWhilst(iterator, function() {
- return !test.apply(this, arguments);
- }, callback);
- };
-
- async.during = function (test, iterator, callback) {
- callback = callback || noop;
-
- var next = _restParam(function(err, args) {
- if (err) {
- callback(err);
- } else {
- args.push(check);
- test.apply(this, args);
- }
- });
-
- var check = function(err, truth) {
- if (err) {
- callback(err);
- } else if (truth) {
- iterator(next);
- } else {
- callback(null);
- }
- };
-
- test(check);
- };
-
- async.doDuring = function (iterator, test, callback) {
- var calls = 0;
- async.during(function(next) {
- if (calls++ < 1) {
- next(null, true);
- } else {
- test.apply(this, arguments);
- }
- }, iterator, callback);
- };
-
- function _queue(worker, concurrency, payload) {
- if (concurrency == null) {
- concurrency = 1;
- }
- else if(concurrency === 0) {
- throw new Error('Concurrency must not be zero');
- }
- function _insert(q, data, pos, 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 async.setImmediate(function() {
- q.drain();
- });
- }
- _arrayEach(data, function(task) {
- var item = {
- data: task,
- callback: callback || noop
- };
-
- if (pos) {
- q.tasks.unshift(item);
- } else {
- q.tasks.push(item);
- }
-
- if (q.tasks.length === q.concurrency) {
- q.saturated();
- }
- });
- async.setImmediate(q.process);
- }
- function _next(q, tasks) {
- return function(){
- workers -= 1;
-
- var removed = false;
- var args = arguments;
- _arrayEach(tasks, function (task) {
- _arrayEach(workersList, function (worker, index) {
- if (worker === task && !removed) {
- workersList.splice(index, 1);
- removed = true;
- }
- });
-
- task.callback.apply(task, args);
- });
- if (q.tasks.length + workers === 0) {
- q.drain();
- }
- q.process();
- };
- }
-
- var workers = 0;
- var workersList = [];
- var q = {
- tasks: [],
- concurrency: concurrency,
- payload: payload,
- saturated: noop,
- empty: noop,
- drain: noop,
- started: false,
- paused: false,
- push: function (data, callback) {
- _insert(q, data, false, callback);
- },
- kill: function () {
- q.drain = noop;
- q.tasks = [];
- },
- unshift: function (data, callback) {
- _insert(q, data, true, callback);
- },
- process: function () {
- while(!q.paused && workers < q.concurrency && q.tasks.length){
-
- var tasks = q.payload ?
- q.tasks.splice(0, q.payload) :
- q.tasks.splice(0, q.tasks.length);
-
- var data = _map(tasks, function (task) {
- return task.data;
- });
-
- if (q.tasks.length === 0) {
- q.empty();
- }
- workers += 1;
- workersList.push(tasks[0]);
- var cb = only_once(_next(q, tasks));
- worker(data, cb);
- }
- },
- length: function () {
- return q.tasks.length;
- },
- running: function () {
- return workers;
- },
- workersList: function () {
- return workersList;
- },
- idle: function() {
- return q.tasks.length + workers === 0;
- },
- pause: function () {
- q.paused = true;
- },
- resume: function () {
- if (q.paused === false) { return; }
- q.paused = false;
- var resumeCount = Math.min(q.concurrency, q.tasks.length);
- // Need to call q.process once per concurrent
- // worker to preserve full concurrency after pause
- for (var w = 1; w <= resumeCount; w++) {
- async.setImmediate(q.process);
- }
- }
- };
- return q;
- }
-
- async.queue = function (worker, concurrency) {
- var q = _queue(function (items, cb) {
- worker(items[0], cb);
- }, concurrency, 1);
-
- return q;
- };
-
- async.priorityQueue = function (worker, concurrency) {
-
- function _compareTasks(a, b){
- return a.priority - b.priority;
- }
-
- function _binarySearch(sequence, item, compare) {
- var beg = -1,
- end = sequence.length - 1;
- while (beg < end) {
- var mid = beg + ((end - beg + 1) >>> 1);
- if (compare(item, sequence[mid]) >= 0) {
- beg = mid;
- } else {
- end = mid - 1;
- }
- }
- return beg;
- }
-
- function _insert(q, data, priority, 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) {
- // call drain immediately if there are no tasks
- return async.setImmediate(function() {
- q.drain();
- });
- }
- _arrayEach(data, function(task) {
- var item = {
- data: task,
- priority: priority,
- callback: typeof callback === 'function' ? callback : noop
- };
-
- q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);
-
- if (q.tasks.length === q.concurrency) {
- q.saturated();
- }
- async.setImmediate(q.process);
- });
- }
-
- // Start with a normal queue
- var q = async.queue(worker, concurrency);
-
- // Override push to accept second parameter representing priority
- q.push = function (data, priority, callback) {
- _insert(q, data, priority, callback);
- };
-
- // Remove unshift function
- delete q.unshift;
-
- return q;
- };
-
- async.cargo = function (worker, payload) {
- return _queue(worker, 1, payload);
- };
-
- function _console_fn(name) {
- return _restParam(function (fn, args) {
- fn.apply(null, args.concat([_restParam(function (err, args) {
- if (typeof console === 'object') {
- if (err) {
- if (console.error) {
- console.error(err);
- }
- }
- else if (console[name]) {
- _arrayEach(args, function (x) {
- console[name](x);
- });
- }
- }
- })]));
- });
- }
- async.log = _console_fn('log');
- async.dir = _console_fn('dir');
- /*async.info = _console_fn('info');
- async.warn = _console_fn('warn');
- async.error = _console_fn('error');*/
-
- async.memoize = function (fn, hasher) {
- var memo = {};
- var queues = {};
- var has = Object.prototype.hasOwnProperty;
- hasher = hasher || identity;
- var memoized = _restParam(function memoized(args) {
- var callback = args.pop();
- var key = hasher.apply(null, args);
- if (has.call(memo, key)) {
- async.setImmediate(function () {
- callback.apply(null, memo[key]);
- });
- }
- else if (has.call(queues, key)) {
- queues[key].push(callback);
- }
- else {
- queues[key] = [callback];
- fn.apply(null, args.concat([_restParam(function (args) {
- 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;
- };
-
- async.unmemoize = function (fn) {
- return function () {
- return (fn.unmemoized || fn).apply(null, arguments);
- };
- };
-
- function _times(mapper) {
- return function (count, iterator, callback) {
- mapper(_range(count), iterator, callback);
- };
- }
-
- async.times = _times(async.map);
- async.timesSeries = _times(async.mapSeries);
- async.timesLimit = function (count, limit, iterator, callback) {
- return async.mapLimit(_range(count), limit, iterator, callback);
- };
-
- async.seq = function (/* functions... */) {
- var fns = arguments;
- return _restParam(function (args) {
- var that = this;
-
- var callback = args[args.length - 1];
- if (typeof callback == 'function') {
- args.pop();
- } else {
- callback = noop;
- }
-
- async.reduce(fns, args, function (newargs, fn, cb) {
- fn.apply(that, newargs.concat([_restParam(function (err, nextargs) {
- cb(err, nextargs);
- })]));
- },
- function (err, results) {
- callback.apply(that, [err].concat(results));
- });
- });
- };
-
- async.compose = function (/* functions... */) {
- return async.seq.apply(null, Array.prototype.reverse.call(arguments));
- };
-
-
- function _applyEach(eachfn) {
- return _restParam(function(fns, args) {
- var go = _restParam(function(args) {
- var that = this;
- var callback = args.pop();
- return eachfn(fns, function (fn, _, cb) {
- fn.apply(that, args.concat([cb]));
- },
- callback);
- });
- if (args.length) {
- return go.apply(this, args);
- }
- else {
- return go;
- }
- });
- }
-
- async.applyEach = _applyEach(async.eachOf);
- async.applyEachSeries = _applyEach(async.eachOfSeries);
-
-
- async.forever = function (fn, callback) {
- var done = only_once(callback || noop);
- var task = ensureAsync(fn);
- function next(err) {
- if (err) {
- return done(err);
- }
- task(next);
- }
- next();
- };
-
- function ensureAsync(fn) {
- return _restParam(function (args) {
- var callback = args.pop();
- args.push(function () {
- var innerArgs = arguments;
- if (sync) {
- async.setImmediate(function () {
- callback.apply(null, innerArgs);
- });
- } else {
- callback.apply(null, innerArgs);
- }
- });
- var sync = true;
- fn.apply(this, args);
- sync = false;
- });
- }
-
- async.ensureAsync = ensureAsync;
-
- async.constant = _restParam(function(values) {
- var args = [null].concat(values);
- return function (callback) {
- return callback.apply(this, args);
- };
- });
-
- async.wrapSync =
- async.asyncify = function asyncify(func) {
- return _restParam(function (args) {
- var callback = args.pop();
- 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) {
- callback(null, value);
- })["catch"](function(err) {
- callback(err.message ? err : new Error(err));
- });
- } else {
- callback(null, result);
- }
- });
- };
-
- // Node.js
- if (typeof module === 'object' && module.exports) {
- module.exports = async;
- }
- // AMD / RequireJS
- else if (typeof define === 'function' && define.amd) {
- define([], function () {
- return async;
- });
- }
- // included directly via <script> tag
- else {
- root.async = async;
- }
-
-}());
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/package.json b/node_modules/request/node_modules/form-data/node_modules/async/package.json
deleted file mode 100644
index 88b1fa0c8..000000000
--- a/node_modules/request/node_modules/form-data/node_modules/async/package.json
+++ /dev/null
@@ -1,158 +0,0 @@
-{
- "_args": [
- [
- {
- "raw": "async@^1.5.2",
- "scope": null,
- "escapedName": "async",
- "name": "async",
- "rawSpec": "^1.5.2",
- "spec": ">=1.5.2 <2.0.0",
- "type": "range"
- },
- "/Users/rebecca/code/npm/node_modules/request/node_modules/form-data"
- ]
- ],
- "_from": "async@>=1.5.2 <2.0.0",
- "_id": "async@1.5.2",
- "_inCache": true,
- "_installable": true,
- "_location": "/request/form-data/async",
- "_nodeVersion": "4.2.3",
- "_npmUser": {
- "name": "aearly",
- "email": "alexander.early@gmail.com"
- },
- "_npmVersion": "3.5.2",
- "_phantomChildren": {},
- "_requested": {
- "raw": "async@^1.5.2",
- "scope": null,
- "escapedName": "async",
- "name": "async",
- "rawSpec": "^1.5.2",
- "spec": ">=1.5.2 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/request/form-data"
- ],
- "_resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
- "_shasum": "ec6a61ae56480c0c3cb241c95618e20892f9672a",
- "_shrinkwrap": null,
- "_spec": "async@^1.5.2",
- "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/form-data",
- "author": {
- "name": "Caolan McMahon"
- },
- "bugs": {
- "url": "https://github.com/caolan/async/issues"
- },
- "dependencies": {},
- "description": "Higher-order functions and common patterns for asynchronous code",
- "devDependencies": {
- "benchmark": "github:bestiejs/benchmark.js",
- "bluebird": "^2.9.32",
- "chai": "^3.1.0",
- "coveralls": "^2.11.2",
- "es6-promise": "^2.3.0",
- "jscs": "^1.13.1",
- "jshint": "~2.8.0",
- "karma": "^0.13.2",
- "karma-browserify": "^4.2.1",
- "karma-firefox-launcher": "^0.1.6",
- "karma-mocha": "^0.2.0",
- "karma-mocha-reporter": "^1.0.2",
- "lodash": "^3.9.0",
- "mkdirp": "~0.5.1",
- "mocha": "^2.2.5",
- "native-promise-only": "^0.8.0-a",
- "nodeunit": ">0.0.0",
- "nyc": "^2.1.0",
- "rsvp": "^3.0.18",
- "semver": "^4.3.6",
- "uglify-js": "~2.4.0",
- "xyz": "^0.5.0",
- "yargs": "~3.9.1"
- },
- "directories": {},
- "dist": {
- "shasum": "ec6a61ae56480c0c3cb241c95618e20892f9672a",
- "tarball": "https://registry.npmjs.org/async/-/async-1.5.2.tgz"
- },
- "files": [
- "lib",
- "dist/async.js",
- "dist/async.min.js"
- ],
- "gitHead": "9ab5c67b7cb3a4c3dad4a2d4552a2f6775545d6c",
- "homepage": "https://github.com/caolan/async#readme",
- "jam": {
- "main": "lib/async.js",
- "include": [
- "lib/async.js",
- "README.md",
- "LICENSE"
- ],
- "categories": [
- "Utilities"
- ]
- },
- "keywords": [
- "async",
- "callback",
- "utility",
- "module"
- ],
- "license": "MIT",
- "main": "lib/async.js",
- "maintainers": [
- {
- "name": "caolan",
- "email": "caolan.mcmahon@gmail.com"
- },
- {
- "name": "beaugunderson",
- "email": "beau@beaugunderson.com"
- },
- {
- "name": "aearly",
- "email": "alexander.early@gmail.com"
- },
- {
- "name": "megawac",
- "email": "megawac@gmail.com"
- }
- ],
- "name": "async",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/caolan/async.git"
- },
- "scripts": {
- "coverage": "nyc npm test && nyc report",
- "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
- "lint": "jshint lib/*.js test/*.js perf/*.js && jscs lib/*.js test/*.js perf/*.js",
- "mocha-browser-test": "karma start",
- "mocha-node-test": "mocha mocha_test/",
- "mocha-test": "npm run mocha-node-test && npm run mocha-browser-test",
- "nodeunit-test": "nodeunit test/test-async.js",
- "test": "npm run-script lint && npm run nodeunit-test && npm run mocha-test"
- },
- "spm": {
- "main": "lib/async.js"
- },
- "version": "1.5.2",
- "volo": {
- "main": "lib/async.js",
- "ignore": [
- "**/.*",
- "node_modules",
- "bower_components",
- "test",
- "tests"
- ]
- }
-}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/LICENSE b/node_modules/request/node_modules/form-data/node_modules/asynckit/LICENSE
new file mode 100644
index 000000000..c9eca5dd9
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Alex Indigo
+
+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/node_modules/request/node_modules/form-data/node_modules/asynckit/README.md b/node_modules/request/node_modules/form-data/node_modules/asynckit/README.md
new file mode 100644
index 000000000..ddcc7e6b9
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/README.md
@@ -0,0 +1,233 @@
+# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit)
+
+Minimal async jobs utility library, with streams support.
+
+[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit)
+[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit)
+[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit)
+
+[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master)
+[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit)
+[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit)
+
+<!-- [![Readme](https://img.shields.io/badge/readme-tested-brightgreen.svg?style=flat)](https://www.npmjs.com/package/reamde) -->
+
+AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects.
+Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method.
+
+It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators.
+
+| compression | size |
+| :----------------- | -------: |
+| asynckit.js | 12.34 kB |
+| asynckit.min.js | 4.11 kB |
+| asynckit.min.js.gz | 1.47 kB |
+
+
+## Install
+
+```sh
+$ npm install --save asynckit
+```
+
+## Examples
+
+### Parallel Jobs
+
+Runs iterator over provided array in parallel. Stores output in the `result` array,
+on the matching positions. In unlikely event of an error from one of the jobs,
+will terminate rest of the active jobs (if abort function is provided)
+and return error along with salvaged data to the main callback function.
+
+#### Input Array
+
+```javascript
+var parallel = require('asynckit').parallel
+ , assert = require('assert')
+ ;
+
+var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
+ , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
+ , target = []
+ ;
+
+parallel(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+});
+
+// async job accepts one element from the array
+// and a callback function
+function asyncJob(item, cb)
+{
+ // different delays (in ms) per item
+ var delay = item * 25;
+
+ // pretend different jobs take different time to finish
+ // and not in consequential order
+ var timeoutId = setTimeout(function() {
+ target.push(item);
+ cb(null, item * 2);
+ }, delay);
+
+ // allow to cancel "leftover" jobs upon error
+ // return function, invoking of which will abort this job
+ return clearTimeout.bind(null, timeoutId);
+}
+```
+
+More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js).
+
+#### Input Object
+
+Also it supports named jobs, listed via object.
+
+```javascript
+var parallel = require('asynckit/parallel')
+ , assert = require('assert')
+ ;
+
+var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
+ , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
+ , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
+ , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ]
+ , target = []
+ , keys = []
+ ;
+
+parallel(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+ assert.deepEqual(keys, expectedKeys);
+});
+
+// supports full value, key, callback (shortcut) interface
+function asyncJob(item, key, cb)
+{
+ // different delays (in ms) per item
+ var delay = item * 25;
+
+ // pretend different jobs take different time to finish
+ // and not in consequential order
+ var timeoutId = setTimeout(function() {
+ keys.push(key);
+ target.push(item);
+ cb(null, item * 2);
+ }, delay);
+
+ // allow to cancel "leftover" jobs upon error
+ // return function, invoking of which will abort this job
+ return clearTimeout.bind(null, timeoutId);
+}
+```
+
+More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js).
+
+### Serial Jobs
+
+Runs iterator over provided array sequentially. Stores output in the `result` array,
+on the matching positions. In unlikely event of an error from one of the jobs,
+will not proceed to the rest of the items in the list
+and return error along with salvaged data to the main callback function.
+
+#### Input Array
+
+```javascript
+var serial = require('asynckit/serial')
+ , assert = require('assert')
+ ;
+
+var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
+ , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ , target = []
+ ;
+
+serial(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+});
+
+// extended interface (item, key, callback)
+// also supported for arrays
+function asyncJob(item, key, cb)
+{
+ target.push(key);
+
+ // it will be automatically made async
+ // even it iterator "returns" in the same event loop
+ cb(null, item * 2);
+}
+```
+
+More examples could be found in [test/test-serial-array.js](test/test-serial-array.js).
+
+#### Input Object
+
+Also it supports named jobs, listed via object.
+
+```javascript
+var serial = require('asynckit').serial
+ , assert = require('assert')
+ ;
+
+var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
+ , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ , target = []
+ ;
+
+var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
+ , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
+ , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , target = []
+ ;
+
+
+serial(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+});
+
+// shortcut interface (item, callback)
+// works for object as well as for the arrays
+function asyncJob(item, cb)
+{
+ target.push(item);
+
+ // it will be automatically made async
+ // even it iterator "returns" in the same event loop
+ cb(null, item * 2);
+}
+```
+
+More examples could be found in [test/test-serial-object.js](test/test-serial-object.js).
+
+_Note: Since _object_ is an _unordered_ collection of properties,
+it may produce unexpected results with sequential iterations.
+Whenever order of the jobs' execution is important please use `serialOrdered` method._
+
+### Ordered Serial Iterations
+
+TBD
+
+For example [compare-property](compare-property) package.
+
+### Streaming interface
+
+TBD
+
+## Want to Know More?
+
+More examples can be found in [test folder](test/).
+
+Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions.
+
+## License
+
+AsyncKit is licensed under the MIT license.
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/bench.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/bench.js
new file mode 100644
index 000000000..c612f1a55
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/bench.js
@@ -0,0 +1,76 @@
+/* eslint no-console: "off" */
+
+var asynckit = require('./')
+ , async = require('async')
+ , assert = require('assert')
+ , expected = 0
+ ;
+
+var Benchmark = require('benchmark');
+var suite = new Benchmark.Suite;
+
+var source = [];
+for (var z = 1; z < 100; z++)
+{
+ source.push(z);
+ expected += z;
+}
+
+suite
+// add tests
+
+.add('async.map', function(deferred)
+{
+ var total = 0;
+
+ async.map(source,
+ function(i, cb)
+ {
+ setImmediate(function()
+ {
+ total += i;
+ cb(null, total);
+ });
+ },
+ function(err, result)
+ {
+ assert.ifError(err);
+ assert.equal(result[result.length - 1], expected);
+ deferred.resolve();
+ });
+}, {'defer': true})
+
+
+.add('asynckit.parallel', function(deferred)
+{
+ var total = 0;
+
+ asynckit.parallel(source,
+ function(i, cb)
+ {
+ setImmediate(function()
+ {
+ total += i;
+ cb(null, total);
+ });
+ },
+ function(err, result)
+ {
+ assert.ifError(err);
+ assert.equal(result[result.length - 1], expected);
+ deferred.resolve();
+ });
+}, {'defer': true})
+
+
+// add listeners
+.on('cycle', function(ev)
+{
+ console.log(String(ev.target));
+})
+.on('complete', function()
+{
+ console.log('Fastest is ' + this.filter('fastest').map('name'));
+})
+// run async
+.run({ 'async': true });
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/index.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/index.js
new file mode 100644
index 000000000..455f9454e
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/index.js
@@ -0,0 +1,6 @@
+module.exports =
+{
+ parallel : require('./parallel.js'),
+ serial : require('./serial.js'),
+ serialOrdered : require('./serialOrdered.js')
+};
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/abort.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/abort.js
new file mode 100644
index 000000000..114367e5f
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/abort.js
@@ -0,0 +1,29 @@
+// API
+module.exports = abort;
+
+/**
+ * Aborts leftover active jobs
+ *
+ * @param {object} state - current state object
+ */
+function abort(state)
+{
+ Object.keys(state.jobs).forEach(clean.bind(state));
+
+ // reset leftover jobs
+ state.jobs = {};
+}
+
+/**
+ * Cleans up leftover job by invoking abort function for the provided job id
+ *
+ * @this state
+ * @param {string|number} key - job id to abort
+ */
+function clean(key)
+{
+ if (typeof this.jobs[key] == 'function')
+ {
+ this.jobs[key]();
+ }
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/async.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/async.js
new file mode 100644
index 000000000..7f1288a4c
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/async.js
@@ -0,0 +1,34 @@
+var defer = require('./defer.js');
+
+// API
+module.exports = async;
+
+/**
+ * Runs provided callback asynchronously
+ * even if callback itself is not
+ *
+ * @param {function} callback - callback to invoke
+ * @returns {function} - augmented callback
+ */
+function async(callback)
+{
+ var isAsync = false;
+
+ // check if async happened
+ defer(function() { isAsync = true; });
+
+ return function async_callback(err, result)
+ {
+ if (isAsync)
+ {
+ callback(err, result);
+ }
+ else
+ {
+ defer(function nextTick_callback()
+ {
+ callback(err, result);
+ });
+ }
+ };
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/defer.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/defer.js
new file mode 100644
index 000000000..b67110c7a
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/defer.js
@@ -0,0 +1,26 @@
+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);
+ }
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/iterate.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/iterate.js
new file mode 100644
index 000000000..5d2839a59
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/iterate.js
@@ -0,0 +1,75 @@
+var async = require('./async.js')
+ , abort = require('./abort.js')
+ ;
+
+// API
+module.exports = iterate;
+
+/**
+ * Iterates over each job object
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {object} state - current job status
+ * @param {function} callback - invoked when all elements processed
+ */
+function iterate(list, iterator, state, callback)
+{
+ // store current index
+ var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;
+
+ state.jobs[key] = runJob(iterator, key, list[key], function(error, output)
+ {
+ // don't repeat yourself
+ // skip secondary callbacks
+ if (!(key in state.jobs))
+ {
+ return;
+ }
+
+ // clean up jobs
+ delete state.jobs[key];
+
+ if (error)
+ {
+ // don't process rest of the results
+ // stop still active jobs
+ // and reset the list
+ abort(state);
+ }
+ else
+ {
+ state.results[key] = output;
+ }
+
+ // return salvaged results
+ callback(error, state.results);
+ });
+}
+
+/**
+ * Runs iterator over provided job element
+ *
+ * @param {function} iterator - iterator to invoke
+ * @param {string|number} key - key/index of the element in the list of jobs
+ * @param {mixed} item - job description
+ * @param {function} callback - invoked after iterator is done with the job
+ * @returns {function|mixed} - job abort function or something else
+ */
+function runJob(iterator, key, item, callback)
+{
+ var aborter;
+
+ // allow shortcut if iterator expects only two arguments
+ if (iterator.length == 2)
+ {
+ aborter = iterator(item, async(callback));
+ }
+ // otherwise go with full three arguments
+ else
+ {
+ aborter = iterator(item, key, async(callback));
+ }
+
+ return aborter;
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_asynckit.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_asynckit.js
new file mode 100644
index 000000000..78ad240f0
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_asynckit.js
@@ -0,0 +1,91 @@
+var streamify = require('./streamify.js')
+ , defer = require('./defer.js')
+ ;
+
+// API
+module.exports = ReadableAsyncKit;
+
+/**
+ * Base constructor for all streams
+ * used to hold properties/methods
+ */
+function ReadableAsyncKit()
+{
+ ReadableAsyncKit.super_.apply(this, arguments);
+
+ // list of active jobs
+ this.jobs = {};
+
+ // add stream methods
+ this.destroy = destroy;
+ this._start = _start;
+ this._read = _read;
+}
+
+/**
+ * Destroys readable stream,
+ * by aborting outstanding jobs
+ *
+ * @returns {void}
+ */
+function destroy()
+{
+ if (this.destroyed)
+ {
+ return;
+ }
+
+ this.destroyed = true;
+
+ if (typeof this.terminator == 'function')
+ {
+ this.terminator();
+ }
+}
+
+/**
+ * Starts provided jobs in async manner
+ *
+ * @private
+ */
+function _start()
+{
+ // first argument – runner function
+ var runner = arguments[0]
+ // take away first argument
+ , args = Array.prototype.slice.call(arguments, 1)
+ // second argument - input data
+ , input = args[0]
+ // last argument - result callback
+ , endCb = streamify.callback.call(this, args[args.length - 1])
+ ;
+
+ args[args.length - 1] = endCb;
+ // third argument - iterator
+ args[1] = streamify.iterator.call(this, args[1]);
+
+ // allow time for proper setup
+ defer(function()
+ {
+ if (!this.destroyed)
+ {
+ this.terminator = runner.apply(null, args);
+ }
+ else
+ {
+ endCb(null, Array.isArray(input) ? [] : {});
+ }
+ }.bind(this));
+}
+
+
+/**
+ * Implement _read to comply with Readable streams
+ * Doesn't really make sense for flowing object mode
+ *
+ * @private
+ */
+function _read()
+{
+
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_parallel.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_parallel.js
new file mode 100644
index 000000000..5d2929f7a
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_parallel.js
@@ -0,0 +1,25 @@
+var parallel = require('../parallel.js');
+
+// API
+module.exports = ReadableParallel;
+
+/**
+ * Streaming wrapper to `asynckit.parallel`
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {stream.Readable#}
+ */
+function ReadableParallel(list, iterator, callback)
+{
+ if (!(this instanceof ReadableParallel))
+ {
+ return new ReadableParallel(list, iterator, callback);
+ }
+
+ // turn on object mode
+ ReadableParallel.super_.call(this, {objectMode: true});
+
+ this._start(parallel, list, iterator, callback);
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial.js
new file mode 100644
index 000000000..782269820
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial.js
@@ -0,0 +1,25 @@
+var serial = require('../serial.js');
+
+// API
+module.exports = ReadableSerial;
+
+/**
+ * Streaming wrapper to `asynckit.serial`
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {stream.Readable#}
+ */
+function ReadableSerial(list, iterator, callback)
+{
+ if (!(this instanceof ReadableSerial))
+ {
+ return new ReadableSerial(list, iterator, callback);
+ }
+
+ // turn on object mode
+ ReadableSerial.super_.call(this, {objectMode: true});
+
+ this._start(serial, list, iterator, callback);
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial_ordered.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial_ordered.js
new file mode 100644
index 000000000..3de89c472
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial_ordered.js
@@ -0,0 +1,29 @@
+var serialOrdered = require('../serialOrdered.js');
+
+// API
+module.exports = ReadableSerialOrdered;
+// expose sort helpers
+module.exports.ascending = serialOrdered.ascending;
+module.exports.descending = serialOrdered.descending;
+
+/**
+ * Streaming wrapper to `asynckit.serialOrdered`
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} sortMethod - custom sort function
+ * @param {function} callback - invoked when all elements processed
+ * @returns {stream.Readable#}
+ */
+function ReadableSerialOrdered(list, iterator, sortMethod, callback)
+{
+ if (!(this instanceof ReadableSerialOrdered))
+ {
+ return new ReadableSerialOrdered(list, iterator, sortMethod, callback);
+ }
+
+ // turn on object mode
+ ReadableSerialOrdered.super_.call(this, {objectMode: true});
+
+ this._start(serialOrdered, list, iterator, sortMethod, callback);
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/state.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/state.js
new file mode 100644
index 000000000..cbea7ad8f
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/state.js
@@ -0,0 +1,37 @@
+// API
+module.exports = state;
+
+/**
+ * Creates initial state object
+ * for iteration over list
+ *
+ * @param {array|object} list - list to iterate over
+ * @param {function|null} sortMethod - function to use for keys sort,
+ * or `null` to keep them as is
+ * @returns {object} - initial state object
+ */
+function state(list, sortMethod)
+{
+ var isNamedList = !Array.isArray(list)
+ , initState =
+ {
+ index : 0,
+ keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
+ jobs : {},
+ results : isNamedList ? {} : [],
+ size : isNamedList ? Object.keys(list).length : list.length
+ }
+ ;
+
+ if (sortMethod)
+ {
+ // sort array keys based on it's values
+ // sort object's keys just on own merit
+ initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
+ {
+ return sortMethod(list[a], list[b]);
+ });
+ }
+
+ return initState;
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/streamify.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/streamify.js
new file mode 100644
index 000000000..f56a1c92b
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/streamify.js
@@ -0,0 +1,141 @@
+var async = require('./async.js');
+
+// API
+module.exports = {
+ iterator: wrapIterator,
+ callback: wrapCallback
+};
+
+/**
+ * Wraps iterators with long signature
+ *
+ * @this ReadableAsyncKit#
+ * @param {function} iterator - function to wrap
+ * @returns {function} - wrapped function
+ */
+function wrapIterator(iterator)
+{
+ var stream = this;
+
+ return function(item, key, cb)
+ {
+ var aborter
+ , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key))
+ ;
+
+ stream.jobs[key] = wrappedCb;
+
+ // it's either shortcut (item, cb)
+ if (iterator.length == 2)
+ {
+ aborter = iterator(item, wrappedCb);
+ }
+ // or long format (item, key, cb)
+ else
+ {
+ aborter = iterator(item, key, wrappedCb);
+ }
+
+ return aborter;
+ };
+}
+
+/**
+ * Wraps provided callback function
+ * allowing to execute snitch function before
+ * real callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {function} callback - function to wrap
+ * @returns {function} - wrapped function
+ */
+function wrapCallback(callback)
+{
+ var stream = this;
+
+ var wrapped = function(error, result)
+ {
+ return finisher.call(stream, error, result, callback);
+ };
+
+ return wrapped;
+}
+
+/**
+ * Wraps provided iterator callback function
+ * makes sure snitch only called once,
+ * but passes secondary calls to the original callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {function} callback - callback to wrap
+ * @param {number|string} key - iteration key
+ * @returns {function} wrapped callback
+ */
+function wrapIteratorCallback(callback, key)
+{
+ var stream = this;
+
+ return function(error, output)
+ {
+ // don't repeat yourself
+ if (!(key in stream.jobs))
+ {
+ callback(error, output);
+ return;
+ }
+
+ // clean up jobs
+ delete stream.jobs[key];
+
+ return streamer.call(stream, error, {key: key, value: output}, callback);
+ };
+}
+
+/**
+ * Stream wrapper for iterator callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {mixed} error - error response
+ * @param {mixed} output - iterator output
+ * @param {function} callback - callback that expects iterator results
+ */
+function streamer(error, output, callback)
+{
+ if (error && !this.error)
+ {
+ this.error = error;
+ this.pause();
+ this.emit('error', error);
+ // send back value only, as expected
+ callback(error, output && output.value);
+ return;
+ }
+
+ // stream stuff
+ this.push(output);
+
+ // back to original track
+ // send back value only, as expected
+ callback(error, output && output.value);
+}
+
+/**
+ * Stream wrapper for finishing callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {mixed} error - error response
+ * @param {mixed} output - iterator output
+ * @param {function} callback - callback that expects final results
+ */
+function finisher(error, output, callback)
+{
+ // signal end of the stream
+ // only for successfully finished streams
+ if (!error)
+ {
+ this.push(null);
+ }
+
+ // back to original track
+ callback(error, output);
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/terminator.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/terminator.js
new file mode 100644
index 000000000..d6eb99219
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/terminator.js
@@ -0,0 +1,29 @@
+var abort = require('./abort.js')
+ , async = require('./async.js')
+ ;
+
+// API
+module.exports = terminator;
+
+/**
+ * Terminates jobs in the attached state context
+ *
+ * @this AsyncKitState#
+ * @param {function} callback - final callback to invoke after termination
+ */
+function terminator(callback)
+{
+ if (!Object.keys(this.jobs).length)
+ {
+ return;
+ }
+
+ // fast forward iteration index
+ this.index = this.size;
+
+ // abort jobs
+ abort(this);
+
+ // send back results we have so far
+ async(callback)(null, this.results);
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/package.json b/node_modules/request/node_modules/form-data/node_modules/asynckit/package.json
new file mode 100644
index 000000000..ac7a956bf
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/package.json
@@ -0,0 +1,126 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "asynckit@^0.4.0",
+ "scope": null,
+ "escapedName": "asynckit",
+ "name": "asynckit",
+ "rawSpec": "^0.4.0",
+ "spec": ">=0.4.0 <0.5.0",
+ "type": "range"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/form-data"
+ ]
+ ],
+ "_from": "asynckit@>=0.4.0 <0.5.0",
+ "_id": "asynckit@0.4.0",
+ "_inCache": true,
+ "_location": "/request/form-data/asynckit",
+ "_nodeVersion": "0.12.11",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/asynckit-0.4.0.tgz_1465928940169_0.8008207362145185"
+ },
+ "_npmUser": {
+ "name": "alexindigo",
+ "email": "iam@alexindigo.com"
+ },
+ "_npmVersion": "2.15.6",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "asynckit@^0.4.0",
+ "scope": null,
+ "escapedName": "asynckit",
+ "name": "asynckit",
+ "rawSpec": "^0.4.0",
+ "spec": ">=0.4.0 <0.5.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/request/form-data"
+ ],
+ "_resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "_shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79",
+ "_shrinkwrap": null,
+ "_spec": "asynckit@^0.4.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/form-data",
+ "author": {
+ "name": "Alex Indigo",
+ "email": "iam@alexindigo.com"
+ },
+ "bugs": {
+ "url": "https://github.com/alexindigo/asynckit/issues"
+ },
+ "dependencies": {},
+ "description": "Minimal async jobs utility library, with streams support",
+ "devDependencies": {
+ "browserify": "^13.0.0",
+ "browserify-istanbul": "^2.0.0",
+ "coveralls": "^2.11.9",
+ "eslint": "^2.9.0",
+ "istanbul": "^0.4.3",
+ "obake": "^0.1.2",
+ "phantomjs-prebuilt": "^2.1.7",
+ "pre-commit": "^1.1.3",
+ "reamde": "^1.1.0",
+ "rimraf": "^2.5.2",
+ "size-table": "^0.2.0",
+ "tap-spec": "^4.1.1",
+ "tape": "^4.5.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79",
+ "tarball": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz"
+ },
+ "gitHead": "583a75ed4fe41761b66416bb6e703ebb1f8963bf",
+ "homepage": "https://github.com/alexindigo/asynckit#readme",
+ "keywords": [
+ "async",
+ "jobs",
+ "parallel",
+ "serial",
+ "iterator",
+ "array",
+ "object",
+ "stream",
+ "destroy",
+ "terminate",
+ "abort"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "alexindigo",
+ "email": "iam@alexindigo.com"
+ }
+ ],
+ "name": "asynckit",
+ "optionalDependencies": {},
+ "pre-commit": [
+ "clean",
+ "lint",
+ "test",
+ "browser",
+ "report",
+ "size"
+ ],
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/alexindigo/asynckit.git"
+ },
+ "scripts": {
+ "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec",
+ "clean": "rimraf coverage",
+ "debug": "tape test/test-*.js",
+ "lint": "eslint *.js lib/*.js test/*.js",
+ "report": "istanbul report",
+ "size": "browserify index.js | size-table asynckit",
+ "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec",
+ "win-test": "tape test/test-*.js"
+ },
+ "version": "0.4.0"
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/parallel.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/parallel.js
new file mode 100644
index 000000000..3c50344d8
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/parallel.js
@@ -0,0 +1,43 @@
+var iterate = require('./lib/iterate.js')
+ , initState = require('./lib/state.js')
+ , terminator = require('./lib/terminator.js')
+ ;
+
+// Public API
+module.exports = parallel;
+
+/**
+ * Runs iterator over provided array elements in parallel
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
+ */
+function parallel(list, iterator, callback)
+{
+ var state = initState(list);
+
+ while (state.index < (state['keyedList'] || list).length)
+ {
+ iterate(list, iterator, state, function(error, result)
+ {
+ if (error)
+ {
+ callback(error, result);
+ return;
+ }
+
+ // looks like it's the last one
+ if (Object.keys(state.jobs).length === 0)
+ {
+ callback(null, state.results);
+ return;
+ }
+ });
+
+ state.index++;
+ }
+
+ return terminator.bind(state, callback);
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/serial.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/serial.js
new file mode 100644
index 000000000..6cd949a67
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/serial.js
@@ -0,0 +1,17 @@
+var serialOrdered = require('./serialOrdered.js');
+
+// Public API
+module.exports = serial;
+
+/**
+ * Runs iterator over provided array elements in series
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
+ */
+function serial(list, iterator, callback)
+{
+ return serialOrdered(list, iterator, null, callback);
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/serialOrdered.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/serialOrdered.js
new file mode 100644
index 000000000..607eafea5
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/serialOrdered.js
@@ -0,0 +1,75 @@
+var iterate = require('./lib/iterate.js')
+ , initState = require('./lib/state.js')
+ , terminator = require('./lib/terminator.js')
+ ;
+
+// Public API
+module.exports = serialOrdered;
+// sorting helpers
+module.exports.ascending = ascending;
+module.exports.descending = descending;
+
+/**
+ * Runs iterator over provided sorted array elements in series
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} sortMethod - custom sort function
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
+ */
+function serialOrdered(list, iterator, sortMethod, callback)
+{
+ var state = initState(list, sortMethod);
+
+ iterate(list, iterator, state, function iteratorHandler(error, result)
+ {
+ if (error)
+ {
+ callback(error, result);
+ return;
+ }
+
+ state.index++;
+
+ // are we there yet?
+ if (state.index < (state['keyedList'] || list).length)
+ {
+ iterate(list, iterator, state, iteratorHandler);
+ return;
+ }
+
+ // done here
+ callback(null, state.results);
+ });
+
+ return terminator.bind(state, callback);
+}
+
+/*
+ * -- Sort methods
+ */
+
+/**
+ * sort helper to sort array elements in ascending order
+ *
+ * @param {mixed} a - an item to compare
+ * @param {mixed} b - an item to compare
+ * @returns {number} - comparison result
+ */
+function ascending(a, b)
+{
+ return a < b ? -1 : a > b ? 1 : 0;
+}
+
+/**
+ * sort helper to sort array elements in descending order
+ *
+ * @param {mixed} a - an item to compare
+ * @param {mixed} b - an item to compare
+ * @returns {number} - comparison result
+ */
+function descending(a, b)
+{
+ return -1 * ascending(a, b);
+}
diff --git a/node_modules/request/node_modules/form-data/node_modules/asynckit/stream.js b/node_modules/request/node_modules/form-data/node_modules/asynckit/stream.js
new file mode 100644
index 000000000..d43465f90
--- /dev/null
+++ b/node_modules/request/node_modules/form-data/node_modules/asynckit/stream.js
@@ -0,0 +1,21 @@
+var inherits = require('util').inherits
+ , Readable = require('stream').Readable
+ , ReadableAsyncKit = require('./lib/readable_asynckit.js')
+ , ReadableParallel = require('./lib/readable_parallel.js')
+ , ReadableSerial = require('./lib/readable_serial.js')
+ , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js')
+ ;
+
+// API
+module.exports =
+{
+ parallel : ReadableParallel,
+ serial : ReadableSerial,
+ serialOrdered : ReadableSerialOrdered,
+};
+
+inherits(ReadableAsyncKit, Readable);
+
+inherits(ReadableParallel, ReadableAsyncKit);
+inherits(ReadableSerial, ReadableAsyncKit);
+inherits(ReadableSerialOrdered, ReadableAsyncKit);
diff --git a/node_modules/request/node_modules/form-data/package.json b/node_modules/request/node_modules/form-data/package.json
index 5c4375edf..a8b4839b7 100644
--- a/node_modules/request/node_modules/form-data/package.json
+++ b/node_modules/request/node_modules/form-data/package.json
@@ -2,49 +2,48 @@
"_args": [
[
{
- "raw": "form-data@~1.0.0-rc4",
+ "raw": "form-data@~2.0.0",
"scope": null,
"escapedName": "form-data",
"name": "form-data",
- "rawSpec": "~1.0.0-rc4",
- "spec": ">=1.0.0-rc4 <1.1.0",
+ "rawSpec": "~2.0.0",
+ "spec": ">=2.0.0 <2.1.0",
"type": "range"
},
"/Users/rebecca/code/npm/node_modules/request"
]
],
- "_from": "form-data@>=1.0.0-rc4 <1.1.0",
- "_id": "form-data@1.0.0-rc4",
+ "_from": "form-data@>=2.0.0 <2.1.0",
+ "_id": "form-data@2.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/request/form-data",
- "_nodeVersion": "0.12.11",
+ "_nodeVersion": "4.5.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/form-data-1.0.0-rc4.tgz_1458059747097_0.14101114077493548"
+ "tmp": "tmp/form-data-2.0.0.tgz_1474092617403_0.5404838663525879"
},
"_npmUser": {
"name": "alexindigo",
"email": "iam@alexindigo.com"
},
- "_npmVersion": "2.14.9",
+ "_npmVersion": "2.15.9",
"_phantomChildren": {},
"_requested": {
- "raw": "form-data@~1.0.0-rc4",
+ "raw": "form-data@~2.0.0",
"scope": null,
"escapedName": "form-data",
"name": "form-data",
- "rawSpec": "~1.0.0-rc4",
- "spec": ">=1.0.0-rc4 <1.1.0",
+ "rawSpec": "~2.0.0",
+ "spec": ">=2.0.0 <2.1.0",
"type": "range"
},
"_requiredBy": [
"/request"
],
- "_resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz",
- "_shasum": "05ac6bc22227b43e4461f488161554699d4f8b5e",
+ "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz",
+ "_shasum": "6f0aebadcc5da16c13e1ecc11137d85f9b883b25",
"_shrinkwrap": null,
- "_spec": "form-data@~1.0.0-rc4",
+ "_spec": "form-data@~2.0.0",
"_where": "/Users/rebecca/code/npm/node_modules/request",
"author": {
"name": "Felix Geisendörfer",
@@ -56,60 +55,54 @@
"url": "https://github.com/form-data/form-data/issues"
},
"dependencies": {
- "async": "^1.5.2",
+ "asynckit": "^0.4.0",
"combined-stream": "^1.0.5",
- "mime-types": "^2.1.10"
+ "mime-types": "^2.1.11"
},
"description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
"devDependencies": {
- "codacy-coverage": "^1.1.3",
- "coveralls": "^2.11.8",
- "cross-spawn": "^2.1.5",
- "eslint": "^2.4.0",
+ "coveralls": "^2.11.13",
+ "cross-spawn": "^4.0.0",
+ "eslint": "^3.5.0",
"fake": "^0.2.2",
"far": "^0.0.7",
"formidable": "^1.0.17",
- "istanbul": "^0.4.2",
- "pre-commit": "^1.1.2",
- "request": "^2.69.0",
- "rimraf": "^2.5.2"
+ "in-publish": "^2.0.0",
+ "is-node-modern": "^1.0.0",
+ "istanbul": "^0.4.5",
+ "pkgfiles": "^2.3.0",
+ "pre-commit": "^1.1.3",
+ "request": "^2.74.0",
+ "rimraf": "^2.5.4"
},
"directories": {},
"dist": {
- "shasum": "05ac6bc22227b43e4461f488161554699d4f8b5e",
- "tarball": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz"
+ "shasum": "6f0aebadcc5da16c13e1ecc11137d85f9b883b25",
+ "tarball": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz"
},
"engines": {
- "node": ">= 0.10"
+ "node": ">= 0.12"
},
- "gitHead": "f73996e0508ee2d4b2b376276adfac1de4188ac2",
+ "gitHead": "652b16ff5b9077bdf65eb66b67286c823c2a1040",
"homepage": "https://github.com/form-data/form-data#readme",
"license": "MIT",
"main": "./lib/form_data",
"maintainers": [
{
- "name": "felixge",
- "email": "felix@debuggable.com"
- },
- {
- "name": "idralyuk",
- "email": "igor@buran.us"
- },
- {
"name": "alexindigo",
"email": "iam@alexindigo.com"
},
{
- "name": "mikeal",
- "email": "mikeal.rogers@gmail.com"
+ "name": "dylanpiercey",
+ "email": "pierceydylan@gmail.com"
},
{
- "name": "celer",
- "email": "dtyree77@gmail.com"
+ "name": "felixge",
+ "email": "felix@debuggable.com"
},
{
- "name": "dylanpiercey",
- "email": "pierceydylan@gmail.com"
+ "name": "mikeal",
+ "email": "mikeal.rogers@gmail.com"
}
],
"name": "form-data",
@@ -126,13 +119,19 @@
},
"scripts": {
"check": "istanbul check-coverage coverage/coverage*.json",
- "coverage": "codacy-coverage < ./coverage/lcov.info; true",
+ "ci-lint": "is-node-modern && npm run lint || is-node-not-modern",
"debug": "verbose=1 ./test/run.js",
- "lint": "eslint lib/*.js test/*.js test/**/*.js",
- "posttest": "istanbul report",
+ "files": "pkgfiles --sort=name",
+ "get-version": "node -e \"console.log(require('./package.json').version)\"",
+ "lint": "eslint lib/*.js test/*.js test/integration/*.js",
+ "postpublish": "npm run restore-readme",
+ "posttest": "istanbul report lcov text",
"predebug": "rimraf coverage test/tmp",
+ "prepublish": "in-publish && npm run update-readme || not-in-publish",
"pretest": "rimraf coverage test/tmp",
- "test": "istanbul cover --report none test/run.js"
+ "restore-readme": "mv README.md.bak README.md",
+ "test": "istanbul cover test/run.js",
+ "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md"
},
- "version": "1.0.0-rc4"
+ "version": "2.0.0"
}
diff --git a/node_modules/request/node_modules/form-data/wercker.yml b/node_modules/request/node_modules/form-data/wercker.yml
deleted file mode 100644
index 6b118d1e3..000000000
--- a/node_modules/request/node_modules/form-data/wercker.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-# This references the default nodejs container from
-# the Docker Hub: https://registry.hub.docker.com/_/node/
-# If you want Nodesource's container you would reference nodesource/node
-# Read more about containers on our dev center
-# http://devcenter.wercker.com/docs/containers/index.html
-box: node
-# This is the build pipeline. Pipelines are the core of wercker
-# Read more about pipelines on our dev center
-# http://devcenter.wercker.com/docs/pipelines/index.html
-
-# You can also use services such as databases. Read more on our dev center:
-# http://devcenter.wercker.com/docs/services/index.html
-# services:
- # - postgres
- # http://devcenter.wercker.com/docs/services/postgresql.html
-
- # - mongodb
- # http://devcenter.wercker.com/docs/services/mongodb.html
-build:
- # The steps that will be executed on build
- # Steps make up the actions in your pipeline
- # Read more about steps on our dev center:
- # http://devcenter.wercker.com/docs/steps/index.html
- steps:
- # A step that executes `npm install` command
- - npm-install
- # A step that executes `npm test` command
- - npm-test
-
- # A custom script step, name value is used in the UI
- # and the code value contains the command that get executed
- - script:
- name: echo nodejs information
- code: |
- echo "node version $(node -v) running"
- echo "npm version $(npm -v) running"
diff --git a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js
index f929bb753..779cfe20b 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js
@@ -514,15 +514,23 @@ var compile = function(schema, cache, root, reporter, opts) {
}
if (node.minimum !== undefined) {
+ if (type !== 'number' && type !== 'integer') validate('if (%s) {', types.number(name))
+
validate('if (%s %s %d) {', name, node.exclusiveMinimum ? '<=' : '<', node.minimum)
error('is less than minimum')
validate('}')
+
+ if (type !== 'number' && type !== 'integer') validate('}')
}
if (node.maximum !== undefined) {
+ if (type !== 'number' && type !== 'integer') validate('if (%s) {', types.number(name))
+
validate('if (%s %s %d) {', name, node.exclusiveMaximum ? '>=' : '>', node.maximum)
error('is more than maximum')
validate('}')
+
+ if (type !== 'number' && type !== 'integer') validate('}')
}
if (properties) {
@@ -540,6 +548,8 @@ var compile = function(schema, cache, root, reporter, opts) {
var validate = genfun
('function validate(data) {')
+ // Since undefined is not a valid JSON value, we coerce to null and other checks will catch this
+ ('if (data === undefined) data = null')
('validate.errors = null')
('var errors = 0')
diff --git a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml
index 9338bf147..7f56324f5 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml
@@ -1,10 +1,7 @@
language: "node_js"
node_js:
- - 0.6
- - 0.8
- 0.10
- 0.11
- 0.12
- - iojs-v1.0
- - iojs-v2.0
- - iojs
+ - 4.0
+ - node
diff --git a/node_modules/request/node_modules/form-data/node_modules/async/LICENSE b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/LICENSE.md
index 8f2969858..ac32f5dfd 100644
--- a/node_modules/request/node_modules/form-data/node_modules/async/LICENSE
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/LICENSE.md
@@ -1,4 +1,6 @@
-Copyright (c) 2010-2014 Caolan McMahon
+The MIT License (MIT)
+
+Copyright (c) 2011-2015 Jan Lehnardt <jan@apache.org> & Marc Bachmann <https://github.com/marcbachmann>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md
index e096dfa5d..bc7aa153d 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md
@@ -3,17 +3,24 @@
This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08).
## Usage
+```javascript
+var jsonpointer = require('jsonpointer');
+var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]};
- var jsonpointer = require("jsonpointer");
- var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]};
- var one = jsonpointer.get(obj, "/foo");
- var two = jsonpointer.get(obj, "/bar/baz");
- var three = jsonpointer.get(obj, "/qux/0");
- var four = jsonpointer.get(obj, "/qux/1");
- var five = jsonpointer.get(obj, "/qux/2");
- var notfound = jsonpointer.get(obj, "/quo"); // returns null
+jsonpointer.get(obj, '/foo'); // returns 1
+jsonpointer.get(obj, '/bar/baz'); // returns 2
+jsonpointer.get(obj, '/qux/0'); // returns 3
+jsonpointer.get(obj, '/qux/1'); // returns 4
+jsonpointer.get(obj, '/qux/2'); // returns 5
+jsonpointer.get(obj, '/quo'); // returns null
- jsonpointer.set(obj, "/foo", 6); // obj.foo = 6;
+jsonpointer.set(obj, '/foo', 6); // sets obj.foo = 6;
+jsonpointer.set(obj, '/qux/-', 6) // sets obj.qux = [3, 4, 5, 6]
+
+var pointer = jsonpointer.compile('/foo')
+pointer.get(obj) // returns 1
+pointer.set(obj, 1) // sets obj.foo = 1
+```
## Testing
@@ -25,7 +32,7 @@ This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-iet
## Author
-(c) 2011 Jan Lehnardt <jan@apache.org>
+(c) 2011-2015 Jan Lehnardt <jan@apache.org> & Marc Bachmann <https://github.com/marcbachmann>
## License
diff --git a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/benchmark.js b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/benchmark.js
new file mode 100644
index 000000000..8a95636de
--- /dev/null
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/benchmark.js
@@ -0,0 +1,56 @@
+var jsonpointer = require('./')
+
+var i
+var obj = {
+ a: 1,
+ b: {
+ c: 2
+ },
+ d: {
+ e: [{ a: 3 }, { b: 4 }, { c: 5 }]
+ }
+}
+
+// Get
+console.time('get first level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.get(obj, '/a')
+}
+console.timeEnd('get first level property')
+
+console.time('get second level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.get(obj, '/d/e')
+}
+console.timeEnd('get second level property')
+
+console.time('get third level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.get(obj, '/d/e/0')
+}
+console.timeEnd('get third level property')
+
+// Set
+console.time('set first level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.set(obj, '/a', 'bla')
+}
+console.timeEnd('set first level property')
+
+console.time('set second level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.set(obj, '/d/e', 'bla')
+}
+console.timeEnd('set second level property')
+
+console.time('set third level property')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.set(obj, '/d/e/0', 'bla')
+}
+console.timeEnd('set third level property')
+
+console.time('push property into array')
+for (i = 0; i < 1e6; i++) {
+ jsonpointer.set(obj, '/d/e/-', 'bla')
+}
+console.timeEnd('push property into array')
diff --git a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js
index 006f85ef3..7cfaec0fb 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js
@@ -1,76 +1,93 @@
-var untilde = function(str) {
- return str.replace(/~./g, function(m) {
- switch (m) {
- case "~0":
- return "~";
- case "~1":
- return "/";
- }
- throw new Error("Invalid tilde escape: " + m);
- });
+var hasExcape = /~/
+var escapeMatcher = /~[01]/g
+function escapeReplacer (m) {
+ switch (m) {
+ case '~1': return '/'
+ case '~0': return '~'
+ }
+ throw new Error('Invalid tilde escape: ' + m)
}
-var traverse = function(obj, pointer, value) {
- // assert(isArray(pointer))
- var part = untilde(pointer.shift());
- if(!obj.hasOwnProperty(part)) {
- return null;
- }
- if(pointer.length !== 0) { // keep traversin!
- return traverse(obj[part], pointer, value);
- }
- // we're done
- if(typeof value === "undefined") {
- // just reading
- return obj[part];
- }
- // set new value, return old value
- var old_value = obj[part];
- if(value === null) {
- delete obj[part];
- } else {
- obj[part] = value;
- }
- return old_value;
+function untilde (str) {
+ if (!hasExcape.test(str)) return str
+ return str.replace(escapeMatcher, escapeReplacer)
}
-var validate_input = function(obj, pointer) {
- if(typeof obj !== "object") {
- throw new Error("Invalid input object.");
- }
+function setter (obj, pointer, value) {
+ var part
+ var hasNextPart
- if(pointer === "") {
- return [];
- }
+ for (var p = 1, len = pointer.length; p < len;) {
+ part = untilde(pointer[p++])
+ hasNextPart = len > p
+
+ if (typeof obj[part] === 'undefined') {
+ // support setting of /-
+ if (Array.isArray(obj) && part === '-') {
+ part = obj.length
+ }
- if(!pointer) {
- throw new Error("Invalid JSON pointer.");
+ // support nested objects/array when setting values
+ if (hasNextPart) {
+ if ((pointer[p] !== '' && pointer[p] < Infinity) || pointer[p] === '-') obj[part] = []
+ else obj[part] = {}
+ }
+ }
+
+ if (!hasNextPart) break
+ obj = obj[part]
}
- pointer = pointer.split("/");
- var first = pointer.shift();
- if (first !== "") {
- throw new Error("Invalid JSON pointer.");
+ var oldValue = obj[part]
+ if (value === undefined) delete obj[part]
+ else obj[part] = value
+ return oldValue
+}
+
+function compilePointer (pointer) {
+ if (typeof pointer === 'string') {
+ pointer = pointer.split('/')
+ if (pointer[0] === '') return pointer
+ throw new Error('Invalid JSON pointer.')
+ } else if (Array.isArray(pointer)) {
+ return pointer
}
- return pointer;
+ throw new Error('Invalid JSON pointer.')
}
-var get = function(obj, pointer) {
- pointer = validate_input(obj, pointer);
- if (pointer.length === 0) {
- return obj;
+function get (obj, pointer) {
+ if (typeof obj !== 'object') throw new Error('Invalid input object.')
+ pointer = compilePointer(pointer)
+ var len = pointer.length
+ if (len === 1) return obj
+
+ for (var p = 1; p < len;) {
+ obj = obj[untilde(pointer[p++])]
+ if (len === p) return obj
+ if (typeof obj !== 'object') return undefined
}
- return traverse(obj, pointer);
}
-var set = function(obj, pointer, value) {
- pointer = validate_input(obj, pointer);
- if (pointer.length === 0) {
- throw new Error("Invalid JSON pointer for set.")
+function set (obj, pointer, value) {
+ if (typeof obj !== 'object') throw new Error('Invalid input object.')
+ pointer = compilePointer(pointer)
+ if (pointer.length === 0) throw new Error('Invalid JSON pointer for set.')
+ return setter(obj, pointer, value)
+}
+
+function compile (pointer) {
+ var compiled = compilePointer(pointer)
+ return {
+ get: function (object) {
+ return get(object, compiled)
+ },
+ set: function (object, value) {
+ return set(object, compiled, value)
+ }
}
- return traverse(obj, pointer, value);
}
exports.get = get
exports.set = set
+exports.compile = compile
diff --git a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json
index c90dcced7..b2fe8c6ee 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json
@@ -2,45 +2,48 @@
"_args": [
[
{
- "raw": "jsonpointer@2.0.0",
+ "raw": "jsonpointer@^4.0.0",
"scope": null,
"escapedName": "jsonpointer",
"name": "jsonpointer",
- "rawSpec": "2.0.0",
- "spec": "2.0.0",
- "type": "version"
+ "rawSpec": "^4.0.0",
+ "spec": ">=4.0.0 <5.0.0",
+ "type": "range"
},
"/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid"
]
],
- "_from": "jsonpointer@2.0.0",
- "_id": "jsonpointer@2.0.0",
+ "_from": "jsonpointer@>=4.0.0 <5.0.0",
+ "_id": "jsonpointer@4.0.0",
"_inCache": true,
- "_installable": true,
"_location": "/request/har-validator/is-my-json-valid/jsonpointer",
- "_nodeVersion": "0.10.36",
+ "_nodeVersion": "6.1.0",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/jsonpointer-4.0.0.tgz_1463651460494_0.02921536797657609"
+ },
"_npmUser": {
"name": "marcbachmann",
"email": "marc.brookman@gmail.com"
},
- "_npmVersion": "2.10.1",
+ "_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
- "raw": "jsonpointer@2.0.0",
+ "raw": "jsonpointer@^4.0.0",
"scope": null,
"escapedName": "jsonpointer",
"name": "jsonpointer",
- "rawSpec": "2.0.0",
- "spec": "2.0.0",
- "type": "version"
+ "rawSpec": "^4.0.0",
+ "spec": ">=4.0.0 <5.0.0",
+ "type": "range"
},
"_requiredBy": [
"/request/har-validator/is-my-json-valid"
],
- "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz",
- "_shasum": "3af1dd20fe85463910d469a385e33017d2a030d9",
+ "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.0.tgz",
+ "_shasum": "6661e161d2fc445f19f98430231343722e1fcbd5",
"_shrinkwrap": null,
- "_spec": "jsonpointer@2.0.0",
+ "_spec": "jsonpointer@^4.0.0",
"_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid",
"author": {
"name": "Jan Lehnardt",
@@ -53,20 +56,26 @@
{
"name": "Joe Hildebrand",
"email": "joe-github@cursive.net"
+ },
+ {
+ "name": "Marc Bachmann",
+ "email": "marc.brookman@gmail.com"
}
],
"dependencies": {},
"description": "Simple JSON Addressing.",
- "devDependencies": {},
+ "devDependencies": {
+ "standard": "^5.3.1"
+ },
"directories": {},
"dist": {
- "shasum": "3af1dd20fe85463910d469a385e33017d2a030d9",
- "tarball": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz"
+ "shasum": "6661e161d2fc445f19f98430231343722e1fcbd5",
+ "tarball": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.0.tgz"
},
"engines": {
- "node": ">=0.6.0"
+ "node": ">=0.10.0"
},
- "gitHead": "26ea4a5c0fcb6d9a2e87f733403791dd05637af8",
+ "gitHead": "2d46030ba6df41b566934c7202e31fb65058de71",
"homepage": "https://github.com/janl/node-jsonpointer#readme",
"license": "MIT",
"main": "./jsonpointer",
@@ -88,7 +97,7 @@
"url": "git+ssh://git@github.com/janl/node-jsonpointer.git"
},
"scripts": {
- "test": "node test.js"
+ "test": "standard && node test.js"
},
"tags": [
"util",
@@ -96,5 +105,5 @@
"util",
"utility"
],
- "version": "2.0.0"
+ "version": "4.0.0"
}
diff --git a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js
index 1c67d7f7e..e3d99630f 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js
@@ -1,5 +1,5 @@
-var assert = require("assert");
-var jsonpointer = require("./jsonpointer");
+var assert = require('assert')
+var jsonpointer = require('./jsonpointer')
var obj = {
a: 1,
@@ -7,92 +7,125 @@ var obj = {
c: 2
},
d: {
- e: [{a:3}, {b:4}, {c:5}]
+ e: [{ a: 3 }, { b: 4 }, { c: 5 }]
}
-};
+}
-assert.equal(jsonpointer.get(obj, "/a"), 1);
-assert.equal(jsonpointer.get(obj, "/b/c"), 2);
-assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 3);
-assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 4);
-assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 5);
+assert.equal(jsonpointer.get(obj, '/a'), 1)
+assert.equal(jsonpointer.get(obj, '/b/c'), 2)
+assert.equal(jsonpointer.get(obj, '/d/e/0/a'), 3)
+assert.equal(jsonpointer.get(obj, '/d/e/1/b'), 4)
+assert.equal(jsonpointer.get(obj, '/d/e/2/c'), 5)
// set returns old value
-assert.equal(jsonpointer.set(obj, "/a", 2), 1);
-assert.equal(jsonpointer.set(obj, "/b/c", 3), 2);
-assert.equal(jsonpointer.set(obj, "/d/e/0/a", 4), 3);
-assert.equal(jsonpointer.set(obj, "/d/e/1/b", 5), 4);
-assert.equal(jsonpointer.set(obj, "/d/e/2/c", 6), 5);
-
-assert.equal(jsonpointer.get(obj, "/a"), 2);
-assert.equal(jsonpointer.get(obj, "/b/c"), 3);
-assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 4);
-assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 5);
-assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 6);
-
-assert.equal(jsonpointer.get(obj, ""), obj);
-assert.throws(function(){ jsonpointer.get(obj, "a"); }, validateError);
-assert.throws(function(){ jsonpointer.get(obj, "a/"); }, validateError);
-
-function validateError(err) {
- if ( (err instanceof Error) && /Invalid JSON pointer/.test(err.message) ) {
- return true;
+assert.equal(jsonpointer.set(obj, '/a', 2), 1)
+assert.equal(jsonpointer.set(obj, '/b/c', 3), 2)
+assert.equal(jsonpointer.set(obj, '/d/e/0/a', 4), 3)
+assert.equal(jsonpointer.set(obj, '/d/e/1/b', 5), 4)
+assert.equal(jsonpointer.set(obj, '/d/e/2/c', 6), 5)
+
+// set nested properties
+assert.equal(jsonpointer.set(obj, '/f/g/h/i', 6), undefined)
+assert.equal(jsonpointer.get(obj, '/f/g/h/i'), 6)
+
+// set an array
+assert.equal(jsonpointer.set(obj, '/f/g/h/foo/-', 'test'), undefined)
+var arr = jsonpointer.get(obj, '/f/g/h/foo')
+assert(Array.isArray(arr), 'set /- creates an array.')
+assert.equal(arr[0], 'test')
+
+assert.equal(jsonpointer.get(obj, '/a'), 2)
+assert.equal(jsonpointer.get(obj, '/b/c'), 3)
+assert.equal(jsonpointer.get(obj, '/d/e/0/a'), 4)
+assert.equal(jsonpointer.get(obj, '/d/e/1/b'), 5)
+assert.equal(jsonpointer.get(obj, '/d/e/2/c'), 6)
+
+// can set `null` as a value
+assert.equal(jsonpointer.set(obj, '/f/g/h/foo/0', null), 'test')
+assert.strictEqual(jsonpointer.get(obj, '/f/g/h/foo/0'), null)
+assert.equal(jsonpointer.set(obj, '/b/c', null), 3)
+assert.strictEqual(jsonpointer.get(obj, '/b/c'), null)
+
+assert.equal(jsonpointer.get(obj, ''), obj)
+assert.throws(function () { jsonpointer.get(obj, 'a') }, validateError)
+assert.throws(function () { jsonpointer.get(obj, 'a/') }, validateError)
+
+// can unset values with `undefined`
+jsonpointer.set(obj, '/a', undefined)
+assert.strictEqual(jsonpointer.get(obj, '/a'), undefined)
+jsonpointer.set(obj, '/d/e/1', undefined)
+assert.strictEqual(jsonpointer.get(obj, '/d/e/1'), undefined)
+
+// returns `undefined` when path extends beyond any existing objects
+assert.strictEqual(jsonpointer.get(obj, '/x/y/z'), undefined)
+
+function validateError (err) {
+ if ((err instanceof Error) && /Invalid JSON pointer/.test(err.message)) {
+ return true
}
}
var complexKeys = {
- "a/b": {
+ 'a/b': {
c: 1
},
d: {
- "e/f": 2
+ 'e/f': 2
},
- "~1": 3,
- "01": 4
+ '~1': 3,
+ '01': 4
}
-assert.equal(jsonpointer.get(complexKeys, "/a~1b/c"), 1);
-assert.equal(jsonpointer.get(complexKeys, "/d/e~1f"), 2);
-assert.equal(jsonpointer.get(complexKeys, "/~01"), 3);
-assert.equal(jsonpointer.get(complexKeys, "/01"), 4);
-assert.equal(jsonpointer.get(complexKeys, "/a/b/c"), null);
-assert.equal(jsonpointer.get(complexKeys, "/~1"), null);
+assert.equal(jsonpointer.get(complexKeys, '/a~1b/c'), 1)
+assert.equal(jsonpointer.get(complexKeys, '/d/e~1f'), 2)
+assert.equal(jsonpointer.get(complexKeys, '/~01'), 3)
+assert.equal(jsonpointer.get(complexKeys, '/01'), 4)
+assert.equal(jsonpointer.get(complexKeys, '/a/b/c'), null)
+assert.equal(jsonpointer.get(complexKeys, '/~1'), null)
// draft-ietf-appsawg-json-pointer-08 has special array rules
-var ary = [ "zero", "one", "two" ];
-assert.equal(jsonpointer.get(ary, "/01"), null);
+var ary = [ 'zero', 'one', 'two' ]
+assert.equal(jsonpointer.get(ary, '/01'), null)
-//assert.equal(jsonpointer.set(ary, "/-", "three"), null);
-//assert.equal(ary[3], "three");
+assert.equal(jsonpointer.set(ary, '/-', 'three'), null)
+assert.equal(ary[3], 'three')
// Examples from the draft:
var example = {
- "foo": ["bar", "baz"],
- "": 0,
- "a/b": 1,
- "c%d": 2,
- "e^f": 3,
- "g|h": 4,
- "i\\j": 5,
- "k\"l": 6,
- " ": 7,
- "m~n": 8
-};
-
-assert.equal(jsonpointer.get(example, ""), example);
-var ans = jsonpointer.get(example, "/foo");
-assert.equal(ans.length, 2);
-assert.equal(ans[0], "bar");
-assert.equal(ans[1], "baz");
-assert.equal(jsonpointer.get(example, "/foo/0"), "bar");
-assert.equal(jsonpointer.get(example, "/"), 0);
-assert.equal(jsonpointer.get(example, "/a~1b"), 1);
-assert.equal(jsonpointer.get(example, "/c%d"), 2);
-assert.equal(jsonpointer.get(example, "/e^f"), 3);
-assert.equal(jsonpointer.get(example, "/g|h"), 4);
-assert.equal(jsonpointer.get(example, "/i\\j"), 5);
-assert.equal(jsonpointer.get(example, "/k\"l"), 6);
-assert.equal(jsonpointer.get(example, "/ "), 7);
-assert.equal(jsonpointer.get(example, "/m~0n"), 8);
-
-console.log("All tests pass.");
+ 'foo': ['bar', 'baz'],
+ '': 0,
+ 'a/b': 1,
+ 'c%d': 2,
+ 'e^f': 3,
+ 'g|h': 4,
+ 'i\\j': 5,
+ 'k\'l': 6,
+ ' ': 7,
+ 'm~n': 8
+}
+
+assert.equal(jsonpointer.get(example, ''), example)
+var ans = jsonpointer.get(example, '/foo')
+assert.equal(ans.length, 2)
+assert.equal(ans[0], 'bar')
+assert.equal(ans[1], 'baz')
+assert.equal(jsonpointer.get(example, '/foo/0'), 'bar')
+assert.equal(jsonpointer.get(example, '/'), 0)
+assert.equal(jsonpointer.get(example, '/a~1b'), 1)
+assert.equal(jsonpointer.get(example, '/c%d'), 2)
+assert.equal(jsonpointer.get(example, '/e^f'), 3)
+assert.equal(jsonpointer.get(example, '/g|h'), 4)
+assert.equal(jsonpointer.get(example, '/i\\j'), 5)
+assert.equal(jsonpointer.get(example, '/k\'l'), 6)
+assert.equal(jsonpointer.get(example, '/ '), 7)
+assert.equal(jsonpointer.get(example, '/m~0n'), 8)
+
+// jsonpointer.compile(path)
+var a = {foo: 'bar'}
+var pointer = jsonpointer.compile('/foo')
+assert.equal(pointer.get(a), 'bar')
+assert.equal(pointer.set(a, 'test'), 'bar')
+assert.equal(pointer.get(a), 'test')
+assert.deepEqual(a, {foo: 'test'})
+
+console.log('All tests pass.')
diff --git a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json
index aedffd103..a38d59e52 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json
@@ -14,20 +14,19 @@
]
],
"_from": "is-my-json-valid@>=2.12.4 <3.0.0",
- "_id": "is-my-json-valid@2.13.1",
+ "_id": "is-my-json-valid@2.15.0",
"_inCache": true,
- "_installable": true,
"_location": "/request/har-validator/is-my-json-valid",
- "_nodeVersion": "4.2.3",
+ "_nodeVersion": "4.2.6",
"_npmOperationalInternal": {
- "host": "packages-5-east.internal.npmjs.com",
- "tmp": "tmp/is-my-json-valid-2.13.1.tgz_1456180270224_0.17748022079467773"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/is-my-json-valid-2.15.0.tgz_1475420473174_0.8758093405049294"
},
"_npmUser": {
"name": "mafintosh",
"email": "mathiasbuus@gmail.com"
},
- "_npmVersion": "2.14.7",
+ "_npmVersion": "2.14.12",
"_phantomChildren": {},
"_requested": {
"raw": "is-my-json-valid@^2.12.4",
@@ -41,8 +40,8 @@
"_requiredBy": [
"/request/har-validator"
],
- "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz",
- "_shasum": "d55778a82feb6b0963ff4be111d5d1684e890707",
+ "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz",
+ "_shasum": "936edda3ca3c211fd98f3b2d3e08da43f7b2915b",
"_shrinkwrap": null,
"_spec": "is-my-json-valid@^2.12.4",
"_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator",
@@ -55,7 +54,7 @@
"dependencies": {
"generate-function": "^2.0.0",
"generate-object-property": "^1.1.0",
- "jsonpointer": "2.0.0",
+ "jsonpointer": "^4.0.0",
"xtend": "^4.0.0"
},
"description": "A JSONSchema validator that uses code generation to be extremely fast",
@@ -64,10 +63,10 @@
},
"directories": {},
"dist": {
- "shasum": "d55778a82feb6b0963ff4be111d5d1684e890707",
- "tarball": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz"
+ "shasum": "936edda3ca3c211fd98f3b2d3e08da43f7b2915b",
+ "tarball": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz"
},
- "gitHead": "5bacc71441750bc6e79829abcfc21d4f2f0c4396",
+ "gitHead": "c4da71bf1e57083d2dac6e7d123d2e8bd6b9255e",
"homepage": "https://github.com/mafintosh/is-my-json-valid",
"keywords": [
"json",
@@ -79,6 +78,14 @@
"main": "index.js",
"maintainers": [
{
+ "name": "emilbay",
+ "email": "github@tixz.dk"
+ },
+ {
+ "name": "emilbayes",
+ "email": "github@tixz.dk"
+ },
+ {
"name": "freeall",
"email": "freeall@gmail.com"
},
@@ -105,5 +112,5 @@
"scripts": {
"test": "tape test/*.js"
},
- "version": "2.13.1"
+ "version": "2.15.0"
}
diff --git a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js
index 275f2ac72..4ea36d51b 100644
--- a/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js
+++ b/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js
@@ -20,6 +20,14 @@ tape('simple', function(t) {
t.end()
})
+tape('data is undefined', function (t) {
+ var validate = validator({type: 'string'})
+
+ t.notOk(validate(null))
+ t.notOk(validate(undefined))
+ t.end()
+})
+
tape('advanced', function(t) {
var validate = validator(cosmic.schema)
@@ -194,6 +202,22 @@ tape('exclusiveMinimum/exclusiveMaximum', function(t) {
t.end()
})
+tape('minimum/maximum number type', function(t) {
+ var validate = validator({
+ type: ['integer', 'null'],
+ minimum: 1,
+ maximum: 100
+ })
+
+ t.notOk(validate(-1))
+ t.notOk(validate(0))
+ t.ok(validate(null))
+ t.ok(validate(1))
+ t.ok(validate(100))
+ t.notOk(validate(101))
+ t.end()
+})
+
tape('custom format', function(t) {
var validate = validator({
type: 'object',
diff --git a/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md b/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md
index ab3a66417..3e152ab80 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md
+++ b/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md
@@ -4,6 +4,10 @@
None yet.
+## v1.3.1 (2016-09-12)
+
+* #13 Incompatible with webpack
+
## v1.3.0 (2016-06-22)
* #14 add safer version of hasOwnProperty()
diff --git a/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js b/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js
index 1bea0aa36..8a87f02d1 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js
@@ -3,8 +3,22 @@
* Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com)
* Licensed under the MIT (MIT-LICENSE.txt) license.
*/
-({define:typeof define!="undefined"?define:function(deps, factory){module.exports = factory();}}).
-define([], function(){
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define([], function () {
+ return factory();
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory();
+ } else {
+ // Browser globals
+ root.jsonSchemaLinks = factory();
+ }
+}(this, function () {// setup primitive classes to be JSON Schema types
var exports = {};
exports.cacheLinks = true;
exports.getLink = function(relation, instance, schema){
@@ -49,4 +63,4 @@ exports.substitute = function(linkTemplate, instance){
});
};
return exports;
-}); \ No newline at end of file
+})); \ No newline at end of file
diff --git a/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js b/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js
index 55d4c3aee..e4dc15116 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js
@@ -13,10 +13,23 @@ empty list will be returned. A validation error will have two properties:
"property" which indicates which property had the error
"message" which indicates what the error was
*/
-({define:typeof define!="undefined"?define:function(deps, factory){module.exports = factory();}}).
-define([], function(){
-var exports = validate;
-// setup primitive classes to be JSON Schema types
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define([], function () {
+ return factory();
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory();
+ } else {
+ // Browser globals
+ root.jsonSchema = factory();
+ }
+}(this, function () {// setup primitive classes to be JSON Schema types
+var exports = validate
exports.Integer = {type:"integer"};
var primitiveConstructors = {
String: String,
@@ -257,4 +270,4 @@ exports.mustBeValid = function(result){
}
return exports;
-});
+}));
diff --git a/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json b/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json
index b77d8b346..f2de2d65f 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json
+++ b/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json
@@ -2,44 +2,48 @@
"_args": [
[
{
- "raw": "json-schema@0.2.2",
+ "raw": "json-schema@0.2.3",
"scope": null,
"escapedName": "json-schema",
"name": "json-schema",
- "rawSpec": "0.2.2",
- "spec": "0.2.2",
+ "rawSpec": "0.2.3",
+ "spec": "0.2.3",
"type": "version"
},
"/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim"
]
],
- "_from": "json-schema@0.2.2",
- "_id": "json-schema@0.2.2",
+ "_from": "json-schema@0.2.3",
+ "_id": "json-schema@0.2.3",
"_inCache": true,
- "_installable": true,
"_location": "/request/http-signature/jsprim/json-schema",
+ "_nodeVersion": "6.1.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/json-schema-0.2.3.tgz_1473699189380_0.7420965158380568"
+ },
"_npmUser": {
"name": "kriszyp",
"email": "kriszyp@gmail.com"
},
- "_npmVersion": "1.1.59",
+ "_npmVersion": "3.8.9",
"_phantomChildren": {},
"_requested": {
- "raw": "json-schema@0.2.2",
+ "raw": "json-schema@0.2.3",
"scope": null,
"escapedName": "json-schema",
"name": "json-schema",
- "rawSpec": "0.2.2",
- "spec": "0.2.2",
+ "rawSpec": "0.2.3",
+ "spec": "0.2.3",
"type": "version"
},
"_requiredBy": [
"/request/http-signature/jsprim"
],
- "_resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz",
- "_shasum": "50354f19f603917c695f70b85afa77c3b0f23506",
+ "_resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
+ "_shasum": "b480c892e59a2f05954ce727bd3f2a4e882f9e13",
"_shrinkwrap": null,
- "_spec": "json-schema@0.2.2",
+ "_spec": "json-schema@0.2.3",
"_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim",
"author": {
"name": "Kris Zyp"
@@ -56,9 +60,10 @@
"lib": "./lib"
},
"dist": {
- "shasum": "50354f19f603917c695f70b85afa77c3b0f23506",
- "tarball": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz"
+ "shasum": "b480c892e59a2f05954ce727bd3f2a4e882f9e13",
+ "tarball": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz"
},
+ "gitHead": "07ae2c618b5f581dbc108e065f4f95dcf0a1d85f",
"homepage": "https://github.com/kriszyp/json-schema#readme",
"keywords": [
"json",
@@ -83,7 +88,7 @@
],
"name": "json-schema",
"optionalDependencies": {},
- "readme": "JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator).\r\n\r\nCode is licensed under the AFL or BSD license as part of the Persevere \r\nproject which is administered under the Dojo foundation,\r\nand all contributions require a Dojo CLA.",
+ "readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/kriszyp/json-schema.git"
@@ -91,5 +96,5 @@
"scripts": {
"test": "echo TESTS DISABLED vows --spec test/*.js"
},
- "version": "0.2.2"
+ "version": "0.2.3"
}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json b/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json
index e7c324118..974d4af42 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json
+++ b/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json
@@ -14,20 +14,19 @@
]
],
"_from": "jsprim@>=1.2.2 <2.0.0",
- "_id": "jsprim@1.3.0",
+ "_id": "jsprim@1.3.1",
"_inCache": true,
- "_installable": true,
"_location": "/request/http-signature/jsprim",
"_nodeVersion": "0.12.7",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/jsprim-1.3.0.tgz_1466708163640_0.5282344303559512"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/jsprim-1.3.1.tgz_1473725209917_0.5387293708045036"
},
"_npmUser": {
"name": "dap",
"email": "dap@cs.brown.edu"
},
- "_npmVersion": "2.11.3",
+ "_npmVersion": "2.15.9",
"_phantomChildren": {},
"_requested": {
"raw": "jsprim@^1.2.2",
@@ -41,8 +40,8 @@
"_requiredBy": [
"/request/http-signature"
],
- "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz",
- "_shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650",
+ "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz",
+ "_shasum": "2a7256f70412a29ee3670aaca625994c4dcff252",
"_shrinkwrap": null,
"_spec": "jsprim@^1.2.2",
"_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature",
@@ -51,20 +50,20 @@
},
"dependencies": {
"extsprintf": "1.0.2",
- "json-schema": "0.2.2",
+ "json-schema": "0.2.3",
"verror": "1.3.6"
},
"description": "utilities for primitive JavaScript types",
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650",
- "tarball": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz"
+ "shasum": "2a7256f70412a29ee3670aaca625994c4dcff252",
+ "tarball": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz"
},
"engines": [
"node >=0.6.0"
],
- "gitHead": "694edcb22e2291c21f6c2a23907bf02e1edbfdf4",
+ "gitHead": "825aba45c6cff4340c18cdae363ccb5bdf840bd7",
"homepage": "https://github.com/davepacheco/node-jsprim#readme",
"license": "MIT",
"main": "./lib/jsprim.js",
@@ -82,5 +81,5 @@
"url": "git://github.com/davepacheco/node-jsprim.git"
},
"scripts": {},
- "version": "1.3.0"
+ "version": "1.3.1"
}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv b/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv
index a1205a45d..444045a5e 100755
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv
@@ -149,6 +149,12 @@ if (require.main === module) {
} catch (e) {
if (e.name === 'KeyEncryptedError') {
getPassword(function (err, pw) {
+ if (err) {
+ console.log('sshpk-conv: ' +
+ err.name + ': ' +
+ err.message);
+ process.exit(1);
+ }
parseOpts.passphrase = pw;
processKey();
});
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js
index 5318b3516..c254e4e80 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js
@@ -107,9 +107,9 @@ function read(buf, options, forceType) {
/* The new OpenSSH internal format abuses PEM headers */
if (alg && alg.toLowerCase() === 'openssh')
- return (sshpriv.readSSHPrivate(type, buf));
+ return (sshpriv.readSSHPrivate(type, buf, options));
if (alg && alg.toLowerCase() === 'ssh2')
- return (rfc4253.readType(type, buf));
+ return (rfc4253.readType(type, buf, options));
var der = new asn1.BerReader(buf);
der.originalInput = input;
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js
index bfbdab527..2fcf71990 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js
@@ -17,6 +17,9 @@ var PrivateKey = require('../private-key');
var pem = require('./pem');
var rfc4253 = require('./rfc4253');
var SSHBuffer = require('../ssh-buffer');
+var errors = require('../errors');
+
+var bcrypt;
function read(buf, options) {
return (pem.read(buf, options));
@@ -24,7 +27,7 @@ function read(buf, options) {
var MAGIC = 'openssh-key-v1';
-function readSSHPrivate(type, buf) {
+function readSSHPrivate(type, buf, options) {
buf = new SSHBuffer({buffer: buf});
var magic = buf.readCString();
@@ -32,16 +35,7 @@ function readSSHPrivate(type, buf) {
var cipher = buf.readString();
var kdf = buf.readString();
-
- /* We only support unencrypted keys. */
- if (cipher !== 'none' || kdf !== 'none') {
- throw (new Error('OpenSSH-format key is encrypted ' +
- '(password-protected). Please use the SSH agent ' +
- 'or decrypt the key.'));
- }
-
- /* Skip over kdfoptions. */
- buf.readString();
+ var kdfOpts = buf.readBuffer();
var nkeys = buf.readInt();
if (nkeys !== 1) {
@@ -59,11 +53,74 @@ function readSSHPrivate(type, buf) {
var privKeyBlob = buf.readBuffer();
assert.ok(buf.atEnd(), 'excess bytes left after key');
+ var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts });
+ switch (kdf) {
+ case 'none':
+ if (cipher !== 'none') {
+ throw (new Error('OpenSSH-format key uses KDF "none" ' +
+ 'but specifies a cipher other than "none"'));
+ }
+ break;
+ case 'bcrypt':
+ var salt = kdfOptsBuf.readBuffer();
+ var rounds = kdfOptsBuf.readInt();
+ var cinf = utils.opensshCipherInfo(cipher);
+ if (bcrypt === undefined) {
+ bcrypt = require('bcrypt-pbkdf');
+ }
+
+ if (typeof (options.passphrase) === 'string') {
+ options.passphrase = new Buffer(options.passphrase,
+ 'utf-8');
+ }
+ if (!Buffer.isBuffer(options.passphrase)) {
+ throw (new errors.KeyEncryptedError(
+ options.filename, 'OpenSSH'));
+ }
+
+ var pass = new Uint8Array(options.passphrase);
+ var salti = new Uint8Array(salt);
+ /* Use the pbkdf to derive both the key and the IV. */
+ var out = new Uint8Array(cinf.keySize + cinf.blockSize);
+ var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length,
+ out, out.length, rounds);
+ if (res !== 0) {
+ throw (new Error('bcrypt_pbkdf function returned ' +
+ 'failure, parameters invalid'));
+ }
+ out = new Buffer(out);
+ var ckey = out.slice(0, cinf.keySize);
+ var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize);
+ var cipherStream = crypto.createDecipheriv(cinf.opensslName,
+ ckey, iv);
+ cipherStream.setAutoPadding(false);
+ var chunk, chunks = [];
+ cipherStream.once('error', function (e) {
+ if (e.toString().indexOf('bad decrypt') !== -1) {
+ throw (new Error('Incorrect passphrase ' +
+ 'supplied, could not decrypt key'));
+ }
+ throw (e);
+ });
+ cipherStream.write(privKeyBlob);
+ cipherStream.end();
+ while ((chunk = cipherStream.read()) !== null)
+ chunks.push(chunk);
+ privKeyBlob = Buffer.concat(chunks);
+ break;
+ default:
+ throw (new Error(
+ 'OpenSSH-format key uses unknown KDF "' + kdf + '"'));
+ }
+
buf = new SSHBuffer({buffer: privKeyBlob});
var checkInt1 = buf.readInt();
var checkInt2 = buf.readInt();
- assert.strictEqual(checkInt1, checkInt2, 'checkints do not match');
+ if (checkInt1 !== checkInt2) {
+ throw (new Error('Incorrect passphrase supplied, could not ' +
+ 'decrypt key'));
+ }
var ret = {};
var key = rfc4253.readInternal(ret, 'private', buf.remainder());
@@ -83,6 +140,26 @@ function write(key, options) {
else
pubKey = key;
+ var cipher = 'none';
+ var kdf = 'none';
+ var kdfopts = new Buffer(0);
+ var cinf = { blockSize: 8 };
+ var passphrase;
+ if (options !== undefined) {
+ passphrase = options.passphrase;
+ if (typeof (passphrase) === 'string')
+ passphrase = new Buffer(passphrase, 'utf-8');
+ if (passphrase !== undefined) {
+ assert.buffer(passphrase, 'options.passphrase');
+ assert.optionalString(options.cipher, 'options.cipher');
+ cipher = options.cipher;
+ if (cipher === undefined)
+ cipher = 'aes128-ctr';
+ cinf = utils.opensshCipherInfo(cipher);
+ kdf = 'bcrypt';
+ }
+ }
+
var privBuf;
if (PrivateKey.isPrivateKey(key)) {
privBuf = new SSHBuffer({});
@@ -93,22 +170,68 @@ function write(key, options) {
privBuf.writeString(key.comment || '');
var n = 1;
- while (privBuf._offset % 8 !== 0)
+ while (privBuf._offset % cinf.blockSize !== 0)
privBuf.writeChar(n++);
+ privBuf = privBuf.toBuffer();
+ }
+
+ switch (kdf) {
+ case 'none':
+ break;
+ case 'bcrypt':
+ var salt = crypto.randomBytes(16);
+ var rounds = 16;
+ var kdfssh = new SSHBuffer({});
+ kdfssh.writeBuffer(salt);
+ kdfssh.writeInt(rounds);
+ kdfopts = kdfssh.toBuffer();
+
+ if (bcrypt === undefined) {
+ bcrypt = require('bcrypt-pbkdf');
+ }
+ var pass = new Uint8Array(passphrase);
+ var salti = new Uint8Array(salt);
+ /* Use the pbkdf to derive both the key and the IV. */
+ var out = new Uint8Array(cinf.keySize + cinf.blockSize);
+ var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length,
+ out, out.length, rounds);
+ if (res !== 0) {
+ throw (new Error('bcrypt_pbkdf function returned ' +
+ 'failure, parameters invalid'));
+ }
+ out = new Buffer(out);
+ var ckey = out.slice(0, cinf.keySize);
+ var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize);
+
+ var cipherStream = crypto.createCipheriv(cinf.opensslName,
+ ckey, iv);
+ cipherStream.setAutoPadding(false);
+ var chunk, chunks = [];
+ cipherStream.once('error', function (e) {
+ throw (e);
+ });
+ cipherStream.write(privBuf);
+ cipherStream.end();
+ while ((chunk = cipherStream.read()) !== null)
+ chunks.push(chunk);
+ privBuf = Buffer.concat(chunks);
+ break;
+ default:
+ throw (new Error('Unsupported kdf ' + kdf));
}
var buf = new SSHBuffer({});
buf.writeCString(MAGIC);
- buf.writeString('none'); /* cipher */
- buf.writeString('none'); /* kdf */
- buf.writeBuffer(new Buffer(0)); /* kdfoptions */
+ buf.writeString(cipher); /* cipher */
+ buf.writeString(kdf); /* kdf */
+ buf.writeBuffer(kdfopts); /* kdfoptions */
buf.writeInt(1); /* nkeys */
buf.writeBuffer(pubKey.toBuffer('rfc4253'));
if (privBuf)
- buf.writeBuffer(privBuf.toBuffer());
+ buf.writeBuffer(privBuf);
buf = buf.toBuffer();
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js
index d57245cc1..466634c00 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js
@@ -9,7 +9,8 @@ module.exports = {
countZeros: countZeros,
assertCompatible: assertCompatible,
isCompatible: isCompatible,
- opensslKeyDeriv: opensslKeyDeriv
+ opensslKeyDeriv: opensslKeyDeriv,
+ opensshCipherInfo: opensshCipherInfo
};
var assert = require('assert-plus');
@@ -244,3 +245,44 @@ function addRSAMissing(key) {
key.parts.push(key.part.dmodq);
}
}
+
+function opensshCipherInfo(cipher) {
+ var inf = {};
+ switch (cipher) {
+ case '3des-cbc':
+ inf.keySize = 24;
+ inf.blockSize = 8;
+ inf.opensslName = 'des-ede3-cbc';
+ break;
+ case 'blowfish-cbc':
+ inf.keySize = 16;
+ inf.blockSize = 8;
+ inf.opensslName = 'bf-cbc';
+ break;
+ case 'aes128-cbc':
+ case 'aes128-ctr':
+ case 'aes128-gcm@openssh.com':
+ inf.keySize = 16;
+ inf.blockSize = 16;
+ inf.opensslName = 'aes-128-' + cipher.slice(7, 10);
+ break;
+ case 'aes192-cbc':
+ case 'aes192-ctr':
+ case 'aes192-gcm@openssh.com':
+ inf.keySize = 24;
+ inf.blockSize = 16;
+ inf.opensslName = 'aes-192-' + cipher.slice(7, 10);
+ break;
+ case 'aes256-cbc':
+ case 'aes256-ctr':
+ case 'aes256-gcm@openssh.com':
+ inf.keySize = 32;
+ inf.blockSize = 16;
+ inf.opensslName = 'aes-256-' + cipher.slice(7, 10);
+ break;
+ default:
+ throw (new Error(
+ 'Unsupported openssl cipher "' + cipher + '"'));
+ }
+ return (inf);
+}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/README.md b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/README.md
new file mode 100644
index 000000000..12018090b
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/README.md
@@ -0,0 +1,39 @@
+Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified
+version of [Devi Mandiri's port]
+(https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js),
+with some minor performance improvements. The code is copied verbatim (and
+un-styled) from Devi's work.
+
+This product includes software developed by Niels Provos.
+
+## API
+
+### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)`
+
+Derive a cryptographic key of arbitrary length from a given password and salt,
+using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and
+SHA-512.
+
+See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for
+further information.
+
+Parameters:
+
+ * `pass`, a Uint8Array of length `passlen`
+ * `passlen`, an integer Number
+ * `salt`, a Uint8Array of length `saltlen`
+ * `saltlen`, an integer Number
+ * `key`, a Uint8Array of length `keylen`, will be filled with output
+ * `keylen`, an integer Number
+ * `rounds`, an integer Number, number of rounds of the PBKDF to run
+
+### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)`
+
+Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as
+part of the inner round function in the PBKDF.
+
+Parameters:
+
+ * `sha2pass`, a Uint8Array of length 64
+ * `sha2salt`, a Uint8Array of length 64
+ * `out`, a Uint8Array of length 32, will be filled with output
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/index.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/index.js
new file mode 100644
index 000000000..ea29aa967
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/index.js
@@ -0,0 +1,559 @@
+'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 <me@devi.web.id>
+ */
+
+/*
+ * The Blowfish portions are under the following license:
+ *
+ * Blowfish block cipher for OpenBSD
+ * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
+ * All rights reserved.
+ *
+ * Implementation advice by David Mazieres <dm@lcs.mit.edu>.
+ *
+ * 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. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Niels Provos.
+ * 4. 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 <tedu@openbsd.org>
+ *
+ * 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 <alex.wilson@joyent.com>
+ *
+ * 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
+};
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/package.json b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/package.json
new file mode 100644
index 000000000..fc8efaac7
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/package.json
@@ -0,0 +1,72 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "bcrypt-pbkdf@^1.0.0",
+ "scope": null,
+ "escapedName": "bcrypt-pbkdf",
+ "name": "bcrypt-pbkdf",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
+ ]
+ ],
+ "_from": "bcrypt-pbkdf@>=1.0.0 <2.0.0",
+ "_id": "bcrypt-pbkdf@1.0.0",
+ "_inCache": true,
+ "_location": "/request/http-signature/sshpk/bcrypt-pbkdf",
+ "_nodeVersion": "0.12.15",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/bcrypt-pbkdf-1.0.0.tgz_1471381825814_0.06877309852279723"
+ },
+ "_npmUser": {
+ "name": "arekinath",
+ "email": "alex@cooperi.net"
+ },
+ "_npmVersion": "3.10.3",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "bcrypt-pbkdf@^1.0.0",
+ "scope": null,
+ "escapedName": "bcrypt-pbkdf",
+ "name": "bcrypt-pbkdf",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/request/http-signature/sshpk"
+ ],
+ "_resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz",
+ "_shasum": "3ca76b85241c7170bf7d9703e7b9aa74630040d4",
+ "_shrinkwrap": null,
+ "_spec": "bcrypt-pbkdf@^1.0.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
+ "dependencies": {
+ "tweetnacl": "^0.14.3"
+ },
+ "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS",
+ "devDependencies": {},
+ "directories": {},
+ "dist": {
+ "shasum": "3ca76b85241c7170bf7d9703e7b9aa74630040d4",
+ "tarball": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz"
+ },
+ "gitHead": "e88be37d3cd25395b4aa496ac468b33671368be6",
+ "license": "BSD-4-Clause",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "arekinath",
+ "email": "alex@cooperi.net"
+ }
+ ],
+ "name": "bcrypt-pbkdf",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "scripts": {},
+ "version": "1.0.0"
+}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md
index 77c69bd5e..9debcb42f 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md
@@ -2,6 +2,59 @@ TweetNaCl.js Changelog
======================
+v0.14.1
+-------
+
+No code changes, just tweaked packaging and added COPYING.txt.
+
+
+v0.14.0
+-------
+
+* **Breaking change!** All functions from `nacl.util` have been removed. These
+ functions are no longer available:
+
+ nacl.util.decodeUTF8
+ nacl.util.encodeUTF8
+ nacl.util.decodeBase64
+ nacl.util.encodeBase64
+
+ If want to continue using them, you can include
+ <https://github.com/dchest/tweetnacl-util-js> package:
+
+ <script src="nacl.min.js"></script>
+ <script src="nacl-util.min.js"></script>
+
+ or
+
+ var nacl = require('tweetnacl');
+ nacl.util = require('tweetnacl-util');
+
+ However it is recommended to use better packages that have wider
+ compatibility and better performance. Functions from `nacl.util` were never
+ intended to be robust solution for string conversion and were included for
+ convenience: cryptography library is not the right place for them.
+
+ Currently calling these functions will throw error pointing to
+ `tweetnacl-util-js` (in the next version this error message will be removed).
+
+* Improved detection of available random number generators, making it possible
+ to use `nacl.randomBytes` and related functions in Web Workers without
+ changes.
+
+* Changes to testing (see README).
+
+
+v0.13.3
+-------
+
+No code changes.
+
+* Reverted license field in package.json to "Public domain".
+
+* Fixed typo in README.
+
+
v0.13.2
-------
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
new file mode 100644
index 000000000..c2bd1e5b7
--- /dev/null
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
@@ -0,0 +1,9 @@
+Public Domain
+
+The person who associated a work with this deed has dedicated the work to the
+public domain by waiving all of his or her rights to the work worldwide under
+copyright law, including all related and neighboring rights, to the extent
+allowed by law.
+
+You can copy, modify, distribute and perform the work, even for commercial
+purposes, all without asking permission.
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md
index 11bd3472c..c80bbed8d 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md
@@ -7,7 +7,7 @@ to JavaScript for modern browsers and Node.js. Public domain.
[![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master)
](https://travis-ci.org/dchest/tweetnacl-js)
-[Demo](https://dchest.github.io/tweetnacl-js/)
+Demo: <https://tweetnacl.js.org>
**:warning: Beta version. The library is stable and API is frozen, however
it has not been independently reviewed. If you can help reviewing it, please
@@ -26,8 +26,6 @@ Documentation
* [Hashing](#hashing)
* [Random bytes generation](#random-bytes-generation)
* [Constant-time comparison](#constant-time-comparison)
- * [Utilities](#utilities)
-* [Examples](#examples)
* [System requirements](#system-requirements)
* [Development and testing](#development-and-testing)
* [Contributors](#contributors)
@@ -67,10 +65,20 @@ or [download source code](https://github.com/dchest/tweetnacl-js/releases).
Usage
-------
+-----
All API functions accept and return bytes as `Uint8Array`s. If you need to
-encode or decode strings, use functions from `nacl.util` namespace.
+encode or decode strings, use functions from
+<https://github.com/dchest/tweetnacl-util-js> or one of the more robust codec
+packages.
+
+In Node.js v4 and later `Buffer` objects are backed by `Uint8Array`s, so you
+can freely pass them to TweetNaCl.js functions as arguments. The returned
+objects are still `Uint8Array`s, so if you need `Buffer`s, you'll have to
+convert them manually; make sure to convert using copying: `new Buffer(array)`,
+instead of sharing: `new Buffer(array.buffer)`, because some functions return
+subarrays of their buffers.
+
### Public-key authenticated encryption (box)
@@ -287,12 +295,6 @@ depending on the platform it runs on:
* `window.msCrypto.getRandomValues` (Internet Explorer 11)
* `crypto.randomBytes` (Node.js)
-Note that browsers are required to throw `QuotaExceededError` exception if
-requested `length` is more than 65536, so do not ask for more than 65536 bytes
-in *one call* (multiple calls to get as many bytes as you like are okay:
-browsers can generate infinite amount of random bytes without any bad
-consequences).
-
If the platform doesn't provide a suitable PRNG, the following functions,
which require random numbers, will throw exception:
@@ -326,30 +328,6 @@ Returns `false` if either of the arguments has zero length, or arguments have
different lengths, or their contents differ.
-### Utilities
-
-Encoding/decoding functions are provided for convenience. They are correct,
-however their performance and wide compatibility with uncommon runtimes is not
-something that is considered important compared to the simplicity and size of
-implementation. You can use third-party libraries if you need to.
-
-#### nacl.util.decodeUTF8(string)
-
-Decodes string and returns `Uint8Array` of bytes.
-
-#### nacl.util.encodeUTF8(array)
-
-Encodes `Uint8Array` or `Array` of bytes into string.
-
-#### nacl.util.decodeBase64(string)
-
-Decodes Base-64 encoded string and returns `Uint8Array` of bytes.
-
-#### nacl.util.encodeBase64(array)
-
-Encodes `Uint8Array` or `Array` of bytes into string using Base-64 encoding.
-
-
System requirements
-------------------
@@ -364,7 +342,7 @@ of:
Other systems:
-* Node.js (we test on 0.10 and later)
+* Node.js
Development and testing
@@ -385,32 +363,36 @@ Tests use minified version, so make sure to rebuild it every time you change
To run tests in Node.js:
- $ npm test
+ $ npm run test-node
By default all tests described here work on `nacl.min.js`. To test other
versions, set environment variable `NACL_SRC` to the file name you want to test.
For example, the following command will test fast minified version:
- $ NACL_SRC=nacl-fast.min.js npm test
+ $ NACL_SRC=nacl-fast.min.js npm run test-node
To run full suite of tests in Node.js, including comparing outputs of
JavaScript port to outputs of the original C version:
- $ npm run testall
+ $ npm run test-node-all
To prepare tests for browsers:
- $ npm run browser
+ $ npm run build-test-browser
and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to
run them.
-To run headless browser tests with `testling`:
+To run headless browser tests with `tape-run` (powered by Electron):
- $ npm run testling
+ $ npm run test-browser
(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.)
+To run tests in both Node and Electron:
+
+ $ npm test
+
### Benchmarking
To run benchmarks in Node.js:
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js
index 6c4995848..5e4562fe8 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js
@@ -745,7 +745,7 @@ poly1305.prototype.finish = function(mac, macpos) {
}
g[9] -= (1 << 13);
- mask = (g[9] >>> ((2 * 8) - 1)) - 1;
+ mask = (c ^ 1) - 1;
for (i = 0; i < 10; i++) g[i] &= mask;
mask = ~mask;
for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i];
@@ -2157,39 +2157,13 @@ function cleanup(arr) {
for (var i = 0; i < arr.length; i++) arr[i] = 0;
}
-nacl.util = {};
-
-nacl.util.decodeUTF8 = function(s) {
- var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length);
- for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);
- return b;
-};
-
-nacl.util.encodeUTF8 = function(arr) {
- var i, s = [];
- for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i]));
- return decodeURIComponent(escape(s.join('')));
-};
-
-nacl.util.encodeBase64 = function(arr) {
- if (typeof btoa === 'undefined') {
- return (new Buffer(arr)).toString('base64');
- } else {
- var i, s = [], len = arr.length;
- for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i]));
- return btoa(s.join(''));
- }
-};
-
-nacl.util.decodeBase64 = function(s) {
- if (typeof atob === 'undefined') {
- return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0));
- } else {
- var i, d = atob(s), b = new Uint8Array(d.length);
- for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);
- return b;
- }
-};
+// TODO: Completely remove this in v0.15.
+if (!nacl.util) {
+ nacl.util = {};
+ nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() {
+ throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js');
+ };
+}
nacl.randomBytes = function(n) {
var b = new Uint8Array(n);
@@ -2386,26 +2360,22 @@ nacl.setPRNG = function(fn) {
(function() {
// Initialize PRNG if environment provides CSPRNG.
// If not, methods calling randombytes will throw.
- var crypto;
- if (typeof window !== 'undefined') {
- // Browser.
- if (window.crypto && window.crypto.getRandomValues) {
- crypto = window.crypto; // Standard
- } else if (window.msCrypto && window.msCrypto.getRandomValues) {
- crypto = window.msCrypto; // Internet Explorer 11+
- }
- if (crypto) {
- nacl.setPRNG(function(x, n) {
- var i, v = new Uint8Array(n);
- crypto.getRandomValues(v);
- for (i = 0; i < n; i++) x[i] = v[i];
- cleanup(v);
- });
- }
+ var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null;
+ if (crypto && crypto.getRandomValues) {
+ // Browsers.
+ var QUOTA = 65536;
+ nacl.setPRNG(function(x, n) {
+ var i, v = new Uint8Array(n);
+ for (i = 0; i < n; i += QUOTA) {
+ crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
+ }
+ for (i = 0; i < n; i++) x[i] = v[i];
+ cleanup(v);
+ });
} else if (typeof require !== 'undefined') {
// Node.js.
crypto = require('crypto');
- if (crypto) {
+ if (crypto && crypto.randomBytes) {
nacl.setPRNG(function(x, n) {
var i, v = crypto.randomBytes(n);
for (i = 0; i < n; i++) x[i] = v[i];
@@ -2415,4 +2385,4 @@ nacl.setPRNG = function(fn) {
}
})();
-})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {}));
+})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js
index 7072c2af4..624fbbe91 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js
@@ -1,2 +1,2 @@
-!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;o>i;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;_=_+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+u|0,B=B+c|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+g|0,L=L+v|0,C=C+b|0,R=R+d|0,z=z+A|0,r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=C>>>0&255,r[53]=C>>>8&255,r[54]=C>>>16&255,r[55]=C>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=z>>>0&255,r[61]=z>>>8&255,r[62]=z>>>16&255,r[63]=z>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=z>>>0&255,r[13]=z>>>8&255,r[14]=z>>>16&255,r[15]=z>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,u=new Uint8Array(16),c=new Uint8Array(64);for(s=0;16>s;s++)u[s]=0;for(s=0;8>s;s++)u[s]=i[s];for(;o>=64;){for(a(c,u,h,cr),s=0;64>s;s++)r[t+s]=n[e+s]^c[s];for(f=1,s=8;16>s;s++)f=f+(255&u[s])|0,u[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(c,u,h,cr),s=0;o>s;s++)r[t+s]=n[e+s]^c[s];return 0}function u(r,t,n,e,o){var i,h,f=new Uint8Array(16),s=new Uint8Array(64);for(h=0;16>h;h++)f[h]=0;for(h=0;8>h;h++)f[h]=e[h];for(;n>=64;){for(a(s,f,o,cr),h=0;64>h;h++)r[t+h]=s[h];for(i=1,h=8;16>h;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,cr),h=0;n>h;h++)r[t+h]=s[h];return 0}function c(r,t,n,e,o){var i=new Uint8Array(32);f(i,e,o,cr);for(var h=new Uint8Array(8),a=0;8>a;a++)h[a]=e[a+16];return u(r,t,n,h,i)}function y(r,t,n,e,o,i,h){var a=new Uint8Array(32);f(a,i,h,cr);for(var u=new Uint8Array(8),c=0;8>c;c++)u[c]=i[c+16];return s(r,t,n,e,o,u,a)}function l(r,t,n,e,o,i){var h=new yr(i);return h.update(n,e,o),h.finish(r,t),0}function w(r,t,n,o,i,h){var a=new Uint8Array(16);return l(a,0,n,o,i,h),e(r,t,a,0)}function p(r,t,n,e,o){var i;if(32>n)return-1;for(y(r,0,t,0,n,e,o),l(r,16,r,32,n-32,r),i=0;16>i;i++)r[i]=0;return 0}function g(r,t,n,e,o){var i,h=new Uint8Array(32);if(32>n)return-1;if(c(h,0,32,e,o),0!==w(t,16,t,32,n-32,h))return-1;for(y(r,0,t,0,n,e,o),i=0;32>i;i++)r[i]=0;return 0}function v(r,t){var n;for(n=0;16>n;n++)r[n]=0|t[n]}function b(r){var t,n,e=1;for(t=0;16>t;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function d(r,t,n){for(var e,o=~(n-1),i=0;16>i;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function A(r,t){var n,e,o,i=$(),h=$();for(n=0;16>n;n++)h[n]=t[n];for(b(h),b(h),b(h),e=0;2>e;e++){for(i[0]=h[0]-65517,n=1;15>n;n++)i[n]=h[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(h,i,1-o)}for(n=0;16>n;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function _(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;16>n;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,u=0,c=0,y=0,l=0,w=0,p=0,g=0,v=0,b=0,d=0,A=0,_=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,C=0,R=0,z=n[0],P=n[1],O=n[2],N=n[3],F=n[4],I=n[5],j=n[6],G=n[7],Z=n[8],V=n[9],q=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*z,h+=e*P,a+=e*O,f+=e*N,s+=e*F,u+=e*I,c+=e*j,y+=e*G,l+=e*Z,w+=e*V,p+=e*q,g+=e*X,v+=e*D,b+=e*H,d+=e*J,A+=e*Q,e=t[1],h+=e*z,a+=e*P,f+=e*O,s+=e*N,u+=e*F,c+=e*I,y+=e*j,l+=e*G,w+=e*Z,p+=e*V,g+=e*q,v+=e*X,b+=e*D,d+=e*H,A+=e*J,_+=e*Q,e=t[2],a+=e*z,f+=e*P,s+=e*O,u+=e*N,c+=e*F,y+=e*I,l+=e*j,w+=e*G,p+=e*Z,g+=e*V,v+=e*q,b+=e*X,d+=e*D,A+=e*H,_+=e*J,U+=e*Q,e=t[3],f+=e*z,s+=e*P,u+=e*O,c+=e*N,y+=e*F,l+=e*I,w+=e*j,p+=e*G,g+=e*Z,v+=e*V,b+=e*q,d+=e*X,A+=e*D,_+=e*H,U+=e*J,E+=e*Q,e=t[4],s+=e*z,u+=e*P,c+=e*O,y+=e*N,l+=e*F,w+=e*I,p+=e*j,g+=e*G,v+=e*Z,b+=e*V,d+=e*q,A+=e*X,_+=e*D,U+=e*H,E+=e*J,x+=e*Q,e=t[5],u+=e*z,c+=e*P,y+=e*O,l+=e*N,w+=e*F,p+=e*I,g+=e*j,v+=e*G,b+=e*Z,d+=e*V,A+=e*q,_+=e*X,U+=e*D,E+=e*H,x+=e*J,M+=e*Q,e=t[6],c+=e*z,y+=e*P,l+=e*O,w+=e*N,p+=e*F,g+=e*I,v+=e*j,b+=e*G,d+=e*Z,A+=e*V,_+=e*q,U+=e*X,E+=e*D,x+=e*H,M+=e*J,m+=e*Q,e=t[7],y+=e*z,l+=e*P,w+=e*O,p+=e*N,g+=e*F,v+=e*I,b+=e*j,d+=e*G,A+=e*Z,_+=e*V,U+=e*q,E+=e*X,x+=e*D,M+=e*H,m+=e*J,B+=e*Q,e=t[8],l+=e*z,w+=e*P,p+=e*O,g+=e*N,v+=e*F,b+=e*I,d+=e*j,A+=e*G,_+=e*Z,U+=e*V,E+=e*q,x+=e*X,M+=e*D,m+=e*H,B+=e*J,S+=e*Q,e=t[9],w+=e*z,p+=e*P,g+=e*O,v+=e*N,b+=e*F,d+=e*I,A+=e*j,_+=e*G,U+=e*Z,E+=e*V,x+=e*q,M+=e*X,m+=e*D,B+=e*H,S+=e*J,K+=e*Q,e=t[10],p+=e*z,g+=e*P,v+=e*O,b+=e*N,d+=e*F,A+=e*I,_+=e*j,U+=e*G,E+=e*Z,x+=e*V,M+=e*q,m+=e*X,B+=e*D,S+=e*H,K+=e*J,T+=e*Q,e=t[11],g+=e*z,v+=e*P,b+=e*O,d+=e*N,A+=e*F,_+=e*I,U+=e*j,E+=e*G,x+=e*Z,M+=e*V,m+=e*q,B+=e*X,S+=e*D,K+=e*H,T+=e*J,Y+=e*Q,e=t[12],v+=e*z,b+=e*P,d+=e*O,A+=e*N,_+=e*F,U+=e*I,E+=e*j,x+=e*G,M+=e*Z,m+=e*V,B+=e*q,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],b+=e*z,d+=e*P,A+=e*O,_+=e*N,U+=e*F,E+=e*I,x+=e*j,M+=e*G,m+=e*Z,B+=e*V,S+=e*q,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],d+=e*z,A+=e*P,_+=e*O,U+=e*N,E+=e*F,x+=e*I,M+=e*j,m+=e*G,B+=e*Z,S+=e*V,K+=e*q,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,C+=e*Q,e=t[15],A+=e*z,_+=e*P,U+=e*O,E+=e*N,x+=e*F,M+=e*I,m+=e*j,B+=e*G,S+=e*Z,K+=e*V,T+=e*q,Y+=e*X,k+=e*D,L+=e*H,C+=e*J,R+=e*Q,i+=38*_,h+=38*U,a+=38*E,f+=38*x,s+=38*M,u+=38*m,c+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,g+=38*k,v+=38*L,b+=38*C,d+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=u,r[6]=c,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=g,r[12]=v,r[13]=b,r[14]=d,r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),u=$(),c=$(),y=$();for(o=0;31>o;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;16>o;o++)f[o]=h[o],u[o]=a[o]=s[o]=0;for(a[0]=u[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,d(a,f,e),d(s,u,e),x(c,a,s),M(a,a,s),x(s,f,u),M(f,f,u),B(u,c),B(y,a),m(a,s,a),m(s,f,c),x(c,a,s),M(a,a,s),B(f,a),M(s,u,y),m(a,s,ir),x(a,a,u),m(s,s,a),m(a,u,y),m(u,f,h),B(f,c),d(a,f,e),d(s,u,e);for(o=0;16>o;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=u[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,cr)}function C(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function z(r,t,n,e){for(var o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],C=r[2],R=r[3],z=r[4],P=r[5],O=r[6],N=r[7],F=t[0],I=t[1],j=t[2],G=t[3],Z=t[4],V=t[5],q=t[6],X=t[7],D=0;e>=128;){for(U=0;16>U;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;80>U;U++)if(o=k,i=L,h=C,a=R,f=z,s=P,u=O,c=N,y=F,l=I,w=j,p=G,g=Z,v=V,b=q,d=X,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(z>>>14|Z<<18)^(z>>>18|Z<<14)^(Z>>>9|z<<23),M=(Z>>>14|z<<18)^(Z>>>18|z<<14)^(z>>>9|Z<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=z&P^~z&O,M=Z&V^~Z&q,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,_=65535&m|B<<16,x=A,M=_,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&C^L&C,M=F&I^F&j^I&j,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,c=65535&S|K<<16,d=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=_,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,C=i,R=h,z=a,P=f,O=s,N=u,k=c,I=y,j=l,G=w,Z=p,V=g,q=v,X=b,F=d,U%16===15)for(E=0;16>E;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],_=Y[(E+1)%16],x=(A>>>1|_<<31)^(A>>>8|_<<24)^A>>>7,M=(_>>>1|A<<31)^(_>>>8|A<<24)^(_>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],_=Y[(E+14)%16],x=(A>>>19|_<<13)^(_>>>29|A<<3)^A>>>6,M=(_>>>19|A<<13)^(A>>>29|_<<3)^(_>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=C,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=C=65535&S|K<<16,t[2]=j=65535&m|B<<16,x=R,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=G=65535&m|B<<16,x=z,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=z=65535&S|K<<16,t[4]=Z=65535&m|B<<16,x=P,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=P=65535&S|K<<16,t[5]=V=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=O=65535&S|K<<16,t[6]=q=65535&m|B<<16,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=N=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function P(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,z(i,h,n,e),e%=128,o=0;e>o;o++)a[o]=n[f-e+o];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,t(a,e-8,f/536870912|0,f<<3),z(i,h,a,e),o=0;8>o;o++)t(r,8*o,i[o],h[o]);return 0}function O(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$(),s=$(),u=$();M(n,r[1],r[0]),M(u,t[1],t[0]),m(n,n,u),x(e,r[0],r[1]),x(u,t[0],t[1]),m(e,e,u),m(o,r[3],t[3]),m(o,o,ar),m(i,r[2],t[2]),x(i,i,i),M(h,e,n),M(a,i,o),x(f,i,o),x(s,e,n),m(r[0],h,a),m(r[1],s,f),m(r[2],f,a),m(r[3],h,s)}function N(r,t,n){var e;for(e=0;4>e;e++)d(r[e],t[e],n)}function F(r,t){var n=$(),e=$(),o=$();S(o,t[2]),m(n,t[0],o),m(e,t[1],o),A(r,e),r[31]^=U(n)<<7}function I(r,t,n){var e,o;for(v(r[0],er),v(r[1],or),v(r[2],or),v(r[3],er),o=255;o>=0;--o)e=n[o/8|0]>>(7&o)&1,N(r,t,e),O(t,r),O(r,r),N(r,t,e)}function j(r,t){var n=[$(),$(),$(),$()];v(n[0],fr),v(n[1],sr),v(n[2],or),m(n[3],fr,sr),I(r,n,t)}function G(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),P(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,j(i,o),F(r,i),e=0;32>e;e++)t[e+32]=r[e];return 0}function Z(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;i>o;++o)t[o]+=n-16*t[e]*gr[o-(e-32)],n=t[o]+128>>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;32>o;o++)t[o]+=n-(t[31]>>4)*gr[o],n=t[o]>>8,t[o]&=255;for(o=0;32>o;o++)t[o]-=n*gr[o];for(e=0;32>e;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function V(r){var t,n=new Float64Array(64);for(t=0;64>t;t++)n[t]=r[t];for(t=0;64>t;t++)r[t]=0;Z(r,n)}function q(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),u=[$(),$(),$(),$()];P(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var c=n+64;for(o=0;n>o;o++)r[64+o]=t[o];for(o=0;32>o;o++)r[32+o]=h[32+o];for(P(f,r.subarray(32),n+32),V(f),j(u,f),F(r,u),o=32;64>o;o++)r[o]=e[o];for(P(a,r,n+64),V(a),o=0;64>o;o++)s[o]=0;for(o=0;32>o;o++)s[o]=f[o];for(o=0;32>o;o++)for(i=0;32>i;i++)s[o+i]+=a[o]*h[i];return Z(r.subarray(32),s),c}function X(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$();return v(r[2],or),E(r[1],t),B(o,r[1]),m(i,o,hr),M(o,o,r[2]),x(i,r[2],i),B(h,i),B(a,h),m(f,a,h),m(n,f,o),m(n,n,i),K(n,n),m(n,n,o),m(n,n,i),m(n,n,i),m(r[0],n,i),B(e,r[0]),m(e,e,i),_(e,o)&&m(r[0],r[0],ur),B(e,r[0]),m(e,e,i),_(e,o)?-1:(U(r[0])===t[31]>>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],u=[$(),$(),$(),$()];if(h=-1,64>n)return-1;if(X(u,e))return-1;for(i=0;n>i;i++)r[i]=t[i];for(i=0;32>i;i++)r[i+32]=e[i];if(P(f,r,n),V(f),I(s,u,f),j(u,t.subarray(32)),O(s,u),F(a,s),n-=64,o(t,0,a,0)){for(i=0;n>i;i++)r[i]=0;return-1}for(i=0;n>i;i++)r[i]=t[i+64];return h=n}function H(r,t){if(r.length!==vr)throw new Error("bad key size");if(t.length!==br)throw new Error("bad nonce size")}function J(r,t){if(r.length!==Er)throw new Error("bad public key size");if(t.length!==xr)throw new Error("bad secret key size")}function Q(){var r,t;for(t=0;t<arguments.length;t++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[t])))throw new TypeError("unexpected type "+r+", use Uint8Array")}function W(r){for(var t=0;t<r.length;t++)r[t]=0}var $=function(r){var t,n=new Float64Array(16);if(r)for(t=0;t<r.length;t++)n[t]=r[t];return n},rr=function(){throw new Error("no PRNG")},tr=new Uint8Array(16),nr=new Uint8Array(32);nr[0]=9;var er=$(),or=$([1]),ir=$([56129,1]),hr=$([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),ar=$([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),fr=$([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),sr=$([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),ur=$([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),cr=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),yr=function(r){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var t,n,e,o,i,h,a,f;t=255&r[0]|(255&r[1])<<8,this.r[0]=8191&t,n=255&r[2]|(255&r[3])<<8,this.r[1]=8191&(t>>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],C=this.r[1],R=this.r[2],z=this.r[3],P=this.r[4],O=this.r[5],N=this.r[6],F=this.r[7],I=this.r[8],j=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),u=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|u<<8),k+=u>>>5|U,c=0,y=c,y+=E*L,y+=5*x*j,y+=5*M*I,y+=5*m*F,y+=5*B*N,c=y>>>13,y&=8191,y+=5*S*O,y+=5*K*P,y+=5*T*z,y+=5*Y*R,y+=5*k*C,c+=y>>>13,y&=8191,l=c,l+=E*C,l+=x*L,l+=5*M*j,l+=5*m*I,l+=5*B*F,c=l>>>13,l&=8191,l+=5*S*N,l+=5*K*O,l+=5*T*P,l+=5*Y*z,l+=5*k*R,c+=l>>>13,l&=8191,w=c,w+=E*R,w+=x*C,w+=M*L,w+=5*m*j,w+=5*B*I,c=w>>>13,w&=8191,w+=5*S*F,w+=5*K*N,w+=5*T*O,w+=5*Y*P,w+=5*k*z,c+=w>>>13,w&=8191,p=c,p+=E*z,p+=x*R,p+=M*C,p+=m*L,p+=5*B*j,c=p>>>13,p&=8191,p+=5*S*I,p+=5*K*F,p+=5*T*N,p+=5*Y*O,p+=5*k*P,c+=p>>>13,p&=8191,g=c,g+=E*P,g+=x*z,g+=M*R,g+=m*C,g+=B*L,c=g>>>13,g&=8191,g+=5*S*j,g+=5*K*I,g+=5*T*F,g+=5*Y*N,g+=5*k*O,c+=g>>>13,g&=8191,v=c,v+=E*O,v+=x*P,v+=M*z,v+=m*R,v+=B*C,c=v>>>13,v&=8191,v+=S*L,v+=5*K*j,v+=5*T*I,v+=5*Y*F,v+=5*k*N,c+=v>>>13,v&=8191,b=c,b+=E*N,b+=x*O,b+=M*P,b+=m*z,b+=B*R,c=b>>>13,b&=8191,b+=S*C,b+=K*L,b+=5*T*j,b+=5*Y*I,b+=5*k*F,c+=b>>>13,b&=8191,d=c,d+=E*F,d+=x*N,d+=M*O,d+=m*P,d+=B*z,c=d>>>13,d&=8191,d+=S*R,d+=K*C,d+=T*L,d+=5*Y*j,d+=5*k*I,c+=d>>>13,d&=8191,A=c,A+=E*I,A+=x*F,A+=M*N,A+=m*O,A+=B*P,c=A>>>13,A&=8191,A+=S*z,A+=K*R,A+=T*C,A+=Y*L,A+=5*k*j,c+=A>>>13,A&=8191,_=c,_+=E*j,_+=x*I,_+=M*F,_+=m*N,_+=B*O,c=_>>>13,_&=8191,_+=S*P,_+=K*z,_+=T*R,_+=Y*C,_+=k*L,c+=_>>>13,_&=8191,c=(c<<2)+c|0,c=c+y|0,y=8191&c,c>>>=13,l+=c,E=y,x=l,M=w,m=p,B=g,S=v,K=b,T=d,Y=A,k=_,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;16>i;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;10>i;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;10>i;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(h[9]>>>15)-1,i=0;10>i;i++)h[i]&=e;for(e=~e,i=0;10>i;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;8>i;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;o>e;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;n>e;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var lr=p,wr=g,pr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],gr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),vr=32,br=24,dr=32,Ar=16,_r=32,Ur=32,Er=32,xr=32,Mr=32,mr=br,Br=dr,Sr=Ar,Kr=64,Tr=32,Yr=64,kr=32,Lr=64;r.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:y,crypto_stream:c,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:u,crypto_onetimeauth:l,crypto_onetimeauth_verify:w,crypto_verify_16:e,crypto_verify_32:o,crypto_secretbox:p,crypto_secretbox_open:g,crypto_scalarmult:T,crypto_scalarmult_base:Y,crypto_box_beforenm:L,crypto_box_afternm:lr,crypto_box:C,crypto_box_open:R,crypto_box_keypair:k,crypto_hash:P,crypto_sign:q,crypto_sign_keypair:G,crypto_sign_open:D,crypto_secretbox_KEYBYTES:vr,crypto_secretbox_NONCEBYTES:br,crypto_secretbox_ZEROBYTES:dr,crypto_secretbox_BOXZEROBYTES:Ar,crypto_scalarmult_BYTES:_r,crypto_scalarmult_SCALARBYTES:Ur,crypto_box_PUBLICKEYBYTES:Er,crypto_box_SECRETKEYBYTES:xr,crypto_box_BEFORENMBYTES:Mr,crypto_box_NONCEBYTES:mr,crypto_box_ZEROBYTES:Br,crypto_box_BOXZEROBYTES:Sr,crypto_sign_BYTES:Kr,crypto_sign_PUBLICKEYBYTES:Tr,crypto_sign_SECRETKEYBYTES:Yr,crypto_sign_SEEDBYTES:kr,crypto_hash_BYTES:Lr},r.util={},r.util.decodeUTF8=function(r){var t,n=unescape(encodeURIComponent(r)),e=new Uint8Array(n.length);for(t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return e},r.util.encodeUTF8=function(r){var t,n=[];for(t=0;t<r.length;t++)n.push(String.fromCharCode(r[t]));return decodeURIComponent(escape(n.join("")))},r.util.encodeBase64=function(r){if("undefined"==typeof btoa)return new Buffer(r).toString("base64");var t,n=[],e=r.length;for(t=0;e>t;t++)n.push(String.fromCharCode(r[t]));return btoa(n.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var t,n=atob(r),e=new Uint8Array(n.length);for(t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return e},r.randomBytes=function(r){var t=new Uint8Array(r);return rr(t,r),t},r.secretbox=function(r,t,n){Q(r,t,n),H(n,t);for(var e=new Uint8Array(dr+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+dr]=r[i];return p(o,e,e.length,t,n),o.subarray(Ar)},r.secretbox.open=function(r,t,n){Q(r,t,n),H(n,t);for(var e=new Uint8Array(Ar+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+Ar]=r[i];return e.length<32?!1:0!==g(o,e,e.length,t,n)?!1:o.subarray(dr)},r.secretbox.keyLength=vr,r.secretbox.nonceLength=br,r.secretbox.overheadLength=Ar,r.scalarMult=function(r,t){if(Q(r,t),r.length!==Ur)throw new Error("bad n size");if(t.length!==_r)throw new Error("bad p size");var n=new Uint8Array(_r);return T(n,r,t),n},r.scalarMult.base=function(r){if(Q(r),r.length!==Ur)throw new Error("bad n size");var t=new Uint8Array(_r);return Y(t,r),t},r.scalarMult.scalarLength=Ur,r.scalarMult.groupElementLength=_r,r.box=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox(t,n,i)},r.box.before=function(r,t){Q(r,t),J(r,t);var n=new Uint8Array(Mr);return L(n,r,t),n},r.box.after=r.secretbox,r.box.open=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox.open(t,n,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(Er),t=new Uint8Array(xr);return k(r,t),{publicKey:r,secretKey:t}},r.box.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==xr)throw new Error("bad secret key size");var t=new Uint8Array(Er);return Y(t,r),{publicKey:t,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=Er,r.box.secretKeyLength=xr,r.box.sharedKeyLength=Mr,r.box.nonceLength=mr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,t){if(Q(r,t),t.length!==Yr)throw new Error("bad secret key size");var n=new Uint8Array(Kr+r.length);return q(n,r,r.length,t),n},r.sign.open=function(r,t){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(Q(r,t),t.length!==Tr)throw new Error("bad public key size");var n=new Uint8Array(r.length),e=D(n,r,r.length,t);if(0>e)return null;for(var o=new Uint8Array(e),i=0;i<o.length;i++)o[i]=n[i];return o},r.sign.detached=function(t,n){for(var e=r.sign(t,n),o=new Uint8Array(Kr),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached.verify=function(r,t,n){if(Q(r,t,n),t.length!==Kr)throw new Error("bad signature size");if(n.length!==Tr)throw new Error("bad public key size");var e,o=new Uint8Array(Kr+r.length),i=new Uint8Array(Kr+r.length);for(e=0;Kr>e;e++)o[e]=t[e];for(e=0;e<r.length;e++)o[e+Kr]=r[e];return D(i,o,o.length,n)>=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return G(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;n<t.length;n++)t[n]=r[32+n];return{publicKey:t,secretKey:new Uint8Array(r)
-}},r.sign.keyPair.fromSeed=function(r){if(Q(r),r.length!==kr)throw new Error("bad seed size");for(var t=new Uint8Array(Tr),n=new Uint8Array(Yr),e=0;32>e;e++)n[e]=r[e];return G(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=Tr,r.sign.secretKeyLength=Yr,r.sign.seedLength=kr,r.sign.signatureLength=Kr,r.hash=function(r){Q(r);var t=new Uint8Array(Lr);return P(t,r,r.length),t},r.hash.hashLength=Lr,r.verify=function(r,t){return Q(r,t),0===r.length||0===t.length?!1:r.length!==t.length?!1:0===n(r,0,t,0,r.length)?!0:!1},r.setPRNG=function(r){rr=r},function(){var t;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?t=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(t=window.msCrypto),t&&r.setPRNG(function(r,n){var e,o=new Uint8Array(n);for(t.getRandomValues(o),e=0;n>e;e++)r[e]=o[e];W(o)})):"undefined"!=typeof require&&(t=require("crypto"),t&&r.setPRNG(function(r,n){var e,o=t.randomBytes(n);for(e=0;n>e;e++)r[e]=o[e];W(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file
+!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;o>i;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;20>O;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;d=d+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+u|0,B=B+c|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+v|0,L=L+b|0,z=z+g|0,R=R+_|0,P=P+A|0,r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=z>>>0&255,r[53]=z>>>8&255,r[54]=z>>>16&255,r[55]=z>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=P>>>0&255,r[61]=P>>>8&255,r[62]=P>>>16&255,r[63]=P>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;20>O;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=P>>>0&255,r[13]=P>>>8&255,r[14]=P>>>16&255,r[15]=P>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,u=new Uint8Array(16),c=new Uint8Array(64);for(s=0;16>s;s++)u[s]=0;for(s=0;8>s;s++)u[s]=i[s];for(;o>=64;){for(a(c,u,h,cr),s=0;64>s;s++)r[t+s]=n[e+s]^c[s];for(f=1,s=8;16>s;s++)f=f+(255&u[s])|0,u[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(c,u,h,cr),s=0;o>s;s++)r[t+s]=n[e+s]^c[s];return 0}function u(r,t,n,e,o){var i,h,f=new Uint8Array(16),s=new Uint8Array(64);for(h=0;16>h;h++)f[h]=0;for(h=0;8>h;h++)f[h]=e[h];for(;n>=64;){for(a(s,f,o,cr),h=0;64>h;h++)r[t+h]=s[h];for(i=1,h=8;16>h;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,cr),h=0;n>h;h++)r[t+h]=s[h];return 0}function c(r,t,n,e,o){var i=new Uint8Array(32);f(i,e,o,cr);for(var h=new Uint8Array(8),a=0;8>a;a++)h[a]=e[a+16];return u(r,t,n,h,i)}function y(r,t,n,e,o,i,h){var a=new Uint8Array(32);f(a,i,h,cr);for(var u=new Uint8Array(8),c=0;8>c;c++)u[c]=i[c+16];return s(r,t,n,e,o,u,a)}function l(r,t,n,e,o,i){var h=new yr(i);return h.update(n,e,o),h.finish(r,t),0}function w(r,t,n,o,i,h){var a=new Uint8Array(16);return l(a,0,n,o,i,h),e(r,t,a,0)}function p(r,t,n,e,o){var i;if(32>n)return-1;for(y(r,0,t,0,n,e,o),l(r,16,r,32,n-32,r),i=0;16>i;i++)r[i]=0;return 0}function v(r,t,n,e,o){var i,h=new Uint8Array(32);if(32>n)return-1;if(c(h,0,32,e,o),0!==w(t,16,t,32,n-32,h))return-1;for(y(r,0,t,0,n,e,o),i=0;32>i;i++)r[i]=0;return 0}function b(r,t){var n;for(n=0;16>n;n++)r[n]=0|t[n]}function g(r){var t,n,e=1;for(t=0;16>t;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function _(r,t,n){for(var e,o=~(n-1),i=0;16>i;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function A(r,t){var n,e,o,i=$(),h=$();for(n=0;16>n;n++)h[n]=t[n];for(g(h),g(h),g(h),e=0;2>e;e++){for(i[0]=h[0]-65517,n=1;15>n;n++)i[n]=h[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,_(h,i,1-o)}for(n=0;16>n;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function d(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;16>n;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,u=0,c=0,y=0,l=0,w=0,p=0,v=0,b=0,g=0,_=0,A=0,d=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,z=0,R=0,P=n[0],O=n[1],N=n[2],C=n[3],F=n[4],I=n[5],G=n[6],Z=n[7],j=n[8],q=n[9],V=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*P,h+=e*O,a+=e*N,f+=e*C,s+=e*F,u+=e*I,c+=e*G,y+=e*Z,l+=e*j,w+=e*q,p+=e*V,v+=e*X,b+=e*D,g+=e*H,_+=e*J,A+=e*Q,e=t[1],h+=e*P,a+=e*O,f+=e*N,s+=e*C,u+=e*F,c+=e*I,y+=e*G,l+=e*Z,w+=e*j,p+=e*q,v+=e*V,b+=e*X,g+=e*D,_+=e*H,A+=e*J,d+=e*Q,e=t[2],a+=e*P,f+=e*O,s+=e*N,u+=e*C,c+=e*F,y+=e*I,l+=e*G,w+=e*Z,p+=e*j,v+=e*q,b+=e*V,g+=e*X,_+=e*D,A+=e*H,d+=e*J,U+=e*Q,e=t[3],f+=e*P,s+=e*O,u+=e*N,c+=e*C,y+=e*F,l+=e*I,w+=e*G,p+=e*Z,v+=e*j,b+=e*q,g+=e*V,_+=e*X,A+=e*D,d+=e*H,U+=e*J,E+=e*Q,e=t[4],s+=e*P,u+=e*O,c+=e*N,y+=e*C,l+=e*F,w+=e*I,p+=e*G,v+=e*Z,b+=e*j,g+=e*q,_+=e*V,A+=e*X,d+=e*D,U+=e*H,E+=e*J,x+=e*Q,e=t[5],u+=e*P,c+=e*O,y+=e*N,l+=e*C,w+=e*F,p+=e*I,v+=e*G,b+=e*Z,g+=e*j,_+=e*q,A+=e*V,d+=e*X,U+=e*D,E+=e*H,x+=e*J,M+=e*Q,e=t[6],c+=e*P,y+=e*O,l+=e*N,w+=e*C,p+=e*F,v+=e*I,b+=e*G,g+=e*Z,_+=e*j,A+=e*q,d+=e*V,U+=e*X,E+=e*D,x+=e*H,M+=e*J,m+=e*Q,e=t[7],y+=e*P,l+=e*O,w+=e*N,p+=e*C,v+=e*F,b+=e*I,g+=e*G,_+=e*Z,A+=e*j,d+=e*q,U+=e*V,E+=e*X,x+=e*D,M+=e*H,m+=e*J,B+=e*Q,e=t[8],l+=e*P,w+=e*O,p+=e*N,v+=e*C,b+=e*F,g+=e*I,_+=e*G,A+=e*Z,d+=e*j,U+=e*q,E+=e*V,x+=e*X,M+=e*D,m+=e*H,B+=e*J,S+=e*Q,e=t[9],w+=e*P,p+=e*O,v+=e*N,b+=e*C,g+=e*F,_+=e*I,A+=e*G,d+=e*Z,U+=e*j,E+=e*q,x+=e*V,M+=e*X,m+=e*D,B+=e*H,S+=e*J,K+=e*Q,e=t[10],p+=e*P,v+=e*O,b+=e*N,g+=e*C,_+=e*F,A+=e*I,d+=e*G,U+=e*Z,E+=e*j,x+=e*q,M+=e*V,m+=e*X,B+=e*D,S+=e*H,K+=e*J,T+=e*Q,e=t[11],v+=e*P,b+=e*O,g+=e*N,_+=e*C,A+=e*F,d+=e*I,U+=e*G,E+=e*Z,x+=e*j,M+=e*q,m+=e*V,B+=e*X,S+=e*D,K+=e*H,T+=e*J,Y+=e*Q,e=t[12],b+=e*P,g+=e*O,_+=e*N,A+=e*C,d+=e*F,U+=e*I,E+=e*G,x+=e*Z,M+=e*j,m+=e*q,B+=e*V,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],g+=e*P,_+=e*O,A+=e*N,d+=e*C,U+=e*F,E+=e*I,x+=e*G,M+=e*Z,m+=e*j,B+=e*q,S+=e*V,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],_+=e*P,A+=e*O,d+=e*N,U+=e*C,E+=e*F,x+=e*I,M+=e*G,m+=e*Z,B+=e*j,S+=e*q,K+=e*V,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,z+=e*Q,e=t[15],A+=e*P,d+=e*O,U+=e*N,E+=e*C,x+=e*F,M+=e*I,m+=e*G,B+=e*Z,S+=e*j,K+=e*q,T+=e*V,Y+=e*X,k+=e*D,L+=e*H,z+=e*J,R+=e*Q,i+=38*d,h+=38*U,a+=38*E,f+=38*x,s+=38*M,u+=38*m,c+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,v+=38*k,b+=38*L,g+=38*z,_+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=u,r[6]=c,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=v,r[12]=b,r[13]=g,r[14]=_,r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),u=$(),c=$(),y=$();for(o=0;31>o;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;16>o;o++)f[o]=h[o],u[o]=a[o]=s[o]=0;for(a[0]=u[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,_(a,f,e),_(s,u,e),x(c,a,s),M(a,a,s),x(s,f,u),M(f,f,u),B(u,c),B(y,a),m(a,s,a),m(s,f,c),x(c,a,s),M(a,a,s),B(f,a),M(s,u,y),m(a,s,ir),x(a,a,u),m(s,s,a),m(a,u,y),m(u,f,h),B(f,c),_(a,f,e),_(s,u,e);for(o=0;16>o;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=u[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,cr)}function z(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function P(r,t,n,e){for(var o,i,h,a,f,s,u,c,y,l,w,p,v,b,g,_,A,d,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],z=r[2],R=r[3],P=r[4],O=r[5],N=r[6],C=r[7],F=t[0],I=t[1],G=t[2],Z=t[3],j=t[4],q=t[5],V=t[6],X=t[7],D=0;e>=128;){for(U=0;16>U;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;80>U;U++)if(o=k,i=L,h=z,a=R,f=P,s=O,u=N,c=C,y=F,l=I,w=G,p=Z,v=j,b=q,g=V,_=X,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(P>>>14|j<<18)^(P>>>18|j<<14)^(j>>>9|P<<23),M=(j>>>14|P<<18)^(j>>>18|P<<14)^(P>>>9|j<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=P&O^~P&N,M=j&q^~j&V,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,d=65535&m|B<<16,x=A,M=d,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&z^L&z,M=F&I^F&G^I&G,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,c=65535&S|K<<16,_=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=d,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,z=i,R=h,P=a,O=f,N=s,C=u,k=c,I=y,G=l,Z=w,j=p,q=v,V=b,X=g,F=_,U%16===15)for(E=0;16>E;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],d=Y[(E+1)%16],x=(A>>>1|d<<31)^(A>>>8|d<<24)^A>>>7,M=(d>>>1|A<<31)^(d>>>8|A<<24)^(d>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],d=Y[(E+14)%16],x=(A>>>19|d<<13)^(d>>>29|A<<3)^A>>>6,M=(d>>>19|A<<13)^(A>>>29|d<<3)^(d>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=z,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=z=65535&S|K<<16,t[2]=G=65535&m|B<<16,x=R,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=Z=65535&m|B<<16,x=P,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=P=65535&S|K<<16,t[4]=j=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=O=65535&S|K<<16,t[5]=q=65535&m|B<<16,x=N,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=N=65535&S|K<<16,t[6]=V=65535&m|B<<16,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=C=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function O(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,P(i,h,n,e),e%=128,o=0;e>o;o++)a[o]=n[f-e+o];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,t(a,e-8,f/536870912|0,f<<3),P(i,h,a,e),o=0;8>o;o++)t(r,8*o,i[o],h[o]);return 0}function N(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$(),s=$(),u=$();M(n,r[1],r[0]),M(u,t[1],t[0]),m(n,n,u),x(e,r[0],r[1]),x(u,t[0],t[1]),m(e,e,u),m(o,r[3],t[3]),m(o,o,ar),m(i,r[2],t[2]),x(i,i,i),M(h,e,n),M(a,i,o),x(f,i,o),x(s,e,n),m(r[0],h,a),m(r[1],s,f),m(r[2],f,a),m(r[3],h,s)}function C(r,t,n){var e;for(e=0;4>e;e++)_(r[e],t[e],n)}function F(r,t){var n=$(),e=$(),o=$();S(o,t[2]),m(n,t[0],o),m(e,t[1],o),A(r,e),r[31]^=U(n)<<7}function I(r,t,n){var e,o;for(b(r[0],er),b(r[1],or),b(r[2],or),b(r[3],er),o=255;o>=0;--o)e=n[o/8|0]>>(7&o)&1,C(r,t,e),N(t,r),N(r,r),C(r,t,e)}function G(r,t){var n=[$(),$(),$(),$()];b(n[0],fr),b(n[1],sr),b(n[2],or),m(n[3],fr,sr),I(r,n,t)}function Z(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),O(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,G(i,o),F(r,i),e=0;32>e;e++)t[e+32]=r[e];return 0}function j(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;i>o;++o)t[o]+=n-16*t[e]*vr[o-(e-32)],n=t[o]+128>>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;32>o;o++)t[o]+=n-(t[31]>>4)*vr[o],n=t[o]>>8,t[o]&=255;for(o=0;32>o;o++)t[o]-=n*vr[o];for(e=0;32>e;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function q(r){var t,n=new Float64Array(64);for(t=0;64>t;t++)n[t]=r[t];for(t=0;64>t;t++)r[t]=0;j(r,n)}function V(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),u=[$(),$(),$(),$()];O(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var c=n+64;for(o=0;n>o;o++)r[64+o]=t[o];for(o=0;32>o;o++)r[32+o]=h[32+o];for(O(f,r.subarray(32),n+32),q(f),G(u,f),F(r,u),o=32;64>o;o++)r[o]=e[o];for(O(a,r,n+64),q(a),o=0;64>o;o++)s[o]=0;for(o=0;32>o;o++)s[o]=f[o];for(o=0;32>o;o++)for(i=0;32>i;i++)s[o+i]+=a[o]*h[i];return j(r.subarray(32),s),c}function X(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$();return b(r[2],or),E(r[1],t),B(o,r[1]),m(i,o,hr),M(o,o,r[2]),x(i,r[2],i),B(h,i),B(a,h),m(f,a,h),m(n,f,o),m(n,n,i),K(n,n),m(n,n,o),m(n,n,i),m(n,n,i),m(r[0],n,i),B(e,r[0]),m(e,e,i),d(e,o)&&m(r[0],r[0],ur),B(e,r[0]),m(e,e,i),d(e,o)?-1:(U(r[0])===t[31]>>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],u=[$(),$(),$(),$()];if(h=-1,64>n)return-1;if(X(u,e))return-1;for(i=0;n>i;i++)r[i]=t[i];for(i=0;32>i;i++)r[i+32]=e[i];if(O(f,r,n),q(f),I(s,u,f),G(u,t.subarray(32)),N(s,u),F(a,s),n-=64,o(t,0,a,0)){for(i=0;n>i;i++)r[i]=0;return-1}for(i=0;n>i;i++)r[i]=t[i+64];return h=n}function H(r,t){if(r.length!==br)throw new Error("bad key size");if(t.length!==gr)throw new Error("bad nonce size")}function J(r,t){if(r.length!==Er)throw new Error("bad public key size");if(t.length!==xr)throw new Error("bad secret key size")}function Q(){var r,t;for(t=0;t<arguments.length;t++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[t])))throw new TypeError("unexpected type "+r+", use Uint8Array")}function W(r){for(var t=0;t<r.length;t++)r[t]=0}var $=function(r){var t,n=new Float64Array(16);if(r)for(t=0;t<r.length;t++)n[t]=r[t];return n},rr=function(){throw new Error("no PRNG")},tr=new Uint8Array(16),nr=new Uint8Array(32);nr[0]=9;var er=$(),or=$([1]),ir=$([56129,1]),hr=$([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),ar=$([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),fr=$([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),sr=$([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),ur=$([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),cr=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),yr=function(r){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var t,n,e,o,i,h,a,f;t=255&r[0]|(255&r[1])<<8,this.r[0]=8191&t,n=255&r[2]|(255&r[3])<<8,this.r[1]=8191&(t>>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,u,c,y,l,w,p,v,b,g,_,A,d,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],z=this.r[1],R=this.r[2],P=this.r[3],O=this.r[4],N=this.r[5],C=this.r[6],F=this.r[7],I=this.r[8],G=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),u=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|u<<8),k+=u>>>5|U,c=0,y=c,y+=E*L,y+=x*(5*G),y+=M*(5*I),y+=m*(5*F),y+=B*(5*C),c=y>>>13,y&=8191,y+=S*(5*N),y+=K*(5*O),y+=T*(5*P),y+=Y*(5*R),y+=k*(5*z),c+=y>>>13,y&=8191,l=c,l+=E*z,l+=x*L,l+=M*(5*G),l+=m*(5*I),l+=B*(5*F),c=l>>>13,l&=8191,l+=S*(5*C),l+=K*(5*N),l+=T*(5*O),l+=Y*(5*P),l+=k*(5*R),c+=l>>>13,l&=8191,w=c,w+=E*R,w+=x*z,w+=M*L,w+=m*(5*G),w+=B*(5*I),c=w>>>13,w&=8191,w+=S*(5*F),w+=K*(5*C),w+=T*(5*N),w+=Y*(5*O),w+=k*(5*P),c+=w>>>13,w&=8191,p=c,p+=E*P,p+=x*R,p+=M*z,p+=m*L,p+=B*(5*G),c=p>>>13,p&=8191,p+=S*(5*I),p+=K*(5*F),p+=T*(5*C),p+=Y*(5*N),p+=k*(5*O),c+=p>>>13,p&=8191,v=c,v+=E*O,v+=x*P,v+=M*R,v+=m*z,v+=B*L,c=v>>>13,v&=8191,v+=S*(5*G),v+=K*(5*I),v+=T*(5*F),v+=Y*(5*C),v+=k*(5*N),c+=v>>>13,v&=8191,b=c,b+=E*N,b+=x*O,b+=M*P,b+=m*R,b+=B*z,c=b>>>13,b&=8191,b+=S*L,b+=K*(5*G),b+=T*(5*I),b+=Y*(5*F),b+=k*(5*C),c+=b>>>13,b&=8191,g=c,g+=E*C,g+=x*N,g+=M*O,g+=m*P,g+=B*R,c=g>>>13,g&=8191,g+=S*z,g+=K*L,g+=T*(5*G),g+=Y*(5*I),g+=k*(5*F),c+=g>>>13,g&=8191,_=c,_+=E*F,_+=x*C,_+=M*N,_+=m*O,_+=B*P,c=_>>>13,_&=8191,_+=S*R,_+=K*z,_+=T*L,_+=Y*(5*G),_+=k*(5*I),c+=_>>>13,_&=8191,A=c,A+=E*I,A+=x*F,A+=M*C,A+=m*N,A+=B*O,c=A>>>13,A&=8191,A+=S*P,A+=K*R,A+=T*z,A+=Y*L,A+=k*(5*G),c+=A>>>13,A&=8191,d=c,d+=E*G,d+=x*I,d+=M*F,d+=m*C,d+=B*N,c=d>>>13,d&=8191,d+=S*O,d+=K*P,d+=T*R,d+=Y*z,d+=k*L,c+=d>>>13,d&=8191,c=(c<<2)+c|0,c=c+y|0,y=8191&c,c>>>=13,l+=c,E=y,x=l,M=w,m=p,B=v,S=b,K=g,T=_,Y=A,k=d,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;16>i;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;10>i;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;10>i;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(1^n)-1,i=0;10>i;i++)h[i]&=e;for(e=~e,i=0;10>i;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;8>i;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;o>e;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;n>e;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var lr=p,wr=v,pr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],vr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),br=32,gr=24,_r=32,Ar=16,dr=32,Ur=32,Er=32,xr=32,Mr=32,mr=gr,Br=_r,Sr=Ar,Kr=64,Tr=32,Yr=64,kr=32,Lr=64;r.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:y,crypto_stream:c,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:u,crypto_onetimeauth:l,crypto_onetimeauth_verify:w,crypto_verify_16:e,crypto_verify_32:o,crypto_secretbox:p,crypto_secretbox_open:v,crypto_scalarmult:T,crypto_scalarmult_base:Y,crypto_box_beforenm:L,crypto_box_afternm:lr,crypto_box:z,crypto_box_open:R,crypto_box_keypair:k,crypto_hash:O,crypto_sign:V,crypto_sign_keypair:Z,crypto_sign_open:D,crypto_secretbox_KEYBYTES:br,crypto_secretbox_NONCEBYTES:gr,crypto_secretbox_ZEROBYTES:_r,crypto_secretbox_BOXZEROBYTES:Ar,crypto_scalarmult_BYTES:dr,crypto_scalarmult_SCALARBYTES:Ur,crypto_box_PUBLICKEYBYTES:Er,crypto_box_SECRETKEYBYTES:xr,crypto_box_BEFORENMBYTES:Mr,crypto_box_NONCEBYTES:mr,crypto_box_ZEROBYTES:Br,crypto_box_BOXZEROBYTES:Sr,crypto_sign_BYTES:Kr,crypto_sign_PUBLICKEYBYTES:Tr,crypto_sign_SECRETKEYBYTES:Yr,crypto_sign_SEEDBYTES:kr,crypto_hash_BYTES:Lr},r.util||(r.util={},r.util.decodeUTF8=r.util.encodeUTF8=r.util.encodeBase64=r.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),r.randomBytes=function(r){var t=new Uint8Array(r);return rr(t,r),t},r.secretbox=function(r,t,n){Q(r,t,n),H(n,t);for(var e=new Uint8Array(_r+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+_r]=r[i];return p(o,e,e.length,t,n),o.subarray(Ar)},r.secretbox.open=function(r,t,n){Q(r,t,n),H(n,t);for(var e=new Uint8Array(Ar+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+Ar]=r[i];return e.length<32?!1:0!==v(o,e,e.length,t,n)?!1:o.subarray(_r)},r.secretbox.keyLength=br,r.secretbox.nonceLength=gr,r.secretbox.overheadLength=Ar,r.scalarMult=function(r,t){if(Q(r,t),r.length!==Ur)throw new Error("bad n size");if(t.length!==dr)throw new Error("bad p size");var n=new Uint8Array(dr);return T(n,r,t),n},r.scalarMult.base=function(r){if(Q(r),r.length!==Ur)throw new Error("bad n size");var t=new Uint8Array(dr);return Y(t,r),t},r.scalarMult.scalarLength=Ur,r.scalarMult.groupElementLength=dr,r.box=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox(t,n,i)},r.box.before=function(r,t){Q(r,t),J(r,t);var n=new Uint8Array(Mr);return L(n,r,t),n},r.box.after=r.secretbox,r.box.open=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox.open(t,n,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(Er),t=new Uint8Array(xr);return k(r,t),{publicKey:r,secretKey:t}},r.box.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==xr)throw new Error("bad secret key size");var t=new Uint8Array(Er);return Y(t,r),{publicKey:t,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=Er,r.box.secretKeyLength=xr,r.box.sharedKeyLength=Mr,r.box.nonceLength=mr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,t){if(Q(r,t),t.length!==Yr)throw new Error("bad secret key size");var n=new Uint8Array(Kr+r.length);return V(n,r,r.length,t),n},r.sign.open=function(r,t){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(Q(r,t),t.length!==Tr)throw new Error("bad public key size");var n=new Uint8Array(r.length),e=D(n,r,r.length,t);if(0>e)return null;for(var o=new Uint8Array(e),i=0;i<o.length;i++)o[i]=n[i];return o},r.sign.detached=function(t,n){for(var e=r.sign(t,n),o=new Uint8Array(Kr),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached.verify=function(r,t,n){if(Q(r,t,n),t.length!==Kr)throw new Error("bad signature size");if(n.length!==Tr)throw new Error("bad public key size");var e,o=new Uint8Array(Kr+r.length),i=new Uint8Array(Kr+r.length);for(e=0;Kr>e;e++)o[e]=t[e];for(e=0;e<r.length;e++)o[e+Kr]=r[e];return D(i,o,o.length,n)>=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return Z(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;n<t.length;n++)t[n]=r[32+n];return{publicKey:t,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(Q(r),r.length!==kr)throw new Error("bad seed size");for(var t=new Uint8Array(Tr),n=new Uint8Array(Yr),e=0;32>e;e++)n[e]=r[e];return Z(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=Tr,r.sign.secretKeyLength=Yr,r.sign.seedLength=kr,r.sign.signatureLength=Kr,r.hash=function(r){Q(r);var t=new Uint8Array(Lr);return O(t,r,r.length),t},r.hash.hashLength=Lr,r.verify=function(r,t){return Q(r,t),
+0===r.length||0===t.length?!1:r.length!==t.length?!1:0===n(r,0,t,0,r.length)?!0:!1},r.setPRNG=function(r){rr=r},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){var n=65536;r.setPRNG(function(r,e){var o,i=new Uint8Array(e);for(o=0;e>o;o+=n)t.getRandomValues(i.subarray(o,o+Math.min(e-o,n)));for(o=0;e>o;o++)r[o]=i[o];W(i)})}else"undefined"!=typeof require&&(t=require("crypto"),t&&t.randomBytes&&r.setPRNG(function(r,n){var e,o=t.randomBytes(n);for(e=0;n>e;e++)r[e]=o[e];W(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:self.nacl=self.nacl||{}); \ No newline at end of file
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js
index b8edbbee6..f72dd78d1 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js
@@ -944,39 +944,13 @@ function cleanup(arr) {
for (var i = 0; i < arr.length; i++) arr[i] = 0;
}
-nacl.util = {};
-
-nacl.util.decodeUTF8 = function(s) {
- var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length);
- for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);
- return b;
-};
-
-nacl.util.encodeUTF8 = function(arr) {
- var i, s = [];
- for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i]));
- return decodeURIComponent(escape(s.join('')));
-};
-
-nacl.util.encodeBase64 = function(arr) {
- if (typeof btoa === 'undefined') {
- return (new Buffer(arr)).toString('base64');
- } else {
- var i, s = [], len = arr.length;
- for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i]));
- return btoa(s.join(''));
- }
-};
-
-nacl.util.decodeBase64 = function(s) {
- if (typeof atob === 'undefined') {
- return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0));
- } else {
- var i, d = atob(s), b = new Uint8Array(d.length);
- for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);
- return b;
- }
-};
+// TODO: Completely remove this in v0.15.
+if (!nacl.util) {
+ nacl.util = {};
+ nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() {
+ throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js');
+ };
+}
nacl.randomBytes = function(n) {
var b = new Uint8Array(n);
@@ -1173,26 +1147,22 @@ nacl.setPRNG = function(fn) {
(function() {
// Initialize PRNG if environment provides CSPRNG.
// If not, methods calling randombytes will throw.
- var crypto;
- if (typeof window !== 'undefined') {
- // Browser.
- if (window.crypto && window.crypto.getRandomValues) {
- crypto = window.crypto; // Standard
- } else if (window.msCrypto && window.msCrypto.getRandomValues) {
- crypto = window.msCrypto; // Internet Explorer 11+
- }
- if (crypto) {
- nacl.setPRNG(function(x, n) {
- var i, v = new Uint8Array(n);
- crypto.getRandomValues(v);
- for (i = 0; i < n; i++) x[i] = v[i];
- cleanup(v);
- });
- }
+ var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null;
+ if (crypto && crypto.getRandomValues) {
+ // Browsers.
+ var QUOTA = 65536;
+ nacl.setPRNG(function(x, n) {
+ var i, v = new Uint8Array(n);
+ for (i = 0; i < n; i += QUOTA) {
+ crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
+ }
+ for (i = 0; i < n; i++) x[i] = v[i];
+ cleanup(v);
+ });
} else if (typeof require !== 'undefined') {
// Node.js.
crypto = require('crypto');
- if (crypto) {
+ if (crypto && crypto.randomBytes) {
nacl.setPRNG(function(x, n) {
var i, v = crypto.randomBytes(n);
for (i = 0; i < n; i++) x[i] = v[i];
@@ -1202,4 +1172,4 @@ nacl.setPRNG = function(fn) {
}
})();
-})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {}));
+})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js
index 95d869502..eed385415 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js
@@ -1 +1 @@
-!function(r){"use strict";function n(r,n){return r<<n|r>>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new lr(e,t)}function o(r,n,e){var t;for(t=0;4>t;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;o>i;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),s=new Uint32Array(16),l=new Uint32Array(16),h=new Uint32Array(4);for(u=0;4>u;u++)s[5*u]=e(a,4*u),s[1+u]=e(i,4*u),s[6+u]=e(t,4*u),s[11+u]=e(i,16+4*u);for(u=0;16>u;u++)l[u]=s[u];for(u=0;20>u;u++){for(c=0;4>c;c++){for(w=0;4>w;w++)h[w]=s[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;4>w;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;16>w;w++)s[w]=y[w]}if(f){for(u=0;16>u;u++)s[u]=s[u]+l[u]|0;for(u=0;4>u;u++)s[5*u]=s[5*u]-e(a,4*u)|0,s[6+u]=s[6+u]-e(t,4*u)|0;for(u=0;4>u;u++)o(r,4*u,s[5*u]),o(r,16+4*u,s[6+u])}else for(u=0;16>u;u++)o(r,4*u,s[u]+l[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function s(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;16>u;u++)c[u]=0;for(u=0;8>u;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;64>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;16>u;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;o>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];return 0}function l(r,n,e,t,o){return s(r,n,null,0,e,t,o)}function h(r,n,e,t,o){var i=new Uint8Array(32);return y(i,t,o,Br),l(r,n,e,t.subarray(16),i)}function g(r,n,e,t,o,i,a){var f=new Uint8Array(32);return y(f,i,a,Br),s(r,n,e,t,o,i.subarray(16),f)}function p(r,n){var e,t=0;for(e=0;17>e;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}function v(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),s=new Uint32Array(17),l=new Uint32Array(17),h=new Uint32Array(17);for(u=0;17>u;u++)y[u]=s[u]=0;for(u=0;16>u;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;17>u;u++)l[u]=0;for(u=0;16>u&&o>u;++u)l[u]=e[t+u];for(l[u]=1,t+=u,o-=u,p(s,l),f=0;17>f;f++)for(w[f]=0,u=0;17>u;u++)w[f]=w[f]+s[u]*(f>=u?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;17>f;f++)s[f]=w[f];for(c=0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;for(c=c+s[16]|0,s[16]=3&c,c=5*(c>>>2)|0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;c=c+s[16]|0,s[16]=c}for(u=0;17>u;u++)h[u]=s[u];for(p(s,Sr),a=0|-(s[16]>>>7),u=0;17>u;u++)s[u]^=a&(h[u]^s[u]);for(u=0;16>u;u++)l[u]=i[u+16];for(l[16]=0,p(s,l),u=0;16>u;u++)r[n+u]=s[u];return 0}function b(r,n,e,t,o,i){var a=new Uint8Array(16);return v(a,0,e,t,o,i),f(r,n,a,0)}function A(r,n,e,t,o){var i;if(32>e)return-1;for(g(r,0,n,0,e,t,o),v(r,16,r,32,e-32,r),i=0;16>i;i++)r[i]=0;return 0}function U(r,n,e,t,o){var i,a=new Uint8Array(32);if(32>e)return-1;if(h(a,0,32,t,o),0!==b(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;32>i;i++)r[i]=0;return 0}function _(r,n){var e;for(e=0;16>e;e++)r[e]=0|n[e]}function d(r){var n,e;for(e=0;16>e;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(15>e?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function E(r,n,e){for(var t,o=~(e-1),i=0;16>i;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;16>e;e++)a[e]=n[e];for(d(a),d(a),d(a),t=0;2>t;t++){for(i[0]=a[0]-65517,e=1;15>e;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,E(a,i,1-o)}for(e=0;16>e;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;16>e;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;31>t;t++)i[t]=0;for(t=0;16>t;t++)for(o=0;16>o;o++)i[t+o]+=n[t]*e[o];for(t=0;15>t;t++)i[t]+=38*i[t+16];for(t=0;16>t;t++)r[t]=i[t];d(r),d(r)}function L(r,n){Y(r,n,n)}function C(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function R(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function k(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),s=hr();for(o=0;31>o;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;16>o;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,E(f,u,t),E(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(s,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,s),Y(f,c,Ur),K(f,f,w),Y(c,c,f),Y(f,w,s),Y(w,u,a),L(u,y),E(f,u,t),E(c,w,t);for(o=0;16>o;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var l=a.subarray(32),h=a.subarray(16);return C(l,l),Y(h,h,l),x(r,h),0}function z(r,n){return k(r,n,vr)}function P(r,n){return gr(n,32),z(r,n)}function O(r,n,e){var t=new Uint8Array(32);return k(t,e,n),y(r,pr,t,Br)}function F(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Kr(r,n,e,t,a)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e<arguments.length;e++)r=arguments[e].lo,n=arguments[e].hi,t+=r&f,o+=r>>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new lr(i&f|a<<16,t&f|o<<16)}function j(r,n){return new lr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function G(){var r,n=0,e=0;for(r=0;r<arguments.length;r++)n^=arguments[r].lo,e^=arguments[r].hi;return new lr(e,n)}function I(r,n){var e,t,o=32-n;return 32>n?(e=r.hi>>>n|r.lo<<o,t=r.lo>>>n|r.hi<<o):64>n&&(e=r.lo>>>n|r.hi<<o,t=r.hi>>>n|r.lo<<o),new lr(e,t)}function Z(r,n,e){var t=r.hi&n.hi^~r.hi&e.hi,o=r.lo&n.lo^~r.lo&e.lo;return new lr(t,o)}function V(r,n,e){var t=r.hi&n.hi^r.hi&e.hi^n.hi&e.hi,o=r.lo&n.lo^r.lo&e.lo^n.lo&e.lo;return new lr(t,o)}function q(r){return G(I(r,28),I(r,34),I(r,39))}function X(r){return G(I(r,14),I(r,18),I(r,41))}function D(r){return G(I(r,1),I(r,8),j(r,7))}function H(r){return G(I(r,19),I(r,61),j(r,6))}function J(r,n,e){var o,a,f,u=[],c=[],w=[],y=[];for(a=0;8>a;a++)u[a]=w[a]=t(r,8*a);for(var s=0;e>=128;){for(a=0;16>a;a++)y[a]=t(n,8*a+s);for(a=0;80>a;a++){for(f=0;8>f;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),Z(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,q(w[0]),V(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;8>f;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;16>f;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;8>a;a++)w[a]=M(w[a],u[a]),u[a]=w[a];s+=128,e-=128}for(a=0;8>a;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;64>t;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;256>t;t++)a[t]=0;for(t=0;e>t;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,i(a,e-8,new lr(f/536870912|0,f<<3)),J(o,a,e),t=0;64>t;t++)r[t]=o[t];return 0}function W(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,dr),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function $(r,n,e){var t;for(t=0;4>t;t++)E(r[t],n[t],e)}function rr(r,n){var e=hr(),t=hr(),o=hr();C(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}function nr(r,n,e){var t,o;for(_(r[0],br),_(r[1],Ar),_(r[2],Ar),_(r[3],br),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];_(e[0],Er),_(e[1],xr),_(e[2],Ar),Y(e[3],Er,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;32>t;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;i>o;++o)n[o]+=e-16*n[t]*Cr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;32>o;o++)n[o]+=e-(n[31]>>4)*Cr[o],e=n[o]>>8,n[o]&=255;for(o=0;32>o;o++)n[o]-=e*Cr[o];for(t=0;32>t;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;64>n;n++)e[n]=r[n];for(n=0;64>n;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;e>o;o++)r[64+o]=n[o];for(o=0;32>o;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;64>o;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;64>o;o++)c[o]=0;for(o=0;32>o;o++)c[o]=u[o];for(o=0;32>o;o++)for(i=0;32>i;i++)c[o+i]+=f[o]*a[i];return or(r.subarray(32),c),y}function fr(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();return _(r[2],Ar),S(r[1],n),L(o,r[1]),Y(i,o,_r),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),R(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],br,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,64>e)return-1;if(fr(w,t))return-1;for(o=0;e>o;o++)r[o]=n[o];for(o=0;32>o;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;e>o;o++)r[o]=0;return-1}for(o=0;e>o;o++)r[o]=n[o+64];return i=e}function cr(r,n){if(r.length!==Rr)throw new Error("bad key size");if(n.length!==kr)throw new Error("bad nonce size")}function wr(r,n){if(r.length!==Nr)throw new Error("bad public key size");if(n.length!==Mr)throw new Error("bad secret key size")}function yr(){var r,n;for(n=0;n<arguments.length;n++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[n])))throw new TypeError("unexpected type "+r+", use Uint8Array")}function sr(r){for(var n=0;n<r.length;n++)r[n]=0}var lr=function(r,n){this.hi=0|r,this.lo=0|n},hr=function(r){var n,e=new Float64Array(16);if(r)for(n=0;n<r.length;n++)e[n]=r[n];return e},gr=function(){throw new Error("no PRNG")},pr=new Uint8Array(16),vr=new Uint8Array(32);vr[0]=9;var br=hr(),Ar=hr([1]),Ur=hr([56129,1]),_r=hr([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),dr=hr([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),Er=hr([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),xr=hr([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),mr=hr([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),Br=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),Sr=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]),Kr=A,Tr=U,Yr=[new lr(1116352408,3609767458),new lr(1899447441,602891725),new lr(3049323471,3964484399),new lr(3921009573,2173295548),new lr(961987163,4081628472),new lr(1508970993,3053834265),new lr(2453635748,2937671579),new lr(2870763221,3664609560),new lr(3624381080,2734883394),new lr(310598401,1164996542),new lr(607225278,1323610764),new lr(1426881987,3590304994),new lr(1925078388,4068182383),new lr(2162078206,991336113),new lr(2614888103,633803317),new lr(3248222580,3479774868),new lr(3835390401,2666613458),new lr(4022224774,944711139),new lr(264347078,2341262773),new lr(604807628,2007800933),new lr(770255983,1495990901),new lr(1249150122,1856431235),new lr(1555081692,3175218132),new lr(1996064986,2198950837),new lr(2554220882,3999719339),new lr(2821834349,766784016),new lr(2952996808,2566594879),new lr(3210313671,3203337956),new lr(3336571891,1034457026),new lr(3584528711,2466948901),new lr(113926993,3758326383),new lr(338241895,168717936),new lr(666307205,1188179964),new lr(773529912,1546045734),new lr(1294757372,1522805485),new lr(1396182291,2643833823),new lr(1695183700,2343527390),new lr(1986661051,1014477480),new lr(2177026350,1206759142),new lr(2456956037,344077627),new lr(2730485921,1290863460),new lr(2820302411,3158454273),new lr(3259730800,3505952657),new lr(3345764771,106217008),new lr(3516065817,3606008344),new lr(3600352804,1432725776),new lr(4094571909,1467031594),new lr(275423344,851169720),new lr(430227734,3100823752),new lr(506948616,1363258195),new lr(659060556,3750685593),new lr(883997877,3785050280),new lr(958139571,3318307427),new lr(1322822218,3812723403),new lr(1537002063,2003034995),new lr(1747873779,3602036899),new lr(1955562222,1575990012),new lr(2024104815,1125592928),new lr(2227730452,2716904306),new lr(2361852424,442776044),new lr(2428436474,593698344),new lr(2756734187,3733110249),new lr(3204031479,2999351573),new lr(3329325298,3815920427),new lr(3391569614,3928383900),new lr(3515267271,566280711),new lr(3940187606,3454069534),new lr(4118630271,4000239992),new lr(116418474,1914138554),new lr(174292421,2731055270),new lr(289380356,3203993006),new lr(460393269,320620315),new lr(685471733,587496836),new lr(852142971,1086792851),new lr(1017036298,365543100),new lr(1126000580,2618297676),new lr(1288033470,3409855158),new lr(1501505948,4234509866),new lr(1607167915,987167468),new lr(1816402316,1246189591)],Lr=new Uint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]),Cr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),Rr=32,kr=24,zr=32,Pr=16,Or=32,Fr=32,Nr=32,Mr=32,jr=32,Gr=kr,Ir=zr,Zr=Pr,Vr=64,qr=32,Xr=64,Dr=32,Hr=64;r.lowlevel={crypto_core_hsalsa20:y,crypto_stream_xor:g,crypto_stream:h,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:l,crypto_onetimeauth:v,crypto_onetimeauth_verify:b,crypto_verify_16:f,crypto_verify_32:u,crypto_secretbox:A,crypto_secretbox_open:U,crypto_scalarmult:k,crypto_scalarmult_base:z,crypto_box_beforenm:O,crypto_box_afternm:Kr,crypto_box:F,crypto_box_open:N,crypto_box_keypair:P,crypto_hash:Q,crypto_sign:ar,crypto_sign_keypair:tr,crypto_sign_open:ur,crypto_secretbox_KEYBYTES:Rr,crypto_secretbox_NONCEBYTES:kr,crypto_secretbox_ZEROBYTES:zr,crypto_secretbox_BOXZEROBYTES:Pr,crypto_scalarmult_BYTES:Or,crypto_scalarmult_SCALARBYTES:Fr,crypto_box_PUBLICKEYBYTES:Nr,crypto_box_SECRETKEYBYTES:Mr,crypto_box_BEFORENMBYTES:jr,crypto_box_NONCEBYTES:Gr,crypto_box_ZEROBYTES:Ir,crypto_box_BOXZEROBYTES:Zr,crypto_sign_BYTES:Vr,crypto_sign_PUBLICKEYBYTES:qr,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:Dr,crypto_hash_BYTES:Hr},r.util={},r.util.decodeUTF8=function(r){var n,e=unescape(encodeURIComponent(r)),t=new Uint8Array(e.length);for(n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},r.util.encodeUTF8=function(r){var n,e=[];for(n=0;n<r.length;n++)e.push(String.fromCharCode(r[n]));return decodeURIComponent(escape(e.join("")))},r.util.encodeBase64=function(r){if("undefined"==typeof btoa)return new Buffer(r).toString("base64");var n,e=[],t=r.length;for(n=0;t>n;n++)e.push(String.fromCharCode(r[n]));return btoa(e.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var n,e=atob(r),t=new Uint8Array(e.length);for(n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},r.randomBytes=function(r){var n=new Uint8Array(r);return gr(n,r),n},r.secretbox=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(zr+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+zr]=r[i];return A(o,t,t.length,n,e),o.subarray(Pr)},r.secretbox.open=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(Pr+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+Pr]=r[i];return t.length<32?!1:0!==U(o,t,t.length,n,e)?!1:o.subarray(zr)},r.secretbox.keyLength=Rr,r.secretbox.nonceLength=kr,r.secretbox.overheadLength=Pr,r.scalarMult=function(r,n){if(yr(r,n),r.length!==Fr)throw new Error("bad n size");if(n.length!==Or)throw new Error("bad p size");var e=new Uint8Array(Or);return k(e,r,n),e},r.scalarMult.base=function(r){if(yr(r),r.length!==Fr)throw new Error("bad n size");var n=new Uint8Array(Or);return z(n,r),n},r.scalarMult.scalarLength=Fr,r.scalarMult.groupElementLength=Or,r.box=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox(n,e,i)},r.box.before=function(r,n){yr(r,n),wr(r,n);var e=new Uint8Array(jr);return O(e,r,n),e},r.box.after=r.secretbox,r.box.open=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox.open(n,e,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(Nr),n=new Uint8Array(Mr);return P(r,n),{publicKey:r,secretKey:n}},r.box.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Mr)throw new Error("bad secret key size");var n=new Uint8Array(Nr);return z(n,r),{publicKey:n,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=Nr,r.box.secretKeyLength=Mr,r.box.sharedKeyLength=jr,r.box.nonceLength=Gr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,n){if(yr(r,n),n.length!==Xr)throw new Error("bad secret key size");var e=new Uint8Array(Vr+r.length);return ar(e,r,r.length,n),e},r.sign.open=function(r,n){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(yr(r,n),n.length!==qr)throw new Error("bad public key size");var e=new Uint8Array(r.length),t=ur(e,r,r.length,n);if(0>t)return null;for(var o=new Uint8Array(t),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached=function(n,e){for(var t=r.sign(n,e),o=new Uint8Array(Vr),i=0;i<o.length;i++)o[i]=t[i];return o},r.sign.detached.verify=function(r,n,e){if(yr(r,n,e),n.length!==Vr)throw new Error("bad signature size");if(e.length!==qr)throw new Error("bad public key size");var t,o=new Uint8Array(Vr+r.length),i=new Uint8Array(Vr+r.length);for(t=0;Vr>t;t++)o[t]=n[t];for(t=0;t<r.length;t++)o[t+Vr]=r[t];return ur(i,o,o.length,e)>=0},r.sign.keyPair=function(){var r=new Uint8Array(qr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(qr),e=0;e<n.length;e++)n[e]=r[32+e];return{publicKey:n,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(yr(r),r.length!==Dr)throw new Error("bad seed size");for(var n=new Uint8Array(qr),e=new Uint8Array(Xr),t=0;32>t;t++)e[t]=r[t];return tr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=qr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Vr,r.hash=function(r){yr(r);var n=new Uint8Array(Hr);return Q(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){return yr(r,n),0===r.length||0===n.length?!1:r.length!==n.length?!1:0===a(r,0,n,0,r.length)?!0:!1},r.setPRNG=function(r){gr=r},function(){var n;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?n=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(n=window.msCrypto),n&&r.setPRNG(function(r,e){var t,o=new Uint8Array(e);for(n.getRandomValues(o),t=0;e>t;t++)r[t]=o[t];sr(o)})):"undefined"!=typeof require&&(n=require("crypto"),n&&r.setPRNG(function(r,e){var t,o=n.randomBytes(e);for(t=0;e>t;t++)r[t]=o[t];sr(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file
+!function(r){"use strict";function n(r,n){return r<<n|r>>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new lr(e,t)}function o(r,n,e){var t;for(t=0;4>t;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;o>i;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),s=new Uint32Array(16),l=new Uint32Array(16),h=new Uint32Array(4);for(u=0;4>u;u++)s[5*u]=e(a,4*u),s[1+u]=e(i,4*u),s[6+u]=e(t,4*u),s[11+u]=e(i,16+4*u);for(u=0;16>u;u++)l[u]=s[u];for(u=0;20>u;u++){for(c=0;4>c;c++){for(w=0;4>w;w++)h[w]=s[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;4>w;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;16>w;w++)s[w]=y[w]}if(f){for(u=0;16>u;u++)s[u]=s[u]+l[u]|0;for(u=0;4>u;u++)s[5*u]=s[5*u]-e(a,4*u)|0,s[6+u]=s[6+u]-e(t,4*u)|0;for(u=0;4>u;u++)o(r,4*u,s[5*u]),o(r,16+4*u,s[6+u])}else for(u=0;16>u;u++)o(r,4*u,s[u]+l[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function s(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;16>u;u++)c[u]=0;for(u=0;8>u;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;64>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;16>u;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;o>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];return 0}function l(r,n,e,t,o){return s(r,n,null,0,e,t,o)}function h(r,n,e,t,o){var i=new Uint8Array(32);return y(i,t,o,Br),l(r,n,e,t.subarray(16),i)}function g(r,n,e,t,o,i,a){var f=new Uint8Array(32);return y(f,i,a,Br),s(r,n,e,t,o,i.subarray(16),f)}function v(r,n){var e,t=0;for(e=0;17>e;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}function b(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),s=new Uint32Array(17),l=new Uint32Array(17),h=new Uint32Array(17);for(u=0;17>u;u++)y[u]=s[u]=0;for(u=0;16>u;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;17>u;u++)l[u]=0;for(u=0;16>u&&o>u;++u)l[u]=e[t+u];for(l[u]=1,t+=u,o-=u,v(s,l),f=0;17>f;f++)for(w[f]=0,u=0;17>u;u++)w[f]=w[f]+s[u]*(f>=u?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;17>f;f++)s[f]=w[f];for(c=0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;for(c=c+s[16]|0,s[16]=3&c,c=5*(c>>>2)|0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;c=c+s[16]|0,s[16]=c}for(u=0;17>u;u++)h[u]=s[u];for(v(s,Sr),a=0|-(s[16]>>>7),u=0;17>u;u++)s[u]^=a&(h[u]^s[u]);for(u=0;16>u;u++)l[u]=i[u+16];for(l[16]=0,v(s,l),u=0;16>u;u++)r[n+u]=s[u];return 0}function p(r,n,e,t,o,i){var a=new Uint8Array(16);return b(a,0,e,t,o,i),f(r,n,a,0)}function _(r,n,e,t,o){var i;if(32>e)return-1;for(g(r,0,n,0,e,t,o),b(r,16,r,32,e-32,r),i=0;16>i;i++)r[i]=0;return 0}function A(r,n,e,t,o){var i,a=new Uint8Array(32);if(32>e)return-1;if(h(a,0,32,t,o),0!==p(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;32>i;i++)r[i]=0;return 0}function U(r,n){var e;for(e=0;16>e;e++)r[e]=0|n[e]}function E(r){var n,e;for(e=0;16>e;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(15>e?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function d(r,n,e){for(var t,o=~(e-1),i=0;16>i;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;16>e;e++)a[e]=n[e];for(E(a),E(a),E(a),t=0;2>t;t++){for(i[0]=a[0]-65517,e=1;15>e;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(a,i,1-o)}for(e=0;16>e;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;16>e;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;31>t;t++)i[t]=0;for(t=0;16>t;t++)for(o=0;16>o;o++)i[t+o]+=n[t]*e[o];for(t=0;15>t;t++)i[t]+=38*i[t+16];for(t=0;16>t;t++)r[t]=i[t];E(r),E(r)}function L(r,n){Y(r,n,n)}function k(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function z(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function R(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),s=hr();for(o=0;31>o;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;16>o;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,d(f,u,t),d(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(s,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,s),Y(f,c,Ar),K(f,f,w),Y(c,c,f),Y(f,w,s),Y(w,u,a),L(u,y),d(f,u,t),d(c,w,t);for(o=0;16>o;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var l=a.subarray(32),h=a.subarray(16);return k(l,l),Y(h,h,l),x(r,h),0}function P(r,n){return R(r,n,br)}function O(r,n){return gr(n,32),P(r,n)}function F(r,n,e){var t=new Uint8Array(32);return R(t,e,n),y(r,vr,t,Br)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Kr(r,n,e,t,a)}function C(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e<arguments.length;e++)r=arguments[e].lo,n=arguments[e].hi,t+=r&f,o+=r>>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new lr(i&f|a<<16,t&f|o<<16)}function G(r,n){return new lr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function Z(){var r,n=0,e=0;for(r=0;r<arguments.length;r++)n^=arguments[r].lo,e^=arguments[r].hi;return new lr(e,n)}function j(r,n){var e,t,o=32-n;return 32>n?(e=r.hi>>>n|r.lo<<o,t=r.lo>>>n|r.hi<<o):64>n&&(e=r.lo>>>n|r.hi<<o,t=r.hi>>>n|r.lo<<o),new lr(e,t)}function q(r,n,e){var t=r.hi&n.hi^~r.hi&e.hi,o=r.lo&n.lo^~r.lo&e.lo;return new lr(t,o)}function I(r,n,e){var t=r.hi&n.hi^r.hi&e.hi^n.hi&e.hi,o=r.lo&n.lo^r.lo&e.lo^n.lo&e.lo;return new lr(t,o)}function V(r){return Z(j(r,28),j(r,34),j(r,39))}function X(r){return Z(j(r,14),j(r,18),j(r,41))}function D(r){return Z(j(r,1),j(r,8),G(r,7))}function H(r){return Z(j(r,19),j(r,61),G(r,6))}function J(r,n,e){var o,a,f,u=[],c=[],w=[],y=[];for(a=0;8>a;a++)u[a]=w[a]=t(r,8*a);for(var s=0;e>=128;){for(a=0;16>a;a++)y[a]=t(n,8*a+s);for(a=0;80>a;a++){for(f=0;8>f;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),q(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,V(w[0]),I(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;8>f;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;16>f;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;8>a;a++)w[a]=M(w[a],u[a]),u[a]=w[a];s+=128,e-=128}for(a=0;8>a;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;64>t;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;256>t;t++)a[t]=0;for(t=0;e>t;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,i(a,e-8,new lr(f/536870912|0,f<<3)),J(o,a,e),t=0;64>t;t++)r[t]=o[t];return 0}function W(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,Er),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function $(r,n,e){var t;for(t=0;4>t;t++)d(r[t],n[t],e)}function rr(r,n){var e=hr(),t=hr(),o=hr();k(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}function nr(r,n,e){var t,o;for(U(r[0],pr),U(r[1],_r),U(r[2],_r),U(r[3],pr),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];U(e[0],dr),U(e[1],xr),U(e[2],_r),Y(e[3],dr,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;32>t;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;i>o;++o)n[o]+=e-16*n[t]*kr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;32>o;o++)n[o]+=e-(n[31]>>4)*kr[o],e=n[o]>>8,n[o]&=255;for(o=0;32>o;o++)n[o]-=e*kr[o];for(t=0;32>t;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;64>n;n++)e[n]=r[n];for(n=0;64>n;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;e>o;o++)r[64+o]=n[o];for(o=0;32>o;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;64>o;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;64>o;o++)c[o]=0;for(o=0;32>o;o++)c[o]=u[o];for(o=0;32>o;o++)for(i=0;32>i;i++)c[o+i]+=f[o]*a[i];return or(r.subarray(32),c),y}function fr(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();return U(r[2],_r),S(r[1],n),L(o,r[1]),Y(i,o,Ur),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),z(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],pr,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,64>e)return-1;if(fr(w,t))return-1;for(o=0;e>o;o++)r[o]=n[o];for(o=0;32>o;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;e>o;o++)r[o]=0;return-1}for(o=0;e>o;o++)r[o]=n[o+64];return i=e}function cr(r,n){if(r.length!==zr)throw new Error("bad key size");if(n.length!==Rr)throw new Error("bad nonce size")}function wr(r,n){if(r.length!==Cr)throw new Error("bad public key size");if(n.length!==Mr)throw new Error("bad secret key size")}function yr(){var r,n;for(n=0;n<arguments.length;n++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[n])))throw new TypeError("unexpected type "+r+", use Uint8Array")}function sr(r){for(var n=0;n<r.length;n++)r[n]=0}var lr=function(r,n){this.hi=0|r,this.lo=0|n},hr=function(r){var n,e=new Float64Array(16);if(r)for(n=0;n<r.length;n++)e[n]=r[n];return e},gr=function(){throw new Error("no PRNG")},vr=new Uint8Array(16),br=new Uint8Array(32);br[0]=9;var pr=hr(),_r=hr([1]),Ar=hr([56129,1]),Ur=hr([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),Er=hr([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),dr=hr([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),xr=hr([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),mr=hr([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),Br=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),Sr=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]),Kr=_,Tr=A,Yr=[new lr(1116352408,3609767458),new lr(1899447441,602891725),new lr(3049323471,3964484399),new lr(3921009573,2173295548),new lr(961987163,4081628472),new lr(1508970993,3053834265),new lr(2453635748,2937671579),new lr(2870763221,3664609560),new lr(3624381080,2734883394),new lr(310598401,1164996542),new lr(607225278,1323610764),new lr(1426881987,3590304994),new lr(1925078388,4068182383),new lr(2162078206,991336113),new lr(2614888103,633803317),new lr(3248222580,3479774868),new lr(3835390401,2666613458),new lr(4022224774,944711139),new lr(264347078,2341262773),new lr(604807628,2007800933),new lr(770255983,1495990901),new lr(1249150122,1856431235),new lr(1555081692,3175218132),new lr(1996064986,2198950837),new lr(2554220882,3999719339),new lr(2821834349,766784016),new lr(2952996808,2566594879),new lr(3210313671,3203337956),new lr(3336571891,1034457026),new lr(3584528711,2466948901),new lr(113926993,3758326383),new lr(338241895,168717936),new lr(666307205,1188179964),new lr(773529912,1546045734),new lr(1294757372,1522805485),new lr(1396182291,2643833823),new lr(1695183700,2343527390),new lr(1986661051,1014477480),new lr(2177026350,1206759142),new lr(2456956037,344077627),new lr(2730485921,1290863460),new lr(2820302411,3158454273),new lr(3259730800,3505952657),new lr(3345764771,106217008),new lr(3516065817,3606008344),new lr(3600352804,1432725776),new lr(4094571909,1467031594),new lr(275423344,851169720),new lr(430227734,3100823752),new lr(506948616,1363258195),new lr(659060556,3750685593),new lr(883997877,3785050280),new lr(958139571,3318307427),new lr(1322822218,3812723403),new lr(1537002063,2003034995),new lr(1747873779,3602036899),new lr(1955562222,1575990012),new lr(2024104815,1125592928),new lr(2227730452,2716904306),new lr(2361852424,442776044),new lr(2428436474,593698344),new lr(2756734187,3733110249),new lr(3204031479,2999351573),new lr(3329325298,3815920427),new lr(3391569614,3928383900),new lr(3515267271,566280711),new lr(3940187606,3454069534),new lr(4118630271,4000239992),new lr(116418474,1914138554),new lr(174292421,2731055270),new lr(289380356,3203993006),new lr(460393269,320620315),new lr(685471733,587496836),new lr(852142971,1086792851),new lr(1017036298,365543100),new lr(1126000580,2618297676),new lr(1288033470,3409855158),new lr(1501505948,4234509866),new lr(1607167915,987167468),new lr(1816402316,1246189591)],Lr=new Uint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]),kr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),zr=32,Rr=24,Pr=32,Or=16,Fr=32,Nr=32,Cr=32,Mr=32,Gr=32,Zr=Rr,jr=Pr,qr=Or,Ir=64,Vr=32,Xr=64,Dr=32,Hr=64;r.lowlevel={crypto_core_hsalsa20:y,crypto_stream_xor:g,crypto_stream:h,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:l,crypto_onetimeauth:b,crypto_onetimeauth_verify:p,crypto_verify_16:f,crypto_verify_32:u,crypto_secretbox:_,crypto_secretbox_open:A,crypto_scalarmult:R,crypto_scalarmult_base:P,crypto_box_beforenm:F,crypto_box_afternm:Kr,crypto_box:N,crypto_box_open:C,crypto_box_keypair:O,crypto_hash:Q,crypto_sign:ar,crypto_sign_keypair:tr,crypto_sign_open:ur,crypto_secretbox_KEYBYTES:zr,crypto_secretbox_NONCEBYTES:Rr,crypto_secretbox_ZEROBYTES:Pr,crypto_secretbox_BOXZEROBYTES:Or,crypto_scalarmult_BYTES:Fr,crypto_scalarmult_SCALARBYTES:Nr,crypto_box_PUBLICKEYBYTES:Cr,crypto_box_SECRETKEYBYTES:Mr,crypto_box_BEFORENMBYTES:Gr,crypto_box_NONCEBYTES:Zr,crypto_box_ZEROBYTES:jr,crypto_box_BOXZEROBYTES:qr,crypto_sign_BYTES:Ir,crypto_sign_PUBLICKEYBYTES:Vr,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:Dr,crypto_hash_BYTES:Hr},r.util||(r.util={},r.util.decodeUTF8=r.util.encodeUTF8=r.util.encodeBase64=r.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),r.randomBytes=function(r){var n=new Uint8Array(r);return gr(n,r),n},r.secretbox=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(Pr+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+Pr]=r[i];return _(o,t,t.length,n,e),o.subarray(Or)},r.secretbox.open=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(Or+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+Or]=r[i];return t.length<32?!1:0!==A(o,t,t.length,n,e)?!1:o.subarray(Pr)},r.secretbox.keyLength=zr,r.secretbox.nonceLength=Rr,r.secretbox.overheadLength=Or,r.scalarMult=function(r,n){if(yr(r,n),r.length!==Nr)throw new Error("bad n size");if(n.length!==Fr)throw new Error("bad p size");var e=new Uint8Array(Fr);return R(e,r,n),e},r.scalarMult.base=function(r){if(yr(r),r.length!==Nr)throw new Error("bad n size");var n=new Uint8Array(Fr);return P(n,r),n},r.scalarMult.scalarLength=Nr,r.scalarMult.groupElementLength=Fr,r.box=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox(n,e,i)},r.box.before=function(r,n){yr(r,n),wr(r,n);var e=new Uint8Array(Gr);return F(e,r,n),e},r.box.after=r.secretbox,r.box.open=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox.open(n,e,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(Cr),n=new Uint8Array(Mr);return O(r,n),{publicKey:r,secretKey:n}},r.box.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Mr)throw new Error("bad secret key size");var n=new Uint8Array(Cr);return P(n,r),{publicKey:n,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=Cr,r.box.secretKeyLength=Mr,r.box.sharedKeyLength=Gr,r.box.nonceLength=Zr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,n){if(yr(r,n),n.length!==Xr)throw new Error("bad secret key size");var e=new Uint8Array(Ir+r.length);return ar(e,r,r.length,n),e},r.sign.open=function(r,n){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(yr(r,n),n.length!==Vr)throw new Error("bad public key size");var e=new Uint8Array(r.length),t=ur(e,r,r.length,n);if(0>t)return null;for(var o=new Uint8Array(t),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached=function(n,e){for(var t=r.sign(n,e),o=new Uint8Array(Ir),i=0;i<o.length;i++)o[i]=t[i];return o},r.sign.detached.verify=function(r,n,e){if(yr(r,n,e),n.length!==Ir)throw new Error("bad signature size");if(e.length!==Vr)throw new Error("bad public key size");var t,o=new Uint8Array(Ir+r.length),i=new Uint8Array(Ir+r.length);for(t=0;Ir>t;t++)o[t]=n[t];for(t=0;t<r.length;t++)o[t+Ir]=r[t];return ur(i,o,o.length,e)>=0},r.sign.keyPair=function(){var r=new Uint8Array(Vr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(Vr),e=0;e<n.length;e++)n[e]=r[32+e];return{publicKey:n,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(yr(r),r.length!==Dr)throw new Error("bad seed size");for(var n=new Uint8Array(Vr),e=new Uint8Array(Xr),t=0;32>t;t++)e[t]=r[t];return tr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=Vr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Ir,r.hash=function(r){yr(r);var n=new Uint8Array(Hr);return Q(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){return yr(r,n),0===r.length||0===n.length?!1:r.length!==n.length?!1:0===a(r,0,n,0,r.length)?!0:!1},r.setPRNG=function(r){gr=r},function(){var n="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(n&&n.getRandomValues){var e=65536;r.setPRNG(function(r,t){var o,i=new Uint8Array(t);for(o=0;t>o;o+=e)n.getRandomValues(i.subarray(o,o+Math.min(t-o,e)));for(o=0;t>o;o++)r[o]=i[o];sr(i)})}else"undefined"!=typeof require&&(n=require("crypto"),n&&n.randomBytes&&r.setPRNG(function(r,e){var t,o=n.randomBytes(e);for(t=0;e>t;t++)r[t]=o[t];sr(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:self.nacl=self.nacl||{}); \ No newline at end of file
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
index 147ea92c4..9e31f630b 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
@@ -2,45 +2,49 @@
"_args": [
[
{
- "raw": "tweetnacl@~0.13.0",
+ "raw": "tweetnacl@~0.14.0",
"scope": null,
"escapedName": "tweetnacl",
"name": "tweetnacl",
- "rawSpec": "~0.13.0",
- "spec": ">=0.13.0 <0.14.0",
+ "rawSpec": "~0.14.0",
+ "spec": ">=0.14.0 <0.15.0",
"type": "range"
},
"/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
]
],
- "_from": "tweetnacl@>=0.13.0 <0.14.0",
- "_id": "tweetnacl@0.13.3",
+ "_from": "tweetnacl@>=0.14.0 <0.15.0",
+ "_id": "tweetnacl@0.14.3",
"_inCache": true,
- "_installable": true,
"_location": "/request/http-signature/sshpk/tweetnacl",
- "_nodeVersion": "4.2.3",
+ "_nodeVersion": "5.6.0",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/tweetnacl-0.14.3.tgz_1459224951636_0.7403244483284652"
+ },
"_npmUser": {
"name": "dchest",
"email": "dmitry@codingrobots.com"
},
- "_npmVersion": "2.14.7",
+ "_npmVersion": "3.7.3",
"_phantomChildren": {},
"_requested": {
- "raw": "tweetnacl@~0.13.0",
+ "raw": "tweetnacl@~0.14.0",
"scope": null,
"escapedName": "tweetnacl",
"name": "tweetnacl",
- "rawSpec": "~0.13.0",
- "spec": ">=0.13.0 <0.14.0",
+ "rawSpec": "~0.14.0",
+ "spec": ">=0.14.0 <0.15.0",
"type": "range"
},
"_requiredBy": [
- "/request/http-signature/sshpk"
+ "/request/http-signature/sshpk",
+ "/request/http-signature/sshpk/bcrypt-pbkdf"
],
- "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz",
- "_shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56",
+ "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.3.tgz",
+ "_shasum": "3da382f670f25ded78d7b3d1792119bca0b7132d",
"_shrinkwrap": null,
- "_spec": "tweetnacl@~0.13.0",
+ "_spec": "tweetnacl@~0.14.0",
"_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
"author": {
"name": "TweetNaCl-js contributors"
@@ -55,23 +59,24 @@
"dependencies": {},
"description": "Port of TweetNaCl cryptographic library to JavaScript",
"devDependencies": {
- "browserify": "^10.1.3",
- "eslint": "^1.4.3",
- "faucet": "0.0.1",
+ "browserify": "^13.0.0",
+ "eslint": "^2.2.0",
+ "faucet": "^0.0.1",
"tap-browser-color": "^0.1.2",
- "tape": "^4.0.0",
- "testling": "^1.7.1",
- "uglify-js": "^2.4.21"
+ "tape": "^4.4.0",
+ "tape-run": "^2.1.3",
+ "tweetnacl-util": "^0.13.3",
+ "uglify-js": "^2.6.1"
},
"directories": {
"test": "test"
},
"dist": {
- "shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56",
- "tarball": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz"
+ "shasum": "3da382f670f25ded78d7b3d1792119bca0b7132d",
+ "tarball": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.3.tgz"
},
- "gitHead": "2bb422cb707fba4a5ec9654688564a4fb861b068",
- "homepage": "https://dchest.github.io/tweetnacl-js",
+ "gitHead": "3eb4fc544a2a1d6c0a41b98b9906288ca8b087e4",
+ "homepage": "https://tweetnacl.js.org",
"keywords": [
"crypto",
"cryptography",
@@ -86,7 +91,7 @@
"salsa20",
"signatures"
],
- "license": "Public domain",
+ "license": "SEE LICENSE IN COPYING.txt",
"main": "nacl-fast.js",
"maintainers": [
{
@@ -103,27 +108,13 @@
},
"scripts": {
"bench": "node test/benchmark/bench.js",
- "browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null",
- "browser-quick": "browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null",
"build": "uglifyjs nacl.js -c -m -o nacl.min.js && uglifyjs nacl-fast.js -c -m -o nacl-fast.min.js",
- "chrome": "browserify test/browser/testling_init.js test/*.js | testling -x google-chrome | faucet",
- "firefox": "browserify test/browser/testling_init.js test/*.js | testling -x firefox | faucet",
+ "build-test-browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null && browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null",
"lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js",
- "test": "tape test/*.js | faucet",
- "testall": "make -C test/c && tape test/*.js test/c/*.js | faucet",
- "testling": "browserify test/browser/testling_init.js test/*.js | testling | faucet"
- },
- "testling": {
- "files": "test/*.js",
- "browsers": [
- "chrome/22..latest",
- "firefox/16..latest",
- "safari/latest",
- "opera/11.0..latest",
- "iphone/6..latest",
- "ipad/6..latest",
- "android-browser/latest"
- ]
+ "test": "npm run test-node-all && npm run test-browser",
+ "test-browser": "NACL_SRC=${NACL_SRC:='nacl.min.js'} && npm run build-test-browser && cat $NACL_SRC test/browser/_bundle.js | tape-run | faucet",
+ "test-node": "tape test/*.js | faucet",
+ "test-node-all": "make -C test/c && tape test/*.js test/c/*.js | faucet"
},
- "version": "0.13.3"
+ "version": "0.14.3"
}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json b/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
index 27d297637..02ae0ac76 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
+++ b/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
@@ -14,20 +14,19 @@
]
],
"_from": "sshpk@>=1.7.0 <2.0.0",
- "_id": "sshpk@1.9.2",
+ "_id": "sshpk@1.10.1",
"_inCache": true,
- "_installable": true,
"_location": "/request/http-signature/sshpk",
"_nodeVersion": "0.12.15",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/sshpk-1.9.2.tgz_1469841656006_0.10793639998883009"
+ "tmp": "tmp/sshpk-1.10.1.tgz_1475095320582_0.4095200637821108"
},
"_npmUser": {
"name": "arekinath",
"email": "alex@cooperi.net"
},
- "_npmVersion": "2.15.8",
+ "_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
"raw": "sshpk@^1.7.0",
@@ -41,8 +40,8 @@
"_requiredBy": [
"/request/http-signature"
],
- "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.9.2.tgz",
- "_shasum": "3b41351bbad5c34ddf4bd8119937efee31a46765",
+ "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.1.tgz",
+ "_shasum": "30e1a5d329244974a1af61511339d595af6638b0",
"_shrinkwrap": null,
"_spec": "sshpk@^1.7.0",
"_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature",
@@ -74,12 +73,13 @@
"dependencies": {
"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",
"jodid25519": "^1.0.0",
"jsbn": "~0.1.0",
- "tweetnacl": "~0.13.0"
+ "tweetnacl": "~0.14.0"
},
"description": "A library for finding and using SSH public keys",
"devDependencies": {
@@ -94,13 +94,13 @@
"man": "./man/man1"
},
"dist": {
- "shasum": "3b41351bbad5c34ddf4bd8119937efee31a46765",
- "tarball": "https://registry.npmjs.org/sshpk/-/sshpk-1.9.2.tgz"
+ "shasum": "30e1a5d329244974a1af61511339d595af6638b0",
+ "tarball": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.1.tgz"
},
"engines": {
"node": ">=0.10.0"
},
- "gitHead": "a8b794384822a52eea5ed3b2f192a780b7909609",
+ "gitHead": "4212272b3889f2df155d2aa8a1a5305fe7a7d3a5",
"homepage": "https://github.com/arekinath/node-sshpk#readme",
"license": "MIT",
"main": "lib/index.js",
@@ -117,10 +117,11 @@
],
"name": "sshpk",
"optionalDependencies": {
+ "bcrypt-pbkdf": "^1.0.0",
"ecc-jsbn": "~0.1.1",
"jodid25519": "^1.0.0",
"jsbn": "~0.1.0",
- "tweetnacl": "~0.13.0"
+ "tweetnacl": "~0.14.0"
},
"readme": "ERROR: No README data found!",
"repository": {
@@ -130,5 +131,5 @@
"scripts": {
"test": "tape test/*.js"
},
- "version": "1.9.2"
+ "version": "1.10.1"
}
diff --git a/node_modules/request/node_modules/mime-types/HISTORY.md b/node_modules/request/node_modules/mime-types/HISTORY.md
index 63bd4ea0b..8c0383a61 100644
--- a/node_modules/request/node_modules/mime-types/HISTORY.md
+++ b/node_modules/request/node_modules/mime-types/HISTORY.md
@@ -1,3 +1,10 @@
+2.1.12 / 2016-09-18
+===================
+
+ * deps: mime-db@~1.24.0
+ - Add new mime types
+ - Add `audio/mp3`
+
2.1.11 / 2016-05-01
===================
diff --git a/node_modules/request/node_modules/mime-types/index.js b/node_modules/request/node_modules/mime-types/index.js
index f7008b246..9226ca584 100644
--- a/node_modules/request/node_modules/mime-types/index.js
+++ b/node_modules/request/node_modules/mime-types/index.js
@@ -46,7 +46,7 @@ populateMaps(exports.extensions, exports.types)
* @return {boolean|string}
*/
-function charset(type) {
+function charset (type) {
if (!type || typeof type !== 'string') {
return false
}
@@ -74,7 +74,7 @@ function charset(type) {
* @return {boolean|string}
*/
-function contentType(str) {
+function contentType (str) {
// TODO: should this even be in this module?
if (!str || typeof str !== 'string') {
return false
@@ -104,7 +104,7 @@ function contentType(str) {
* @return {boolean|string}
*/
-function extension(type) {
+function extension (type) {
if (!type || typeof type !== 'string') {
return false
}
@@ -129,7 +129,7 @@ function extension(type) {
* @return {boolean|string}
*/
-function lookup(path) {
+function lookup (path) {
if (!path || typeof path !== 'string') {
return false
}
@@ -151,11 +151,11 @@ function lookup(path) {
* @private
*/
-function populateMaps(extensions, types) {
+function populateMaps (extensions, types) {
// source preference (least -> most)
var preference = ['nginx', 'apache', undefined, 'iana']
- Object.keys(db).forEach(function forEachMimeType(type) {
+ Object.keys(db).forEach(function forEachMimeType (type) {
var mime = db[type]
var exts = mime.extensions
@@ -174,8 +174,8 @@ function populateMaps(extensions, types) {
var from = preference.indexOf(db[types[extension]].source)
var to = preference.indexOf(mime.source)
- if (types[extension] !== 'application/octet-stream'
- && from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {
+ if (types[extension] !== 'application/octet-stream' &&
+ from > to || (from === to && types[extension].substr(0, 12) === 'application/')) {
// skip the remapping
continue
}
diff --git a/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
index d6705ac86..d4796b55e 100644
--- a/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
+++ b/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -1,3 +1,27 @@
+1.24.0 / 2016-09-18
+===================
+
+ * Add `application/clue_info+xml`
+ * Add `application/geo+json`
+ * Add `application/lgr+xml`
+ * Add `application/vnd.amazon.mobi8-ebook`
+ * Add `application/vnd.chess-pgn`
+ * Add `application/vnd.comicbook+zip`
+ * Add `application/vnd.d2l.coursepackage1p0+zip`
+ * Add `application/vnd.espass-espass+zip`
+ * Add `application/vnd.nearst.inv+json`
+ * Add `application/vnd.oma.lwm2m+json`
+ * Add `application/vnd.oma.lwm2m+tlv`
+ * Add `application/vnd.quarantainenet`
+ * Add `application/vnd.rar`
+ * Add `audio/mp3`
+ * Add `image/dicom-rle`
+ * Add `image/emf`
+ * Add `image/jls`
+ * Add `image/wmf`
+ * Add `model/gltf+json`
+ * Add `text/vnd.ascii-art`
+
1.23.0 / 2016-05-01
===================
diff --git a/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json b/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
index 0a5a8a7bb..63b226f9c 100644
--- a/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
+++ b/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json
@@ -173,6 +173,9 @@
"application/cfw": {
"source": "iana"
},
+ "application/clue_info+xml": {
+ "source": "iana"
+ },
"application/cms": {
"source": "iana"
},
@@ -357,6 +360,10 @@
"application/framework-attributes+xml": {
"source": "iana"
},
+ "application/geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
"application/gml+xml": {
"source": "apache",
"extensions": ["gml"]
@@ -511,6 +518,9 @@
"compressible": true,
"extensions": ["jsonld"]
},
+ "application/lgr+xml": {
+ "source": "iana"
+ },
"application/link-format": {
"source": "iana"
},
@@ -1316,6 +1326,9 @@
"source": "apache",
"extensions": ["azw"]
},
+ "application/vnd.amazon.mobi8-ebook": {
+ "source": "iana"
+ },
"application/vnd.americandynamics.acc": {
"source": "iana",
"extensions": ["acc"]
@@ -1446,6 +1459,9 @@
"source": "iana",
"extensions": ["cdxml"]
},
+ "application/vnd.chess-pgn": {
+ "source": "iana"
+ },
"application/vnd.chipnuts.karaoke-mmd": {
"source": "iana",
"extensions": ["mmd"]
@@ -1495,6 +1511,9 @@
"source": "iana",
"compressible": true
},
+ "application/vnd.comicbook+zip": {
+ "source": "iana"
+ },
"application/vnd.commerce-battelle": {
"source": "iana"
},
@@ -1578,6 +1597,9 @@
"application/vnd.cybank": {
"source": "iana"
},
+ "application/vnd.d2l.coursepackage1p0+zip": {
+ "source": "iana"
+ },
"application/vnd.dart": {
"source": "iana",
"compressible": true,
@@ -1798,6 +1820,9 @@
"application/vnd.ericsson.quickcall": {
"source": "iana"
},
+ "application/vnd.espass-espass+zip": {
+ "source": "iana"
+ },
"application/vnd.eszigno3+xml": {
"source": "iana",
"extensions": ["es3","et3"]
@@ -2809,6 +2834,10 @@
"application/vnd.ncd.reference": {
"source": "iana"
},
+ "application/vnd.nearst.inv+json": {
+ "source": "iana",
+ "compressible": true
+ },
"application/vnd.nervana": {
"source": "iana"
},
@@ -3115,6 +3144,13 @@
"application/vnd.oma.group-usage-list+xml": {
"source": "iana"
},
+ "application/vnd.oma.lwm2m+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.lwm2m+tlv": {
+ "source": "iana"
+ },
"application/vnd.oma.pal+xml": {
"source": "iana"
},
@@ -3540,6 +3576,9 @@
"application/vnd.qualcomm.brew-app-res": {
"source": "iana"
},
+ "application/vnd.quarantainenet": {
+ "source": "iana"
+ },
"application/vnd.quark.quarkxpress": {
"source": "iana",
"extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"]
@@ -3598,6 +3637,9 @@
"application/vnd.rapid": {
"source": "iana"
},
+ "application/vnd.rar": {
+ "source": "iana"
+ },
"application/vnd.realvnc.bed": {
"source": "iana",
"extensions": ["bed"]
@@ -5062,6 +5104,10 @@
"audio/mobile-xmf": {
"source": "iana"
},
+ "audio/mp3": {
+ "compressible": false,
+ "extensions": ["mp3"]
+ },
"audio/mp4": {
"source": "iana",
"compressible": false,
@@ -5425,7 +5471,7 @@
"extensions": ["otf"]
},
"image/bmp": {
- "source": "apache",
+ "source": "iana",
"compressible": true,
"extensions": ["bmp"]
},
@@ -5433,6 +5479,12 @@
"source": "iana",
"extensions": ["cgm"]
},
+ "image/dicom-rle": {
+ "source": "iana"
+ },
+ "image/emf": {
+ "source": "iana"
+ },
"image/fits": {
"source": "iana"
},
@@ -5449,6 +5501,9 @@
"source": "iana",
"extensions": ["ief"]
},
+ "image/jls": {
+ "source": "iana"
+ },
"image/jp2": {
"source": "iana"
},
@@ -5619,6 +5674,9 @@
"source": "apache",
"extensions": ["webp"]
},
+ "image/wmf": {
+ "source": "iana"
+ },
"image/x-3ds": {
"source": "apache",
"extensions": ["3ds"]
@@ -5765,6 +5823,10 @@
"message/vnd.wfa.wsc": {
"source": "iana"
},
+ "model/gltf+json": {
+ "source": "iana",
+ "compressible": true
+ },
"model/iges": {
"source": "iana",
"compressible": false,
@@ -6092,6 +6154,9 @@
"text/vnd.abc": {
"source": "iana"
},
+ "text/vnd.ascii-art": {
+ "source": "iana"
+ },
"text/vnd.curl": {
"source": "iana",
"extensions": ["curl"]
diff --git a/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json b/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
index 8411c5ad0..658681bec 100644
--- a/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
+++ b/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json
@@ -2,49 +2,48 @@
"_args": [
[
{
- "raw": "mime-db@~1.23.0",
+ "raw": "mime-db@~1.24.0",
"scope": null,
"escapedName": "mime-db",
"name": "mime-db",
- "rawSpec": "~1.23.0",
- "spec": ">=1.23.0 <1.24.0",
+ "rawSpec": "~1.24.0",
+ "spec": ">=1.24.0 <1.25.0",
"type": "range"
},
"/Users/rebecca/code/npm/node_modules/request/node_modules/mime-types"
]
],
- "_from": "mime-db@>=1.23.0 <1.24.0",
- "_id": "mime-db@1.23.0",
+ "_from": "mime-db@>=1.24.0 <1.25.0",
+ "_id": "mime-db@1.24.0",
"_inCache": true,
- "_installable": true,
"_location": "/request/mime-types/mime-db",
- "_nodeVersion": "4.4.3",
+ "_nodeVersion": "4.5.0",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/mime-db-1.23.0.tgz_1462163798086_0.43938886746764183"
+ "tmp": "tmp/mime-db-1.24.0.tgz_1474198792761_0.7161959335207939"
},
"_npmUser": {
"name": "dougwilson",
"email": "doug@somethingdoug.com"
},
- "_npmVersion": "2.15.1",
+ "_npmVersion": "2.15.9",
"_phantomChildren": {},
"_requested": {
- "raw": "mime-db@~1.23.0",
+ "raw": "mime-db@~1.24.0",
"scope": null,
"escapedName": "mime-db",
"name": "mime-db",
- "rawSpec": "~1.23.0",
- "spec": ">=1.23.0 <1.24.0",
+ "rawSpec": "~1.24.0",
+ "spec": ">=1.24.0 <1.25.0",
"type": "range"
},
"_requiredBy": [
"/request/mime-types"
],
- "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz",
- "_shasum": "a31b4070adaea27d732ea333740a64d0ec9a6659",
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.24.0.tgz",
+ "_shasum": "e2d13f939f0016c6e4e9ad25a8652f126c467f0c",
"_shrinkwrap": null,
- "_spec": "mime-db@~1.23.0",
+ "_spec": "mime-db@~1.24.0",
"_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/mime-types",
"bugs": {
"url": "https://github.com/jshttp/mime-db/issues"
@@ -68,20 +67,20 @@
"dependencies": {},
"description": "Media Type Database",
"devDependencies": {
- "bluebird": "3.3.5",
+ "bluebird": "3.4.6",
"co": "4.6.0",
"cogent": "1.0.1",
- "csv-parse": "1.1.0",
+ "csv-parse": "1.1.7",
"gnode": "0.1.2",
- "istanbul": "0.4.3",
+ "istanbul": "0.4.5",
"mocha": "1.21.5",
- "raw-body": "2.1.6",
+ "raw-body": "2.1.7",
"stream-to-array": "2.3.0"
},
"directories": {},
"dist": {
- "shasum": "a31b4070adaea27d732ea333740a64d0ec9a6659",
- "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz"
+ "shasum": "e2d13f939f0016c6e4e9ad25a8652f126c467f0c",
+ "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.24.0.tgz"
},
"engines": {
"node": ">= 0.6"
@@ -93,7 +92,7 @@
"db.json",
"index.js"
],
- "gitHead": "ba0d99fd05b3bfdc2ebcd78f858c25cb7db6af41",
+ "gitHead": "9dd00b34556a8cdd6f3385f09d4989298c4b86e1",
"homepage": "https://github.com/jshttp/mime-db#readme",
"keywords": [
"mime",
@@ -130,5 +129,5 @@
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
"update": "npm run fetch && npm run build"
},
- "version": "1.23.0"
+ "version": "1.24.0"
}
diff --git a/node_modules/request/node_modules/mime-types/package.json b/node_modules/request/node_modules/mime-types/package.json
index dae8f5a70..140951c79 100644
--- a/node_modules/request/node_modules/mime-types/package.json
+++ b/node_modules/request/node_modules/mime-types/package.json
@@ -14,20 +14,19 @@
]
],
"_from": "mime-types@>=2.1.7 <2.2.0",
- "_id": "mime-types@2.1.11",
+ "_id": "mime-types@2.1.12",
"_inCache": true,
- "_installable": true,
"_location": "/request/mime-types",
- "_nodeVersion": "4.4.3",
+ "_nodeVersion": "4.5.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/mime-types-2.1.11.tgz_1462165365027_0.7217204745393246"
+ "tmp": "tmp/mime-types-2.1.12.tgz_1474237415119_0.03028594213537872"
},
"_npmUser": {
"name": "dougwilson",
"email": "doug@somethingdoug.com"
},
- "_npmVersion": "2.15.1",
+ "_npmVersion": "2.15.9",
"_phantomChildren": {},
"_requested": {
"raw": "mime-types@~2.1.7",
@@ -42,8 +41,8 @@
"/request",
"/request/form-data"
],
- "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz",
- "_shasum": "c259c471bda808a85d6cd193b430a5fae4473b3c",
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.12.tgz",
+ "_shasum": "152ba256777020dd4663f54c2e7bc26381e71729",
"_shrinkwrap": null,
"_spec": "mime-types@~2.1.7",
"_where": "/Users/rebecca/code/npm/node_modules/request",
@@ -67,17 +66,21 @@
}
],
"dependencies": {
- "mime-db": "~1.23.0"
+ "mime-db": "~1.24.0"
},
"description": "The ultimate javascript content-type utility.",
"devDependencies": {
- "istanbul": "0.4.3",
+ "eslint": "3.5.0",
+ "eslint-config-standard": "6.0.1",
+ "eslint-plugin-promise": "2.0.1",
+ "eslint-plugin-standard": "2.0.0",
+ "istanbul": "0.4.5",
"mocha": "1.21.5"
},
"directories": {},
"dist": {
- "shasum": "c259c471bda808a85d6cd193b430a5fae4473b3c",
- "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz"
+ "shasum": "152ba256777020dd4663f54c2e7bc26381e71729",
+ "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.12.tgz"
},
"engines": {
"node": ">= 0.6"
@@ -87,7 +90,7 @@
"LICENSE",
"index.js"
],
- "gitHead": "298ffcf490a5d6e60edea7bf7a69036df04846b1",
+ "gitHead": "7193a9094e2efe31da93988350bb0b32ab18b1ea",
"homepage": "https://github.com/jshttp/mime-types#readme",
"keywords": [
"mime",
@@ -116,9 +119,10 @@
"url": "git+https://github.com/jshttp/mime-types.git"
},
"scripts": {
+ "lint": "eslint **/*.js",
"test": "mocha --reporter spec test/test.js",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
},
- "version": "2.1.11"
+ "version": "2.1.12"
}
diff --git a/node_modules/request/package.json b/node_modules/request/package.json
index 8e1c5b8a1..822499736 100644
--- a/node_modules/request/package.json
+++ b/node_modules/request/package.json
@@ -2,58 +2,55 @@
"_args": [
[
{
- "raw": "request@~2.74.0",
+ "raw": "request@2.75.0",
"scope": null,
"escapedName": "request",
"name": "request",
- "rawSpec": "~2.74.0",
- "spec": ">=2.74.0 <2.75.0",
- "type": "range"
+ "rawSpec": "2.75.0",
+ "spec": "2.75.0",
+ "type": "version"
},
"/Users/rebecca/code/npm"
]
],
- "_from": "request@>=2.74.0 <2.75.0",
- "_id": "request@2.74.0",
+ "_from": "request@2.75.0",
+ "_id": "request@2.75.0",
"_inCache": true,
- "_installable": true,
"_location": "/request",
- "_nodeVersion": "6.2.2",
+ "_nodeVersion": "6.5.0",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/request-2.74.0.tgz_1469231082306_0.13140005595050752"
+ "tmp": "tmp/request-2.75.0.tgz_1474151606844_0.8052814984694123"
},
"_npmUser": {
"name": "simov",
"email": "simeonvelichkov@gmail.com"
},
- "_npmVersion": "2.15.6",
+ "_npmVersion": "2.15.9",
"_phantomChildren": {
"ansi-regex": "2.0.0",
- "inherits": "2.0.1",
+ "inherits": "2.0.3",
"strip-ansi": "3.0.1"
},
"_requested": {
- "raw": "request@~2.74.0",
+ "raw": "request@2.75.0",
"scope": null,
"escapedName": "request",
"name": "request",
- "rawSpec": "~2.74.0",
- "spec": ">=2.74.0 <2.75.0",
- "type": "range"
+ "rawSpec": "2.75.0",
+ "spec": "2.75.0",
+ "type": "version"
},
"_requiredBy": [
"#USER",
"/",
"/node-gyp",
- "/npm-registry-client",
- "/npm-registry-couchapp/couchapp",
- "/npm-registry-couchapp/couchapp/nano"
+ "/npm-registry-client"
],
- "_resolved": "https://registry.npmjs.org/request/-/request-2.74.0.tgz",
- "_shasum": "7693ca768bbb0ea5c8ce08c084a45efa05b892ab",
+ "_resolved": "https://registry.npmjs.org/request/-/request-2.75.0.tgz",
+ "_shasum": "d2b8268a286da13eaa5d01adf5d18cc90f657d93",
"_shrinkwrap": null,
- "_spec": "request@~2.74.0",
+ "_spec": "request@2.75.0",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Mikeal Rogers",
@@ -70,7 +67,7 @@
"combined-stream": "~1.0.5",
"extend": "~3.0.0",
"forever-agent": "~0.6.1",
- "form-data": "~1.0.0-rc4",
+ "form-data": "~2.0.0",
"har-validator": "~2.0.6",
"hawk": "~3.1.3",
"http-signature": "~1.1.0",
@@ -101,7 +98,7 @@
"karma-cli": "^1.0.0",
"karma-coverage": "^1.0.0",
"karma-phantomjs-launcher": "^1.0.0",
- "karma-tap": "^2.0.1",
+ "karma-tap": "^3.0.1",
"phantomjs-prebuilt": "^2.1.3",
"rimraf": "^2.2.8",
"server-destroy": "^1.0.1",
@@ -110,13 +107,20 @@
},
"directories": {},
"dist": {
- "shasum": "7693ca768bbb0ea5c8ce08c084a45efa05b892ab",
- "tarball": "https://registry.npmjs.org/request/-/request-2.74.0.tgz"
+ "shasum": "d2b8268a286da13eaa5d01adf5d18cc90f657d93",
+ "tarball": "https://registry.npmjs.org/request/-/request-2.75.0.tgz"
},
"engines": {
"node": ">=0.8.0"
},
- "gitHead": "76e82351cbc21049441b1763c6f2bbd504fa8f5a",
+ "gitHead": "e9f09c2832073858d6d988ba82a2895f36efa92d",
+ "greenkeeper": {
+ "ignore": [
+ "eslint",
+ "hawk",
+ "har-validator"
+ ]
+ },
"homepage": "https://github.com/request/request#readme",
"license": "Apache-2.0",
"main": "index.js",
@@ -158,5 +162,5 @@
"util",
"utility"
],
- "version": "2.74.0"
+ "version": "2.75.0"
}
diff --git a/node_modules/request/request.js b/node_modules/request/request.js
index 8267c1253..96a71b6ed 100644
--- a/node_modules/request/request.js
+++ b/node_modules/request/request.js
@@ -958,6 +958,10 @@ Request.prototype.onRequestResponse = function (response) {
})
responseContent.on('data', function (chunk) {
+ if (self.timing && !self.responseStarted) {
+ self.responseStartTime = (new Date()).getTime()
+ response.responseStartTime = self.responseStartTime
+ }
self._destdata = true
self.emit('data', chunk)
})