diff --git a/express-server/app.js b/express-server/app.js
index b2a50372..573a4c18 100644
--- a/express-server/app.js
+++ b/express-server/app.js
@@ -10,6 +10,8 @@ var users = require('./routes/users');
var app = express();
+
+
// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');
diff --git a/express-server/node_modules/.bin/gp12-pem b/express-server/node_modules/.bin/gp12-pem
new file mode 100644
index 00000000..a473f8f9
--- /dev/null
+++ b/express-server/node_modules/.bin/gp12-pem
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../google-p12-pem/build/src/bin/gp12-pem.js" "$@"
+ ret=$?
+else
+ node "$basedir/../google-p12-pem/build/src/bin/gp12-pem.js" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/express-server/node_modules/.bin/gp12-pem.cmd b/express-server/node_modules/.bin/gp12-pem.cmd
new file mode 100644
index 00000000..83fabf17
--- /dev/null
+++ b/express-server/node_modules/.bin/gp12-pem.cmd
@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+ "%~dp0\node.exe" "%~dp0\..\google-p12-pem\build\src\bin\gp12-pem.js" %*
+) ELSE (
+ @SETLOCAL
+ @SET PATHEXT=%PATHEXT:;.JS;=;%
+ node "%~dp0\..\google-p12-pem\build\src\bin\gp12-pem.js" %*
+)
\ No newline at end of file
diff --git a/express-server/node_modules/.bin/semver b/express-server/node_modules/.bin/semver
new file mode 100644
index 00000000..d592e693
--- /dev/null
+++ b/express-server/node_modules/.bin/semver
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../semver/bin/semver" "$@"
+ ret=$?
+else
+ node "$basedir/../semver/bin/semver" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/express-server/node_modules/.bin/semver.cmd b/express-server/node_modules/.bin/semver.cmd
new file mode 100644
index 00000000..37c00a46
--- /dev/null
+++ b/express-server/node_modules/.bin/semver.cmd
@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+ "%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %*
+) ELSE (
+ @SETLOCAL
+ @SET PATHEXT=%PATHEXT:;.JS;=;%
+ node "%~dp0\..\semver\bin\semver" %*
+)
\ No newline at end of file
diff --git a/express-server/node_modules/.bin/uuid b/express-server/node_modules/.bin/uuid
new file mode 100644
index 00000000..f3bfcf46
--- /dev/null
+++ b/express-server/node_modules/.bin/uuid
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../uuid/bin/uuid" "$@"
+ ret=$?
+else
+ node "$basedir/../uuid/bin/uuid" "$@"
+ ret=$?
+fi
+exit $ret
diff --git a/express-server/node_modules/.bin/uuid.cmd b/express-server/node_modules/.bin/uuid.cmd
new file mode 100644
index 00000000..da52d68a
--- /dev/null
+++ b/express-server/node_modules/.bin/uuid.cmd
@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+ "%~dp0\node.exe" "%~dp0\..\uuid\bin\uuid" %*
+) ELSE (
+ @SETLOCAL
+ @SET PATHEXT=%PATHEXT:;.JS;=;%
+ node "%~dp0\..\uuid\bin\uuid" %*
+)
\ No newline at end of file
diff --git a/express-server/node_modules/agent-base/.travis.yml b/express-server/node_modules/agent-base/.travis.yml
new file mode 100644
index 00000000..6ce862c6
--- /dev/null
+++ b/express-server/node_modules/agent-base/.travis.yml
@@ -0,0 +1,23 @@
+sudo: false
+
+language: node_js
+
+node_js:
+ - "4"
+ - "5"
+ - "6"
+ - "7"
+ - "8"
+ - "9"
+
+install:
+ - PATH="`npm bin`:`npm bin -g`:$PATH"
+ # Install dependencies and build
+ - npm install
+
+script:
+ # Output useful info for debugging
+ - node --version
+ - npm --version
+ # Run tests
+ - npm test
diff --git a/express-server/node_modules/agent-base/History.md b/express-server/node_modules/agent-base/History.md
new file mode 100644
index 00000000..80c88dc4
--- /dev/null
+++ b/express-server/node_modules/agent-base/History.md
@@ -0,0 +1,113 @@
+
+4.2.0 / 2018-01-15
+==================
+
+ * Add support for returning an `http.Agent` instance
+ * Optimize promisifying logic
+ * Set `timeout` to null for proper cleanup
+ * Remove Node.js <= 0.11.3 special-casing from test case
+
+4.1.2 / 2017-11-20
+==================
+
+ * test Node 9 on Travis
+ * ensure that `https.get()` uses the patched `https.request()`
+
+4.1.1 / 2017-07-20
+==================
+
+ * Correct `https.request()` with a String (#9)
+
+4.1.0 / 2017-06-26
+==================
+
+ * mix in Agent options into Request options
+ * throw when nothing is returned from agent-base callback
+ * do not modify the options object for https requests
+
+4.0.1 / 2017-06-13
+==================
+
+ * add `this` context tests and fixes
+
+4.0.0 / 2017-06-06
+==================
+
+ * drop support for Node.js < 4
+ * drop old versions of Node.js from Travis-CI
+ * specify Node.js >= 4.0.0 in `engines.node`
+ * remove more old code
+ * remove "extend" dependency
+ * remove "semver" dependency
+ * make the Promise logic a bit cleaner
+ * add async function pseudo-example to README
+ * use direct return in README example
+
+3.0.0 / 2017-06-02
+==================
+
+ * drop support for Node.js v0.8 and v0.10
+ * add support for async, Promises, and direct return
+ * add a couple `options` test cases
+ * implement a `"timeout"` option
+ * rename main file to `index.js`
+ * test Node 8 on Travis
+
+2.1.1 / 2017-05-30
+==================
+
+ * Revert [`fe2162e`](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [`270bdc9`](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7)
+
+2.1.0 / 2017-05-26
+==================
+
+ * unref is not supported for node < 0.9.1 (@pi0)
+ * add tests to dangling socket (@pi0)
+ * check unref() is supported (@pi0)
+ * fix dangling sockets problem (@pi0)
+ * add basic "ws" module tests
+ * make `Agent` be subclassable
+ * turn `addRequest()` into a named function
+ * test: Node.js v4 likes to call `cork` on the stream (#3, @tomhughes)
+ * travis: test node v4, v5, v6 and v7
+
+2.0.1 / 2015-09-10
+==================
+
+ * package: update "semver" to v5.0.1 for WebPack (#1, @vhpoet)
+
+2.0.0 / 2015-07-10
+==================
+
+ * refactor to patch Node.js core for more consistent `opts` values
+ * ensure that HTTP(s) default port numbers are always given
+ * test: use ssl-cert-snakeoil SSL certs
+ * test: add tests for arbitrary options
+ * README: add API section
+ * README: make the Agent HTTP/HTTPS generic in the example
+ * README: use SVG for Travis-CI badge
+
+1.0.2 / 2015-06-27
+==================
+
+ * agent: set `req._hadError` to true after emitting "error"
+ * package: update "mocha" to v2
+ * test: add artificial HTTP GET request test
+ * test: add artificial data events test
+ * test: fix artifical GET response test on node > v0.11.3
+ * test: use a real timeout for the async error test
+
+1.0.1 / 2013-09-09
+==================
+
+ * Fix passing an "error" object to the callback function on the first tick
+
+1.0.0 / 2013-09-09
+==================
+
+ * New API: now you pass a callback function directly
+
+0.0.1 / 2013-07-09
+==================
+
+ * Initial release
diff --git a/express-server/node_modules/agent-base/README.md b/express-server/node_modules/agent-base/README.md
new file mode 100644
index 00000000..dbeceab8
--- /dev/null
+++ b/express-server/node_modules/agent-base/README.md
@@ -0,0 +1,145 @@
+agent-base
+==========
+### Turn a function into an [`http.Agent`][http.Agent] instance
+[](https://travis-ci.org/TooTallNate/node-agent-base)
+
+This module provides an `http.Agent` generator. That is, you pass it an async
+callback function, and it returns a new `http.Agent` instance that will invoke the
+given callback function when sending outbound HTTP requests.
+
+#### Some subclasses:
+
+Here's some more interesting uses of `agent-base`.
+Send a pull request to list yours!
+
+ * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints
+ * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints
+ * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS
+ * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS (v4a) proxy `http.Agent` implementation for HTTP and HTTPS
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install agent-base
+```
+
+
+Example
+-------
+
+Here's a minimal example that creates a new `net.Socket` connection to the server
+for every HTTP request (i.e. the equivalent of `agent: false` option):
+
+```js
+var net = require('net');
+var tls = require('tls');
+var url = require('url');
+var http = require('http');
+var agent = require('agent-base');
+
+var endpoint = 'http://nodejs.org/api/';
+var parsed = url.parse(endpoint);
+
+// This is the important part!
+parsed.agent = agent(function (req, opts) {
+ var socket;
+ // `secureEndpoint` is true when using the https module
+ if (opts.secureEndpoint) {
+ socket = tls.connect(opts);
+ } else {
+ socket = net.connect(opts);
+ }
+ return socket;
+});
+
+// Everything else works just like normal...
+http.get(parsed, function (res) {
+ console.log('"response" event!', res.headers);
+ res.pipe(process.stdout);
+});
+```
+
+Returning a Promise or using an `async` function is also supported:
+
+```js
+agent(async function (req, opts) {
+ await sleep(1000);
+ // etc…
+});
+```
+
+Return another `http.Agent` instance to "pass through" the responsibility
+for that HTTP request to that agent:
+
+```js
+agent(function (req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+```
+
+
+API
+---
+
+## Agent(Function callback[, Object options]) → [http.Agent][]
+
+Creates a base `http.Agent` that will execute the callback function `callback`
+for every HTTP request that it is used as the `agent` for. The callback function
+is responsible for creating a `stream.Duplex` instance of some kind that will be
+used as the underlying socket in the HTTP request.
+
+The `options` object accepts the following properties:
+
+ * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional).
+
+The callback function should have the following signature:
+
+### callback(http.ClientRequest req, Object options, Function cb) → undefined
+
+The ClientRequest `req` can be accessed to read request headers and
+and the path, etc. The `options` object contains the options passed
+to the `http.request()`/`https.request()` function call, and is formatted
+to be directly passed to `net.connect()`/`tls.connect()`, or however
+else you want a Socket to be created. Pass the created socket to
+the callback function `cb` once created, and the HTTP request will
+continue to proceed.
+
+If the `https` module is used to invoke the HTTP request, then the
+`secureEndpoint` property on `options` _will be set to `true`_.
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
+
+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.
+
+[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent
+[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
+[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent
+[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
+[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent
diff --git a/express-server/node_modules/agent-base/index.js b/express-server/node_modules/agent-base/index.js
new file mode 100644
index 00000000..0ee6b296
--- /dev/null
+++ b/express-server/node_modules/agent-base/index.js
@@ -0,0 +1,170 @@
+'use strict';
+require('./patch-core');
+const inherits = require('util').inherits;
+const promisify = require('es6-promisify');
+const EventEmitter = require('events').EventEmitter;
+
+module.exports = Agent;
+
+function isAgent(v) {
+ return v && typeof v.addRequest === 'function';
+}
+
+/**
+ * Base `http.Agent` implementation.
+ * No pooling/keep-alive is implemented by default.
+ *
+ * @param {Function} callback
+ * @api public
+ */
+function Agent(callback, _opts) {
+ if (!(this instanceof Agent)) {
+ return new Agent(callback, _opts);
+ }
+
+ EventEmitter.call(this);
+
+ // The callback gets promisified if it has 3 parameters
+ // (i.e. it has a callback function) lazily
+ this._promisifiedCallback = false;
+
+ let opts = _opts;
+ if ('function' === typeof callback) {
+ this.callback = callback;
+ } else if (callback) {
+ opts = callback;
+ }
+
+ // timeout for the socket to be returned from the callback
+ this.timeout = (opts && opts.timeout) || null;
+
+ this.options = opts;
+}
+inherits(Agent, EventEmitter);
+
+/**
+ * Override this function in your subclass!
+ */
+Agent.prototype.callback = function callback(req, opts) {
+ throw new Error(
+ '"agent-base" has no default implementation, you must subclass and override `callback()`'
+ );
+};
+
+/**
+ * Called by node-core's "_http_client.js" module when creating
+ * a new HTTP request with this Agent instance.
+ *
+ * @api public
+ */
+Agent.prototype.addRequest = function addRequest(req, _opts) {
+ const ownOpts = Object.assign({}, _opts);
+
+ // Set default `host` for HTTP to localhost
+ if (null == ownOpts.host) {
+ ownOpts.host = 'localhost';
+ }
+
+ // Set default `port` for HTTP if none was explicitly specified
+ if (null == ownOpts.port) {
+ ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
+ }
+
+ const opts = Object.assign({}, this.options, ownOpts);
+
+ if (opts.host && opts.path) {
+ // If both a `host` and `path` are specified then it's most likely the
+ // result of a `url.parse()` call... we need to remove the `path` portion so
+ // that `net.connect()` doesn't attempt to open that as a unix socket file.
+ delete opts.path;
+ }
+
+ delete opts.agent;
+ delete opts.hostname;
+ delete opts._defaultAgent;
+ delete opts.defaultPort;
+ delete opts.createConnection;
+
+ // Hint to use "Connection: close"
+ // XXX: non-documented `http` module API :(
+ req._last = true;
+ req.shouldKeepAlive = false;
+
+ // Create the `stream.Duplex` instance
+ let timeout;
+ let timedOut = false;
+ const timeoutMs = this.timeout;
+ const freeSocket = this.freeSocket;
+
+ function onerror(err) {
+ if (req._hadError) return;
+ req.emit('error', err);
+ // For Safety. Some additional errors might fire later on
+ // and we need to make sure we don't double-fire the error event.
+ req._hadError = true;
+ }
+
+ function ontimeout() {
+ timeout = null;
+ timedOut = true;
+ const err = new Error(
+ 'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
+ );
+ err.code = 'ETIMEOUT';
+ onerror(err);
+ }
+
+ function callbackError(err) {
+ if (timedOut) return;
+ if (timeout != null) {
+ clearTimeout(timeout);
+ timeout = null;
+ }
+ onerror(err);
+ }
+
+ function onsocket(socket) {
+ if (timedOut) return;
+ if (timeout != null) {
+ clearTimeout(timeout);
+ timeout = null;
+ }
+ if (isAgent(socket)) {
+ // `socket` is actually an http.Agent instance, so relinquish
+ // responsibility for this `req` to the Agent from here on
+ socket.addRequest(req, opts);
+ } else if (socket) {
+ function onfree() {
+ freeSocket(socket, opts);
+ }
+ socket.on('free', onfree);
+ req.onSocket(socket);
+ } else {
+ const err = new Error(
+ 'no Duplex stream was returned to agent-base for `' + req.method + ' ' + req.path + '`'
+ );
+ onerror(err);
+ }
+ }
+
+ if (!this._promisifiedCallback && this.callback.length >= 3) {
+ // Legacy callback function - convert to a Promise
+ this.callback = promisify(this.callback, this);
+ this._promisifiedCallback = true;
+ }
+
+ if (timeoutMs > 0) {
+ timeout = setTimeout(ontimeout, timeoutMs);
+ }
+
+ try {
+ Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError);
+ } catch (err) {
+ Promise.reject(err).catch(callbackError);
+ }
+};
+
+Agent.prototype.freeSocket = function freeSocket(socket, opts) {
+ // TODO reuse sockets
+ socket.destroy();
+};
diff --git a/express-server/node_modules/agent-base/package.json b/express-server/node_modules/agent-base/package.json
new file mode 100644
index 00000000..c61bdf3e
--- /dev/null
+++ b/express-server/node_modules/agent-base/package.json
@@ -0,0 +1,65 @@
+{
+ "_from": "agent-base@^4.1.0",
+ "_id": "agent-base@4.2.1",
+ "_inBundle": false,
+ "_integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==",
+ "_location": "/agent-base",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "agent-base@^4.1.0",
+ "name": "agent-base",
+ "escapedName": "agent-base",
+ "rawSpec": "^4.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^4.1.0"
+ },
+ "_requiredBy": [
+ "/https-proxy-agent"
+ ],
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz",
+ "_shasum": "d89e5999f797875674c07d87f260fc41e83e8ca9",
+ "_spec": "agent-base@^4.1.0",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\https-proxy-agent",
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "bugs": {
+ "url": "https://github.com/TooTallNate/node-agent-base/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "es6-promisify": "^5.0.0"
+ },
+ "deprecated": false,
+ "description": "Turn a function into an `http.Agent` instance",
+ "devDependencies": {
+ "mocha": "^3.4.2",
+ "ws": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 4.0.0"
+ },
+ "homepage": "https://github.com/TooTallNate/node-agent-base#readme",
+ "keywords": [
+ "http",
+ "agent",
+ "base",
+ "barebones",
+ "https"
+ ],
+ "license": "MIT",
+ "main": "./index.js",
+ "name": "agent-base",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/node-agent-base.git"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec"
+ },
+ "version": "4.2.1"
+}
diff --git a/express-server/node_modules/agent-base/patch-core.js b/express-server/node_modules/agent-base/patch-core.js
new file mode 100644
index 00000000..47d26a72
--- /dev/null
+++ b/express-server/node_modules/agent-base/patch-core.js
@@ -0,0 +1,37 @@
+'use strict';
+const url = require('url');
+const https = require('https');
+
+/**
+ * This currently needs to be applied to all Node.js versions
+ * in order to determine if the `req` is an HTTP or HTTPS request.
+ *
+ * There is currently no PR attempting to move this property upstream.
+ */
+https.request = (function(request) {
+ return function(_options, cb) {
+ let options;
+ if (typeof _options === 'string') {
+ options = url.parse(_options);
+ } else {
+ options = Object.assign({}, _options);
+ }
+ if (null == options.port) {
+ options.port = 443;
+ }
+ options.secureEndpoint = true;
+ return request.call(https, options, cb);
+ };
+})(https.request);
+
+/**
+ * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the
+ * patched `https.request()`.
+ *
+ * Ref: https://github.com/nodejs/node/commit/5118f31
+ */
+https.get = function(options, cb) {
+ const req = https.request(options, cb);
+ req.end();
+ return req;
+};
diff --git a/express-server/node_modules/agent-base/test/ssl-cert-snakeoil.key b/express-server/node_modules/agent-base/test/ssl-cert-snakeoil.key
new file mode 100644
index 00000000..fd125012
--- /dev/null
+++ b/express-server/node_modules/agent-base/test/ssl-cert-snakeoil.key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr
+bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y
+b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB
+AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd
+Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x
+1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ
+5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW
+T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX
+uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N
+Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw
+h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J
+bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ
+ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg==
+-----END RSA PRIVATE KEY-----
diff --git a/express-server/node_modules/agent-base/test/ssl-cert-snakeoil.pem b/express-server/node_modules/agent-base/test/ssl-cert-snakeoil.pem
new file mode 100644
index 00000000..b115a5e9
--- /dev/null
+++ b/express-server/node_modules/agent-base/test/ssl-cert-snakeoil.pem
@@ -0,0 +1,12 @@
+-----BEGIN CERTIFICATE-----
+MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3
+NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0
+NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3
+NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB
+ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay
+OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn
+g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN
+AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4
+1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J
+QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI=
+-----END CERTIFICATE-----
diff --git a/express-server/node_modules/agent-base/test/test.js b/express-server/node_modules/agent-base/test/test.js
new file mode 100644
index 00000000..6a8ca68e
--- /dev/null
+++ b/express-server/node_modules/agent-base/test/test.js
@@ -0,0 +1,697 @@
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs');
+var url = require('url');
+var net = require('net');
+var tls = require('tls');
+var http = require('http');
+var https = require('https');
+var WebSocket = require('ws');
+var assert = require('assert');
+var events = require('events');
+var inherits = require('util').inherits;
+var Agent = require('../');
+
+var PassthroughAgent = Agent(function(req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+
+describe('Agent', function() {
+ describe('subclass', function() {
+ it('should be subclassable', function(done) {
+ function MyAgent() {
+ Agent.call(this);
+ }
+ inherits(MyAgent, Agent);
+
+ MyAgent.prototype.callback = function(req, opts, fn) {
+ assert.equal(req.path, '/foo');
+ assert.equal(req.getHeader('host'), '127.0.0.1:1234');
+ assert.equal(opts.secureEndpoint, true);
+ done();
+ };
+
+ var info = url.parse('https://127.0.0.1:1234/foo');
+ info.agent = new MyAgent();
+ https.get(info);
+ });
+ });
+ describe('options', function() {
+ it('should support an options Object as first argument', function() {
+ var agent = new Agent({ timeout: 1000 });
+ assert.equal(1000, agent.timeout);
+ });
+ it('should support an options Object as second argument', function() {
+ var agent = new Agent(function() {}, { timeout: 1000 });
+ assert.equal(1000, agent.timeout);
+ });
+ it('should be mixed in with HTTP request options', function(done) {
+ var agent = new Agent({
+ host: 'my-proxy.com',
+ port: 3128,
+ foo: 'bar'
+ });
+ agent.callback = function(req, opts, fn) {
+ assert.equal('bar', opts.foo);
+ assert.equal('a', opts.b);
+
+ // `host` and `port` are special-cases, and should always be
+ // overwritten in the request `opts` inside the agent-base callback
+ assert.equal('localhost', opts.host);
+ assert.equal(80, opts.port);
+ done();
+ };
+ var opts = {
+ b: 'a',
+ agent: agent
+ };
+ http.get(opts);
+ });
+ });
+ describe('`this` context', function() {
+ it('should be the Agent instance', function(done) {
+ var called = false;
+ var agent = new Agent();
+ agent.callback = function() {
+ called = true;
+ assert.equal(this, agent);
+ };
+ var info = url.parse('http://127.0.0.1/foo');
+ info.agent = agent;
+ var req = http.get(info);
+ req.on('error', function(err) {
+ assert(/no Duplex stream was returned/.test(err.message));
+ done();
+ });
+ });
+ it('should be the Agent instance with callback signature', function(done) {
+ var called = false;
+ var agent = new Agent();
+ agent.callback = function(req, opts, fn) {
+ called = true;
+ assert.equal(this, agent);
+ fn();
+ };
+ var info = url.parse('http://127.0.0.1/foo');
+ info.agent = agent;
+ var req = http.get(info);
+ req.on('error', function(err) {
+ assert(/no Duplex stream was returned/.test(err.message));
+ done();
+ });
+ });
+ });
+ describe('"error" event', function() {
+ it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function(
+ done
+ ) {
+ var agent = new Agent();
+ var info = url.parse('http://127.0.0.1/foo');
+ info.agent = agent;
+ var req = http.get(info);
+ req.on('error', function(err) {
+ assert.equal(
+ '"agent-base" has no default implementation, you must subclass and override `callback()`',
+ err.message
+ );
+ done();
+ });
+ });
+ it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function(
+ done
+ ) {
+ var agent = new Agent(function(req, opts, fn) {
+ fn(new Error('is this caught?'));
+ });
+ var info = url.parse('http://127.0.0.1/foo');
+ info.agent = agent;
+ var req = http.get(info);
+ req.on('error', function(err) {
+ assert.equal('is this caught?', err.message);
+ done();
+ });
+ });
+ it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function(
+ done
+ ) {
+ var agent = new Agent(function(req, opts, fn) {
+ setTimeout(function() {
+ fn(new Error('is this caught?'));
+ }, 10);
+ });
+ var info = url.parse('http://127.0.0.1/foo');
+ info.agent = agent;
+ var req = http.get(info);
+ req.on('error', function(err) {
+ assert.equal('is this caught?', err.message);
+ done();
+ });
+ });
+ });
+ describe('artificial "streams"', function() {
+ it('should send a GET request', function(done) {
+ var stream = new events.EventEmitter();
+
+ // needed for the `http` module to call .write() on the stream
+ stream.writable = true;
+
+ stream.write = function(str) {
+ assert(0 == str.indexOf('GET / HTTP/1.1'));
+ done();
+ };
+
+ // needed for `http` module in Node.js 4
+ stream.cork = function() {};
+
+ var opts = {
+ method: 'GET',
+ host: '127.0.0.1',
+ path: '/',
+ port: 80,
+ agent: new Agent(function(req, opts, fn) {
+ fn(null, stream);
+ })
+ };
+ var req = http.request(opts);
+ req.end();
+ });
+ it('should receive a GET response', function(done) {
+ var stream = new events.EventEmitter();
+ var opts = {
+ method: 'GET',
+ host: '127.0.0.1',
+ path: '/',
+ port: 80,
+ agent: new Agent(function(req, opts, fn) {
+ fn(null, stream);
+ })
+ };
+ var req = http.request(opts, function(res) {
+ assert.equal('0.9', res.httpVersion);
+ assert.equal(111, res.statusCode);
+ assert.equal('bar', res.headers.foo);
+ done();
+ });
+
+ // have to wait for the "socket" event since `http.ClientRequest`
+ // doesn't *actually* attach the listeners to the "stream" until
+ // this happens
+ req.once('socket', function() {
+ var buf = new Buffer(
+ 'HTTP/0.9 111\r\n' +
+ 'Foo: bar\r\n' +
+ 'Set-Cookie: 1\r\n' +
+ 'Set-Cookie: 2\r\n\r\n'
+ );
+ stream.emit('data', buf);
+ });
+
+ req.end();
+ });
+ });
+});
+
+describe('"http" module', function() {
+ var server;
+ var port;
+
+ // setup test HTTP server
+ before(function(done) {
+ server = http.createServer();
+ server.listen(0, function() {
+ port = server.address().port;
+ done();
+ });
+ });
+
+ // shut down test HTTP server
+ after(function(done) {
+ server.once('close', function() {
+ done();
+ });
+ server.close();
+ });
+
+ it('should work for basic HTTP requests', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts, fn) {
+ called = true;
+ var socket = net.connect(opts);
+ fn(null, socket);
+ });
+
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = agent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should support direct return in `connect()`', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts) {
+ called = true;
+ return net.connect(opts);
+ });
+
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = agent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should support returning a Promise in `connect()`', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts) {
+ return new Promise(function(resolve, reject) {
+ called = true;
+ resolve(net.connect(opts));
+ });
+ });
+
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = agent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should set the `Connection: close` response header', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts, fn) {
+ called = true;
+ var socket = net.connect(opts);
+ fn(null, socket);
+ });
+
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Url', req.url);
+ assert.equal('close', req.headers.connection);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/bar');
+ info.agent = agent;
+ http.get(info, function(res) {
+ assert.equal('/bar', res.headers['x-url']);
+ assert.equal('close', res.headers.connection);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should pass through options from `http.request()`', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
+ assert.equal('google.com', opts.host);
+ assert.equal('bar', opts.foo);
+ done();
+ });
+
+ http.get({
+ host: 'google.com',
+ foo: 'bar',
+ agent: agent
+ });
+ });
+
+ it('should default to port 80', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
+ assert.equal(80, opts.port);
+ done();
+ });
+
+ // (probably) not hitting a real HTTP server here,
+ // so no need to add a httpServer request listener
+ http.get({
+ host: '127.0.0.1',
+ path: '/foo',
+ agent: agent
+ });
+ });
+
+ it('should support the "timeout" option', function(done) {
+ // ensure we timeout after the "error" event had a chance to trigger
+ this.timeout(1000);
+ this.slow(800);
+
+ var agent = new Agent(
+ function(req, opts, fn) {
+ // this function will time out
+ },
+ { timeout: 100 }
+ );
+
+ var opts = url.parse('http://nodejs.org');
+ opts.agent = agent;
+
+ var req = http.get(opts);
+ req.once('error', function(err) {
+ assert.equal('ETIMEOUT', err.code);
+ req.abort();
+ done();
+ });
+ });
+
+ it('should free sockets after use', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
+ var socket = net.connect(opts);
+ fn(null, socket);
+ });
+
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = agent;
+ http.get(info, function(res) {
+ res.socket.emit('free');
+ assert.equal(true, res.socket.destroyed);
+ assert(gotReq);
+ done();
+ });
+ });
+
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `http.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
+});
+
+describe('"https" module', function() {
+ var server;
+ var port;
+
+ // setup test HTTPS server
+ before(function(done) {
+ var options = {
+ key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
+ cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
+ };
+ server = https.createServer(options);
+ server.listen(0, function() {
+ port = server.address().port;
+ done();
+ });
+ });
+
+ // shut down test HTTP server
+ after(function(done) {
+ server.once('close', function() {
+ done();
+ });
+ server.close();
+ });
+
+ it('should not modify the passed in Options object', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts, fn) {
+ called = true;
+ assert.equal(true, opts.secureEndpoint);
+ assert.equal(443, opts.port);
+ assert.equal('localhost', opts.host);
+ });
+ var opts = { agent: agent };
+ var req = https.request(opts);
+ assert.equal(true, called);
+ assert.equal(false, 'secureEndpoint' in opts);
+ assert.equal(false, 'port' in opts);
+ done();
+ });
+
+ it('should work with a String URL', function(done) {
+ var endpoint = 'https://127.0.0.1:' + port;
+ var req = https.get(endpoint);
+
+ // it's gonna error out since `rejectUnauthorized` is not being passed in
+ req.on('error', function(err) {
+ assert.equal(err.code, 'DEPTH_ZERO_SELF_SIGNED_CERT');
+ done();
+ });
+ });
+
+ it('should work for basic HTTPS requests', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts, fn) {
+ called = true;
+ assert(opts.secureEndpoint);
+ var socket = tls.connect(opts);
+ fn(null, socket);
+ });
+
+ // add HTTPS server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('https://127.0.0.1:' + port + '/foo');
+ info.agent = agent;
+ info.rejectUnauthorized = false;
+ https.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should pass through options from `https.request()`', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
+ assert.equal('google.com', opts.host);
+ assert.equal('bar', opts.foo);
+ done();
+ });
+
+ https.get({
+ host: 'google.com',
+ foo: 'bar',
+ agent: agent
+ });
+ });
+
+ it('should default to port 443', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
+ assert.equal(true, opts.secureEndpoint);
+ assert.equal(false, opts.rejectUnauthorized);
+ assert.equal(443, opts.port);
+ done();
+ });
+
+ // (probably) not hitting a real HTTPS server here,
+ // so no need to add a httpsServer request listener
+ https.get({
+ host: '127.0.0.1',
+ path: '/foo',
+ agent: agent,
+ rejectUnauthorized: false
+ });
+ });
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `https.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('https://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ info.rejectUnauthorized = false;
+ https.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
+});
+
+describe('"ws" server', function() {
+ var wss;
+ var server;
+ var port;
+
+ // setup test HTTP server
+ before(function(done) {
+ server = http.createServer();
+ wss = new WebSocket.Server({ server: server });
+ server.listen(0, function() {
+ port = server.address().port;
+ done();
+ });
+ });
+
+ // shut down test HTTP server
+ after(function(done) {
+ server.once('close', function() {
+ done();
+ });
+ server.close();
+ });
+
+ it('should work for basic WebSocket connections', function(done) {
+ function onconnection(ws) {
+ ws.on('message', function(data) {
+ assert.equal('ping', data);
+ ws.send('pong');
+ });
+ }
+ wss.on('connection', onconnection);
+
+ var agent = new Agent(function(req, opts, fn) {
+ var socket = net.connect(opts);
+ fn(null, socket);
+ });
+
+ var client = new WebSocket('ws://127.0.0.1:' + port + '/', {
+ agent: agent
+ });
+
+ client.on('open', function() {
+ client.send('ping');
+ });
+
+ client.on('message', function(data) {
+ assert.equal('pong', data);
+ client.close();
+ wss.removeListener('connection', onconnection);
+ done();
+ });
+ });
+});
+
+describe('"wss" server', function() {
+ var wss;
+ var server;
+ var port;
+
+ // setup test HTTP server
+ before(function(done) {
+ var options = {
+ key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
+ cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
+ };
+ server = https.createServer(options);
+ wss = new WebSocket.Server({ server: server });
+ server.listen(0, function() {
+ port = server.address().port;
+ done();
+ });
+ });
+
+ // shut down test HTTP server
+ after(function(done) {
+ server.once('close', function() {
+ done();
+ });
+ server.close();
+ });
+
+ it('should work for secure WebSocket connections', function(done) {
+ function onconnection(ws) {
+ ws.on('message', function(data) {
+ assert.equal('ping', data);
+ ws.send('pong');
+ });
+ }
+ wss.on('connection', onconnection);
+
+ var agent = new Agent(function(req, opts, fn) {
+ var socket = tls.connect(opts);
+ fn(null, socket);
+ });
+
+ var client = new WebSocket('wss://127.0.0.1:' + port + '/', {
+ agent: agent,
+ rejectUnauthorized: false
+ });
+
+ client.on('open', function() {
+ client.send('ping');
+ });
+
+ client.on('message', function(data) {
+ assert.equal('pong', data);
+ client.close();
+ wss.removeListener('connection', onconnection);
+ done();
+ });
+ });
+});
diff --git a/express-server/node_modules/axios/CHANGELOG.md b/express-server/node_modules/axios/CHANGELOG.md
new file mode 100644
index 00000000..d336ec10
--- /dev/null
+++ b/express-server/node_modules/axios/CHANGELOG.md
@@ -0,0 +1,245 @@
+# Changelog
+
+### 0.18.0 (Feb 19, 2018)
+
+- Adding support for UNIX Sockets when running with Node.js ([#1070](https://github.com/axios/axios/pull/1070))
+- Fixing typings ([#1177](https://github.com/axios/axios/pull/1177)):
+ - AxiosRequestConfig.proxy: allows type false
+ - AxiosProxyConfig: added auth field
+- Adding function signature in AxiosInstance interface so AxiosInstance can be invoked ([#1192](https://github.com/axios/axios/pull/1192), [#1254](https://github.com/axios/axios/pull/1254))
+- Allowing maxContentLength to pass through to redirected calls as maxBodyLength in follow-redirects config ([#1287](https://github.com/axios/axios/pull/1287))
+- Fixing configuration when using an instance - method can now be set ([#1342](https://github.com/axios/axios/pull/1342))
+
+
+### 0.17.1 (Nov 11, 2017)
+
+- Fixing issue with web workers ([#1160](https://github.com/axios/axios/pull/1160))
+- Allowing overriding transport ([#1080](https://github.com/axios/axios/pull/1080))
+- Updating TypeScript typings ([#1165](https://github.com/axios/axios/pull/1165), [#1125](https://github.com/axios/axios/pull/1125), [#1131](https://github.com/axios/axios/pull/1131))
+
+### 0.17.0 (Oct 21, 2017)
+
+- **BREAKING** Fixing issue with `baseURL` and interceptors ([#950](https://github.com/axios/axios/pull/950))
+- **BREAKING** Improving handing of duplicate headers ([#874](https://github.com/axios/axios/pull/874))
+- Adding support for disabling proxies ([#691](https://github.com/axios/axios/pull/691))
+- Updating TypeScript typings with generic type parameters ([#1061](https://github.com/axios/axios/pull/1061))
+
+### 0.16.2 (Jun 3, 2017)
+
+- Fixing issue with including `buffer` in bundle ([#887](https://github.com/axios/axios/pull/887))
+- Including underlying request in errors ([#830](https://github.com/axios/axios/pull/830))
+- Convert `method` to lowercase ([#930](https://github.com/axios/axios/pull/930))
+
+### 0.16.1 (Apr 8, 2017)
+
+- Improving HTTP adapter to return last request in case of redirects ([#828](https://github.com/axios/axios/pull/828))
+- Updating `follow-redirects` dependency ([#829](https://github.com/axios/axios/pull/829))
+- Adding support for passing `Buffer` in node ([#773](https://github.com/axios/axios/pull/773))
+
+### 0.16.0 (Mar 31, 2017)
+
+- **BREAKING** Removing `Promise` from axios typings in favor of built-in type declarations ([#480](https://github.com/axios/axios/issues/480))
+- Adding `options` shortcut method ([#461](https://github.com/axios/axios/pull/461))
+- Fixing issue with using `responseType: 'json'` in browsers incompatible with XHR Level 2 ([#654](https://github.com/axios/axios/pull/654))
+- Improving React Native detection ([#731](https://github.com/axios/axios/pull/731))
+- Fixing `combineURLs` to support empty `relativeURL` ([#581](https://github.com/axios/axios/pull/581))
+- Removing `PROTECTION_PREFIX` support ([#561](https://github.com/axios/axios/pull/561))
+
+### 0.15.3 (Nov 27, 2016)
+
+- Fixing issue with custom instances and global defaults ([#443](https://github.com/axios/axios/issues/443))
+- Renaming `axios.d.ts` to `index.d.ts` ([#519](https://github.com/axios/axios/issues/519))
+- Adding `get`, `head`, and `delete` to `defaults.headers` ([#509](https://github.com/axios/axios/issues/509))
+- Fixing issue with `btoa` and IE ([#507](https://github.com/axios/axios/issues/507))
+- Adding support for proxy authentication ([#483](https://github.com/axios/axios/pull/483))
+- Improving HTTP adapter to use `http` protocol by default ([#493](https://github.com/axios/axios/pull/493))
+- Fixing proxy issues ([#491](https://github.com/axios/axios/pull/491))
+
+### 0.15.2 (Oct 17, 2016)
+
+- Fixing issue with calling `cancel` after response has been received ([#482](https://github.com/axios/axios/issues/482))
+
+### 0.15.1 (Oct 14, 2016)
+
+- Fixing issue with UMD ([#485](https://github.com/axios/axios/issues/485))
+
+### 0.15.0 (Oct 10, 2016)
+
+- Adding cancellation support ([#452](https://github.com/axios/axios/pull/452))
+- Moving default adapter to global defaults ([#437](https://github.com/axios/axios/pull/437))
+- Fixing issue with `file` URI scheme ([#440](https://github.com/axios/axios/pull/440))
+- Fixing issue with `params` objects that have no prototype ([#445](https://github.com/axios/axios/pull/445))
+
+### 0.14.0 (Aug 27, 2016)
+
+- **BREAKING** Updating TypeScript definitions ([#419](https://github.com/axios/axios/pull/419))
+- **BREAKING** Replacing `agent` option with `httpAgent` and `httpsAgent` ([#387](https://github.com/axios/axios/pull/387))
+- **BREAKING** Splitting `progress` event handlers into `onUploadProgress` and `onDownloadProgress` ([#423](https://github.com/axios/axios/pull/423))
+- Adding support for `http_proxy` and `https_proxy` environment variables ([#366](https://github.com/axios/axios/pull/366))
+- Fixing issue with `auth` config option and `Authorization` header ([#397](https://github.com/axios/axios/pull/397))
+- Don't set XSRF header if `xsrfCookieName` is `null` ([#406](https://github.com/axios/axios/pull/406))
+
+### 0.13.1 (Jul 16, 2016)
+
+- Fixing issue with response data not being transformed on error ([#378](https://github.com/axios/axios/issues/378))
+
+### 0.13.0 (Jul 13, 2016)
+
+- **BREAKING** Improved error handling ([#345](https://github.com/axios/axios/pull/345))
+- **BREAKING** Response transformer now invoked in dispatcher not adapter ([10eb238](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e))
+- **BREAKING** Request adapters now return a `Promise` ([157efd5](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a))
+- Fixing issue with `withCredentials` not being overwritten ([#343](https://github.com/axios/axios/issues/343))
+- Fixing regression with request transformer being called before request interceptor ([#352](https://github.com/axios/axios/issues/352))
+- Fixing custom instance defaults ([#341](https://github.com/axios/axios/issues/341))
+- Fixing instances created from `axios.create` to have same API as default axios ([#217](https://github.com/axios/axios/issues/217))
+
+### 0.12.0 (May 31, 2016)
+
+- Adding support for `URLSearchParams` ([#317](https://github.com/axios/axios/pull/317))
+- Adding `maxRedirects` option ([#307](https://github.com/axios/axios/pull/307))
+
+### 0.11.1 (May 17, 2016)
+
+- Fixing IE CORS support ([#313](https://github.com/axios/axios/pull/313))
+- Fixing detection of `FormData` ([#325](https://github.com/axios/axios/pull/325))
+- Adding `Axios` class to exports ([#321](https://github.com/axios/axios/pull/321))
+
+### 0.11.0 (Apr 26, 2016)
+
+- Adding support for Stream with HTTP adapter ([#296](https://github.com/axios/axios/pull/296))
+- Adding support for custom HTTP status code error ranges ([#308](https://github.com/axios/axios/pull/308))
+- Fixing issue with ArrayBuffer ([#299](https://github.com/axios/axios/pull/299))
+
+### 0.10.0 (Apr 20, 2016)
+
+- Fixing issue with some requests sending `undefined` instead of `null` ([#250](https://github.com/axios/axios/pull/250))
+- Fixing basic auth for HTTP adapter ([#252](https://github.com/axios/axios/pull/252))
+- Fixing request timeout for XHR adapter ([#227](https://github.com/axios/axios/pull/227))
+- Fixing IE8 support by using `onreadystatechange` instead of `onload` ([#249](https://github.com/axios/axios/pull/249))
+- Fixing IE9 cross domain requests ([#251](https://github.com/axios/axios/pull/251))
+- Adding `maxContentLength` option ([#275](https://github.com/axios/axios/pull/275))
+- Fixing XHR support for WebWorker environment ([#279](https://github.com/axios/axios/pull/279))
+- Adding request instance to response ([#200](https://github.com/axios/axios/pull/200))
+
+### 0.9.1 (Jan 24, 2016)
+
+- Improving handling of request timeout in node ([#124](https://github.com/axios/axios/issues/124))
+- Fixing network errors not rejecting ([#205](https://github.com/axios/axios/pull/205))
+- Fixing issue with IE rejecting on HTTP 204 ([#201](https://github.com/axios/axios/issues/201))
+- Fixing host/port when following redirects ([#198](https://github.com/axios/axios/pull/198))
+
+### 0.9.0 (Jan 18, 2016)
+
+- Adding support for custom adapters
+- Fixing Content-Type header being removed when data is false ([#195](https://github.com/axios/axios/pull/195))
+- Improving XDomainRequest implementation ([#185](https://github.com/axios/axios/pull/185))
+- Improving config merging and order of precedence ([#183](https://github.com/axios/axios/pull/183))
+- Fixing XDomainRequest support for only <= IE9 ([#182](https://github.com/axios/axios/pull/182))
+
+### 0.8.1 (Dec 14, 2015)
+
+- Adding support for passing XSRF token for cross domain requests when using `withCredentials` ([#168](https://github.com/axios/axios/pull/168))
+- Fixing error with format of basic auth header ([#178](https://github.com/axios/axios/pull/173))
+- Fixing error with JSON payloads throwing `InvalidStateError` in some cases ([#174](https://github.com/axios/axios/pull/174))
+
+### 0.8.0 (Dec 11, 2015)
+
+- Adding support for creating instances of axios ([#123](https://github.com/axios/axios/pull/123))
+- Fixing http adapter to use `Buffer` instead of `String` in case of `responseType === 'arraybuffer'` ([#128](https://github.com/axios/axios/pull/128))
+- Adding support for using custom parameter serializer with `paramsSerializer` option ([#121](https://github.com/axios/axios/pull/121))
+- Fixing issue in IE8 caused by `forEach` on `arguments` ([#127](https://github.com/axios/axios/pull/127))
+- Adding support for following redirects in node ([#146](https://github.com/axios/axios/pull/146))
+- Adding support for transparent decompression if `content-encoding` is set ([#149](https://github.com/axios/axios/pull/149))
+- Adding support for transparent XDomainRequest to handle cross domain requests in IE9 ([#140](https://github.com/axios/axios/pull/140))
+- Adding support for HTTP basic auth via Authorization header ([#167](https://github.com/axios/axios/pull/167))
+- Adding support for baseURL option ([#160](https://github.com/axios/axios/pull/160))
+
+### 0.7.0 (Sep 29, 2015)
+
+- Fixing issue with minified bundle in IE8 ([#87](https://github.com/axios/axios/pull/87))
+- Adding support for passing agent in node ([#102](https://github.com/axios/axios/pull/102))
+- Adding support for returning result from `axios.spread` for chaining ([#106](https://github.com/axios/axios/pull/106))
+- Fixing typescript definition ([#105](https://github.com/axios/axios/pull/105))
+- Fixing default timeout config for node ([#112](https://github.com/axios/axios/pull/112))
+- Adding support for use in web workers, and react-native ([#70](https://github.com/axios/axios/issue/70)), ([#98](https://github.com/axios/axios/pull/98))
+- Adding support for fetch like API `axios(url[, config])` ([#116](https://github.com/axios/axios/issues/116))
+
+### 0.6.0 (Sep 21, 2015)
+
+- Removing deprecated success/error aliases
+- Fixing issue with array params not being properly encoded ([#49](https://github.com/axios/axios/pull/49))
+- Fixing issue with User-Agent getting overridden ([#69](https://github.com/axios/axios/issues/69))
+- Adding support for timeout config ([#56](https://github.com/axios/axios/issues/56))
+- Removing es6-promise dependency
+- Fixing issue preventing `length` to be used as a parameter ([#91](https://github.com/axios/axios/pull/91))
+- Fixing issue with IE8 ([#85](https://github.com/axios/axios/pull/85))
+- Converting build to UMD
+
+### 0.5.4 (Apr 08, 2015)
+
+- Fixing issue with FormData not being sent ([#53](https://github.com/axios/axios/issues/53))
+
+### 0.5.3 (Apr 07, 2015)
+
+- Using JSON.parse unconditionally when transforming response string ([#55](https://github.com/axios/axios/issues/55))
+
+### 0.5.2 (Mar 13, 2015)
+
+- Adding support for `statusText` in response ([#46](https://github.com/axios/axios/issues/46))
+
+### 0.5.1 (Mar 10, 2015)
+
+- Fixing issue using strict mode ([#45](https://github.com/axios/axios/issues/45))
+- Fixing issue with standalone build ([#47](https://github.com/axios/axios/issues/47))
+
+### 0.5.0 (Jan 23, 2015)
+
+- Adding support for intercepetors ([#14](https://github.com/axios/axios/issues/14))
+- Updating es6-promise dependency
+
+### 0.4.2 (Dec 10, 2014)
+
+- Fixing issue with `Content-Type` when using `FormData` ([#22](https://github.com/axios/axios/issues/22))
+- Adding support for TypeScript ([#25](https://github.com/axios/axios/issues/25))
+- Fixing issue with standalone build ([#29](https://github.com/axios/axios/issues/29))
+- Fixing issue with verbs needing to be capitalized in some browsers ([#30](https://github.com/axios/axios/issues/30))
+
+### 0.4.1 (Oct 15, 2014)
+
+- Adding error handling to request for node.js ([#18](https://github.com/axios/axios/issues/18))
+
+### 0.4.0 (Oct 03, 2014)
+
+- Adding support for `ArrayBuffer` and `ArrayBufferView` ([#10](https://github.com/axios/axios/issues/10))
+- Adding support for utf-8 for node.js ([#13](https://github.com/axios/axios/issues/13))
+- Adding support for SSL for node.js ([#12](https://github.com/axios/axios/issues/12))
+- Fixing incorrect `Content-Type` header ([#9](https://github.com/axios/axios/issues/9))
+- Adding standalone build without bundled es6-promise ([#11](https://github.com/axios/axios/issues/11))
+- Deprecating `success`/`error` in favor of `then`/`catch`
+
+### 0.3.1 (Sep 16, 2014)
+
+- Fixing missing post body when using node.js ([#3](https://github.com/axios/axios/issues/3))
+
+### 0.3.0 (Sep 16, 2014)
+
+- Fixing `success` and `error` to properly receive response data as individual arguments ([#8](https://github.com/axios/axios/issues/8))
+- Updating `then` and `catch` to receive response data as a single object ([#6](https://github.com/axios/axios/issues/6))
+- Fixing issue with `all` not working ([#7](https://github.com/axios/axios/issues/7))
+
+### 0.2.2 (Sep 14, 2014)
+
+- Fixing bundling with browserify ([#4](https://github.com/axios/axios/issues/4))
+
+### 0.2.1 (Sep 12, 2014)
+
+- Fixing build problem causing ridiculous file sizes
+
+### 0.2.0 (Sep 12, 2014)
+
+- Adding support for `all` and `spread`
+- Adding support for node.js ([#1](https://github.com/axios/axios/issues/1))
+
+### 0.1.0 (Aug 29, 2014)
+
+- Initial release
diff --git a/express-server/node_modules/axios/LICENSE b/express-server/node_modules/axios/LICENSE
new file mode 100644
index 00000000..d36c80ef
--- /dev/null
+++ b/express-server/node_modules/axios/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014-present Matt Zabriskie
+
+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/express-server/node_modules/axios/README.md b/express-server/node_modules/axios/README.md
new file mode 100644
index 00000000..ec78817c
--- /dev/null
+++ b/express-server/node_modules/axios/README.md
@@ -0,0 +1,625 @@
+# axios
+
+[](https://www.npmjs.org/package/axios)
+[](https://travis-ci.org/axios/axios)
+[](https://coveralls.io/r/mzabriskie/axios)
+[](http://npm-stat.com/charts.html?package=axios)
+[](https://gitter.im/mzabriskie/axios)
+[](https://www.codetriage.com/axios/axios)
+
+Promise based HTTP client for the browser and node.js
+
+## Features
+
+- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser
+- Make [http](http://nodejs.org/api/http.html) requests from node.js
+- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API
+- Intercept request and response
+- Transform request and response data
+- Cancel requests
+- Automatic transforms for JSON data
+- Client side support for protecting against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
+
+## Browser Support
+
+ |  |  |  |  |  |
+--- | --- | --- | --- | --- | --- |
+Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 8+ ✔ |
+
+[](https://saucelabs.com/u/axios)
+
+## Installing
+
+Using npm:
+
+```bash
+$ npm install axios
+```
+
+Using bower:
+
+```bash
+$ bower install axios
+```
+
+Using cdn:
+
+```html
+
+```
+
+## Example
+
+Performing a `GET` request
+
+```js
+// Make a request for a user with a given ID
+axios.get('/user?ID=12345')
+ .then(function (response) {
+ console.log(response);
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+
+// Optionally the request above could also be done as
+axios.get('/user', {
+ params: {
+ ID: 12345
+ }
+ })
+ .then(function (response) {
+ console.log(response);
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+```
+
+Performing a `POST` request
+
+```js
+axios.post('/user', {
+ firstName: 'Fred',
+ lastName: 'Flintstone'
+ })
+ .then(function (response) {
+ console.log(response);
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+```
+
+Performing multiple concurrent requests
+
+```js
+function getUserAccount() {
+ return axios.get('/user/12345');
+}
+
+function getUserPermissions() {
+ return axios.get('/user/12345/permissions');
+}
+
+axios.all([getUserAccount(), getUserPermissions()])
+ .then(axios.spread(function (acct, perms) {
+ // Both requests are now complete
+ }));
+```
+
+## axios API
+
+Requests can be made by passing the relevant config to `axios`.
+
+##### axios(config)
+
+```js
+// Send a POST request
+axios({
+ method: 'post',
+ url: '/user/12345',
+ data: {
+ firstName: 'Fred',
+ lastName: 'Flintstone'
+ }
+});
+```
+
+```js
+// GET request for remote image
+axios({
+ method:'get',
+ url:'http://bit.ly/2mTM3nY',
+ responseType:'stream'
+})
+ .then(function(response) {
+ response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))
+});
+```
+
+##### axios(url[, config])
+
+```js
+// Send a GET request (default method)
+axios('/user/12345');
+```
+
+### Request method aliases
+
+For convenience aliases have been provided for all supported request methods.
+
+##### axios.request(config)
+##### axios.get(url[, config])
+##### axios.delete(url[, config])
+##### axios.head(url[, config])
+##### axios.options(url[, config])
+##### axios.post(url[, data[, config]])
+##### axios.put(url[, data[, config]])
+##### axios.patch(url[, data[, config]])
+
+###### NOTE
+When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config.
+
+### Concurrency
+
+Helper functions for dealing with concurrent requests.
+
+##### axios.all(iterable)
+##### axios.spread(callback)
+
+### Creating an instance
+
+You can create a new instance of axios with a custom config.
+
+##### axios.create([config])
+
+```js
+var instance = axios.create({
+ baseURL: 'https://some-domain.com/api/',
+ timeout: 1000,
+ headers: {'X-Custom-Header': 'foobar'}
+});
+```
+
+### Instance methods
+
+The available instance methods are listed below. The specified config will be merged with the instance config.
+
+##### axios#request(config)
+##### axios#get(url[, config])
+##### axios#delete(url[, config])
+##### axios#head(url[, config])
+##### axios#options(url[, config])
+##### axios#post(url[, data[, config]])
+##### axios#put(url[, data[, config]])
+##### axios#patch(url[, data[, config]])
+
+## Request Config
+
+These are the available config options for making requests. Only the `url` is required. Requests will default to `GET` if `method` is not specified.
+
+```js
+{
+ // `url` is the server URL that will be used for the request
+ url: '/user',
+
+ // `method` is the request method to be used when making the request
+ method: 'get', // default
+
+ // `baseURL` will be prepended to `url` unless `url` is absolute.
+ // It can be convenient to set `baseURL` for an instance of axios to pass relative URLs
+ // to methods of that instance.
+ baseURL: 'https://some-domain.com/api/',
+
+ // `transformRequest` allows changes to the request data before it is sent to the server
+ // This is only applicable for request methods 'PUT', 'POST', and 'PATCH'
+ // The last function in the array must return a string or an instance of Buffer, ArrayBuffer,
+ // FormData or Stream
+ // You may modify the headers object.
+ transformRequest: [function (data, headers) {
+ // Do whatever you want to transform the data
+
+ return data;
+ }],
+
+ // `transformResponse` allows changes to the response data to be made before
+ // it is passed to then/catch
+ transformResponse: [function (data) {
+ // Do whatever you want to transform the data
+
+ return data;
+ }],
+
+ // `headers` are custom headers to be sent
+ headers: {'X-Requested-With': 'XMLHttpRequest'},
+
+ // `params` are the URL parameters to be sent with the request
+ // Must be a plain object or a URLSearchParams object
+ params: {
+ ID: 12345
+ },
+
+ // `paramsSerializer` is an optional function in charge of serializing `params`
+ // (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/)
+ paramsSerializer: function(params) {
+ return Qs.stringify(params, {arrayFormat: 'brackets'})
+ },
+
+ // `data` is the data to be sent as the request body
+ // Only applicable for request methods 'PUT', 'POST', and 'PATCH'
+ // When no `transformRequest` is set, must be of one of the following types:
+ // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams
+ // - Browser only: FormData, File, Blob
+ // - Node only: Stream, Buffer
+ data: {
+ firstName: 'Fred'
+ },
+
+ // `timeout` specifies the number of milliseconds before the request times out.
+ // If the request takes longer than `timeout`, the request will be aborted.
+ timeout: 1000,
+
+ // `withCredentials` indicates whether or not cross-site Access-Control requests
+ // should be made using credentials
+ withCredentials: false, // default
+
+ // `adapter` allows custom handling of requests which makes testing easier.
+ // Return a promise and supply a valid response (see lib/adapters/README.md).
+ adapter: function (config) {
+ /* ... */
+ },
+
+ // `auth` indicates that HTTP Basic auth should be used, and supplies credentials.
+ // This will set an `Authorization` header, overwriting any existing
+ // `Authorization` custom headers you have set using `headers`.
+ auth: {
+ username: 'janedoe',
+ password: 's00pers3cret'
+ },
+
+ // `responseType` indicates the type of data that the server will respond with
+ // options are 'arraybuffer', 'blob', 'document', 'json', 'text', 'stream'
+ responseType: 'json', // default
+
+ // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token
+ xsrfCookieName: 'XSRF-TOKEN', // default
+
+ // `xsrfHeaderName` is the name of the http header that carries the xsrf token value
+ xsrfHeaderName: 'X-XSRF-TOKEN', // default
+
+ // `onUploadProgress` allows handling of progress events for uploads
+ onUploadProgress: function (progressEvent) {
+ // Do whatever you want with the native progress event
+ },
+
+ // `onDownloadProgress` allows handling of progress events for downloads
+ onDownloadProgress: function (progressEvent) {
+ // Do whatever you want with the native progress event
+ },
+
+ // `maxContentLength` defines the max size of the http response content allowed
+ maxContentLength: 2000,
+
+ // `validateStatus` defines whether to resolve or reject the promise for a given
+ // HTTP response status code. If `validateStatus` returns `true` (or is set to `null`
+ // or `undefined`), the promise will be resolved; otherwise, the promise will be
+ // rejected.
+ validateStatus: function (status) {
+ return status >= 200 && status < 300; // default
+ },
+
+ // `maxRedirects` defines the maximum number of redirects to follow in node.js.
+ // If set to 0, no redirects will be followed.
+ maxRedirects: 5, // default
+
+ // `socketPath` defines a UNIX Socket to be used in node.js.
+ // e.g. '/var/run/docker.sock' to send requests to the docker daemon.
+ // Only either `socketPath` or `proxy` can be specified.
+ // If both are specified, `socketPath` is used.
+ socketPath: null, // default
+
+ // `httpAgent` and `httpsAgent` define a custom agent to be used when performing http
+ // and https requests, respectively, in node.js. This allows options to be added like
+ // `keepAlive` that are not enabled by default.
+ httpAgent: new http.Agent({ keepAlive: true }),
+ httpsAgent: new https.Agent({ keepAlive: true }),
+
+ // 'proxy' defines the hostname and port of the proxy server
+ // Use `false` to disable proxies, ignoring environment variables.
+ // `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and
+ // supplies credentials.
+ // This will set an `Proxy-Authorization` header, overwriting any existing
+ // `Proxy-Authorization` custom headers you have set using `headers`.
+ proxy: {
+ host: '127.0.0.1',
+ port: 9000,
+ auth: {
+ username: 'mikeymike',
+ password: 'rapunz3l'
+ }
+ },
+
+ // `cancelToken` specifies a cancel token that can be used to cancel the request
+ // (see Cancellation section below for details)
+ cancelToken: new CancelToken(function (cancel) {
+ })
+}
+```
+
+## Response Schema
+
+The response for a request contains the following information.
+
+```js
+{
+ // `data` is the response that was provided by the server
+ data: {},
+
+ // `status` is the HTTP status code from the server response
+ status: 200,
+
+ // `statusText` is the HTTP status message from the server response
+ statusText: 'OK',
+
+ // `headers` the headers that the server responded with
+ // All header names are lower cased
+ headers: {},
+
+ // `config` is the config that was provided to `axios` for the request
+ config: {},
+
+ // `request` is the request that generated this response
+ // It is the last ClientRequest instance in node.js (in redirects)
+ // and an XMLHttpRequest instance the browser
+ request: {}
+}
+```
+
+When using `then`, you will receive the response as follows:
+
+```js
+axios.get('/user/12345')
+ .then(function(response) {
+ console.log(response.data);
+ console.log(response.status);
+ console.log(response.statusText);
+ console.log(response.headers);
+ console.log(response.config);
+ });
+```
+
+When using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as second parameter of `then`, the response will be available through the `error` object as explained in the [Handling Errors](#handling-errors) section.
+
+## Config Defaults
+
+You can specify config defaults that will be applied to every request.
+
+### Global axios defaults
+
+```js
+axios.defaults.baseURL = 'https://api.example.com';
+axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
+axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
+```
+
+### Custom instance defaults
+
+```js
+// Set config defaults when creating the instance
+var instance = axios.create({
+ baseURL: 'https://api.example.com'
+});
+
+// Alter defaults after instance has been created
+instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
+```
+
+### Config order of precedence
+
+Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/master/lib/defaults.js#L28), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example.
+
+```js
+// Create an instance using the config defaults provided by the library
+// At this point the timeout config value is `0` as is the default for the library
+var instance = axios.create();
+
+// Override timeout default for the library
+// Now all requests will wait 2.5 seconds before timing out
+instance.defaults.timeout = 2500;
+
+// Override timeout for this request as it's known to take a long time
+instance.get('/longRequest', {
+ timeout: 5000
+});
+```
+
+## Interceptors
+
+You can intercept requests or responses before they are handled by `then` or `catch`.
+
+```js
+// Add a request interceptor
+axios.interceptors.request.use(function (config) {
+ // Do something before request is sent
+ return config;
+ }, function (error) {
+ // Do something with request error
+ return Promise.reject(error);
+ });
+
+// Add a response interceptor
+axios.interceptors.response.use(function (response) {
+ // Do something with response data
+ return response;
+ }, function (error) {
+ // Do something with response error
+ return Promise.reject(error);
+ });
+```
+
+If you may need to remove an interceptor later you can.
+
+```js
+var myInterceptor = axios.interceptors.request.use(function () {/*...*/});
+axios.interceptors.request.eject(myInterceptor);
+```
+
+You can add interceptors to a custom instance of axios.
+
+```js
+var instance = axios.create();
+instance.interceptors.request.use(function () {/*...*/});
+```
+
+## Handling Errors
+
+```js
+axios.get('/user/12345')
+ .catch(function (error) {
+ if (error.response) {
+ // The request was made and the server responded with a status code
+ // that falls out of the range of 2xx
+ console.log(error.response.data);
+ console.log(error.response.status);
+ console.log(error.response.headers);
+ } else if (error.request) {
+ // The request was made but no response was received
+ // `error.request` is an instance of XMLHttpRequest in the browser and an instance of
+ // http.ClientRequest in node.js
+ console.log(error.request);
+ } else {
+ // Something happened in setting up the request that triggered an Error
+ console.log('Error', error.message);
+ }
+ console.log(error.config);
+ });
+```
+
+You can define a custom HTTP status code error range using the `validateStatus` config option.
+
+```js
+axios.get('/user/12345', {
+ validateStatus: function (status) {
+ return status < 500; // Reject only if the status code is greater than or equal to 500
+ }
+})
+```
+
+## Cancellation
+
+You can cancel a request using a *cancel token*.
+
+> The axios cancel token API is based on the withdrawn [cancelable promises proposal](https://github.com/tc39/proposal-cancelable-promises).
+
+You can create a cancel token using the `CancelToken.source` factory as shown below:
+
+```js
+var CancelToken = axios.CancelToken;
+var source = CancelToken.source();
+
+axios.get('/user/12345', {
+ cancelToken: source.token
+}).catch(function(thrown) {
+ if (axios.isCancel(thrown)) {
+ console.log('Request canceled', thrown.message);
+ } else {
+ // handle error
+ }
+});
+
+axios.post('/user/12345', {
+ name: 'new name'
+}, {
+ cancelToken: source.token
+})
+
+// cancel the request (the message parameter is optional)
+source.cancel('Operation canceled by the user.');
+```
+
+You can also create a cancel token by passing an executor function to the `CancelToken` constructor:
+
+```js
+var CancelToken = axios.CancelToken;
+var cancel;
+
+axios.get('/user/12345', {
+ cancelToken: new CancelToken(function executor(c) {
+ // An executor function receives a cancel function as a parameter
+ cancel = c;
+ })
+});
+
+// cancel the request
+cancel();
+```
+
+> Note: you can cancel several requests with the same cancel token.
+
+## Using application/x-www-form-urlencoded format
+
+By default, axios serializes JavaScript objects to `JSON`. To send data in the `application/x-www-form-urlencoded` format instead, you can use one of the following options.
+
+### Browser
+
+In a browser, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API as follows:
+
+```js
+var params = new URLSearchParams();
+params.append('param1', 'value1');
+params.append('param2', 'value2');
+axios.post('/foo', params);
+```
+
+> Note that `URLSearchParams` is not supported by all browsers (see [caniuse.com](http://www.caniuse.com/#feat=urlsearchparams)), but there is a [polyfill](https://github.com/WebReflection/url-search-params) available (make sure to polyfill the global environment).
+
+Alternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library:
+
+```js
+var qs = require('qs');
+axios.post('/foo', qs.stringify({ 'bar': 123 }));
+```
+
+### Node.js
+
+In node.js, you can use the [`querystring`](https://nodejs.org/api/querystring.html) module as follows:
+
+```js
+var querystring = require('querystring');
+axios.post('http://something.com/', querystring.stringify({ foo: 'bar' }));
+```
+
+You can also use the [`qs`](https://github.com/ljharb/qs) library.
+
+## Semver
+
+Until axios reaches a `1.0` release, breaking changes will be released with a new minor version. For example `0.5.1`, and `0.5.4` will have the same API, but `0.6.0` will have breaking changes.
+
+## Promises
+
+axios depends on a native ES6 Promise implementation to be [supported](http://caniuse.com/promises).
+If your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise).
+
+## TypeScript
+axios includes [TypeScript](http://typescriptlang.org) definitions.
+```typescript
+import axios from 'axios';
+axios.get('/user?ID=12345');
+```
+
+## Resources
+
+* [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
+* [Upgrade Guide](https://github.com/axios/axios/blob/master/UPGRADE_GUIDE.md)
+* [Ecosystem](https://github.com/axios/axios/blob/master/ECOSYSTEM.md)
+* [Contributing Guide](https://github.com/axios/axios/blob/master/CONTRIBUTING.md)
+* [Code of Conduct](https://github.com/axios/axios/blob/master/CODE_OF_CONDUCT.md)
+
+## Credits
+
+axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) provided in [Angular](https://angularjs.org/). Ultimately axios is an effort to provide a standalone `$http`-like service for use outside of Angular.
+
+## License
+
+MIT
diff --git a/express-server/node_modules/axios/UPGRADE_GUIDE.md b/express-server/node_modules/axios/UPGRADE_GUIDE.md
new file mode 100644
index 00000000..eedb0492
--- /dev/null
+++ b/express-server/node_modules/axios/UPGRADE_GUIDE.md
@@ -0,0 +1,162 @@
+# Upgrade Guide
+
+### 0.15.x -> 0.16.0
+
+#### `Promise` Type Declarations
+
+The `Promise` type declarations have been removed from the axios typings in favor of the built-in type declarations. If you use axios in a TypeScript project that targets `ES5`, please make sure to include the `es2015.promise` lib. Please see [this post](https://blog.mariusschulz.com/2016/11/25/typescript-2-0-built-in-type-declarations) for details.
+
+### 0.13.x -> 0.14.0
+
+#### TypeScript Definitions
+
+The axios TypeScript definitions have been updated to match the axios API and use the ES2015 module syntax.
+
+Please use the following `import` statement to import axios in TypeScript:
+
+```typescript
+import axios from 'axios';
+
+axios.get('/foo')
+ .then(response => console.log(response))
+ .catch(error => console.log(error));
+```
+
+#### `agent` Config Option
+
+The `agent` config option has been replaced with two new options: `httpAgent` and `httpsAgent`. Please use them instead.
+
+```js
+{
+ // Define a custom agent for HTTP
+ httpAgent: new http.Agent({ keepAlive: true }),
+ // Define a custom agent for HTTPS
+ httpsAgent: new https.Agent({ keepAlive: true })
+}
+```
+
+#### `progress` Config Option
+
+The `progress` config option has been replaced with the `onUploadProgress` and `onDownloadProgress` options.
+
+```js
+{
+ // Define a handler for upload progress events
+ onUploadProgress: function (progressEvent) {
+ // ...
+ },
+
+ // Define a handler for download progress events
+ onDownloadProgress: function (progressEvent) {
+ // ...
+ }
+}
+```
+
+### 0.12.x -> 0.13.0
+
+The `0.13.0` release contains several changes to custom adapters and error handling.
+
+#### Error Handling
+
+Previous to this release an error could either be a server response with bad status code or an actual `Error`. With this release Promise will always reject with an `Error`. In the case that a response was received, the `Error` will also include the response.
+
+```js
+axios.get('/user/12345')
+ .catch((error) => {
+ console.log(error.message);
+ console.log(error.code); // Not always specified
+ console.log(error.config); // The config that was used to make the request
+ console.log(error.response); // Only available if response was received from the server
+ });
+```
+
+#### Request Adapters
+
+This release changes a few things about how request adapters work. Please take note if you are using your own custom adapter.
+
+1. Response transformer is now called outside of adapter.
+2. Request adapter returns a `Promise`.
+
+This means that you no longer need to invoke `transformData` on response data. You will also no longer receive `resolve` and `reject` as arguments in your adapter.
+
+Previous code:
+
+```js
+function myAdapter(resolve, reject, config) {
+ var response = {
+ data: transformData(
+ responseData,
+ responseHeaders,
+ config.transformResponse
+ ),
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders
+ };
+ settle(resolve, reject, response);
+}
+```
+
+New code:
+
+```js
+function myAdapter(config) {
+ return new Promise(function (resolve, reject) {
+ var response = {
+ data: responseData,
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders
+ };
+ settle(resolve, reject, response);
+ });
+}
+```
+
+See the related commits for more details:
+- [Response transformers](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e)
+- [Request adapter Promise](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a)
+
+### 0.5.x -> 0.6.0
+
+The `0.6.0` release contains mostly bug fixes, but there are a couple things to be aware of when upgrading.
+
+#### ES6 Promise Polyfill
+
+Up until the `0.6.0` release ES6 `Promise` was being polyfilled using [es6-promise](https://github.com/jakearchibald/es6-promise). With this release, the polyfill has been removed, and you will need to supply it yourself if your environment needs it.
+
+```js
+require('es6-promise').polyfill();
+var axios = require('axios');
+```
+
+This will polyfill the global environment, and only needs to be done once.
+
+#### `axios.success`/`axios.error`
+
+The `success`, and `error` aliases were deprectated in [0.4.0](https://github.com/axios/axios/blob/master/CHANGELOG.md#040-oct-03-2014). As of this release they have been removed entirely. Instead please use `axios.then`, and `axios.catch` respectively.
+
+```js
+axios.get('some/url')
+ .then(function (res) {
+ /* ... */
+ })
+ .catch(function (err) {
+ /* ... */
+ });
+```
+
+#### UMD
+
+Previous versions of axios shipped with an AMD, CommonJS, and Global build. This has all been rolled into a single UMD build.
+
+```js
+// AMD
+require(['bower_components/axios/dist/axios'], function (axios) {
+ /* ... */
+});
+
+// CommonJS
+var axios = require('axios/dist/axios');
+```
diff --git a/express-server/node_modules/axios/dist/axios.js b/express-server/node_modules/axios/dist/axios.js
new file mode 100644
index 00000000..cf8b39db
--- /dev/null
+++ b/express-server/node_modules/axios/dist/axios.js
@@ -0,0 +1,1603 @@
+/* axios v0.18.0 | (c) 2018 by Matt Zabriskie */
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["axios"] = factory();
+ else
+ root["axios"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+/******/
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ module.exports = __webpack_require__(1);
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var utils = __webpack_require__(2);
+ var bind = __webpack_require__(3);
+ var Axios = __webpack_require__(5);
+ var defaults = __webpack_require__(6);
+
+ /**
+ * Create an instance of Axios
+ *
+ * @param {Object} defaultConfig The default config for the instance
+ * @return {Axios} A new instance of Axios
+ */
+ function createInstance(defaultConfig) {
+ var context = new Axios(defaultConfig);
+ var instance = bind(Axios.prototype.request, context);
+
+ // Copy axios.prototype to instance
+ utils.extend(instance, Axios.prototype, context);
+
+ // Copy context to instance
+ utils.extend(instance, context);
+
+ return instance;
+ }
+
+ // Create the default instance to be exported
+ var axios = createInstance(defaults);
+
+ // Expose Axios class to allow class inheritance
+ axios.Axios = Axios;
+
+ // Factory for creating new instances
+ axios.create = function create(instanceConfig) {
+ return createInstance(utils.merge(defaults, instanceConfig));
+ };
+
+ // Expose Cancel & CancelToken
+ axios.Cancel = __webpack_require__(23);
+ axios.CancelToken = __webpack_require__(24);
+ axios.isCancel = __webpack_require__(20);
+
+ // Expose all/spread
+ axios.all = function all(promises) {
+ return Promise.all(promises);
+ };
+ axios.spread = __webpack_require__(25);
+
+ module.exports = axios;
+
+ // Allow use of default import syntax in TypeScript
+ module.exports.default = axios;
+
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var bind = __webpack_require__(3);
+ var isBuffer = __webpack_require__(4);
+
+ /*global toString:true*/
+
+ // utils is a library of generic helper functions non-specific to axios
+
+ var toString = Object.prototype.toString;
+
+ /**
+ * Determine if a value is an Array
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is an Array, otherwise false
+ */
+ function isArray(val) {
+ return toString.call(val) === '[object Array]';
+ }
+
+ /**
+ * Determine if a value is an ArrayBuffer
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
+ */
+ function isArrayBuffer(val) {
+ return toString.call(val) === '[object ArrayBuffer]';
+ }
+
+ /**
+ * Determine if a value is a FormData
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is an FormData, otherwise false
+ */
+ function isFormData(val) {
+ return (typeof FormData !== 'undefined') && (val instanceof FormData);
+ }
+
+ /**
+ * Determine if a value is a view on an ArrayBuffer
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
+ */
+ function isArrayBufferView(val) {
+ var result;
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
+ result = ArrayBuffer.isView(val);
+ } else {
+ result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
+ }
+ return result;
+ }
+
+ /**
+ * Determine if a value is a String
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a String, otherwise false
+ */
+ function isString(val) {
+ return typeof val === 'string';
+ }
+
+ /**
+ * Determine if a value is a Number
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a Number, otherwise false
+ */
+ function isNumber(val) {
+ return typeof val === 'number';
+ }
+
+ /**
+ * Determine if a value is undefined
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if the value is undefined, otherwise false
+ */
+ function isUndefined(val) {
+ return typeof val === 'undefined';
+ }
+
+ /**
+ * Determine if a value is an Object
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is an Object, otherwise false
+ */
+ function isObject(val) {
+ return val !== null && typeof val === 'object';
+ }
+
+ /**
+ * Determine if a value is a Date
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a Date, otherwise false
+ */
+ function isDate(val) {
+ return toString.call(val) === '[object Date]';
+ }
+
+ /**
+ * Determine if a value is a File
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+ function isFile(val) {
+ return toString.call(val) === '[object File]';
+ }
+
+ /**
+ * Determine if a value is a Blob
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a Blob, otherwise false
+ */
+ function isBlob(val) {
+ return toString.call(val) === '[object Blob]';
+ }
+
+ /**
+ * Determine if a value is a Function
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a Function, otherwise false
+ */
+ function isFunction(val) {
+ return toString.call(val) === '[object Function]';
+ }
+
+ /**
+ * Determine if a value is a Stream
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a Stream, otherwise false
+ */
+ function isStream(val) {
+ return isObject(val) && isFunction(val.pipe);
+ }
+
+ /**
+ * Determine if a value is a URLSearchParams object
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
+ */
+ function isURLSearchParams(val) {
+ return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
+ }
+
+ /**
+ * Trim excess whitespace off the beginning and end of a string
+ *
+ * @param {String} str The String to trim
+ * @returns {String} The String freed of excess whitespace
+ */
+ function trim(str) {
+ return str.replace(/^\s*/, '').replace(/\s*$/, '');
+ }
+
+ /**
+ * Determine if we're running in a standard browser environment
+ *
+ * This allows axios to run in a web worker, and react-native.
+ * Both environments support XMLHttpRequest, but not fully standard globals.
+ *
+ * web workers:
+ * typeof window -> undefined
+ * typeof document -> undefined
+ *
+ * react-native:
+ * navigator.product -> 'ReactNative'
+ */
+ function isStandardBrowserEnv() {
+ if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
+ return false;
+ }
+ return (
+ typeof window !== 'undefined' &&
+ typeof document !== 'undefined'
+ );
+ }
+
+ /**
+ * Iterate over an Array or an Object invoking a function for each item.
+ *
+ * If `obj` is an Array callback will be called passing
+ * the value, index, and complete array for each item.
+ *
+ * If 'obj' is an Object callback will be called passing
+ * the value, key, and complete object for each property.
+ *
+ * @param {Object|Array} obj The object to iterate
+ * @param {Function} fn The callback to invoke for each item
+ */
+ function forEach(obj, fn) {
+ // Don't bother if no value provided
+ if (obj === null || typeof obj === 'undefined') {
+ return;
+ }
+
+ // Force an array if not already something iterable
+ if (typeof obj !== 'object') {
+ /*eslint no-param-reassign:0*/
+ obj = [obj];
+ }
+
+ if (isArray(obj)) {
+ // Iterate over array values
+ for (var i = 0, l = obj.length; i < l; i++) {
+ fn.call(null, obj[i], i, obj);
+ }
+ } else {
+ // Iterate over object keys
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ fn.call(null, obj[key], key, obj);
+ }
+ }
+ }
+ }
+
+ /**
+ * Accepts varargs expecting each argument to be an object, then
+ * immutably merges the properties of each object and returns result.
+ *
+ * When multiple objects contain the same key the later object in
+ * the arguments list will take precedence.
+ *
+ * Example:
+ *
+ * ```js
+ * var result = merge({foo: 123}, {foo: 456});
+ * console.log(result.foo); // outputs 456
+ * ```
+ *
+ * @param {Object} obj1 Object to merge
+ * @returns {Object} Result of all merge properties
+ */
+ function merge(/* obj1, obj2, obj3, ... */) {
+ var result = {};
+ function assignValue(val, key) {
+ if (typeof result[key] === 'object' && typeof val === 'object') {
+ result[key] = merge(result[key], val);
+ } else {
+ result[key] = val;
+ }
+ }
+
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ forEach(arguments[i], assignValue);
+ }
+ return result;
+ }
+
+ /**
+ * Extends object a by mutably adding to it the properties of object b.
+ *
+ * @param {Object} a The object to be extended
+ * @param {Object} b The object to copy properties from
+ * @param {Object} thisArg The object to bind function to
+ * @return {Object} The resulting value of object a
+ */
+ function extend(a, b, thisArg) {
+ forEach(b, function assignValue(val, key) {
+ if (thisArg && typeof val === 'function') {
+ a[key] = bind(val, thisArg);
+ } else {
+ a[key] = val;
+ }
+ });
+ return a;
+ }
+
+ module.exports = {
+ isArray: isArray,
+ isArrayBuffer: isArrayBuffer,
+ isBuffer: isBuffer,
+ isFormData: isFormData,
+ isArrayBufferView: isArrayBufferView,
+ isString: isString,
+ isNumber: isNumber,
+ isObject: isObject,
+ isUndefined: isUndefined,
+ isDate: isDate,
+ isFile: isFile,
+ isBlob: isBlob,
+ isFunction: isFunction,
+ isStream: isStream,
+ isURLSearchParams: isURLSearchParams,
+ isStandardBrowserEnv: isStandardBrowserEnv,
+ forEach: forEach,
+ merge: merge,
+ extend: extend,
+ trim: trim
+ };
+
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports) {
+
+ 'use strict';
+
+ module.exports = function bind(fn, thisArg) {
+ return function wrap() {
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
+ return fn.apply(thisArg, args);
+ };
+ };
+
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports) {
+
+ /*!
+ * Determine if an object is a Buffer
+ *
+ * @author Feross Aboukhadijeh
+ * @license MIT
+ */
+
+ // The _isBuffer check is for Safari 5-7 support, because it's missing
+ // Object.prototype.constructor. Remove this eventually
+ module.exports = function (obj) {
+ return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
+ }
+
+ function isBuffer (obj) {
+ return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
+ }
+
+ // For Node v0.10 support. Remove this eventually.
+ function isSlowBuffer (obj) {
+ return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
+ }
+
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var defaults = __webpack_require__(6);
+ var utils = __webpack_require__(2);
+ var InterceptorManager = __webpack_require__(17);
+ var dispatchRequest = __webpack_require__(18);
+
+ /**
+ * Create a new instance of Axios
+ *
+ * @param {Object} instanceConfig The default config for the instance
+ */
+ function Axios(instanceConfig) {
+ this.defaults = instanceConfig;
+ this.interceptors = {
+ request: new InterceptorManager(),
+ response: new InterceptorManager()
+ };
+ }
+
+ /**
+ * Dispatch a request
+ *
+ * @param {Object} config The config specific for this request (merged with this.defaults)
+ */
+ Axios.prototype.request = function request(config) {
+ /*eslint no-param-reassign:0*/
+ // Allow for axios('example/url'[, config]) a la fetch API
+ if (typeof config === 'string') {
+ config = utils.merge({
+ url: arguments[0]
+ }, arguments[1]);
+ }
+
+ config = utils.merge(defaults, {method: 'get'}, this.defaults, config);
+ config.method = config.method.toLowerCase();
+
+ // Hook up interceptors middleware
+ var chain = [dispatchRequest, undefined];
+ var promise = Promise.resolve(config);
+
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
+ chain.unshift(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
+ chain.push(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ while (chain.length) {
+ promise = promise.then(chain.shift(), chain.shift());
+ }
+
+ return promise;
+ };
+
+ // Provide aliases for supported request methods
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
+ /*eslint func-names:0*/
+ Axios.prototype[method] = function(url, config) {
+ return this.request(utils.merge(config || {}, {
+ method: method,
+ url: url
+ }));
+ };
+ });
+
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
+ /*eslint func-names:0*/
+ Axios.prototype[method] = function(url, data, config) {
+ return this.request(utils.merge(config || {}, {
+ method: method,
+ url: url,
+ data: data
+ }));
+ };
+ });
+
+ module.exports = Axios;
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var utils = __webpack_require__(2);
+ var normalizeHeaderName = __webpack_require__(7);
+
+ var DEFAULT_CONTENT_TYPE = {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+ };
+
+ function setContentTypeIfUnset(headers, value) {
+ if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
+ headers['Content-Type'] = value;
+ }
+ }
+
+ function getDefaultAdapter() {
+ var adapter;
+ if (typeof XMLHttpRequest !== 'undefined') {
+ // For browsers use XHR adapter
+ adapter = __webpack_require__(8);
+ } else if (typeof process !== 'undefined') {
+ // For node use HTTP adapter
+ adapter = __webpack_require__(8);
+ }
+ return adapter;
+ }
+
+ var defaults = {
+ adapter: getDefaultAdapter(),
+
+ transformRequest: [function transformRequest(data, headers) {
+ normalizeHeaderName(headers, 'Content-Type');
+ if (utils.isFormData(data) ||
+ utils.isArrayBuffer(data) ||
+ utils.isBuffer(data) ||
+ utils.isStream(data) ||
+ utils.isFile(data) ||
+ utils.isBlob(data)
+ ) {
+ return data;
+ }
+ if (utils.isArrayBufferView(data)) {
+ return data.buffer;
+ }
+ if (utils.isURLSearchParams(data)) {
+ setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
+ return data.toString();
+ }
+ if (utils.isObject(data)) {
+ setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
+ return JSON.stringify(data);
+ }
+ return data;
+ }],
+
+ transformResponse: [function transformResponse(data) {
+ /*eslint no-param-reassign:0*/
+ if (typeof data === 'string') {
+ try {
+ data = JSON.parse(data);
+ } catch (e) { /* Ignore */ }
+ }
+ return data;
+ }],
+
+ /**
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
+ * timeout is not created.
+ */
+ timeout: 0,
+
+ xsrfCookieName: 'XSRF-TOKEN',
+ xsrfHeaderName: 'X-XSRF-TOKEN',
+
+ maxContentLength: -1,
+
+ validateStatus: function validateStatus(status) {
+ return status >= 200 && status < 300;
+ }
+ };
+
+ defaults.headers = {
+ common: {
+ 'Accept': 'application/json, text/plain, */*'
+ }
+ };
+
+ utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
+ defaults.headers[method] = {};
+ });
+
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
+ });
+
+ module.exports = defaults;
+
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var utils = __webpack_require__(2);
+
+ module.exports = function normalizeHeaderName(headers, normalizedName) {
+ utils.forEach(headers, function processHeader(value, name) {
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
+ headers[normalizedName] = value;
+ delete headers[name];
+ }
+ });
+ };
+
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var utils = __webpack_require__(2);
+ var settle = __webpack_require__(9);
+ var buildURL = __webpack_require__(12);
+ var parseHeaders = __webpack_require__(13);
+ var isURLSameOrigin = __webpack_require__(14);
+ var createError = __webpack_require__(10);
+ var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(15);
+
+ module.exports = function xhrAdapter(config) {
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
+ var requestData = config.data;
+ var requestHeaders = config.headers;
+
+ if (utils.isFormData(requestData)) {
+ delete requestHeaders['Content-Type']; // Let the browser set it
+ }
+
+ var request = new XMLHttpRequest();
+ var loadEvent = 'onreadystatechange';
+ var xDomain = false;
+
+ // For IE 8/9 CORS support
+ // Only supports POST and GET calls and doesn't returns the response headers.
+ // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.
+ if (("production") !== 'test' &&
+ typeof window !== 'undefined' &&
+ window.XDomainRequest && !('withCredentials' in request) &&
+ !isURLSameOrigin(config.url)) {
+ request = new window.XDomainRequest();
+ loadEvent = 'onload';
+ xDomain = true;
+ request.onprogress = function handleProgress() {};
+ request.ontimeout = function handleTimeout() {};
+ }
+
+ // HTTP basic authentication
+ if (config.auth) {
+ var username = config.auth.username || '';
+ var password = config.auth.password || '';
+ requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
+ }
+
+ request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
+
+ // Set the request timeout in MS
+ request.timeout = config.timeout;
+
+ // Listen for ready state
+ request[loadEvent] = function handleLoad() {
+ if (!request || (request.readyState !== 4 && !xDomain)) {
+ return;
+ }
+
+ // The request errored out and we didn't get a response, this will be
+ // handled by onerror instead
+ // With one exception: request that using file: protocol, most browsers
+ // will return status as 0 even though it's a successful request
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
+ return;
+ }
+
+ // Prepare the response
+ var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
+ var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
+ var response = {
+ data: responseData,
+ // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)
+ status: request.status === 1223 ? 204 : request.status,
+ statusText: request.status === 1223 ? 'No Content' : request.statusText,
+ headers: responseHeaders,
+ config: config,
+ request: request
+ };
+
+ settle(resolve, reject, response);
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle low level network errors
+ request.onerror = function handleError() {
+ // Real errors are hidden from us by the browser
+ // onerror should only fire if it's a network error
+ reject(createError('Network Error', config, null, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle timeout
+ request.ontimeout = function handleTimeout() {
+ reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',
+ request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Add xsrf header
+ // This is only done if running in a standard browser environment.
+ // Specifically not if we're in a web worker, or react-native.
+ if (utils.isStandardBrowserEnv()) {
+ var cookies = __webpack_require__(16);
+
+ // Add xsrf header
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?
+ cookies.read(config.xsrfCookieName) :
+ undefined;
+
+ if (xsrfValue) {
+ requestHeaders[config.xsrfHeaderName] = xsrfValue;
+ }
+ }
+
+ // Add headers to the request
+ if ('setRequestHeader' in request) {
+ utils.forEach(requestHeaders, function setRequestHeader(val, key) {
+ if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
+ // Remove Content-Type if data is undefined
+ delete requestHeaders[key];
+ } else {
+ // Otherwise add header to the request
+ request.setRequestHeader(key, val);
+ }
+ });
+ }
+
+ // Add withCredentials to request if needed
+ if (config.withCredentials) {
+ request.withCredentials = true;
+ }
+
+ // Add responseType to request if needed
+ if (config.responseType) {
+ try {
+ request.responseType = config.responseType;
+ } catch (e) {
+ // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
+ // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
+ if (config.responseType !== 'json') {
+ throw e;
+ }
+ }
+ }
+
+ // Handle progress if needed
+ if (typeof config.onDownloadProgress === 'function') {
+ request.addEventListener('progress', config.onDownloadProgress);
+ }
+
+ // Not all browsers support upload events
+ if (typeof config.onUploadProgress === 'function' && request.upload) {
+ request.upload.addEventListener('progress', config.onUploadProgress);
+ }
+
+ if (config.cancelToken) {
+ // Handle cancellation
+ config.cancelToken.promise.then(function onCanceled(cancel) {
+ if (!request) {
+ return;
+ }
+
+ request.abort();
+ reject(cancel);
+ // Clean up request
+ request = null;
+ });
+ }
+
+ if (requestData === undefined) {
+ requestData = null;
+ }
+
+ // Send the request
+ request.send(requestData);
+ });
+ };
+
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var createError = __webpack_require__(10);
+
+ /**
+ * Resolve or reject a Promise based on response status.
+ *
+ * @param {Function} resolve A function that resolves the promise.
+ * @param {Function} reject A function that rejects the promise.
+ * @param {object} response The response.
+ */
+ module.exports = function settle(resolve, reject, response) {
+ var validateStatus = response.config.validateStatus;
+ // Note: status is not exposed by XDomainRequest
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
+ resolve(response);
+ } else {
+ reject(createError(
+ 'Request failed with status code ' + response.status,
+ response.config,
+ null,
+ response.request,
+ response
+ ));
+ }
+ };
+
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var enhanceError = __webpack_require__(11);
+
+ /**
+ * Create an Error with the specified message, config, error code, request and response.
+ *
+ * @param {string} message The error message.
+ * @param {Object} config The config.
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
+ * @param {Object} [request] The request.
+ * @param {Object} [response] The response.
+ * @returns {Error} The created error.
+ */
+ module.exports = function createError(message, config, code, request, response) {
+ var error = new Error(message);
+ return enhanceError(error, config, code, request, response);
+ };
+
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports) {
+
+ 'use strict';
+
+ /**
+ * Update an Error with the specified config, error code, and response.
+ *
+ * @param {Error} error The error to update.
+ * @param {Object} config The config.
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
+ * @param {Object} [request] The request.
+ * @param {Object} [response] The response.
+ * @returns {Error} The error.
+ */
+ module.exports = function enhanceError(error, config, code, request, response) {
+ error.config = config;
+ if (code) {
+ error.code = code;
+ }
+ error.request = request;
+ error.response = response;
+ return error;
+ };
+
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var utils = __webpack_require__(2);
+
+ function encode(val) {
+ return encodeURIComponent(val).
+ replace(/%40/gi, '@').
+ replace(/%3A/gi, ':').
+ replace(/%24/g, '$').
+ replace(/%2C/gi, ',').
+ replace(/%20/g, '+').
+ replace(/%5B/gi, '[').
+ replace(/%5D/gi, ']');
+ }
+
+ /**
+ * Build a URL by appending params to the end
+ *
+ * @param {string} url The base of the url (e.g., http://www.google.com)
+ * @param {object} [params] The params to be appended
+ * @returns {string} The formatted url
+ */
+ module.exports = function buildURL(url, params, paramsSerializer) {
+ /*eslint no-param-reassign:0*/
+ if (!params) {
+ return url;
+ }
+
+ var serializedParams;
+ if (paramsSerializer) {
+ serializedParams = paramsSerializer(params);
+ } else if (utils.isURLSearchParams(params)) {
+ serializedParams = params.toString();
+ } else {
+ var parts = [];
+
+ utils.forEach(params, function serialize(val, key) {
+ if (val === null || typeof val === 'undefined') {
+ return;
+ }
+
+ if (utils.isArray(val)) {
+ key = key + '[]';
+ } else {
+ val = [val];
+ }
+
+ utils.forEach(val, function parseValue(v) {
+ if (utils.isDate(v)) {
+ v = v.toISOString();
+ } else if (utils.isObject(v)) {
+ v = JSON.stringify(v);
+ }
+ parts.push(encode(key) + '=' + encode(v));
+ });
+ });
+
+ serializedParams = parts.join('&');
+ }
+
+ if (serializedParams) {
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
+ }
+
+ return url;
+ };
+
+
+/***/ }),
+/* 13 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var utils = __webpack_require__(2);
+
+ // Headers whose duplicates are ignored by node
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
+ var ignoreDuplicateOf = [
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
+ 'referer', 'retry-after', 'user-agent'
+ ];
+
+ /**
+ * Parse headers into an object
+ *
+ * ```
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
+ * Content-Type: application/json
+ * Connection: keep-alive
+ * Transfer-Encoding: chunked
+ * ```
+ *
+ * @param {String} headers Headers needing to be parsed
+ * @returns {Object} Headers parsed into an object
+ */
+ module.exports = function parseHeaders(headers) {
+ var parsed = {};
+ var key;
+ var val;
+ var i;
+
+ if (!headers) { return parsed; }
+
+ utils.forEach(headers.split('\n'), function parser(line) {
+ i = line.indexOf(':');
+ key = utils.trim(line.substr(0, i)).toLowerCase();
+ val = utils.trim(line.substr(i + 1));
+
+ if (key) {
+ if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
+ return;
+ }
+ if (key === 'set-cookie') {
+ parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
+ } else {
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
+ }
+ }
+ });
+
+ return parsed;
+ };
+
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var utils = __webpack_require__(2);
+
+ module.exports = (
+ utils.isStandardBrowserEnv() ?
+
+ // Standard browser envs have full support of the APIs needed to test
+ // whether the request URL is of the same origin as current location.
+ (function standardBrowserEnv() {
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
+ var urlParsingNode = document.createElement('a');
+ var originURL;
+
+ /**
+ * Parse a URL to discover it's components
+ *
+ * @param {String} url The URL to be parsed
+ * @returns {Object}
+ */
+ function resolveURL(url) {
+ var href = url;
+
+ if (msie) {
+ // IE needs attribute set twice to normalize properties
+ urlParsingNode.setAttribute('href', href);
+ href = urlParsingNode.href;
+ }
+
+ urlParsingNode.setAttribute('href', href);
+
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
+ return {
+ href: urlParsingNode.href,
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
+ host: urlParsingNode.host,
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
+ hostname: urlParsingNode.hostname,
+ port: urlParsingNode.port,
+ pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
+ urlParsingNode.pathname :
+ '/' + urlParsingNode.pathname
+ };
+ }
+
+ originURL = resolveURL(window.location.href);
+
+ /**
+ * Determine if a URL shares the same origin as the current location
+ *
+ * @param {String} requestURL The URL to test
+ * @returns {boolean} True if URL shares the same origin, otherwise false
+ */
+ return function isURLSameOrigin(requestURL) {
+ var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
+ return (parsed.protocol === originURL.protocol &&
+ parsed.host === originURL.host);
+ };
+ })() :
+
+ // Non standard browser envs (web workers, react-native) lack needed support.
+ (function nonStandardBrowserEnv() {
+ return function isURLSameOrigin() {
+ return true;
+ };
+ })()
+ );
+
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports) {
+
+ 'use strict';
+
+ // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js
+
+ var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+
+ function E() {
+ this.message = 'String contains an invalid character';
+ }
+ E.prototype = new Error;
+ E.prototype.code = 5;
+ E.prototype.name = 'InvalidCharacterError';
+
+ function btoa(input) {
+ var str = String(input);
+ var output = '';
+ for (
+ // initialize result and counter
+ var block, charCode, idx = 0, map = chars;
+ // if the next str index does not exist:
+ // change the mapping table to "="
+ // check if d has no fractional digits
+ str.charAt(idx | 0) || (map = '=', idx % 1);
+ // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
+ output += map.charAt(63 & block >> 8 - idx % 1 * 8)
+ ) {
+ charCode = str.charCodeAt(idx += 3 / 4);
+ if (charCode > 0xFF) {
+ throw new E();
+ }
+ block = block << 8 | charCode;
+ }
+ return output;
+ }
+
+ module.exports = btoa;
+
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var utils = __webpack_require__(2);
+
+ module.exports = (
+ utils.isStandardBrowserEnv() ?
+
+ // Standard browser envs support document.cookie
+ (function standardBrowserEnv() {
+ return {
+ write: function write(name, value, expires, path, domain, secure) {
+ var cookie = [];
+ cookie.push(name + '=' + encodeURIComponent(value));
+
+ if (utils.isNumber(expires)) {
+ cookie.push('expires=' + new Date(expires).toGMTString());
+ }
+
+ if (utils.isString(path)) {
+ cookie.push('path=' + path);
+ }
+
+ if (utils.isString(domain)) {
+ cookie.push('domain=' + domain);
+ }
+
+ if (secure === true) {
+ cookie.push('secure');
+ }
+
+ document.cookie = cookie.join('; ');
+ },
+
+ read: function read(name) {
+ var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
+ return (match ? decodeURIComponent(match[3]) : null);
+ },
+
+ remove: function remove(name) {
+ this.write(name, '', Date.now() - 86400000);
+ }
+ };
+ })() :
+
+ // Non standard browser env (web workers, react-native) lack needed support.
+ (function nonStandardBrowserEnv() {
+ return {
+ write: function write() {},
+ read: function read() { return null; },
+ remove: function remove() {}
+ };
+ })()
+ );
+
+
+/***/ }),
+/* 17 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var utils = __webpack_require__(2);
+
+ function InterceptorManager() {
+ this.handlers = [];
+ }
+
+ /**
+ * Add a new interceptor to the stack
+ *
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
+ *
+ * @return {Number} An ID used to remove interceptor later
+ */
+ InterceptorManager.prototype.use = function use(fulfilled, rejected) {
+ this.handlers.push({
+ fulfilled: fulfilled,
+ rejected: rejected
+ });
+ return this.handlers.length - 1;
+ };
+
+ /**
+ * Remove an interceptor from the stack
+ *
+ * @param {Number} id The ID that was returned by `use`
+ */
+ InterceptorManager.prototype.eject = function eject(id) {
+ if (this.handlers[id]) {
+ this.handlers[id] = null;
+ }
+ };
+
+ /**
+ * Iterate over all the registered interceptors
+ *
+ * This method is particularly useful for skipping over any
+ * interceptors that may have become `null` calling `eject`.
+ *
+ * @param {Function} fn The function to call for each interceptor
+ */
+ InterceptorManager.prototype.forEach = function forEach(fn) {
+ utils.forEach(this.handlers, function forEachHandler(h) {
+ if (h !== null) {
+ fn(h);
+ }
+ });
+ };
+
+ module.exports = InterceptorManager;
+
+
+/***/ }),
+/* 18 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var utils = __webpack_require__(2);
+ var transformData = __webpack_require__(19);
+ var isCancel = __webpack_require__(20);
+ var defaults = __webpack_require__(6);
+ var isAbsoluteURL = __webpack_require__(21);
+ var combineURLs = __webpack_require__(22);
+
+ /**
+ * Throws a `Cancel` if cancellation has been requested.
+ */
+ function throwIfCancellationRequested(config) {
+ if (config.cancelToken) {
+ config.cancelToken.throwIfRequested();
+ }
+ }
+
+ /**
+ * Dispatch a request to the server using the configured adapter.
+ *
+ * @param {object} config The config that is to be used for the request
+ * @returns {Promise} The Promise to be fulfilled
+ */
+ module.exports = function dispatchRequest(config) {
+ throwIfCancellationRequested(config);
+
+ // Support baseURL config
+ if (config.baseURL && !isAbsoluteURL(config.url)) {
+ config.url = combineURLs(config.baseURL, config.url);
+ }
+
+ // Ensure headers exist
+ config.headers = config.headers || {};
+
+ // Transform request data
+ config.data = transformData(
+ config.data,
+ config.headers,
+ config.transformRequest
+ );
+
+ // Flatten headers
+ config.headers = utils.merge(
+ config.headers.common || {},
+ config.headers[config.method] || {},
+ config.headers || {}
+ );
+
+ utils.forEach(
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
+ function cleanHeaderConfig(method) {
+ delete config.headers[method];
+ }
+ );
+
+ var adapter = config.adapter || defaults.adapter;
+
+ return adapter(config).then(function onAdapterResolution(response) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ response.data = transformData(
+ response.data,
+ response.headers,
+ config.transformResponse
+ );
+
+ return response;
+ }, function onAdapterRejection(reason) {
+ if (!isCancel(reason)) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ if (reason && reason.response) {
+ reason.response.data = transformData(
+ reason.response.data,
+ reason.response.headers,
+ config.transformResponse
+ );
+ }
+ }
+
+ return Promise.reject(reason);
+ });
+ };
+
+
+/***/ }),
+/* 19 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var utils = __webpack_require__(2);
+
+ /**
+ * Transform the data for a request or a response
+ *
+ * @param {Object|String} data The data to be transformed
+ * @param {Array} headers The headers for the request or response
+ * @param {Array|Function} fns A single function or Array of functions
+ * @returns {*} The resulting transformed data
+ */
+ module.exports = function transformData(data, headers, fns) {
+ /*eslint no-param-reassign:0*/
+ utils.forEach(fns, function transform(fn) {
+ data = fn(data, headers);
+ });
+
+ return data;
+ };
+
+
+/***/ }),
+/* 20 */
+/***/ (function(module, exports) {
+
+ 'use strict';
+
+ module.exports = function isCancel(value) {
+ return !!(value && value.__CANCEL__);
+ };
+
+
+/***/ }),
+/* 21 */
+/***/ (function(module, exports) {
+
+ 'use strict';
+
+ /**
+ * Determines whether the specified URL is absolute
+ *
+ * @param {string} url The URL to test
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
+ */
+ module.exports = function isAbsoluteURL(url) {
+ // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL).
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
+ // by any combination of letters, digits, plus, period, or hyphen.
+ return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
+ };
+
+
+/***/ }),
+/* 22 */
+/***/ (function(module, exports) {
+
+ 'use strict';
+
+ /**
+ * Creates a new URL by combining the specified URLs
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} relativeURL The relative URL
+ * @returns {string} The combined URL
+ */
+ module.exports = function combineURLs(baseURL, relativeURL) {
+ return relativeURL
+ ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
+ : baseURL;
+ };
+
+
+/***/ }),
+/* 23 */
+/***/ (function(module, exports) {
+
+ 'use strict';
+
+ /**
+ * A `Cancel` is an object that is thrown when an operation is canceled.
+ *
+ * @class
+ * @param {string=} message The message.
+ */
+ function Cancel(message) {
+ this.message = message;
+ }
+
+ Cancel.prototype.toString = function toString() {
+ return 'Cancel' + (this.message ? ': ' + this.message : '');
+ };
+
+ Cancel.prototype.__CANCEL__ = true;
+
+ module.exports = Cancel;
+
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ var Cancel = __webpack_require__(23);
+
+ /**
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
+ *
+ * @class
+ * @param {Function} executor The executor function.
+ */
+ function CancelToken(executor) {
+ if (typeof executor !== 'function') {
+ throw new TypeError('executor must be a function.');
+ }
+
+ var resolvePromise;
+ this.promise = new Promise(function promiseExecutor(resolve) {
+ resolvePromise = resolve;
+ });
+
+ var token = this;
+ executor(function cancel(message) {
+ if (token.reason) {
+ // Cancellation has already been requested
+ return;
+ }
+
+ token.reason = new Cancel(message);
+ resolvePromise(token.reason);
+ });
+ }
+
+ /**
+ * Throws a `Cancel` if cancellation has been requested.
+ */
+ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
+ if (this.reason) {
+ throw this.reason;
+ }
+ };
+
+ /**
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
+ * cancels the `CancelToken`.
+ */
+ CancelToken.source = function source() {
+ var cancel;
+ var token = new CancelToken(function executor(c) {
+ cancel = c;
+ });
+ return {
+ token: token,
+ cancel: cancel
+ };
+ };
+
+ module.exports = CancelToken;
+
+
+/***/ }),
+/* 25 */
+/***/ (function(module, exports) {
+
+ 'use strict';
+
+ /**
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
+ *
+ * Common use case would be to use `Function.prototype.apply`.
+ *
+ * ```js
+ * function f(x, y, z) {}
+ * var args = [1, 2, 3];
+ * f.apply(null, args);
+ * ```
+ *
+ * With `spread` this example can be re-written.
+ *
+ * ```js
+ * spread(function(x, y, z) {})([1, 2, 3]);
+ * ```
+ *
+ * @param {Function} callback
+ * @returns {Function}
+ */
+ module.exports = function spread(callback) {
+ return function wrap(arr) {
+ return callback.apply(null, arr);
+ };
+ };
+
+
+/***/ })
+/******/ ])
+});
+;
+//# sourceMappingURL=axios.map
\ No newline at end of file
diff --git a/express-server/node_modules/axios/dist/axios.map b/express-server/node_modules/axios/dist/axios.map
new file mode 100644
index 00000000..6b76578d
--- /dev/null
+++ b/express-server/node_modules/axios/dist/axios.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 48f4719183d3ec9e4379","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./~/is-buffer/index.js","webpack:///./lib/core/Axios.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/helpers/btoa.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,yC;;;;;;ACAA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;ACnDA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAmC,OAAO;AAC1C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9SA;;AAEA;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;ACpBA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA,mCAAkC,cAAc;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA,MAAK;AACL;AACA,EAAC;;AAED;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC;;AAED;;;;;;;AC9EA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAwE;AACxE;AACA;AACA;AACA,wDAAuD;AACvD;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,QAAO,YAAY;AACnB;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;;;;;;;AC/FA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;;;;;;ACXA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6CAA4C;AAC5C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;;;;;;ACnLA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzBA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;;;;;;ACjBA;;AAEA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;ACjEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACpDA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;;;;;;ACnEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACnCA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yCAAwC;AACxC,QAAO;;AAEP;AACA,2DAA0D,wBAAwB;AAClF;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,iCAAgC;AAChC,8BAA6B,aAAa,EAAE;AAC5C;AACA;AACA,IAAG;AACH;;;;;;;ACpDA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB;AACA,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;;;;;;ACnDA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B,wCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;;;;;;;ACrFA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;;;;;;;ACJA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;AACA;AACA;AACA;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;AClBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA,YAAW,SAAS;AACpB,cAAa;AACb;AACA;AACA;AACA;AACA;AACA","file":"axios.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 48f4719183d3ec9e4379","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/is-buffer/index.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, {method: 'get'}, this.defaults, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' &&\n typeof window !== 'undefined' &&\n window.XDomainRequest && !('withCredentials' in request) &&\n !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 10\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 14\n// module chunks = 0","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/btoa.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 17\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 20\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 21\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""}
\ No newline at end of file
diff --git a/express-server/node_modules/axios/dist/axios.min.js b/express-server/node_modules/axios/dist/axios.min.js
new file mode 100644
index 00000000..69cc188e
--- /dev/null
+++ b/express-server/node_modules/axios/dist/axios.min.js
@@ -0,0 +1,9 @@
+/* axios v0.18.0 | (c) 2018 by Matt Zabriskie */
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new s(e),n=i(s.prototype.request,t);return o.extend(n,s.prototype,t),o.extend(n,t),n}var o=n(2),i=n(3),s=n(5),u=n(6),a=r(u);a.Axios=s,a.create=function(e){return r(o.merge(u,e))},a.Cancel=n(23),a.CancelToken=n(24),a.isCancel=n(20),a.all=function(e){return Promise.all(e)},a.spread=n(25),e.exports=a,e.exports.default=a},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"[object ArrayBuffer]"===R.call(e)}function i(e){return"undefined"!=typeof FormData&&e instanceof FormData}function s(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function u(e){return"string"==typeof e}function a(e){return"number"==typeof e}function c(e){return"undefined"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===R.call(e)}function d(e){return"[object File]"===R.call(e)}function l(e){return"[object Blob]"===R.call(e)}function h(e){return"[object Function]"===R.call(e)}function m(e){return f(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function w(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n
+ * @license MIT
+ */
+e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new s,response:new s}}var o=n(6),i=n(2),s=n(17),u=n(18);r.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[u,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(8):"undefined"!=typeof process&&(e=n(8)),e}var i=n(2),s=n(7),u={"Content-Type":"application/x-www-form-urlencoded"},a={adapter:o(),transformRequest:[function(e,t){return s(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){a.headers[e]={}}),i.forEach(["post","put","patch"],function(e){a.headers[e]=i.merge(u)}),e.exports=a},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(9),i=n(12),s=n(13),u=n(14),a=n(10),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(15);e.exports=function(e){return new Promise(function(t,f){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||u(e.url)||(l=new window.XDomainRequest,h="onload",m=!0,l.onprogress=function(){},l.ontimeout=function(){}),e.auth){var y=e.auth.username||"",w=e.auth.password||"";d.Authorization="Basic "+c(y+":"+w)}if(l.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l[h]=function(){if(l&&(4===l.readyState||m)&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:r,status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:n,config:e,request:l};o(t,f,i),l=null}},l.onerror=function(){f(a("Network Error",e,null,l)),l=null},l.ontimeout=function(){f(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=n(16),v=(e.withCredentials||u(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),f(e),l=null)}),void 0===p&&(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var s=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))}))}),i=s.join("&")}return i&&(e+=(e.indexOf("?")===-1?"?":"&")+i),e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([n]):s[t]=s[t]?s[t]+", "+n:n}}),s):s}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t){"use strict";function n(){this.message="String contains an invalid character"}function r(e){for(var t,r,i=String(e),s="",u=0,a=o;i.charAt(0|u)||(a="=",u%1);s+=a.charAt(63&t>>8-u%1*8)){if(r=i.charCodeAt(u+=.75),r>255)throw new n;t=t<<8|r}return s}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=r},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,s){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),i=n(19),s=n(20),u=n(6),a=n(21),c=n(22);e.exports=function(e){r(e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||u.adapter;return t(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return s(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])});
+//# sourceMappingURL=axios.min.map
\ No newline at end of file
diff --git a/express-server/node_modules/axios/dist/axios.min.map b/express-server/node_modules/axios/dist/axios.min.map
new file mode 100644
index 00000000..f7fdd449
--- /dev/null
+++ b/express-server/node_modules/axios/dist/axios.min.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///axios.min.js","webpack:///webpack/bootstrap dad8263224c86c166a30","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./~/is-buffer/index.js","webpack:///./lib/core/Axios.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/helpers/btoa.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","createInstance","defaultConfig","context","Axios","instance","bind","prototype","request","utils","extend","defaults","axios","create","instanceConfig","merge","Cancel","CancelToken","isCancel","all","promises","Promise","spread","default","isArray","val","toString","isArrayBuffer","isFormData","FormData","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isUndefined","isObject","isDate","isFile","isBlob","isFunction","isStream","pipe","isURLSearchParams","URLSearchParams","trim","str","replace","isStandardBrowserEnv","navigator","product","window","document","forEach","obj","fn","i","l","length","key","Object","hasOwnProperty","assignValue","arguments","a","b","thisArg","isBuffer","args","Array","apply","constructor","isSlowBuffer","readFloatLE","slice","_isBuffer","interceptors","InterceptorManager","response","dispatchRequest","config","url","method","toLowerCase","chain","undefined","promise","resolve","interceptor","unshift","fulfilled","rejected","push","then","shift","data","setContentTypeIfUnset","headers","value","getDefaultAdapter","adapter","XMLHttpRequest","process","normalizeHeaderName","DEFAULT_CONTENT_TYPE","Content-Type","transformRequest","JSON","stringify","transformResponse","parse","e","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","validateStatus","status","common","Accept","normalizedName","name","toUpperCase","settle","buildURL","parseHeaders","isURLSameOrigin","createError","btoa","reject","requestData","requestHeaders","loadEvent","xDomain","XDomainRequest","onprogress","ontimeout","auth","username","password","Authorization","open","params","paramsSerializer","readyState","responseURL","indexOf","responseHeaders","getAllResponseHeaders","responseData","responseType","responseText","statusText","onerror","cookies","xsrfValue","withCredentials","read","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","cancelToken","cancel","abort","send","enhanceError","message","code","error","Error","encode","encodeURIComponent","serializedParams","parts","v","toISOString","join","ignoreDuplicateOf","parsed","split","line","substr","concat","resolveURL","href","msie","urlParsingNode","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","originURL","test","userAgent","createElement","location","requestURL","E","input","block","charCode","String","output","idx","map","chars","charCodeAt","write","expires","path","domain","secure","cookie","Date","toGMTString","match","RegExp","decodeURIComponent","remove","now","handlers","use","eject","h","throwIfCancellationRequested","throwIfRequested","transformData","isAbsoluteURL","combineURLs","baseURL","reason","fns","__CANCEL__","relativeURL","executor","TypeError","resolvePromise","token","source","callback","arr"],"mappings":"CAAA,SAAAA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AT,UAAAmB,SAAA,WACA,gBAAApC,KAAAoL,QAAA,KAAApL,KAAAoL,QAAA,KAGA1J,EAAAT,UAAA0O,YAAA,EAEA9P,EAAAD,QAAA8B,GzB68CM,SAAU7B,EAAQD,EAASM,G0B/9CjC,YAUA,SAAAyB,GAAAkO,GACA,qBAAAA,GACA,SAAAC,WAAA,+BAGA,IAAAC,EACA/P,MAAAkG,QAAA,GAAAnE,SAAA,SAAAoE,GACA4J,EAAA5J,GAGA,IAAA6J,GAAAhQ,IACA6P,GAAA,SAAAzE,GACA4E,EAAAP,SAKAO,EAAAP,OAAA,GAAA/N,GAAA0J,GACA2E,EAAAC,EAAAP,WA1BA,GAAA/N,GAAAxB,EAAA,GAiCAyB,GAAAV,UAAAmO,iBAAA,WACA,GAAApP,KAAAyP,OACA,KAAAzP,MAAAyP,QAQA9N,EAAAsO,OAAA,WACA,GAAAjF,GACAgF,EAAA,GAAArO,GAAA,SAAAlB,GACAuK,EAAAvK,GAEA,QACAuP,QACAhF,WAIAnL,EAAAD,QAAA+B,G1Bs+CM,SAAU9B,EAAQD,G2B9hDxB,YAsBAC,GAAAD,QAAA,SAAAsQ,GACA,gBAAAC,GACA,MAAAD,GAAAhL,MAAA,KAAAiL","file":"axios.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar bind = __webpack_require__(3);\n\tvar Axios = __webpack_require__(5);\n\tvar defaults = __webpack_require__(6);\n\t\n\t/**\n\t * Create an instance of Axios\n\t *\n\t * @param {Object} defaultConfig The default config for the instance\n\t * @return {Axios} A new instance of Axios\n\t */\n\tfunction createInstance(defaultConfig) {\n\t var context = new Axios(defaultConfig);\n\t var instance = bind(Axios.prototype.request, context);\n\t\n\t // Copy axios.prototype to instance\n\t utils.extend(instance, Axios.prototype, context);\n\t\n\t // Copy context to instance\n\t utils.extend(instance, context);\n\t\n\t return instance;\n\t}\n\t\n\t// Create the default instance to be exported\n\tvar axios = createInstance(defaults);\n\t\n\t// Expose Axios class to allow class inheritance\n\taxios.Axios = Axios;\n\t\n\t// Factory for creating new instances\n\taxios.create = function create(instanceConfig) {\n\t return createInstance(utils.merge(defaults, instanceConfig));\n\t};\n\t\n\t// Expose Cancel & CancelToken\n\taxios.Cancel = __webpack_require__(23);\n\taxios.CancelToken = __webpack_require__(24);\n\taxios.isCancel = __webpack_require__(20);\n\t\n\t// Expose all/spread\n\taxios.all = function all(promises) {\n\t return Promise.all(promises);\n\t};\n\taxios.spread = __webpack_require__(25);\n\t\n\tmodule.exports = axios;\n\t\n\t// Allow use of default import syntax in TypeScript\n\tmodule.exports.default = axios;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bind = __webpack_require__(3);\n\tvar isBuffer = __webpack_require__(4);\n\t\n\t/*global toString:true*/\n\t\n\t// utils is a library of generic helper functions non-specific to axios\n\t\n\tvar toString = Object.prototype.toString;\n\t\n\t/**\n\t * Determine if a value is an Array\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Array, otherwise false\n\t */\n\tfunction isArray(val) {\n\t return toString.call(val) === '[object Array]';\n\t}\n\t\n\t/**\n\t * Determine if a value is an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBuffer(val) {\n\t return toString.call(val) === '[object ArrayBuffer]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a FormData\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an FormData, otherwise false\n\t */\n\tfunction isFormData(val) {\n\t return (typeof FormData !== 'undefined') && (val instanceof FormData);\n\t}\n\t\n\t/**\n\t * Determine if a value is a view on an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBufferView(val) {\n\t var result;\n\t if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n\t result = ArrayBuffer.isView(val);\n\t } else {\n\t result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Determine if a value is a String\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a String, otherwise false\n\t */\n\tfunction isString(val) {\n\t return typeof val === 'string';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Number\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Number, otherwise false\n\t */\n\tfunction isNumber(val) {\n\t return typeof val === 'number';\n\t}\n\t\n\t/**\n\t * Determine if a value is undefined\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if the value is undefined, otherwise false\n\t */\n\tfunction isUndefined(val) {\n\t return typeof val === 'undefined';\n\t}\n\t\n\t/**\n\t * Determine if a value is an Object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Object, otherwise false\n\t */\n\tfunction isObject(val) {\n\t return val !== null && typeof val === 'object';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Date\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Date, otherwise false\n\t */\n\tfunction isDate(val) {\n\t return toString.call(val) === '[object Date]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a File\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a File, otherwise false\n\t */\n\tfunction isFile(val) {\n\t return toString.call(val) === '[object File]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Blob\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Blob, otherwise false\n\t */\n\tfunction isBlob(val) {\n\t return toString.call(val) === '[object Blob]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Function\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Function, otherwise false\n\t */\n\tfunction isFunction(val) {\n\t return toString.call(val) === '[object Function]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Stream\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Stream, otherwise false\n\t */\n\tfunction isStream(val) {\n\t return isObject(val) && isFunction(val.pipe);\n\t}\n\t\n\t/**\n\t * Determine if a value is a URLSearchParams object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n\t */\n\tfunction isURLSearchParams(val) {\n\t return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n\t}\n\t\n\t/**\n\t * Trim excess whitespace off the beginning and end of a string\n\t *\n\t * @param {String} str The String to trim\n\t * @returns {String} The String freed of excess whitespace\n\t */\n\tfunction trim(str) {\n\t return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n\t}\n\t\n\t/**\n\t * Determine if we're running in a standard browser environment\n\t *\n\t * This allows axios to run in a web worker, and react-native.\n\t * Both environments support XMLHttpRequest, but not fully standard globals.\n\t *\n\t * web workers:\n\t * typeof window -> undefined\n\t * typeof document -> undefined\n\t *\n\t * react-native:\n\t * navigator.product -> 'ReactNative'\n\t */\n\tfunction isStandardBrowserEnv() {\n\t if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n\t return false;\n\t }\n\t return (\n\t typeof window !== 'undefined' &&\n\t typeof document !== 'undefined'\n\t );\n\t}\n\t\n\t/**\n\t * Iterate over an Array or an Object invoking a function for each item.\n\t *\n\t * If `obj` is an Array callback will be called passing\n\t * the value, index, and complete array for each item.\n\t *\n\t * If 'obj' is an Object callback will be called passing\n\t * the value, key, and complete object for each property.\n\t *\n\t * @param {Object|Array} obj The object to iterate\n\t * @param {Function} fn The callback to invoke for each item\n\t */\n\tfunction forEach(obj, fn) {\n\t // Don't bother if no value provided\n\t if (obj === null || typeof obj === 'undefined') {\n\t return;\n\t }\n\t\n\t // Force an array if not already something iterable\n\t if (typeof obj !== 'object') {\n\t /*eslint no-param-reassign:0*/\n\t obj = [obj];\n\t }\n\t\n\t if (isArray(obj)) {\n\t // Iterate over array values\n\t for (var i = 0, l = obj.length; i < l; i++) {\n\t fn.call(null, obj[i], i, obj);\n\t }\n\t } else {\n\t // Iterate over object keys\n\t for (var key in obj) {\n\t if (Object.prototype.hasOwnProperty.call(obj, key)) {\n\t fn.call(null, obj[key], key, obj);\n\t }\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * Accepts varargs expecting each argument to be an object, then\n\t * immutably merges the properties of each object and returns result.\n\t *\n\t * When multiple objects contain the same key the later object in\n\t * the arguments list will take precedence.\n\t *\n\t * Example:\n\t *\n\t * ```js\n\t * var result = merge({foo: 123}, {foo: 456});\n\t * console.log(result.foo); // outputs 456\n\t * ```\n\t *\n\t * @param {Object} obj1 Object to merge\n\t * @returns {Object} Result of all merge properties\n\t */\n\tfunction merge(/* obj1, obj2, obj3, ... */) {\n\t var result = {};\n\t function assignValue(val, key) {\n\t if (typeof result[key] === 'object' && typeof val === 'object') {\n\t result[key] = merge(result[key], val);\n\t } else {\n\t result[key] = val;\n\t }\n\t }\n\t\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t forEach(arguments[i], assignValue);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Extends object a by mutably adding to it the properties of object b.\n\t *\n\t * @param {Object} a The object to be extended\n\t * @param {Object} b The object to copy properties from\n\t * @param {Object} thisArg The object to bind function to\n\t * @return {Object} The resulting value of object a\n\t */\n\tfunction extend(a, b, thisArg) {\n\t forEach(b, function assignValue(val, key) {\n\t if (thisArg && typeof val === 'function') {\n\t a[key] = bind(val, thisArg);\n\t } else {\n\t a[key] = val;\n\t }\n\t });\n\t return a;\n\t}\n\t\n\tmodule.exports = {\n\t isArray: isArray,\n\t isArrayBuffer: isArrayBuffer,\n\t isBuffer: isBuffer,\n\t isFormData: isFormData,\n\t isArrayBufferView: isArrayBufferView,\n\t isString: isString,\n\t isNumber: isNumber,\n\t isObject: isObject,\n\t isUndefined: isUndefined,\n\t isDate: isDate,\n\t isFile: isFile,\n\t isBlob: isBlob,\n\t isFunction: isFunction,\n\t isStream: isStream,\n\t isURLSearchParams: isURLSearchParams,\n\t isStandardBrowserEnv: isStandardBrowserEnv,\n\t forEach: forEach,\n\t merge: merge,\n\t extend: extend,\n\t trim: trim\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function bind(fn, thisArg) {\n\t return function wrap() {\n\t var args = new Array(arguments.length);\n\t for (var i = 0; i < args.length; i++) {\n\t args[i] = arguments[i];\n\t }\n\t return fn.apply(thisArg, args);\n\t };\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/*!\n\t * Determine if an object is a Buffer\n\t *\n\t * @author Feross Aboukhadijeh \n\t * @license MIT\n\t */\n\t\n\t// The _isBuffer check is for Safari 5-7 support, because it's missing\n\t// Object.prototype.constructor. Remove this eventually\n\tmodule.exports = function (obj) {\n\t return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n\t}\n\t\n\tfunction isBuffer (obj) {\n\t return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n\t}\n\t\n\t// For Node v0.10 support. Remove this eventually.\n\tfunction isSlowBuffer (obj) {\n\t return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n\t}\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar defaults = __webpack_require__(6);\n\tvar utils = __webpack_require__(2);\n\tvar InterceptorManager = __webpack_require__(17);\n\tvar dispatchRequest = __webpack_require__(18);\n\t\n\t/**\n\t * Create a new instance of Axios\n\t *\n\t * @param {Object} instanceConfig The default config for the instance\n\t */\n\tfunction Axios(instanceConfig) {\n\t this.defaults = instanceConfig;\n\t this.interceptors = {\n\t request: new InterceptorManager(),\n\t response: new InterceptorManager()\n\t };\n\t}\n\t\n\t/**\n\t * Dispatch a request\n\t *\n\t * @param {Object} config The config specific for this request (merged with this.defaults)\n\t */\n\tAxios.prototype.request = function request(config) {\n\t /*eslint no-param-reassign:0*/\n\t // Allow for axios('example/url'[, config]) a la fetch API\n\t if (typeof config === 'string') {\n\t config = utils.merge({\n\t url: arguments[0]\n\t }, arguments[1]);\n\t }\n\t\n\t config = utils.merge(defaults, {method: 'get'}, this.defaults, config);\n\t config.method = config.method.toLowerCase();\n\t\n\t // Hook up interceptors middleware\n\t var chain = [dispatchRequest, undefined];\n\t var promise = Promise.resolve(config);\n\t\n\t this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n\t chain.unshift(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n\t chain.push(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t while (chain.length) {\n\t promise = promise.then(chain.shift(), chain.shift());\n\t }\n\t\n\t return promise;\n\t};\n\t\n\t// Provide aliases for supported request methods\n\tutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, config) {\n\t return this.request(utils.merge(config || {}, {\n\t method: method,\n\t url: url\n\t }));\n\t };\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, data, config) {\n\t return this.request(utils.merge(config || {}, {\n\t method: method,\n\t url: url,\n\t data: data\n\t }));\n\t };\n\t});\n\t\n\tmodule.exports = Axios;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar normalizeHeaderName = __webpack_require__(7);\n\t\n\tvar DEFAULT_CONTENT_TYPE = {\n\t 'Content-Type': 'application/x-www-form-urlencoded'\n\t};\n\t\n\tfunction setContentTypeIfUnset(headers, value) {\n\t if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n\t headers['Content-Type'] = value;\n\t }\n\t}\n\t\n\tfunction getDefaultAdapter() {\n\t var adapter;\n\t if (typeof XMLHttpRequest !== 'undefined') {\n\t // For browsers use XHR adapter\n\t adapter = __webpack_require__(8);\n\t } else if (typeof process !== 'undefined') {\n\t // For node use HTTP adapter\n\t adapter = __webpack_require__(8);\n\t }\n\t return adapter;\n\t}\n\t\n\tvar defaults = {\n\t adapter: getDefaultAdapter(),\n\t\n\t transformRequest: [function transformRequest(data, headers) {\n\t normalizeHeaderName(headers, 'Content-Type');\n\t if (utils.isFormData(data) ||\n\t utils.isArrayBuffer(data) ||\n\t utils.isBuffer(data) ||\n\t utils.isStream(data) ||\n\t utils.isFile(data) ||\n\t utils.isBlob(data)\n\t ) {\n\t return data;\n\t }\n\t if (utils.isArrayBufferView(data)) {\n\t return data.buffer;\n\t }\n\t if (utils.isURLSearchParams(data)) {\n\t setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n\t return data.toString();\n\t }\n\t if (utils.isObject(data)) {\n\t setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n\t return JSON.stringify(data);\n\t }\n\t return data;\n\t }],\n\t\n\t transformResponse: [function transformResponse(data) {\n\t /*eslint no-param-reassign:0*/\n\t if (typeof data === 'string') {\n\t try {\n\t data = JSON.parse(data);\n\t } catch (e) { /* Ignore */ }\n\t }\n\t return data;\n\t }],\n\t\n\t /**\n\t * A timeout in milliseconds to abort a request. If set to 0 (default) a\n\t * timeout is not created.\n\t */\n\t timeout: 0,\n\t\n\t xsrfCookieName: 'XSRF-TOKEN',\n\t xsrfHeaderName: 'X-XSRF-TOKEN',\n\t\n\t maxContentLength: -1,\n\t\n\t validateStatus: function validateStatus(status) {\n\t return status >= 200 && status < 300;\n\t }\n\t};\n\t\n\tdefaults.headers = {\n\t common: {\n\t 'Accept': 'application/json, text/plain, */*'\n\t }\n\t};\n\t\n\tutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n\t defaults.headers[method] = {};\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n\t});\n\t\n\tmodule.exports = defaults;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n\t utils.forEach(headers, function processHeader(value, name) {\n\t if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n\t headers[normalizedName] = value;\n\t delete headers[name];\n\t }\n\t });\n\t};\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar settle = __webpack_require__(9);\n\tvar buildURL = __webpack_require__(12);\n\tvar parseHeaders = __webpack_require__(13);\n\tvar isURLSameOrigin = __webpack_require__(14);\n\tvar createError = __webpack_require__(10);\n\tvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(15);\n\t\n\tmodule.exports = function xhrAdapter(config) {\n\t return new Promise(function dispatchXhrRequest(resolve, reject) {\n\t var requestData = config.data;\n\t var requestHeaders = config.headers;\n\t\n\t if (utils.isFormData(requestData)) {\n\t delete requestHeaders['Content-Type']; // Let the browser set it\n\t }\n\t\n\t var request = new XMLHttpRequest();\n\t var loadEvent = 'onreadystatechange';\n\t var xDomain = false;\n\t\n\t // For IE 8/9 CORS support\n\t // Only supports POST and GET calls and doesn't returns the response headers.\n\t // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n\t if ((\"production\") !== 'test' &&\n\t typeof window !== 'undefined' &&\n\t window.XDomainRequest && !('withCredentials' in request) &&\n\t !isURLSameOrigin(config.url)) {\n\t request = new window.XDomainRequest();\n\t loadEvent = 'onload';\n\t xDomain = true;\n\t request.onprogress = function handleProgress() {};\n\t request.ontimeout = function handleTimeout() {};\n\t }\n\t\n\t // HTTP basic authentication\n\t if (config.auth) {\n\t var username = config.auth.username || '';\n\t var password = config.auth.password || '';\n\t requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n\t }\n\t\n\t request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\t\n\t // Set the request timeout in MS\n\t request.timeout = config.timeout;\n\t\n\t // Listen for ready state\n\t request[loadEvent] = function handleLoad() {\n\t if (!request || (request.readyState !== 4 && !xDomain)) {\n\t return;\n\t }\n\t\n\t // The request errored out and we didn't get a response, this will be\n\t // handled by onerror instead\n\t // With one exception: request that using file: protocol, most browsers\n\t // will return status as 0 even though it's a successful request\n\t if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n\t return;\n\t }\n\t\n\t // Prepare the response\n\t var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n\t var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n\t var response = {\n\t data: responseData,\n\t // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)\n\t status: request.status === 1223 ? 204 : request.status,\n\t statusText: request.status === 1223 ? 'No Content' : request.statusText,\n\t headers: responseHeaders,\n\t config: config,\n\t request: request\n\t };\n\t\n\t settle(resolve, reject, response);\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle low level network errors\n\t request.onerror = function handleError() {\n\t // Real errors are hidden from us by the browser\n\t // onerror should only fire if it's a network error\n\t reject(createError('Network Error', config, null, request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle timeout\n\t request.ontimeout = function handleTimeout() {\n\t reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n\t request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Add xsrf header\n\t // This is only done if running in a standard browser environment.\n\t // Specifically not if we're in a web worker, or react-native.\n\t if (utils.isStandardBrowserEnv()) {\n\t var cookies = __webpack_require__(16);\n\t\n\t // Add xsrf header\n\t var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n\t cookies.read(config.xsrfCookieName) :\n\t undefined;\n\t\n\t if (xsrfValue) {\n\t requestHeaders[config.xsrfHeaderName] = xsrfValue;\n\t }\n\t }\n\t\n\t // Add headers to the request\n\t if ('setRequestHeader' in request) {\n\t utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n\t if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n\t // Remove Content-Type if data is undefined\n\t delete requestHeaders[key];\n\t } else {\n\t // Otherwise add header to the request\n\t request.setRequestHeader(key, val);\n\t }\n\t });\n\t }\n\t\n\t // Add withCredentials to request if needed\n\t if (config.withCredentials) {\n\t request.withCredentials = true;\n\t }\n\t\n\t // Add responseType to request if needed\n\t if (config.responseType) {\n\t try {\n\t request.responseType = config.responseType;\n\t } catch (e) {\n\t // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n\t // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n\t if (config.responseType !== 'json') {\n\t throw e;\n\t }\n\t }\n\t }\n\t\n\t // Handle progress if needed\n\t if (typeof config.onDownloadProgress === 'function') {\n\t request.addEventListener('progress', config.onDownloadProgress);\n\t }\n\t\n\t // Not all browsers support upload events\n\t if (typeof config.onUploadProgress === 'function' && request.upload) {\n\t request.upload.addEventListener('progress', config.onUploadProgress);\n\t }\n\t\n\t if (config.cancelToken) {\n\t // Handle cancellation\n\t config.cancelToken.promise.then(function onCanceled(cancel) {\n\t if (!request) {\n\t return;\n\t }\n\t\n\t request.abort();\n\t reject(cancel);\n\t // Clean up request\n\t request = null;\n\t });\n\t }\n\t\n\t if (requestData === undefined) {\n\t requestData = null;\n\t }\n\t\n\t // Send the request\n\t request.send(requestData);\n\t });\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar createError = __webpack_require__(10);\n\t\n\t/**\n\t * Resolve or reject a Promise based on response status.\n\t *\n\t * @param {Function} resolve A function that resolves the promise.\n\t * @param {Function} reject A function that rejects the promise.\n\t * @param {object} response The response.\n\t */\n\tmodule.exports = function settle(resolve, reject, response) {\n\t var validateStatus = response.config.validateStatus;\n\t // Note: status is not exposed by XDomainRequest\n\t if (!response.status || !validateStatus || validateStatus(response.status)) {\n\t resolve(response);\n\t } else {\n\t reject(createError(\n\t 'Request failed with status code ' + response.status,\n\t response.config,\n\t null,\n\t response.request,\n\t response\n\t ));\n\t }\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar enhanceError = __webpack_require__(11);\n\t\n\t/**\n\t * Create an Error with the specified message, config, error code, request and response.\n\t *\n\t * @param {string} message The error message.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The created error.\n\t */\n\tmodule.exports = function createError(message, config, code, request, response) {\n\t var error = new Error(message);\n\t return enhanceError(error, config, code, request, response);\n\t};\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Update an Error with the specified config, error code, and response.\n\t *\n\t * @param {Error} error The error to update.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The error.\n\t */\n\tmodule.exports = function enhanceError(error, config, code, request, response) {\n\t error.config = config;\n\t if (code) {\n\t error.code = code;\n\t }\n\t error.request = request;\n\t error.response = response;\n\t return error;\n\t};\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction encode(val) {\n\t return encodeURIComponent(val).\n\t replace(/%40/gi, '@').\n\t replace(/%3A/gi, ':').\n\t replace(/%24/g, '$').\n\t replace(/%2C/gi, ',').\n\t replace(/%20/g, '+').\n\t replace(/%5B/gi, '[').\n\t replace(/%5D/gi, ']');\n\t}\n\t\n\t/**\n\t * Build a URL by appending params to the end\n\t *\n\t * @param {string} url The base of the url (e.g., http://www.google.com)\n\t * @param {object} [params] The params to be appended\n\t * @returns {string} The formatted url\n\t */\n\tmodule.exports = function buildURL(url, params, paramsSerializer) {\n\t /*eslint no-param-reassign:0*/\n\t if (!params) {\n\t return url;\n\t }\n\t\n\t var serializedParams;\n\t if (paramsSerializer) {\n\t serializedParams = paramsSerializer(params);\n\t } else if (utils.isURLSearchParams(params)) {\n\t serializedParams = params.toString();\n\t } else {\n\t var parts = [];\n\t\n\t utils.forEach(params, function serialize(val, key) {\n\t if (val === null || typeof val === 'undefined') {\n\t return;\n\t }\n\t\n\t if (utils.isArray(val)) {\n\t key = key + '[]';\n\t } else {\n\t val = [val];\n\t }\n\t\n\t utils.forEach(val, function parseValue(v) {\n\t if (utils.isDate(v)) {\n\t v = v.toISOString();\n\t } else if (utils.isObject(v)) {\n\t v = JSON.stringify(v);\n\t }\n\t parts.push(encode(key) + '=' + encode(v));\n\t });\n\t });\n\t\n\t serializedParams = parts.join('&');\n\t }\n\t\n\t if (serializedParams) {\n\t url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n\t }\n\t\n\t return url;\n\t};\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t// Headers whose duplicates are ignored by node\n\t// c.f. https://nodejs.org/api/http.html#http_message_headers\n\tvar ignoreDuplicateOf = [\n\t 'age', 'authorization', 'content-length', 'content-type', 'etag',\n\t 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n\t 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n\t 'referer', 'retry-after', 'user-agent'\n\t];\n\t\n\t/**\n\t * Parse headers into an object\n\t *\n\t * ```\n\t * Date: Wed, 27 Aug 2014 08:58:49 GMT\n\t * Content-Type: application/json\n\t * Connection: keep-alive\n\t * Transfer-Encoding: chunked\n\t * ```\n\t *\n\t * @param {String} headers Headers needing to be parsed\n\t * @returns {Object} Headers parsed into an object\n\t */\n\tmodule.exports = function parseHeaders(headers) {\n\t var parsed = {};\n\t var key;\n\t var val;\n\t var i;\n\t\n\t if (!headers) { return parsed; }\n\t\n\t utils.forEach(headers.split('\\n'), function parser(line) {\n\t i = line.indexOf(':');\n\t key = utils.trim(line.substr(0, i)).toLowerCase();\n\t val = utils.trim(line.substr(i + 1));\n\t\n\t if (key) {\n\t if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n\t return;\n\t }\n\t if (key === 'set-cookie') {\n\t parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n\t } else {\n\t parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t }\n\t }\n\t });\n\t\n\t return parsed;\n\t};\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs have full support of the APIs needed to test\n\t // whether the request URL is of the same origin as current location.\n\t (function standardBrowserEnv() {\n\t var msie = /(msie|trident)/i.test(navigator.userAgent);\n\t var urlParsingNode = document.createElement('a');\n\t var originURL;\n\t\n\t /**\n\t * Parse a URL to discover it's components\n\t *\n\t * @param {String} url The URL to be parsed\n\t * @returns {Object}\n\t */\n\t function resolveURL(url) {\n\t var href = url;\n\t\n\t if (msie) {\n\t // IE needs attribute set twice to normalize properties\n\t urlParsingNode.setAttribute('href', href);\n\t href = urlParsingNode.href;\n\t }\n\t\n\t urlParsingNode.setAttribute('href', href);\n\t\n\t // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\t return {\n\t href: urlParsingNode.href,\n\t protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n\t host: urlParsingNode.host,\n\t search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n\t hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n\t hostname: urlParsingNode.hostname,\n\t port: urlParsingNode.port,\n\t pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n\t urlParsingNode.pathname :\n\t '/' + urlParsingNode.pathname\n\t };\n\t }\n\t\n\t originURL = resolveURL(window.location.href);\n\t\n\t /**\n\t * Determine if a URL shares the same origin as the current location\n\t *\n\t * @param {String} requestURL The URL to test\n\t * @returns {boolean} True if URL shares the same origin, otherwise false\n\t */\n\t return function isURLSameOrigin(requestURL) {\n\t var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n\t return (parsed.protocol === originURL.protocol &&\n\t parsed.host === originURL.host);\n\t };\n\t })() :\n\t\n\t // Non standard browser envs (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return function isURLSameOrigin() {\n\t return true;\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\t\n\tvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\t\n\tfunction E() {\n\t this.message = 'String contains an invalid character';\n\t}\n\tE.prototype = new Error;\n\tE.prototype.code = 5;\n\tE.prototype.name = 'InvalidCharacterError';\n\t\n\tfunction btoa(input) {\n\t var str = String(input);\n\t var output = '';\n\t for (\n\t // initialize result and counter\n\t var block, charCode, idx = 0, map = chars;\n\t // if the next str index does not exist:\n\t // change the mapping table to \"=\"\n\t // check if d has no fractional digits\n\t str.charAt(idx | 0) || (map = '=', idx % 1);\n\t // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n\t output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n\t ) {\n\t charCode = str.charCodeAt(idx += 3 / 4);\n\t if (charCode > 0xFF) {\n\t throw new E();\n\t }\n\t block = block << 8 | charCode;\n\t }\n\t return output;\n\t}\n\t\n\tmodule.exports = btoa;\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs support document.cookie\n\t (function standardBrowserEnv() {\n\t return {\n\t write: function write(name, value, expires, path, domain, secure) {\n\t var cookie = [];\n\t cookie.push(name + '=' + encodeURIComponent(value));\n\t\n\t if (utils.isNumber(expires)) {\n\t cookie.push('expires=' + new Date(expires).toGMTString());\n\t }\n\t\n\t if (utils.isString(path)) {\n\t cookie.push('path=' + path);\n\t }\n\t\n\t if (utils.isString(domain)) {\n\t cookie.push('domain=' + domain);\n\t }\n\t\n\t if (secure === true) {\n\t cookie.push('secure');\n\t }\n\t\n\t document.cookie = cookie.join('; ');\n\t },\n\t\n\t read: function read(name) {\n\t var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n\t return (match ? decodeURIComponent(match[3]) : null);\n\t },\n\t\n\t remove: function remove(name) {\n\t this.write(name, '', Date.now() - 86400000);\n\t }\n\t };\n\t })() :\n\t\n\t // Non standard browser env (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return {\n\t write: function write() {},\n\t read: function read() { return null; },\n\t remove: function remove() {}\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction InterceptorManager() {\n\t this.handlers = [];\n\t}\n\t\n\t/**\n\t * Add a new interceptor to the stack\n\t *\n\t * @param {Function} fulfilled The function to handle `then` for a `Promise`\n\t * @param {Function} rejected The function to handle `reject` for a `Promise`\n\t *\n\t * @return {Number} An ID used to remove interceptor later\n\t */\n\tInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n\t this.handlers.push({\n\t fulfilled: fulfilled,\n\t rejected: rejected\n\t });\n\t return this.handlers.length - 1;\n\t};\n\t\n\t/**\n\t * Remove an interceptor from the stack\n\t *\n\t * @param {Number} id The ID that was returned by `use`\n\t */\n\tInterceptorManager.prototype.eject = function eject(id) {\n\t if (this.handlers[id]) {\n\t this.handlers[id] = null;\n\t }\n\t};\n\t\n\t/**\n\t * Iterate over all the registered interceptors\n\t *\n\t * This method is particularly useful for skipping over any\n\t * interceptors that may have become `null` calling `eject`.\n\t *\n\t * @param {Function} fn The function to call for each interceptor\n\t */\n\tInterceptorManager.prototype.forEach = function forEach(fn) {\n\t utils.forEach(this.handlers, function forEachHandler(h) {\n\t if (h !== null) {\n\t fn(h);\n\t }\n\t });\n\t};\n\t\n\tmodule.exports = InterceptorManager;\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar transformData = __webpack_require__(19);\n\tvar isCancel = __webpack_require__(20);\n\tvar defaults = __webpack_require__(6);\n\tvar isAbsoluteURL = __webpack_require__(21);\n\tvar combineURLs = __webpack_require__(22);\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tfunction throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}\n\t\n\t/**\n\t * Dispatch a request to the server using the configured adapter.\n\t *\n\t * @param {object} config The config that is to be used for the request\n\t * @returns {Promise} The Promise to be fulfilled\n\t */\n\tmodule.exports = function dispatchRequest(config) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Support baseURL config\n\t if (config.baseURL && !isAbsoluteURL(config.url)) {\n\t config.url = combineURLs(config.baseURL, config.url);\n\t }\n\t\n\t // Ensure headers exist\n\t config.headers = config.headers || {};\n\t\n\t // Transform request data\n\t config.data = transformData(\n\t config.data,\n\t config.headers,\n\t config.transformRequest\n\t );\n\t\n\t // Flatten headers\n\t config.headers = utils.merge(\n\t config.headers.common || {},\n\t config.headers[config.method] || {},\n\t config.headers || {}\n\t );\n\t\n\t utils.forEach(\n\t ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n\t function cleanHeaderConfig(method) {\n\t delete config.headers[method];\n\t }\n\t );\n\t\n\t var adapter = config.adapter || defaults.adapter;\n\t\n\t return adapter(config).then(function onAdapterResolution(response) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t response.data = transformData(\n\t response.data,\n\t response.headers,\n\t config.transformResponse\n\t );\n\t\n\t return response;\n\t }, function onAdapterRejection(reason) {\n\t if (!isCancel(reason)) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t if (reason && reason.response) {\n\t reason.response.data = transformData(\n\t reason.response.data,\n\t reason.response.headers,\n\t config.transformResponse\n\t );\n\t }\n\t }\n\t\n\t return Promise.reject(reason);\n\t });\n\t};\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t/**\n\t * Transform the data for a request or a response\n\t *\n\t * @param {Object|String} data The data to be transformed\n\t * @param {Array} headers The headers for the request or response\n\t * @param {Array|Function} fns A single function or Array of functions\n\t * @returns {*} The resulting transformed data\n\t */\n\tmodule.exports = function transformData(data, headers, fns) {\n\t /*eslint no-param-reassign:0*/\n\t utils.forEach(fns, function transform(fn) {\n\t data = fn(data, headers);\n\t });\n\t\n\t return data;\n\t};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function isCancel(value) {\n\t return !!(value && value.__CANCEL__);\n\t};\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Determines whether the specified URL is absolute\n\t *\n\t * @param {string} url The URL to test\n\t * @returns {boolean} True if the specified URL is absolute, otherwise false\n\t */\n\tmodule.exports = function isAbsoluteURL(url) {\n\t // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n\t // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n\t // by any combination of letters, digits, plus, period, or hyphen.\n\t return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n\t};\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Creates a new URL by combining the specified URLs\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} relativeURL The relative URL\n\t * @returns {string} The combined URL\n\t */\n\tmodule.exports = function combineURLs(baseURL, relativeURL) {\n\t return relativeURL\n\t ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n\t : baseURL;\n\t};\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * A `Cancel` is an object that is thrown when an operation is canceled.\n\t *\n\t * @class\n\t * @param {string=} message The message.\n\t */\n\tfunction Cancel(message) {\n\t this.message = message;\n\t}\n\t\n\tCancel.prototype.toString = function toString() {\n\t return 'Cancel' + (this.message ? ': ' + this.message : '');\n\t};\n\t\n\tCancel.prototype.__CANCEL__ = true;\n\t\n\tmodule.exports = Cancel;\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar Cancel = __webpack_require__(23);\n\t\n\t/**\n\t * A `CancelToken` is an object that can be used to request cancellation of an operation.\n\t *\n\t * @class\n\t * @param {Function} executor The executor function.\n\t */\n\tfunction CancelToken(executor) {\n\t if (typeof executor !== 'function') {\n\t throw new TypeError('executor must be a function.');\n\t }\n\t\n\t var resolvePromise;\n\t this.promise = new Promise(function promiseExecutor(resolve) {\n\t resolvePromise = resolve;\n\t });\n\t\n\t var token = this;\n\t executor(function cancel(message) {\n\t if (token.reason) {\n\t // Cancellation has already been requested\n\t return;\n\t }\n\t\n\t token.reason = new Cancel(message);\n\t resolvePromise(token.reason);\n\t });\n\t}\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n\t if (this.reason) {\n\t throw this.reason;\n\t }\n\t};\n\t\n\t/**\n\t * Returns an object that contains a new `CancelToken` and a function that, when called,\n\t * cancels the `CancelToken`.\n\t */\n\tCancelToken.source = function source() {\n\t var cancel;\n\t var token = new CancelToken(function executor(c) {\n\t cancel = c;\n\t });\n\t return {\n\t token: token,\n\t cancel: cancel\n\t };\n\t};\n\t\n\tmodule.exports = CancelToken;\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Syntactic sugar for invoking a function and expanding an array for arguments.\n\t *\n\t * Common use case would be to use `Function.prototype.apply`.\n\t *\n\t * ```js\n\t * function f(x, y, z) {}\n\t * var args = [1, 2, 3];\n\t * f.apply(null, args);\n\t * ```\n\t *\n\t * With `spread` this example can be re-written.\n\t *\n\t * ```js\n\t * spread(function(x, y, z) {})([1, 2, 3]);\n\t * ```\n\t *\n\t * @param {Function} callback\n\t * @returns {Function}\n\t */\n\tmodule.exports = function spread(callback) {\n\t return function wrap(arr) {\n\t return callback.apply(null, arr);\n\t };\n\t};\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// axios.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap dad8263224c86c166a30","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/is-buffer/index.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, {method: 'get'}, this.defaults, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' &&\n typeof window !== 'undefined' &&\n window.XDomainRequest && !('withCredentials' in request) &&\n !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 10\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 14\n// module chunks = 0","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/btoa.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 17\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 20\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 21\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""}
\ No newline at end of file
diff --git a/express-server/node_modules/axios/index.d.ts b/express-server/node_modules/axios/index.d.ts
new file mode 100644
index 00000000..403fd1af
--- /dev/null
+++ b/express-server/node_modules/axios/index.d.ts
@@ -0,0 +1,131 @@
+export interface AxiosTransformer {
+ (data: any, headers?: any): any;
+}
+
+export interface AxiosAdapter {
+ (config: AxiosRequestConfig): AxiosPromise;
+}
+
+export interface AxiosBasicCredentials {
+ username: string;
+ password: string;
+}
+
+export interface AxiosProxyConfig {
+ host: string;
+ port: number;
+ auth?: {
+ username: string;
+ password:string;
+ }
+}
+
+export interface AxiosRequestConfig {
+ url?: string;
+ method?: string;
+ baseURL?: string;
+ transformRequest?: AxiosTransformer | AxiosTransformer[];
+ transformResponse?: AxiosTransformer | AxiosTransformer[];
+ headers?: any;
+ params?: any;
+ paramsSerializer?: (params: any) => string;
+ data?: any;
+ timeout?: number;
+ withCredentials?: boolean;
+ adapter?: AxiosAdapter;
+ auth?: AxiosBasicCredentials;
+ responseType?: string;
+ xsrfCookieName?: string;
+ xsrfHeaderName?: string;
+ onUploadProgress?: (progressEvent: any) => void;
+ onDownloadProgress?: (progressEvent: any) => void;
+ maxContentLength?: number;
+ validateStatus?: (status: number) => boolean;
+ maxRedirects?: number;
+ httpAgent?: any;
+ httpsAgent?: any;
+ proxy?: AxiosProxyConfig | false;
+ cancelToken?: CancelToken;
+}
+
+export interface AxiosResponse {
+ data: T;
+ status: number;
+ statusText: string;
+ headers: any;
+ config: AxiosRequestConfig;
+ request?: any;
+}
+
+export interface AxiosError extends Error {
+ config: AxiosRequestConfig;
+ code?: string;
+ request?: any;
+ response?: AxiosResponse;
+}
+
+export interface AxiosPromise extends Promise> {
+}
+
+export interface CancelStatic {
+ new (message?: string): Cancel;
+}
+
+export interface Cancel {
+ message: string;
+}
+
+export interface Canceler {
+ (message?: string): void;
+}
+
+export interface CancelTokenStatic {
+ new (executor: (cancel: Canceler) => void): CancelToken;
+ source(): CancelTokenSource;
+}
+
+export interface CancelToken {
+ promise: Promise;
+ reason?: Cancel;
+ throwIfRequested(): void;
+}
+
+export interface CancelTokenSource {
+ token: CancelToken;
+ cancel: Canceler;
+}
+
+export interface AxiosInterceptorManager {
+ use(onFulfilled?: (value: V) => V | Promise, onRejected?: (error: any) => any): number;
+ eject(id: number): void;
+}
+
+export interface AxiosInstance {
+ (config: AxiosRequestConfig): AxiosPromise;
+ (url: string, config?: AxiosRequestConfig): AxiosPromise;
+ defaults: AxiosRequestConfig;
+ interceptors: {
+ request: AxiosInterceptorManager;
+ response: AxiosInterceptorManager;
+ };
+ request(config: AxiosRequestConfig): AxiosPromise;
+ get(url: string, config?: AxiosRequestConfig): AxiosPromise;
+ delete(url: string, config?: AxiosRequestConfig): AxiosPromise;
+ head(url: string, config?: AxiosRequestConfig): AxiosPromise;
+ post(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise;
+ put(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise;
+ patch(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise;
+}
+
+export interface AxiosStatic extends AxiosInstance {
+ create(config?: AxiosRequestConfig): AxiosInstance;
+ Cancel: CancelStatic;
+ CancelToken: CancelTokenStatic;
+ isCancel(value: any): boolean;
+ all(values: (T | Promise)[]): Promise;
+ spread(callback: (...args: T[]) => R): (array: T[]) => R;
+}
+
+declare const Axios: AxiosStatic;
+
+export default Axios;
diff --git a/express-server/node_modules/axios/index.js b/express-server/node_modules/axios/index.js
new file mode 100644
index 00000000..79dfd09d
--- /dev/null
+++ b/express-server/node_modules/axios/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib/axios');
\ No newline at end of file
diff --git a/express-server/node_modules/axios/lib/adapters/README.md b/express-server/node_modules/axios/lib/adapters/README.md
new file mode 100644
index 00000000..68f11189
--- /dev/null
+++ b/express-server/node_modules/axios/lib/adapters/README.md
@@ -0,0 +1,37 @@
+# axios // adapters
+
+The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received.
+
+## Example
+
+```js
+var settle = require('./../core/settle');
+
+module.exports = function myAdapter(config) {
+ // At this point:
+ // - config has been merged with defaults
+ // - request transformers have already run
+ // - request interceptors have already run
+
+ // Make the request using config provided
+ // Upon response settle the Promise
+
+ return new Promise(function(resolve, reject) {
+
+ var response = {
+ data: responseData,
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders,
+ config: config,
+ request: request
+ };
+
+ settle(resolve, reject, response);
+
+ // From here:
+ // - response transformers will run
+ // - response interceptors will run
+ });
+}
+```
diff --git a/express-server/node_modules/axios/lib/adapters/http.js b/express-server/node_modules/axios/lib/adapters/http.js
new file mode 100644
index 00000000..b986487c
--- /dev/null
+++ b/express-server/node_modules/axios/lib/adapters/http.js
@@ -0,0 +1,237 @@
+'use strict';
+
+var utils = require('./../utils');
+var settle = require('./../core/settle');
+var buildURL = require('./../helpers/buildURL');
+var http = require('http');
+var https = require('https');
+var httpFollow = require('follow-redirects').http;
+var httpsFollow = require('follow-redirects').https;
+var url = require('url');
+var zlib = require('zlib');
+var pkg = require('./../../package.json');
+var createError = require('../core/createError');
+var enhanceError = require('../core/enhanceError');
+
+/*eslint consistent-return:0*/
+module.exports = function httpAdapter(config) {
+ return new Promise(function dispatchHttpRequest(resolve, reject) {
+ var data = config.data;
+ var headers = config.headers;
+ var timer;
+
+ // Set User-Agent (required by some servers)
+ // Only set header if it hasn't been set in config
+ // See https://github.com/axios/axios/issues/69
+ if (!headers['User-Agent'] && !headers['user-agent']) {
+ headers['User-Agent'] = 'axios/' + pkg.version;
+ }
+
+ if (data && !utils.isStream(data)) {
+ if (Buffer.isBuffer(data)) {
+ // Nothing to do...
+ } else if (utils.isArrayBuffer(data)) {
+ data = new Buffer(new Uint8Array(data));
+ } else if (utils.isString(data)) {
+ data = new Buffer(data, 'utf-8');
+ } else {
+ return reject(createError(
+ 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
+ config
+ ));
+ }
+
+ // Add Content-Length header if data exists
+ headers['Content-Length'] = data.length;
+ }
+
+ // HTTP basic authentication
+ var auth = undefined;
+ if (config.auth) {
+ var username = config.auth.username || '';
+ var password = config.auth.password || '';
+ auth = username + ':' + password;
+ }
+
+ // Parse url
+ var parsed = url.parse(config.url);
+ var protocol = parsed.protocol || 'http:';
+
+ if (!auth && parsed.auth) {
+ var urlAuth = parsed.auth.split(':');
+ var urlUsername = urlAuth[0] || '';
+ var urlPassword = urlAuth[1] || '';
+ auth = urlUsername + ':' + urlPassword;
+ }
+
+ if (auth) {
+ delete headers.Authorization;
+ }
+
+ var isHttps = protocol === 'https:';
+ var agent = isHttps ? config.httpsAgent : config.httpAgent;
+
+ var options = {
+ path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''),
+ method: config.method,
+ headers: headers,
+ agent: agent,
+ auth: auth
+ };
+
+ if (config.socketPath) {
+ options.socketPath = config.socketPath;
+ } else {
+ options.hostname = parsed.hostname;
+ options.port = parsed.port;
+ }
+
+ var proxy = config.proxy;
+ if (!proxy && proxy !== false) {
+ var proxyEnv = protocol.slice(0, -1) + '_proxy';
+ var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
+ if (proxyUrl) {
+ var parsedProxyUrl = url.parse(proxyUrl);
+ proxy = {
+ host: parsedProxyUrl.hostname,
+ port: parsedProxyUrl.port
+ };
+
+ if (parsedProxyUrl.auth) {
+ var proxyUrlAuth = parsedProxyUrl.auth.split(':');
+ proxy.auth = {
+ username: proxyUrlAuth[0],
+ password: proxyUrlAuth[1]
+ };
+ }
+ }
+ }
+
+ if (proxy) {
+ options.hostname = proxy.host;
+ options.host = proxy.host;
+ options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');
+ options.port = proxy.port;
+ options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path;
+
+ // Basic proxy authorization
+ if (proxy.auth) {
+ var base64 = new Buffer(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');
+ options.headers['Proxy-Authorization'] = 'Basic ' + base64;
+ }
+ }
+
+ var transport;
+ if (config.transport) {
+ transport = config.transport;
+ } else if (config.maxRedirects === 0) {
+ transport = isHttps ? https : http;
+ } else {
+ if (config.maxRedirects) {
+ options.maxRedirects = config.maxRedirects;
+ }
+ transport = isHttps ? httpsFollow : httpFollow;
+ }
+
+ if (config.maxContentLength && config.maxContentLength > -1) {
+ options.maxBodyLength = config.maxContentLength;
+ }
+
+ // Create the request
+ var req = transport.request(options, function handleResponse(res) {
+ if (req.aborted) return;
+
+ // Response has been received so kill timer that handles request timeout
+ clearTimeout(timer);
+ timer = null;
+
+ // uncompress the response body transparently if required
+ var stream = res;
+ switch (res.headers['content-encoding']) {
+ /*eslint default-case:0*/
+ case 'gzip':
+ case 'compress':
+ case 'deflate':
+ // add the unzipper to the body stream processing pipeline
+ stream = stream.pipe(zlib.createUnzip());
+
+ // remove the content-encoding in order to not confuse downstream operations
+ delete res.headers['content-encoding'];
+ break;
+ }
+
+ // return the last request in case of redirects
+ var lastRequest = res.req || req;
+
+ var response = {
+ status: res.statusCode,
+ statusText: res.statusMessage,
+ headers: res.headers,
+ config: config,
+ request: lastRequest
+ };
+
+ if (config.responseType === 'stream') {
+ response.data = stream;
+ settle(resolve, reject, response);
+ } else {
+ var responseBuffer = [];
+ stream.on('data', function handleStreamData(chunk) {
+ responseBuffer.push(chunk);
+
+ // make sure the content length is not over the maxContentLength if specified
+ if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) {
+ reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
+ config, null, lastRequest));
+ }
+ });
+
+ stream.on('error', function handleStreamError(err) {
+ if (req.aborted) return;
+ reject(enhanceError(err, config, null, lastRequest));
+ });
+
+ stream.on('end', function handleStreamEnd() {
+ var responseData = Buffer.concat(responseBuffer);
+ if (config.responseType !== 'arraybuffer') {
+ responseData = responseData.toString('utf8');
+ }
+
+ response.data = responseData;
+ settle(resolve, reject, response);
+ });
+ }
+ });
+
+ // Handle errors
+ req.on('error', function handleRequestError(err) {
+ if (req.aborted) return;
+ reject(enhanceError(err, config, null, req));
+ });
+
+ // Handle request timeout
+ if (config.timeout && !timer) {
+ timer = setTimeout(function handleRequestTimeout() {
+ req.abort();
+ reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req));
+ }, config.timeout);
+ }
+
+ if (config.cancelToken) {
+ // Handle cancellation
+ config.cancelToken.promise.then(function onCanceled(cancel) {
+ if (req.aborted) return;
+
+ req.abort();
+ reject(cancel);
+ });
+ }
+
+ // Send the request
+ if (utils.isStream(data)) {
+ data.pipe(req);
+ } else {
+ req.end(data);
+ }
+ });
+};
diff --git a/express-server/node_modules/axios/lib/adapters/xhr.js b/express-server/node_modules/axios/lib/adapters/xhr.js
new file mode 100644
index 00000000..81364bd5
--- /dev/null
+++ b/express-server/node_modules/axios/lib/adapters/xhr.js
@@ -0,0 +1,180 @@
+'use strict';
+
+var utils = require('./../utils');
+var settle = require('./../core/settle');
+var buildURL = require('./../helpers/buildURL');
+var parseHeaders = require('./../helpers/parseHeaders');
+var isURLSameOrigin = require('./../helpers/isURLSameOrigin');
+var createError = require('../core/createError');
+var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');
+
+module.exports = function xhrAdapter(config) {
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
+ var requestData = config.data;
+ var requestHeaders = config.headers;
+
+ if (utils.isFormData(requestData)) {
+ delete requestHeaders['Content-Type']; // Let the browser set it
+ }
+
+ var request = new XMLHttpRequest();
+ var loadEvent = 'onreadystatechange';
+ var xDomain = false;
+
+ // For IE 8/9 CORS support
+ // Only supports POST and GET calls and doesn't returns the response headers.
+ // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.
+ if (process.env.NODE_ENV !== 'test' &&
+ typeof window !== 'undefined' &&
+ window.XDomainRequest && !('withCredentials' in request) &&
+ !isURLSameOrigin(config.url)) {
+ request = new window.XDomainRequest();
+ loadEvent = 'onload';
+ xDomain = true;
+ request.onprogress = function handleProgress() {};
+ request.ontimeout = function handleTimeout() {};
+ }
+
+ // HTTP basic authentication
+ if (config.auth) {
+ var username = config.auth.username || '';
+ var password = config.auth.password || '';
+ requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
+ }
+
+ request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
+
+ // Set the request timeout in MS
+ request.timeout = config.timeout;
+
+ // Listen for ready state
+ request[loadEvent] = function handleLoad() {
+ if (!request || (request.readyState !== 4 && !xDomain)) {
+ return;
+ }
+
+ // The request errored out and we didn't get a response, this will be
+ // handled by onerror instead
+ // With one exception: request that using file: protocol, most browsers
+ // will return status as 0 even though it's a successful request
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
+ return;
+ }
+
+ // Prepare the response
+ var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
+ var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
+ var response = {
+ data: responseData,
+ // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)
+ status: request.status === 1223 ? 204 : request.status,
+ statusText: request.status === 1223 ? 'No Content' : request.statusText,
+ headers: responseHeaders,
+ config: config,
+ request: request
+ };
+
+ settle(resolve, reject, response);
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle low level network errors
+ request.onerror = function handleError() {
+ // Real errors are hidden from us by the browser
+ // onerror should only fire if it's a network error
+ reject(createError('Network Error', config, null, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle timeout
+ request.ontimeout = function handleTimeout() {
+ reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',
+ request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Add xsrf header
+ // This is only done if running in a standard browser environment.
+ // Specifically not if we're in a web worker, or react-native.
+ if (utils.isStandardBrowserEnv()) {
+ var cookies = require('./../helpers/cookies');
+
+ // Add xsrf header
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?
+ cookies.read(config.xsrfCookieName) :
+ undefined;
+
+ if (xsrfValue) {
+ requestHeaders[config.xsrfHeaderName] = xsrfValue;
+ }
+ }
+
+ // Add headers to the request
+ if ('setRequestHeader' in request) {
+ utils.forEach(requestHeaders, function setRequestHeader(val, key) {
+ if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
+ // Remove Content-Type if data is undefined
+ delete requestHeaders[key];
+ } else {
+ // Otherwise add header to the request
+ request.setRequestHeader(key, val);
+ }
+ });
+ }
+
+ // Add withCredentials to request if needed
+ if (config.withCredentials) {
+ request.withCredentials = true;
+ }
+
+ // Add responseType to request if needed
+ if (config.responseType) {
+ try {
+ request.responseType = config.responseType;
+ } catch (e) {
+ // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
+ // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
+ if (config.responseType !== 'json') {
+ throw e;
+ }
+ }
+ }
+
+ // Handle progress if needed
+ if (typeof config.onDownloadProgress === 'function') {
+ request.addEventListener('progress', config.onDownloadProgress);
+ }
+
+ // Not all browsers support upload events
+ if (typeof config.onUploadProgress === 'function' && request.upload) {
+ request.upload.addEventListener('progress', config.onUploadProgress);
+ }
+
+ if (config.cancelToken) {
+ // Handle cancellation
+ config.cancelToken.promise.then(function onCanceled(cancel) {
+ if (!request) {
+ return;
+ }
+
+ request.abort();
+ reject(cancel);
+ // Clean up request
+ request = null;
+ });
+ }
+
+ if (requestData === undefined) {
+ requestData = null;
+ }
+
+ // Send the request
+ request.send(requestData);
+ });
+};
diff --git a/express-server/node_modules/axios/lib/axios.js b/express-server/node_modules/axios/lib/axios.js
new file mode 100644
index 00000000..ed1f5194
--- /dev/null
+++ b/express-server/node_modules/axios/lib/axios.js
@@ -0,0 +1,52 @@
+'use strict';
+
+var utils = require('./utils');
+var bind = require('./helpers/bind');
+var Axios = require('./core/Axios');
+var defaults = require('./defaults');
+
+/**
+ * Create an instance of Axios
+ *
+ * @param {Object} defaultConfig The default config for the instance
+ * @return {Axios} A new instance of Axios
+ */
+function createInstance(defaultConfig) {
+ var context = new Axios(defaultConfig);
+ var instance = bind(Axios.prototype.request, context);
+
+ // Copy axios.prototype to instance
+ utils.extend(instance, Axios.prototype, context);
+
+ // Copy context to instance
+ utils.extend(instance, context);
+
+ return instance;
+}
+
+// Create the default instance to be exported
+var axios = createInstance(defaults);
+
+// Expose Axios class to allow class inheritance
+axios.Axios = Axios;
+
+// Factory for creating new instances
+axios.create = function create(instanceConfig) {
+ return createInstance(utils.merge(defaults, instanceConfig));
+};
+
+// Expose Cancel & CancelToken
+axios.Cancel = require('./cancel/Cancel');
+axios.CancelToken = require('./cancel/CancelToken');
+axios.isCancel = require('./cancel/isCancel');
+
+// Expose all/spread
+axios.all = function all(promises) {
+ return Promise.all(promises);
+};
+axios.spread = require('./helpers/spread');
+
+module.exports = axios;
+
+// Allow use of default import syntax in TypeScript
+module.exports.default = axios;
diff --git a/express-server/node_modules/axios/lib/cancel/Cancel.js b/express-server/node_modules/axios/lib/cancel/Cancel.js
new file mode 100644
index 00000000..e0de4003
--- /dev/null
+++ b/express-server/node_modules/axios/lib/cancel/Cancel.js
@@ -0,0 +1,19 @@
+'use strict';
+
+/**
+ * A `Cancel` is an object that is thrown when an operation is canceled.
+ *
+ * @class
+ * @param {string=} message The message.
+ */
+function Cancel(message) {
+ this.message = message;
+}
+
+Cancel.prototype.toString = function toString() {
+ return 'Cancel' + (this.message ? ': ' + this.message : '');
+};
+
+Cancel.prototype.__CANCEL__ = true;
+
+module.exports = Cancel;
diff --git a/express-server/node_modules/axios/lib/cancel/CancelToken.js b/express-server/node_modules/axios/lib/cancel/CancelToken.js
new file mode 100644
index 00000000..6b46e666
--- /dev/null
+++ b/express-server/node_modules/axios/lib/cancel/CancelToken.js
@@ -0,0 +1,57 @@
+'use strict';
+
+var Cancel = require('./Cancel');
+
+/**
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
+ *
+ * @class
+ * @param {Function} executor The executor function.
+ */
+function CancelToken(executor) {
+ if (typeof executor !== 'function') {
+ throw new TypeError('executor must be a function.');
+ }
+
+ var resolvePromise;
+ this.promise = new Promise(function promiseExecutor(resolve) {
+ resolvePromise = resolve;
+ });
+
+ var token = this;
+ executor(function cancel(message) {
+ if (token.reason) {
+ // Cancellation has already been requested
+ return;
+ }
+
+ token.reason = new Cancel(message);
+ resolvePromise(token.reason);
+ });
+}
+
+/**
+ * Throws a `Cancel` if cancellation has been requested.
+ */
+CancelToken.prototype.throwIfRequested = function throwIfRequested() {
+ if (this.reason) {
+ throw this.reason;
+ }
+};
+
+/**
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
+ * cancels the `CancelToken`.
+ */
+CancelToken.source = function source() {
+ var cancel;
+ var token = new CancelToken(function executor(c) {
+ cancel = c;
+ });
+ return {
+ token: token,
+ cancel: cancel
+ };
+};
+
+module.exports = CancelToken;
diff --git a/express-server/node_modules/axios/lib/cancel/isCancel.js b/express-server/node_modules/axios/lib/cancel/isCancel.js
new file mode 100644
index 00000000..051f3ae4
--- /dev/null
+++ b/express-server/node_modules/axios/lib/cancel/isCancel.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = function isCancel(value) {
+ return !!(value && value.__CANCEL__);
+};
diff --git a/express-server/node_modules/axios/lib/core/Axios.js b/express-server/node_modules/axios/lib/core/Axios.js
new file mode 100644
index 00000000..d21edbc0
--- /dev/null
+++ b/express-server/node_modules/axios/lib/core/Axios.js
@@ -0,0 +1,79 @@
+'use strict';
+
+var defaults = require('./../defaults');
+var utils = require('./../utils');
+var InterceptorManager = require('./InterceptorManager');
+var dispatchRequest = require('./dispatchRequest');
+
+/**
+ * Create a new instance of Axios
+ *
+ * @param {Object} instanceConfig The default config for the instance
+ */
+function Axios(instanceConfig) {
+ this.defaults = instanceConfig;
+ this.interceptors = {
+ request: new InterceptorManager(),
+ response: new InterceptorManager()
+ };
+}
+
+/**
+ * Dispatch a request
+ *
+ * @param {Object} config The config specific for this request (merged with this.defaults)
+ */
+Axios.prototype.request = function request(config) {
+ /*eslint no-param-reassign:0*/
+ // Allow for axios('example/url'[, config]) a la fetch API
+ if (typeof config === 'string') {
+ config = utils.merge({
+ url: arguments[0]
+ }, arguments[1]);
+ }
+
+ config = utils.merge(defaults, {method: 'get'}, this.defaults, config);
+ config.method = config.method.toLowerCase();
+
+ // Hook up interceptors middleware
+ var chain = [dispatchRequest, undefined];
+ var promise = Promise.resolve(config);
+
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
+ chain.unshift(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
+ chain.push(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ while (chain.length) {
+ promise = promise.then(chain.shift(), chain.shift());
+ }
+
+ return promise;
+};
+
+// Provide aliases for supported request methods
+utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
+ /*eslint func-names:0*/
+ Axios.prototype[method] = function(url, config) {
+ return this.request(utils.merge(config || {}, {
+ method: method,
+ url: url
+ }));
+ };
+});
+
+utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
+ /*eslint func-names:0*/
+ Axios.prototype[method] = function(url, data, config) {
+ return this.request(utils.merge(config || {}, {
+ method: method,
+ url: url,
+ data: data
+ }));
+ };
+});
+
+module.exports = Axios;
diff --git a/express-server/node_modules/axios/lib/core/InterceptorManager.js b/express-server/node_modules/axios/lib/core/InterceptorManager.js
new file mode 100644
index 00000000..50d667bb
--- /dev/null
+++ b/express-server/node_modules/axios/lib/core/InterceptorManager.js
@@ -0,0 +1,52 @@
+'use strict';
+
+var utils = require('./../utils');
+
+function InterceptorManager() {
+ this.handlers = [];
+}
+
+/**
+ * Add a new interceptor to the stack
+ *
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
+ *
+ * @return {Number} An ID used to remove interceptor later
+ */
+InterceptorManager.prototype.use = function use(fulfilled, rejected) {
+ this.handlers.push({
+ fulfilled: fulfilled,
+ rejected: rejected
+ });
+ return this.handlers.length - 1;
+};
+
+/**
+ * Remove an interceptor from the stack
+ *
+ * @param {Number} id The ID that was returned by `use`
+ */
+InterceptorManager.prototype.eject = function eject(id) {
+ if (this.handlers[id]) {
+ this.handlers[id] = null;
+ }
+};
+
+/**
+ * Iterate over all the registered interceptors
+ *
+ * This method is particularly useful for skipping over any
+ * interceptors that may have become `null` calling `eject`.
+ *
+ * @param {Function} fn The function to call for each interceptor
+ */
+InterceptorManager.prototype.forEach = function forEach(fn) {
+ utils.forEach(this.handlers, function forEachHandler(h) {
+ if (h !== null) {
+ fn(h);
+ }
+ });
+};
+
+module.exports = InterceptorManager;
diff --git a/express-server/node_modules/axios/lib/core/README.md b/express-server/node_modules/axios/lib/core/README.md
new file mode 100644
index 00000000..253bc486
--- /dev/null
+++ b/express-server/node_modules/axios/lib/core/README.md
@@ -0,0 +1,7 @@
+# axios // core
+
+The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are:
+
+- Dispatching requests
+- Managing interceptors
+- Handling config
diff --git a/express-server/node_modules/axios/lib/core/createError.js b/express-server/node_modules/axios/lib/core/createError.js
new file mode 100644
index 00000000..933680f6
--- /dev/null
+++ b/express-server/node_modules/axios/lib/core/createError.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var enhanceError = require('./enhanceError');
+
+/**
+ * Create an Error with the specified message, config, error code, request and response.
+ *
+ * @param {string} message The error message.
+ * @param {Object} config The config.
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
+ * @param {Object} [request] The request.
+ * @param {Object} [response] The response.
+ * @returns {Error} The created error.
+ */
+module.exports = function createError(message, config, code, request, response) {
+ var error = new Error(message);
+ return enhanceError(error, config, code, request, response);
+};
diff --git a/express-server/node_modules/axios/lib/core/dispatchRequest.js b/express-server/node_modules/axios/lib/core/dispatchRequest.js
new file mode 100644
index 00000000..9ea70f22
--- /dev/null
+++ b/express-server/node_modules/axios/lib/core/dispatchRequest.js
@@ -0,0 +1,86 @@
+'use strict';
+
+var utils = require('./../utils');
+var transformData = require('./transformData');
+var isCancel = require('../cancel/isCancel');
+var defaults = require('../defaults');
+var isAbsoluteURL = require('./../helpers/isAbsoluteURL');
+var combineURLs = require('./../helpers/combineURLs');
+
+/**
+ * Throws a `Cancel` if cancellation has been requested.
+ */
+function throwIfCancellationRequested(config) {
+ if (config.cancelToken) {
+ config.cancelToken.throwIfRequested();
+ }
+}
+
+/**
+ * Dispatch a request to the server using the configured adapter.
+ *
+ * @param {object} config The config that is to be used for the request
+ * @returns {Promise} The Promise to be fulfilled
+ */
+module.exports = function dispatchRequest(config) {
+ throwIfCancellationRequested(config);
+
+ // Support baseURL config
+ if (config.baseURL && !isAbsoluteURL(config.url)) {
+ config.url = combineURLs(config.baseURL, config.url);
+ }
+
+ // Ensure headers exist
+ config.headers = config.headers || {};
+
+ // Transform request data
+ config.data = transformData(
+ config.data,
+ config.headers,
+ config.transformRequest
+ );
+
+ // Flatten headers
+ config.headers = utils.merge(
+ config.headers.common || {},
+ config.headers[config.method] || {},
+ config.headers || {}
+ );
+
+ utils.forEach(
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
+ function cleanHeaderConfig(method) {
+ delete config.headers[method];
+ }
+ );
+
+ var adapter = config.adapter || defaults.adapter;
+
+ return adapter(config).then(function onAdapterResolution(response) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ response.data = transformData(
+ response.data,
+ response.headers,
+ config.transformResponse
+ );
+
+ return response;
+ }, function onAdapterRejection(reason) {
+ if (!isCancel(reason)) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ if (reason && reason.response) {
+ reason.response.data = transformData(
+ reason.response.data,
+ reason.response.headers,
+ config.transformResponse
+ );
+ }
+ }
+
+ return Promise.reject(reason);
+ });
+};
diff --git a/express-server/node_modules/axios/lib/core/enhanceError.js b/express-server/node_modules/axios/lib/core/enhanceError.js
new file mode 100644
index 00000000..8dfd5b45
--- /dev/null
+++ b/express-server/node_modules/axios/lib/core/enhanceError.js
@@ -0,0 +1,21 @@
+'use strict';
+
+/**
+ * Update an Error with the specified config, error code, and response.
+ *
+ * @param {Error} error The error to update.
+ * @param {Object} config The config.
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
+ * @param {Object} [request] The request.
+ * @param {Object} [response] The response.
+ * @returns {Error} The error.
+ */
+module.exports = function enhanceError(error, config, code, request, response) {
+ error.config = config;
+ if (code) {
+ error.code = code;
+ }
+ error.request = request;
+ error.response = response;
+ return error;
+};
diff --git a/express-server/node_modules/axios/lib/core/settle.js b/express-server/node_modules/axios/lib/core/settle.js
new file mode 100644
index 00000000..8db5e23c
--- /dev/null
+++ b/express-server/node_modules/axios/lib/core/settle.js
@@ -0,0 +1,26 @@
+'use strict';
+
+var createError = require('./createError');
+
+/**
+ * Resolve or reject a Promise based on response status.
+ *
+ * @param {Function} resolve A function that resolves the promise.
+ * @param {Function} reject A function that rejects the promise.
+ * @param {object} response The response.
+ */
+module.exports = function settle(resolve, reject, response) {
+ var validateStatus = response.config.validateStatus;
+ // Note: status is not exposed by XDomainRequest
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
+ resolve(response);
+ } else {
+ reject(createError(
+ 'Request failed with status code ' + response.status,
+ response.config,
+ null,
+ response.request,
+ response
+ ));
+ }
+};
diff --git a/express-server/node_modules/axios/lib/core/transformData.js b/express-server/node_modules/axios/lib/core/transformData.js
new file mode 100644
index 00000000..e0653620
--- /dev/null
+++ b/express-server/node_modules/axios/lib/core/transformData.js
@@ -0,0 +1,20 @@
+'use strict';
+
+var utils = require('./../utils');
+
+/**
+ * Transform the data for a request or a response
+ *
+ * @param {Object|String} data The data to be transformed
+ * @param {Array} headers The headers for the request or response
+ * @param {Array|Function} fns A single function or Array of functions
+ * @returns {*} The resulting transformed data
+ */
+module.exports = function transformData(data, headers, fns) {
+ /*eslint no-param-reassign:0*/
+ utils.forEach(fns, function transform(fn) {
+ data = fn(data, headers);
+ });
+
+ return data;
+};
diff --git a/express-server/node_modules/axios/lib/defaults.js b/express-server/node_modules/axios/lib/defaults.js
new file mode 100644
index 00000000..65a25d51
--- /dev/null
+++ b/express-server/node_modules/axios/lib/defaults.js
@@ -0,0 +1,96 @@
+'use strict';
+
+var utils = require('./utils');
+var normalizeHeaderName = require('./helpers/normalizeHeaderName');
+
+var DEFAULT_CONTENT_TYPE = {
+ 'Content-Type': 'application/x-www-form-urlencoded'
+};
+
+function setContentTypeIfUnset(headers, value) {
+ if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
+ headers['Content-Type'] = value;
+ }
+}
+
+function getDefaultAdapter() {
+ var adapter;
+ if (typeof XMLHttpRequest !== 'undefined') {
+ // For browsers use XHR adapter
+ adapter = require('./adapters/xhr');
+ } else if (typeof process !== 'undefined') {
+ // For node use HTTP adapter
+ adapter = require('./adapters/http');
+ }
+ return adapter;
+}
+
+var defaults = {
+ adapter: getDefaultAdapter(),
+
+ transformRequest: [function transformRequest(data, headers) {
+ normalizeHeaderName(headers, 'Content-Type');
+ if (utils.isFormData(data) ||
+ utils.isArrayBuffer(data) ||
+ utils.isBuffer(data) ||
+ utils.isStream(data) ||
+ utils.isFile(data) ||
+ utils.isBlob(data)
+ ) {
+ return data;
+ }
+ if (utils.isArrayBufferView(data)) {
+ return data.buffer;
+ }
+ if (utils.isURLSearchParams(data)) {
+ setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
+ return data.toString();
+ }
+ if (utils.isObject(data)) {
+ setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
+ return JSON.stringify(data);
+ }
+ return data;
+ }],
+
+ transformResponse: [function transformResponse(data) {
+ /*eslint no-param-reassign:0*/
+ if (typeof data === 'string') {
+ try {
+ data = JSON.parse(data);
+ } catch (e) { /* Ignore */ }
+ }
+ return data;
+ }],
+
+ /**
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
+ * timeout is not created.
+ */
+ timeout: 0,
+
+ xsrfCookieName: 'XSRF-TOKEN',
+ xsrfHeaderName: 'X-XSRF-TOKEN',
+
+ maxContentLength: -1,
+
+ validateStatus: function validateStatus(status) {
+ return status >= 200 && status < 300;
+ }
+};
+
+defaults.headers = {
+ common: {
+ 'Accept': 'application/json, text/plain, */*'
+ }
+};
+
+utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
+ defaults.headers[method] = {};
+});
+
+utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
+});
+
+module.exports = defaults;
diff --git a/express-server/node_modules/axios/lib/helpers/README.md b/express-server/node_modules/axios/lib/helpers/README.md
new file mode 100644
index 00000000..4ae34193
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/README.md
@@ -0,0 +1,7 @@
+# axios // helpers
+
+The modules found in `helpers/` should be generic modules that are _not_ specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like:
+
+- Browser polyfills
+- Managing cookies
+- Parsing HTTP headers
diff --git a/express-server/node_modules/axios/lib/helpers/bind.js b/express-server/node_modules/axios/lib/helpers/bind.js
new file mode 100644
index 00000000..6147c608
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/bind.js
@@ -0,0 +1,11 @@
+'use strict';
+
+module.exports = function bind(fn, thisArg) {
+ return function wrap() {
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
+ return fn.apply(thisArg, args);
+ };
+};
diff --git a/express-server/node_modules/axios/lib/helpers/btoa.js b/express-server/node_modules/axios/lib/helpers/btoa.js
new file mode 100644
index 00000000..2fe50142
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/btoa.js
@@ -0,0 +1,36 @@
+'use strict';
+
+// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js
+
+var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+
+function E() {
+ this.message = 'String contains an invalid character';
+}
+E.prototype = new Error;
+E.prototype.code = 5;
+E.prototype.name = 'InvalidCharacterError';
+
+function btoa(input) {
+ var str = String(input);
+ var output = '';
+ for (
+ // initialize result and counter
+ var block, charCode, idx = 0, map = chars;
+ // if the next str index does not exist:
+ // change the mapping table to "="
+ // check if d has no fractional digits
+ str.charAt(idx | 0) || (map = '=', idx % 1);
+ // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
+ output += map.charAt(63 & block >> 8 - idx % 1 * 8)
+ ) {
+ charCode = str.charCodeAt(idx += 3 / 4);
+ if (charCode > 0xFF) {
+ throw new E();
+ }
+ block = block << 8 | charCode;
+ }
+ return output;
+}
+
+module.exports = btoa;
diff --git a/express-server/node_modules/axios/lib/helpers/buildURL.js b/express-server/node_modules/axios/lib/helpers/buildURL.js
new file mode 100644
index 00000000..be83cd00
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/buildURL.js
@@ -0,0 +1,66 @@
+'use strict';
+
+var utils = require('./../utils');
+
+function encode(val) {
+ return encodeURIComponent(val).
+ replace(/%40/gi, '@').
+ replace(/%3A/gi, ':').
+ replace(/%24/g, '$').
+ replace(/%2C/gi, ',').
+ replace(/%20/g, '+').
+ replace(/%5B/gi, '[').
+ replace(/%5D/gi, ']');
+}
+
+/**
+ * Build a URL by appending params to the end
+ *
+ * @param {string} url The base of the url (e.g., http://www.google.com)
+ * @param {object} [params] The params to be appended
+ * @returns {string} The formatted url
+ */
+module.exports = function buildURL(url, params, paramsSerializer) {
+ /*eslint no-param-reassign:0*/
+ if (!params) {
+ return url;
+ }
+
+ var serializedParams;
+ if (paramsSerializer) {
+ serializedParams = paramsSerializer(params);
+ } else if (utils.isURLSearchParams(params)) {
+ serializedParams = params.toString();
+ } else {
+ var parts = [];
+
+ utils.forEach(params, function serialize(val, key) {
+ if (val === null || typeof val === 'undefined') {
+ return;
+ }
+
+ if (utils.isArray(val)) {
+ key = key + '[]';
+ } else {
+ val = [val];
+ }
+
+ utils.forEach(val, function parseValue(v) {
+ if (utils.isDate(v)) {
+ v = v.toISOString();
+ } else if (utils.isObject(v)) {
+ v = JSON.stringify(v);
+ }
+ parts.push(encode(key) + '=' + encode(v));
+ });
+ });
+
+ serializedParams = parts.join('&');
+ }
+
+ if (serializedParams) {
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
+ }
+
+ return url;
+};
diff --git a/express-server/node_modules/axios/lib/helpers/combineURLs.js b/express-server/node_modules/axios/lib/helpers/combineURLs.js
new file mode 100644
index 00000000..f1b58a58
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/combineURLs.js
@@ -0,0 +1,14 @@
+'use strict';
+
+/**
+ * Creates a new URL by combining the specified URLs
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} relativeURL The relative URL
+ * @returns {string} The combined URL
+ */
+module.exports = function combineURLs(baseURL, relativeURL) {
+ return relativeURL
+ ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
+ : baseURL;
+};
diff --git a/express-server/node_modules/axios/lib/helpers/cookies.js b/express-server/node_modules/axios/lib/helpers/cookies.js
new file mode 100644
index 00000000..e45a4f91
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/cookies.js
@@ -0,0 +1,53 @@
+'use strict';
+
+var utils = require('./../utils');
+
+module.exports = (
+ utils.isStandardBrowserEnv() ?
+
+ // Standard browser envs support document.cookie
+ (function standardBrowserEnv() {
+ return {
+ write: function write(name, value, expires, path, domain, secure) {
+ var cookie = [];
+ cookie.push(name + '=' + encodeURIComponent(value));
+
+ if (utils.isNumber(expires)) {
+ cookie.push('expires=' + new Date(expires).toGMTString());
+ }
+
+ if (utils.isString(path)) {
+ cookie.push('path=' + path);
+ }
+
+ if (utils.isString(domain)) {
+ cookie.push('domain=' + domain);
+ }
+
+ if (secure === true) {
+ cookie.push('secure');
+ }
+
+ document.cookie = cookie.join('; ');
+ },
+
+ read: function read(name) {
+ var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
+ return (match ? decodeURIComponent(match[3]) : null);
+ },
+
+ remove: function remove(name) {
+ this.write(name, '', Date.now() - 86400000);
+ }
+ };
+ })() :
+
+ // Non standard browser env (web workers, react-native) lack needed support.
+ (function nonStandardBrowserEnv() {
+ return {
+ write: function write() {},
+ read: function read() { return null; },
+ remove: function remove() {}
+ };
+ })()
+);
diff --git a/express-server/node_modules/axios/lib/helpers/deprecatedMethod.js b/express-server/node_modules/axios/lib/helpers/deprecatedMethod.js
new file mode 100644
index 00000000..ed40965b
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/deprecatedMethod.js
@@ -0,0 +1,24 @@
+'use strict';
+
+/*eslint no-console:0*/
+
+/**
+ * Supply a warning to the developer that a method they are using
+ * has been deprecated.
+ *
+ * @param {string} method The name of the deprecated method
+ * @param {string} [instead] The alternate method to use if applicable
+ * @param {string} [docs] The documentation URL to get further details
+ */
+module.exports = function deprecatedMethod(method, instead, docs) {
+ try {
+ console.warn(
+ 'DEPRECATED method `' + method + '`.' +
+ (instead ? ' Use `' + instead + '` instead.' : '') +
+ ' This method will be removed in a future release.');
+
+ if (docs) {
+ console.warn('For more information about usage see ' + docs);
+ }
+ } catch (e) { /* Ignore */ }
+};
diff --git a/express-server/node_modules/axios/lib/helpers/isAbsoluteURL.js b/express-server/node_modules/axios/lib/helpers/isAbsoluteURL.js
new file mode 100644
index 00000000..d33e9927
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/isAbsoluteURL.js
@@ -0,0 +1,14 @@
+'use strict';
+
+/**
+ * Determines whether the specified URL is absolute
+ *
+ * @param {string} url The URL to test
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
+ */
+module.exports = function isAbsoluteURL(url) {
+ // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL).
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
+ // by any combination of letters, digits, plus, period, or hyphen.
+ return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
+};
diff --git a/express-server/node_modules/axios/lib/helpers/isURLSameOrigin.js b/express-server/node_modules/axios/lib/helpers/isURLSameOrigin.js
new file mode 100644
index 00000000..e292745f
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/isURLSameOrigin.js
@@ -0,0 +1,68 @@
+'use strict';
+
+var utils = require('./../utils');
+
+module.exports = (
+ utils.isStandardBrowserEnv() ?
+
+ // Standard browser envs have full support of the APIs needed to test
+ // whether the request URL is of the same origin as current location.
+ (function standardBrowserEnv() {
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
+ var urlParsingNode = document.createElement('a');
+ var originURL;
+
+ /**
+ * Parse a URL to discover it's components
+ *
+ * @param {String} url The URL to be parsed
+ * @returns {Object}
+ */
+ function resolveURL(url) {
+ var href = url;
+
+ if (msie) {
+ // IE needs attribute set twice to normalize properties
+ urlParsingNode.setAttribute('href', href);
+ href = urlParsingNode.href;
+ }
+
+ urlParsingNode.setAttribute('href', href);
+
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
+ return {
+ href: urlParsingNode.href,
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
+ host: urlParsingNode.host,
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
+ hostname: urlParsingNode.hostname,
+ port: urlParsingNode.port,
+ pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
+ urlParsingNode.pathname :
+ '/' + urlParsingNode.pathname
+ };
+ }
+
+ originURL = resolveURL(window.location.href);
+
+ /**
+ * Determine if a URL shares the same origin as the current location
+ *
+ * @param {String} requestURL The URL to test
+ * @returns {boolean} True if URL shares the same origin, otherwise false
+ */
+ return function isURLSameOrigin(requestURL) {
+ var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
+ return (parsed.protocol === originURL.protocol &&
+ parsed.host === originURL.host);
+ };
+ })() :
+
+ // Non standard browser envs (web workers, react-native) lack needed support.
+ (function nonStandardBrowserEnv() {
+ return function isURLSameOrigin() {
+ return true;
+ };
+ })()
+);
diff --git a/express-server/node_modules/axios/lib/helpers/normalizeHeaderName.js b/express-server/node_modules/axios/lib/helpers/normalizeHeaderName.js
new file mode 100644
index 00000000..738c9fe4
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/normalizeHeaderName.js
@@ -0,0 +1,12 @@
+'use strict';
+
+var utils = require('../utils');
+
+module.exports = function normalizeHeaderName(headers, normalizedName) {
+ utils.forEach(headers, function processHeader(value, name) {
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
+ headers[normalizedName] = value;
+ delete headers[name];
+ }
+ });
+};
diff --git a/express-server/node_modules/axios/lib/helpers/parseHeaders.js b/express-server/node_modules/axios/lib/helpers/parseHeaders.js
new file mode 100644
index 00000000..8af2cc7f
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/parseHeaders.js
@@ -0,0 +1,53 @@
+'use strict';
+
+var utils = require('./../utils');
+
+// Headers whose duplicates are ignored by node
+// c.f. https://nodejs.org/api/http.html#http_message_headers
+var ignoreDuplicateOf = [
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
+ 'referer', 'retry-after', 'user-agent'
+];
+
+/**
+ * Parse headers into an object
+ *
+ * ```
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
+ * Content-Type: application/json
+ * Connection: keep-alive
+ * Transfer-Encoding: chunked
+ * ```
+ *
+ * @param {String} headers Headers needing to be parsed
+ * @returns {Object} Headers parsed into an object
+ */
+module.exports = function parseHeaders(headers) {
+ var parsed = {};
+ var key;
+ var val;
+ var i;
+
+ if (!headers) { return parsed; }
+
+ utils.forEach(headers.split('\n'), function parser(line) {
+ i = line.indexOf(':');
+ key = utils.trim(line.substr(0, i)).toLowerCase();
+ val = utils.trim(line.substr(i + 1));
+
+ if (key) {
+ if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
+ return;
+ }
+ if (key === 'set-cookie') {
+ parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
+ } else {
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
+ }
+ }
+ });
+
+ return parsed;
+};
diff --git a/express-server/node_modules/axios/lib/helpers/spread.js b/express-server/node_modules/axios/lib/helpers/spread.js
new file mode 100644
index 00000000..25e3cdd3
--- /dev/null
+++ b/express-server/node_modules/axios/lib/helpers/spread.js
@@ -0,0 +1,27 @@
+'use strict';
+
+/**
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
+ *
+ * Common use case would be to use `Function.prototype.apply`.
+ *
+ * ```js
+ * function f(x, y, z) {}
+ * var args = [1, 2, 3];
+ * f.apply(null, args);
+ * ```
+ *
+ * With `spread` this example can be re-written.
+ *
+ * ```js
+ * spread(function(x, y, z) {})([1, 2, 3]);
+ * ```
+ *
+ * @param {Function} callback
+ * @returns {Function}
+ */
+module.exports = function spread(callback) {
+ return function wrap(arr) {
+ return callback.apply(null, arr);
+ };
+};
diff --git a/express-server/node_modules/axios/lib/utils.js b/express-server/node_modules/axios/lib/utils.js
new file mode 100644
index 00000000..b3fd865b
--- /dev/null
+++ b/express-server/node_modules/axios/lib/utils.js
@@ -0,0 +1,303 @@
+'use strict';
+
+var bind = require('./helpers/bind');
+var isBuffer = require('is-buffer');
+
+/*global toString:true*/
+
+// utils is a library of generic helper functions non-specific to axios
+
+var toString = Object.prototype.toString;
+
+/**
+ * Determine if a value is an Array
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is an Array, otherwise false
+ */
+function isArray(val) {
+ return toString.call(val) === '[object Array]';
+}
+
+/**
+ * Determine if a value is an ArrayBuffer
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
+ */
+function isArrayBuffer(val) {
+ return toString.call(val) === '[object ArrayBuffer]';
+}
+
+/**
+ * Determine if a value is a FormData
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is an FormData, otherwise false
+ */
+function isFormData(val) {
+ return (typeof FormData !== 'undefined') && (val instanceof FormData);
+}
+
+/**
+ * Determine if a value is a view on an ArrayBuffer
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
+ */
+function isArrayBufferView(val) {
+ var result;
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
+ result = ArrayBuffer.isView(val);
+ } else {
+ result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
+ }
+ return result;
+}
+
+/**
+ * Determine if a value is a String
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a String, otherwise false
+ */
+function isString(val) {
+ return typeof val === 'string';
+}
+
+/**
+ * Determine if a value is a Number
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a Number, otherwise false
+ */
+function isNumber(val) {
+ return typeof val === 'number';
+}
+
+/**
+ * Determine if a value is undefined
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if the value is undefined, otherwise false
+ */
+function isUndefined(val) {
+ return typeof val === 'undefined';
+}
+
+/**
+ * Determine if a value is an Object
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is an Object, otherwise false
+ */
+function isObject(val) {
+ return val !== null && typeof val === 'object';
+}
+
+/**
+ * Determine if a value is a Date
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a Date, otherwise false
+ */
+function isDate(val) {
+ return toString.call(val) === '[object Date]';
+}
+
+/**
+ * Determine if a value is a File
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+function isFile(val) {
+ return toString.call(val) === '[object File]';
+}
+
+/**
+ * Determine if a value is a Blob
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a Blob, otherwise false
+ */
+function isBlob(val) {
+ return toString.call(val) === '[object Blob]';
+}
+
+/**
+ * Determine if a value is a Function
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a Function, otherwise false
+ */
+function isFunction(val) {
+ return toString.call(val) === '[object Function]';
+}
+
+/**
+ * Determine if a value is a Stream
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a Stream, otherwise false
+ */
+function isStream(val) {
+ return isObject(val) && isFunction(val.pipe);
+}
+
+/**
+ * Determine if a value is a URLSearchParams object
+ *
+ * @param {Object} val The value to test
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
+ */
+function isURLSearchParams(val) {
+ return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
+}
+
+/**
+ * Trim excess whitespace off the beginning and end of a string
+ *
+ * @param {String} str The String to trim
+ * @returns {String} The String freed of excess whitespace
+ */
+function trim(str) {
+ return str.replace(/^\s*/, '').replace(/\s*$/, '');
+}
+
+/**
+ * Determine if we're running in a standard browser environment
+ *
+ * This allows axios to run in a web worker, and react-native.
+ * Both environments support XMLHttpRequest, but not fully standard globals.
+ *
+ * web workers:
+ * typeof window -> undefined
+ * typeof document -> undefined
+ *
+ * react-native:
+ * navigator.product -> 'ReactNative'
+ */
+function isStandardBrowserEnv() {
+ if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
+ return false;
+ }
+ return (
+ typeof window !== 'undefined' &&
+ typeof document !== 'undefined'
+ );
+}
+
+/**
+ * Iterate over an Array or an Object invoking a function for each item.
+ *
+ * If `obj` is an Array callback will be called passing
+ * the value, index, and complete array for each item.
+ *
+ * If 'obj' is an Object callback will be called passing
+ * the value, key, and complete object for each property.
+ *
+ * @param {Object|Array} obj The object to iterate
+ * @param {Function} fn The callback to invoke for each item
+ */
+function forEach(obj, fn) {
+ // Don't bother if no value provided
+ if (obj === null || typeof obj === 'undefined') {
+ return;
+ }
+
+ // Force an array if not already something iterable
+ if (typeof obj !== 'object') {
+ /*eslint no-param-reassign:0*/
+ obj = [obj];
+ }
+
+ if (isArray(obj)) {
+ // Iterate over array values
+ for (var i = 0, l = obj.length; i < l; i++) {
+ fn.call(null, obj[i], i, obj);
+ }
+ } else {
+ // Iterate over object keys
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ fn.call(null, obj[key], key, obj);
+ }
+ }
+ }
+}
+
+/**
+ * Accepts varargs expecting each argument to be an object, then
+ * immutably merges the properties of each object and returns result.
+ *
+ * When multiple objects contain the same key the later object in
+ * the arguments list will take precedence.
+ *
+ * Example:
+ *
+ * ```js
+ * var result = merge({foo: 123}, {foo: 456});
+ * console.log(result.foo); // outputs 456
+ * ```
+ *
+ * @param {Object} obj1 Object to merge
+ * @returns {Object} Result of all merge properties
+ */
+function merge(/* obj1, obj2, obj3, ... */) {
+ var result = {};
+ function assignValue(val, key) {
+ if (typeof result[key] === 'object' && typeof val === 'object') {
+ result[key] = merge(result[key], val);
+ } else {
+ result[key] = val;
+ }
+ }
+
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ forEach(arguments[i], assignValue);
+ }
+ return result;
+}
+
+/**
+ * Extends object a by mutably adding to it the properties of object b.
+ *
+ * @param {Object} a The object to be extended
+ * @param {Object} b The object to copy properties from
+ * @param {Object} thisArg The object to bind function to
+ * @return {Object} The resulting value of object a
+ */
+function extend(a, b, thisArg) {
+ forEach(b, function assignValue(val, key) {
+ if (thisArg && typeof val === 'function') {
+ a[key] = bind(val, thisArg);
+ } else {
+ a[key] = val;
+ }
+ });
+ return a;
+}
+
+module.exports = {
+ isArray: isArray,
+ isArrayBuffer: isArrayBuffer,
+ isBuffer: isBuffer,
+ isFormData: isFormData,
+ isArrayBufferView: isArrayBufferView,
+ isString: isString,
+ isNumber: isNumber,
+ isObject: isObject,
+ isUndefined: isUndefined,
+ isDate: isDate,
+ isFile: isFile,
+ isBlob: isBlob,
+ isFunction: isFunction,
+ isStream: isStream,
+ isURLSearchParams: isURLSearchParams,
+ isStandardBrowserEnv: isStandardBrowserEnv,
+ forEach: forEach,
+ merge: merge,
+ extend: extend,
+ trim: trim
+};
diff --git a/express-server/node_modules/axios/package.json b/express-server/node_modules/axios/package.json
new file mode 100644
index 00000000..27aa3638
--- /dev/null
+++ b/express-server/node_modules/axios/package.json
@@ -0,0 +1,113 @@
+{
+ "_from": "axios@^0.18.0",
+ "_id": "axios@0.18.0",
+ "_inBundle": false,
+ "_integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
+ "_location": "/axios",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "axios@^0.18.0",
+ "name": "axios",
+ "escapedName": "axios",
+ "rawSpec": "^0.18.0",
+ "saveSpec": null,
+ "fetchSpec": "^0.18.0"
+ },
+ "_requiredBy": [
+ "/gcp-metadata",
+ "/google-auth-library",
+ "/googleapis-common",
+ "/gtoken"
+ ],
+ "_resolved": "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
+ "_shasum": "32d53e4851efdc0a11993b6cd000789d70c05102",
+ "_spec": "axios@^0.18.0",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\google-auth-library",
+ "author": {
+ "name": "Matt Zabriskie"
+ },
+ "browser": {
+ "./lib/adapters/http.js": "./lib/adapters/xhr.js"
+ },
+ "bugs": {
+ "url": "https://github.com/axios/axios/issues"
+ },
+ "bundleDependencies": false,
+ "bundlesize": [
+ {
+ "path": "./dist/axios.min.js",
+ "threshold": "5kB"
+ }
+ ],
+ "dependencies": {
+ "follow-redirects": "^1.3.0",
+ "is-buffer": "^1.1.5"
+ },
+ "deprecated": false,
+ "description": "Promise based HTTP client for the browser and node.js",
+ "devDependencies": {
+ "bundlesize": "^0.5.7",
+ "coveralls": "^2.11.9",
+ "es6-promise": "^4.0.5",
+ "grunt": "^1.0.1",
+ "grunt-banner": "^0.6.0",
+ "grunt-cli": "^1.2.0",
+ "grunt-contrib-clean": "^1.0.0",
+ "grunt-contrib-nodeunit": "^1.0.0",
+ "grunt-contrib-watch": "^1.0.0",
+ "grunt-eslint": "^19.0.0",
+ "grunt-karma": "^2.0.0",
+ "grunt-ts": "^6.0.0-beta.3",
+ "grunt-webpack": "^1.0.18",
+ "istanbul-instrumenter-loader": "^1.0.0",
+ "jasmine-core": "^2.4.1",
+ "karma": "^1.3.0",
+ "karma-chrome-launcher": "^2.0.0",
+ "karma-coverage": "^1.0.0",
+ "karma-firefox-launcher": "^1.0.0",
+ "karma-jasmine": "^1.0.2",
+ "karma-jasmine-ajax": "^0.1.13",
+ "karma-opera-launcher": "^1.0.0",
+ "karma-safari-launcher": "^1.0.0",
+ "karma-sauce-launcher": "^1.1.0",
+ "karma-sinon": "^1.0.5",
+ "karma-sourcemap-loader": "^0.3.7",
+ "karma-webpack": "^1.7.0",
+ "load-grunt-tasks": "^3.5.2",
+ "minimist": "^1.2.0",
+ "sinon": "^1.17.4",
+ "typescript": "^2.0.3",
+ "url-search-params": "^0.6.1",
+ "webpack": "^1.13.1",
+ "webpack-dev-server": "^1.14.1"
+ },
+ "homepage": "https://github.com/axios/axios",
+ "keywords": [
+ "xhr",
+ "http",
+ "ajax",
+ "promise",
+ "node"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "axios",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/axios/axios.git"
+ },
+ "scripts": {
+ "build": "NODE_ENV=production grunt build",
+ "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
+ "examples": "node ./examples/server.js",
+ "postversion": "git push && git push --tags",
+ "preversion": "npm test",
+ "start": "node ./sandbox/server.js",
+ "test": "grunt test && bundlesize",
+ "version": "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"
+ },
+ "typings": "./index.d.ts",
+ "version": "0.18.0"
+}
diff --git a/express-server/node_modules/buffer-equal-constant-time/.npmignore b/express-server/node_modules/buffer-equal-constant-time/.npmignore
new file mode 100644
index 00000000..34e4f5c2
--- /dev/null
+++ b/express-server/node_modules/buffer-equal-constant-time/.npmignore
@@ -0,0 +1,2 @@
+.*.sw[mnop]
+node_modules/
diff --git a/express-server/node_modules/buffer-equal-constant-time/.travis.yml b/express-server/node_modules/buffer-equal-constant-time/.travis.yml
new file mode 100644
index 00000000..78e1c014
--- /dev/null
+++ b/express-server/node_modules/buffer-equal-constant-time/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+- "0.11"
+- "0.10"
diff --git a/express-server/node_modules/buffer-equal-constant-time/LICENSE.txt b/express-server/node_modules/buffer-equal-constant-time/LICENSE.txt
new file mode 100644
index 00000000..9a064f3f
--- /dev/null
+++ b/express-server/node_modules/buffer-equal-constant-time/LICENSE.txt
@@ -0,0 +1,12 @@
+Copyright (c) 2013, GoInstant Inc., a salesforce.com company
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+* Neither the name of salesforce.com, nor GoInstant, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/express-server/node_modules/buffer-equal-constant-time/README.md b/express-server/node_modules/buffer-equal-constant-time/README.md
new file mode 100644
index 00000000..4f227f58
--- /dev/null
+++ b/express-server/node_modules/buffer-equal-constant-time/README.md
@@ -0,0 +1,50 @@
+# buffer-equal-constant-time
+
+Constant-time `Buffer` comparison for node.js. Should work with browserify too.
+
+[](https://travis-ci.org/goinstant/buffer-equal-constant-time)
+
+```sh
+ npm install buffer-equal-constant-time
+```
+
+# Usage
+
+```js
+ var bufferEq = require('buffer-equal-constant-time');
+
+ var a = new Buffer('asdf');
+ var b = new Buffer('asdf');
+ if (bufferEq(a,b)) {
+ // the same!
+ } else {
+ // different in at least one byte!
+ }
+```
+
+If you'd like to install an `.equal()` method onto the node.js `Buffer` and
+`SlowBuffer` prototypes:
+
+```js
+ require('buffer-equal-constant-time').install();
+
+ var a = new Buffer('asdf');
+ var b = new Buffer('asdf');
+ if (a.equal(b)) {
+ // the same!
+ } else {
+ // different in at least one byte!
+ }
+```
+
+To get rid of the installed `.equal()` method, call `.restore()`:
+
+```js
+ require('buffer-equal-constant-time').restore();
+```
+
+# Legal
+
+© 2013 GoInstant Inc., a salesforce.com company
+
+Licensed under the BSD 3-clause license.
diff --git a/express-server/node_modules/buffer-equal-constant-time/index.js b/express-server/node_modules/buffer-equal-constant-time/index.js
new file mode 100644
index 00000000..5462c1f8
--- /dev/null
+++ b/express-server/node_modules/buffer-equal-constant-time/index.js
@@ -0,0 +1,41 @@
+/*jshint node:true */
+'use strict';
+var Buffer = require('buffer').Buffer; // browserify
+var SlowBuffer = require('buffer').SlowBuffer;
+
+module.exports = bufferEq;
+
+function bufferEq(a, b) {
+
+ // shortcutting on type is necessary for correctness
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
+ return false;
+ }
+
+ // buffer sizes should be well-known information, so despite this
+ // shortcutting, it doesn't leak any information about the *contents* of the
+ // buffers.
+ if (a.length !== b.length) {
+ return false;
+ }
+
+ var c = 0;
+ for (var i = 0; i < a.length; i++) {
+ /*jshint bitwise:false */
+ c |= a[i] ^ b[i]; // XOR
+ }
+ return c === 0;
+}
+
+bufferEq.install = function() {
+ Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {
+ return bufferEq(this, that);
+ };
+};
+
+var origBufEqual = Buffer.prototype.equal;
+var origSlowBufEqual = SlowBuffer.prototype.equal;
+bufferEq.restore = function() {
+ Buffer.prototype.equal = origBufEqual;
+ SlowBuffer.prototype.equal = origSlowBufEqual;
+};
diff --git a/express-server/node_modules/buffer-equal-constant-time/package.json b/express-server/node_modules/buffer-equal-constant-time/package.json
new file mode 100644
index 00000000..f3e1d63e
--- /dev/null
+++ b/express-server/node_modules/buffer-equal-constant-time/package.json
@@ -0,0 +1,55 @@
+{
+ "_from": "buffer-equal-constant-time@1.0.1",
+ "_id": "buffer-equal-constant-time@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=",
+ "_location": "/buffer-equal-constant-time",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "buffer-equal-constant-time@1.0.1",
+ "name": "buffer-equal-constant-time",
+ "escapedName": "buffer-equal-constant-time",
+ "rawSpec": "1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "1.0.1"
+ },
+ "_requiredBy": [
+ "/jwa"
+ ],
+ "_resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+ "_shasum": "f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819",
+ "_spec": "buffer-equal-constant-time@1.0.1",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\jwa",
+ "author": {
+ "name": "GoInstant Inc., a salesforce.com company"
+ },
+ "bugs": {
+ "url": "https://github.com/goinstant/buffer-equal-constant-time/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Constant-time comparison of Buffers",
+ "devDependencies": {
+ "mocha": "~1.15.1"
+ },
+ "homepage": "https://github.com/goinstant/buffer-equal-constant-time#readme",
+ "keywords": [
+ "buffer",
+ "equal",
+ "constant-time",
+ "crypto"
+ ],
+ "license": "BSD-3-Clause",
+ "main": "index.js",
+ "name": "buffer-equal-constant-time",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/goinstant/buffer-equal-constant-time.git"
+ },
+ "scripts": {
+ "test": "mocha test.js"
+ },
+ "version": "1.0.1"
+}
diff --git a/express-server/node_modules/buffer-equal-constant-time/test.js b/express-server/node_modules/buffer-equal-constant-time/test.js
new file mode 100644
index 00000000..0bc972d8
--- /dev/null
+++ b/express-server/node_modules/buffer-equal-constant-time/test.js
@@ -0,0 +1,42 @@
+/*jshint node:true */
+'use strict';
+
+var bufferEq = require('./index');
+var assert = require('assert');
+
+describe('buffer-equal-constant-time', function() {
+ var a = new Buffer('asdfasdf123456');
+ var b = new Buffer('asdfasdf123456');
+ var c = new Buffer('asdfasdf');
+
+ describe('bufferEq', function() {
+ it('says a == b', function() {
+ assert.strictEqual(bufferEq(a, b), true);
+ });
+
+ it('says a != c', function() {
+ assert.strictEqual(bufferEq(a, c), false);
+ });
+ });
+
+ describe('install/restore', function() {
+ before(function() {
+ bufferEq.install();
+ });
+ after(function() {
+ bufferEq.restore();
+ });
+
+ it('installed an .equal method', function() {
+ var SlowBuffer = require('buffer').SlowBuffer;
+ assert.ok(Buffer.prototype.equal);
+ assert.ok(SlowBuffer.prototype.equal);
+ });
+
+ it('infected existing Buffers', function() {
+ assert.strictEqual(a.equal(b), true);
+ assert.strictEqual(a.equal(c), false);
+ });
+ });
+
+});
diff --git a/express-server/node_modules/cookie-session/HISTORY.md b/express-server/node_modules/cookie-session/HISTORY.md
new file mode 100644
index 00000000..b75a4a0c
--- /dev/null
+++ b/express-server/node_modules/cookie-session/HISTORY.md
@@ -0,0 +1,129 @@
+2.0.0-beta.3 / 2017-10-13
+=========================
+
+ * deps: cookies@0.7.1
+ - deps: depd@~1.1.1
+ - deps: keygrip@~1.0.2
+ * deps: debug@3.1.0
+ - Add `DEBUG_HIDE_DATE`
+ - Add 256 color mode support
+ - Enable / disable namespaces dynamically
+ - Make millisecond timer namespace-specific
+ - Remove `DEBUG_FD` support
+ - Use `Date#toISOString()` when output is not a TTY
+ * deps: safe-buffer@5.1.1
+
+2.0.0-beta.2 / 2017-05-23
+=========================
+
+ * Create new session for all types of invalid sessions
+ * Use `safe-buffer` for improved Buffer API
+ * deps: debug@2.6.8
+ - Fix `DEBUG_MAX_ARRAY_LENGTH`
+ - deps: ms@2.0.0
+
+2.0.0-beta.1 / 2017-02-19
+==========================
+
+ * Drop support for Node.js 0.8
+ * deps: cookies@0.7.0
+ - Add `sameSite` option for SameSite cookie support
+ - pref: enable strict mode
+
+2.0.0-alpha.3 / 2017-02-12
+==========================
+
+ * Use `Object.defineProperty` instead of deprecated `__define*__`
+ * deps: cookies@0.6.2
+ - deps: keygrip@~1.0.1
+ * deps: debug@2.6.1
+ - Allow colors in workers
+ - Deprecated `DEBUG_FD` environment variable set to `3` or higher
+ - Fix error when running under React Native
+ - Use same color for same namespace
+ - deps: ms@0.7.2
+
+2.0.0-alpha.2 / 2016-11-10
+==========================
+
+ * deps: cookies@0.6.1
+ * deps: debug@2.3.2
+ - Fix error when running under React Native
+ - deps: ms@0.7.2
+
+2.0.0-alpha.1 / 2015-10-11
+==========================
+
+ * Change default cookie name to `session`
+ * Change `.populated` to `.isPopulated`
+ * Remove the `key` option; use `name` instead
+ * Save all enumerable properties on `req.session`
+ - Including `_`-prefixed properties
+ * perf: reduce the scope of try-catch deopt
+ * deps: cookies@0.5.1
+ - Throw on invalid values provided to `Cookie` constructor
+ * deps: on-headers@~1.0.1
+ - perf: enable strict mode
+
+1.3.2 / 2017-09-24
+==================
+
+ * deps: debug@2.6.9
+
+1.3.1 / 2017-08-27
+==================
+
+ * deps: cookies@0.7.1
+ - deps: depd@~1.1.1
+ - deps: keygrip@~1.0.2
+
+1.3.0 / 2017-08-03
+==================
+
+ * deps: cookies@0.7.0
+ - Add `sameSite` option for SameSite cookie support
+ - Throw on invalid values provided to `Cookie` constructor
+ - deps: keygrip@~1.0.1
+ - pref: enable strict mode
+ * deps: debug@2.6.8
+ - Allow colors in workers
+ - Deprecate `DEBUG_FD` environment variable set to 3 or higher
+ - Fix error when running under React Native
+ - Use same color for same namespace
+ - deps: ms@2.0.0
+ * deps: on-headers@~1.0.1
+ - perf: enable strict mode
+
+1.2.0 / 2015-07-01
+==================
+
+ * Make `isNew` non-enumerable and non-writeable
+ * Make `req.sessionOptions` a shallow clone to override per-request
+ * deps: debug@~2.2.0
+ - Fix high intensity foreground color for bold
+ - deps: ms@0.7.0
+ * perf: enable strict mode
+ * perf: remove argument reassignments
+
+1.1.0 / 2014-11-09
+==================
+
+ * Fix errors setting cookies to be non-fatal
+ * Use `on-headers` instead of `writeHead` patching
+ * deps: cookies@0.5.0
+ * deps: debug@~2.1.0
+
+1.0.2 / 2014-05-07
+==================
+
+ * Add `name` option
+
+1.0.1 / 2014-02-24
+==================
+
+ * Fix duplicate `dependencies` in `package.json`
+
+1.0.0 / 2014-02-23
+==================
+
+ * Initial release
diff --git a/express-server/node_modules/cookie-session/LICENSE b/express-server/node_modules/cookie-session/LICENSE
new file mode 100644
index 00000000..eb614c5f
--- /dev/null
+++ b/express-server/node_modules/cookie-session/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2013 Jonathan Ong
+Copyright (c) 2014-2017 Douglas Christopher Wilson
+
+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/express-server/node_modules/cookie-session/README.md b/express-server/node_modules/cookie-session/README.md
new file mode 100644
index 00000000..27ac2125
--- /dev/null
+++ b/express-server/node_modules/cookie-session/README.md
@@ -0,0 +1,252 @@
+# cookie-session
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Simple cookie-based session middleware.
+
+A user session can be stored in two main ways with cookies: on the server or on
+the client. This module stores the session data on the client within a cookie,
+while a module like [express-session](https://www.npmjs.com/package/express-session)
+stores only a session identifier on the client within a cookie and stores the
+session data on the server, typically in a database.
+
+The following points can help you choose which to use:
+
+ * `cookie-session` does not require any database / resources on the server side,
+ though the total session data cannot exceed the browser's max cookie size.
+ * `cookie-session` can simplify certain load-balanced scenarios.
+ * `cookie-session` can be used to store a "light" session and include an identifier
+ to look up a database-backed secondary store to reduce database lookups.
+
+## Install
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```sh
+$ npm install cookie-session
+```
+
+## API
+
+```js
+var cookieSession = require('cookie-session')
+var express = require('express')
+
+var app = express()
+
+app.use(cookieSession({
+ name: 'session',
+ keys: [/* secret keys */],
+
+ // Cookie Options
+ maxAge: 24 * 60 * 60 * 1000 // 24 hours
+}))
+```
+
+### cookieSession(options)
+
+Create a new cookie session middleware with the provided options. This middleware
+will attach the property `session` to `req`, which provides an object representing
+the loaded session. This session is either a new session if no valid session was
+provided in the request, or a loaded session from the request.
+
+The middleware will automatically add a `Set-Cookie` header to the response if the
+contents of `req.session` were altered. _Note_ that no `Set-Cookie` header will be
+in the response (and thus no session created for a specific user) unless there are
+contents in the session, so be sure to add something to `req.session` as soon as
+you have identifying information to store for the session.
+
+#### Options
+
+Cookie session accepts these properties in the options object.
+
+##### name
+
+The name of the cookie to set, defaults to `session`.
+
+##### keys
+
+The list of keys to use to sign & verify cookie values. Set cookies are always
+signed with `keys[0]`, while the other keys are valid for verification, allowing
+for key rotation.
+
+##### secret
+
+A string which will be used as single key if `keys` is not provided.
+
+##### Cookie Options
+
+Other options are passed to `cookies.get()` and `cookies.set()` allowing you
+to control security, domain, path, and signing among other settings.
+
+The options can also contain any of the following (for the full list, see
+[cookies module documentation](https://www.npmjs.org/package/cookies#readme):
+
+ - `maxAge`: a number representing the milliseconds from `Date.now()` for expiry
+ - `expires`: a `Date` object indicating the cookie's expiration date (expires at the end of session by default).
+ - `path`: a string indicating the path of the cookie (`/` by default).
+ - `domain`: a string indicating the domain of the cookie (no default).
+ - `sameSite`: a boolean or string indicating whether the cookie is a "same site" cookie (`false` by default). This can be set to `'strict'`, `'lax'`, or `true` (which maps to `'strict'`).
+ - `secure`: a boolean indicating whether the cookie is only to be sent over HTTPS (`false` by default for HTTP, `true` by default for HTTPS). If this is set to `true` and Node.js is not directly over a TLS connection, be sure to read how to [setup Express behind proxies](https://expressjs.com/en/guide/behind-proxies.html) or the cookie may not ever set correctly.
+ - `httpOnly`: a boolean indicating whether the cookie is only to be sent over HTTP(S), and not made available to client JavaScript (`true` by default).
+ - `signed`: a boolean indicating whether the cookie is to be signed (`true` by default). If this is true, another cookie of the same name with the `.sig` suffix appended will also be sent, with a 27-byte url-safe base64 SHA1 value representing the hash of _cookie-name_=_cookie-value_ against the first [Keygrip](https://github.com/expressjs/keygrip) key. This signature key is used to detect tampering the next time a cookie is received.
+ - `overwrite`: a boolean indicating whether to overwrite previously set cookies of the same name (`true` by default). If this is true, all cookies set during the same request with the same name (regardless of path or domain) are filtered out of the Set-Cookie header when setting this cookie.
+
+### req.session
+
+Represents the session for the given request.
+
+#### .isChanged
+
+Is `true` if the session has been changed during the request.
+
+#### .isNew
+
+Is `true` if the session is new.
+
+#### .isPopulated
+
+Determine if the session has been populated with data or is empty.
+
+### req.sessionOptions
+
+Represents the session options for the current request. These options are a
+shallow clone of what was provided at middleware construction and can be
+altered to change cookie setting behavior on a per-request basis.
+
+### Destroying a session
+
+To destroy a session simply set it to `null`:
+
+```
+req.session = null
+```
+
+## Examples
+
+### Simple view counter example
+
+```js
+var cookieSession = require('cookie-session')
+var express = require('express')
+
+var app = express()
+
+app.set('trust proxy', 1) // trust first proxy
+
+app.use(cookieSession({
+ name: 'session',
+ keys: ['key1', 'key2']
+}))
+
+app.get('/', function (req, res, next) {
+ // Update views
+ req.session.views = (req.session.views || 0) + 1
+
+ // Write response
+ res.end(req.session.views + ' views')
+})
+
+app.listen(3000)
+```
+
+### Per-user sticky max age
+
+```js
+var cookieSession = require('cookie-session')
+var express = require('express')
+
+var app = express()
+
+app.set('trust proxy', 1) // trust first proxy
+
+app.use(cookieSession({
+ name: 'session',
+ keys: ['key1', 'key2']
+}))
+
+// This allows you to set req.session.maxAge to let certain sessions
+// have a different value than the default.
+app.use(function (req, res, next) {
+ req.sessionOptions.maxAge = req.session.maxAge || req.sessionOptions.maxAge
+ next()
+})
+
+// ... your logic here ...
+```
+
+### Extending the session expiration
+
+This module does not send a `Set-Cookie` header if the contents of the session
+have not changed. This means that to extend the expiration of a session in the
+user's browser (in response to user activity, for example) some kind of
+modification to the session needs be made.
+
+```js
+var cookieSession = require('cookie-session')
+var express = require('express')
+
+var app = express()
+
+app.use(cookieSession({
+ name: 'session',
+ keys: ['key1', 'key2']
+}))
+
+// Update a value in the cookie so that the set-cookie will be sent.
+// Only changes every minute so that it's not sent with every request.
+app.use(function (req, res, next) {
+ req.session.nowInMinutes = Math.floor(Date.now() / 60e3)
+ next()
+})
+
+// ... your logic here ...
+```
+
+## Usage Limitations
+
+### Max Cookie Size
+
+Because the entire session object is encoded and stored in a cookie, it is
+possible to exceed the maxium cookie size limits on different browsers. The
+[RFC6265 specification](https://tools.ietf.org/html/rfc6265#section-6.1)
+recommends that a browser **SHOULD** allow
+
+> At least 4096 bytes per cookie (as measured by the sum of the length of
+> the cookie's name, value, and attributes)
+
+In practice this limit differs slightly across browsers. See a list of
+[browser limits here](http://browsercookielimits.squawky.net/). As a rule
+of thumb **don't exceed 4093 bytes per domain**.
+
+If your session object is large enough to exceed a browser limit when encoded,
+in most cases the browser will refuse to store the cookie. This will cause the
+following requests from the browser to either a) not have any session
+information or b) use old session information that was small enough to not
+exceed the cookie limit.
+
+If you find your session object is hitting these limits, it is best to
+consider if data in your session should be loaded from a database on the
+server instead of transmitted to/from the browser with every request. Or
+move to an [alternative session strategy](https://github.com/expressjs/session#compatible-session-stores)
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/cookie-session.svg
+[npm-url]: https://npmjs.org/package/cookie-session
+[travis-image]: https://img.shields.io/travis/expressjs/cookie-session/master.svg
+[travis-url]: https://travis-ci.org/expressjs/cookie-session
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/cookie-session.svg
+[coveralls-url]: https://coveralls.io/r/expressjs/cookie-session?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/cookie-session.svg
+[downloads-url]: https://npmjs.org/package/cookie-session
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
+[gratipay-url]: https://www.gratipay.com/dougwilson/
diff --git a/express-server/node_modules/cookie-session/index.js b/express-server/node_modules/cookie-session/index.js
new file mode 100644
index 00000000..365ecfaa
--- /dev/null
+++ b/express-server/node_modules/cookie-session/index.js
@@ -0,0 +1,330 @@
+/*!
+ * cookie-session
+ * Copyright(c) 2013 Jonathan Ong
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var Buffer = require('safe-buffer').Buffer
+var debug = require('debug')('cookie-session')
+var Cookies = require('cookies')
+var onHeaders = require('on-headers')
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = cookieSession
+
+/**
+ * Create a new cookie session middleware.
+ *
+ * @param {object} [options]
+ * @param {boolean} [options.httpOnly=true]
+ * @param {array} [options.keys]
+ * @param {string} [options.name=session] Name of the cookie to use
+ * @param {boolean} [options.overwrite=true]
+ * @param {string} [options.secret]
+ * @param {boolean} [options.signed=true]
+ * @return {function} middleware
+ * @public
+ */
+
+function cookieSession (options) {
+ var opts = options || {}
+
+ // cookie name
+ var name = opts.name || 'session'
+
+ // secrets
+ var keys = opts.keys
+ if (!keys && opts.secret) keys = [opts.secret]
+
+ // defaults
+ if (opts.overwrite == null) opts.overwrite = true
+ if (opts.httpOnly == null) opts.httpOnly = true
+ if (opts.signed == null) opts.signed = true
+
+ if (!keys && opts.signed) throw new Error('.keys required.')
+
+ debug('session options %j', opts)
+
+ return function _cookieSession (req, res, next) {
+ var cookies = new Cookies(req, res, {
+ keys: keys
+ })
+ var sess
+
+ // to pass to Session()
+ req.sessionCookies = cookies
+ req.sessionOptions = Object.create(opts)
+ req.sessionKey = name
+
+ // define req.session getter / setter
+ Object.defineProperty(req, 'session', {
+ configurable: true,
+ enumerable: true,
+ get: getSession,
+ set: setSession
+ })
+
+ function getSession () {
+ // already retrieved
+ if (sess) {
+ return sess
+ }
+
+ // unset
+ if (sess === false) {
+ return null
+ }
+
+ // get or create session
+ return (sess = tryGetSession(req) || createSession(req))
+ }
+
+ function setSession (val) {
+ if (val == null) {
+ // unset session
+ sess = false
+ return val
+ }
+
+ if (typeof val === 'object') {
+ // create a new session
+ sess = Session.create(this, val)
+ return sess
+ }
+
+ throw new Error('req.session can only be set as null or an object.')
+ }
+
+ onHeaders(res, function setHeaders () {
+ if (sess === undefined) {
+ // not accessed
+ return
+ }
+
+ try {
+ if (sess === false) {
+ // remove
+ cookies.set(name, '', req.sessionOptions)
+ } else if ((!sess.isNew || sess.isPopulated) && sess.isChanged) {
+ // save populated or non-new changed session
+ sess.save()
+ }
+ } catch (e) {
+ debug('error saving session %s', e.message)
+ }
+ })
+
+ next()
+ }
+};
+
+/**
+ * Session model.
+ *
+ * @param {Context} ctx
+ * @param {Object} obj
+ * @private
+ */
+
+function Session (ctx, obj) {
+ Object.defineProperty(this, '_ctx', {
+ value: ctx
+ })
+
+ if (obj) {
+ for (var key in obj) {
+ this[key] = obj[key]
+ }
+ }
+}
+
+/**
+ * Create new session.
+ * @private
+ */
+
+Session.create = function create (req, obj) {
+ var ctx = new SessionContext(req)
+ return new Session(ctx, obj)
+}
+
+/**
+ * Create session from serialized form.
+ * @private
+ */
+
+Session.deserialize = function deserialize (req, str) {
+ var ctx = new SessionContext(req)
+ var obj = decode(str)
+
+ ctx._new = false
+ ctx._val = str
+
+ return new Session(ctx, obj)
+}
+
+/**
+ * Serialize a session to a string.
+ * @private
+ */
+
+Session.serialize = function serialize (sess) {
+ return encode(sess)
+}
+
+/**
+ * Return if the session is changed for this request.
+ *
+ * @return {Boolean}
+ * @public
+ */
+
+Object.defineProperty(Session.prototype, 'isChanged', {
+ get: function getIsChanged () {
+ return this._ctx._new || this._ctx._val !== Session.serialize(this)
+ }
+})
+
+/**
+ * Return if the session is new for this request.
+ *
+ * @return {Boolean}
+ * @public
+ */
+
+Object.defineProperty(Session.prototype, 'isNew', {
+ get: function getIsNew () {
+ return this._ctx._new
+ }
+})
+
+/**
+ * Return how many values there are in the session object.
+ * Used to see if it's "populated".
+ *
+ * @return {Number}
+ * @public
+ */
+
+Object.defineProperty(Session.prototype, 'length', {
+ get: function getLength () {
+ return Object.keys(this).length
+ }
+})
+
+/**
+ * populated flag, which is just a boolean alias of .length.
+ *
+ * @return {Boolean}
+ * @public
+ */
+
+Object.defineProperty(Session.prototype, 'isPopulated', {
+ get: function getIsPopulated () {
+ return Boolean(this.length)
+ }
+})
+
+/**
+ * Save session changes by performing a Set-Cookie.
+ * @private
+ */
+
+Session.prototype.save = function save () {
+ var ctx = this._ctx
+ var val = Session.serialize(this)
+
+ var cookies = ctx.req.sessionCookies
+ var name = ctx.req.sessionKey
+ var opts = ctx.req.sessionOptions
+
+ debug('save %s', val)
+ cookies.set(name, val, opts)
+}
+
+/**
+ * Session context to tie session to req.
+ *
+ * @param {Request} req
+ * @private
+ */
+
+function SessionContext (req) {
+ this.req = req
+
+ this._new = true
+ this._val = undefined
+}
+
+/**
+ * Create a new session.
+ * @private
+ */
+
+function createSession (req) {
+ debug('new session')
+ return Session.create(req)
+}
+
+/**
+ * Decode the base64 cookie value to an object.
+ *
+ * @param {String} string
+ * @return {Object}
+ * @private
+ */
+
+function decode (string) {
+ var body = Buffer.from(string, 'base64').toString('utf8')
+ return JSON.parse(body)
+}
+
+/**
+ * Encode an object into a base64-encoded JSON string.
+ *
+ * @param {Object} body
+ * @return {String}
+ * @private
+ */
+
+function encode (body) {
+ var str = JSON.stringify(body)
+ return Buffer.from(str).toString('base64')
+}
+
+/**
+ * Try getting a session from a request.
+ * @private
+ */
+
+function tryGetSession (req) {
+ var cookies = req.sessionCookies
+ var name = req.sessionKey
+ var opts = req.sessionOptions
+
+ var str = cookies.get(name, opts)
+
+ if (!str) {
+ return undefined
+ }
+
+ debug('parse %s', str)
+
+ try {
+ return Session.deserialize(req, str)
+ } catch (err) {
+ return undefined
+ }
+}
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/.coveralls.yml b/express-server/node_modules/cookie-session/node_modules/debug/.coveralls.yml
new file mode 100644
index 00000000..20a70685
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/.eslintrc b/express-server/node_modules/cookie-session/node_modules/debug/.eslintrc
new file mode 100644
index 00000000..146371ed
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/.eslintrc
@@ -0,0 +1,14 @@
+{
+ "env": {
+ "browser": true,
+ "node": true
+ },
+ "globals": {
+ "chrome": true
+ },
+ "rules": {
+ "no-console": 0,
+ "no-empty": [1, { "allowEmptyCatch": true }]
+ },
+ "extends": "eslint:recommended"
+}
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/.npmignore b/express-server/node_modules/cookie-session/node_modules/debug/.npmignore
new file mode 100644
index 00000000..5f60eecc
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/.npmignore
@@ -0,0 +1,9 @@
+support
+test
+examples
+example
+*.sock
+dist
+yarn.lock
+coverage
+bower.json
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/.travis.yml b/express-server/node_modules/cookie-session/node_modules/debug/.travis.yml
new file mode 100644
index 00000000..a7643003
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/.travis.yml
@@ -0,0 +1,20 @@
+sudo: false
+
+language: node_js
+
+node_js:
+ - "4"
+ - "6"
+ - "8"
+
+install:
+ - make install
+
+script:
+ - make lint
+ - make test
+
+matrix:
+ include:
+ - node_js: '8'
+ env: BROWSER=1
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/CHANGELOG.md b/express-server/node_modules/cookie-session/node_modules/debug/CHANGELOG.md
new file mode 100644
index 00000000..820d21e3
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/CHANGELOG.md
@@ -0,0 +1,395 @@
+
+3.1.0 / 2017-09-26
+==================
+
+ * Add `DEBUG_HIDE_DATE` env var (#486)
+ * Remove ReDoS regexp in %o formatter (#504)
+ * Remove "component" from package.json
+ * Remove `component.json`
+ * Ignore package-lock.json
+ * Examples: fix colors printout
+ * Fix: browser detection
+ * Fix: spelling mistake (#496, @EdwardBetts)
+
+3.0.1 / 2017-08-24
+==================
+
+ * Fix: Disable colors in Edge and Internet Explorer (#489)
+
+3.0.0 / 2017-08-08
+==================
+
+ * Breaking: Remove DEBUG_FD (#406)
+ * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
+ * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
+ * Addition: document `enabled` flag (#465)
+ * Addition: add 256 colors mode (#481)
+ * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
+ * Update: component: update "ms" to v2.0.0
+ * Update: separate the Node and Browser tests in Travis-CI
+ * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
+ * Update: separate Node.js and web browser examples for organization
+ * Update: update "browserify" to v14.4.0
+ * Fix: fix Readme typo (#473)
+
+2.6.9 / 2017-09-22
+==================
+
+ * remove ReDoS regexp in %o formatter (#504)
+
+2.6.8 / 2017-05-18
+==================
+
+ * Fix: Check for undefined on browser globals (#462, @marbemac)
+
+2.6.7 / 2017-05-16
+==================
+
+ * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
+ * Fix: Inline extend function in node implementation (#452, @dougwilson)
+ * Docs: Fix typo (#455, @msasad)
+
+2.6.5 / 2017-04-27
+==================
+
+ * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
+ * Misc: clean up browser reference checks (#447, @thebigredgeek)
+ * Misc: add npm-debug.log to .gitignore (@thebigredgeek)
+
+
+2.6.4 / 2017-04-20
+==================
+
+ * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+ * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
+ * Misc: update "ms" to v0.7.3 (@tootallnate)
+
+2.6.3 / 2017-03-13
+==================
+
+ * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
+ * Docs: Changelog fix (@thebigredgeek)
+
+2.6.2 / 2017-03-10
+==================
+
+ * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
+ * Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
+ * Docs: Add Slackin invite badge (@tootallnate)
+
+2.6.1 / 2017-02-10
+==================
+
+ * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
+ * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
+ * Fix: IE8 "Expected identifier" error (#414, @vgoma)
+ * Fix: Namespaces would not disable once enabled (#409, @musikov)
+
+2.6.0 / 2016-12-28
+==================
+
+ * Fix: added better null pointer checks for browser useColors (@thebigredgeek)
+ * Improvement: removed explicit `window.debug` export (#404, @tootallnate)
+ * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
+
+2.5.2 / 2016-12-25
+==================
+
+ * Fix: reference error on window within webworkers (#393, @KlausTrainer)
+ * Docs: fixed README typo (#391, @lurch)
+ * Docs: added notice about v3 api discussion (@thebigredgeek)
+
+2.5.1 / 2016-12-20
+==================
+
+ * Fix: babel-core compatibility
+
+2.5.0 / 2016-12-20
+==================
+
+ * Fix: wrong reference in bower file (@thebigredgeek)
+ * Fix: webworker compatibility (@thebigredgeek)
+ * Fix: output formatting issue (#388, @kribblo)
+ * Fix: babel-loader compatibility (#383, @escwald)
+ * Misc: removed built asset from repo and publications (@thebigredgeek)
+ * Misc: moved source files to /src (#378, @yamikuronue)
+ * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
+ * Test: coveralls integration (#378, @yamikuronue)
+ * Docs: simplified language in the opening paragraph (#373, @yamikuronue)
+
+2.4.5 / 2016-12-17
+==================
+
+ * Fix: `navigator` undefined in Rhino (#376, @jochenberger)
+ * Fix: custom log function (#379, @hsiliev)
+ * Improvement: bit of cleanup + linting fixes (@thebigredgeek)
+ * Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
+ * Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
+
+2.4.4 / 2016-12-14
+==================
+
+ * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
+
+2.4.3 / 2016-12-14
+==================
+
+ * Fix: navigation.userAgent error for react native (#364, @escwald)
+
+2.4.2 / 2016-12-14
+==================
+
+ * Fix: browser colors (#367, @tootallnate)
+ * Misc: travis ci integration (@thebigredgeek)
+ * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
+
+2.4.1 / 2016-12-13
+==================
+
+ * Fix: typo that broke the package (#356)
+
+2.4.0 / 2016-12-13
+==================
+
+ * Fix: bower.json references unbuilt src entry point (#342, @justmatt)
+ * Fix: revert "handle regex special characters" (@tootallnate)
+ * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
+ * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
+ * Improvement: allow colors in workers (#335, @botverse)
+ * Improvement: use same color for same namespace. (#338, @lchenay)
+
+2.3.3 / 2016-11-09
+==================
+
+ * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
+ * Fix: Returning `localStorage` saved values (#331, Levi Thomason)
+ * Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
+
+2.3.2 / 2016-11-09
+==================
+
+ * Fix: be super-safe in index.js as well (@TooTallNate)
+ * Fix: should check whether process exists (Tom Newby)
+
+2.3.1 / 2016-11-09
+==================
+
+ * Fix: Added electron compatibility (#324, @paulcbetts)
+ * Improvement: Added performance optimizations (@tootallnate)
+ * Readme: Corrected PowerShell environment variable example (#252, @gimre)
+ * Misc: Removed yarn lock file from source control (#321, @fengmk2)
+
+2.3.0 / 2016-11-07
+==================
+
+ * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
+ * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
+ * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
+ * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
+ * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
+ * Package: Update "ms" to 0.7.2 (#315, @DevSide)
+ * Package: removed superfluous version property from bower.json (#207 @kkirsche)
+ * Readme: fix USE_COLORS to DEBUG_COLORS
+ * Readme: Doc fixes for format string sugar (#269, @mlucool)
+ * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
+ * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
+ * Readme: better docs for browser support (#224, @matthewmueller)
+ * Tooling: Added yarn integration for development (#317, @thebigredgeek)
+ * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
+ * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
+ * Misc: Updated contributors (@thebigredgeek)
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/LICENSE b/express-server/node_modules/cookie-session/node_modules/debug/LICENSE
new file mode 100644
index 00000000..658c933d
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/LICENSE
@@ -0,0 +1,19 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk
+
+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/express-server/node_modules/cookie-session/node_modules/debug/Makefile b/express-server/node_modules/cookie-session/node_modules/debug/Makefile
new file mode 100644
index 00000000..3ddd1360
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/Makefile
@@ -0,0 +1,58 @@
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# Path
+PATH := node_modules/.bin:$(PATH)
+SHELL := /bin/bash
+
+# applications
+NODE ?= $(shell which node)
+YARN ?= $(shell which yarn)
+PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+install: node_modules
+
+browser: dist/debug.js
+
+node_modules: package.json
+ @NODE_ENV= $(PKG) install
+ @touch node_modules
+
+dist/debug.js: src/*.js node_modules
+ @mkdir -p dist
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > dist/debug.js
+
+lint:
+ @eslint *.js src/*.js
+
+test-node:
+ @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+ @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+
+test-browser:
+ @$(MAKE) browser
+ @karma start --single-run
+
+test-all:
+ @concurrently \
+ "make test-node" \
+ "make test-browser"
+
+test:
+ @if [ "x$(BROWSER)" = "x" ]; then \
+ $(MAKE) test-node; \
+ else \
+ $(MAKE) test-browser; \
+ fi
+
+clean:
+ rimraf dist coverage
+
+.PHONY: browser install clean lint test test-all test-node test-browser
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/README.md b/express-server/node_modules/cookie-session/node_modules/debug/README.md
new file mode 100644
index 00000000..8e754d17
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/README.md
@@ -0,0 +1,368 @@
+# debug
+[](https://travis-ci.org/visionmedia/debug) [](https://coveralls.io/github/visionmedia/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
+[](#sponsors)
+
+
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+
+
+
+
+#### Windows note
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Note that PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Then, run the program to be debugged as usual.
+
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+
+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/express-server/node_modules/cookie-session/node_modules/debug/karma.conf.js b/express-server/node_modules/cookie-session/node_modules/debug/karma.conf.js
new file mode 100644
index 00000000..103a82d1
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/karma.conf.js
@@ -0,0 +1,70 @@
+// Karma configuration
+// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
+
+module.exports = function(config) {
+ config.set({
+
+ // base path that will be used to resolve all patterns (eg. files, exclude)
+ basePath: '',
+
+
+ // frameworks to use
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
+ frameworks: ['mocha', 'chai', 'sinon'],
+
+
+ // list of files / patterns to load in the browser
+ files: [
+ 'dist/debug.js',
+ 'test/*spec.js'
+ ],
+
+
+ // list of files to exclude
+ exclude: [
+ 'src/node.js'
+ ],
+
+
+ // preprocess matching files before serving them to the browser
+ // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
+ preprocessors: {
+ },
+
+ // test results reporter to use
+ // possible values: 'dots', 'progress'
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
+ reporters: ['progress'],
+
+
+ // web server port
+ port: 9876,
+
+
+ // enable / disable colors in the output (reporters and logs)
+ colors: true,
+
+
+ // level of logging
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
+ logLevel: config.LOG_INFO,
+
+
+ // enable / disable watching file and executing tests whenever any file changes
+ autoWatch: true,
+
+
+ // start these browsers
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
+ browsers: ['PhantomJS'],
+
+
+ // Continuous Integration mode
+ // if true, Karma captures browsers, runs the tests and exits
+ singleRun: false,
+
+ // Concurrency level
+ // how many browser should be started simultaneous
+ concurrency: Infinity
+ })
+}
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/node.js b/express-server/node_modules/cookie-session/node_modules/debug/node.js
new file mode 100644
index 00000000..7fc36fe6
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/node.js
@@ -0,0 +1 @@
+module.exports = require('./src/node');
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/package.json b/express-server/node_modules/cookie-session/node_modules/debug/package.json
new file mode 100644
index 00000000..be6f3824
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "debug@3.1.0",
+ "_id": "debug@3.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "_location": "/cookie-session/debug",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "debug@3.1.0",
+ "name": "debug",
+ "escapedName": "debug",
+ "rawSpec": "3.1.0",
+ "saveSpec": null,
+ "fetchSpec": "3.1.0"
+ },
+ "_requiredBy": [
+ "/cookie-session"
+ ],
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "_shasum": "5bb5a0672628b64149566ba16819e61518c67261",
+ "_spec": "debug@3.1.0",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\cookie-session",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "browser": "./src/browser.js",
+ "bugs": {
+ "url": "https://github.com/visionmedia/debug/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ },
+ {
+ "name": "Andrew Rhyne",
+ "email": "rhyneandrew@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "ms": "2.0.0"
+ },
+ "deprecated": false,
+ "description": "small debugging utility",
+ "devDependencies": {
+ "browserify": "14.4.0",
+ "chai": "^3.5.0",
+ "concurrently": "^3.1.0",
+ "coveralls": "^2.11.15",
+ "eslint": "^3.12.1",
+ "istanbul": "^0.4.5",
+ "karma": "^1.3.0",
+ "karma-chai": "^0.1.0",
+ "karma-mocha": "^1.3.0",
+ "karma-phantomjs-launcher": "^1.0.2",
+ "karma-sinon": "^1.0.5",
+ "mocha": "^3.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "rimraf": "^2.5.4",
+ "sinon": "^1.17.6",
+ "sinon-chai": "^2.8.0"
+ },
+ "homepage": "https://github.com/visionmedia/debug#readme",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "license": "MIT",
+ "main": "./src/index.js",
+ "name": "debug",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "version": "3.1.0"
+}
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/src/browser.js b/express-server/node_modules/cookie-session/node_modules/debug/src/browser.js
new file mode 100644
index 00000000..f5149ff5
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/src/browser.js
@@ -0,0 +1,195 @@
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',
+ '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',
+ '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',
+ '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',
+ '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',
+ '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',
+ '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',
+ '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',
+ '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',
+ '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',
+ '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ try {
+ return JSON.stringify(v);
+ } catch (err) {
+ return '[UnexpectedJSONParseError]: ' + err.message;
+ }
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return;
+
+ var c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit')
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/src/debug.js b/express-server/node_modules/cookie-session/node_modules/debug/src/debug.js
new file mode 100644
index 00000000..77e6384a
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/src/debug.js
@@ -0,0 +1,225 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * Active `debug` instances.
+ */
+exports.instances = [];
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+
+exports.formatters = {};
+
+/**
+ * Select a color.
+ * @param {String} namespace
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor(namespace) {
+ var hash = 0, i;
+
+ for (i in namespace) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return exports.colors[Math.abs(hash) % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function createDebug(namespace) {
+
+ var prevTime;
+
+ function debug() {
+ // disabled?
+ if (!debug.enabled) return;
+
+ var self = debug;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // turn the `arguments` into a proper Array
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // apply env-specific formatting (colors, etc.)
+ exports.formatArgs.call(self, args);
+
+ var logFn = debug.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.enabled = exports.enabled(namespace);
+ debug.useColors = exports.useColors();
+ debug.color = selectColor(namespace);
+ debug.destroy = destroy;
+
+ // env-specific initialization logic for debug instances
+ if ('function' === typeof exports.init) {
+ exports.init(debug);
+ }
+
+ exports.instances.push(debug);
+
+ return debug;
+}
+
+function destroy () {
+ var index = exports.instances.indexOf(this);
+ if (index !== -1) {
+ exports.instances.splice(index, 1);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ exports.names = [];
+ exports.skips = [];
+
+ var i;
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+
+ for (i = 0; i < exports.instances.length; i++) {
+ var instance = exports.instances[i];
+ instance.enabled = exports.enabled(instance.namespace);
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/src/index.js b/express-server/node_modules/cookie-session/node_modules/debug/src/index.js
new file mode 100644
index 00000000..cabcbcda
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer') {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/express-server/node_modules/cookie-session/node_modules/debug/src/node.js b/express-server/node_modules/cookie-session/node_modules/debug/src/node.js
new file mode 100644
index 00000000..d666fb9c
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/debug/src/node.js
@@ -0,0 +1,186 @@
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [ 6, 2, 3, 4, 5, 1 ];
+
+try {
+ var supportsColor = require('supports-color');
+ if (supportsColor && supportsColor.level >= 2) {
+ exports.colors = [
+ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
+ 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
+ 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 214, 215, 220, 221
+ ];
+ }
+} catch (err) {
+ // swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(function (key) {
+ return /^debug_/i.test(key);
+}).reduce(function (obj, key) {
+ // camel-case
+ var prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
+
+ // coerce string value into JS value
+ var val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
+ else if (val === 'null') val = null;
+ else val = Number(val);
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts
+ ? Boolean(exports.inspectOpts.colors)
+ : tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+exports.formatters.o = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n').map(function(str) {
+ return str.trim()
+ }).join(' ');
+};
+
+/**
+ * Map %o to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+exports.formatters.O = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var name = this.namespace;
+ var useColors = this.useColors;
+
+ if (useColors) {
+ var c = this.color;
+ var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
+ var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ } else {
+ return new Date().toISOString() + ' ';
+ }
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log() {
+ return process.stderr.write(util.format.apply(util, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init (debug) {
+ debug.inspectOpts = {};
+
+ var keys = Object.keys(exports.inspectOpts);
+ for (var i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/express-server/node_modules/cookie-session/node_modules/safe-buffer/.travis.yml b/express-server/node_modules/cookie-session/node_modules/safe-buffer/.travis.yml
new file mode 100644
index 00000000..7b20f28c
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/safe-buffer/.travis.yml
@@ -0,0 +1,7 @@
+language: node_js
+node_js:
+ - 'node'
+ - '5'
+ - '4'
+ - '0.12'
+ - '0.10'
diff --git a/express-server/node_modules/cookie-session/node_modules/safe-buffer/LICENSE b/express-server/node_modules/cookie-session/node_modules/safe-buffer/LICENSE
new file mode 100644
index 00000000..0c068cee
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/safe-buffer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/express-server/node_modules/cookie-session/node_modules/safe-buffer/README.md b/express-server/node_modules/cookie-session/node_modules/safe-buffer/README.md
new file mode 100644
index 00000000..e9a81afd
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/safe-buffer/README.md
@@ -0,0 +1,584 @@
+# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/safe-buffer
+[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg
+[npm-url]: https://npmjs.org/package/safe-buffer
+[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg
+[downloads-url]: https://npmjs.org/package/safe-buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### Safer Node.js Buffer API
+
+**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,
+`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**
+
+**Uses the built-in implementation when available.**
+
+## install
+
+```
+npm install safe-buffer
+```
+
+## usage
+
+The goal of this package is to provide a safe replacement for the node.js `Buffer`.
+
+It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to
+the top of your node.js modules:
+
+```js
+var Buffer = require('safe-buffer').Buffer
+
+// Existing buffer code will continue to work without issues:
+
+new Buffer('hey', 'utf8')
+new Buffer([1, 2, 3], 'utf8')
+new Buffer(obj)
+new Buffer(16) // create an uninitialized buffer (potentially unsafe)
+
+// But you can use these new explicit APIs to make clear what you want:
+
+Buffer.from('hey', 'utf8') // convert from many types to a Buffer
+Buffer.alloc(16) // create a zero-filled buffer (safe)
+Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)
+```
+
+## api
+
+### Class Method: Buffer.from(array)
+
+
+* `array` {Array}
+
+Allocates a new `Buffer` using an `array` of octets.
+
+```js
+const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);
+ // creates a new Buffer containing ASCII bytes
+ // ['b','u','f','f','e','r']
+```
+
+A `TypeError` will be thrown if `array` is not an `Array`.
+
+### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])
+
+
+* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or
+ a `new ArrayBuffer()`
+* `byteOffset` {Number} Default: `0`
+* `length` {Number} Default: `arrayBuffer.length - byteOffset`
+
+When passed a reference to the `.buffer` property of a `TypedArray` instance,
+the newly created `Buffer` will share the same allocated memory as the
+TypedArray.
+
+```js
+const arr = new Uint16Array(2);
+arr[0] = 5000;
+arr[1] = 4000;
+
+const buf = Buffer.from(arr.buffer); // shares the memory with arr;
+
+console.log(buf);
+ // Prints:
+
+// changing the TypedArray changes the Buffer also
+arr[1] = 6000;
+
+console.log(buf);
+ // Prints:
+```
+
+The optional `byteOffset` and `length` arguments specify a memory range within
+the `arrayBuffer` that will be shared by the `Buffer`.
+
+```js
+const ab = new ArrayBuffer(10);
+const buf = Buffer.from(ab, 0, 2);
+console.log(buf.length);
+ // Prints: 2
+```
+
+A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.
+
+### Class Method: Buffer.from(buffer)
+
+
+* `buffer` {Buffer}
+
+Copies the passed `buffer` data onto a new `Buffer` instance.
+
+```js
+const buf1 = Buffer.from('buffer');
+const buf2 = Buffer.from(buf1);
+
+buf1[0] = 0x61;
+console.log(buf1.toString());
+ // 'auffer'
+console.log(buf2.toString());
+ // 'buffer' (copy is not changed)
+```
+
+A `TypeError` will be thrown if `buffer` is not a `Buffer`.
+
+### Class Method: Buffer.from(str[, encoding])
+
+
+* `str` {String} String to encode.
+* `encoding` {String} Encoding to use, Default: `'utf8'`
+
+Creates a new `Buffer` containing the given JavaScript string `str`. If
+provided, the `encoding` parameter identifies the character encoding.
+If not provided, `encoding` defaults to `'utf8'`.
+
+```js
+const buf1 = Buffer.from('this is a tést');
+console.log(buf1.toString());
+ // prints: this is a tést
+console.log(buf1.toString('ascii'));
+ // prints: this is a tC)st
+
+const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
+console.log(buf2.toString());
+ // prints: this is a tést
+```
+
+A `TypeError` will be thrown if `str` is not a string.
+
+### Class Method: Buffer.alloc(size[, fill[, encoding]])
+
+
+* `size` {Number}
+* `fill` {Value} Default: `undefined`
+* `encoding` {String} Default: `utf8`
+
+Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the
+`Buffer` will be *zero-filled*.
+
+```js
+const buf = Buffer.alloc(5);
+console.log(buf);
+ //
+```
+
+The `size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+If `fill` is specified, the allocated `Buffer` will be initialized by calling
+`buf.fill(fill)`. See [`buf.fill()`][] for more information.
+
+```js
+const buf = Buffer.alloc(5, 'a');
+console.log(buf);
+ //
+```
+
+If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+initialized by calling `buf.fill(fill, encoding)`. For example:
+
+```js
+const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+console.log(buf);
+ //
+```
+
+Calling `Buffer.alloc(size)` can be significantly slower than the alternative
+`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance
+contents will *never contain sensitive data*.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### Class Method: Buffer.allocUnsafe(size)
+
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must
+be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit
+architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is
+thrown. A zero-length Buffer will be created if a `size` less than or equal to
+0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+```js
+const buf = Buffer.allocUnsafe(5);
+console.log(buf);
+ //
+ // (octets will be different, every time)
+buf.fill(0);
+console.log(buf);
+ //
+```
+
+A `TypeError` will be thrown if `size` is not a number.
+
+Note that the `Buffer` module pre-allocates an internal `Buffer` instance of
+size `Buffer.poolSize` that is used as a pool for the fast allocation of new
+`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated
+`new Buffer(size)` constructor) only when `size` is less than or equal to
+`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default
+value of `Buffer.poolSize` is `8192` but can be modified.
+
+Use of this pre-allocated internal memory pool is a key difference between
+calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer
+pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal
+Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The
+difference is subtle but can be important when an application requires the
+additional performance that `Buffer.allocUnsafe(size)` provides.
+
+### Class Method: Buffer.allocUnsafeSlow(size)
+
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The
+`size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+allocations under 4KB are, by default, sliced from a single pre-allocated
+`Buffer`. This allows applications to avoid the garbage collection overhead of
+creating many individually allocated Buffers. This approach improves both
+performance and memory usage by eliminating the need to track and cleanup as
+many `Persistent` objects.
+
+However, in the case where a developer may need to retain a small chunk of
+memory from a pool for an indeterminate amount of time, it may be appropriate
+to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then
+copy out the relevant bits.
+
+```js
+// need to keep around a few small chunks of memory
+const store = [];
+
+socket.on('readable', () => {
+ const data = socket.read();
+ // allocate for retained data
+ const sb = Buffer.allocUnsafeSlow(10);
+ // copy the data into the new allocation
+ data.copy(sb, 0, 0, 10);
+ store.push(sb);
+});
+```
+
+Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*
+a developer has observed undue memory retention in their applications.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### All the Rest
+
+The rest of the `Buffer` API is exactly the same as in node.js.
+[See the docs](https://nodejs.org/api/buffer.html).
+
+
+## Related links
+
+- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)
+- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)
+
+## Why is `Buffer` unsafe?
+
+Today, the node.js `Buffer` constructor is overloaded to handle many different argument
+types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),
+`ArrayBuffer`, and also `Number`.
+
+The API is optimized for convenience: you can throw any type at it, and it will try to do
+what you want.
+
+Because the Buffer constructor is so powerful, you often see code like this:
+
+```js
+// Convert UTF-8 strings to hex
+function toHex (str) {
+ return new Buffer(str).toString('hex')
+}
+```
+
+***But what happens if `toHex` is called with a `Number` argument?***
+
+### Remote Memory Disclosure
+
+If an attacker can make your program call the `Buffer` constructor with a `Number`
+argument, then they can make it allocate uninitialized memory from the node.js process.
+This could potentially disclose TLS private keys, user data, or database passwords.
+
+When the `Buffer` constructor is passed a `Number` argument, it returns an
+**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like
+this, you **MUST** overwrite the contents before returning it to the user.
+
+From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):
+
+> `new Buffer(size)`
+>
+> - `size` Number
+>
+> The underlying memory for `Buffer` instances created in this way is not initialized.
+> **The contents of a newly created `Buffer` are unknown and could contain sensitive
+> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.
+
+(Emphasis our own.)
+
+Whenever the programmer intended to create an uninitialized `Buffer` you often see code
+like this:
+
+```js
+var buf = new Buffer(16)
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### Would this ever be a problem in real code?
+
+Yes. It's surprisingly common to forget to check the type of your variables in a
+dynamically-typed language like JavaScript.
+
+Usually the consequences of assuming the wrong type is that your program crashes with an
+uncaught exception. But the failure mode for forgetting to check the type of arguments to
+the `Buffer` constructor is more catastrophic.
+
+Here's an example of a vulnerable service that takes a JSON payload and converts it to
+hex:
+
+```js
+// Take a JSON payload {str: "some string"} and convert it to hex
+var server = http.createServer(function (req, res) {
+ var data = ''
+ req.setEncoding('utf8')
+ req.on('data', function (chunk) {
+ data += chunk
+ })
+ req.on('end', function () {
+ var body = JSON.parse(data)
+ res.end(new Buffer(body.str).toString('hex'))
+ })
+})
+
+server.listen(8080)
+```
+
+In this example, an http client just has to send:
+
+```json
+{
+ "str": 1000
+}
+```
+
+and it will get back 1,000 bytes of uninitialized memory from the server.
+
+This is a very serious bug. It's similar in severity to the
+[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process
+memory by remote attackers.
+
+
+### Which real-world packages were vulnerable?
+
+#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)
+
+[Mathias Buus](https://github.com/mafintosh) and I
+([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,
+[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow
+anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get
+them to reveal 20 bytes at a time of uninitialized memory from the node.js process.
+
+Here's
+[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)
+that fixed it. We released a new fixed version, created a
+[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all
+vulnerable versions on npm so users will get a warning to upgrade to a newer version.
+
+#### [`ws`](https://www.npmjs.com/package/ws)
+
+That got us wondering if there were other vulnerable packages. Sure enough, within a short
+period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the
+most popular WebSocket implementation in node.js.
+
+If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as
+expected, then uninitialized server memory would be disclosed to the remote peer.
+
+These were the vulnerable methods:
+
+```js
+socket.send(number)
+socket.ping(number)
+socket.pong(number)
+```
+
+Here's a vulnerable socket server with some echo functionality:
+
+```js
+server.on('connection', function (socket) {
+ socket.on('message', function (message) {
+ message = JSON.parse(message)
+ if (message.type === 'echo') {
+ socket.send(message.data) // send back the user's message
+ }
+ })
+})
+```
+
+`socket.send(number)` called on the server, will disclose server memory.
+
+Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue
+was fixed, with a more detailed explanation. Props to
+[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the
+[Node Security Project disclosure](https://nodesecurity.io/advisories/67).
+
+
+### What's the solution?
+
+It's important that node.js offers a fast way to get memory otherwise performance-critical
+applications would needlessly get a lot slower.
+
+But we need a better way to *signal our intent* as programmers. **When we want
+uninitialized memory, we should request it explicitly.**
+
+Sensitive functionality should not be packed into a developer-friendly API that loosely
+accepts many different types. This type of API encourages the lazy practice of passing
+variables in without checking the type very carefully.
+
+#### A new API: `Buffer.allocUnsafe(number)`
+
+The functionality of creating buffers with uninitialized memory should be part of another
+API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that
+frequently gets user input of all sorts of different types passed into it.
+
+```js
+var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### How do we fix node.js core?
+
+We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as
+`semver-major`) which defends against one case:
+
+```js
+var str = 16
+new Buffer(str, 'utf8')
+```
+
+In this situation, it's implied that the programmer intended the first argument to be a
+string, since they passed an encoding as a second argument. Today, node.js will allocate
+uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not
+what the programmer intended.
+
+But this is only a partial solution, since if the programmer does `new Buffer(variable)`
+(without an `encoding` parameter) there's no way to know what they intended. If `variable`
+is sometimes a number, then uninitialized memory will sometimes be returned.
+
+### What's the real long-term fix?
+
+We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when
+we need uninitialized memory. But that would break 1000s of packages.
+
+~~We believe the best solution is to:~~
+
+~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~
+
+~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~
+
+#### Update
+
+We now support adding three new APIs:
+
+- `Buffer.from(value)` - convert from any type to a buffer
+- `Buffer.alloc(size)` - create a zero-filled buffer
+- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size
+
+This solves the core problem that affected `ws` and `bittorrent-dht` which is
+`Buffer(variable)` getting tricked into taking a number argument.
+
+This way, existing code continues working and the impact on the npm ecosystem will be
+minimal. Over time, npm maintainers can migrate performance-critical code to use
+`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.
+
+
+### Conclusion
+
+We think there's a serious design issue with the `Buffer` API as it exists today. It
+promotes insecure software by putting high-risk functionality into a convenient API
+with friendly "developer ergonomics".
+
+This wasn't merely a theoretical exercise because we found the issue in some of the
+most popular npm packages.
+
+Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of
+`buffer`.
+
+```js
+var Buffer = require('safe-buffer').Buffer
+```
+
+Eventually, we hope that node.js core can switch to this new, safer behavior. We believe
+the impact on the ecosystem would be minimal since it's not a breaking change.
+Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while
+older, insecure packages would magically become safe from this attack vector.
+
+
+## links
+
+- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)
+- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)
+- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)
+
+
+## credit
+
+The original issues in `bittorrent-dht`
+([disclosure](https://nodesecurity.io/advisories/68)) and
+`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by
+[Mathias Buus](https://github.com/mafintosh) and
+[Feross Aboukhadijeh](http://feross.org/).
+
+Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues
+and for his work running the [Node Security Project](https://nodesecurity.io/).
+
+Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and
+auditing the code.
+
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
diff --git a/express-server/node_modules/cookie-session/node_modules/safe-buffer/index.js b/express-server/node_modules/cookie-session/node_modules/safe-buffer/index.js
new file mode 100644
index 00000000..22438dab
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/safe-buffer/index.js
@@ -0,0 +1,62 @@
+/* eslint-disable node/no-deprecated-api */
+var buffer = require('buffer')
+var Buffer = buffer.Buffer
+
+// alternative to using Object.keys for old browsers
+function copyProps (src, dst) {
+ for (var key in src) {
+ dst[key] = src[key]
+ }
+}
+if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
+ module.exports = buffer
+} else {
+ // Copy properties from require('buffer')
+ copyProps(buffer, exports)
+ exports.Buffer = SafeBuffer
+}
+
+function SafeBuffer (arg, encodingOrOffset, length) {
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+// Copy static methods from Buffer
+copyProps(Buffer, SafeBuffer)
+
+SafeBuffer.from = function (arg, encodingOrOffset, length) {
+ if (typeof arg === 'number') {
+ throw new TypeError('Argument must not be a number')
+ }
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ var buf = Buffer(size)
+ if (fill !== undefined) {
+ if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ } else {
+ buf.fill(0)
+ }
+ return buf
+}
+
+SafeBuffer.allocUnsafe = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return Buffer(size)
+}
+
+SafeBuffer.allocUnsafeSlow = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return buffer.SlowBuffer(size)
+}
diff --git a/express-server/node_modules/cookie-session/node_modules/safe-buffer/package.json b/express-server/node_modules/cookie-session/node_modules/safe-buffer/package.json
new file mode 100644
index 00000000..54e53bec
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/safe-buffer/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "safe-buffer@5.1.1",
+ "_id": "safe-buffer@5.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
+ "_location": "/cookie-session/safe-buffer",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "safe-buffer@5.1.1",
+ "name": "safe-buffer",
+ "escapedName": "safe-buffer",
+ "rawSpec": "5.1.1",
+ "saveSpec": null,
+ "fetchSpec": "5.1.1"
+ },
+ "_requiredBy": [
+ "/cookie-session"
+ ],
+ "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
+ "_shasum": "893312af69b2123def71f57889001671eeb2c853",
+ "_spec": "safe-buffer@5.1.1",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\cookie-session",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "http://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/safe-buffer/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Safer Node.js Buffer API",
+ "devDependencies": {
+ "standard": "*",
+ "tape": "^4.0.0",
+ "zuul": "^3.0.0"
+ },
+ "homepage": "https://github.com/feross/safe-buffer",
+ "keywords": [
+ "buffer",
+ "buffer allocate",
+ "node security",
+ "safe",
+ "safe-buffer",
+ "security",
+ "uninitialized"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "safe-buffer",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/safe-buffer.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "5.1.1"
+}
diff --git a/express-server/node_modules/cookie-session/node_modules/safe-buffer/test.js b/express-server/node_modules/cookie-session/node_modules/safe-buffer/test.js
new file mode 100644
index 00000000..4925059c
--- /dev/null
+++ b/express-server/node_modules/cookie-session/node_modules/safe-buffer/test.js
@@ -0,0 +1,101 @@
+/* eslint-disable node/no-deprecated-api */
+
+var test = require('tape')
+var SafeBuffer = require('./').Buffer
+
+test('new SafeBuffer(value) works just like Buffer', function (t) {
+ t.deepEqual(new SafeBuffer('hey'), new Buffer('hey'))
+ t.deepEqual(new SafeBuffer('hey', 'utf8'), new Buffer('hey', 'utf8'))
+ t.deepEqual(new SafeBuffer('686579', 'hex'), new Buffer('686579', 'hex'))
+ t.deepEqual(new SafeBuffer([1, 2, 3]), new Buffer([1, 2, 3]))
+ t.deepEqual(new SafeBuffer(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3])))
+
+ t.equal(typeof SafeBuffer.isBuffer, 'function')
+ t.equal(SafeBuffer.isBuffer(new SafeBuffer('hey')), true)
+ t.equal(Buffer.isBuffer(new SafeBuffer('hey')), true)
+ t.notOk(SafeBuffer.isBuffer({}))
+
+ t.end()
+})
+
+test('SafeBuffer.from(value) converts to a Buffer', function (t) {
+ t.deepEqual(SafeBuffer.from('hey'), new Buffer('hey'))
+ t.deepEqual(SafeBuffer.from('hey', 'utf8'), new Buffer('hey', 'utf8'))
+ t.deepEqual(SafeBuffer.from('686579', 'hex'), new Buffer('686579', 'hex'))
+ t.deepEqual(SafeBuffer.from([1, 2, 3]), new Buffer([1, 2, 3]))
+ t.deepEqual(SafeBuffer.from(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3])))
+
+ t.end()
+})
+
+test('SafeBuffer.alloc(number) returns zeroed-out memory', function (t) {
+ for (var i = 0; i < 10; i++) {
+ var expected1 = new Buffer(1000)
+ expected1.fill(0)
+ t.deepEqual(SafeBuffer.alloc(1000), expected1)
+
+ var expected2 = new Buffer(1000 * 1000)
+ expected2.fill(0)
+ t.deepEqual(SafeBuffer.alloc(1000 * 1000), expected2)
+ }
+ t.end()
+})
+
+test('SafeBuffer.allocUnsafe(number)', function (t) {
+ var buf = SafeBuffer.allocUnsafe(100) // unitialized memory
+ t.equal(buf.length, 100)
+ t.equal(SafeBuffer.isBuffer(buf), true)
+ t.equal(Buffer.isBuffer(buf), true)
+ t.end()
+})
+
+test('SafeBuffer.from() throws with number types', function (t) {
+ t.plan(5)
+ t.throws(function () {
+ SafeBuffer.from(0)
+ })
+ t.throws(function () {
+ SafeBuffer.from(-1)
+ })
+ t.throws(function () {
+ SafeBuffer.from(NaN)
+ })
+ t.throws(function () {
+ SafeBuffer.from(Infinity)
+ })
+ t.throws(function () {
+ SafeBuffer.from(99)
+ })
+})
+
+test('SafeBuffer.allocUnsafe() throws with non-number types', function (t) {
+ t.plan(4)
+ t.throws(function () {
+ SafeBuffer.allocUnsafe('hey')
+ })
+ t.throws(function () {
+ SafeBuffer.allocUnsafe('hey', 'utf8')
+ })
+ t.throws(function () {
+ SafeBuffer.allocUnsafe([1, 2, 3])
+ })
+ t.throws(function () {
+ SafeBuffer.allocUnsafe({})
+ })
+})
+
+test('SafeBuffer.alloc() throws with non-number types', function (t) {
+ t.plan(4)
+ t.throws(function () {
+ SafeBuffer.alloc('hey')
+ })
+ t.throws(function () {
+ SafeBuffer.alloc('hey', 'utf8')
+ })
+ t.throws(function () {
+ SafeBuffer.alloc([1, 2, 3])
+ })
+ t.throws(function () {
+ SafeBuffer.alloc({})
+ })
+})
diff --git a/express-server/node_modules/cookie-session/package.json b/express-server/node_modules/cookie-session/package.json
new file mode 100644
index 00000000..4fb69a10
--- /dev/null
+++ b/express-server/node_modules/cookie-session/package.json
@@ -0,0 +1,93 @@
+{
+ "_from": "cookie-session",
+ "_id": "cookie-session@2.0.0-beta.3",
+ "_inBundle": false,
+ "_integrity": "sha512-zyqm5tA0z9yMEB/xyP7lnRnqp8eLR2e0dap+9+rBwVigla9yPKn8XTL1jJymog8xjfrowqW2o5LUjixQChkqrw==",
+ "_location": "/cookie-session",
+ "_phantomChildren": {
+ "ms": "2.0.0"
+ },
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "cookie-session",
+ "name": "cookie-session",
+ "escapedName": "cookie-session",
+ "rawSpec": "",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/cookie-session/-/cookie-session-2.0.0-beta.3.tgz",
+ "_shasum": "4e446bd9f85bd7e27d3e226f4e99af12011a4386",
+ "_spec": "cookie-session",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server",
+ "bugs": {
+ "url": "https://github.com/expressjs/cookie-session/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "dependencies": {
+ "cookies": "0.7.1",
+ "debug": "3.1.0",
+ "on-headers": "~1.0.1",
+ "safe-buffer": "5.1.1"
+ },
+ "deprecated": false,
+ "description": "cookie session middleware",
+ "devDependencies": {
+ "connect": "3.6.5",
+ "eslint": "3.19.0",
+ "eslint-config-standard": "10.2.1",
+ "eslint-plugin-import": "2.7.0",
+ "eslint-plugin-markdown": "1.0.0-beta.6",
+ "eslint-plugin-node": "5.2.0",
+ "eslint-plugin-promise": "3.5.0",
+ "eslint-plugin-standard": "3.0.1",
+ "mocha": "3.5.3",
+ "nyc": "10.3.2",
+ "supertest": "1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/expressjs/cookie-session#readme",
+ "keywords": [
+ "connect",
+ "express",
+ "middleware",
+ "session"
+ ],
+ "license": "MIT",
+ "name": "cookie-session",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/expressjs/cookie-session.git"
+ },
+ "scripts": {
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --check-leaks --reporter spec --bail test/",
+ "test-ci": "nyc --reporter=text npm test",
+ "test-cov": "nyc --reporter=html --reporter=text npm test"
+ },
+ "version": "2.0.0-beta.3"
+}
diff --git a/express-server/node_modules/cookies/HISTORY.md b/express-server/node_modules/cookies/HISTORY.md
new file mode 100644
index 00000000..bcffa888
--- /dev/null
+++ b/express-server/node_modules/cookies/HISTORY.md
@@ -0,0 +1,97 @@
+0.7.1 / 2017-08-26
+==================
+
+ * deps: depd@~1.1.1
+ - Remove unnecessary `Buffer` loading
+ * deps: keygrip@~1.0.2
+ - perf: improve comparison speed
+
+0.7.0 / 2017-02-19
+==================
+
+ * Add `sameSite` option for SameSite cookie support
+ * pref: enable strict mode
+
+0.6.2 / 2016-11-12
+==================
+
+ * Fix `keys` deprecation message
+ * deps: keygrip@~1.0.1
+
+0.6.1 / 2016-02-29
+==================
+
+ * Fix regression in 0.6.0 for array of strings in `keys` option
+
+0.6.0 / 2016-02-29
+==================
+
+ * Add `secure` constructor option for secure connection checking
+ * Change constructor to signature `new Cookies(req, res, [options])`
+ - Replace `new Cookies(req, res, key)` with `new Cookies(req, res, {'keys': keys})`
+ * Change prototype construction for proper "constructor" property
+ * Deprecate `secureProxy` option in `.set`; use `secure` option instead
+ - If `secure: true` throws even over SSL, use the `secure` constructor option
+
+0.5.1 / 2014-07-27
+==================
+
+ * Throw on invalid values provided to `Cookie` constructor
+ - This is not strict validation, but basic RFC 7230 validation
+
+0.5.0 / 2014-07-27
+==================
+
+ * Integrate with `req.protocol` for secure cookies
+ * Support `maxAge` as well as `maxage`
+
+0.4.1 / 2014-05-07
+==================
+
+ * Update package for repo move
+
+0.4.0 / 2014-01-31
+==================
+
+ * Allow passing an array of strings as keys
+
+0.3.8-0.2.0
+===========
+
+ * TODO: write down history for these releases
+
+0.1.6 / 2011-03-01
+==================
+
+ * SSL cookies secure by default
+ * Use httpOnly by default unless explicitly false
+
+0.1.5 / 2011-02-26
+==================
+
+ * Delete sig cookie if signed cookie is deleted
+
+0.1.4 / 2011-02-26
+==================
+
+ * Always set path
+
+0.1.3 / 2011-02-26
+==================
+
+ * Add sensible defaults for path
+
+0.1.2 / 2011-02-26
+==================
+
+ * Inherit cookie properties to signature cookie
+
+0.1.1 / 2011-02-25
+==================
+
+ * Readme updates
+
+0.1.0 / 2011-02-25
+==================
+
+ * Initial release
diff --git a/express-server/node_modules/cookies/LICENSE b/express-server/node_modules/cookies/LICENSE
new file mode 100644
index 00000000..687e1e6d
--- /dev/null
+++ b/express-server/node_modules/cookies/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jed Schmidt, http://jed.is/
+Copyright (c) 2015-2016 Douglas Christopher Wilson
+
+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/express-server/node_modules/cookies/README.md b/express-server/node_modules/cookies/README.md
new file mode 100644
index 00000000..65ce9523
--- /dev/null
+++ b/express-server/node_modules/cookies/README.md
@@ -0,0 +1,158 @@
+Cookies
+=======
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Cookies is a [node.js](http://nodejs.org/) module for getting and setting HTTP(S) cookies. Cookies can be signed to prevent tampering, using [Keygrip](https://www.npmjs.com/package/keygrip). It can be used with the built-in node.js HTTP library, or as Connect/Express middleware.
+
+## Install
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```
+$ npm install cookies
+```
+
+## Features
+
+* **Lazy**: Since cookie verification against multiple keys could be expensive, cookies are only verified lazily when accessed, not eagerly on each request.
+
+* **Secure**: All cookies are `httponly` by default, and cookies sent over SSL are `secure` by default. An error will be thrown if you try to send secure cookies over an insecure socket.
+
+* **Unobtrusive**: Signed cookies are stored the same way as unsigned cookies, instead of in an obfuscated signing format. An additional signature cookie is stored for each signed cookie, using a standard naming convention (_cookie-name_`.sig`). This allows other libraries to access the original cookies without having to know the signing mechanism.
+
+* **Agnostic**: This library is optimized for use with [Keygrip](https://www.npmjs.com/package/keygrip), but does not require it; you can implement your own signing scheme instead if you like and use this library only to read/write cookies. Factoring the signing into a separate library encourages code reuse and allows you to use the same signing library for other areas where signing is needed, such as in URLs.
+
+## API
+
+### cookies = new Cookies( request, response, [ options ] )
+
+This creates a cookie jar corresponding to the current _request_ and _response_, additionally passing an object _options_.
+
+A [Keygrip](https://www.npmjs.com/package/keygrip) object or an array of keys can optionally be passed as _options.keys_ to enable cryptographic signing based on SHA1 HMAC, using rotated credentials.
+
+A Boolean can optionally be passed as _options.secure_ to explicitally specify if the connection is secure, rather than this module examining _request_.
+
+Note that since this only saves parameters without any other processing, it is very lightweight. Cookies are only parsed on demand when they are accessed.
+
+### express.createServer( Cookies.express( keys ) )
+
+This adds cookie support as a Connect middleware layer for use in Express apps, allowing inbound cookies to be read using `req.cookies.get` and outbound cookies to be set using `res.cookies.set`.
+
+### cookies.get( name, [ options ] )
+
+This extracts the cookie with the given name from the `Cookie` header in the request. If such a cookie exists, its value is returned. Otherwise, nothing is returned.
+
+`{ signed: true }` can optionally be passed as the second parameter _options_. In this case, a signature cookie (a cookie of same name ending with the `.sig` suffix appended) is fetched. If no such cookie exists, nothing is returned.
+
+If the signature cookie _does_ exist, the provided [Keygrip](https://www.npmjs.com/package/keygrip) object is used to check whether the hash of _cookie-name_=_cookie-value_ matches that of any registered key:
+
+* If the signature cookie hash matches the first key, the original cookie value is returned.
+* If the signature cookie hash matches any other key, the original cookie value is returned AND an outbound header is set to update the signature cookie's value to the hash of the first key. This enables automatic freshening of signature cookies that have become stale due to key rotation.
+* If the signature cookie hash does not match any key, nothing is returned, and an outbound header with an expired date is used to delete the cookie.
+
+### cookies.set( name, [ value ], [ options ] )
+
+This sets the given cookie in the response and returns the current context to allow chaining.
+
+If the _value_ is omitted, an outbound header with an expired date is used to delete the cookie.
+
+If the _options_ object is provided, it will be used to generate the outbound cookie header as follows:
+
+* `maxAge`: a number representing the milliseconds from `Date.now()` for expiry
+* `expires`: a `Date` object indicating the cookie's expiration date (expires at the end of session by default).
+* `path`: a string indicating the path of the cookie (`/` by default).
+* `domain`: a string indicating the domain of the cookie (no default).
+* `secure`: a boolean indicating whether the cookie is only to be sent over HTTPS (`false` by default for HTTP, `true` by default for HTTPS). [Read more about this option below](#secure-cookies).
+* `httpOnly`: a boolean indicating whether the cookie is only to be sent over HTTP(S), and not made available to client JavaScript (`true` by default).
+* `sameSite`: a boolean or string indicating whether the cookie is a "same site" cookie (`false` by default). This can be set to `'strict'`, `'lax'`, or `true` (which maps to `'strict'`).
+* `signed`: a boolean indicating whether the cookie is to be signed (`false` by default). If this is true, another cookie of the same name with the `.sig` suffix appended will also be sent, with a 27-byte url-safe base64 SHA1 value representing the hash of _cookie-name_=_cookie-value_ against the first [Keygrip](https://www.npmjs.com/package/keygrip) key. This signature key is used to detect tampering the next time a cookie is received.
+* `overwrite`: a boolean indicating whether to overwrite previously set cookies of the same name (`false` by default). If this is true, all cookies set during the same request with the same name (regardless of path or domain) are filtered out of the Set-Cookie header when setting this cookie.
+
+### Secure cookies
+
+To send a secure cookie, you set a cookie with the `secure: true` option.
+
+HTTPS is necessary for secure cookies. When `cookies.set` is called with `secure: true` and a secure connection is not detected, the cookie will not be set and an error will be thrown.
+
+This module will test each request to see if it's secure by checking:
+
+* if the `protocol` property of the request is set to `https`, or
+* if the `connection.encrypted` property of the request is set to `true`.
+
+If your server is running behind a proxy and you are using `secure: true`, you need to configure your server to read the request headers added by your proxy to determine whether the request is using a secure connection.
+
+For more information about working behind proxies, consult the framework you are using:
+
+* For Koa - [`app.proxy = true`](http://koajs.com/#settings)
+* For Express - [trust proxy setting](http://expressjs.com/en/4x/api.html#trust.proxy.options.table)
+
+If your Koa or Express server is properly configured, the `protocol` property of the request will be set to match the protocol reported by the proxy in the `X-Forwarded-Proto` header.
+
+## Example
+
+```javascript
+var http = require( "http" )
+var Cookies = require( "cookies" )
+
+server = http.createServer( function( req, res ) {
+ var cookies = new Cookies( req, res, { "keys": keys } )
+ , unsigned, signed, tampered
+
+ if ( req.url == "/set" ) {
+ cookies
+ // set a regular cookie
+ .set( "unsigned", "foo", { httpOnly: false } )
+
+ // set a signed cookie
+ .set( "signed", "bar", { signed: true } )
+
+ // mimic a signed cookie, but with a bogus signature
+ .set( "tampered", "baz" )
+ .set( "tampered.sig", "bogus" )
+
+ res.writeHead( 302, { "Location": "/" } )
+ return res.end( "Now let's check." )
+ }
+
+ unsigned = cookies.get( "unsigned" )
+ signed = cookies.get( "signed", { signed: true } )
+ tampered = cookies.get( "tampered", { signed: true } )
+
+ assert.equal( unsigned, "foo" )
+ assert.equal( signed, "bar" )
+ assert.notEqual( tampered, "baz" )
+ assert.equal( tampered, undefined )
+
+ res.writeHead( 200, { "Content-Type": "text/plain" } )
+ res.end(
+ "unsigned expected: foo\n\n" +
+ "unsigned actual: " + unsigned + "\n\n" +
+ "signed expected: bar\n\n" +
+ "signed actual: " + signed + "\n\n" +
+ "tampered expected: undefined\n\n"+
+ "tampered: " + tampered + "\n\n"
+ )
+})
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/cookies.svg
+[npm-url]: https://npmjs.org/package/cookies
+[coveralls-image]: https://img.shields.io/coveralls/pillarjs/cookies/master.svg
+[coveralls-url]: https://coveralls.io/r/pillarjs/cookies?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/cookies.svg
+[downloads-url]: https://npmjs.org/package/cookies
+[node-version-image]: https://img.shields.io/node/v/cookies.svg
+[node-version-url]: https://nodejs.org/en/download/
+[travis-image]: https://img.shields.io/travis/pillarjs/cookies/master.svg
+[travis-url]: https://travis-ci.org/pillarjs/cookies
diff --git a/express-server/node_modules/cookies/index.js b/express-server/node_modules/cookies/index.js
new file mode 100644
index 00000000..3672dfcc
--- /dev/null
+++ b/express-server/node_modules/cookies/index.js
@@ -0,0 +1,216 @@
+/*!
+ * cookies
+ * Copyright(c) 2014 Jed Schmidt, http://jed.is/
+ * Copyright(c) 2015-2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+var deprecate = require('depd')('cookies')
+var Keygrip = require('keygrip')
+var http = require('http')
+var cache = {}
+
+/**
+ * RegExp to match field-content in RFC 7230 sec 3.2
+ *
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
+ * field-vchar = VCHAR / obs-text
+ * obs-text = %x80-FF
+ */
+
+var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
+
+/**
+ * RegExp to match Same-Site cookie attribute value.
+ */
+
+var sameSiteRegExp = /^(?:lax|strict)$/i
+
+function Cookies(request, response, options) {
+ if (!(this instanceof Cookies)) return new Cookies(request, response, options)
+
+ this.secure = undefined
+ this.request = request
+ this.response = response
+
+ if (options) {
+ if (Array.isArray(options)) {
+ // array of key strings
+ deprecate('"keys" argument; provide using options {"keys": [...]}')
+ this.keys = new Keygrip(options)
+ } else if (options.constructor && options.constructor.name === 'Keygrip') {
+ // any keygrip constructor to allow different versions
+ deprecate('"keys" argument; provide using options {"keys": keygrip}')
+ this.keys = options
+ } else {
+ this.keys = Array.isArray(options.keys) ? new Keygrip(options.keys) : options.keys
+ this.secure = options.secure
+ }
+ }
+}
+
+Cookies.prototype.get = function(name, opts) {
+ var sigName = name + ".sig"
+ , header, match, value, remote, data, index
+ , signed = opts && opts.signed !== undefined ? opts.signed : !!this.keys
+
+ header = this.request.headers["cookie"]
+ if (!header) return
+
+ match = header.match(getPattern(name))
+ if (!match) return
+
+ value = match[1]
+ if (!opts || !signed) return value
+
+ remote = this.get(sigName)
+ if (!remote) return
+
+ data = name + "=" + value
+ if (!this.keys) throw new Error('.keys required for signed cookies');
+ index = this.keys.index(data, remote)
+
+ if (index < 0) {
+ this.set(sigName, null, {path: "/", signed: false })
+ } else {
+ index && this.set(sigName, this.keys.sign(data), { signed: false })
+ return value
+ }
+};
+
+Cookies.prototype.set = function(name, value, opts) {
+ var res = this.response
+ , req = this.request
+ , headers = res.getHeader("Set-Cookie") || []
+ , secure = this.secure !== undefined ? !!this.secure : req.protocol === 'https' || req.connection.encrypted
+ , cookie = new Cookie(name, value, opts)
+ , signed = opts && opts.signed !== undefined ? opts.signed : !!this.keys
+
+ if (typeof headers == "string") headers = [headers]
+
+ if (!secure && opts && opts.secure) {
+ throw new Error('Cannot send secure cookie over unencrypted connection')
+ }
+
+ cookie.secure = secure
+ if (opts && "secure" in opts) cookie.secure = opts.secure
+
+ if (opts && "secureProxy" in opts) {
+ deprecate('"secureProxy" option; use "secure" option, provide "secure" to constructor if needed')
+ cookie.secure = opts.secureProxy
+ }
+
+ headers = pushCookie(headers, cookie)
+
+ if (opts && signed) {
+ if (!this.keys) throw new Error('.keys required for signed cookies');
+ cookie.value = this.keys.sign(cookie.toString())
+ cookie.name += ".sig"
+ headers = pushCookie(headers, cookie)
+ }
+
+ var setHeader = res.set ? http.OutgoingMessage.prototype.setHeader : res.setHeader
+ setHeader.call(res, 'Set-Cookie', headers)
+ return this
+};
+
+function Cookie(name, value, attrs) {
+ if (!fieldContentRegExp.test(name)) {
+ throw new TypeError('argument name is invalid');
+ }
+
+ if (value && !fieldContentRegExp.test(value)) {
+ throw new TypeError('argument value is invalid');
+ }
+
+ value || (this.expires = new Date(0))
+
+ this.name = name
+ this.value = value || ""
+
+ for (var name in attrs) {
+ this[name] = attrs[name]
+ }
+
+ if (this.path && !fieldContentRegExp.test(this.path)) {
+ throw new TypeError('option path is invalid');
+ }
+
+ if (this.domain && !fieldContentRegExp.test(this.domain)) {
+ throw new TypeError('option domain is invalid');
+ }
+
+ if (this.sameSite && this.sameSite !== true && !sameSiteRegExp.test(this.sameSite)) {
+ throw new TypeError('option sameSite is invalid')
+ }
+}
+
+Cookie.prototype.path = "/";
+Cookie.prototype.expires = undefined;
+Cookie.prototype.domain = undefined;
+Cookie.prototype.httpOnly = true;
+Cookie.prototype.sameSite = false;
+Cookie.prototype.secure = false;
+Cookie.prototype.overwrite = false;
+
+Cookie.prototype.toString = function() {
+ return this.name + "=" + this.value
+};
+
+Cookie.prototype.toHeader = function() {
+ var header = this.toString()
+
+ if (this.maxAge) this.expires = new Date(Date.now() + this.maxAge);
+
+ if (this.path ) header += "; path=" + this.path
+ if (this.expires ) header += "; expires=" + this.expires.toUTCString()
+ if (this.domain ) header += "; domain=" + this.domain
+ if (this.sameSite ) header += "; samesite=" + (this.sameSite === true ? 'strict' : this.sameSite.toLowerCase())
+ if (this.secure ) header += "; secure"
+ if (this.httpOnly ) header += "; httponly"
+
+ return header
+};
+
+// back-compat so maxage mirrors maxAge
+Object.defineProperty(Cookie.prototype, 'maxage', {
+ configurable: true,
+ enumerable: true,
+ get: function () { return this.maxAge },
+ set: function (val) { return this.maxAge = val }
+});
+deprecate.property(Cookie.prototype, 'maxage', '"maxage"; use "maxAge" instead')
+
+function getPattern(name) {
+ if (cache[name]) return cache[name]
+
+ return cache[name] = new RegExp(
+ "(?:^|;) *" +
+ name.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") +
+ "=([^;]*)"
+ )
+}
+
+function pushCookie(cookies, cookie) {
+ if (cookie.overwrite) {
+ cookies = cookies.filter(function(c) { return c.indexOf(cookie.name+'=') !== 0 })
+ }
+ cookies.push(cookie.toHeader())
+ return cookies
+}
+
+Cookies.connect = Cookies.express = function(keys) {
+ return function(req, res, next) {
+ req.cookies = res.cookies = new Cookies(req, res, {
+ keys: keys
+ })
+
+ next()
+ }
+}
+
+Cookies.Cookie = Cookie
+
+module.exports = Cookies
diff --git a/express-server/node_modules/cookies/package.json b/express-server/node_modules/cookies/package.json
new file mode 100644
index 00000000..8ac3fbb8
--- /dev/null
+++ b/express-server/node_modules/cookies/package.json
@@ -0,0 +1,75 @@
+{
+ "_from": "cookies@0.7.1",
+ "_id": "cookies@0.7.1",
+ "_inBundle": false,
+ "_integrity": "sha1-fIphX1SBxhq58WyDNzG8uPZjuZs=",
+ "_location": "/cookies",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "cookies@0.7.1",
+ "name": "cookies",
+ "escapedName": "cookies",
+ "rawSpec": "0.7.1",
+ "saveSpec": null,
+ "fetchSpec": "0.7.1"
+ },
+ "_requiredBy": [
+ "/cookie-session"
+ ],
+ "_resolved": "https://registry.npmjs.org/cookies/-/cookies-0.7.1.tgz",
+ "_shasum": "7c8a615f5481c61ab9f16c833731bcb8f663b99b",
+ "_spec": "cookies@0.7.1",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\cookie-session",
+ "author": {
+ "name": "Jed Schmidt",
+ "email": "tr@nslator.jp",
+ "url": "http://jed.is"
+ },
+ "bugs": {
+ "url": "https://github.com/pillarjs/cookies/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "dependencies": {
+ "depd": "~1.1.1",
+ "keygrip": "~1.0.2"
+ },
+ "deprecated": false,
+ "description": "Cookies, optionally signed using Keygrip.",
+ "devDependencies": {
+ "express": "4.9.8",
+ "istanbul": "0.4.5",
+ "mocha": "2.5.3",
+ "restify": "2.8.1",
+ "supertest": "1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "index.js"
+ ],
+ "homepage": "https://github.com/pillarjs/cookies#readme",
+ "license": "MIT",
+ "name": "cookies",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/pillarjs/cookies.git"
+ },
+ "scripts": {
+ "test": "mocha --require test/support/env --reporter spec --bail --check-leaks test/",
+ "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/"
+ },
+ "version": "0.7.1"
+}
diff --git a/express-server/node_modules/ecdsa-sig-formatter/CODEOWNERS b/express-server/node_modules/ecdsa-sig-formatter/CODEOWNERS
new file mode 100644
index 00000000..4451d3d8
--- /dev/null
+++ b/express-server/node_modules/ecdsa-sig-formatter/CODEOWNERS
@@ -0,0 +1 @@
+* @omsmith
diff --git a/express-server/node_modules/ecdsa-sig-formatter/LICENSE b/express-server/node_modules/ecdsa-sig-formatter/LICENSE
new file mode 100644
index 00000000..8754ed63
--- /dev/null
+++ b/express-server/node_modules/ecdsa-sig-formatter/LICENSE
@@ -0,0 +1,201 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2015 D2L Corporation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/express-server/node_modules/ecdsa-sig-formatter/README.md b/express-server/node_modules/ecdsa-sig-formatter/README.md
new file mode 100644
index 00000000..daa95d6e
--- /dev/null
+++ b/express-server/node_modules/ecdsa-sig-formatter/README.md
@@ -0,0 +1,65 @@
+# ecdsa-sig-formatter
+
+[](https://travis-ci.org/Brightspace/node-ecdsa-sig-formatter) [](https://coveralls.io/r/Brightspace/node-ecdsa-sig-formatter)
+
+Translate between JOSE and ASN.1/DER encodings for ECDSA signatures
+
+## Install
+```sh
+npm install ecdsa-sig-formatter --save
+```
+
+## Usage
+```js
+var format = require('ecdsa-sig-formatter');
+
+var derSignature = '..'; // asn.1/DER encoded ecdsa signature
+
+var joseSignature = format.derToJose(derSignature);
+
+```
+
+### API
+
+---
+
+#### `.derToJose(Buffer|String signature, String alg)` -> `String`
+
+Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature.
+Returns a _base64 url_ encoded `String`.
+
+* If _signature_ is a `String`, it should be _base64_ encoded
+* _alg_ must be one of _ES256_, _ES384_ or _ES512_
+
+---
+
+#### `.joseToDer(Buffer|String signature, String alg)` -> `Buffer`
+
+Convert the JOSE-style concatenated signature to an ASN.1/DER encoded
+signature. Returns a `Buffer`
+
+* If _signature_ is a `String`, it should be _base64 url_ encoded
+* _alg_ must be one of _ES256_, _ES384_ or _ES512_
+
+## Contributing
+
+1. **Fork** the repository. Committing directly against this repository is
+ highly discouraged.
+
+2. Make your modifications in a branch, updating and writing new unit tests
+ as necessary in the `spec` directory.
+
+3. Ensure that all tests pass with `npm test`
+
+4. `rebase` your changes against master. *Do not merge*.
+
+5. Submit a pull request to this repository. Wait for tests to run and someone
+ to chime in.
+
+### Code Style
+
+This repository is configured with [EditorConfig][EditorConfig] and
+[ESLint][ESLint] rules.
+
+[EditorConfig]: http://editorconfig.org/
+[ESLint]: http://eslint.org
diff --git a/express-server/node_modules/ecdsa-sig-formatter/package.json b/express-server/node_modules/ecdsa-sig-formatter/package.json
new file mode 100644
index 00000000..aa7dff96
--- /dev/null
+++ b/express-server/node_modules/ecdsa-sig-formatter/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "ecdsa-sig-formatter@1.0.10",
+ "_id": "ecdsa-sig-formatter@1.0.10",
+ "_inBundle": false,
+ "_integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=",
+ "_location": "/ecdsa-sig-formatter",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ecdsa-sig-formatter@1.0.10",
+ "name": "ecdsa-sig-formatter",
+ "escapedName": "ecdsa-sig-formatter",
+ "rawSpec": "1.0.10",
+ "saveSpec": null,
+ "fetchSpec": "1.0.10"
+ },
+ "_requiredBy": [
+ "/jwa"
+ ],
+ "_resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz",
+ "_shasum": "1c595000f04a8897dfb85000892a0f4c33af86c3",
+ "_spec": "ecdsa-sig-formatter@1.0.10",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\jwa",
+ "author": {
+ "name": "D2L Corporation"
+ },
+ "bugs": {
+ "url": "https://github.com/Brightspace/node-ecdsa-sig-formatter/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ },
+ "deprecated": false,
+ "description": "Translate ECDSA signatures between ASN.1/DER and JOSE-style concatenation",
+ "devDependencies": {
+ "bench": "^0.3.6",
+ "chai": "^3.5.0",
+ "coveralls": "^2.11.9",
+ "eslint": "^2.12.0",
+ "eslint-config-brightspace": "^0.2.1",
+ "istanbul": "^0.4.3",
+ "jwk-to-pem": "^1.2.5",
+ "mocha": "^2.5.3",
+ "native-crypto": "^1.7.0"
+ },
+ "homepage": "https://github.com/Brightspace/node-ecdsa-sig-formatter#readme",
+ "keywords": [
+ "ecdsa",
+ "der",
+ "asn.1",
+ "jwt",
+ "jwa",
+ "jsonwebtoken",
+ "jose"
+ ],
+ "license": "Apache-2.0",
+ "main": "src/ecdsa-sig-formatter.js",
+ "name": "ecdsa-sig-formatter",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/Brightspace/node-ecdsa-sig-formatter.git"
+ },
+ "scripts": {
+ "check-style": "eslint .",
+ "pretest": "npm run check-style",
+ "report-cov": "cat ./coverage/lcov.info | coveralls",
+ "test": "istanbul cover --root src _mocha -- spec"
+ },
+ "version": "1.0.10"
+}
diff --git a/express-server/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js b/express-server/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js
new file mode 100644
index 00000000..38eeb9b9
--- /dev/null
+++ b/express-server/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js
@@ -0,0 +1,187 @@
+'use strict';
+
+var Buffer = require('safe-buffer').Buffer;
+
+var getParamBytesForAlg = require('./param-bytes-for-alg');
+
+var MAX_OCTET = 0x80,
+ CLASS_UNIVERSAL = 0,
+ PRIMITIVE_BIT = 0x20,
+ TAG_SEQ = 0x10,
+ TAG_INT = 0x02,
+ ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6),
+ ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6);
+
+function base64Url(base64) {
+ return base64
+ .replace(/=/g, '')
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_');
+}
+
+function signatureAsBuffer(signature) {
+ if (Buffer.isBuffer(signature)) {
+ return signature;
+ } else if ('string' === typeof signature) {
+ return Buffer.from(signature, 'base64');
+ }
+
+ throw new TypeError('ECDSA signature must be a Base64 string or a Buffer');
+}
+
+function derToJose(signature, alg) {
+ signature = signatureAsBuffer(signature);
+ var paramBytes = getParamBytesForAlg(alg);
+
+ // the DER encoded param should at most be the param size, plus a padding
+ // zero, since due to being a signed integer
+ var maxEncodedParamLength = paramBytes + 1;
+
+ var inputLength = signature.length;
+
+ var offset = 0;
+ if (signature[offset++] !== ENCODED_TAG_SEQ) {
+ throw new Error('Could not find expected "seq"');
+ }
+
+ var seqLength = signature[offset++];
+ if (seqLength === (MAX_OCTET | 1)) {
+ seqLength = signature[offset++];
+ }
+
+ if (inputLength - offset < seqLength) {
+ throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining');
+ }
+
+ if (signature[offset++] !== ENCODED_TAG_INT) {
+ throw new Error('Could not find expected "int" for "r"');
+ }
+
+ var rLength = signature[offset++];
+
+ if (inputLength - offset - 2 < rLength) {
+ throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available');
+ }
+
+ if (maxEncodedParamLength < rLength) {
+ throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
+ }
+
+ var rOffset = offset;
+ offset += rLength;
+
+ if (signature[offset++] !== ENCODED_TAG_INT) {
+ throw new Error('Could not find expected "int" for "s"');
+ }
+
+ var sLength = signature[offset++];
+
+ if (inputLength - offset !== sLength) {
+ throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"');
+ }
+
+ if (maxEncodedParamLength < sLength) {
+ throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
+ }
+
+ var sOffset = offset;
+ offset += sLength;
+
+ if (offset !== inputLength) {
+ throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain');
+ }
+
+ var rPadding = paramBytes - rLength,
+ sPadding = paramBytes - sLength;
+
+ var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength);
+
+ for (offset = 0; offset < rPadding; ++offset) {
+ dst[offset] = 0;
+ }
+ signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength);
+
+ offset = paramBytes;
+
+ for (var o = offset; offset < o + sPadding; ++offset) {
+ dst[offset] = 0;
+ }
+ signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength);
+
+ dst = dst.toString('base64');
+ dst = base64Url(dst);
+
+ return dst;
+}
+
+function countPadding(buf, start, stop) {
+ var padding = 0;
+ while (start + padding < stop && buf[start + padding] === 0) {
+ ++padding;
+ }
+
+ var needsSign = buf[start + padding] >= MAX_OCTET;
+ if (needsSign) {
+ --padding;
+ }
+
+ return padding;
+}
+
+function joseToDer(signature, alg) {
+ signature = signatureAsBuffer(signature);
+ var paramBytes = getParamBytesForAlg(alg);
+
+ var signatureBytes = signature.length;
+ if (signatureBytes !== paramBytes * 2) {
+ throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"');
+ }
+
+ var rPadding = countPadding(signature, 0, paramBytes);
+ var sPadding = countPadding(signature, paramBytes, signature.length);
+ var rLength = paramBytes - rPadding;
+ var sLength = paramBytes - sPadding;
+
+ var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength;
+
+ var shortLength = rsBytes < MAX_OCTET;
+
+ var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes);
+
+ var offset = 0;
+ dst[offset++] = ENCODED_TAG_SEQ;
+ if (shortLength) {
+ // Bit 8 has value "0"
+ // bits 7-1 give the length.
+ dst[offset++] = rsBytes;
+ } else {
+ // Bit 8 of first octet has value "1"
+ // bits 7-1 give the number of additional length octets.
+ dst[offset++] = MAX_OCTET | 1;
+ // length, base 256
+ dst[offset++] = rsBytes & 0xff;
+ }
+ dst[offset++] = ENCODED_TAG_INT;
+ dst[offset++] = rLength;
+ if (rPadding < 0) {
+ dst[offset++] = 0;
+ offset += signature.copy(dst, offset, 0, paramBytes);
+ } else {
+ offset += signature.copy(dst, offset, rPadding, paramBytes);
+ }
+ dst[offset++] = ENCODED_TAG_INT;
+ dst[offset++] = sLength;
+ if (sPadding < 0) {
+ dst[offset++] = 0;
+ signature.copy(dst, offset, paramBytes);
+ } else {
+ signature.copy(dst, offset, paramBytes + sPadding);
+ }
+
+ return dst;
+}
+
+module.exports = {
+ derToJose: derToJose,
+ joseToDer: joseToDer
+};
diff --git a/express-server/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js b/express-server/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
new file mode 100644
index 00000000..9fe67acc
--- /dev/null
+++ b/express-server/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
@@ -0,0 +1,23 @@
+'use strict';
+
+function getParamSize(keySize) {
+ var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1);
+ return result;
+}
+
+var paramBytesForAlg = {
+ ES256: getParamSize(256),
+ ES384: getParamSize(384),
+ ES512: getParamSize(521)
+};
+
+function getParamBytesForAlg(alg) {
+ var paramBytes = paramBytesForAlg[alg];
+ if (paramBytes) {
+ return paramBytes;
+ }
+
+ throw new Error('Unknown algorithm "' + alg + '"');
+}
+
+module.exports = getParamBytesForAlg;
diff --git a/express-server/node_modules/es6-promise/CHANGELOG.md b/express-server/node_modules/es6-promise/CHANGELOG.md
new file mode 100644
index 00000000..51582059
--- /dev/null
+++ b/express-server/node_modules/es6-promise/CHANGELOG.md
@@ -0,0 +1,151 @@
+# Master
+
+# 4.2.4
+
+* [Fixes #305] Confuse webpack
+
+# 4.2.3
+
+* Cleanup testem related build configuration
+* Use `prepublishOnly` instead of `prepublish` (thanks @rhysd)
+* Add Node.js 9, 8 to testing matrix
+* drop now unused s3 deployment files
+* internal cleanup (thanks to @bekzod, @mariusschulz)
+* Fixup Changelog
+
+# 4.2.2
+
+* Ensure PROMISE_ID works correctly
+* internal cleanup (thanks yo @mariusschulz)
+
+# 4.2.1
+
+* drop bower support
+
+# 4.2.0
+
+* drop `dist` from git repo
+* add `Promise.prototype.finally`
+* update various build related dependencies
+* add CDN links
+
+# 4.1.0
+
+* [BUGFIX] Fix memory leak [#269]
+* [BUGFIX] Auto Bundles within an AMD Environment [#263]
+
+# 4.0.5
+
+* fix require('es6-promise/auto') for Node < 4
+
+# 4.0.4
+
+* fix asap when using https://github.com/Kinvey/titanium-sdk
+
+# 4.0.3
+
+* fix Readme links
+
+# 4.0.2
+
+* fix require('es6-promise/auto');
+
+# 4.0.0
+
+* no longer polyfill automatically, if needed one can still invoke
+ `require('es6-promise/auto')` directly.
+
+# 3.3.1
+
+* fix links in readme
+
+# 3.3.0
+
+* support polyfil on WebMAF (playstation env)
+* fix tampering related bug global `constructor` was referenced by mistake.
+* provide TS Typings
+* increase compatibliity with sinon.useFakeTimers();
+* update build tools (use rollup)
+* directly export promise;
+
+# 3.2.2
+
+* IE8: use isArray
+* update build dependencies
+
+# 3.2.1
+
+* fix race tampering issue
+* use eslint
+* fix Promise.all tampering
+* remove unused code
+* fix issues with NWJS/electron
+
+# 3.2.0
+
+* improve tamper resistence of Promise.all Promise.race and
+ Promise.prototype.then (note, this isn't complete, but addresses an exception
+ when used \w core-js, follow up work will address entirely)
+* remove spec incompatible then chaining fast-path
+* add eslint
+* update build deps
+
+# 3.1.2
+
+* fix node detection issues with NWJS/electron
+
+# 3.1.0
+
+* improve performance of Promise.all when it encounters a non-promise input object input
+* then/resolve tamper protection
+* reduce AST size of promise constructor, to facilitate more inlining
+* Update README.md with details about PhantomJS requirement for running tests
+* Mangle and compress the minified version
+
+# 3.0.2
+
+* correctly bump both bower and package.json versions
+
+# 3.0.1
+
+* no longer include dist/test in npm releases
+
+# 3.0.0
+
+* use nextTick() instead of setImmediate() to schedule microtasks with node 0.10. Later versions of
+ nodes are not affected as they were already using nextTick(). Note that using nextTick() might
+ trigger a depreciation warning on 0.10 as described at https://github.com/cujojs/when/issues/410.
+ The reason why nextTick() is preferred is that is setImmediate() would schedule a macrotask
+ instead of a microtask and might result in a different scheduling.
+ If needed you can revert to the former behavior as follow:
+
+ var Promise = require('es6-promise').Promise;
+ Promise._setScheduler(setImmediate);
+
+# 2.3.0
+
+* #121: Ability to override the internal asap implementation
+* #120: Use an ascii character for an apostrophe, for source maps
+
+# 2.2.0
+
+* #116: Expose asap() and a way to override the scheduling mechanism on Promise
+* Lock to v0.2.3 of ember-cli
+
+# 2.1.1
+
+* Fix #100 via #105: tell browserify to ignore vertx require
+* Fix #101 via #102: "follow thenable state, not own state"
+
+# 2.1.0
+
+* #59: Automatic polyfill. No need to invoke `ES6Promise.polyfill()` anymore.
+* ... (see the commit log)
+
+# 2.0.0
+
+* re-sync with RSVP. Many large performance improvements and bugfixes.
+
+# 1.0.0
+
+* first subset of RSVP
diff --git a/express-server/node_modules/es6-promise/LICENSE b/express-server/node_modules/es6-promise/LICENSE
new file mode 100644
index 00000000..954ec599
--- /dev/null
+++ b/express-server/node_modules/es6-promise/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/express-server/node_modules/es6-promise/README.md b/express-server/node_modules/es6-promise/README.md
new file mode 100644
index 00000000..951db75f
--- /dev/null
+++ b/express-server/node_modules/es6-promise/README.md
@@ -0,0 +1,97 @@
+# ES6-Promise (subset of [rsvp.js](https://github.com/tildeio/rsvp.js)) [](https://travis-ci.org/stefanpenner/es6-promise)
+
+This is a polyfill of the [ES6 Promise](http://www.ecma-international.org/ecma-262/6.0/#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
+
+For API details and how to use promises, see the JavaScript Promises HTML5Rocks article.
+
+## Downloads
+
+* [es6-promise 27.86 KB (7.33 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.js)
+* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
+* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.min.js)
+* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+
+## CDN
+
+To use via a CDN include this in your html:
+
+```html
+
+
+
+
+
+
+
+
+```
+
+## Node.js
+
+To install:
+
+```sh
+yarn add es6-promise
+```
+
+or
+
+```sh
+npm install es6-promise
+```
+
+To use:
+
+```js
+var Promise = require('es6-promise').Promise;
+```
+
+
+## Usage in IE<9
+
+`catch` and `finally` are reserved keywords in IE<9, meaning
+`promise.catch(func)` or `promise.finally(func)` throw a syntax error. To work
+around this, you can use a string to access the property as shown in the
+following example.
+
+However most minifiers will automatically fix this for you, making the
+resulting code safe for old browsers and production:
+
+```js
+promise['catch'](function(err) {
+ // ...
+});
+```
+
+```js
+promise['finally'](function() {
+ // ...
+});
+```
+
+## Auto-polyfill
+
+To polyfill the global environment (either in Node or in the browser via CommonJS) use the following code snippet:
+
+```js
+require('es6-promise').polyfill();
+```
+
+Alternatively
+
+```js
+require('es6-promise/auto');
+```
+
+Notice that we don't assign the result of `polyfill()` to any variable. The `polyfill()` method will patch the global environment (in this case to the `Promise` name) when called.
+
+## Building & Testing
+
+You will need to have PhantomJS installed globally in order to run the tests.
+
+`npm install -g phantomjs`
+
+* `npm run build` to build
+* `npm test` to run tests
+* `npm start` to run a build watcher, and webserver to test
+* `npm run test:server` for a testem test runner and watching builder
diff --git a/express-server/node_modules/es6-promise/auto.js b/express-server/node_modules/es6-promise/auto.js
new file mode 100644
index 00000000..92bbf36e
--- /dev/null
+++ b/express-server/node_modules/es6-promise/auto.js
@@ -0,0 +1,4 @@
+// This file can be required in Browserify and Node.js for automatic polyfill
+// To use it: require('es6-promise/auto');
+'use strict';
+module.exports = require('./').polyfill();
diff --git a/express-server/node_modules/es6-promise/dist/es6-promise.auto.js b/express-server/node_modules/es6-promise/dist/es6-promise.auto.js
new file mode 100644
index 00000000..5ce45581
--- /dev/null
+++ b/express-server/node_modules/es6-promise/dist/es6-promise.auto.js
@@ -0,0 +1,1185 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
+ * @license Licensed under MIT license
+ * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
+ * @version v4.2.5+7f2b526d
+ */
+
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.ES6Promise = factory());
+}(this, (function () { 'use strict';
+
+function objectOrFunction(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+function isFunction(x) {
+ return typeof x === 'function';
+}
+
+
+
+var _isArray = void 0;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+}
+
+var isArray = _isArray;
+
+var len = 0;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
+
+var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+};
+
+function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+function setAsap(asapFn) {
+ asap = asapFn;
+}
+
+var browserWindow = typeof window !== 'undefined' ? window : undefined;
+var browserGlobal = browserWindow || {};
+var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function () {
+ return process.nextTick(flush);
+ };
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function () {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ var iterations = 0;
+ var observer = new BrowserMutationObserver(flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function () {
+ node.data = iterations = ++iterations % 2;
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return function () {
+ return channel.port2.postMessage(0);
+ };
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ var globalSetTimeout = setTimeout;
+ return function () {
+ return globalSetTimeout(flush, 1);
+ };
+}
+
+var queue = new Array(1000);
+function flush() {
+ for (var i = 0; i < len; i += 2) {
+ var callback = queue[i];
+ var arg = queue[i + 1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i + 1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ var vertx = Function('return this')().require('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch (e) {
+ return useSetTimeout();
+ }
+}
+
+var scheduleFlush = void 0;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
+
+function then(onFulfillment, onRejection) {
+ var parent = this;
+
+ var child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ var _state = parent._state;
+
+
+ if (_state) {
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+function resolve$1(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(noop);
+ resolve(promise, object);
+ return promise;
+}
+
+var PROMISE_ID = Math.random().toString(36).substring(2);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+var TRY_CATCH_ERROR = { error: null };
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch (error) {
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then$$1.call(value, fulfillmentHandler, rejectionHandler);
+ } catch (e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then$$1) {
+ asap(function (promise) {
+ var sealed = false;
+ var error = tryThen(then$$1, thenable, function (value) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, function (reason) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, function (value) {
+ return resolve(promise, value);
+ }, function (reason) {
+ return reject(promise, reason);
+ });
+ }
+}
+
+function handleMaybeThenable(promise, maybeThenable, then$$1) {
+ if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
+ handleOwnThenable(promise, maybeThenable);
+ } else {
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
+ } else if (then$$1 === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then$$1)) {
+ handleForeignThenable(promise, maybeThenable, then$$1);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ var _subscribers = parent._subscribers;
+ var length = _subscribers.length;
+
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) {
+ return;
+ }
+
+ var child = void 0,
+ callback = void 0,
+ detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch (e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = isFunction(callback),
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ if (promise._state !== PENDING) {
+ // noop
+ } else if (hasCallback && succeeded) {
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value) {
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch (e) {
+ reject(promise, e);
+ }
+}
+
+var id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
+
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
+
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
+
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
+ fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
+ }
+ } else {
+ reject(this.promise, validationError());
+ }
+ }
+
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
+
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
+
+
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
+
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$2) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
+ } else {
+ this._willSettleAt(resolve$$1(entry), i);
+ }
+ };
+
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
+
+
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
+ }
+
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
+
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
+
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+function all(entries) {
+ return new Enumerator(this, entries).promise;
+}
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+function race(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor(function (_, reject) {
+ return reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function (resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+function reject$1(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(noop);
+ reject(promise, reason);
+ return promise;
+}
+
+function needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. The
+ primary way of interacting with a promise is through its `then` method, which
+ registers callbacks to receive either a promise's eventual value or the reason
+ why the promise cannot be fulfilled.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @param {Function} resolver
+ Useful for tooling.
+ @constructor
+*/
+
+var Promise$2 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
+
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
+
+ /**
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
+ // failure
+ } else {
+ // success
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
+ }
+ // success
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
+
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
+
+
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
+
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
+
+ Synchronous example:
+
+ ```js
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
+ }
+
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
+ }
+ ```
+
+ Asynchronous example:
+
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
+ });
+ ```
+
+ @method finally
+ @param {Function} callback
+ @return {Promise}
+ */
+
+
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
+
+ if (isFunction(callback)) {
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
+ });
+ }
+
+ return promise.then(callback, callback);
+ };
+
+ return Promise;
+}();
+
+Promise$2.prototype.then = then;
+Promise$2.all = all;
+Promise$2.race = race;
+Promise$2.resolve = resolve$1;
+Promise$2.reject = reject$1;
+Promise$2._setScheduler = setScheduler;
+Promise$2._setAsap = setAsap;
+Promise$2._asap = asap;
+
+/*global self*/
+function polyfill() {
+ var local = void 0;
+
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
+ }
+
+ var P = local.Promise;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
+ }
+ }
+
+ local.Promise = Promise$2;
+}
+
+// Strange compat..
+Promise$2.polyfill = polyfill;
+Promise$2.Promise = Promise$2;
+
+Promise$2.polyfill();
+
+return Promise$2;
+
+})));
+
+
+
+//# sourceMappingURL=es6-promise.auto.map
diff --git a/express-server/node_modules/es6-promise/dist/es6-promise.auto.map b/express-server/node_modules/es6-promise/dist/es6-promise.auto.map
new file mode 100644
index 00000000..68cfb126
--- /dev/null
+++ b/express-server/node_modules/es6-promise/dist/es6-promise.auto.map
@@ -0,0 +1 @@
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.5+7f2b526d\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC;AACvB,IAAI,iBAAiB,GAAG,KAAK,CAAC,CAAC;;AAE/B,AAAO,IAAI,IAAI,GAAG,SAAS,IAAI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AAG;EACjC,IAAI,KAAK,GAAG,KAAK,CAAC,CAAC;;EAEnB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.js"}
\ No newline at end of file
diff --git a/express-server/node_modules/es6-promise/dist/es6-promise.auto.min.js b/express-server/node_modules/es6-promise/dist/es6-promise.auto.min.js
new file mode 100644
index 00000000..586ddb4b
--- /dev/null
+++ b/express-server/node_modules/es6-promise/dist/es6-promise.auto.min.js
@@ -0,0 +1 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC;AACvB,IAAI,iBAAiB,GAAG,KAAK,CAAC,CAAC;;AAE/B,AAAO,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EAC7C,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GA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MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.min.js"}
\ No newline at end of file
diff --git a/express-server/node_modules/es6-promise/dist/es6-promise.js b/express-server/node_modules/es6-promise/dist/es6-promise.js
new file mode 100644
index 00000000..5569f0bb
--- /dev/null
+++ b/express-server/node_modules/es6-promise/dist/es6-promise.js
@@ -0,0 +1,1183 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
+ * @license Licensed under MIT license
+ * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
+ * @version v4.2.5+7f2b526d
+ */
+
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.ES6Promise = factory());
+}(this, (function () { 'use strict';
+
+function objectOrFunction(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+function isFunction(x) {
+ return typeof x === 'function';
+}
+
+
+
+var _isArray = void 0;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+}
+
+var isArray = _isArray;
+
+var len = 0;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
+
+var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+};
+
+function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+function setAsap(asapFn) {
+ asap = asapFn;
+}
+
+var browserWindow = typeof window !== 'undefined' ? window : undefined;
+var browserGlobal = browserWindow || {};
+var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function () {
+ return process.nextTick(flush);
+ };
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function () {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ var iterations = 0;
+ var observer = new BrowserMutationObserver(flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function () {
+ node.data = iterations = ++iterations % 2;
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return function () {
+ return channel.port2.postMessage(0);
+ };
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ var globalSetTimeout = setTimeout;
+ return function () {
+ return globalSetTimeout(flush, 1);
+ };
+}
+
+var queue = new Array(1000);
+function flush() {
+ for (var i = 0; i < len; i += 2) {
+ var callback = queue[i];
+ var arg = queue[i + 1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i + 1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ var vertx = Function('return this')().require('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch (e) {
+ return useSetTimeout();
+ }
+}
+
+var scheduleFlush = void 0;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
+
+function then(onFulfillment, onRejection) {
+ var parent = this;
+
+ var child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ var _state = parent._state;
+
+
+ if (_state) {
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+function resolve$1(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(noop);
+ resolve(promise, object);
+ return promise;
+}
+
+var PROMISE_ID = Math.random().toString(36).substring(2);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+var TRY_CATCH_ERROR = { error: null };
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch (error) {
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then$$1.call(value, fulfillmentHandler, rejectionHandler);
+ } catch (e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then$$1) {
+ asap(function (promise) {
+ var sealed = false;
+ var error = tryThen(then$$1, thenable, function (value) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, function (reason) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, function (value) {
+ return resolve(promise, value);
+ }, function (reason) {
+ return reject(promise, reason);
+ });
+ }
+}
+
+function handleMaybeThenable(promise, maybeThenable, then$$1) {
+ if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
+ handleOwnThenable(promise, maybeThenable);
+ } else {
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
+ } else if (then$$1 === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then$$1)) {
+ handleForeignThenable(promise, maybeThenable, then$$1);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ var _subscribers = parent._subscribers;
+ var length = _subscribers.length;
+
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) {
+ return;
+ }
+
+ var child = void 0,
+ callback = void 0,
+ detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch (e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = isFunction(callback),
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ if (promise._state !== PENDING) {
+ // noop
+ } else if (hasCallback && succeeded) {
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value) {
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch (e) {
+ reject(promise, e);
+ }
+}
+
+var id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
+
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
+
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
+
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
+ fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
+ }
+ } else {
+ reject(this.promise, validationError());
+ }
+ }
+
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
+
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
+
+
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
+
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$1) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
+ } else {
+ this._willSettleAt(resolve$$1(entry), i);
+ }
+ };
+
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
+
+
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
+ }
+
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
+
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
+
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+function all(entries) {
+ return new Enumerator(this, entries).promise;
+}
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+function race(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor(function (_, reject) {
+ return reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function (resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+function reject$1(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(noop);
+ reject(promise, reason);
+ return promise;
+}
+
+function needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. The
+ primary way of interacting with a promise is through its `then` method, which
+ registers callbacks to receive either a promise's eventual value or the reason
+ why the promise cannot be fulfilled.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @param {Function} resolver
+ Useful for tooling.
+ @constructor
+*/
+
+var Promise$1 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
+
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
+
+ /**
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
+ // failure
+ } else {
+ // success
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
+ }
+ // success
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
+
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
+
+
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
+
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
+
+ Synchronous example:
+
+ ```js
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
+ }
+
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
+ }
+ ```
+
+ Asynchronous example:
+
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
+ });
+ ```
+
+ @method finally
+ @param {Function} callback
+ @return {Promise}
+ */
+
+
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
+
+ if (isFunction(callback)) {
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
+ });
+ }
+
+ return promise.then(callback, callback);
+ };
+
+ return Promise;
+}();
+
+Promise$1.prototype.then = then;
+Promise$1.all = all;
+Promise$1.race = race;
+Promise$1.resolve = resolve$1;
+Promise$1.reject = reject$1;
+Promise$1._setScheduler = setScheduler;
+Promise$1._setAsap = setAsap;
+Promise$1._asap = asap;
+
+/*global self*/
+function polyfill() {
+ var local = void 0;
+
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
+ }
+
+ var P = local.Promise;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
+ }
+ }
+
+ local.Promise = Promise$1;
+}
+
+// Strange compat..
+Promise$1.polyfill = polyfill;
+Promise$1.Promise = Promise$1;
+
+return Promise$1;
+
+})));
+
+
+
+//# sourceMappingURL=es6-promise.map
diff --git a/express-server/node_modules/es6-promise/dist/es6-promise.map b/express-server/node_modules/es6-promise/dist/es6-promise.map
new file mode 100644
index 00000000..ecbf33cf
--- /dev/null
+++ b/express-server/node_modules/es6-promise/dist/es6-promise.map
@@ -0,0 +1 @@
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.5+7f2b526d\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAA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AAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.js"}
\ No newline at end of file
diff --git a/express-server/node_modules/es6-promise/dist/es6-promise.min.js b/express-server/node_modules/es6-promise/dist/es6-promise.min.js
new file mode 100644
index 00000000..b37c7755
--- /dev/null
+++ b/express-server/node_modules/es6-promise/dist/es6-promise.min.js
@@ -0,0 +1 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AA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CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.min.js"}
\ No newline at end of file
diff --git a/express-server/node_modules/es6-promise/es6-promise.d.ts b/express-server/node_modules/es6-promise/es6-promise.d.ts
new file mode 100644
index 00000000..cce5b360
--- /dev/null
+++ b/express-server/node_modules/es6-promise/es6-promise.d.ts
@@ -0,0 +1,81 @@
+export interface Thenable {
+ then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Thenable;
+ then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => void): Thenable;
+}
+
+export class Promise implements Thenable {
+ /**
+ * If you call resolve in the body of the callback passed to the constructor,
+ * your promise is fulfilled with result object passed to resolve.
+ * If you call reject your promise is rejected with the object passed to resolve.
+ * For consistency and debugging (eg stack traces), obj should be an instanceof Error.
+ * Any errors thrown in the constructor callback will be implicitly passed to reject().
+ */
+ constructor (callback: (resolve : (value?: R | Thenable) => void, reject: (error?: any) => void) => void);
+
+ /**
+ * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects.
+ * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called.
+ * Both callbacks have a single parameter , the fulfillment value or rejection reason.
+ * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve.
+ * If an error is thrown in the callback, the returned promise rejects with that error.
+ *
+ * @param onFulfilled called when/if "promise" resolves
+ * @param onRejected called when/if "promise" rejects
+ */
+ then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Promise;
+ then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => void): Promise;
+
+ /**
+ * Sugar for promise.then(undefined, onRejected)
+ *
+ * @param onRejected called when/if "promise" rejects
+ */
+ catch (onRejected?: (error: any) => U | Thenable): Promise;
+
+ /**
+ * onSettled is invoked when/if the "promise" settles (either rejects or fulfills);
+ *
+ * @param onFinally called when/if "promise" settles
+ */
+ finally (onFinally?: (callback: any) => U | Thenable): Promise;
+
+ /**
+ * Make a new promise from the thenable.
+ * A thenable is promise-like in as far as it has a "then" method.
+ */
+ static resolve (): Promise;
+ static resolve (value: R | Thenable): Promise;
+
+ /**
+ * Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error
+ */
+ static reject (error: any): Promise;
+
+ /**
+ * Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects.
+ * the array passed to all can be a mixture of promise-like objects and other objects.
+ * The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value.
+ */
+ static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable, T6 | Thenable, T7 | Thenable, T8 | Thenable, T9 | Thenable, T10 | Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
+ static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable, T6 | Thenable, T7 | Thenable, T8 | Thenable, T9 | Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
+ static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable, T6 | Thenable, T7 | Thenable, T8 | Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
+ static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable, T6 | Thenable, T7 | Thenable]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
+ static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable, T6 | Thenable]): Promise<[T1, T2, T3, T4, T5, T6]>;
+ static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable , T5 | Thenable]): Promise<[T1, T2, T3, T4, T5]>;
+ static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable, T4 | Thenable ]): Promise<[T1, T2, T3, T4]>;
+ static all(values: [T1 | Thenable, T2 | Thenable, T3 | Thenable]): Promise<[T1, T2, T3]>;
+ static all(values: [T1 | Thenable, T2 | Thenable]): Promise<[T1, T2]>;
+ static all(values: [T1 | Thenable]): Promise<[T1]>;
+ static all(values: Array>): Promise;
+
+ /**
+ * Make a Promise that fulfills when any item fulfills, and rejects if any item rejects.
+ */
+ static race (promises: (R | Thenable)[]): Promise;
+}
+
+/**
+ * The polyfill method will patch the global environment (in this case to the Promise name) when called.
+ */
+export function polyfill (): void;
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise.auto.js b/express-server/node_modules/es6-promise/lib/es6-promise.auto.js
new file mode 100644
index 00000000..77997866
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise.auto.js
@@ -0,0 +1,3 @@
+import Promise from './es6-promise';
+Promise.polyfill();
+export default Promise;
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise.js b/express-server/node_modules/es6-promise/lib/es6-promise.js
new file mode 100644
index 00000000..4f4d840d
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise.js
@@ -0,0 +1,7 @@
+import Promise from './es6-promise/promise';
+import polyfill from './es6-promise/polyfill';
+
+// Strange compat..
+Promise.polyfill = polyfill;
+Promise.Promise = Promise;
+export default Promise;
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise/-internal.js b/express-server/node_modules/es6-promise/lib/es6-promise/-internal.js
new file mode 100644
index 00000000..925776f5
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise/-internal.js
@@ -0,0 +1,266 @@
+import {
+ objectOrFunction,
+ isFunction
+} from './utils';
+
+import {
+ asap
+} from './asap';
+
+import originalThen from './then';
+import originalResolve from './promise/resolve';
+
+export const PROMISE_ID = Math.random().toString(36).substring(2);
+
+function noop() {}
+
+const PENDING = void 0;
+const FULFILLED = 1;
+const REJECTED = 2;
+
+const TRY_CATCH_ERROR = { error: null };
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch(error) {
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then.call(value, fulfillmentHandler, rejectionHandler);
+ } catch(e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then) {
+ asap(promise => {
+ var sealed = false;
+ var error = tryThen(then, thenable, value => {
+ if (sealed) { return; }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, reason => {
+ if (sealed) { return; }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, value => resolve(promise, value),
+ reason => reject(promise, reason))
+ }
+}
+
+function handleMaybeThenable(promise, maybeThenable, then) {
+ if (maybeThenable.constructor === promise.constructor &&
+ then === originalThen &&
+ maybeThenable.constructor.resolve === originalResolve) {
+ handleOwnThenable(promise, maybeThenable);
+ } else {
+ if (then === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
+ } else if (then === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then)) {
+ handleForeignThenable(promise, maybeThenable, then);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) { return; }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) { return; }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ let { _subscribers } = parent;
+ let { length } = _subscribers;
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ let subscribers = promise._subscribers;
+ let settled = promise._state;
+
+ if (subscribers.length === 0) { return; }
+
+ let child, callback, detail = promise._result;
+
+ for (let i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch(e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ let hasCallback = isFunction(callback),
+ value, error, succeeded, failed;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ if (promise._state !== PENDING) {
+ // noop
+ } else if (hasCallback && succeeded) {
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value){
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch(e) {
+ reject(promise, e);
+ }
+}
+
+let id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+export {
+ nextId,
+ makePromise,
+ getThen,
+ noop,
+ resolve,
+ reject,
+ fulfill,
+ subscribe,
+ publish,
+ publishRejection,
+ initializePromise,
+ invokeCallback,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ handleMaybeThenable
+};
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise/asap.js b/express-server/node_modules/es6-promise/lib/es6-promise/asap.js
new file mode 100644
index 00000000..0483201d
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise/asap.js
@@ -0,0 +1,119 @@
+let len = 0;
+let vertxNext;
+let customSchedulerFn;
+
+export var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+}
+
+export function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+export function setAsap(asapFn) {
+ asap = asapFn;
+}
+
+const browserWindow = (typeof window !== 'undefined') ? window : undefined;
+const browserGlobal = browserWindow || {};
+const BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
+const isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
+
+// test for web worker but not in IE10
+const isWorker = typeof Uint8ClampedArray !== 'undefined' &&
+ typeof importScripts !== 'undefined' &&
+ typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return () => process.nextTick(flush);
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function() {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ let iterations = 0;
+ const observer = new BrowserMutationObserver(flush);
+ const node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return () => {
+ node.data = (iterations = ++iterations % 2);
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ const channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return () => channel.port2.postMessage(0);
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ const globalSetTimeout = setTimeout;
+ return () => globalSetTimeout(flush, 1);
+}
+
+const queue = new Array(1000);
+function flush() {
+ for (let i = 0; i < len; i+=2) {
+ let callback = queue[i];
+ let arg = queue[i+1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i+1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ const vertx = Function('return this')().require('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch(e) {
+ return useSetTimeout();
+ }
+}
+
+let scheduleFlush;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise/enumerator.js b/express-server/node_modules/es6-promise/lib/es6-promise/enumerator.js
new file mode 100644
index 00000000..b0eaa930
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise/enumerator.js
@@ -0,0 +1,113 @@
+import {
+ isArray,
+ isMaybeThenable
+} from './utils';
+import {
+ noop,
+ reject,
+ fulfill,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ getThen,
+ handleMaybeThenable
+} from './-internal';
+
+import then from './then';
+import Promise from './promise';
+import originalResolve from './promise/resolve';
+import originalThen from './then';
+import { makePromise, PROMISE_ID } from './-internal';
+
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+};
+
+export default class Enumerator {
+ constructor(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
+
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
+
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
+ fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
+ }
+ } else {
+ reject(this.promise, validationError());
+ }
+ }
+ _enumerate(input) {
+ for (let i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ }
+
+ _eachEntry(entry, i) {
+ let c = this._instanceConstructor;
+ let { resolve } = c;
+
+ if (resolve === originalResolve) {
+ let then = getThen(entry);
+
+ if (then === originalThen &&
+ entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise) {
+ let promise = new c(noop);
+ handleMaybeThenable(promise, entry, then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(resolve => resolve(entry)), i);
+ }
+ } else {
+ this._willSettleAt(resolve(entry), i);
+ }
+ }
+
+ _settledAt(state, i, value) {
+ let { promise } = this;
+
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
+ }
+
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ }
+
+ _willSettleAt(promise, i) {
+ let enumerator = this;
+
+ subscribe(
+ promise, undefined,
+ value => enumerator._settledAt(FULFILLED, i, value),
+ reason => enumerator._settledAt(REJECTED, i, reason)
+ );
+ }
+};
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise/polyfill.js b/express-server/node_modules/es6-promise/lib/es6-promise/polyfill.js
new file mode 100644
index 00000000..30db73c9
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise/polyfill.js
@@ -0,0 +1,35 @@
+/*global self*/
+import Promise from './promise';
+
+export default function polyfill() {
+ let local;
+
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
+ }
+
+ let P = local.Promise;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch(e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast){
+ return;
+ }
+ }
+
+ local.Promise = Promise;
+}
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise/promise.js b/express-server/node_modules/es6-promise/lib/es6-promise/promise.js
new file mode 100644
index 00000000..ae170363
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise/promise.js
@@ -0,0 +1,431 @@
+import {
+ isFunction
+} from './utils';
+import {
+ noop,
+ nextId,
+ PROMISE_ID,
+ initializePromise
+} from './-internal';
+import {
+ asap,
+ setAsap,
+ setScheduler
+} from './asap';
+
+import all from './promise/all';
+import race from './promise/race';
+import Resolve from './promise/resolve';
+import Reject from './promise/reject';
+import then from './then';
+
+function needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. The
+ primary way of interacting with a promise is through its `then` method, which
+ registers callbacks to receive either a promise's eventual value or the reason
+ why the promise cannot be fulfilled.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @param {Function} resolver
+ Useful for tooling.
+ @constructor
+*/
+
+class Promise {
+ constructor(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
+
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
+
+ /**
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+
+ Chaining
+ --------
+
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+
+ Assimilation
+ ------------
+
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+
+ If the assimliated promise rejects, then the downstream promise will also reject.
+
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+
+ Simple Example
+ --------------
+
+ Synchronous Example
+
+ ```javascript
+ let result;
+
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+
+ Errback Example
+
+ ```js
+ findResult(function(result, err){
+ if (err) {
+ // failure
+ } else {
+ // success
+ }
+ });
+ ```
+
+ Promise Example;
+
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+
+ Advanced Example
+ --------------
+
+ Synchronous Example
+
+ ```javascript
+ let author, books;
+
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+
+ Errback Example
+
+ ```js
+
+ function foundBooks(books) {
+
+ }
+
+ function failure(reason) {
+
+ }
+
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
+ }
+ // success
+ }
+ });
+ ```
+
+ Promise Example;
+
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
+
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
+ catch(onRejection) {
+ return this.then(null, onRejection);
+ }
+
+/**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
+
+ Synchronous example:
+
+ ```js
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
+ }
+
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
+ }
+ ```
+
+ Asynchronous example:
+
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
+ });
+ ```
+
+ @method finally
+ @param {Function} callback
+ @return {Promise}
+*/
+ finally(callback) {
+ let promise = this;
+ let constructor = promise.constructor;
+
+ if ( isFunction(callback) ) {
+ return promise.then(value => constructor.resolve(callback()).then(() => value),
+ reason => constructor.resolve(callback()).then(() => { throw reason; }));
+ }
+
+ return promise.then(callback, callback);
+ }
+}
+
+Promise.prototype.then = then;
+export default Promise;
+Promise.all = all;
+Promise.race = race;
+Promise.resolve = Resolve;
+Promise.reject = Reject;
+Promise._setScheduler = setScheduler;
+Promise._setAsap = setAsap;
+Promise._asap = asap;
+
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise/promise/all.js b/express-server/node_modules/es6-promise/lib/es6-promise/promise/all.js
new file mode 100644
index 00000000..9ca3c063
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise/promise/all.js
@@ -0,0 +1,52 @@
+import Enumerator from '../enumerator';
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+export default function all(entries) {
+ return new Enumerator(this, entries).promise;
+}
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise/promise/race.js b/express-server/node_modules/es6-promise/lib/es6-promise/promise/race.js
new file mode 100644
index 00000000..166dc820
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise/promise/race.js
@@ -0,0 +1,84 @@
+import {
+ isArray
+} from "../utils";
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+export default function race(entries) {
+ /*jshint validthis:true */
+ let Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor((_, reject) => reject(new TypeError('You must pass an array to race.')));
+ } else {
+ return new Constructor((resolve, reject) => {
+ let length = entries.length;
+ for (let i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise/promise/reject.js b/express-server/node_modules/es6-promise/lib/es6-promise/promise/reject.js
new file mode 100644
index 00000000..cd55faab
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise/promise/reject.js
@@ -0,0 +1,46 @@
+import {
+ noop,
+ reject as _reject
+} from '../-internal';
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+export default function reject(reason) {
+ /*jshint validthis:true */
+ let Constructor = this;
+ let promise = new Constructor(noop);
+ _reject(promise, reason);
+ return promise;
+}
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise/promise/resolve.js b/express-server/node_modules/es6-promise/lib/es6-promise/promise/resolve.js
new file mode 100644
index 00000000..f4642b63
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise/promise/resolve.js
@@ -0,0 +1,48 @@
+import {
+ noop,
+ resolve as _resolve
+} from '../-internal';
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+export default function resolve(object) {
+ /*jshint validthis:true */
+ let Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ let promise = new Constructor(noop);
+ _resolve(promise, object);
+ return promise;
+}
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise/then.js b/express-server/node_modules/es6-promise/lib/es6-promise/then.js
new file mode 100644
index 00000000..b2b79f0a
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise/then.js
@@ -0,0 +1,32 @@
+import {
+ invokeCallback,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ noop,
+ makePromise,
+ PROMISE_ID
+} from './-internal';
+
+import { asap } from './asap';
+
+export default function then(onFulfillment, onRejection) {
+ const parent = this;
+
+ const child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ const { _state } = parent;
+
+ if (_state) {
+ const callback = arguments[_state - 1];
+ asap(() => invokeCallback(_state, child, callback, parent._result));
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
diff --git a/express-server/node_modules/es6-promise/lib/es6-promise/utils.js b/express-server/node_modules/es6-promise/lib/es6-promise/utils.js
new file mode 100644
index 00000000..72545c5e
--- /dev/null
+++ b/express-server/node_modules/es6-promise/lib/es6-promise/utils.js
@@ -0,0 +1,21 @@
+export function objectOrFunction(x) {
+ let type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+export function isFunction(x) {
+ return typeof x === 'function';
+}
+
+export function isMaybeThenable(x) {
+ return x !== null && typeof x === 'object';
+}
+
+let _isArray;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = x => Object.prototype.toString.call(x) === '[object Array]';
+}
+
+export const isArray = _isArray;
diff --git a/express-server/node_modules/es6-promise/package.json b/express-server/node_modules/es6-promise/package.json
new file mode 100644
index 00000000..fbe109e5
--- /dev/null
+++ b/express-server/node_modules/es6-promise/package.json
@@ -0,0 +1,104 @@
+{
+ "_from": "es6-promise@^4.0.3",
+ "_id": "es6-promise@4.2.5",
+ "_inBundle": false,
+ "_integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==",
+ "_location": "/es6-promise",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "es6-promise@^4.0.3",
+ "name": "es6-promise",
+ "escapedName": "es6-promise",
+ "rawSpec": "^4.0.3",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.3"
+ },
+ "_requiredBy": [
+ "/es6-promisify"
+ ],
+ "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz",
+ "_shasum": "da6d0d5692efb461e082c14817fe2427d8f5d054",
+ "_spec": "es6-promise@^4.0.3",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\es6-promisify",
+ "author": {
+ "name": "Yehuda Katz, Tom Dale, Stefan Penner and contributors",
+ "url": "Conversion to ES6 API by Jake Archibald"
+ },
+ "browser": {
+ "vertx": false
+ },
+ "bugs": {
+ "url": "https://github.com/stefanpenner/es6-promise/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "A lightweight library that provides tools for organizing asynchronous code",
+ "devDependencies": {
+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
+ "babel-plugin-transform-es2015-block-scoping": "^6.24.1",
+ "babel-plugin-transform-es2015-classes": "^6.24.1",
+ "babel-plugin-transform-es2015-computed-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-constants": "^6.1.4",
+ "babel-plugin-transform-es2015-destructuring": "^6.23.0",
+ "babel-plugin-transform-es2015-parameters": "^6.24.1",
+ "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-spread": "^6.22.0",
+ "babel-plugin-transform-es2015-template-literals": "^6.22.0",
+ "babel6-plugin-strip-class-callcheck": "^6.0.0",
+ "broccoli-babel-transpiler": "^6.0.0",
+ "broccoli-concat": "^3.1.0",
+ "broccoli-merge-trees": "^2.0.0",
+ "broccoli-rollup": "^2.0.0",
+ "broccoli-stew": "^1.5.0",
+ "broccoli-uglify-js": "^0.2.0",
+ "broccoli-watchify": "^1.0.1",
+ "ember-cli": "2.18.0-beta.2",
+ "ember-cli-dependency-checker": "^2.1.0",
+ "git-repo-version": "1.0.1",
+ "json3": "^3.3.2",
+ "mocha": "^4.0.1",
+ "promises-aplus-tests-phantom": "^2.1.0-revise"
+ },
+ "directories": {
+ "lib": "lib"
+ },
+ "files": [
+ "dist",
+ "lib",
+ "es6-promise.d.ts",
+ "auto.js",
+ "!dist/test"
+ ],
+ "homepage": "https://github.com/stefanpenner/es6-promise#readme",
+ "keywords": [
+ "promises",
+ "promise",
+ "polyfill",
+ "futures"
+ ],
+ "license": "MIT",
+ "main": "dist/es6-promise.js",
+ "name": "es6-promise",
+ "namespace": "es6-promise",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stefanpenner/es6-promise.git"
+ },
+ "scripts": {
+ "build": "ember build --environment production",
+ "prepublishOnly": "ember build --environment production",
+ "start": "ember s",
+ "test": "ember test",
+ "test:browser": "ember test --launch PhantomJS",
+ "test:node": "ember test --launch Mocha",
+ "test:server": "ember test --server"
+ },
+ "spm": {
+ "main": "dist/es6-promise.js"
+ },
+ "typings": "es6-promise.d.ts",
+ "version": "4.2.5"
+}
diff --git a/express-server/node_modules/es6-promisify/README.md b/express-server/node_modules/es6-promisify/README.md
new file mode 100644
index 00000000..4141cc84
--- /dev/null
+++ b/express-server/node_modules/es6-promisify/README.md
@@ -0,0 +1,89 @@
+[](https://travis-ci.org/digitaldesignlabs/es6-promisify)
+
+# es6-promisify
+
+Converts callback-based functions to Promise-based functions.
+
+## Install
+
+Install with [npm](https://npmjs.org/package/es6-promisify)
+
+```bash
+npm install --save es6-promisify
+```
+
+## Example
+
+```js
+"use strict";
+
+// Declare variables
+const promisify = require("es6-promisify");
+const fs = require("fs");
+
+// Convert the stat function
+const stat = promisify(fs.stat);
+
+// Now usable as a promise!
+stat("example.txt").then(function (stats) {
+ console.log("Got stats", stats);
+}).catch(function (err) {
+ console.error("Yikes!", err);
+});
+```
+
+## Promisify methods
+```js
+"use strict";
+
+// Declare variables
+const promisify = require("es6-promisify");
+const redis = require("redis").createClient(6379, "localhost");
+
+// Create a promise-based version of send_command
+const client = promisify(redis.send_command, redis);
+
+// Send commands to redis and get a promise back
+client("ping").then(function (pong) {
+ console.log("Got", pong);
+}).catch(function (err) {
+ console.error("Unexpected error", err);
+}).then(function () {
+ redis.quit();
+});
+```
+
+## Handle callback multiple arguments
+```js
+"use strict";
+
+// Declare functions
+function test(cb) {
+ return cb(undefined, 1, 2, 3);
+}
+
+// Declare variables
+const promisify = require("es6-promisify");
+
+// Create promise-based version of test
+const single = promisify(test);
+const multi = promisify(test, {multiArgs: true});
+
+// Discards additional arguments
+single().then(function (result) {
+ console.log(result); // 1
+});
+
+// Returns all arguments as an array
+multi().then(function (result) {
+ console.log(result); // [1, 2, 3]
+});
+```
+
+### Tests
+Test with nodeunit
+```bash
+$ npm test
+```
+
+Published under the [MIT License](http://opensource.org/licenses/MIT).
diff --git a/express-server/node_modules/es6-promisify/dist/promise.js b/express-server/node_modules/es6-promisify/dist/promise.js
new file mode 100644
index 00000000..2fe5c610
--- /dev/null
+++ b/express-server/node_modules/es6-promisify/dist/promise.js
@@ -0,0 +1,73 @@
+"use strict";
+
+/* global self, window, module, global, require */
+module.exports = function () {
+
+ "use strict";
+
+ var globalObject = void 0;
+
+ function isFunction(x) {
+ return typeof x === "function";
+ }
+
+ // Seek the global object
+ if (global !== undefined) {
+ globalObject = global;
+ } else if (window !== undefined && window.document) {
+ globalObject = window;
+ } else {
+ globalObject = self;
+ }
+
+ // Test for any native promise implementation, and if that
+ // implementation appears to conform to the specificaton.
+ // This code mostly nicked from the es6-promise module polyfill
+ // and then fooled with.
+ var hasPromiseSupport = function () {
+
+ // No promise object at all, and it's a non-starter
+ if (!globalObject.hasOwnProperty("Promise")) {
+ return false;
+ }
+
+ // There is a Promise object. Does it conform to the spec?
+ var P = globalObject.Promise;
+
+ // Some of these methods are missing from
+ // Firefox/Chrome experimental implementations
+ if (!P.hasOwnProperty("resolve") || !P.hasOwnProperty("reject")) {
+ return false;
+ }
+
+ if (!P.hasOwnProperty("all") || !P.hasOwnProperty("race")) {
+ return false;
+ }
+
+ // Older version of the spec had a resolver object
+ // as the arg rather than a function
+ return function () {
+
+ var resolve = void 0;
+
+ var p = new globalObject.Promise(function (r) {
+ resolve = r;
+ });
+
+ if (p) {
+ return isFunction(resolve);
+ }
+
+ return false;
+ }();
+ }();
+
+ // Export the native Promise implementation if it
+ // looks like it matches the spec
+ if (hasPromiseSupport) {
+ return globalObject.Promise;
+ }
+
+ // Otherwise, return the es6-promise polyfill by @jaffathecake.
+ return require("es6-promise").Promise;
+}();
\ No newline at end of file
diff --git a/express-server/node_modules/es6-promisify/dist/promisify.js b/express-server/node_modules/es6-promisify/dist/promisify.js
new file mode 100644
index 00000000..ce38041b
--- /dev/null
+++ b/express-server/node_modules/es6-promisify/dist/promisify.js
@@ -0,0 +1,85 @@
+"use strict";
+
+/* global module, require */
+module.exports = function () {
+
+ "use strict";
+
+ // Get a promise object. This may be native, or it may be polyfilled
+
+ var ES6Promise = require("./promise.js");
+
+ /**
+ * thatLooksLikeAPromiseToMe()
+ *
+ * Duck-types a promise.
+ *
+ * @param {object} o
+ * @return {bool} True if this resembles a promise
+ */
+ function thatLooksLikeAPromiseToMe(o) {
+ return o && typeof o.then === "function" && typeof o.catch === "function";
+ }
+
+ /**
+ * promisify()
+ *
+ * Transforms callback-based function -- func(arg1, arg2 .. argN, callback) -- into
+ * an ES6-compatible Promise. Promisify provides a default callback of the form (error, result)
+ * and rejects when `error` is truthy. You can also supply settings object as the second argument.
+ *
+ * @param {function} original - The function to promisify
+ * @param {object} settings - Settings object
+ * @param {object} settings.thisArg - A `this` context to use. If not set, assume `settings` _is_ `thisArg`
+ * @param {bool} settings.multiArgs - Should multiple arguments be returned as an array?
+ * @return {function} A promisified version of `original`
+ */
+ return function promisify(original, settings) {
+
+ return function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var returnMultipleArguments = settings && settings.multiArgs;
+
+ var target = void 0;
+ if (settings && settings.thisArg) {
+ target = settings.thisArg;
+ } else if (settings) {
+ target = settings;
+ }
+
+ // Return the promisified function
+ return new ES6Promise(function (resolve, reject) {
+
+ // Append the callback bound to the context
+ args.push(function callback(err) {
+
+ if (err) {
+ return reject(err);
+ }
+
+ for (var _len2 = arguments.length, values = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ values[_key2 - 1] = arguments[_key2];
+ }
+
+ if (false === !!returnMultipleArguments) {
+ return resolve(values[0]);
+ }
+
+ resolve(values);
+ });
+
+ // Call the function
+ var response = original.apply(target, args);
+
+ // If it looks like original already returns a promise,
+ // then just resolve with that promise. Hopefully, the callback function we added will just be ignored.
+ if (thatLooksLikeAPromiseToMe(response)) {
+ resolve(response);
+ }
+ });
+ };
+ };
+}();
\ No newline at end of file
diff --git a/express-server/node_modules/es6-promisify/package.json b/express-server/node_modules/es6-promisify/package.json
new file mode 100644
index 00000000..7adaa1e7
--- /dev/null
+++ b/express-server/node_modules/es6-promisify/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "es6-promisify@^5.0.0",
+ "_id": "es6-promisify@5.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
+ "_location": "/es6-promisify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "es6-promisify@^5.0.0",
+ "name": "es6-promisify",
+ "escapedName": "es6-promisify",
+ "rawSpec": "^5.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^5.0.0"
+ },
+ "_requiredBy": [
+ "/agent-base"
+ ],
+ "_resolved": "http://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
+ "_shasum": "5109d62f3e56ea967c4b63505aef08291c8a5203",
+ "_spec": "es6-promisify@^5.0.0",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\agent-base",
+ "author": {
+ "name": "Mike Hall",
+ "email": "mikehall314@gmail.com"
+ },
+ "bugs": {
+ "url": "http://github.com/digitaldesignlabs/es6-promisify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "es6-promise": "^4.0.3"
+ },
+ "deprecated": false,
+ "description": "Converts callback-based functions to ES6 Promises",
+ "devDependencies": {
+ "babel-preset-es2015": "^6.9.0",
+ "eslint": "^2.13.1",
+ "gulp": "^3.9.1",
+ "gulp-babel": "^6.1.2",
+ "nodeunit": "^0.10.0"
+ },
+ "files": [
+ "dist/promisify.js",
+ "dist/promise.js"
+ ],
+ "greenkeeper": {
+ "ignore": [
+ "eslint"
+ ]
+ },
+ "homepage": "https://github.com/digitaldesignlabs/es6-promisify#readme",
+ "keywords": [
+ "promises",
+ "es6",
+ "promisify"
+ ],
+ "license": "MIT",
+ "main": "dist/promisify.js",
+ "name": "es6-promisify",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/digitaldesignlabs/es6-promisify.git"
+ },
+ "scripts": {
+ "pretest": "./node_modules/eslint/bin/eslint.js ./lib/*.js ./tests/*.js",
+ "test": "gulp && nodeunit tests"
+ },
+ "version": "5.0.0"
+}
diff --git a/express-server/node_modules/express/package.json b/express-server/node_modules/express/package.json
index 35c8ee9e..f49b5063 100644
--- a/express-server/node_modules/express/package.json
+++ b/express-server/node_modules/express/package.json
@@ -16,12 +16,13 @@
"fetchSpec": "~4.15.5"
},
"_requiredBy": [
+ "#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/express/-/express-4.15.5.tgz",
"_shasum": "670235ca9598890a5ae8170b83db722b842ed927",
"_spec": "express@~4.15.5",
- "_where": "D:\\5CHITM\\Diplomarbeit\\smart-shopper\\express-server",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server",
"author": {
"name": "TJ Holowaychuk",
"email": "tj@vision-media.ca"
diff --git a/express-server/node_modules/extend/.editorconfig b/express-server/node_modules/extend/.editorconfig
new file mode 100644
index 00000000..bc228f82
--- /dev/null
+++ b/express-server/node_modules/extend/.editorconfig
@@ -0,0 +1,20 @@
+root = true
+
+[*]
+indent_style = tab
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+max_line_length = 150
+
+[CHANGELOG.md]
+indent_style = space
+indent_size = 2
+
+[*.json]
+max_line_length = off
+
+[Makefile]
+max_line_length = off
diff --git a/express-server/node_modules/extend/.eslintrc b/express-server/node_modules/extend/.eslintrc
new file mode 100644
index 00000000..a34cf283
--- /dev/null
+++ b/express-server/node_modules/extend/.eslintrc
@@ -0,0 +1,17 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "complexity": [2, 20],
+ "eqeqeq": [2, "allow-null"],
+ "func-name-matching": [1],
+ "max-depth": [1, 4],
+ "max-statements": [2, 26],
+ "no-extra-parens": [1],
+ "no-magic-numbers": [0],
+ "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
+ "sort-keys": [0],
+ }
+}
diff --git a/express-server/node_modules/extend/.jscs.json b/express-server/node_modules/extend/.jscs.json
new file mode 100644
index 00000000..3cce01d7
--- /dev/null
+++ b/express-server/node_modules/extend/.jscs.json
@@ -0,0 +1,175 @@
+{
+ "es3": true,
+
+ "additionalRules": [],
+
+ "requireSemicolons": true,
+
+ "disallowMultipleSpaces": true,
+
+ "disallowIdentifierNames": [],
+
+ "requireCurlyBraces": {
+ "allExcept": [],
+ "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
+ },
+
+ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
+
+ "disallowSpaceAfterKeywords": [],
+
+ "disallowSpaceBeforeComma": true,
+ "disallowSpaceAfterComma": false,
+ "disallowSpaceBeforeSemicolon": true,
+
+ "disallowNodeTypes": [
+ "DebuggerStatement",
+ "LabeledStatement",
+ "SwitchCase",
+ "SwitchStatement",
+ "WithStatement"
+ ],
+
+ "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
+
+ "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
+ "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
+ "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
+
+ "requireSpaceBetweenArguments": true,
+
+ "disallowSpacesInsideParentheses": true,
+
+ "disallowSpacesInsideArrayBrackets": true,
+
+ "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
+
+ "disallowSpaceAfterObjectKeys": true,
+
+ "requireCommaBeforeLineBreak": true,
+
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+ "requireSpaceAfterPrefixUnaryOperators": [],
+
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "requireSpaceBeforePostfixUnaryOperators": [],
+
+ "disallowSpaceBeforeBinaryOperators": [],
+ "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+ "disallowSpaceAfterBinaryOperators": [],
+
+ "disallowImplicitTypeConversion": ["binary", "string"],
+
+ "disallowKeywords": ["with", "eval"],
+
+ "requireKeywordsOnNewLine": [],
+ "disallowKeywordsOnNewLine": ["else"],
+
+ "requireLineFeedAtFileEnd": true,
+
+ "disallowTrailingWhitespace": true,
+
+ "disallowTrailingComma": true,
+
+ "excludeFiles": ["node_modules/**", "vendor/**"],
+
+ "disallowMultipleLineStrings": true,
+
+ "requireDotNotation": { "allExcept": ["keywords"] },
+
+ "requireParenthesesAroundIIFE": true,
+
+ "validateLineBreaks": "LF",
+
+ "validateQuoteMarks": {
+ "escape": true,
+ "mark": "'"
+ },
+
+ "disallowOperatorBeforeLineBreak": [],
+
+ "requireSpaceBeforeKeywords": [
+ "do",
+ "for",
+ "if",
+ "else",
+ "switch",
+ "case",
+ "try",
+ "catch",
+ "finally",
+ "while",
+ "with",
+ "return"
+ ],
+
+ "validateAlignedFunctionParameters": {
+ "lineBreakAfterOpeningBraces": true,
+ "lineBreakBeforeClosingBraces": true
+ },
+
+ "requirePaddingNewLinesBeforeExport": true,
+
+ "validateNewlineAfterArrayElements": {
+ "maximum": 6
+ },
+
+ "requirePaddingNewLinesAfterUseStrict": true,
+
+ "disallowArrowFunctions": true,
+
+ "disallowMultiLineTernary": true,
+
+ "validateOrderInObjectKeys": false,
+
+ "disallowIdenticalDestructuringNames": true,
+
+ "disallowNestedTernaries": { "maxLevel": 1 },
+
+ "requireSpaceAfterComma": { "allExcept": ["trailing"] },
+ "requireAlignedMultilineParams": false,
+
+ "requireSpacesInGenerator": {
+ "afterStar": true
+ },
+
+ "disallowSpacesInGenerator": {
+ "beforeStar": true
+ },
+
+ "disallowVar": false,
+
+ "requireArrayDestructuring": false,
+
+ "requireEnhancedObjectLiterals": false,
+
+ "requireObjectDestructuring": false,
+
+ "requireEarlyReturn": false,
+
+ "requireCapitalizedConstructorsNew": {
+ "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
+ },
+
+ "requireImportAlphabetized": false,
+
+ "requireSpaceBeforeObjectValues": true,
+ "requireSpaceBeforeDestructuredValues": true,
+
+ "disallowSpacesInsideTemplateStringPlaceholders": true,
+
+ "disallowArrayDestructuringReturn": false,
+
+ "requireNewlineBeforeSingleStatementsInIf": false,
+
+ "disallowUnusedVariables": true,
+
+ "requireSpacesInsideImportedObjectBraces": true,
+
+ "requireUseStrict": true
+}
+
diff --git a/express-server/node_modules/extend/.travis.yml b/express-server/node_modules/extend/.travis.yml
new file mode 100644
index 00000000..5ccdfc49
--- /dev/null
+++ b/express-server/node_modules/extend/.travis.yml
@@ -0,0 +1,230 @@
+language: node_js
+os:
+ - linux
+node_js:
+ - "10.7"
+ - "9.11"
+ - "8.11"
+ - "7.10"
+ - "6.14"
+ - "5.12"
+ - "4.9"
+ - "iojs-v3.3"
+ - "iojs-v2.5"
+ - "iojs-v1.8"
+ - "0.12"
+ - "0.10"
+ - "0.8"
+before_install:
+ - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac'
+ - 'nvm install-latest-npm'
+install:
+ - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
+script:
+ - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
+ - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
+ - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
+ - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
+sudo: false
+env:
+ - TEST=true
+matrix:
+ fast_finish: true
+ include:
+ - node_js: "lts/*"
+ env: PRETEST=true
+ - node_js: "lts/*"
+ env: POSTTEST=true
+ - node_js: "4"
+ env: COVERAGE=true
+ - node_js: "10.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.13"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.12"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.4"
+ env: TEST=true ALLOW_FAILURE=true
+ allow_failures:
+ - os: osx
+ - env: TEST=true ALLOW_FAILURE=true
diff --git a/express-server/node_modules/extend/CHANGELOG.md b/express-server/node_modules/extend/CHANGELOG.md
new file mode 100644
index 00000000..2cf7de6f
--- /dev/null
+++ b/express-server/node_modules/extend/CHANGELOG.md
@@ -0,0 +1,83 @@
+3.0.2 / 2018-07-19
+==================
+ * [Fix] Prevent merging `__proto__` property (#48)
+ * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`
+ * [Tests] up to `node` `v10.7`, `v9.11`, `v8.11`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm`
+
+3.0.1 / 2017-04-27
+==================
+ * [Fix] deep extending should work with a non-object (#46)
+ * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`
+ * [Tests] up to `node` `v7.9`, `v6.10`, `v4.8`; improve matrix
+ * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG.
+ * [Docs] Add example to readme (#34)
+
+3.0.0 / 2015-07-01
+==================
+ * [Possible breaking change] Use global "strict" directive (#32)
+ * [Tests] `int` is an ES3 reserved word
+ * [Tests] Test up to `io.js` `v2.3`
+ * [Tests] Add `npm run eslint`
+ * [Dev Deps] Update `covert`, `jscs`
+
+2.0.1 / 2015-04-25
+==================
+ * Use an inline `isArray` check, for ES3 browsers. (#27)
+ * Some old browsers fail when an identifier is `toString`
+ * Test latest `node` and `io.js` versions on `travis-ci`; speed up builds
+ * Add license info to package.json (#25)
+ * Update `tape`, `jscs`
+ * Adding a CHANGELOG
+
+2.0.0 / 2014-10-01
+==================
+ * Increase code coverage to 100%; run code coverage as part of tests
+ * Add `npm run lint`; Run linter as part of tests
+ * Remove nodeType and setInterval checks in isPlainObject
+ * Updating `tape`, `jscs`, `covert`
+ * General style and README cleanup
+
+1.3.0 / 2014-06-20
+==================
+ * Add component.json for browser support (#18)
+ * Use SVG for badges in README (#16)
+ * Updating `tape`, `covert`
+ * Updating travis-ci to work with multiple node versions
+ * Fix `deep === false` bug (returning target as {}) (#14)
+ * Fixing constructor checks in isPlainObject
+ * Adding additional test coverage
+ * Adding `npm run coverage`
+ * Add LICENSE (#13)
+ * Adding a warning about `false`, per #11
+ * General style and whitespace cleanup
+
+1.2.1 / 2013-09-14
+==================
+ * Fixing hasOwnProperty bugs that would only have shown up in specific browsers. Fixes #8
+ * Updating `tape`
+
+1.2.0 / 2013-09-02
+==================
+ * Updating the README: add badges
+ * Adding a missing variable reference.
+ * Using `tape` instead of `buster` for tests; add more tests (#7)
+ * Adding node 0.10 to Travis CI (#6)
+ * Enabling "npm test" and cleaning up package.json (#5)
+ * Add Travis CI.
+
+1.1.3 / 2012-12-06
+==================
+ * Added unit tests.
+ * Ensure extend function is named. (Looks nicer in a stack trace.)
+ * README cleanup.
+
+1.1.1 / 2012-11-07
+==================
+ * README cleanup.
+ * Added installation instructions.
+ * Added a missing semicolon
+
+1.0.0 / 2012-04-08
+==================
+ * Initial commit
+
diff --git a/express-server/node_modules/extend/LICENSE b/express-server/node_modules/extend/LICENSE
new file mode 100644
index 00000000..e16d6a56
--- /dev/null
+++ b/express-server/node_modules/extend/LICENSE
@@ -0,0 +1,23 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Stefan Thomas
+
+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/express-server/node_modules/extend/README.md b/express-server/node_modules/extend/README.md
new file mode 100644
index 00000000..5b8249aa
--- /dev/null
+++ b/express-server/node_modules/extend/README.md
@@ -0,0 +1,81 @@
+[![Build Status][travis-svg]][travis-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+
+# extend() for Node.js [![Version Badge][npm-version-png]][npm-url]
+
+`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.
+
+Notes:
+
+* Since Node.js >= 4,
+ [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+ now offers the same functionality natively (but without the "deep copy" option).
+ See [ECMAScript 2015 (ES6) in Node.js](https://nodejs.org/en/docs/es6).
+* Some native implementations of `Object.assign` in both Node.js and many
+ browsers (since NPM modules are for the browser too) may not be fully
+ spec-compliant.
+ Check [`object.assign`](https://www.npmjs.com/package/object.assign) module for
+ a compliant candidate.
+
+## Installation
+
+This package is available on [npm][npm-url] as: `extend`
+
+``` sh
+npm install extend
+```
+
+## Usage
+
+**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**
+
+*Extend one object with one or more others, returning the modified object.*
+
+**Example:**
+
+``` js
+var extend = require('extend');
+extend(targetObject, object1, object2);
+```
+
+Keep in mind that the target object will be modified, and will be returned from extend().
+
+If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).
+Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over.
+Warning: passing `false` as the first argument is not supported.
+
+### Arguments
+
+* `deep` *Boolean* (optional)
+If set, the merge becomes recursive (i.e. deep copy).
+* `target` *Object*
+The object to extend.
+* `object1` *Object*
+The object that will be merged into the first.
+* `objectN` *Object* (Optional)
+More objects to merge into the first.
+
+## License
+
+`node-extend` is licensed under the [MIT License][mit-license-url].
+
+## Acknowledgements
+
+All credit to the jQuery authors for perfecting this amazing utility.
+
+Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].
+
+[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg
+[travis-url]: https://travis-ci.org/justmoon/node-extend
+[npm-url]: https://npmjs.org/package/extend
+[mit-license-url]: http://opensource.org/licenses/MIT
+[github-justmoon]: https://github.com/justmoon
+[github-insin]: https://github.com/insin
+[github-ljharb]: https://github.com/ljharb
+[npm-version-png]: http://versionbadg.es/justmoon/node-extend.svg
+[deps-svg]: https://david-dm.org/justmoon/node-extend.svg
+[deps-url]: https://david-dm.org/justmoon/node-extend
+[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg
+[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies
+
diff --git a/express-server/node_modules/extend/component.json b/express-server/node_modules/extend/component.json
new file mode 100644
index 00000000..1500a2f3
--- /dev/null
+++ b/express-server/node_modules/extend/component.json
@@ -0,0 +1,32 @@
+{
+ "name": "extend",
+ "author": "Stefan Thomas (http://www.justmoon.net)",
+ "version": "3.0.0",
+ "description": "Port of jQuery.extend for node.js and the browser.",
+ "scripts": [
+ "index.js"
+ ],
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "keywords": [
+ "extend",
+ "clone",
+ "merge"
+ ],
+ "repository" : {
+ "type": "git",
+ "url": "https://github.com/justmoon/node-extend.git"
+ },
+ "dependencies": {
+ },
+ "devDependencies": {
+ "tape" : "~3.0.0",
+ "covert": "~0.4.0",
+ "jscs": "~1.6.2"
+ }
+}
+
diff --git a/express-server/node_modules/extend/index.js b/express-server/node_modules/extend/index.js
new file mode 100644
index 00000000..2aa3faae
--- /dev/null
+++ b/express-server/node_modules/extend/index.js
@@ -0,0 +1,117 @@
+'use strict';
+
+var hasOwn = Object.prototype.hasOwnProperty;
+var toStr = Object.prototype.toString;
+var defineProperty = Object.defineProperty;
+var gOPD = Object.getOwnPropertyDescriptor;
+
+var isArray = function isArray(arr) {
+ if (typeof Array.isArray === 'function') {
+ return Array.isArray(arr);
+ }
+
+ return toStr.call(arr) === '[object Array]';
+};
+
+var isPlainObject = function isPlainObject(obj) {
+ if (!obj || toStr.call(obj) !== '[object Object]') {
+ return false;
+ }
+
+ var hasOwnConstructor = hasOwn.call(obj, 'constructor');
+ var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
+ // Not own constructor property must be Object
+ if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ var key;
+ for (key in obj) { /**/ }
+
+ return typeof key === 'undefined' || hasOwn.call(obj, key);
+};
+
+// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target
+var setProperty = function setProperty(target, options) {
+ if (defineProperty && options.name === '__proto__') {
+ defineProperty(target, options.name, {
+ enumerable: true,
+ configurable: true,
+ value: options.newValue,
+ writable: true
+ });
+ } else {
+ target[options.name] = options.newValue;
+ }
+};
+
+// Return undefined instead of __proto__ if '__proto__' is not an own property
+var getProperty = function getProperty(obj, name) {
+ if (name === '__proto__') {
+ if (!hasOwn.call(obj, name)) {
+ return void 0;
+ } else if (gOPD) {
+ // In early versions of node, obj['__proto__'] is buggy when obj has
+ // __proto__ as an own property. Object.getOwnPropertyDescriptor() works.
+ return gOPD(obj, name).value;
+ }
+ }
+
+ return obj[name];
+};
+
+module.exports = function extend() {
+ var options, name, src, copy, copyIsArray, clone;
+ var target = arguments[0];
+ var i = 1;
+ var length = arguments.length;
+ var deep = false;
+
+ // Handle a deep copy situation
+ if (typeof target === 'boolean') {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+ if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
+ target = {};
+ }
+
+ for (; i < length; ++i) {
+ options = arguments[i];
+ // Only deal with non-null/undefined values
+ if (options != null) {
+ // Extend the base object
+ for (name in options) {
+ src = getProperty(target, name);
+ copy = getProperty(options, name);
+
+ // Prevent never-ending loop
+ if (target !== copy) {
+ // Recurse if we're merging plain objects or arrays
+ if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
+ if (copyIsArray) {
+ copyIsArray = false;
+ clone = src && isArray(src) ? src : [];
+ } else {
+ clone = src && isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ setProperty(target, { name: name, newValue: extend(deep, clone, copy) });
+
+ // Don't bring in undefined values
+ } else if (typeof copy !== 'undefined') {
+ setProperty(target, { name: name, newValue: copy });
+ }
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
diff --git a/express-server/node_modules/extend/package.json b/express-server/node_modules/extend/package.json
new file mode 100644
index 00000000..a1f36558
--- /dev/null
+++ b/express-server/node_modules/extend/package.json
@@ -0,0 +1,75 @@
+{
+ "_from": "extend@^3.0.1",
+ "_id": "extend@3.0.2",
+ "_inBundle": false,
+ "_integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
+ "_location": "/extend",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "extend@^3.0.1",
+ "name": "extend",
+ "escapedName": "extend",
+ "rawSpec": "^3.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.1"
+ },
+ "_requiredBy": [
+ "/gcp-metadata"
+ ],
+ "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+ "_shasum": "f8b1136b4071fbd8eb140aff858b1019ec2915fa",
+ "_spec": "extend@^3.0.1",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\gcp-metadata",
+ "author": {
+ "name": "Stefan Thomas",
+ "email": "justmoon@members.fsf.org",
+ "url": "http://www.justmoon.net"
+ },
+ "bugs": {
+ "url": "https://github.com/justmoon/node-extend/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Port of jQuery.extend for node.js and the browser",
+ "devDependencies": {
+ "@ljharb/eslint-config": "^12.2.1",
+ "covert": "^1.1.0",
+ "eslint": "^4.19.1",
+ "jscs": "^3.0.7",
+ "tape": "^4.9.1"
+ },
+ "homepage": "https://github.com/justmoon/node-extend#readme",
+ "keywords": [
+ "extend",
+ "clone",
+ "merge"
+ ],
+ "license": "MIT",
+ "main": "index",
+ "name": "extend",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/justmoon/node-extend.git"
+ },
+ "scripts": {
+ "coverage": "covert test/index.js",
+ "coverage-quiet": "covert test/index.js --quiet",
+ "eslint": "eslint *.js */*.js",
+ "jscs": "jscs *.js */*.js",
+ "lint": "npm run jscs && npm run eslint",
+ "posttest": "npm run coverage-quiet",
+ "pretest": "npm run lint",
+ "test": "npm run tests-only",
+ "tests-only": "node test"
+ },
+ "version": "3.0.2"
+}
diff --git a/express-server/node_modules/follow-redirects/LICENSE b/express-server/node_modules/follow-redirects/LICENSE
new file mode 100644
index 00000000..459a2470
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/LICENSE
@@ -0,0 +1,19 @@
+Copyright 2017 Olivier Lalonde , James Talmage , Ruben Verborgh
+
+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.
\ No newline at end of file
diff --git a/express-server/node_modules/follow-redirects/README.md b/express-server/node_modules/follow-redirects/README.md
new file mode 100644
index 00000000..317d63da
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/README.md
@@ -0,0 +1,157 @@
+## Follow Redirects
+
+Drop-in replacement for Nodes `http` and `https` that automatically follows redirects.
+
+[](https://www.npmjs.com/package/follow-redirects)
+[](https://travis-ci.org/olalonde/follow-redirects)
+[](https://coveralls.io/r/olalonde/follow-redirects?branch=master)
+[](https://david-dm.org/olalonde/follow-redirects)
+[](https://david-dm.org/olalonde/follow-redirects#info=devDependencies)
+
+[](https://nodei.co/npm/follow-redirects/)
+
+`follow-redirects` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback)
+ methods that behave identically to those found on the native [http](https://nodejs.org/api/http.html#http_http_request_options_callback) and [https](https://nodejs.org/api/https.html#https_https_request_options_callback)
+ modules, with the exception that they will seamlessly follow redirects.
+
+```javascript
+var http = require('follow-redirects').http;
+var https = require('follow-redirects').https;
+
+http.get('http://bit.ly/900913', function (response) {
+ response.on('data', function (chunk) {
+ console.log(chunk);
+ });
+}).on('error', function (err) {
+ console.error(err);
+});
+```
+
+You can inspect the final redirected URL through the `responseUrl` property on the `response`.
+If no redirection happened, `responseUrl` is the original request URL.
+
+```javascript
+https.request({
+ host: 'bitly.com',
+ path: '/UHfDGO',
+}, function (response) {
+ console.log(response.responseUrl);
+ // 'http://duckduckgo.com/robots.txt'
+});
+```
+
+## Options
+### Global options
+Global options are set directly on the `follow-redirects` module:
+
+```javascript
+var followRedirects = require('follow-redirects');
+followRedirects.maxRedirects = 10;
+followRedirects.maxBodyLength = 20 * 1024 * 1024; // 20 MB
+```
+
+The following global options are supported:
+
+- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted.
+
+- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted.
+
+
+### Per-request options
+Per-request options are set by passing an `options` object:
+
+```javascript
+var url = require('url');
+var followRedirects = require('follow-redirects');
+
+var options = url.parse('http://bit.ly/900913');
+options.maxRedirects = 10;
+http.request(options);
+```
+
+In addition to the [standard HTTP](https://nodejs.org/api/http.html#http_http_request_options_callback) and [HTTPS options](https://nodejs.org/api/https.html#https_https_request_options_callback),
+the following per-request options are supported:
+- `followRedirects` (default: `true`) – whether redirects should be followed.
+
+- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted.
+
+- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted.
+
+- `agents` (default: `undefined`) – sets the `agent` option per protocol, since HTTP and HTTPS use different agents. Example value: `{ http: new http.Agent(), https: new https.Agent() }`
+
+- `trackRedirects` (default: `false`) – whether to store the redirected response details into the `redirects` array on the response object.
+
+
+### Advanced usage
+By default, `follow-redirects` will use the Node.js default implementations
+of [`http`](https://nodejs.org/api/http.html)
+and [`https`](https://nodejs.org/api/https.html).
+To enable features such as caching and/or intermediate request tracking,
+you might instead want to wrap `follow-redirects` around custom protocol implementations:
+
+```javascript
+var followRedirects = require('follow-redirects').wrap({
+ http: require('your-custom-http'),
+ https: require('your-custom-https'),
+});
+```
+
+Such custom protocols only need an implementation of the `request` method.
+
+## Browserify Usage
+
+Due to the way `XMLHttpRequest` works, the `browserify` versions of `http` and `https` already follow redirects.
+ If you are *only* targeting the browser, then this library has little value for you. If you want to write cross
+ platform code for node and the browser, `follow-redirects` provides a great solution for making the native node
+ modules behave the same as they do in browserified builds in the browser. To avoid bundling unnecessary code
+ you should tell browserify to swap out `follow-redirects` with the standard modules when bundling.
+ To make this easier, you need to change how you require the modules:
+
+```javascript
+var http = require('follow-redirects/http');
+var https = require('follow-redirects/https');
+```
+
+You can then replace `follow-redirects` in your browserify configuration like so:
+
+```javascript
+"browser": {
+ "follow-redirects/http" : "http",
+ "follow-redirects/https" : "https"
+}
+```
+
+The `browserify-http` module has not kept pace with node development, and no long behaves identically to the native
+ module when running in the browser. If you are experiencing problems, you may want to check out
+ [browserify-http-2](https://www.npmjs.com/package/http-browserify-2). It is more actively maintained and
+ attempts to address a few of the shortcomings of `browserify-http`. In that case, your browserify config should
+ look something like this:
+
+```javascript
+"browser": {
+ "follow-redirects/http" : "browserify-http-2/http",
+ "follow-redirects/https" : "browserify-http-2/https"
+}
+```
+
+## Contributing
+
+Pull Requests are always welcome. Please [file an issue](https://github.com/olalonde/follow-redirects/issues)
+ detailing your proposal before you invest your valuable time. Additional features and bug fixes should be accompanied
+ by tests. You can run the test suite locally with a simple `npm test` command.
+
+## Debug Logging
+
+`follow-redirects` uses the excellent [debug](https://www.npmjs.com/package/debug) for logging. To turn on logging
+ set the environment variable `DEBUG=follow-redirects` for debug output from just this module. When running the test
+ suite it is sometimes advantageous to set `DEBUG=*` to see output from the express server as well.
+
+## Authors
+
+- Olivier Lalonde (olalonde@gmail.com)
+- James Talmage (james@talmage.io)
+- [Ruben Verborgh](https://ruben.verborgh.org/)
+
+## License
+
+MIT: [http://olalonde.mit-license.org](http://olalonde.mit-license.org)
diff --git a/express-server/node_modules/follow-redirects/http.js b/express-server/node_modules/follow-redirects/http.js
new file mode 100644
index 00000000..695e3561
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/http.js
@@ -0,0 +1 @@
+module.exports = require("./").http;
diff --git a/express-server/node_modules/follow-redirects/https.js b/express-server/node_modules/follow-redirects/https.js
new file mode 100644
index 00000000..d21c921d
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/https.js
@@ -0,0 +1 @@
+module.exports = require("./").https;
diff --git a/express-server/node_modules/follow-redirects/index.js b/express-server/node_modules/follow-redirects/index.js
new file mode 100644
index 00000000..7a4e9ee2
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/index.js
@@ -0,0 +1,311 @@
+var url = require("url");
+var http = require("http");
+var https = require("https");
+var assert = require("assert");
+var Writable = require("stream").Writable;
+var debug = require("debug")("follow-redirects");
+
+// RFC7231§4.2.1: Of the request methods defined by this specification,
+// the GET, HEAD, OPTIONS, and TRACE methods are defined to be safe.
+var SAFE_METHODS = { GET: true, HEAD: true, OPTIONS: true, TRACE: true };
+
+// Create handlers that pass events from native requests
+var eventHandlers = Object.create(null);
+["abort", "aborted", "error", "socket", "timeout"].forEach(function (event) {
+ eventHandlers[event] = function (arg) {
+ this._redirectable.emit(event, arg);
+ };
+});
+
+// An HTTP(S) request that can be redirected
+function RedirectableRequest(options, responseCallback) {
+ // Initialize the request
+ Writable.call(this);
+ options.headers = options.headers || {};
+ this._options = options;
+ this._redirectCount = 0;
+ this._redirects = [];
+ this._requestBodyLength = 0;
+ this._requestBodyBuffers = [];
+
+ // Attach a callback if passed
+ if (responseCallback) {
+ this.on("response", responseCallback);
+ }
+
+ // React to responses of native requests
+ var self = this;
+ this._onNativeResponse = function (response) {
+ self._processResponse(response);
+ };
+
+ // Complete the URL object when necessary
+ if (!options.pathname && options.path) {
+ var searchPos = options.path.indexOf("?");
+ if (searchPos < 0) {
+ options.pathname = options.path;
+ }
+ else {
+ options.pathname = options.path.substring(0, searchPos);
+ options.search = options.path.substring(searchPos);
+ }
+ }
+
+ // Perform the first request
+ this._performRequest();
+}
+RedirectableRequest.prototype = Object.create(Writable.prototype);
+
+// Writes buffered data to the current native request
+RedirectableRequest.prototype.write = function (data, encoding, callback) {
+ // Validate input and shift parameters if necessary
+ if (!(typeof data === "string" || typeof data === "object" && ("length" in data))) {
+ throw new Error("data should be a string, Buffer or Uint8Array");
+ }
+ if (typeof encoding === "function") {
+ callback = encoding;
+ encoding = null;
+ }
+
+ // Ignore empty buffers, since writing them doesn't invoke the callback
+ // https://github.com/nodejs/node/issues/22066
+ if (data.length === 0) {
+ if (callback) {
+ callback();
+ }
+ return;
+ }
+ // Only write when we don't exceed the maximum body length
+ if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
+ this._requestBodyLength += data.length;
+ this._requestBodyBuffers.push({ data: data, encoding: encoding });
+ this._currentRequest.write(data, encoding, callback);
+ }
+ // Error when we exceed the maximum body length
+ else {
+ this.emit("error", new Error("Request body larger than maxBodyLength limit"));
+ this.abort();
+ }
+};
+
+// Ends the current native request
+RedirectableRequest.prototype.end = function (data, encoding, callback) {
+ // Shift parameters if necessary
+ if (typeof data === "function") {
+ callback = data;
+ data = encoding = null;
+ }
+ else if (typeof encoding === "function") {
+ callback = encoding;
+ encoding = null;
+ }
+
+ // Write data and end
+ var currentRequest = this._currentRequest;
+ this.write(data || "", encoding, function () {
+ currentRequest.end(null, null, callback);
+ });
+};
+
+// Sets a header value on the current native request
+RedirectableRequest.prototype.setHeader = function (name, value) {
+ this._options.headers[name] = value;
+ this._currentRequest.setHeader(name, value);
+};
+
+// Clears a header value on the current native request
+RedirectableRequest.prototype.removeHeader = function (name) {
+ delete this._options.headers[name];
+ this._currentRequest.removeHeader(name);
+};
+
+// Proxy all other public ClientRequest methods
+[
+ "abort", "flushHeaders", "getHeader",
+ "setNoDelay", "setSocketKeepAlive", "setTimeout",
+].forEach(function (method) {
+ RedirectableRequest.prototype[method] = function (a, b) {
+ return this._currentRequest[method](a, b);
+ };
+});
+
+// Proxy all public ClientRequest properties
+["aborted", "connection", "socket"].forEach(function (property) {
+ Object.defineProperty(RedirectableRequest.prototype, property, {
+ get: function () { return this._currentRequest[property]; },
+ });
+});
+
+// Executes the next native request (initial or redirect)
+RedirectableRequest.prototype._performRequest = function () {
+ // Load the native protocol
+ var protocol = this._options.protocol;
+ var nativeProtocol = this._options.nativeProtocols[protocol];
+ if (!nativeProtocol) {
+ this.emit("error", new Error("Unsupported protocol " + protocol));
+ return;
+ }
+
+ // If specified, use the agent corresponding to the protocol
+ // (HTTP and HTTPS use different types of agents)
+ if (this._options.agents) {
+ var scheme = protocol.substr(0, protocol.length - 1);
+ this._options.agent = this._options.agents[scheme];
+ }
+
+ // Create the native request
+ var request = this._currentRequest =
+ nativeProtocol.request(this._options, this._onNativeResponse);
+ this._currentUrl = url.format(this._options);
+
+ // Set up event handlers
+ request._redirectable = this;
+ for (var event in eventHandlers) {
+ /* istanbul ignore else */
+ if (event) {
+ request.on(event, eventHandlers[event]);
+ }
+ }
+
+ // End a redirected request
+ // (The first request must be ended explicitly with RedirectableRequest#end)
+ if (this._isRedirect) {
+ // Write the request entity and end.
+ var i = 0;
+ var buffers = this._requestBodyBuffers;
+ (function writeNext() {
+ if (i < buffers.length) {
+ var buffer = buffers[i++];
+ request.write(buffer.data, buffer.encoding, writeNext);
+ }
+ else {
+ request.end();
+ }
+ }());
+ }
+};
+
+// Processes a response from the current native request
+RedirectableRequest.prototype._processResponse = function (response) {
+ // Store the redirected response
+ if (this._options.trackRedirects) {
+ this._redirects.push({
+ url: this._currentUrl,
+ headers: response.headers,
+ statusCode: response.statusCode,
+ });
+ }
+
+ // RFC7231§6.4: The 3xx (Redirection) class of status code indicates
+ // that further action needs to be taken by the user agent in order to
+ // fulfill the request. If a Location header field is provided,
+ // the user agent MAY automatically redirect its request to the URI
+ // referenced by the Location field value,
+ // even if the specific status code is not understood.
+ var location = response.headers.location;
+ if (location && this._options.followRedirects !== false &&
+ response.statusCode >= 300 && response.statusCode < 400) {
+ // RFC7231§6.4: A client SHOULD detect and intervene
+ // in cyclical redirections (i.e., "infinite" redirection loops).
+ if (++this._redirectCount > this._options.maxRedirects) {
+ this.emit("error", new Error("Max redirects exceeded."));
+ return;
+ }
+
+ // RFC7231§6.4: Automatic redirection needs to done with
+ // care for methods not known to be safe […],
+ // since the user might not wish to redirect an unsafe request.
+ // RFC7231§6.4.7: The 307 (Temporary Redirect) status code indicates
+ // that the target resource resides temporarily under a different URI
+ // and the user agent MUST NOT change the request method
+ // if it performs an automatic redirection to that URI.
+ var header;
+ var headers = this._options.headers;
+ if (response.statusCode !== 307 && !(this._options.method in SAFE_METHODS)) {
+ this._options.method = "GET";
+ // Drop a possible entity and headers related to it
+ this._requestBodyBuffers = [];
+ for (header in headers) {
+ if (/^content-/i.test(header)) {
+ delete headers[header];
+ }
+ }
+ }
+
+ // Drop the Host header, as the redirect might lead to a different host
+ if (!this._isRedirect) {
+ for (header in headers) {
+ if (/^host$/i.test(header)) {
+ delete headers[header];
+ }
+ }
+ }
+
+ // Perform the redirected request
+ var redirectUrl = url.resolve(this._currentUrl, location);
+ debug("redirecting to", redirectUrl);
+ Object.assign(this._options, url.parse(redirectUrl));
+ this._isRedirect = true;
+ this._performRequest();
+
+ // Discard the remainder of the response to avoid waiting for data
+ response.destroy();
+ }
+ else {
+ // The response is not a redirect; return it as-is
+ response.responseUrl = this._currentUrl;
+ response.redirects = this._redirects;
+ this.emit("response", response);
+
+ // Clean up
+ this._requestBodyBuffers = [];
+ }
+};
+
+// Wraps the key/value object of protocols with redirect functionality
+function wrap(protocols) {
+ // Default settings
+ var exports = {
+ maxRedirects: 21,
+ maxBodyLength: 10 * 1024 * 1024,
+ };
+
+ // Wrap each protocol
+ var nativeProtocols = {};
+ Object.keys(protocols).forEach(function (scheme) {
+ var protocol = scheme + ":";
+ var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
+ var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
+
+ // Executes a request, following redirects
+ wrappedProtocol.request = function (options, callback) {
+ if (typeof options === "string") {
+ options = url.parse(options);
+ options.maxRedirects = exports.maxRedirects;
+ }
+ else {
+ options = Object.assign({
+ protocol: protocol,
+ maxRedirects: exports.maxRedirects,
+ maxBodyLength: exports.maxBodyLength,
+ }, options);
+ }
+ options.nativeProtocols = nativeProtocols;
+ assert.equal(options.protocol, protocol, "protocol mismatch");
+ debug("options", options);
+ return new RedirectableRequest(options, callback);
+ };
+
+ // Executes a GET request, following redirects
+ wrappedProtocol.get = function (options, callback) {
+ var request = wrappedProtocol.request(options, callback);
+ request.end();
+ return request;
+ };
+ });
+ return exports;
+}
+
+// Exports
+module.exports = wrap({ http: http, https: https });
+module.exports.wrap = wrap;
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/.coveralls.yml b/express-server/node_modules/follow-redirects/node_modules/debug/.coveralls.yml
new file mode 100644
index 00000000..20a70685
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/.eslintrc b/express-server/node_modules/follow-redirects/node_modules/debug/.eslintrc
new file mode 100644
index 00000000..146371ed
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/.eslintrc
@@ -0,0 +1,14 @@
+{
+ "env": {
+ "browser": true,
+ "node": true
+ },
+ "globals": {
+ "chrome": true
+ },
+ "rules": {
+ "no-console": 0,
+ "no-empty": [1, { "allowEmptyCatch": true }]
+ },
+ "extends": "eslint:recommended"
+}
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/.npmignore b/express-server/node_modules/follow-redirects/node_modules/debug/.npmignore
new file mode 100644
index 00000000..5f60eecc
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/.npmignore
@@ -0,0 +1,9 @@
+support
+test
+examples
+example
+*.sock
+dist
+yarn.lock
+coverage
+bower.json
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/.travis.yml b/express-server/node_modules/follow-redirects/node_modules/debug/.travis.yml
new file mode 100644
index 00000000..a7643003
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/.travis.yml
@@ -0,0 +1,20 @@
+sudo: false
+
+language: node_js
+
+node_js:
+ - "4"
+ - "6"
+ - "8"
+
+install:
+ - make install
+
+script:
+ - make lint
+ - make test
+
+matrix:
+ include:
+ - node_js: '8'
+ env: BROWSER=1
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/CHANGELOG.md b/express-server/node_modules/follow-redirects/node_modules/debug/CHANGELOG.md
new file mode 100644
index 00000000..820d21e3
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/CHANGELOG.md
@@ -0,0 +1,395 @@
+
+3.1.0 / 2017-09-26
+==================
+
+ * Add `DEBUG_HIDE_DATE` env var (#486)
+ * Remove ReDoS regexp in %o formatter (#504)
+ * Remove "component" from package.json
+ * Remove `component.json`
+ * Ignore package-lock.json
+ * Examples: fix colors printout
+ * Fix: browser detection
+ * Fix: spelling mistake (#496, @EdwardBetts)
+
+3.0.1 / 2017-08-24
+==================
+
+ * Fix: Disable colors in Edge and Internet Explorer (#489)
+
+3.0.0 / 2017-08-08
+==================
+
+ * Breaking: Remove DEBUG_FD (#406)
+ * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
+ * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
+ * Addition: document `enabled` flag (#465)
+ * Addition: add 256 colors mode (#481)
+ * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
+ * Update: component: update "ms" to v2.0.0
+ * Update: separate the Node and Browser tests in Travis-CI
+ * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
+ * Update: separate Node.js and web browser examples for organization
+ * Update: update "browserify" to v14.4.0
+ * Fix: fix Readme typo (#473)
+
+2.6.9 / 2017-09-22
+==================
+
+ * remove ReDoS regexp in %o formatter (#504)
+
+2.6.8 / 2017-05-18
+==================
+
+ * Fix: Check for undefined on browser globals (#462, @marbemac)
+
+2.6.7 / 2017-05-16
+==================
+
+ * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
+ * Fix: Inline extend function in node implementation (#452, @dougwilson)
+ * Docs: Fix typo (#455, @msasad)
+
+2.6.5 / 2017-04-27
+==================
+
+ * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
+ * Misc: clean up browser reference checks (#447, @thebigredgeek)
+ * Misc: add npm-debug.log to .gitignore (@thebigredgeek)
+
+
+2.6.4 / 2017-04-20
+==================
+
+ * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+ * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
+ * Misc: update "ms" to v0.7.3 (@tootallnate)
+
+2.6.3 / 2017-03-13
+==================
+
+ * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
+ * Docs: Changelog fix (@thebigredgeek)
+
+2.6.2 / 2017-03-10
+==================
+
+ * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
+ * Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
+ * Docs: Add Slackin invite badge (@tootallnate)
+
+2.6.1 / 2017-02-10
+==================
+
+ * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
+ * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
+ * Fix: IE8 "Expected identifier" error (#414, @vgoma)
+ * Fix: Namespaces would not disable once enabled (#409, @musikov)
+
+2.6.0 / 2016-12-28
+==================
+
+ * Fix: added better null pointer checks for browser useColors (@thebigredgeek)
+ * Improvement: removed explicit `window.debug` export (#404, @tootallnate)
+ * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
+
+2.5.2 / 2016-12-25
+==================
+
+ * Fix: reference error on window within webworkers (#393, @KlausTrainer)
+ * Docs: fixed README typo (#391, @lurch)
+ * Docs: added notice about v3 api discussion (@thebigredgeek)
+
+2.5.1 / 2016-12-20
+==================
+
+ * Fix: babel-core compatibility
+
+2.5.0 / 2016-12-20
+==================
+
+ * Fix: wrong reference in bower file (@thebigredgeek)
+ * Fix: webworker compatibility (@thebigredgeek)
+ * Fix: output formatting issue (#388, @kribblo)
+ * Fix: babel-loader compatibility (#383, @escwald)
+ * Misc: removed built asset from repo and publications (@thebigredgeek)
+ * Misc: moved source files to /src (#378, @yamikuronue)
+ * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
+ * Test: coveralls integration (#378, @yamikuronue)
+ * Docs: simplified language in the opening paragraph (#373, @yamikuronue)
+
+2.4.5 / 2016-12-17
+==================
+
+ * Fix: `navigator` undefined in Rhino (#376, @jochenberger)
+ * Fix: custom log function (#379, @hsiliev)
+ * Improvement: bit of cleanup + linting fixes (@thebigredgeek)
+ * Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
+ * Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
+
+2.4.4 / 2016-12-14
+==================
+
+ * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
+
+2.4.3 / 2016-12-14
+==================
+
+ * Fix: navigation.userAgent error for react native (#364, @escwald)
+
+2.4.2 / 2016-12-14
+==================
+
+ * Fix: browser colors (#367, @tootallnate)
+ * Misc: travis ci integration (@thebigredgeek)
+ * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
+
+2.4.1 / 2016-12-13
+==================
+
+ * Fix: typo that broke the package (#356)
+
+2.4.0 / 2016-12-13
+==================
+
+ * Fix: bower.json references unbuilt src entry point (#342, @justmatt)
+ * Fix: revert "handle regex special characters" (@tootallnate)
+ * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
+ * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
+ * Improvement: allow colors in workers (#335, @botverse)
+ * Improvement: use same color for same namespace. (#338, @lchenay)
+
+2.3.3 / 2016-11-09
+==================
+
+ * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
+ * Fix: Returning `localStorage` saved values (#331, Levi Thomason)
+ * Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
+
+2.3.2 / 2016-11-09
+==================
+
+ * Fix: be super-safe in index.js as well (@TooTallNate)
+ * Fix: should check whether process exists (Tom Newby)
+
+2.3.1 / 2016-11-09
+==================
+
+ * Fix: Added electron compatibility (#324, @paulcbetts)
+ * Improvement: Added performance optimizations (@tootallnate)
+ * Readme: Corrected PowerShell environment variable example (#252, @gimre)
+ * Misc: Removed yarn lock file from source control (#321, @fengmk2)
+
+2.3.0 / 2016-11-07
+==================
+
+ * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
+ * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
+ * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
+ * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
+ * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
+ * Package: Update "ms" to 0.7.2 (#315, @DevSide)
+ * Package: removed superfluous version property from bower.json (#207 @kkirsche)
+ * Readme: fix USE_COLORS to DEBUG_COLORS
+ * Readme: Doc fixes for format string sugar (#269, @mlucool)
+ * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
+ * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
+ * Readme: better docs for browser support (#224, @matthewmueller)
+ * Tooling: Added yarn integration for development (#317, @thebigredgeek)
+ * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
+ * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
+ * Misc: Updated contributors (@thebigredgeek)
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/LICENSE b/express-server/node_modules/follow-redirects/node_modules/debug/LICENSE
new file mode 100644
index 00000000..658c933d
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/LICENSE
@@ -0,0 +1,19 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk
+
+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/express-server/node_modules/follow-redirects/node_modules/debug/Makefile b/express-server/node_modules/follow-redirects/node_modules/debug/Makefile
new file mode 100644
index 00000000..3ddd1360
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/Makefile
@@ -0,0 +1,58 @@
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# Path
+PATH := node_modules/.bin:$(PATH)
+SHELL := /bin/bash
+
+# applications
+NODE ?= $(shell which node)
+YARN ?= $(shell which yarn)
+PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+install: node_modules
+
+browser: dist/debug.js
+
+node_modules: package.json
+ @NODE_ENV= $(PKG) install
+ @touch node_modules
+
+dist/debug.js: src/*.js node_modules
+ @mkdir -p dist
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > dist/debug.js
+
+lint:
+ @eslint *.js src/*.js
+
+test-node:
+ @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+ @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+
+test-browser:
+ @$(MAKE) browser
+ @karma start --single-run
+
+test-all:
+ @concurrently \
+ "make test-node" \
+ "make test-browser"
+
+test:
+ @if [ "x$(BROWSER)" = "x" ]; then \
+ $(MAKE) test-node; \
+ else \
+ $(MAKE) test-browser; \
+ fi
+
+clean:
+ rimraf dist coverage
+
+.PHONY: browser install clean lint test test-all test-node test-browser
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/README.md b/express-server/node_modules/follow-redirects/node_modules/debug/README.md
new file mode 100644
index 00000000..8e754d17
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/README.md
@@ -0,0 +1,368 @@
+# debug
+[](https://travis-ci.org/visionmedia/debug) [](https://coveralls.io/github/visionmedia/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
+[](#sponsors)
+
+
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+
+
+
+
+#### Windows note
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Note that PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Then, run the program to be debugged as usual.
+
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+
+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/express-server/node_modules/follow-redirects/node_modules/debug/karma.conf.js b/express-server/node_modules/follow-redirects/node_modules/debug/karma.conf.js
new file mode 100644
index 00000000..103a82d1
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/karma.conf.js
@@ -0,0 +1,70 @@
+// Karma configuration
+// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
+
+module.exports = function(config) {
+ config.set({
+
+ // base path that will be used to resolve all patterns (eg. files, exclude)
+ basePath: '',
+
+
+ // frameworks to use
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
+ frameworks: ['mocha', 'chai', 'sinon'],
+
+
+ // list of files / patterns to load in the browser
+ files: [
+ 'dist/debug.js',
+ 'test/*spec.js'
+ ],
+
+
+ // list of files to exclude
+ exclude: [
+ 'src/node.js'
+ ],
+
+
+ // preprocess matching files before serving them to the browser
+ // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
+ preprocessors: {
+ },
+
+ // test results reporter to use
+ // possible values: 'dots', 'progress'
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
+ reporters: ['progress'],
+
+
+ // web server port
+ port: 9876,
+
+
+ // enable / disable colors in the output (reporters and logs)
+ colors: true,
+
+
+ // level of logging
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
+ logLevel: config.LOG_INFO,
+
+
+ // enable / disable watching file and executing tests whenever any file changes
+ autoWatch: true,
+
+
+ // start these browsers
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
+ browsers: ['PhantomJS'],
+
+
+ // Continuous Integration mode
+ // if true, Karma captures browsers, runs the tests and exits
+ singleRun: false,
+
+ // Concurrency level
+ // how many browser should be started simultaneous
+ concurrency: Infinity
+ })
+}
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/node.js b/express-server/node_modules/follow-redirects/node_modules/debug/node.js
new file mode 100644
index 00000000..7fc36fe6
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/node.js
@@ -0,0 +1 @@
+module.exports = require('./src/node');
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/package.json b/express-server/node_modules/follow-redirects/node_modules/debug/package.json
new file mode 100644
index 00000000..7738405e
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/package.json
@@ -0,0 +1,82 @@
+{
+ "_from": "debug@=3.1.0",
+ "_id": "debug@3.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "_location": "/follow-redirects/debug",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "debug@=3.1.0",
+ "name": "debug",
+ "escapedName": "debug",
+ "rawSpec": "=3.1.0",
+ "saveSpec": null,
+ "fetchSpec": "=3.1.0"
+ },
+ "_requiredBy": [
+ "/follow-redirects"
+ ],
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "_shasum": "5bb5a0672628b64149566ba16819e61518c67261",
+ "_spec": "debug@=3.1.0",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\follow-redirects",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "browser": "./src/browser.js",
+ "bugs": {
+ "url": "https://github.com/visionmedia/debug/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ },
+ {
+ "name": "Andrew Rhyne",
+ "email": "rhyneandrew@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "ms": "2.0.0"
+ },
+ "deprecated": false,
+ "description": "small debugging utility",
+ "devDependencies": {
+ "browserify": "14.4.0",
+ "chai": "^3.5.0",
+ "concurrently": "^3.1.0",
+ "coveralls": "^2.11.15",
+ "eslint": "^3.12.1",
+ "istanbul": "^0.4.5",
+ "karma": "^1.3.0",
+ "karma-chai": "^0.1.0",
+ "karma-mocha": "^1.3.0",
+ "karma-phantomjs-launcher": "^1.0.2",
+ "karma-sinon": "^1.0.5",
+ "mocha": "^3.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "rimraf": "^2.5.4",
+ "sinon": "^1.17.6",
+ "sinon-chai": "^2.8.0"
+ },
+ "homepage": "https://github.com/visionmedia/debug#readme",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "license": "MIT",
+ "main": "./src/index.js",
+ "name": "debug",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "version": "3.1.0"
+}
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/src/browser.js b/express-server/node_modules/follow-redirects/node_modules/debug/src/browser.js
new file mode 100644
index 00000000..f5149ff5
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/src/browser.js
@@ -0,0 +1,195 @@
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',
+ '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',
+ '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',
+ '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',
+ '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',
+ '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',
+ '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',
+ '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',
+ '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',
+ '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',
+ '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ try {
+ return JSON.stringify(v);
+ } catch (err) {
+ return '[UnexpectedJSONParseError]: ' + err.message;
+ }
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return;
+
+ var c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit')
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/src/debug.js b/express-server/node_modules/follow-redirects/node_modules/debug/src/debug.js
new file mode 100644
index 00000000..77e6384a
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/src/debug.js
@@ -0,0 +1,225 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * Active `debug` instances.
+ */
+exports.instances = [];
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+
+exports.formatters = {};
+
+/**
+ * Select a color.
+ * @param {String} namespace
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor(namespace) {
+ var hash = 0, i;
+
+ for (i in namespace) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return exports.colors[Math.abs(hash) % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function createDebug(namespace) {
+
+ var prevTime;
+
+ function debug() {
+ // disabled?
+ if (!debug.enabled) return;
+
+ var self = debug;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // turn the `arguments` into a proper Array
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // apply env-specific formatting (colors, etc.)
+ exports.formatArgs.call(self, args);
+
+ var logFn = debug.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.enabled = exports.enabled(namespace);
+ debug.useColors = exports.useColors();
+ debug.color = selectColor(namespace);
+ debug.destroy = destroy;
+
+ // env-specific initialization logic for debug instances
+ if ('function' === typeof exports.init) {
+ exports.init(debug);
+ }
+
+ exports.instances.push(debug);
+
+ return debug;
+}
+
+function destroy () {
+ var index = exports.instances.indexOf(this);
+ if (index !== -1) {
+ exports.instances.splice(index, 1);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ exports.names = [];
+ exports.skips = [];
+
+ var i;
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+
+ for (i = 0; i < exports.instances.length; i++) {
+ var instance = exports.instances[i];
+ instance.enabled = exports.enabled(instance.namespace);
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/src/index.js b/express-server/node_modules/follow-redirects/node_modules/debug/src/index.js
new file mode 100644
index 00000000..cabcbcda
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer') {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/express-server/node_modules/follow-redirects/node_modules/debug/src/node.js b/express-server/node_modules/follow-redirects/node_modules/debug/src/node.js
new file mode 100644
index 00000000..d666fb9c
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/node_modules/debug/src/node.js
@@ -0,0 +1,186 @@
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [ 6, 2, 3, 4, 5, 1 ];
+
+try {
+ var supportsColor = require('supports-color');
+ if (supportsColor && supportsColor.level >= 2) {
+ exports.colors = [
+ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
+ 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
+ 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 214, 215, 220, 221
+ ];
+ }
+} catch (err) {
+ // swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(function (key) {
+ return /^debug_/i.test(key);
+}).reduce(function (obj, key) {
+ // camel-case
+ var prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
+
+ // coerce string value into JS value
+ var val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
+ else if (val === 'null') val = null;
+ else val = Number(val);
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts
+ ? Boolean(exports.inspectOpts.colors)
+ : tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+exports.formatters.o = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n').map(function(str) {
+ return str.trim()
+ }).join(' ');
+};
+
+/**
+ * Map %o to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+exports.formatters.O = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var name = this.namespace;
+ var useColors = this.useColors;
+
+ if (useColors) {
+ var c = this.color;
+ var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
+ var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ } else {
+ return new Date().toISOString() + ' ';
+ }
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log() {
+ return process.stderr.write(util.format.apply(util, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init (debug) {
+ debug.inspectOpts = {};
+
+ var keys = Object.keys(exports.inspectOpts);
+ for (var i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/express-server/node_modules/follow-redirects/package.json b/express-server/node_modules/follow-redirects/package.json
new file mode 100644
index 00000000..7b85d481
--- /dev/null
+++ b/express-server/node_modules/follow-redirects/package.json
@@ -0,0 +1,98 @@
+{
+ "_from": "follow-redirects@^1.3.0",
+ "_id": "follow-redirects@1.5.9",
+ "_inBundle": false,
+ "_integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==",
+ "_location": "/follow-redirects",
+ "_phantomChildren": {
+ "ms": "2.0.0"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "follow-redirects@^1.3.0",
+ "name": "follow-redirects",
+ "escapedName": "follow-redirects",
+ "rawSpec": "^1.3.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.3.0"
+ },
+ "_requiredBy": [
+ "/axios"
+ ],
+ "_resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.9.tgz",
+ "_shasum": "c9ed9d748b814a39535716e531b9196a845d89c6",
+ "_spec": "follow-redirects@^1.3.0",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\axios",
+ "author": {
+ "name": "Olivier Lalonde",
+ "email": "olalonde@gmail.com",
+ "url": "http://www.syskall.com"
+ },
+ "bugs": {
+ "url": "https://github.com/olalonde/follow-redirects/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "James Talmage",
+ "email": "james@talmage.io"
+ },
+ {
+ "name": "Ruben Verborgh",
+ "email": "ruben@verborgh.org",
+ "url": "https://ruben.verborgh.org/"
+ }
+ ],
+ "dependencies": {
+ "debug": "=3.1.0"
+ },
+ "deprecated": false,
+ "description": "HTTP and HTTPS modules that follow redirects.",
+ "devDependencies": {
+ "concat-stream": "^1.6.0",
+ "coveralls": "^3.0.0",
+ "eslint": "^4.19.1",
+ "express": "^4.16.2",
+ "mocha": "^5.0.0",
+ "nyc": "^11.8.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ },
+ "files": [
+ "index.js",
+ "create.js",
+ "http.js",
+ "https.js"
+ ],
+ "homepage": "https://github.com/olalonde/follow-redirects",
+ "keywords": [
+ "http",
+ "https",
+ "url",
+ "redirect",
+ "client",
+ "location",
+ "utility"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "follow-redirects",
+ "nyc": {
+ "reporter": [
+ "lcov",
+ "text"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/olalonde/follow-redirects.git"
+ },
+ "scripts": {
+ "lint": "eslint *.js test",
+ "mocha": "nyc mocha",
+ "test": "npm run lint && npm run mocha"
+ },
+ "version": "1.5.9"
+}
diff --git a/express-server/node_modules/gcp-metadata/LICENSE b/express-server/node_modules/gcp-metadata/LICENSE
new file mode 100644
index 00000000..18c20d23
--- /dev/null
+++ b/express-server/node_modules/gcp-metadata/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Stephen Sawchuk
+
+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/express-server/node_modules/gcp-metadata/README.md b/express-server/node_modules/gcp-metadata/README.md
new file mode 100644
index 00000000..e02ec61b
--- /dev/null
+++ b/express-server/node_modules/gcp-metadata/README.md
@@ -0,0 +1,46 @@
+# gcp-metadata
+> Get the metadata from a Google Cloud Platform environment.
+
+[![NPM Version][npm-image]][npm-url]
+[![CircleCI][circleimg]][circle]
+[![codecov][codecov-image]][codecov-url]
+
+```sh
+$ npm install --save gcp-metadata
+```
+```js
+const gcpMetadata = require('gcp-metadata');
+```
+
+#### Check to see if the metadata server is available
+```js
+const isAvailable = await gcpMetadata.isAvailable();
+```
+
+#### Access all metadata
+```js
+const res = await gcpMetadata.instance();
+console.log(res.data); // ... All metadata properties
+```
+
+#### Access specific properties
+```js
+const res = await gcpMetadata.instance('hostname');
+console.log(res.data) // ...All metadata properties
+```
+
+#### Access specific properties with query parameters
+```js
+const res = await gcpMetadata.instance({
+ property: 'tags',
+ params: { alt: 'text' }
+});
+console.log(res.data) // ...Tags as newline-delimited list
+```
+
+[circle]: https://circleci.com/gh/stephenplusplus/gcp-metadata
+[circleimg]: https://circleci.com/gh/stephenplusplus/gcp-metadata.svg?style=shield
+[codecov-image]: https://codecov.io/gh/stephenplusplus/gcp-metadata/branch/master/graph/badge.svg
+[codecov-url]: https://codecov.io/gh/stephenplusplus/gcp-metadata
+[npm-image]: https://img.shields.io/npm/v/gcp-metadata.svg
+[npm-url]: https://www.npmjs.com/package/gcp-metadata
\ No newline at end of file
diff --git a/express-server/node_modules/gcp-metadata/build/src/index.d.ts b/express-server/node_modules/gcp-metadata/build/src/index.d.ts
new file mode 100644
index 00000000..ecba497e
--- /dev/null
+++ b/express-server/node_modules/gcp-metadata/build/src/index.d.ts
@@ -0,0 +1,20 @@
+import { AxiosRequestConfig, AxiosResponse } from 'axios';
+export declare const HOST_ADDRESS = "http://metadata.google.internal";
+export declare const BASE_PATH = "/computeMetadata/v1";
+export declare const BASE_URL: string;
+export declare const HEADER_NAME = "Metadata-Flavor";
+export declare const HEADER_VALUE = "Google";
+export declare const HEADERS: Readonly<{
+ [HEADER_NAME]: string;
+}>;
+export declare type Options = AxiosRequestConfig & {
+ [index: string]: {} | string | undefined;
+ property?: string;
+ uri?: string;
+};
+export declare function instance(options?: string | Options): Promise>;
+export declare function project(options?: string | Options): Promise>;
+/**
+ * Determine if the metadata server is currently available.
+ */
+export declare function isAvailable(): Promise;
diff --git a/express-server/node_modules/gcp-metadata/build/src/index.js b/express-server/node_modules/gcp-metadata/build/src/index.js
new file mode 100644
index 00000000..7a6726c4
--- /dev/null
+++ b/express-server/node_modules/gcp-metadata/build/src/index.js
@@ -0,0 +1,160 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __generator = (this && this.__generator) || function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (_) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ result["default"] = mod;
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var _a;
+var axios_1 = __importDefault(require("axios"));
+var extend_1 = __importDefault(require("extend"));
+var rax = __importStar(require("retry-axios"));
+exports.HOST_ADDRESS = 'http://metadata.google.internal';
+exports.BASE_PATH = '/computeMetadata/v1';
+exports.BASE_URL = exports.HOST_ADDRESS + exports.BASE_PATH;
+exports.HEADER_NAME = 'Metadata-Flavor';
+exports.HEADER_VALUE = 'Google';
+exports.HEADERS = Object.freeze((_a = {}, _a[exports.HEADER_NAME] = exports.HEADER_VALUE, _a));
+// Accepts an options object passed from the user to the API. In the
+// previous version of the API, it referred to a `Request` options object.
+// Now it refers to an Axios Request Config object. This is here to help
+// ensure users don't pass invalid options when they upgrade from 0.4 to 0.5.
+function validate(options) {
+ var vpairs = [
+ { invalid: 'uri', expected: 'url' }, { invalid: 'json', expected: 'data' },
+ { invalid: 'qs', expected: 'params' }
+ ];
+ for (var _i = 0, vpairs_1 = vpairs; _i < vpairs_1.length; _i++) {
+ var pair = vpairs_1[_i];
+ if (options[pair.invalid]) {
+ var e = "'" + pair.invalid + "' is not a valid configuration option. Please use '" + pair.expected + "' instead. This library is using Axios for requests. Please see https://github.com/axios/axios to learn more about the valid request options.";
+ throw new Error(e);
+ }
+ }
+}
+function metadataAccessor(type, options, noResponseRetries) {
+ if (noResponseRetries === void 0) { noResponseRetries = 3; }
+ return __awaiter(this, void 0, void 0, function () {
+ var property, ax, baseOpts, reqOpts;
+ return __generator(this, function (_a) {
+ options = options || {};
+ if (typeof options === 'string') {
+ options = { property: options };
+ }
+ property = '';
+ if (typeof options === 'object' && options.property) {
+ property = '/' + options.property;
+ }
+ validate(options);
+ ax = axios_1.default.create();
+ rax.attach(ax);
+ baseOpts = {
+ url: exports.BASE_URL + "/" + type + property,
+ headers: Object.assign({}, exports.HEADERS),
+ raxConfig: { noResponseRetries: noResponseRetries, instance: ax }
+ };
+ reqOpts = extend_1.default(true, baseOpts, options);
+ delete reqOpts.property;
+ return [2 /*return*/, ax.request(reqOpts)
+ .then(function (res) {
+ // NOTE: node.js converts all incoming headers to lower case.
+ if (res.headers[exports.HEADER_NAME.toLowerCase()] !== exports.HEADER_VALUE) {
+ throw new Error("Invalid response from metadata service: incorrect " + exports.HEADER_NAME + " header.");
+ }
+ else if (!res.data) {
+ throw new Error('Invalid response from the metadata service');
+ }
+ return res;
+ })
+ .catch(function (err) {
+ if (err.response && err.response.status !== 200) {
+ err.message = 'Unsuccessful response status code. ' + err.message;
+ }
+ throw err;
+ })];
+ });
+ });
+}
+function instance(options) {
+ return metadataAccessor('instance', options);
+}
+exports.instance = instance;
+function project(options) {
+ return metadataAccessor('project', options);
+}
+exports.project = project;
+/**
+ * Determine if the metadata server is currently available.
+ */
+function isAvailable() {
+ return __awaiter(this, void 0, void 0, function () {
+ var err_1;
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0:
+ _a.trys.push([0, 2, , 3]);
+ // Attempt to read instance metadata. As configured, this will
+ // retry 3 times if there is a valid response, and fail fast
+ // if there is an ETIMEDOUT or ENOTFOUND error.
+ return [4 /*yield*/, metadataAccessor('instance', undefined, 0)];
+ case 1:
+ // Attempt to read instance metadata. As configured, this will
+ // retry 3 times if there is a valid response, and fail fast
+ // if there is an ETIMEDOUT or ENOTFOUND error.
+ _a.sent();
+ return [2 /*return*/, true];
+ case 2:
+ err_1 = _a.sent();
+ // Failure to resolve the metadata service means that it is not available.
+ if (err_1.code && (err_1.code === 'ENOTFOUND' || err_1.code === 'ENOENT')) {
+ return [2 /*return*/, false];
+ }
+ // Throw unexpected errors.
+ throw err_1;
+ case 3: return [2 /*return*/];
+ }
+ });
+ });
+}
+exports.isAvailable = isAvailable;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/gcp-metadata/build/src/index.js.map b/express-server/node_modules/gcp-metadata/build/src/index.js.map
new file mode 100644
index 00000000..778969c9
--- /dev/null
+++ b/express-server/node_modules/gcp-metadata/build/src/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA2E;AAC3E,kDAA4B;AAC5B,+CAAmC;AAEtB,QAAA,YAAY,GAAG,iCAAiC,CAAC;AACjD,QAAA,SAAS,GAAG,qBAAqB,CAAC;AAClC,QAAA,QAAQ,GAAG,oBAAY,GAAG,iBAAS,CAAC;AACpC,QAAA,WAAW,GAAG,iBAAiB,CAAC;AAChC,QAAA,YAAY,GAAG,QAAQ,CAAC;AACxB,QAAA,OAAO,GAAG,MAAM,CAAC,MAAM,WAAE,GAAC,mBAAW,IAAG,oBAAY,MAAE,CAAC;A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AAA;;oBAHhD,8DAA8D;oBAC9D,4DAA4D;oBAC5D,+CAA+C;oBAC/C,SAAgD,CAAC;oBACjD,sBAAO,IAAI,EAAC;;;oBAEZ,0EAA0E;oBAC1E,IAAI,KAAG,CAAC,IAAI,IAAI,CAAC,KAAG,CAAC,IAAI,KAAK,WAAW,IAAI,KAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,EAAE;wBACnE,sBAAO,KAAK,EAAC;qBACd;oBACD,2BAA2B;oBAC3B,MAAM,KAAG,CAAC;;;;;CAEb;AAfD,kCAeC"}
\ No newline at end of file
diff --git a/express-server/node_modules/gcp-metadata/package.json b/express-server/node_modules/gcp-metadata/package.json
new file mode 100644
index 00000000..d02eb52f
--- /dev/null
+++ b/express-server/node_modules/gcp-metadata/package.json
@@ -0,0 +1,97 @@
+{
+ "_from": "gcp-metadata@^0.7.0",
+ "_id": "gcp-metadata@0.7.0",
+ "_inBundle": false,
+ "_integrity": "sha512-ffjC09amcDWjh3VZdkDngIo7WoluyC5Ag9PAYxZbmQLOLNI8lvPtoKTSCyU54j2gwy5roZh6sSMTfkY2ct7K3g==",
+ "_location": "/gcp-metadata",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "gcp-metadata@^0.7.0",
+ "name": "gcp-metadata",
+ "escapedName": "gcp-metadata",
+ "rawSpec": "^0.7.0",
+ "saveSpec": null,
+ "fetchSpec": "^0.7.0"
+ },
+ "_requiredBy": [
+ "/google-auth-library"
+ ],
+ "_resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.7.0.tgz",
+ "_shasum": "6c35dbb52bda32a427bb9c98f54237ddd1b5406f",
+ "_spec": "gcp-metadata@^0.7.0",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\google-auth-library",
+ "author": {
+ "name": "Stephen Sawchuk"
+ },
+ "bugs": {
+ "url": "https://github.com/stephenplusplus/gcp-metadata/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "axios": "^0.18.0",
+ "extend": "^3.0.1",
+ "retry-axios": "0.3.2"
+ },
+ "deprecated": false,
+ "description": "Get the metadata from a Google Cloud Platform environment",
+ "devDependencies": {
+ "@types/extend": "^3.0.0",
+ "@types/mocha": "^5.2.4",
+ "@types/ncp": "^2.0.1",
+ "@types/nock": "^9.1.3",
+ "@types/node": "^10.1.0",
+ "@types/pify": "^3.0.2",
+ "@types/tmp": "0.0.33",
+ "assert-rejects": "^0.1.1",
+ "codecov": "^3.0.2",
+ "gts": "^0.7.0",
+ "hard-rejection": "^1.0.0",
+ "mocha": "^5.2.0",
+ "ncp": "^2.0.0",
+ "nock": "^9.2.6",
+ "nyc": "^12.0.0",
+ "pify": "^3.0.0",
+ "source-map-support": "^0.5.6",
+ "tmp": "0.0.33",
+ "typescript": "^2.8.3"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "build/src"
+ ],
+ "homepage": "https://github.com/stephenplusplus/gcp-metadata#readme",
+ "keywords": [
+ "google cloud platform",
+ "google cloud",
+ "google",
+ "app engine",
+ "compute engine",
+ "metadata server",
+ "metadata"
+ ],
+ "license": "MIT",
+ "main": "./build/src/index.js",
+ "name": "gcp-metadata",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/stephenplusplus/gcp-metadata.git"
+ },
+ "scripts": {
+ "check": "gts check",
+ "clean": "gts clean",
+ "codecov": "nyc report --reporter=json && codecov -f coverage/*.json",
+ "compile": "tsc -p .",
+ "fix": "gts fix",
+ "posttest": "npm run check",
+ "prepare": "npm run compile",
+ "pretest-only": "npm run compile",
+ "test": "npm run test-only",
+ "test-only": "nyc mocha build/test"
+ },
+ "types": "./build/src/index.d.ts",
+ "version": "0.7.0"
+}
diff --git a/express-server/node_modules/google-auth-library/CHANGELOG.md b/express-server/node_modules/google-auth-library/CHANGELOG.md
new file mode 100644
index 00000000..43c96edf
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/CHANGELOG.md
@@ -0,0 +1,114 @@
+# Changelog
+
+[npm history][1]
+
+[1]: https://www.npmjs.com/package/google-auth-library-nodejs?activeTab=versions
+
+## v2.0.0
+
+Well hello 2.0 🎉 **This release has multiple breaking changes**. It also has a lot of bug fixes.
+
+### Breaking Changes
+
+#### Support for node.js 4.x and 9.x has been dropped
+These versions of node.js are no longer supported.
+
+#### The `getRequestMetadata` method has been deprecated
+The `getRequestMetadata` method has been deprecated on the `IAM`, `OAuth2`, `JWT`, and `JWTAccess` classes. The `getRequestHeaders` method should be used instead. The methods have a subtle difference: the `getRequestMetadata` method returns an object with a headers property, which contains the authorization header. The `getRequestHeaders` method simply returns the headers.
+
+##### Old code
+```js
+const client = await auth.getClient();
+const res = await client.getRequestMetadata();
+const headers = res.headers;
+```
+
+##### New code
+```js
+const client = await auth.getClient();
+const headers = await client.getRequestHeaders();
+```
+
+#### The `createScopedRequired` method has been deprecated
+The `createScopedRequired` method has been deprecated on multiple classes. The `createScopedRequired` and `createScoped` methods on the `JWT` class were largely in place to help inform clients when scopes were required in an application default credential scenario. Instead of checking if scopes are required after creating the client, instead scopes should just be passed either into the `GoogleAuth.getClient` method, or directly into the `JWT` constructor.
+
+##### Old code
+```js
+auth.getApplicationDefault(function(err, authClient) {
+ if (err) {
+ return callback(err);
+ }
+ if (authClient.createScopedRequired && authClient.createScopedRequired()) {
+ authClient = authClient.createScoped([
+ 'https://www.googleapis.com/auth/cloud-platform'
+ ]);
+ }
+ callback(null, authClient);
+});
+```
+
+##### New code
+```js
+const client = await auth.getClient({
+ scopes: ['https://www.googleapis.com/auth/cloud-platform']
+});
+```
+
+#### The `refreshAccessToken` method has been deprecated
+The `OAuth2.refreshAccessToken` method has been deprecated. The `getAccessToken`, `getRequestMetadata`, and `request` methods will all refresh the token if needed automatically. There is no need to ever manually refresh the token.
+
+As always, if you run into any problems... please let us know!
+
+### Features
+- Set private_key_id in JWT access token header like other google auth libraries. (#450)
+
+### Bug Fixes
+- fix: support HTTPS proxies (#405)
+- fix: export missing interfaces (#437)
+- fix: Use new auth URIs (#434)
+- docs: Fix broken link (#423)
+- fix: surface file read streams (#413)
+- fix: prevent unhandled rejections by avoid .catch (#404)
+- fix: use gcp-metadata for compute credentials (#409)
+- Add Code of Conduct
+- fix: Warn when using user credentials from the Cloud SDK (#399)
+- fix: use `Buffer.from` instead of `new Buffer` (#400)
+- fix: Fix link format in README.md (#385)
+
+### Breaking changes
+- chore: deprecate getRequestMetadata (#414)
+- fix: deprecate the `createScopedRequired` methods (#410)
+- fix: drop support for node.js 4.x and 9.x (#417)
+- fix: deprecate the `refreshAccessToken` methods (#411)
+- fix: deprecate the `getDefaultProjectId` method (#402)
+- fix: drop support for node.js 4 (#401)
+
+### Build / Test changes
+- Run synth to make build tools consistent (#455)
+- Add a package.json for samples and cleanup README (#454)
+- chore(deps): update dependency typedoc to ^0.12.0 (#453)
+- chore: move examples => samples + synth (#448)
+- chore(deps): update dependency nyc to v13 (#452)
+- chore(deps): update dependency pify to v4 (#447)
+- chore(deps): update dependency assert-rejects to v1 (#446)
+- chore: ignore package-lock.json (#445)
+- chore: update renovate config (#442)
+- chore(deps): lock file maintenance (#443)
+- chore: remove greenkeeper badge (#440)
+- test: throw on deprecation
+- chore: add intelli-espower-loader for running tests (#430)
+- chore(deps): update dependency typescript to v3 (#432)
+- chore(deps): lock file maintenance (#431)
+- test: use strictEqual in tests (#425)
+- chore(deps): lock file maintenance (#428)
+- chore: Configure Renovate (#424)
+- chore: Update gts to the latest version 🚀 (#422)
+- chore: update gcp-metadata for isAvailable fix (#420)
+- refactor: use assert.reject in the tests (#415)
+- refactor: cleanup types for certificates (#412)
+- test: run tests with hard-rejection (#397)
+- cleanup: straighten nested try-catch (#394)
+- test: getDefaultProjectId should prefer config (#388)
+- chore(package): Update gts to the latest version 🚀 (#387)
+- chore(package): update sinon to version 6.0.0 (#386)
+
diff --git a/express-server/node_modules/google-auth-library/LICENSE b/express-server/node_modules/google-auth-library/LICENSE
new file mode 100644
index 00000000..b7c9ed18
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2013 Google Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/express-server/node_modules/google-auth-library/README.md b/express-server/node_modules/google-auth-library/README.md
new file mode 100644
index 00000000..41a70b19
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/README.md
@@ -0,0 +1,378 @@
+
+
+# Google Auth Library
+
+[![npm version][npmimg]][npm]
+[![CircleCI][circle-image]][circle-url]
+[![codecov][codecov-image]][codecov-url]
+[![Dependencies][david-dm-img]][david-dm]
+[![Known Vulnerabilities][snyk-image]][snyk-url]
+
+This is Google's officially supported [node.js][node] client library for using OAuth 2.0 authorization and authentication with Google APIs.
+
+## Installation
+This library is distributed on `npm`. To add it as a dependency, run the following command:
+
+``` sh
+$ npm install google-auth-library
+```
+
+## Upgrading to 1.x
+The `1.x` release includes a variety of bug fixes, new features, and breaking changes. Please take care, and see [the release notes](https://github.com/google/google-auth-library-nodejs/releases/tag/v1.0.0) for a list of breaking changes, and the upgrade guide.
+
+## Ways to authenticate
+This library provides a variety of ways to authenticate to your Google services.
+- [Application Default Credentials](#choosing-the-correct-credential-type-automatically) - Use Application Default Credentials when you use a single identity for all users in your application. Especially useful for applications running on Google Cloud.
+- [OAuth 2](#oauth2) - Use OAuth2 when you need to perform actions on behalf of the end user.
+- [JSON Web Tokens](#json-web-tokens) - Use JWT when you are using a single identity for all users. Especially useful for server->server or server->API communication.
+- [Google Compute](#compute) - Directly use a service account on Google Cloud Platform. Useful for server->server or server->API communication.
+
+## Application Default Credentials
+This library provides an implementation of [Application Default Credentials][] for Node.js. The [Application Default Credentials][] provide a simple way to get authorization credentials for use in calling Google APIs.
+
+They are best suited for cases when the call needs to have the same identity and authorization level for the application independent of the user. This is the recommended approach to authorize calls to Cloud APIs, particularly when you're building an application that uses Google Cloud Platform.
+
+#### Download your Service Account Credentials JSON file
+
+To use `Application Default Credentials`, You first need to download a set of JSON credentials for your project. Go to **APIs & Auth** > **Credentials** in the [Google Developers Console][devconsole] and select **Service account** from the **Add credentials** dropdown.
+
+> This file is your *only copy* of these credentials. It should never be
+> committed with your source code, and should be stored securely.
+
+Once downloaded, store the path to this file in the `GOOGLE_APPLICATION_CREDENTIALS` environment variable.
+
+#### Enable the API you want to use
+
+Before making your API call, you must be sure the API you're calling has been enabled. Go to **APIs & Auth** > **APIs** in the [Google Developers Console][devconsole] and enable the APIs you'd like to call. For the example below, you must enable the `DNS API`.
+
+
+#### Choosing the correct credential type automatically
+
+Rather than manually creating an OAuth2 client, JWT client, or Compute client, the auth library can create the correct credential type for you, depending upon the environment your code is running under.
+
+For example, a JWT auth client will be created when your code is running on your local developer machine, and a Compute client will be created when the same code is running on Google Cloud Platform. If you need a specific set of scopes, you can pass those in the form of a string or an array into the `auth.getClient` method.
+
+The code below shows how to retrieve a default credential type, depending upon the runtime environment.
+
+```js
+const {auth} = require('google-auth-library');
+
+/**
+ * Instead of specifying the type of client you'd like to use (JWT, OAuth2, etc)
+ * this library will automatically choose the right client based on the environment.
+ */
+async function main() {
+ const client = await auth.getClient({
+ scopes: 'https://www.googleapis.com/auth/cloud-platform'
+ });
+ const projectId = await auth.getProjectId();
+ const url = `https://www.googleapis.com/dns/v1/projects/${projectId}`;
+ const res = await client.request({ url });
+ console.log(res.data);
+}
+
+main().catch(console.error);
+```
+
+## OAuth2
+
+This library comes with an [OAuth2][oauth] client that allows you to retrieve an access token and refreshes the token and retry the request seamlessly if you also provide an `expiry_date` and the token is expired. The basics of Google's OAuth2 implementation is explained on [Google Authorization and Authentication documentation][authdocs].
+
+In the following examples, you may need a `CLIENT_ID`, `CLIENT_SECRET` and `REDIRECT_URL`. You can find these pieces of information by going to the [Developer Console][devconsole], clicking your project > APIs & auth > credentials.
+
+For more information about OAuth2 and how it works, [see here][oauth].
+
+#### A complete OAuth2 example
+
+Let's take a look at a complete example.
+
+``` js
+const {OAuth2Client} = require('google-auth-library');
+const http = require('http');
+const url = require('url');
+const querystring = require('querystring');
+const opn = require('opn');
+
+// Download your OAuth2 configuration from the Google
+const keys = require('./keys.json');
+
+/**
+ * Start by acquiring a pre-authenticated oAuth2 client.
+ */
+async function main() {
+ try {
+ const oAuth2Client = await getAuthenticatedClient();
+ // Make a simple request to the Google Plus API using our pre-authenticated client. The `request()` method
+ // takes an AxiosRequestConfig object. Visit https://github.com/axios/axios#request-config.
+ const url = 'https://www.googleapis.com/plus/v1/people?query=pizza';
+ const res = await oAuth2Client.request({url})
+ console.log(res.data);
+ } catch (e) {
+ console.error(e);
+ }
+ process.exit();
+}
+
+/**
+ * Create a new OAuth2Client, and go through the OAuth2 content
+ * workflow. Return the full client to the callback.
+ */
+function getAuthenticatedClient() {
+ return new Promise((resolve, reject) => {
+ // create an oAuth client to authorize the API call. Secrets are kept in a `keys.json` file,
+ // which should be downloaded from the Google Developers Console.
+ const oAuth2Client = new OAuth2Client(
+ keys.web.client_id,
+ keys.web.client_secret,
+ keys.web.redirect_uris[0]
+ );
+
+ // Generate the url that will be used for the consent dialog.
+ const authorizeUrl = oAuth2Client.generateAuthUrl({
+ access_type: 'offline',
+ scope: 'https://www.googleapis.com/auth/plus.me'
+ });
+
+ // Open an http server to accept the oauth callback. In this simple example, the
+ // only request to our webserver is to /oauth2callback?code=
+ const server = http.createServer(async (req, res) => {
+ if (req.url.indexOf('/oauth2callback') > -1) {
+ // acquire the code from the querystring, and close the web server.
+ const qs = querystring.parse(url.parse(req.url).query);
+ console.log(`Code is ${qs.code}`);
+ res.end('Authentication successful! Please return to the console.');
+ server.close();
+
+ // Now that we have the code, use that to acquire tokens.
+ const r = await oAuth2Client.getToken(qs.code)
+ // Make sure to set the credentials on the OAuth2 client.
+ oAuth2Client.setCredentials(r.tokens);
+ console.info('Tokens acquired.');
+ resolve(oAuth2Client);
+ }
+ }).listen(3000, () => {
+ // open the browser to the authorize url to start the workflow
+ opn(authorizeUrl);
+ });
+ });
+}
+
+main();
+```
+
+#### Handling token events
+This library will automatically obtain an `access_token`, and automatically refresh the `access_token` if a `refresh_token` is present. The `refresh_token` is only returned on the [first authorization](https://github.com/google/google-api-nodejs-client/issues/750#issuecomment-304521450), so if you want to make sure you store it safely. An easy way to make sure you always store the most recent tokens is to use the `tokens` event:
+
+```js
+const client = await auth.getClient();
+
+client.on('tokens', (tokens) => {
+ if (tokens.refresh_token) {
+ // store the refresh_token in my database!
+ console.log(tokens.refresh_token);
+ }
+ console.log(tokens.access_token);
+});
+
+const url = `https://www.googleapis.com/dns/v1/projects/${projectId}`;
+const res = await client.request({ url });
+// The `tokens` event would now be raised if this was the first request
+```
+
+#### Retrieve access token
+With the code returned, you can ask for an access token as shown below:
+
+``` js
+const tokens = await oauth2Client.getToken(code);
+// Now tokens contains an access_token and an optional refresh_token. Save them.
+oauth2Client.setCredentials(tokens);
+```
+
+#### Manually refreshing access token
+If you need to manually refresh the `access_token` associated with your OAuth2 client, ensure the call to `generateAuthUrl` sets the `access_type` to `offline`. The refresh token will only be returned for the first authorization by the user. To force consent, set the `prompt` property to `consent`:
+
+```js
+// Generate the url that will be used for the consent dialog.
+const authorizeUrl = oAuth2Client.generateAuthUrl({
+ // To get a refresh token, you MUST set access_type to `offline`.
+ access_type: 'offline',
+ // set the appropriate scopes
+ scope: 'https://www.googleapis.com/auth/plus.me',
+ // A refresh token is only returned the first time the user
+ // consents to providing access. For illustration purposes,
+ // setting the prompt to 'consent' will force this consent
+ // every time, forcing a refresh_token to be returned.
+ prompt: 'consent'
+});
+```
+
+If a refresh_token is set again on `OAuth2Client.credentials.refresh_token`, you can can `refreshAccessToken()`:
+
+``` js
+const tokens = await oauth2Client.refreshAccessToken();
+// your access_token is now refreshed and stored in oauth2Client
+// store these new tokens in a safe place (e.g. database)
+```
+
+#### Checking `access_token` information
+After obtaining and storing an `access_token`, at a later time you may want to go check the expiration date,
+original scopes, or audience for the token. To get the token info, you can use the `getTokenInfo` method:
+
+```js
+// after acquiring an oAuth2Client...
+const tokenInfo = await oAuth2client.getTokenInfo('my-access-token');
+
+// take a look at the scopes originally provisioned for the access token
+console.log(tokenInfo.scopes);
+```
+
+This method will throw if the token is invalid.
+
+#### OAuth2 with Installed Apps (Electron)
+If you're authenticating with OAuth2 from an installed application (like Electron), you may not want to embed your `client_secret` inside of the application sources. To work around this restriction, you can choose the `iOS` application type when creating your OAuth2 credentials in the [Google Developers console][devconsole]:
+
+![application type][apptype]
+
+If using the `iOS` type, when creating the OAuth2 client you won't need to pass a `client_secret` into the constructor:
+```js
+const oAuth2Client = new OAuth2Client({
+ clientId: ,
+ redirectUri:
+});
+```
+
+## JSON Web Tokens
+The Google Developers Console provides a `.json` file that you can use to configure a JWT auth client and authenticate your requests, for example when using a service account.
+
+``` js
+const {JWT} = require('google-auth-library');
+const keys = require('./jwt.keys.json');
+
+async function main() {
+ const client = new JWT(
+ keys.client_email,
+ null,
+ keys.private_key,
+ ['https://www.googleapis.com/auth/cloud-platform'],
+ );
+ await client.authorize();
+ const url = `https://www.googleapis.com/dns/v1/projects/${keys.project_id}`;
+ const res = await client.request({url});
+ console.log(res.data);
+}
+
+main().catch(console.error);
+
+```
+
+The parameters for the JWT auth client including how to use it with a `.pem` file are explained in [samples/jwt.js](samples/jwt.js).
+
+#### Loading credentials from environment variables
+Instead of loading credentials from a key file, you can also provide them using an environment variable and the `GoogleAuth.fromJSON()` method. This is particularly convenient for systems that deploy directly from source control (Heroku, App Engine, etc).
+
+Start by exporting your credentials:
+
+```
+$ export CREDS='{
+ "type": "service_account",
+ "project_id": "your-project-id",
+ "private_key_id": "your-private-key-id",
+ "private_key": "your-private-key",
+ "client_email": "your-client-email",
+ "client_id": "your-client-id",
+ "auth_uri": "https://accounts.google.com/o/oauth2/auth",
+ "token_uri": "https://accounts.google.com/o/oauth2/token",
+ "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
+ "client_x509_cert_url": "your-cert-url"
+}'
+```
+Now you can create a new client from the credentials:
+
+```js
+const {auth} = require('google-auth-library');
+
+// load the environment variable with our keys
+const keysEnvVar = process.env['CREDS'];
+if (!keysEnvVar) {
+ throw new Error('The $CREDS environment variable was not found!');
+}
+const keys = JSON.parse(keysEnvVar);
+
+async function main() {
+ // load the JWT or UserRefreshClient from the keys
+ const client = auth.fromJSON(keys);
+ client.scopes = ['https://www.googleapis.com/auth/cloud-platform'];
+ await client.authorize();
+ const url = `https://www.googleapis.com/dns/v1/projects/${keys.project_id}`;
+ const res = await client.request({url});
+ console.log(res.data);
+}
+
+main().catch(console.error);
+```
+
+#### Using a Proxy
+You can set the `HTTPS_PROXY` or `https_proxy` environment variables to proxy HTTPS requests. When `HTTPS_PROXY` or `https_proxy` are set, they will be used to proxy SSL requests that do not have an explicit proxy configuration option present.
+
+## Compute
+If your application is running on Google Cloud Platform, you can authenticate using the default service account or by specifying a specific service account.
+
+**Note**: In most cases, you will want to use [Application Default Credentials](#choosing-the-correct-credential-type-automatically). Direct use of the `Compute` class is for very specific scenarios.
+
+``` js
+const {Compute} = require('google-auth-library');
+
+async function main() {
+ const client = new Compute({
+ // Specifying the service account email is optional.
+ serviceAccountEmail: 'my-service-account@example.com'
+ });
+ const projectId = 'your-project-id';
+ const url = `https://www.googleapis.com/dns/v1/projects/${project_id}`;
+ const res = await client.request({url});
+ console.log(res.data);
+}
+
+main().catch(console.error);
+```
+
+## Questions/problems?
+
+* Ask your development related questions on [Stack Overflow][stackoverflow].
+* If you've found an bug/issue, please [file it on GitHub][bugs].
+
+## Contributing
+
+See [CONTRIBUTING][contributing].
+
+## License
+
+This library is licensed under Apache 2.0. Full license text is available in [LICENSE][copying].
+
+[Application Default Credentials]: https://developers.google.com/identity/protocols/application-default-credentials#callingnode
+[apptype]: https://user-images.githubusercontent.com/534619/36553844-3f9a863c-17b2-11e8-904a-29f6cd5f807a.png
+[authdocs]: https://developers.google.com/accounts/docs/OAuth2Login
+[axios]: https://github.com/axios/axios
+[axiosOpts]: https://github.com/axios/axios#request-config
+[bugs]: https://github.com/google/google-auth-library-nodejs/issues
+[circle-image]: https://circleci.com/gh/google/google-auth-library-nodejs.svg?style=svg
+[circle-url]: https://circleci.com/gh/google/google-auth-library-nodejs
+[codecov-image]: https://codecov.io/gh/google/google-auth-library-nodejs/branch/master/graph/badge.svg
+[codecov-url]: https://codecov.io/gh/google/google-auth-library-nodejs
+[contributing]: https://github.com/google/google-auth-library-nodejs/blob/master/.github/CONTRIBUTING.md
+[copying]: https://github.com/google/google-auth-library-nodejs/tree/master/LICENSE
+[david-dm-img]: https://david-dm.org/google/google-auth-library-nodejs/status.svg
+[david-dm]: https://david-dm.org/google/google-auth-library-nodejs
+[node]: http://nodejs.org/
+[npmimg]: https://img.shields.io/npm/v/google-auth-library.svg
+[npm]: https://www.npmjs.org/package/google-auth-library
+[oauth]: https://developers.google.com/identity/protocols/OAuth2
+[snyk-image]: https://snyk.io/test/github/google/google-auth-library-nodejs/badge.svg
+[snyk-url]: https://snyk.io/test/github/google/google-auth-library-nodejs
+[stability]: http://nodejs.org/api/stream.html#stream_stream
+[stackoverflow]: http://stackoverflow.com/questions/tagged/google-auth-library-nodejs
+[stream]: http://nodejs.org/api/stream.html#stream_class_stream_readable
+[devconsole]: https://console.developer.google.com
+[options]: https://github.com/google/google-auth-library-nodejs/tree/master#options
+[gcloud]: https://github.com/GoogleCloudPlatform/gcloud-node
+[cloudplatform]: https://developers.google.com/cloud/
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/authclient.d.ts b/express-server/node_modules/google-auth-library/build/src/auth/authclient.d.ts
new file mode 100644
index 00000000..4b3a0a45
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/authclient.d.ts
@@ -0,0 +1,35 @@
+/**
+ * Copyright 2012 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///
+import { AxiosPromise, AxiosRequestConfig } from 'axios';
+import { EventEmitter } from 'events';
+import { DefaultTransporter } from '../transporters';
+import { Credentials } from './credentials';
+export declare interface AuthClient {
+ on(event: 'tokens', listener: (tokens: Credentials) => void): this;
+}
+export declare abstract class AuthClient extends EventEmitter {
+ transporter: DefaultTransporter;
+ credentials: Credentials;
+ /**
+ * Provides an alternative Axios request implementation with auth credentials
+ */
+ abstract request(opts: AxiosRequestConfig): AxiosPromise;
+ /**
+ * Sets the auth credentials.
+ */
+ setCredentials(credentials: Credentials): void;
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/authclient.js b/express-server/node_modules/google-auth-library/build/src/auth/authclient.js
new file mode 100644
index 00000000..dbc60a65
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/authclient.js
@@ -0,0 +1,34 @@
+"use strict";
+/**
+ * Copyright 2012 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const events_1 = require("events");
+const transporters_1 = require("../transporters");
+class AuthClient extends events_1.EventEmitter {
+ constructor() {
+ super(...arguments);
+ this.transporter = new transporters_1.DefaultTransporter();
+ this.credentials = {};
+ }
+ /**
+ * Sets the auth credentials.
+ */
+ setCredentials(credentials) {
+ this.credentials = credentials;
+ }
+}
+exports.AuthClient = AuthClient;
+//# sourceMappingURL=authclient.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/authclient.js.map b/express-server/node_modules/google-auth-library/build/src/auth/authclient.js.map
new file mode 100644
index 00000000..5581ad90
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/authclient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"authclient.js","sourceRoot":"","sources":["../../../src/auth/authclient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAGH,mCAAoC;AAEpC,kDAAmD;AAQnD,MAAsB,UAAW,SAAQ,qBAAY;IAArD;;QACE,gBAAW,GAAG,IAAI,iCAAkB,EAAE,CAAC;QACvC,gBAAW,GAAgB,EAAE,CAAC;IAahC,CAAC;IANC;;OAEG;IACH,cAAc,CAAC,WAAwB;QACrC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;CACF;AAfD,gCAeC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/computeclient.d.ts b/express-server/node_modules/google-auth-library/build/src/auth/computeclient.d.ts
new file mode 100644
index 00000000..6b9fcf47
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/computeclient.d.ts
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2013 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { AxiosPromise, AxiosRequestConfig } from 'axios';
+import { GetTokenResponse, OAuth2Client, RefreshOptions } from './oauth2client';
+export interface ComputeOptions extends RefreshOptions {
+ /**
+ * The service account email to use, or 'default'. A Compute Engine instance
+ * may have multiple service accounts.
+ */
+ serviceAccountEmail?: string;
+}
+export declare class Compute extends OAuth2Client {
+ private serviceAccountEmail;
+ /**
+ * Google Compute Engine service account credentials.
+ *
+ * Retrieve access token from the metadata server.
+ * See: https://developers.google.com/compute/docs/authentication
+ */
+ constructor(options?: ComputeOptions);
+ /**
+ * Indicates whether the credential requires scopes to be created by calling
+ * createdScoped before use.
+ * @deprecated
+ * @return Boolean indicating if scope is required.
+ */
+ createScopedRequired(): boolean;
+ /**
+ * Refreshes the access token.
+ * @param refreshToken Unused parameter
+ */
+ protected refreshTokenNoCache(refreshToken?: string | null): Promise;
+ protected requestAsync(opts: AxiosRequestConfig, retry?: boolean): AxiosPromise;
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/computeclient.js b/express-server/node_modules/google-auth-library/build/src/auth/computeclient.js
new file mode 100644
index 00000000..77a9de4b
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/computeclient.js
@@ -0,0 +1,116 @@
+"use strict";
+/**
+ * Copyright 2013 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const gcpMetadata = require("gcp-metadata");
+const messages = require("../messages");
+const oauth2client_1 = require("./oauth2client");
+class Compute extends oauth2client_1.OAuth2Client {
+ /**
+ * Google Compute Engine service account credentials.
+ *
+ * Retrieve access token from the metadata server.
+ * See: https://developers.google.com/compute/docs/authentication
+ */
+ constructor(options = {}) {
+ super(options);
+ // Start with an expired refresh token, which will automatically be
+ // refreshed before the first API call is made.
+ this.credentials = { expiry_date: 1, refresh_token: 'compute-placeholder' };
+ this.serviceAccountEmail = options.serviceAccountEmail || 'default';
+ }
+ /**
+ * Indicates whether the credential requires scopes to be created by calling
+ * createdScoped before use.
+ * @deprecated
+ * @return Boolean indicating if scope is required.
+ */
+ createScopedRequired() {
+ // On compute engine, scopes are specified at the compute instance's
+ // creation time, and cannot be changed. For this reason, always return
+ // false.
+ messages.warn(messages.COMPUTE_CREATE_SCOPED_DEPRECATED);
+ return false;
+ }
+ /**
+ * Refreshes the access token.
+ * @param refreshToken Unused parameter
+ */
+ refreshTokenNoCache(refreshToken) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const tokenPath = `service-accounts/${this.serviceAccountEmail}/token`;
+ let res;
+ try {
+ res = yield gcpMetadata.instance(tokenPath);
+ }
+ catch (e) {
+ e.message = 'Could not refresh access token.';
+ throw e;
+ }
+ const tokens = res.data;
+ if (res.data && res.data.expires_in) {
+ tokens.expiry_date =
+ ((new Date()).getTime() + (res.data.expires_in * 1000));
+ delete tokens.expires_in;
+ }
+ this.emit('tokens', tokens);
+ return { tokens, res };
+ });
+ }
+ requestAsync(opts, retry = false) {
+ return super.requestAsync(opts, retry).catch(e => {
+ const res = e.response;
+ if (res && res.status) {
+ let helpfulMessage = null;
+ if (res.status === 403) {
+ helpfulMessage =
+ 'A Forbidden error was returned while attempting to retrieve an access ' +
+ 'token for the Compute Engine built-in service account. This may be because the Compute ' +
+ 'Engine instance does not have the correct permission scopes specified.';
+ }
+ else if (res.status === 404) {
+ helpfulMessage =
+ 'A Not Found error was returned while attempting to retrieve an access' +
+ 'token for the Compute Engine built-in service account. This may be because the Compute ' +
+ 'Engine instance does not have any permission scopes specified.';
+ }
+ if (helpfulMessage) {
+ if (e && e.message && !retry) {
+ helpfulMessage += ' ' + e.message;
+ }
+ if (e) {
+ e.message = helpfulMessage;
+ }
+ else {
+ e = new Error(helpfulMessage);
+ e.code = res.status.toString();
+ }
+ }
+ }
+ throw e;
+ });
+ }
+}
+exports.Compute = Compute;
+//# sourceMappingURL=computeclient.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/computeclient.js.map b/express-server/node_modules/google-auth-library/build/src/auth/computeclient.js.map
new file mode 100644
index 00000000..9a9a4d0f
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/computeclient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"computeclient.js","sourceRoot":"","sources":["../../../src/auth/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ACjD;YACD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC5B,OAAO,EAAC,MAAM,EAAE,GAAG,EAAC,CAAC;QACvB,CAAC;KAAA;IAES,YAAY,CAAI,IAAwB,EAAE,KAAK,GAAG,KAAK;QAE/D,OAAO,KAAK,CAAC,YAAY,CAAI,IAAI,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAClD,MAAM,GAAG,GAAI,CAAgB,CAAC,QAAQ,CAAC;YACvC,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE;gBACrB,IAAI,cAAc,GAAG,IAAI,CAAC;gBAC1B,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;oBACtB,cAAc;wBACV,wEAAwE;4BACxE,yFAAyF;4BACzF,wEAAwE,CAAC;iBAC9E;qBAAM,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;oBAC7B,cAAc;wBACV,uEAAuE;4BACvE,yFAAyF;4BACzF,gEAAgE,CAAC;iBACtE;gBACD,IAAI,cAAc,EAAE;oBAClB,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,KAAK,EAAE;wBAC5B,cAAc,IAAI,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC;qBACnC;oBACD,IAAI,CAAC,EAAE;wBACL,CAAC,CAAC,OAAO,GAAG,cAAc,CAAC;qBAC5B;yBAAM;wBACL,CAAC,GAAG,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;wBAC7B,CAA2B,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;qBAC3D;iBACF;aACF;YACD,MAAM,CAAC,CAAC;QACV,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAvFD,0BAuFC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/credentials.d.ts b/express-server/node_modules/google-auth-library/build/src/auth/credentials.d.ts
new file mode 100644
index 00000000..d0d0034a
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/credentials.d.ts
@@ -0,0 +1,43 @@
+/**
+ * Copyright 2014 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+export interface Credentials {
+ refresh_token?: string | null;
+ expiry_date?: number | null;
+ access_token?: string | null;
+ token_type?: string | null;
+ id_token?: string | null;
+}
+export interface CredentialRequest {
+ refresh_token?: string;
+ access_token?: string;
+ token_type?: string;
+ expires_in?: number;
+ id_token?: string;
+}
+export interface JWTInput {
+ type?: string;
+ client_email?: string;
+ private_key?: string;
+ private_key_id?: string;
+ project_id?: string;
+ client_id?: string;
+ client_secret?: string;
+ refresh_token?: string;
+}
+export interface CredentialBody {
+ client_email?: string;
+ private_key?: string;
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/credentials.js b/express-server/node_modules/google-auth-library/build/src/auth/credentials.js
new file mode 100644
index 00000000..0808ef6d
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/credentials.js
@@ -0,0 +1,18 @@
+"use strict";
+/**
+ * Copyright 2014 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=credentials.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/credentials.js.map b/express-server/node_modules/google-auth-library/build/src/auth/credentials.js.map
new file mode 100644
index 00000000..7151fbf4
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/credentials.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../../src/auth/credentials.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/envDetect.d.ts b/express-server/node_modules/google-auth-library/build/src/auth/envDetect.d.ts
new file mode 100644
index 00000000..cc6a6d0e
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/envDetect.d.ts
@@ -0,0 +1,24 @@
+/**
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+export declare enum GCPEnv {
+ APP_ENGINE = "APP_ENGINE",
+ KUBERNETES_ENGINE = "KUBERNETES_ENGINE",
+ CLOUD_FUNCTIONS = "CLOUD_FUNCTIONS",
+ COMPUTE_ENGINE = "COMPUTE_ENGINE",
+ NONE = "NONE"
+}
+export declare function clear(): void;
+export declare function getEnv(): Promise;
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/envDetect.js b/express-server/node_modules/google-auth-library/build/src/auth/envDetect.js
new file mode 100644
index 00000000..a556fb2a
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/envDetect.js
@@ -0,0 +1,85 @@
+"use strict";
+/**
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const gcpMetadata = require("gcp-metadata");
+var GCPEnv;
+(function (GCPEnv) {
+ GCPEnv["APP_ENGINE"] = "APP_ENGINE";
+ GCPEnv["KUBERNETES_ENGINE"] = "KUBERNETES_ENGINE";
+ GCPEnv["CLOUD_FUNCTIONS"] = "CLOUD_FUNCTIONS";
+ GCPEnv["COMPUTE_ENGINE"] = "COMPUTE_ENGINE";
+ GCPEnv["NONE"] = "NONE";
+})(GCPEnv = exports.GCPEnv || (exports.GCPEnv = {}));
+let env;
+function clear() {
+ env = undefined;
+}
+exports.clear = clear;
+function getEnv() {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (!env) {
+ if (isAppEngine()) {
+ env = GCPEnv.APP_ENGINE;
+ }
+ else if (isCloudFunction()) {
+ env = GCPEnv.CLOUD_FUNCTIONS;
+ }
+ else if (yield isKubernetesEngine()) {
+ env = GCPEnv.KUBERNETES_ENGINE;
+ }
+ else if (yield isComputeEngine()) {
+ env = GCPEnv.COMPUTE_ENGINE;
+ }
+ else {
+ env = GCPEnv.NONE;
+ }
+ }
+ return env;
+ });
+}
+exports.getEnv = getEnv;
+function isAppEngine() {
+ return !!(process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME);
+}
+function isCloudFunction() {
+ return !!process.env.FUNCTION_NAME;
+}
+function isKubernetesEngine() {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ yield gcpMetadata.instance('attributes/cluster-name');
+ return true;
+ }
+ catch (e) {
+ return false;
+ }
+ });
+}
+function isComputeEngine() {
+ return __awaiter(this, void 0, void 0, function* () {
+ return gcpMetadata.isAvailable();
+ });
+}
+//# sourceMappingURL=envDetect.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/envDetect.js.map b/express-server/node_modules/google-auth-library/build/src/auth/envDetect.js.map
new file mode 100644
index 00000000..0a9c7a1f
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/envDetect.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"envDetect.js","sourceRoot":"","sources":["../../../src/auth/envDetect.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;AAEH,4CAA4C;AAE5C,IAAY,MAMX;AAND,WAAY,MAAM;IAChB,mCAAyB,CAAA;IACzB,iDAAuC,CAAA;IACvC,6CAAmC,CAAA;IACnC,2CAAiC,CAAA;IACjC,uBAAa,CAAA;AACf,CAAC,EANW,MAAM,GAAN,cAAM,KAAN,cAAM,QAMjB;AAED,IAAI,GAAqB,CAAC;AAE1B,SAAgB,KAAK;IACnB,GAAG,GAAG,SAAS,CAAC;AAClB,CAAC;AAFD,sBAEC;AAED,SAAsB,MAAM;;QAC1B,IAAI,CAAC,GAAG,EAAE;YACR,IAAI,WAAW,EAAE,EAAE;gBACjB,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;aACzB;iBAAM,IAAI,eAAe,EAAE,EAAE;gBAC5B,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC;aAC9B;iBAAM,IAAI,MAAM,kBAAkB,EAAE,EAAE;gBACrC,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;aAChC;iBAAM,IAAI,MAAM,eAAe,EAAE,EAAE;gBAClC,GAAG,GAAG,MAAM,CAAC,cAAc,CAAC;aAC7B;iBAAM;gBACL,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC;aACnB;SACF;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CAAA;AAfD,wBAeC;AAED,SAAS,WAAW;IAClB,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACpE,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;AACrC,CAAC;AAED,SAAe,kBAAkB;;QAC/B,IAAI;YACF,MAAM,WAAW,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;YACtD,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,KAAK,CAAC;SACd;IACH,CAAC;CAAA;AAED,SAAe,eAAe;;QAC5B,OAAO,WAAW,CAAC,WAAW,EAAE,CAAC;IACnC,CAAC;CAAA"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/googleauth.d.ts b/express-server/node_modules/google-auth-library/build/src/auth/googleauth.d.ts
new file mode 100644
index 00000000..4f5e7523
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/googleauth.d.ts
@@ -0,0 +1,272 @@
+/**
+ * Copyright 2014 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///
+import { AxiosRequestConfig, AxiosResponse } from 'axios';
+import * as fs from 'fs';
+import * as stream from 'stream';
+import { DefaultTransporter, Transporter } from '../transporters';
+import { Compute } from './computeclient';
+import { CredentialBody, JWTInput } from './credentials';
+import { GCPEnv } from './envDetect';
+import { JWT } from './jwtclient';
+import { Headers, OAuth2Client, RefreshOptions } from './oauth2client';
+import { UserRefreshClient } from './refreshclient';
+export interface ProjectIdCallback {
+ (err?: Error | null, projectId?: string | null): void;
+}
+export interface CredentialCallback {
+ (err: Error | null, result?: UserRefreshClient | JWT): void;
+}
+export interface ADCCallback {
+ (err: Error | null, credential?: OAuth2Client, projectId?: string | null): void;
+}
+export interface ADCResponse {
+ credential: OAuth2Client;
+ projectId: string | null;
+}
+export interface GoogleAuthOptions {
+ /**
+ * Path to a .json, .pem, or .p12 key file
+ */
+ keyFilename?: string;
+ /**
+ * Path to a .json, .pem, or .p12 key file
+ */
+ keyFile?: string;
+ /**
+ * Object containing client_email and private_key properties
+ */
+ credentials?: CredentialBody;
+ /**
+ * Required scopes for the desired API request
+ */
+ scopes?: string | string[];
+ /**
+ * Your project ID.
+ */
+ projectId?: string;
+}
+export declare const CLOUD_SDK_CLIENT_ID = "764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com";
+export declare class GoogleAuth {
+ transporter?: Transporter;
+ /**
+ * Caches a value indicating whether the auth layer is running on Google
+ * Compute Engine.
+ * @private
+ */
+ private checkIsGCE?;
+ readonly isGCE: boolean | undefined;
+ private _getDefaultProjectIdPromise?;
+ private _cachedProjectId?;
+ jsonContent: JWTInput | null;
+ cachedCredential: JWT | UserRefreshClient | Compute | null;
+ private keyFilename?;
+ private scopes?;
+ /**
+ * Export DefaultTransporter as a static property of the class.
+ */
+ static DefaultTransporter: typeof DefaultTransporter;
+ constructor(opts?: GoogleAuthOptions);
+ /**
+ * THIS METHOD HAS BEEN DEPRECATED.
+ * It will be removed in 3.0. Please use getProjectId instead.
+ */
+ getDefaultProjectId(): Promise;
+ getDefaultProjectId(callback: ProjectIdCallback): void;
+ /**
+ * Obtains the default project ID for the application.
+ * @param callback Optional callback
+ * @returns Promise that resolves with project Id (if used without callback)
+ */
+ getProjectId(): Promise;
+ getProjectId(callback: ProjectIdCallback): void;
+ private getProjectIdAsync;
+ /**
+ * Obtains the default service-level credentials for the application.
+ * @param callback Optional callback.
+ * @returns Promise that resolves with the ADCResponse (if no callback was
+ * passed).
+ */
+ getApplicationDefault(): Promise;
+ getApplicationDefault(callback: ADCCallback): void;
+ getApplicationDefault(options: RefreshOptions): Promise;
+ getApplicationDefault(options: RefreshOptions, callback: ADCCallback): void;
+ private getApplicationDefaultAsync;
+ /**
+ * Determines whether the auth layer is running on Google Compute Engine.
+ * @returns A promise that resolves with the boolean.
+ * @api private
+ */
+ _checkIsGCE(): Promise;
+ /**
+ * Attempts to load default credentials from the environment variable path..
+ * @returns Promise that resolves with the OAuth2Client or null.
+ * @api private
+ */
+ _tryGetApplicationCredentialsFromEnvironmentVariable(options?: RefreshOptions): Promise;
+ /**
+ * Attempts to load default credentials from a well-known file location
+ * @return Promise that resolves with the OAuth2Client or null.
+ * @api private
+ */
+ _tryGetApplicationCredentialsFromWellKnownFile(options?: RefreshOptions): Promise;
+ /**
+ * Attempts to load default credentials from a file at the given path..
+ * @param filePath The path to the file to read.
+ * @returns Promise that resolves with the OAuth2Client
+ * @api private
+ */
+ _getApplicationCredentialsFromFilePath(filePath: string, options?: RefreshOptions): Promise;
+ /**
+ * Credentials from the Cloud SDK that are associated with Cloud SDK's project
+ * are problematic because they may not have APIs enabled and have limited
+ * quota. If this is the case, warn about it.
+ */
+ protected warnOnProblematicCredentials(client: JWT): void;
+ /**
+ * Create a credentials instance using the given input options.
+ * @param json The input object.
+ * @returns JWT or UserRefresh Client with data
+ */
+ fromJSON(json: JWTInput, options?: RefreshOptions): JWT | UserRefreshClient;
+ /**
+ * Create a credentials instance using the given input stream.
+ * @param inputStream The input stream.
+ * @param callback Optional callback.
+ */
+ fromStream(inputStream: stream.Readable): Promise;
+ fromStream(inputStream: stream.Readable, callback: CredentialCallback): void;
+ fromStream(inputStream: stream.Readable, options: RefreshOptions): Promise;
+ fromStream(inputStream: stream.Readable, options: RefreshOptions, callback: CredentialCallback): void;
+ private fromStreamAsync;
+ /**
+ * Create a credentials instance using the given API key string.
+ * @param apiKey The API key string
+ * @param options An optional options object.
+ * @returns A JWT loaded from the key
+ */
+ fromAPIKey(apiKey: string, options?: RefreshOptions): JWT;
+ /**
+ * Determines whether the current operating system is Windows.
+ * @api private
+ */
+ private _isWindows;
+ /**
+ * Creates a file stream. Allows mocking.
+ * @api private
+ */
+ _createReadStream(filePath: string): fs.ReadStream;
+ /**
+ * Gets the current operating system platform. Allows mocking.
+ * @api private
+ */
+ _osPlatform(): NodeJS.Platform;
+ /**
+ * Determines whether a file exists. Allows mocking.
+ * @api private
+ */
+ _fileExists(filePath: string): boolean;
+ /**
+ * Joins two parts of a path. Allows mocking.
+ * @api private
+ */
+ _pathJoin(item1: string, item2: string): string;
+ /**
+ * Allows mocking of the path to a well-known file.
+ * @api private
+ */
+ _mockWellKnownFilePath(filePath: string): string;
+ private createError;
+ /**
+ * Run the Google Cloud SDK command that prints the default project ID
+ */
+ private getDefaultServiceProjectId;
+ /**
+ * Loads the project id from environment variables.
+ * @api private
+ */
+ private getProductionProjectId;
+ /**
+ * Loads the project id from the GOOGLE_APPLICATION_CREDENTIALS json file.
+ * @api private
+ */
+ private getFileProjectId;
+ /**
+ * Gets the Compute Engine project ID if it can be inferred.
+ */
+ private getGCEProjectId;
+ /**
+ * The callback function handles a credential object that contains the
+ * client_email and private_key (if exists).
+ * getCredentials checks for these values from the user JSON at first.
+ * If it doesn't exist, and the environment is on GCE, it gets the
+ * client_email from the cloud metadata server.
+ * @param callback Callback that handles the credential object that contains
+ * a client_email and optional private key, or the error.
+ * returned
+ */
+ getCredentials(): Promise;
+ getCredentials(callback: (err: Error | null, credentials?: CredentialBody) => void): void;
+ private getCredentialsAsync;
+ /**
+ * Automatically obtain a client based on the provided configuration. If no
+ * options were passed, use Application Default Credentials.
+ */
+ getClient(options?: GoogleAuthOptions): Promise;
+ /**
+ * Automatically obtain application default credentials, and return
+ * an access token for making requests.
+ */
+ getAccessToken(): Promise;
+ /**
+ * Obtain the HTTP headers that will provide authorization for a given
+ * request.
+ */
+ getRequestHeaders(url?: string): Promise;
+ /**
+ * Obtain credentials for a request, then attach the appropriate headers to
+ * the request options.
+ * @param opts Axios or Request options on which to attach the headers
+ */
+ authorizeRequest(opts: {
+ url?: string;
+ uri?: string;
+ headers?: Headers;
+ }): Promise<{
+ url?: string | undefined;
+ uri?: string | undefined;
+ headers?: Headers | undefined;
+ }>;
+ /**
+ * Automatically obtain application default credentials, and make an
+ * HTTP request using the given options.
+ * @param opts Axios request options for the HTTP request.
+ */
+ request(opts: AxiosRequestConfig): Promise>;
+ /**
+ * Determine the compute environment in which the code is running.
+ */
+ getEnv(): Promise;
+ /**
+ * Sign the given data with the current private key, or go out
+ * to the IAM API to sign it.
+ * @param data The data to be signed.
+ */
+ sign(data: string): Promise;
+}
+export interface SignBlobResponse {
+ signature: string;
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/googleauth.js b/express-server/node_modules/google-auth-library/build/src/auth/googleauth.js
new file mode 100644
index 00000000..3bc2a9f3
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/googleauth.js
@@ -0,0 +1,641 @@
+"use strict";
+/**
+ * Copyright 2014 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const child_process_1 = require("child_process");
+const crypto = require("crypto");
+const fs = require("fs");
+const gcpMetadata = require("gcp-metadata");
+const os = require("os");
+const path = require("path");
+const util = require("util");
+const messages = require("../messages");
+const transporters_1 = require("../transporters");
+const computeclient_1 = require("./computeclient");
+const envDetect_1 = require("./envDetect");
+const jwtclient_1 = require("./jwtclient");
+const refreshclient_1 = require("./refreshclient");
+exports.CLOUD_SDK_CLIENT_ID = '764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com';
+class GoogleAuth {
+ constructor(opts) {
+ /**
+ * Caches a value indicating whether the auth layer is running on Google
+ * Compute Engine.
+ * @private
+ */
+ this.checkIsGCE = undefined;
+ // To save the contents of the JSON credential file
+ this.jsonContent = null;
+ this.cachedCredential = null;
+ opts = opts || {};
+ this._cachedProjectId = opts.projectId || null;
+ this.keyFilename = opts.keyFilename || opts.keyFile;
+ this.scopes = opts.scopes;
+ this.jsonContent = opts.credentials || null;
+ }
+ // Note: this properly is only public to satisify unit tests.
+ // https://github.com/Microsoft/TypeScript/issues/5228
+ get isGCE() {
+ return this.checkIsGCE;
+ }
+ getDefaultProjectId(callback) {
+ messages.warn(messages.DEFAULT_PROJECT_ID_DEPRECATED);
+ if (callback) {
+ this.getProjectIdAsync().then(r => callback(null, r), callback);
+ }
+ else {
+ return this.getProjectIdAsync();
+ }
+ }
+ getProjectId(callback) {
+ if (callback) {
+ this.getProjectIdAsync().then(r => callback(null, r), callback);
+ }
+ else {
+ return this.getProjectIdAsync();
+ }
+ }
+ getProjectIdAsync() {
+ if (this._cachedProjectId) {
+ return Promise.resolve(this._cachedProjectId);
+ }
+ // In implicit case, supports three environments. In order of precedence,
+ // the implicit environments are:
+ // - GCLOUD_PROJECT or GOOGLE_CLOUD_PROJECT environment variable
+ // - GOOGLE_APPLICATION_CREDENTIALS JSON file
+ // - Cloud SDK: `gcloud config config-helper --format json`
+ // - GCE project ID from metadata server)
+ if (!this._getDefaultProjectIdPromise) {
+ this._getDefaultProjectIdPromise =
+ new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
+ try {
+ const projectId = this.getProductionProjectId() ||
+ (yield this.getFileProjectId()) ||
+ (yield this.getDefaultServiceProjectId()) ||
+ (yield this.getGCEProjectId());
+ this._cachedProjectId = projectId;
+ resolve(projectId);
+ }
+ catch (e) {
+ reject(e);
+ }
+ }));
+ }
+ return this._getDefaultProjectIdPromise;
+ }
+ getApplicationDefault(optionsOrCallback = {}, callback) {
+ let options;
+ if (typeof optionsOrCallback === 'function') {
+ callback = optionsOrCallback;
+ }
+ else {
+ options = optionsOrCallback;
+ }
+ if (callback) {
+ this.getApplicationDefaultAsync(options).then(r => callback(null, r.credential, r.projectId), callback);
+ }
+ else {
+ return this.getApplicationDefaultAsync(options);
+ }
+ }
+ getApplicationDefaultAsync(options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ // If we've already got a cached credential, just return it.
+ if (this.cachedCredential) {
+ return {
+ credential: this.cachedCredential,
+ projectId: yield this.getProjectIdAsync()
+ };
+ }
+ let credential;
+ let projectId;
+ // Check for the existence of a local environment variable pointing to the
+ // location of the credential file. This is typically used in local
+ // developer scenarios.
+ credential =
+ yield this._tryGetApplicationCredentialsFromEnvironmentVariable(options);
+ if (credential) {
+ if (credential instanceof jwtclient_1.JWT) {
+ credential.scopes = this.scopes;
+ }
+ this.cachedCredential = credential;
+ projectId = yield this.getProjectId();
+ return { credential, projectId };
+ }
+ // Look in the well-known credential file location.
+ credential =
+ yield this._tryGetApplicationCredentialsFromWellKnownFile(options);
+ if (credential) {
+ if (credential instanceof jwtclient_1.JWT) {
+ credential.scopes = this.scopes;
+ }
+ this.cachedCredential = credential;
+ projectId = yield this.getProjectId();
+ return { credential, projectId };
+ }
+ // Determine if we're running on GCE.
+ let isGCE;
+ try {
+ isGCE = yield this._checkIsGCE();
+ }
+ catch (e) {
+ throw new Error('Unexpected error determining execution environment: ' + e.message);
+ }
+ if (!isGCE) {
+ // We failed to find the default credentials. Bail out with an error.
+ throw new Error('Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.');
+ }
+ // For GCE, just return a default ComputeClient. It will take care of
+ // the rest.
+ this.cachedCredential = new computeclient_1.Compute(options);
+ projectId = yield this.getProjectId();
+ return { projectId, credential: this.cachedCredential };
+ });
+ }
+ /**
+ * Determines whether the auth layer is running on Google Compute Engine.
+ * @returns A promise that resolves with the boolean.
+ * @api private
+ */
+ _checkIsGCE() {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (this.checkIsGCE === undefined) {
+ this.checkIsGCE = yield gcpMetadata.isAvailable();
+ }
+ return this.checkIsGCE;
+ });
+ }
+ /**
+ * Attempts to load default credentials from the environment variable path..
+ * @returns Promise that resolves with the OAuth2Client or null.
+ * @api private
+ */
+ _tryGetApplicationCredentialsFromEnvironmentVariable(options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const credentialsPath = process.env['GOOGLE_APPLICATION_CREDENTIALS'];
+ if (!credentialsPath || credentialsPath.length === 0) {
+ return null;
+ }
+ try {
+ return this._getApplicationCredentialsFromFilePath(credentialsPath, options);
+ }
+ catch (e) {
+ throw this.createError('Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable.', e);
+ }
+ });
+ }
+ /**
+ * Attempts to load default credentials from a well-known file location
+ * @return Promise that resolves with the OAuth2Client or null.
+ * @api private
+ */
+ _tryGetApplicationCredentialsFromWellKnownFile(options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ // First, figure out the location of the file, depending upon the OS type.
+ let location = null;
+ if (this._isWindows()) {
+ // Windows
+ location = process.env['APPDATA'];
+ }
+ else {
+ // Linux or Mac
+ const home = process.env['HOME'];
+ if (home) {
+ location = this._pathJoin(home, '.config');
+ }
+ }
+ // If we found the root path, expand it.
+ if (location) {
+ location = this._pathJoin(location, 'gcloud');
+ location =
+ this._pathJoin(location, 'application_default_credentials.json');
+ location = this._mockWellKnownFilePath(location);
+ // Check whether the file exists.
+ if (!this._fileExists(location)) {
+ location = null;
+ }
+ }
+ // The file does not exist.
+ if (!location) {
+ return null;
+ }
+ // The file seems to exist. Try to use it.
+ const client = yield this._getApplicationCredentialsFromFilePath(location, options);
+ this.warnOnProblematicCredentials(client);
+ return client;
+ });
+ }
+ /**
+ * Attempts to load default credentials from a file at the given path..
+ * @param filePath The path to the file to read.
+ * @returns Promise that resolves with the OAuth2Client
+ * @api private
+ */
+ _getApplicationCredentialsFromFilePath(filePath, options = {}) {
+ return __awaiter(this, void 0, void 0, function* () {
+ // Make sure the path looks like a string.
+ if (!filePath || filePath.length === 0) {
+ throw new Error('The file path is invalid.');
+ }
+ // Make sure there is a file at the path. lstatSync will throw if there is
+ // nothing there.
+ try {
+ // Resolve path to actual file in case of symlink. Expect a thrown error
+ // if not resolvable.
+ filePath = fs.realpathSync(filePath);
+ if (!fs.lstatSync(filePath).isFile()) {
+ throw new Error();
+ }
+ }
+ catch (err) {
+ throw this.createError(util.format('The file at %s does not exist, or it is not a file.', filePath), err);
+ }
+ // Now open a read stream on the file, and parse it.
+ try {
+ const readStream = this._createReadStream(filePath);
+ return this.fromStream(readStream, options);
+ }
+ catch (err) {
+ throw this.createError(util.format('Unable to read the file at %s.', filePath), err);
+ }
+ });
+ }
+ /**
+ * Credentials from the Cloud SDK that are associated with Cloud SDK's project
+ * are problematic because they may not have APIs enabled and have limited
+ * quota. If this is the case, warn about it.
+ */
+ warnOnProblematicCredentials(client) {
+ if (client.email === exports.CLOUD_SDK_CLIENT_ID) {
+ messages.warn(messages.PROBLEMATIC_CREDENTIALS_WARNING);
+ }
+ }
+ /**
+ * Create a credentials instance using the given input options.
+ * @param json The input object.
+ * @returns JWT or UserRefresh Client with data
+ */
+ fromJSON(json, options) {
+ let client;
+ if (!json) {
+ throw new Error('Must pass in a JSON object containing the Google auth settings.');
+ }
+ this.jsonContent = json;
+ options = options || {};
+ if (json.type === 'authorized_user') {
+ client = new refreshclient_1.UserRefreshClient(options);
+ }
+ else {
+ options.scopes = this.scopes;
+ client = new jwtclient_1.JWT(options);
+ }
+ client.fromJSON(json);
+ return client;
+ }
+ fromStream(inputStream, optionsOrCallback = {}, callback) {
+ let options = {};
+ if (typeof optionsOrCallback === 'function') {
+ callback = optionsOrCallback;
+ }
+ else {
+ options = optionsOrCallback;
+ }
+ if (callback) {
+ this.fromStreamAsync(inputStream, options)
+ .then(r => callback(null, r), callback);
+ }
+ else {
+ return this.fromStreamAsync(inputStream, options);
+ }
+ }
+ fromStreamAsync(inputStream, options) {
+ return new Promise((resolve, reject) => {
+ if (!inputStream) {
+ throw new Error('Must pass in a stream containing the Google auth settings.');
+ }
+ let s = '';
+ inputStream.setEncoding('utf8')
+ .on('error', reject)
+ .on('data', (chunk) => s += chunk)
+ .on('end', () => {
+ try {
+ const data = JSON.parse(s);
+ const r = this.fromJSON(data, options);
+ return resolve(r);
+ }
+ catch (err) {
+ return reject(err);
+ }
+ });
+ });
+ }
+ /**
+ * Create a credentials instance using the given API key string.
+ * @param apiKey The API key string
+ * @param options An optional options object.
+ * @returns A JWT loaded from the key
+ */
+ fromAPIKey(apiKey, options) {
+ options = options || {};
+ const client = new jwtclient_1.JWT(options);
+ client.fromAPIKey(apiKey);
+ return client;
+ }
+ /**
+ * Determines whether the current operating system is Windows.
+ * @api private
+ */
+ _isWindows() {
+ const sys = this._osPlatform();
+ if (sys && sys.length >= 3) {
+ if (sys.substring(0, 3).toLowerCase() === 'win') {
+ return true;
+ }
+ }
+ return false;
+ }
+ /**
+ * Creates a file stream. Allows mocking.
+ * @api private
+ */
+ _createReadStream(filePath) {
+ return fs.createReadStream(filePath);
+ }
+ /**
+ * Gets the current operating system platform. Allows mocking.
+ * @api private
+ */
+ _osPlatform() {
+ return os.platform();
+ }
+ /**
+ * Determines whether a file exists. Allows mocking.
+ * @api private
+ */
+ _fileExists(filePath) {
+ return fs.existsSync(filePath);
+ }
+ /**
+ * Joins two parts of a path. Allows mocking.
+ * @api private
+ */
+ _pathJoin(item1, item2) {
+ return path.join(item1, item2);
+ }
+ /**
+ * Allows mocking of the path to a well-known file.
+ * @api private
+ */
+ _mockWellKnownFilePath(filePath) {
+ return filePath;
+ }
+ // Creates an Error containing the given message, and includes the message
+ // from the optional err passed in.
+ createError(message, err) {
+ let s = message || '';
+ if (err) {
+ const errorMessage = String(err);
+ if (errorMessage && errorMessage.length > 0) {
+ if (s.length > 0) {
+ s += ' ';
+ }
+ s += errorMessage;
+ }
+ }
+ return Error(s);
+ }
+ /**
+ * Run the Google Cloud SDK command that prints the default project ID
+ */
+ getDefaultServiceProjectId() {
+ return __awaiter(this, void 0, void 0, function* () {
+ return new Promise(resolve => {
+ child_process_1.exec('gcloud config config-helper --format json', (err, stdout, stderr) => {
+ if (!err && stdout) {
+ try {
+ const projectId = JSON.parse(stdout).configuration.properties.core.project;
+ resolve(projectId);
+ return;
+ }
+ catch (e) {
+ // ignore errors
+ }
+ }
+ resolve(null);
+ });
+ });
+ });
+ }
+ /**
+ * Loads the project id from environment variables.
+ * @api private
+ */
+ getProductionProjectId() {
+ return process.env['GCLOUD_PROJECT'] || process.env['GOOGLE_CLOUD_PROJECT'];
+ }
+ /**
+ * Loads the project id from the GOOGLE_APPLICATION_CREDENTIALS json file.
+ * @api private
+ */
+ getFileProjectId() {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (this.cachedCredential) {
+ // Try to read the project ID from the cached credentials file
+ return this.cachedCredential.projectId;
+ }
+ // Try to load a credentials file and read its project ID
+ const r = yield this._tryGetApplicationCredentialsFromEnvironmentVariable();
+ if (r) {
+ return r.projectId;
+ }
+ else {
+ return null;
+ }
+ });
+ }
+ /**
+ * Gets the Compute Engine project ID if it can be inferred.
+ */
+ getGCEProjectId() {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const r = yield gcpMetadata.project('project-id');
+ return r.data;
+ }
+ catch (e) {
+ // Ignore any errors
+ return null;
+ }
+ });
+ }
+ getCredentials(callback) {
+ if (callback) {
+ this.getCredentialsAsync().then(r => callback(null, r), callback);
+ }
+ else {
+ return this.getCredentialsAsync();
+ }
+ }
+ getCredentialsAsync() {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (this.jsonContent) {
+ const credential = {
+ client_email: this.jsonContent.client_email,
+ private_key: this.jsonContent.private_key
+ };
+ return credential;
+ }
+ const isGCE = yield this._checkIsGCE();
+ if (!isGCE) {
+ throw new Error('Unknown error.');
+ }
+ // For GCE, return the service account details from the metadata server
+ // NOTE: The trailing '/' at the end of service-accounts/ is very important!
+ // The GCF metadata server doesn't respect querystring params if this / is
+ // not included.
+ const { data } = yield gcpMetadata.instance({ property: 'service-accounts/', params: { recursive: true } });
+ if (!data || !data.default || !data.default.email) {
+ throw new Error('Failure from metadata server.');
+ }
+ return { client_email: data.default.email };
+ });
+ }
+ /**
+ * Automatically obtain a client based on the provided configuration. If no
+ * options were passed, use Application Default Credentials.
+ */
+ getClient(options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (options) {
+ this.keyFilename =
+ options.keyFilename || options.keyFile || this.keyFilename;
+ this.scopes = options.scopes || this.scopes;
+ this.jsonContent = options.credentials || this.jsonContent;
+ }
+ if (!this.cachedCredential) {
+ if (this.jsonContent) {
+ this.cachedCredential = yield this.fromJSON(this.jsonContent);
+ }
+ else if (this.keyFilename) {
+ const filePath = path.resolve(this.keyFilename);
+ const stream = fs.createReadStream(filePath);
+ this.cachedCredential = yield this.fromStreamAsync(stream);
+ }
+ else {
+ yield this.getApplicationDefaultAsync();
+ }
+ }
+ return this.cachedCredential;
+ });
+ }
+ /**
+ * Automatically obtain application default credentials, and return
+ * an access token for making requests.
+ */
+ getAccessToken() {
+ return __awaiter(this, void 0, void 0, function* () {
+ const client = yield this.getClient();
+ return (yield client.getAccessToken()).token;
+ });
+ }
+ /**
+ * Obtain the HTTP headers that will provide authorization for a given
+ * request.
+ */
+ getRequestHeaders(url) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const client = yield this.getClient();
+ return client.getRequestHeaders(url);
+ });
+ }
+ /**
+ * Obtain credentials for a request, then attach the appropriate headers to
+ * the request options.
+ * @param opts Axios or Request options on which to attach the headers
+ */
+ authorizeRequest(opts) {
+ return __awaiter(this, void 0, void 0, function* () {
+ opts = opts || {};
+ const url = opts.url || opts.uri;
+ const client = yield this.getClient();
+ const headers = yield client.getRequestHeaders(url);
+ opts.headers = Object.assign(opts.headers || {}, headers);
+ return opts;
+ });
+ }
+ /**
+ * Automatically obtain application default credentials, and make an
+ * HTTP request using the given options.
+ * @param opts Axios request options for the HTTP request.
+ */
+ // tslint:disable-next-line no-any
+ request(opts) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const client = yield this.getClient();
+ return client.request(opts);
+ });
+ }
+ /**
+ * Determine the compute environment in which the code is running.
+ */
+ getEnv() {
+ return envDetect_1.getEnv();
+ }
+ /**
+ * Sign the given data with the current private key, or go out
+ * to the IAM API to sign it.
+ * @param data The data to be signed.
+ */
+ sign(data) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const client = yield this.getClient();
+ if (client instanceof jwtclient_1.JWT && client.key) {
+ const sign = crypto.createSign('RSA-SHA256');
+ sign.update(data);
+ return sign.sign(client.key, 'base64');
+ }
+ const projectId = yield this.getProjectId();
+ if (!projectId) {
+ throw new Error('Cannot sign data without a project ID.');
+ }
+ const creds = yield this.getCredentials();
+ if (!creds.client_email) {
+ throw new Error('Cannot sign data without `client_email`.');
+ }
+ const id = `projects/${projectId}/serviceAccounts/${creds.client_email}`;
+ const res = yield this.request({
+ method: 'POST',
+ url: `https://iam.googleapis.com/v1/${id}:signBlob`,
+ data: { bytesToSign: Buffer.from(data).toString('base64') }
+ });
+ return res.data.signature;
+ });
+ }
+}
+/**
+ * Export DefaultTransporter as a static property of the class.
+ */
+GoogleAuth.DefaultTransporter = transporters_1.DefaultTransporter;
+exports.GoogleAuth = GoogleAuth;
+//# sourceMappingURL=googleauth.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/googleauth.js.map b/express-server/node_modules/google-auth-library/build/src/auth/googleauth.js.map
new file mode 100644
index 00000000..cf593c12
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/googleauth.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"googleauth.js","sourceRoot":"","sources":["../../../src/auth/googleauth.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;AAGH,iDAAmC;AACnC,iCAAiC;AACjC,yBAAyB;AACzB,4CAA4C;AAE5C,yBAAyB;AACzB,6BAA6B;AAE7B,6BAA6B;AAE7B,wCAAwC;AACxC,kDAAgE;AAEhE,mDAAwC;AAExC,2CAA2C;AAC3C,2CAA4C;AAE5C,mDAAkD;AA8CrC,QAAA,mBAAmB,GAC5B,0EAA0E,CAAC;AAE/E,MAAa,UAAU;IAgCrB,YAAY,IAAwB;QA7BpC;;;;WAIG;QACK,eAAU,GAAa,SAAS,CAAC;QAWzC,mDAAmD;QACnD,gBAAW,GAAkB,IAAI,CAAC;QAElC,qBAAgB,GAAuC,IAAI,CAAC;QAW1D,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC;QACpD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,IAA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AAY,EAAE,CAAC;YACzE,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAmB;gBAC/C,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,iCAAiC,EAAE,WAAW;gBACnD,IAAI,EAAE,EAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAC;aAC1D,CAAC,CAAC;YACH,OAAO,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;QAC5B,CAAC;KAAA;;AA1pBD;;GAEG;AACI,6BAAkB,GAAG,iCAAkB,CAAC;AA9BjD,gCAsrBC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/iam.d.ts b/express-server/node_modules/google-auth-library/build/src/auth/iam.d.ts
new file mode 100644
index 00000000..fbc8b555
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/iam.d.ts
@@ -0,0 +1,53 @@
+/**
+ * Copyright 2014 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+export interface RequestMetadata {
+ 'x-goog-iam-authority-selector': string;
+ 'x-goog-iam-authorization-token': string;
+}
+export declare class IAMAuth {
+ selector: string;
+ token: string;
+ /**
+ * IAM credentials.
+ *
+ * @param selector the iam authority selector
+ * @param token the token
+ * @constructor
+ */
+ constructor(selector: string, token: string);
+ /**
+ * Indicates whether the credential requires scopes to be created by calling
+ * createdScoped before use.
+ * @deprecated
+ * @return always false
+ */
+ createScopedRequired(): boolean;
+ /**
+ * Pass the selector and token to the metadataFn callback.
+ * @deprecated
+ * @param unused_uri is required of the credentials interface
+ * @param metadataFn a callback invoked with object containing request
+ * metadata.
+ */
+ getRequestMetadata(unusedUri: string | null, metadataFn: (err: Error | null, metadata?: RequestMetadata) => void): void;
+ /**
+ * Acquire the HTTP headers required to make an authenticated request.
+ */
+ getRequestHeaders(): {
+ 'x-goog-iam-authority-selector': string;
+ 'x-goog-iam-authorization-token': string;
+ };
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/iam.js b/express-server/node_modules/google-auth-library/build/src/auth/iam.js
new file mode 100644
index 00000000..808e764c
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/iam.js
@@ -0,0 +1,66 @@
+"use strict";
+/**
+ * Copyright 2014 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const messages = require("../messages");
+class IAMAuth {
+ /**
+ * IAM credentials.
+ *
+ * @param selector the iam authority selector
+ * @param token the token
+ * @constructor
+ */
+ constructor(selector, token) {
+ this.selector = selector;
+ this.token = token;
+ this.selector = selector;
+ this.token = token;
+ }
+ /**
+ * Indicates whether the credential requires scopes to be created by calling
+ * createdScoped before use.
+ * @deprecated
+ * @return always false
+ */
+ createScopedRequired() {
+ // IAM authorization does not use scopes.
+ messages.warn(messages.IAM_CREATE_SCOPED_DEPRECATED);
+ return false;
+ }
+ /**
+ * Pass the selector and token to the metadataFn callback.
+ * @deprecated
+ * @param unused_uri is required of the credentials interface
+ * @param metadataFn a callback invoked with object containing request
+ * metadata.
+ */
+ getRequestMetadata(unusedUri, metadataFn) {
+ messages.warn(messages.IAM_GET_REQUEST_METADATA_DEPRECATED);
+ metadataFn(null, this.getRequestHeaders());
+ }
+ /**
+ * Acquire the HTTP headers required to make an authenticated request.
+ */
+ getRequestHeaders() {
+ return {
+ 'x-goog-iam-authority-selector': this.selector,
+ 'x-goog-iam-authorization-token': this.token
+ };
+ }
+}
+exports.IAMAuth = IAMAuth;
+//# sourceMappingURL=iam.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/iam.js.map b/express-server/node_modules/google-auth-library/build/src/auth/iam.js.map
new file mode 100644
index 00000000..9066080b
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/iam.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"iam.js","sourceRoot":"","sources":["../../../src/auth/iam.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,wCAAwC;AAOxC,MAAa,OAAO;IAClB;;;;;;OAMG;IACH,YAAmB,QAAgB,EAAS,KAAa;QAAtC,aAAQ,GAAR,QAAQ,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAQ;QACvD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;;;;OAKG;IACH,oBAAoB;QAClB,yCAAyC;QACzC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,4BAA4B,CAAC,CAAC;QACrD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;;OAMG;IACH,kBAAkB,CACd,SAAsB,EACtB,UAAiE;QACnE,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,mCAAmC,CAAC,CAAC;QAC5D,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,OAAO;YACL,+BAA+B,EAAE,IAAI,CAAC,QAAQ;YAC9C,gCAAgC,EAAE,IAAI,CAAC,KAAK;SAC7C,CAAC;IACJ,CAAC;CACF;AAhDD,0BAgDC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/jwtaccess.d.ts b/express-server/node_modules/google-auth-library/build/src/auth/jwtaccess.d.ts
new file mode 100644
index 00000000..e5bf1474
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/jwtaccess.d.ts
@@ -0,0 +1,79 @@
+/**
+ * Copyright 2015 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///
+import * as stream from 'stream';
+import { JWTInput } from './credentials';
+import { Headers, RequestMetadataResponse } from './oauth2client';
+export declare type Claims = {
+ [index: string]: string;
+};
+export declare class JWTAccess {
+ email?: string | null;
+ key?: string | null;
+ keyId?: string | null;
+ projectId?: string;
+ private cache;
+ /**
+ * JWTAccess service account credentials.
+ *
+ * Create a new access token by using the credential to create a new JWT token
+ * that's recognized as the access token.
+ *
+ * @param email the service account email address.
+ * @param key the private key that will be used to sign the token.
+ * @param keyId the ID of the private key used to sign the token.
+ */
+ constructor(email?: string | null, key?: string | null, keyId?: string | null);
+ /**
+ * Indicates whether the credential requires scopes to be created by calling
+ * createdScoped before use.
+ * @deprecated
+ * @return always false
+ */
+ createScopedRequired(): boolean;
+ /**
+ * Get a non-expired access token, after refreshing if necessary.
+ *
+ * @param authURI The URI being authorized.
+ * @param additionalClaims An object with a set of additional claims to
+ * include in the payload.
+ * @deprecated Please use `getRequestHeaders` instead.
+ * @returns An object that includes the authorization header.
+ */
+ getRequestMetadata(url: string, additionalClaims?: Claims): RequestMetadataResponse;
+ /**
+ * Get a non-expired access token, after refreshing if necessary.
+ *
+ * @param url The URI being authorized.
+ * @param additionalClaims An object with a set of additional claims to
+ * include in the payload.
+ * @returns An object that includes the authorization header.
+ */
+ getRequestHeaders(url: string, additionalClaims?: Claims): Headers;
+ /**
+ * Create a JWTAccess credentials instance using the given input options.
+ * @param json The input object.
+ */
+ fromJSON(json: JWTInput): void;
+ /**
+ * Create a JWTAccess credentials instance using the given input stream.
+ * @param inputStream The input stream.
+ * @param callback Optional callback.
+ */
+ fromStream(inputStream: stream.Readable): Promise;
+ fromStream(inputStream: stream.Readable, callback: (err?: Error) => void): void;
+ private fromStreamAsync;
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/jwtaccess.js b/express-server/node_modules/google-auth-library/build/src/auth/jwtaccess.js
new file mode 100644
index 00000000..107fc7d5
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/jwtaccess.js
@@ -0,0 +1,153 @@
+"use strict";
+/**
+ * Copyright 2015 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const jws = require("jws");
+const LRU = require("lru-cache");
+const messages = require("../messages");
+const DEFAULT_HEADER = {
+ alg: 'RS256',
+ typ: 'JWT'
+};
+class JWTAccess {
+ /**
+ * JWTAccess service account credentials.
+ *
+ * Create a new access token by using the credential to create a new JWT token
+ * that's recognized as the access token.
+ *
+ * @param email the service account email address.
+ * @param key the private key that will be used to sign the token.
+ * @param keyId the ID of the private key used to sign the token.
+ */
+ constructor(email, key, keyId) {
+ this.cache = LRU({ max: 500, maxAge: 60 * 60 * 1000 });
+ this.email = email;
+ this.key = key;
+ this.keyId = keyId;
+ }
+ /**
+ * Indicates whether the credential requires scopes to be created by calling
+ * createdScoped before use.
+ * @deprecated
+ * @return always false
+ */
+ createScopedRequired() {
+ // JWT Header authentication does not use scopes.
+ messages.warn(messages.JWT_ACCESS_CREATE_SCOPED_DEPRECATED);
+ return false;
+ }
+ /**
+ * Get a non-expired access token, after refreshing if necessary.
+ *
+ * @param authURI The URI being authorized.
+ * @param additionalClaims An object with a set of additional claims to
+ * include in the payload.
+ * @deprecated Please use `getRequestHeaders` instead.
+ * @returns An object that includes the authorization header.
+ */
+ getRequestMetadata(url, additionalClaims) {
+ messages.warn(messages.JWT_ACCESS_GET_REQUEST_METADATA_DEPRECATED);
+ return { headers: this.getRequestHeaders(url, additionalClaims) };
+ }
+ /**
+ * Get a non-expired access token, after refreshing if necessary.
+ *
+ * @param url The URI being authorized.
+ * @param additionalClaims An object with a set of additional claims to
+ * include in the payload.
+ * @returns An object that includes the authorization header.
+ */
+ getRequestHeaders(url, additionalClaims) {
+ const cachedToken = this.cache.get(url);
+ if (cachedToken) {
+ return cachedToken;
+ }
+ const iat = Math.floor(new Date().getTime() / 1000);
+ const exp = iat + 3600; // 3600 seconds = 1 hour
+ // The payload used for signed JWT headers has:
+ // iss == sub ==
+ // aud ==
+ const defaultClaims = { iss: this.email, sub: this.email, aud: url, exp, iat };
+ // if additionalClaims are provided, ensure they do not collide with
+ // other required claims.
+ if (additionalClaims) {
+ for (const claim in defaultClaims) {
+ if (additionalClaims[claim]) {
+ throw new Error(`The '${claim}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`);
+ }
+ }
+ }
+ const header = this.keyId ? Object.assign({}, DEFAULT_HEADER, { kid: this.keyId }) : DEFAULT_HEADER;
+ const payload = Object.assign(defaultClaims, additionalClaims);
+ // Sign the jwt and add it to the cache
+ const signedJWT = jws.sign({ header, payload, secret: this.key });
+ const headers = { Authorization: `Bearer ${signedJWT}` };
+ this.cache.set(url, headers);
+ return headers;
+ }
+ /**
+ * Create a JWTAccess credentials instance using the given input options.
+ * @param json The input object.
+ */
+ fromJSON(json) {
+ if (!json) {
+ throw new Error('Must pass in a JSON object containing the service account auth settings.');
+ }
+ if (!json.client_email) {
+ throw new Error('The incoming JSON object does not contain a client_email field');
+ }
+ if (!json.private_key) {
+ throw new Error('The incoming JSON object does not contain a private_key field');
+ }
+ // Extract the relevant information from the json key file.
+ this.email = json.client_email;
+ this.key = json.private_key;
+ this.keyId = json.private_key_id;
+ this.projectId = json.project_id;
+ }
+ fromStream(inputStream, callback) {
+ if (callback) {
+ this.fromStreamAsync(inputStream).then(r => callback(), callback);
+ }
+ else {
+ return this.fromStreamAsync(inputStream);
+ }
+ }
+ fromStreamAsync(inputStream) {
+ return new Promise((resolve, reject) => {
+ if (!inputStream) {
+ reject(new Error('Must pass in a stream containing the service account auth settings.'));
+ }
+ let s = '';
+ inputStream.setEncoding('utf8')
+ .on('data', (chunk) => s += chunk)
+ .on('error', reject)
+ .on('end', () => {
+ try {
+ const data = JSON.parse(s);
+ this.fromJSON(data);
+ resolve();
+ }
+ catch (err) {
+ reject(err);
+ }
+ });
+ });
+ }
+}
+exports.JWTAccess = JWTAccess;
+//# sourceMappingURL=jwtaccess.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/jwtaccess.js.map b/express-server/node_modules/google-auth-library/build/src/auth/jwtaccess.js.map
new file mode 100644
index 00000000..7a1761fc
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/jwtaccess.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"jwtaccess.js","sourceRoot":"","sources":["../../../src/auth/jwtaccess.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,2BAA2B;AAC3B,iCAAiC;AAGjC,wCAAwC;AAKxC,MAAM,cAAc,GAAe;IACjC,GAAG,EAAE,OAAO;IACZ,GAAG,EAAE,KAAK;CACX,CAAC;AAMF,MAAa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,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;IACnC,CAAC;IAUD,UAAU,CAAC,WAA4B,EAAE,QAAgC;QAEvE,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC;SACnE;aAAM;YACL,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;SAC1C;IACH,CAAC;IAEO,eAAe,CAAC,WAA4B;QAClD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC,WAAW,EAAE;gBAChB,MAAM,CAAC,IAAI,KAAK,CACZ,qEAAqE,CAAC,CAAC,CAAC;aAC7E;YACD,IAAI,CAAC,GAAG,EAAE,CAAC;YACX,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC;iBAC1B,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC;iBACjC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;iBACnB,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACd,IAAI;oBACF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBACpB,OAAO,EAAE,CAAC;iBACX;gBAAC,OAAO,GAAG,EAAE;oBACZ,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;YACH,CAAC,CAAC,CAAC;QACT,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA7JD,8BA6JC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/jwtclient.d.ts b/express-server/node_modules/google-auth-library/build/src/auth/jwtclient.d.ts
new file mode 100644
index 00000000..84084c5c
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/jwtclient.d.ts
@@ -0,0 +1,119 @@
+/**
+ * Copyright 2013 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///
+import { GoogleToken } from 'gtoken';
+import * as stream from 'stream';
+import { CredentialBody, Credentials, JWTInput } from './credentials';
+import { GetTokenResponse, OAuth2Client, RefreshOptions, RequestMetadataResponse } from './oauth2client';
+export interface JWTOptions extends RefreshOptions {
+ email?: string;
+ keyFile?: string;
+ key?: string;
+ keyId?: string;
+ scopes?: string | string[];
+ subject?: string;
+ additionalClaims?: {};
+}
+export declare class JWT extends OAuth2Client {
+ email?: string;
+ keyFile?: string;
+ key?: string;
+ keyId?: string;
+ scopes?: string | string[];
+ scope?: string;
+ subject?: string;
+ gtoken?: GoogleToken;
+ additionalClaims?: {};
+ private access?;
+ /**
+ * JWT service account credentials.
+ *
+ * Retrieve access token using gtoken.
+ *
+ * @param email service account email address.
+ * @param keyFile path to private key file.
+ * @param key value of key
+ * @param scopes list of requested scopes or a single scope.
+ * @param subject impersonated account's email address.
+ * @param key_id the ID of the key
+ */
+ constructor(options: JWTOptions);
+ constructor(email?: string, keyFile?: string, key?: string, scopes?: string | string[], subject?: string, keyId?: string);
+ /**
+ * Creates a copy of the credential with the specified scopes.
+ * @param scopes List of requested scopes or a single scope.
+ * @return The cloned instance.
+ */
+ createScoped(scopes?: string | string[]): JWT;
+ /**
+ * Obtains the metadata to be sent with the request.
+ *
+ * @param url the URI being authorized.
+ */
+ protected getRequestMetadataAsync(url?: string | null): Promise;
+ /**
+ * Indicates whether the credential requires scopes to be created by calling
+ * createScoped before use.
+ * @deprecated
+ * @return false if createScoped does not need to be called.
+ */
+ createScopedRequired(): boolean;
+ /**
+ * Determine if there are currently scopes available.
+ */
+ private hasScopes;
+ /**
+ * Get the initial access token using gToken.
+ * @param callback Optional callback.
+ * @returns Promise that resolves with credentials
+ */
+ authorize(): Promise;
+ authorize(callback: (err: Error | null, result?: Credentials) => void): void;
+ private authorizeAsync;
+ /**
+ * Refreshes the access token.
+ * @param refreshToken ignored
+ * @private
+ */
+ protected refreshTokenNoCache(refreshToken?: string | null): Promise;
+ /**
+ * Create a gToken if it doesn't already exist.
+ */
+ private createGToken;
+ /**
+ * Create a JWT credentials instance using the given input options.
+ * @param json The input object.
+ */
+ fromJSON(json: JWTInput): void;
+ /**
+ * Create a JWT credentials instance using the given input stream.
+ * @param inputStream The input stream.
+ * @param callback Optional callback.
+ */
+ fromStream(inputStream: stream.Readable): Promise;
+ fromStream(inputStream: stream.Readable, callback: (err?: Error | null) => void): void;
+ private fromStreamAsync;
+ /**
+ * Creates a JWT credentials instance using an API Key for authentication.
+ * @param apiKey The API Key in string form.
+ */
+ fromAPIKey(apiKey: string): void;
+ /**
+ * Using the key or keyFile on the JWT client, obtain an object that contains
+ * the key and the client email.
+ */
+ getCredentials(): Promise;
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/jwtclient.js b/express-server/node_modules/google-auth-library/build/src/auth/jwtclient.js
new file mode 100644
index 00000000..40cb691c
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/jwtclient.js
@@ -0,0 +1,249 @@
+"use strict";
+/**
+ * Copyright 2013 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const gtoken_1 = require("gtoken");
+const messages = require("../messages");
+const jwtaccess_1 = require("./jwtaccess");
+const oauth2client_1 = require("./oauth2client");
+const isString = require('lodash.isstring');
+class JWT extends oauth2client_1.OAuth2Client {
+ constructor(optionsOrEmail, keyFile, key, scopes, subject, keyId) {
+ const opts = (optionsOrEmail && typeof optionsOrEmail === 'object') ?
+ optionsOrEmail :
+ { email: optionsOrEmail, keyFile, key, keyId, scopes, subject };
+ super({ eagerRefreshThresholdMillis: opts.eagerRefreshThresholdMillis });
+ this.email = opts.email;
+ this.keyFile = opts.keyFile;
+ this.key = opts.key;
+ this.keyId = opts.keyId;
+ this.scopes = opts.scopes;
+ this.subject = opts.subject;
+ this.additionalClaims = opts.additionalClaims;
+ this.credentials = { refresh_token: 'jwt-placeholder', expiry_date: 1 };
+ }
+ /**
+ * Creates a copy of the credential with the specified scopes.
+ * @param scopes List of requested scopes or a single scope.
+ * @return The cloned instance.
+ */
+ createScoped(scopes) {
+ return new JWT({
+ email: this.email,
+ keyFile: this.keyFile,
+ key: this.key,
+ keyId: this.keyId,
+ scopes,
+ subject: this.subject,
+ additionalClaims: this.additionalClaims
+ });
+ }
+ /**
+ * Obtains the metadata to be sent with the request.
+ *
+ * @param url the URI being authorized.
+ */
+ getRequestMetadataAsync(url) {
+ const _super = name => super[name];
+ return __awaiter(this, void 0, void 0, function* () {
+ if (!this.apiKey && !this.hasScopes() && url) {
+ if (this.additionalClaims && this.additionalClaims.target_audience) {
+ const { tokens } = yield this.refreshToken();
+ return { headers: { Authorization: `Bearer ${tokens.id_token}` } };
+ }
+ else {
+ // no scopes have been set, but a uri has been provided. Use JWTAccess
+ // credentials.
+ if (!this.access) {
+ this.access = new jwtaccess_1.JWTAccess(this.email, this.key, this.keyId);
+ }
+ const headers = yield this.access.getRequestHeaders(url, this.additionalClaims);
+ return { headers };
+ }
+ }
+ else {
+ return _super("getRequestMetadataAsync").call(this, url);
+ }
+ });
+ }
+ /**
+ * Indicates whether the credential requires scopes to be created by calling
+ * createScoped before use.
+ * @deprecated
+ * @return false if createScoped does not need to be called.
+ */
+ createScopedRequired() {
+ messages.warn(messages.JWT_CREATE_SCOPED_DEPRECATED);
+ return !this.hasScopes();
+ }
+ /**
+ * Determine if there are currently scopes available.
+ */
+ hasScopes() {
+ if (!this.scopes) {
+ return false;
+ }
+ // For arrays, check the array length.
+ if (this.scopes instanceof Array) {
+ return this.scopes.length > 0;
+ }
+ // For others, convert to a string and check the length.
+ return String(this.scopes).length > 0;
+ }
+ authorize(callback) {
+ if (callback) {
+ this.authorizeAsync().then(r => callback(null, r), callback);
+ }
+ else {
+ return this.authorizeAsync();
+ }
+ }
+ authorizeAsync() {
+ return __awaiter(this, void 0, void 0, function* () {
+ const result = yield this.refreshToken();
+ if (!result) {
+ throw new Error('No result returned');
+ }
+ this.credentials = result.tokens;
+ this.credentials.refresh_token = 'jwt-placeholder';
+ this.key = this.gtoken.key;
+ this.email = this.gtoken.iss;
+ return result.tokens;
+ });
+ }
+ /**
+ * Refreshes the access token.
+ * @param refreshToken ignored
+ * @private
+ */
+ refreshTokenNoCache(refreshToken) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const gtoken = this.createGToken();
+ const token = yield gtoken.getToken();
+ const tokens = {
+ access_token: token,
+ token_type: 'Bearer',
+ expiry_date: gtoken.expiresAt,
+ // tslint:disable-next-line no-any
+ id_token: gtoken.rawToken.id_token
+ };
+ this.emit('tokens', tokens);
+ return { res: null, tokens };
+ });
+ }
+ /**
+ * Create a gToken if it doesn't already exist.
+ */
+ createGToken() {
+ if (!this.gtoken) {
+ this.gtoken = new gtoken_1.GoogleToken({
+ iss: this.email,
+ sub: this.subject,
+ scope: this.scopes,
+ keyFile: this.keyFile,
+ key: this.key,
+ additionalClaims: this.additionalClaims
+ });
+ }
+ return this.gtoken;
+ }
+ /**
+ * Create a JWT credentials instance using the given input options.
+ * @param json The input object.
+ */
+ fromJSON(json) {
+ if (!json) {
+ throw new Error('Must pass in a JSON object containing the service account auth settings.');
+ }
+ if (!json.client_email) {
+ throw new Error('The incoming JSON object does not contain a client_email field');
+ }
+ if (!json.private_key) {
+ throw new Error('The incoming JSON object does not contain a private_key field');
+ }
+ // Extract the relevant information from the json key file.
+ this.email = json.client_email;
+ this.key = json.private_key;
+ this.keyId = json.private_key_id;
+ this.projectId = json.project_id;
+ }
+ fromStream(inputStream, callback) {
+ if (callback) {
+ this.fromStreamAsync(inputStream).then(r => callback(), callback);
+ }
+ else {
+ return this.fromStreamAsync(inputStream);
+ }
+ }
+ fromStreamAsync(inputStream) {
+ return new Promise((resolve, reject) => {
+ if (!inputStream) {
+ throw new Error('Must pass in a stream containing the service account auth settings.');
+ }
+ let s = '';
+ inputStream.setEncoding('utf8')
+ .on('error', reject)
+ .on('data', (chunk) => s += chunk)
+ .on('end', () => {
+ try {
+ const data = JSON.parse(s);
+ this.fromJSON(data);
+ resolve();
+ }
+ catch (e) {
+ reject(e);
+ }
+ });
+ });
+ }
+ /**
+ * Creates a JWT credentials instance using an API Key for authentication.
+ * @param apiKey The API Key in string form.
+ */
+ fromAPIKey(apiKey) {
+ if (!isString(apiKey)) {
+ throw new Error('Must provide an API Key string.');
+ }
+ this.apiKey = apiKey;
+ }
+ /**
+ * Using the key or keyFile on the JWT client, obtain an object that contains
+ * the key and the client email.
+ */
+ getCredentials() {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (this.key) {
+ return { private_key: this.key, client_email: this.email };
+ }
+ else if (this.keyFile) {
+ const gtoken = this.createGToken();
+ const creds = yield gtoken.getCredentials(this.keyFile);
+ return { private_key: creds.privateKey, client_email: creds.clientEmail };
+ }
+ throw new Error('A key or a keyFile must be provided to getCredentials.');
+ });
+ }
+}
+exports.JWT = JWT;
+//# sourceMappingURL=jwtclient.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/jwtclient.js.map b/express-server/node_modules/google-auth-library/build/src/auth/jwtclient.js.map
new file mode 100644
index 00000000..229d0f3e
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/jwtclient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"jwtclient.js","sourceRoot":"","sources":["../../../src/auth/jwtclient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;AAEH,mCAAmC;AAGnC,wCAAwC;AAGxC,2CAAsC;AACtC,iDAAuG;AAEvG,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAY5C,MAAa,GAAI,SAAQ,2BAAY;IA6BnC,YACI,cAAkC,EAAE,OAAgB,EAAE,GAAY,EAClE,MAAwB,EAAE,OAAgB,EAAE,KAAc;QAC5D,MAAM,IAAI,GAAG,CAAC,cAAc,IAAI,OAAO,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC;YACjE,cAAc,CAAC,CAAC;YAChB,EAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAC,CAAC;QAClE,KAAK,CAAC,EAAC,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,EAAC,CAAC,CAAC;QACvE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,I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AAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBACpB,OAAO,EAAE,CAAC;iBACX;gBAAC,OAAO,CAAC,EAAE;oBACV,MAAM,CAAC,CAAC,CAAC,CAAC;iBACX;YACH,CAAC,CAAC,CAAC;QACT,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,MAAc;QACvB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACG,cAAc;;YAClB,IAAI,IAAI,CAAC,GAAG,EAAE;gBACZ,OAAO,EAAC,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,KAAK,EAAC,CAAC;aAC1D;iBAAM,IAAI,IAAI,CAAC,OAAO,EAAE;gBACvB,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;gBACnC,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACxD,OAAO,EAAC,WAAW,EAAE,KAAK,CAAC,UAAU,EAAE,YAAY,EAAE,KAAK,CAAC,WAAW,EAAC,CAAC;aACzE;YACD,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC5E,CAAC;KAAA;CACF;AA/QD,kBA+QC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/loginticket.d.ts b/express-server/node_modules/google-auth-library/build/src/auth/loginticket.d.ts
new file mode 100644
index 00000000..8eb9f1b2
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/loginticket.d.ts
@@ -0,0 +1,150 @@
+/**
+ * Copyright 2014 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+export declare class LoginTicket {
+ private envelope?;
+ private payload?;
+ /**
+ * Create a simple class to extract user ID from an ID Token
+ *
+ * @param {string} env Envelope of the jwt
+ * @param {TokenPayload} pay Payload of the jwt
+ * @constructor
+ */
+ constructor(env?: string, pay?: TokenPayload);
+ getEnvelope(): string | undefined;
+ getPayload(): TokenPayload | undefined;
+ /**
+ * Create a simple class to extract user ID from an ID Token
+ *
+ * @return The user ID
+ */
+ getUserId(): string | null;
+ /**
+ * Returns attributes from the login ticket. This can contain
+ * various information about the user session.
+ *
+ * @return The envelope and payload
+ */
+ getAttributes(): {
+ envelope: string | undefined;
+ payload: TokenPayload | undefined;
+ };
+}
+export interface TokenPayload {
+ /**
+ * The Issuer Identifier for the Issuer of the response. Always
+ * https://accounts.google.com or accounts.google.com for Google ID tokens.
+ */
+ iss: string;
+ /**
+ * Access token hash. Provides validation that the access token is tied to the
+ * identity token. If the ID token is issued with an access token in the
+ * server flow, this is always included. This can be used as an alternate
+ * mechanism to protect against cross-site request forgery attacks, but if you
+ * follow Step 1 and Step 3 it is not necessary to verify the access token.
+ */
+ at_hash?: string;
+ /**
+ * True if the user's e-mail address has been verified; otherwise false.
+ */
+ email_verified?: boolean;
+ /**
+ * An identifier for the user, unique among all Google accounts and never
+ * reused. A Google account can have multiple emails at different points in
+ * time, but the sub value is never changed. Use sub within your application
+ * as the unique-identifier key for the user.
+ */
+ sub: string;
+ /**
+ * The client_id of the authorized presenter. This claim is only needed when
+ * the party requesting the ID token is not the same as the audience of the ID
+ * token. This may be the case at Google for hybrid apps where a web
+ * application and Android app have a different client_id but share the same
+ * project.
+ */
+ azp?: string;
+ /**
+ * The user's email address. This may not be unique and is not suitable for
+ * use as a primary key. Provided only if your scope included the string
+ * "email".
+ */
+ email?: string;
+ /**
+ * The URL of the user's profile page. Might be provided when:
+ * - The request scope included the string "profile"
+ * - The ID token is returned from a token refresh
+ * - When profile claims are present, you can use them to update your app's
+ * user records. Note that this claim is never guaranteed to be present.
+ */
+ profile?: string;
+ /**
+ * The URL of the user's profile picture. Might be provided when:
+ * - The request scope included the string "profile"
+ * - The ID token is returned from a token refresh
+ * - When picture claims are present, you can use them to update your app's
+ * user records. Note that this claim is never guaranteed to be present.
+ */
+ picture?: string;
+ /**
+ * The user's full name, in a displayable form. Might be provided when:
+ * - The request scope included the string "profile"
+ * - The ID token is returned from a token refresh
+ * - When name claims are present, you can use them to update your app's user
+ * records. Note that this claim is never guaranteed to be present.
+ */
+ name?: string;
+ /**
+ * The user's given name, in a displayable form. Might be provided when:
+ * - The request scope included the string "profile"
+ * - The ID token is returned from a token refresh
+ * - When name claims are present, you can use them to update your app's user
+ * records. Note that this claim is never guaranteed to be present.
+ */
+ given_name?: string;
+ /**
+ * The user's family name, in a displayable form. Might be provided when:
+ * - The request scope included the string "profile"
+ * - The ID token is returned from a token refresh
+ * - When name claims are present, you can use them to update your app's user
+ * records. Note that this claim is never guaranteed to be present.
+ */
+ family_name?: string;
+ /**
+ * Identifies the audience that this ID token is intended for. It must be one
+ * of the OAuth 2.0 client IDs of your application.
+ */
+ aud: string;
+ /**
+ * The time the ID token was issued, represented in Unix time (integer
+ * seconds).
+ */
+ iat: number;
+ /**
+ * The time the ID token expires, represented in Unix time (integer seconds).
+ */
+ exp: number;
+ /**
+ * The value of the nonce supplied by your app in the authentication request.
+ * You should enforce protection against replay attacks by ensuring it is
+ * presented only once.
+ */
+ nonce?: string;
+ /**
+ * The hosted G Suite domain of the user. Provided only if the user belongs to
+ * a hosted domain.
+ */
+ hd?: string;
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/loginticket.js b/express-server/node_modules/google-auth-library/build/src/auth/loginticket.js
new file mode 100644
index 00000000..2e9f550d
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/loginticket.js
@@ -0,0 +1,59 @@
+"use strict";
+/**
+ * Copyright 2014 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+class LoginTicket {
+ /**
+ * Create a simple class to extract user ID from an ID Token
+ *
+ * @param {string} env Envelope of the jwt
+ * @param {TokenPayload} pay Payload of the jwt
+ * @constructor
+ */
+ constructor(env, pay) {
+ this.envelope = env;
+ this.payload = pay;
+ }
+ getEnvelope() {
+ return this.envelope;
+ }
+ getPayload() {
+ return this.payload;
+ }
+ /**
+ * Create a simple class to extract user ID from an ID Token
+ *
+ * @return The user ID
+ */
+ getUserId() {
+ const payload = this.getPayload();
+ if (payload && payload.sub) {
+ return payload.sub;
+ }
+ return null;
+ }
+ /**
+ * Returns attributes from the login ticket. This can contain
+ * various information about the user session.
+ *
+ * @return The envelope and payload
+ */
+ getAttributes() {
+ return { envelope: this.getEnvelope(), payload: this.getPayload() };
+ }
+}
+exports.LoginTicket = LoginTicket;
+//# sourceMappingURL=loginticket.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/loginticket.js.map b/express-server/node_modules/google-auth-library/build/src/auth/loginticket.js.map
new file mode 100644
index 00000000..5ef20b9b
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/loginticket.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"loginticket.js","sourceRoot":"","sources":["../../../src/auth/loginticket.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,MAAa,WAAW;IAItB;;;;;;OAMG;IACH,YAAY,GAAY,EAAE,GAAkB;QAC1C,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;IACrB,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAClC,IAAI,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE;YAC1B,OAAO,OAAO,CAAC,GAAG,CAAC;SACpB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,aAAa;QACX,OAAO,EAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,EAAC,CAAC;IACpE,CAAC;CACF;AA9CD,kCA8CC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/oauth2client.d.ts b/express-server/node_modules/google-auth-library/build/src/auth/oauth2client.d.ts
new file mode 100644
index 00000000..d2e9a383
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/oauth2client.d.ts
@@ -0,0 +1,459 @@
+/**
+ * Copyright 2012 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { AxiosError, AxiosPromise, AxiosRequestConfig, AxiosResponse } from 'axios';
+import { BodyResponseCallback } from './../transporters';
+import { AuthClient } from './authclient';
+import { Credentials } from './credentials';
+import { LoginTicket } from './loginticket';
+export declare type Certificates = {
+ [index: string]: string;
+};
+export declare type Headers = {
+ [index: string]: string;
+};
+export declare enum CodeChallengeMethod {
+ Plain = "plain",
+ S256 = "S256"
+}
+export interface GetTokenOptions {
+ code: string;
+ codeVerifier?: string;
+ /**
+ * The client ID for your application. The value passed into the constructor
+ * will be used if not provided. Must match any client_id option passed to
+ * a corresponding call to generateAuthUrl.
+ */
+ client_id?: string;
+ /**
+ * Determines where the API server redirects the user after the user
+ * completes the authorization flow. The value passed into the constructor
+ * will be used if not provided. Must match any redirect_uri option passed to
+ * a corresponding call to generateAuthUrl.
+ */
+ redirect_uri?: string;
+}
+export interface TokenInfo {
+ /**
+ * The application that is the intended user of the access token.
+ */
+ aud: string;
+ /**
+ * This value lets you correlate profile information from multiple Google
+ * APIs. It is only present in the response if you included the profile scope
+ * in your request in step 1. The field value is an immutable identifier for
+ * the logged-in user that can be used to create and manage user sessions in
+ * your application. The identifier is the same regardless of which client ID
+ * is used to retrieve it. This enables multiple applications in the same
+ * organization to correlate profile information.
+ */
+ user_id?: string;
+ /**
+ * An array of scopes that the user granted access to.
+ */
+ scopes: string[];
+ /**
+ * The datetime when the token becomes invalid.
+ */
+ expiry_date: number;
+ /**
+ * An identifier for the user, unique among all Google accounts and never
+ * reused. A Google account can have multiple emails at different points in
+ * time, but the sub value is never changed. Use sub within your application
+ * as the unique-identifier key for the user.
+ */
+ sub?: string;
+ /**
+ * The client_id of the authorized presenter. This claim is only needed when
+ * the party requesting the ID token is not the same as the audience of the ID
+ * token. This may be the case at Google for hybrid apps where a web
+ * application and Android app have a different client_id but share the same
+ * project.
+ */
+ azp?: string;
+ /**
+ * Indicates whether your application can refresh access tokens
+ * when the user is not present at the browser. Valid parameter values are
+ * 'online', which is the default value, and 'offline'. Set the value to
+ * 'offline' if your application needs to refresh access tokens when the user
+ * is not present at the browser. This value instructs the Google
+ * authorization server to return a refresh token and an access token the
+ * first time that your application exchanges an authorization code for
+ * tokens.
+ */
+ access_type?: string;
+}
+export interface TokenInfoRequest {
+ aud: string;
+ user_id?: string;
+ scope: string;
+ expires_in: number;
+ azp?: string;
+ sub?: string;
+ exp?: number;
+ access_type?: string;
+}
+export interface GenerateAuthUrlOpts {
+ /**
+ * Recommended. Indicates whether your application can refresh access tokens
+ * when the user is not present at the browser. Valid parameter values are
+ * 'online', which is the default value, and 'offline'. Set the value to
+ * 'offline' if your application needs to refresh access tokens when the user
+ * is not present at the browser. This value instructs the Google
+ * authorization server to return a refresh token and an access token the
+ * first time that your application exchanges an authorization code for
+ * tokens.
+ */
+ access_type?: string;
+ /**
+ * The 'response_type' will always be set to 'CODE'.
+ */
+ response_type?: string;
+ /**
+ * The client ID for your application. The value passed into the constructor
+ * will be used if not provided. You can find this value in the API Console.
+ */
+ client_id?: string;
+ /**
+ * Determines where the API server redirects the user after the user
+ * completes the authorization flow. The value must exactly match one of the
+ * 'redirect_uri' values listed for your project in the API Console. Note that
+ * the http or https scheme, case, and trailing slash ('/') must all match.
+ * The value passed into the constructor will be used if not provided.
+ */
+ redirect_uri?: string;
+ /**
+ * Required. A space-delimited list of scopes that identify the resources that
+ * your application could access on the user's behalf. These values inform the
+ * consent screen that Google displays to the user. Scopes enable your
+ * application to only request access to the resources that it needs while
+ * also enabling users to control the amount of access that they grant to your
+ * application. Thus, there is an inverse relationship between the number of
+ * scopes requested and the likelihood of obtaining user consent. The
+ * OAuth 2.0 API Scopes document provides a full list of scopes that you might
+ * use to access Google APIs. We recommend that your application request
+ * access to authorization scopes in context whenever possible. By requesting
+ * access to user data in context, via incremental authorization, you help
+ * users to more easily understand why your application needs the access it is
+ * requesting.
+ */
+ scope?: string[] | string;
+ /**
+ * Recommended. Specifies any string value that your application uses to
+ * maintain state between your authorization request and the authorization
+ * server's response. The server returns the exact value that you send as a
+ * name=value pair in the hash (#) fragment of the 'redirect_uri' after the
+ * user consents to or denies your application's access request. You can use
+ * this parameter for several purposes, such as directing the user to the
+ * correct resource in your application, sending nonces, and mitigating
+ * cross-site request forgery. Since your redirect_uri can be guessed, using a
+ * state value can increase your assurance that an incoming connection is the
+ * result of an authentication request. If you generate a random string or
+ * encode the hash of a cookie or another value that captures the client's
+ * state, you can validate the response to additionally ensure that the
+ * request and response originated in the same browser, providing protection
+ * against attacks such as cross-site request forgery. See the OpenID Connect
+ * documentation for an example of how to create and confirm a state token.
+ */
+ state?: string;
+ /**
+ * Optional. Enables applications to use incremental authorization to request
+ * access to additional scopes in context. If you set this parameter's value
+ * to true and the authorization request is granted, then the new access token
+ * will also cover any scopes to which the user previously granted the
+ * application access. See the incremental authorization section for examples.
+ */
+ include_granted_scopes?: boolean;
+ /**
+ * Optional. If your application knows which user is trying to authenticate,
+ * it can use this parameter to provide a hint to the Google Authentication
+ * Server. The server uses the hint to simplify the login flow either by
+ * prefilling the email field in the sign-in form or by selecting the
+ * appropriate multi-login session. Set the parameter value to an email
+ * address or sub identifier, which is equivalent to the user's Google ID.
+ */
+ login_hint?: string;
+ /**
+ * Optional. A space-delimited, case-sensitive list of prompts to present the
+ * user. If you don't specify this parameter, the user will be prompted only
+ * the first time your app requests access. Possible values are:
+ *
+ * 'none' - Donot display any authentication or consent screens. Must not be
+ * specified with other values.
+ * 'consent' - Prompt the user for consent.
+ * 'select_account' - Prompt the user to select an account.
+ */
+ prompt?: string;
+ /**
+ * Recommended. Specifies what method was used to encode a 'code_verifier'
+ * that will be used during authorization code exchange. This parameter must
+ * be used with the 'code_challenge' parameter. The value of the
+ * 'code_challenge_method' defaults to "plain" if not present in the request
+ * that includes a 'code_challenge'. The only supported values for this
+ * parameter are "S256" or "plain".
+ */
+ code_challenge_method?: CodeChallengeMethod;
+ /**
+ * Recommended. Specifies an encoded 'code_verifier' that will be used as a
+ * server-side challenge during authorization code exchange. This parameter
+ * must be used with the 'code_challenge' parameter described above.
+ */
+ code_challenge?: string;
+}
+export interface GetTokenCallback {
+ (err: AxiosError | null, token?: Credentials | null, res?: AxiosResponse | null): void;
+}
+export interface GetTokenResponse {
+ tokens: Credentials;
+ res: AxiosResponse | null;
+}
+export interface GetAccessTokenCallback {
+ (err: AxiosError | null, token?: string | null, res?: AxiosResponse | null): void;
+}
+export interface GetAccessTokenResponse {
+ token?: string | null;
+ res?: AxiosResponse | null;
+}
+export interface RefreshAccessTokenCallback {
+ (err: AxiosError | null, credentials?: Credentials | null, res?: AxiosResponse | null): void;
+}
+export interface RefreshAccessTokenResponse {
+ credentials: Credentials;
+ res: AxiosResponse | null;
+}
+export interface RequestMetadataResponse {
+ headers: Headers;
+ res?: AxiosResponse | null;
+}
+export interface RequestMetadataCallback {
+ (err: AxiosError | null, headers?: Headers, res?: AxiosResponse | null): void;
+}
+export interface GetFederatedSignonCertsCallback {
+ (err: AxiosError | null, certs?: Certificates, response?: AxiosResponse | null): void;
+}
+export interface FederatedSignonCertsResponse {
+ certs: Certificates;
+ res?: AxiosResponse | null;
+}
+export interface RevokeCredentialsResult {
+ success: boolean;
+}
+export interface VerifyIdTokenOptions {
+ idToken: string;
+ audience: string | string[];
+ maxExpiry?: number;
+}
+export interface OAuth2ClientOptions extends RefreshOptions {
+ clientId?: string;
+ clientSecret?: string;
+ redirectUri?: string;
+}
+export interface RefreshOptions {
+ eagerRefreshThresholdMillis?: number;
+}
+export declare class OAuth2Client extends AuthClient {
+ private redirectUri?;
+ private certificateCache?;
+ private certificateExpiry;
+ protected refreshTokenPromises: Map>;
+ _clientId?: string;
+ _clientSecret?: string;
+ apiKey?: string;
+ projectId?: string;
+ eagerRefreshThresholdMillis: number;
+ /**
+ * Handles OAuth2 flow for Google APIs.
+ *
+ * @param clientId The authentication client ID.
+ * @param clientSecret The authentication client secret.
+ * @param redirectUri The URI to redirect to after completing the auth
+ * request.
+ * @param opts optional options for overriding the given parameters.
+ * @constructor
+ */
+ constructor(options?: OAuth2ClientOptions);
+ constructor(clientId?: string, clientSecret?: string, redirectUri?: string);
+ protected static readonly GOOGLE_TOKEN_INFO_URL: string;
+ /**
+ * The base URL for auth endpoints.
+ */
+ private static readonly GOOGLE_OAUTH2_AUTH_BASE_URL_;
+ /**
+ * The base endpoint for token retrieval.
+ */
+ private static readonly GOOGLE_OAUTH2_TOKEN_URL_;
+ /**
+ * The base endpoint to revoke tokens.
+ */
+ private static readonly GOOGLE_OAUTH2_REVOKE_URL_;
+ /**
+ * Google Sign on certificates.
+ */
+ private static readonly GOOGLE_OAUTH2_FEDERATED_SIGNON_CERTS_URL_;
+ /**
+ * Clock skew - five minutes in seconds
+ */
+ private static readonly CLOCK_SKEW_SECS_;
+ /**
+ * Max Token Lifetime is one day in seconds
+ */
+ private static readonly MAX_TOKEN_LIFETIME_SECS_;
+ /**
+ * The allowed oauth token issuers.
+ */
+ private static readonly ISSUERS_;
+ /**
+ * Generates URL for consent page landing.
+ * @param opts Options.
+ * @return URL to consent page.
+ */
+ generateAuthUrl(opts?: GenerateAuthUrlOpts): string;
+ /**
+ * Convenience method to automatically generate a code_verifier, and it's
+ * resulting SHA256. If used, this must be paired with a S256
+ * code_challenge_method.
+ */
+ generateCodeVerifier(): {
+ codeVerifier: string;
+ codeChallenge: string;
+ };
+ /**
+ * Gets the access token for the given code.
+ * @param code The authorization code.
+ * @param callback Optional callback fn.
+ */
+ getToken(code: string): Promise;
+ getToken(options: GetTokenOptions): Promise;
+ getToken(code: string, callback: GetTokenCallback): void;
+ getToken(options: GetTokenOptions, callback: GetTokenCallback): void;
+ private getTokenAsync;
+ /**
+ * Refreshes the access token.
+ * @param refresh_token Existing refresh token.
+ * @private
+ */
+ protected refreshToken(refreshToken?: string | null): Promise;
+ protected refreshTokenNoCache(refreshToken?: string | null): Promise;
+ /**
+ * Retrieves the access token using refresh token
+ *
+ * @deprecated use getRequestHeaders instead.
+ * @param callback callback
+ */
+ refreshAccessToken(): Promise;
+ refreshAccessToken(callback: RefreshAccessTokenCallback): void;
+ private refreshAccessTokenAsync;
+ /**
+ * Get a non-expired access token, after refreshing if necessary
+ *
+ * @param callback Callback to call with the access token
+ */
+ getAccessToken(): Promise;
+ getAccessToken(callback: GetAccessTokenCallback): void;
+ private getAccessTokenAsync;
+ /**
+ * Obtain the set of headers required to authenticate a request.
+ *
+ * @deprecated Use getRequestHeaders instead.
+ * @param url the Uri being authorized
+ * @param callback the func described above
+ */
+ getRequestMetadata(url?: string | null): Promise;
+ getRequestMetadata(url: string | null, callback: RequestMetadataCallback): void;
+ /**
+ * The main authentication interface. It takes an optional url which when
+ * present is the endpoint being accessed, and returns a Promise which
+ * resolves with authorization header fields.
+ *
+ * In OAuth2Client, the result has the form:
+ * { Authorization: 'Bearer ' }
+ * @param url The optional url being authorized
+ */
+ getRequestHeaders(url?: string): Promise;
+ protected getRequestMetadataAsync(url?: string | null): Promise;
+ /**
+ * Revokes the access given to token.
+ * @param token The existing token to be revoked.
+ * @param callback Optional callback fn.
+ */
+ revokeToken(token: string): AxiosPromise;
+ revokeToken(token: string, callback: BodyResponseCallback): void;
+ /**
+ * Revokes access token and clears the credentials object
+ * @param callback callback
+ */
+ revokeCredentials(): AxiosPromise;
+ revokeCredentials(callback: BodyResponseCallback): void;
+ private revokeCredentialsAsync;
+ /**
+ * Provides a request implementation with OAuth 2.0 flow. If credentials have
+ * a refresh_token, in cases of HTTP 401 and 403 responses, it automatically
+ * asks for a new access token and replays the unsuccessful request.
+ * @param opts Request options.
+ * @param callback callback.
+ * @return Request object
+ */
+ request(opts: AxiosRequestConfig): AxiosPromise;
+ request(opts: AxiosRequestConfig, callback: BodyResponseCallback): void;
+ protected requestAsync(opts: AxiosRequestConfig, retry?: boolean): Promise>;
+ /**
+ * Verify id token is token by checking the certs and audience
+ * @param options that contains all options.
+ * @param callback Callback supplying GoogleLogin if successful
+ */
+ verifyIdToken(options: VerifyIdTokenOptions): Promise;
+ verifyIdToken(options: VerifyIdTokenOptions, callback: (err: Error | null, login?: LoginTicket | null) => void): void;
+ private verifyIdTokenAsync;
+ /**
+ * Obtains information about the provisioned access token. Especially useful
+ * if you want to check the scopes that were provisioned to a given token.
+ *
+ * @param accessToken Required. The Access Token for which you want to get
+ * user info.
+ */
+ getTokenInfo(accessToken: string): Promise;
+ /**
+ * Gets federated sign-on certificates to use for verifying identity tokens.
+ * Returns certs as array structure, where keys are key ids, and values
+ * are PEM encoded certificates.
+ * @param callback Callback supplying the certificates
+ */
+ getFederatedSignonCerts(): Promise;
+ getFederatedSignonCerts(callback: GetFederatedSignonCertsCallback): void;
+ getFederatedSignonCertsAsync(): Promise;
+ /**
+ * Verify the id token is signed with the correct certificate
+ * and is from the correct audience.
+ * @param jwt The jwt to verify (The ID Token in this case).
+ * @param certs The array of certs to test the jwt against.
+ * @param requiredAudience The audience to test the jwt against.
+ * @param issuers The allowed issuers of the jwt (Optional).
+ * @param maxExpiry The max expiry the certificate can be (Optional).
+ * @return Returns a LoginTicket on verification.
+ */
+ verifySignedJwtWithCerts(jwt: string, certs: Certificates, requiredAudience: string | string[], issuers?: string[], maxExpiry?: number): LoginTicket;
+ /**
+ * This is a utils method to decode a base64 string
+ * @param b64String The string to base64 decode
+ * @return The decoded string
+ */
+ decodeBase64(b64String: string): string;
+ /**
+ * Returns true if a token is expired or will expire within
+ * eagerRefreshThresholdMillismilliseconds.
+ * If there is no expiry time, assumes the token is not expired or expiring.
+ */
+ protected isTokenExpiring(): boolean;
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/oauth2client.js b/express-server/node_modules/google-auth-library/build/src/auth/oauth2client.js
new file mode 100644
index 00000000..57cbfb2d
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/oauth2client.js
@@ -0,0 +1,613 @@
+"use strict";
+/**
+ * Copyright 2012 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const crypto = require("crypto");
+const querystring = require("querystring");
+const stream = require("stream");
+const messages = require("../messages");
+const pemverifier_1 = require("./../pemverifier");
+const authclient_1 = require("./authclient");
+const loginticket_1 = require("./loginticket");
+var CodeChallengeMethod;
+(function (CodeChallengeMethod) {
+ CodeChallengeMethod["Plain"] = "plain";
+ CodeChallengeMethod["S256"] = "S256";
+})(CodeChallengeMethod = exports.CodeChallengeMethod || (exports.CodeChallengeMethod = {}));
+class OAuth2Client extends authclient_1.AuthClient {
+ constructor(optionsOrClientId, clientSecret, redirectUri) {
+ super();
+ this.certificateExpiry = null;
+ this.refreshTokenPromises = new Map();
+ const opts = (optionsOrClientId && typeof optionsOrClientId === 'object') ?
+ optionsOrClientId :
+ { clientId: optionsOrClientId, clientSecret, redirectUri };
+ this._clientId = opts.clientId;
+ this._clientSecret = opts.clientSecret;
+ this.redirectUri = opts.redirectUri;
+ this.eagerRefreshThresholdMillis =
+ opts.eagerRefreshThresholdMillis || 5 * 60 * 1000;
+ }
+ /**
+ * Generates URL for consent page landing.
+ * @param opts Options.
+ * @return URL to consent page.
+ */
+ generateAuthUrl(opts = {}) {
+ if (opts.code_challenge_method && !opts.code_challenge) {
+ throw new Error('If a code_challenge_method is provided, code_challenge must be included.');
+ }
+ opts.response_type = opts.response_type || 'code';
+ opts.client_id = opts.client_id || this._clientId;
+ opts.redirect_uri = opts.redirect_uri || this.redirectUri;
+ // Allow scopes to be passed either as array or a string
+ if (opts.scope instanceof Array) {
+ opts.scope = opts.scope.join(' ');
+ }
+ const rootUrl = OAuth2Client.GOOGLE_OAUTH2_AUTH_BASE_URL_;
+ return rootUrl + '?' + querystring.stringify(opts);
+ }
+ /**
+ * Convenience method to automatically generate a code_verifier, and it's
+ * resulting SHA256. If used, this must be paired with a S256
+ * code_challenge_method.
+ */
+ generateCodeVerifier() {
+ // base64 encoding uses 6 bits per character, and we want to generate128
+ // characters. 6*128/8 = 96.
+ const randomString = crypto.randomBytes(96).toString('base64');
+ // The valid characters in the code_verifier are [A-Z]/[a-z]/[0-9]/
+ // "-"/"."/"_"/"~". Base64 encoded strings are pretty close, so we're just
+ // swapping out a few chars.
+ const codeVerifier = randomString.replace(/\+/g, '~').replace(/=/g, '_').replace(/\//g, '-');
+ // Generate the base64 encoded SHA256
+ const unencodedCodeChallenge = crypto.createHash('sha256').update(codeVerifier).digest('base64');
+ // We need to use base64UrlEncoding instead of standard base64
+ const codeChallenge = unencodedCodeChallenge.split('=')[0]
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_');
+ return { codeVerifier, codeChallenge };
+ }
+ getToken(codeOrOptions, callback) {
+ const options = (typeof codeOrOptions === 'string') ?
+ { code: codeOrOptions } :
+ codeOrOptions;
+ if (callback) {
+ this.getTokenAsync(options).then(r => callback(null, r.tokens, r.res), e => callback(e, null, e.response));
+ }
+ else {
+ return this.getTokenAsync(options);
+ }
+ }
+ getTokenAsync(options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const url = OAuth2Client.GOOGLE_OAUTH2_TOKEN_URL_;
+ const values = {
+ code: options.code,
+ client_id: options.client_id || this._clientId,
+ client_secret: this._clientSecret,
+ redirect_uri: options.redirect_uri || this.redirectUri,
+ grant_type: 'authorization_code',
+ code_verifier: options.codeVerifier
+ };
+ const res = yield this.transporter.request({
+ method: 'POST',
+ url,
+ data: querystring.stringify(values),
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+ });
+ const tokens = res.data;
+ if (res.data && res.data.expires_in) {
+ tokens.expiry_date =
+ ((new Date()).getTime() + (res.data.expires_in * 1000));
+ delete tokens.expires_in;
+ }
+ this.emit('tokens', tokens);
+ return { tokens, res };
+ });
+ }
+ /**
+ * Refreshes the access token.
+ * @param refresh_token Existing refresh token.
+ * @private
+ */
+ refreshToken(refreshToken) {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (!refreshToken) {
+ return this.refreshTokenNoCache(refreshToken);
+ }
+ // If a request to refresh using the same token has started,
+ // return the same promise.
+ if (this.refreshTokenPromises.has(refreshToken)) {
+ return this.refreshTokenPromises.get(refreshToken);
+ }
+ const p = this.refreshTokenNoCache(refreshToken)
+ .then(r => {
+ this.refreshTokenPromises.delete(refreshToken);
+ return r;
+ }, e => {
+ this.refreshTokenPromises.delete(refreshToken);
+ throw e;
+ });
+ this.refreshTokenPromises.set(refreshToken, p);
+ return p;
+ });
+ }
+ refreshTokenNoCache(refreshToken) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const url = OAuth2Client.GOOGLE_OAUTH2_TOKEN_URL_;
+ const data = {
+ refresh_token: refreshToken,
+ client_id: this._clientId,
+ client_secret: this._clientSecret,
+ grant_type: 'refresh_token'
+ };
+ // request for new token
+ const res = yield this.transporter.request({
+ method: 'POST',
+ url,
+ data: querystring.stringify(data),
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
+ });
+ const tokens = res.data;
+ // TODO: de-duplicate this code from a few spots
+ if (res.data && res.data.expires_in) {
+ tokens.expiry_date =
+ ((new Date()).getTime() + (res.data.expires_in * 1000));
+ delete tokens.expires_in;
+ }
+ this.emit('tokens', tokens);
+ return { tokens, res };
+ });
+ }
+ refreshAccessToken(callback) {
+ messages.warn(messages.REFRESH_ACCESS_TOKEN_DEPRECATED);
+ if (callback) {
+ this.refreshAccessTokenAsync().then(r => callback(null, r.credentials, r.res), callback);
+ }
+ else {
+ return this.refreshAccessTokenAsync();
+ }
+ }
+ refreshAccessTokenAsync() {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (!this.credentials.refresh_token) {
+ throw new Error('No refresh token is set.');
+ }
+ const r = yield this.refreshToken(this.credentials.refresh_token);
+ const tokens = r.tokens;
+ tokens.refresh_token = this.credentials.refresh_token;
+ this.credentials = tokens;
+ return { credentials: this.credentials, res: r.res };
+ });
+ }
+ getAccessToken(callback) {
+ if (callback) {
+ this.getAccessTokenAsync().then(r => callback(null, r.token, r.res), callback);
+ }
+ else {
+ return this.getAccessTokenAsync();
+ }
+ }
+ getAccessTokenAsync() {
+ return __awaiter(this, void 0, void 0, function* () {
+ const shouldRefresh = !this.credentials.access_token || this.isTokenExpiring();
+ if (shouldRefresh && this.credentials.refresh_token) {
+ if (!this.credentials.refresh_token) {
+ throw new Error('No refresh token is set.');
+ }
+ const r = yield this.refreshAccessTokenAsync();
+ if (!r.credentials || (r.credentials && !r.credentials.access_token)) {
+ throw new Error('Could not refresh access token.');
+ }
+ return { token: r.credentials.access_token, res: r.res };
+ }
+ else {
+ return { token: this.credentials.access_token };
+ }
+ });
+ }
+ getRequestMetadata(url, callback) {
+ messages.warn(messages.OAUTH_GET_REQUEST_METADATA_DEPRECATED);
+ if (callback) {
+ this.getRequestMetadataAsync(url).then(r => callback(null, r.headers, r.res), callback);
+ }
+ else {
+ return this.getRequestMetadataAsync();
+ }
+ }
+ /**
+ * The main authentication interface. It takes an optional url which when
+ * present is the endpoint being accessed, and returns a Promise which
+ * resolves with authorization header fields.
+ *
+ * In OAuth2Client, the result has the form:
+ * { Authorization: 'Bearer ' }
+ * @param url The optional url being authorized
+ */
+ getRequestHeaders(url) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const res = yield this.getRequestMetadataAsync(url);
+ return res.headers;
+ });
+ }
+ getRequestMetadataAsync(url) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const thisCreds = this.credentials;
+ if (!thisCreds.access_token && !thisCreds.refresh_token && !this.apiKey) {
+ throw new Error('No access, refresh token or API key is set.');
+ }
+ if (thisCreds.access_token && !this.isTokenExpiring()) {
+ thisCreds.token_type = thisCreds.token_type || 'Bearer';
+ const headers = {
+ Authorization: thisCreds.token_type + ' ' + thisCreds.access_token
+ };
+ return { headers };
+ }
+ if (this.apiKey) {
+ return { headers: {} };
+ }
+ let r = null;
+ let tokens = null;
+ try {
+ r = yield this.refreshToken(thisCreds.refresh_token);
+ tokens = r.tokens;
+ }
+ catch (err) {
+ const e = err;
+ if (e.response &&
+ (e.response.status === 403 || e.response.status === 404)) {
+ e.message = 'Could not refresh access token.';
+ }
+ throw e;
+ }
+ const credentials = this.credentials;
+ credentials.token_type = credentials.token_type || 'Bearer';
+ tokens.refresh_token = credentials.refresh_token;
+ this.credentials = tokens;
+ const headers = {
+ Authorization: credentials.token_type + ' ' + tokens.access_token
+ };
+ return { headers, res: r.res };
+ });
+ }
+ revokeToken(token, callback) {
+ const opts = {
+ url: OAuth2Client.GOOGLE_OAUTH2_REVOKE_URL_ + '?' +
+ querystring.stringify({ token })
+ };
+ if (callback) {
+ this.transporter.request(opts).then(r => callback(null, r), callback);
+ }
+ else {
+ return this.transporter.request(opts);
+ }
+ }
+ revokeCredentials(callback) {
+ if (callback) {
+ this.revokeCredentialsAsync().then(res => callback(null, res), callback);
+ }
+ else {
+ return this.revokeCredentialsAsync();
+ }
+ }
+ revokeCredentialsAsync() {
+ return __awaiter(this, void 0, void 0, function* () {
+ const token = this.credentials.access_token;
+ this.credentials = {};
+ if (token) {
+ return this.revokeToken(token);
+ }
+ else {
+ throw new Error('No access token to revoke.');
+ }
+ });
+ }
+ request(opts, callback) {
+ if (callback) {
+ this.requestAsync(opts).then(r => callback(null, r), e => {
+ return callback(e, e.response);
+ });
+ }
+ else {
+ return this.requestAsync(opts);
+ }
+ }
+ requestAsync(opts, retry = false) {
+ return __awaiter(this, void 0, void 0, function* () {
+ let r2;
+ try {
+ const r = yield this.getRequestMetadataAsync(opts.url);
+ if (r.headers && r.headers.Authorization) {
+ opts.headers = opts.headers || {};
+ opts.headers.Authorization = r.headers.Authorization;
+ }
+ if (this.apiKey) {
+ opts.params = Object.assign(opts.params || {}, { key: this.apiKey });
+ }
+ r2 = yield this.transporter.request(opts);
+ }
+ catch (e) {
+ const res = e.response;
+ if (res) {
+ const statusCode = res.status;
+ // Retry the request for metadata if the following criteria are true:
+ // - We haven't already retried. It only makes sense to retry once.
+ // - The response was a 401 or a 403
+ // - The request didn't send a readableStream
+ // - An access_token and refresh_token were available, but no
+ // expiry_date was availabe. This can happen when developers stash
+ // the access_token and refresh_token for later use, but the
+ // access_token fails on the first try because it's expired.
+ const mayRequireRefresh = this.credentials &&
+ this.credentials.access_token && this.credentials.refresh_token &&
+ !this.credentials.expiry_date;
+ const isReadableStream = res.config.data instanceof stream.Readable;
+ const isAuthErr = statusCode === 401 || statusCode === 403;
+ if (!retry && isAuthErr && !isReadableStream && mayRequireRefresh) {
+ yield this.refreshAccessTokenAsync();
+ return this.requestAsync(opts, true);
+ }
+ }
+ throw e;
+ }
+ return r2;
+ });
+ }
+ verifyIdToken(options, callback) {
+ // This function used to accept two arguments instead of an options object.
+ // Check the types to help users upgrade with less pain.
+ // This check can be removed after a 2.0 release.
+ if (callback && typeof callback !== 'function') {
+ throw new Error('This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.');
+ }
+ if (callback) {
+ this.verifyIdTokenAsync(options).then(r => callback(null, r), callback);
+ }
+ else {
+ return this.verifyIdTokenAsync(options);
+ }
+ }
+ verifyIdTokenAsync(options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (!options.idToken) {
+ throw new Error('The verifyIdToken method requires an ID Token');
+ }
+ const response = yield this.getFederatedSignonCertsAsync();
+ const login = this.verifySignedJwtWithCerts(options.idToken, response.certs, options.audience, OAuth2Client.ISSUERS_, options.maxExpiry);
+ return login;
+ });
+ }
+ /**
+ * Obtains information about the provisioned access token. Especially useful
+ * if you want to check the scopes that were provisioned to a given token.
+ *
+ * @param accessToken Required. The Access Token for which you want to get
+ * user info.
+ */
+ getTokenInfo(accessToken) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const { data } = yield this.transporter.request({
+ method: 'GET',
+ url: OAuth2Client.GOOGLE_TOKEN_INFO_URL,
+ params: { access_token: accessToken }
+ });
+ const info = Object.assign({
+ expiry_date: ((new Date()).getTime() + (data.expires_in * 1000)),
+ scopes: data.scope.split(' ')
+ }, data);
+ delete info.expires_in;
+ delete info.scope;
+ return info;
+ });
+ }
+ getFederatedSignonCerts(callback) {
+ if (callback) {
+ this.getFederatedSignonCertsAsync().then(r => callback(null, r.certs, r.res), callback);
+ }
+ else {
+ return this.getFederatedSignonCertsAsync();
+ }
+ }
+ getFederatedSignonCertsAsync() {
+ return __awaiter(this, void 0, void 0, function* () {
+ const nowTime = (new Date()).getTime();
+ if (this.certificateExpiry &&
+ (nowTime < this.certificateExpiry.getTime())) {
+ return { certs: this.certificateCache };
+ }
+ let res;
+ try {
+ res = yield this.transporter.request({ url: OAuth2Client.GOOGLE_OAUTH2_FEDERATED_SIGNON_CERTS_URL_ });
+ }
+ catch (e) {
+ throw new Error('Failed to retrieve verification certificates: ' + e);
+ }
+ const cacheControl = res ? res.headers['cache-control'] : undefined;
+ let cacheAge = -1;
+ if (cacheControl) {
+ const pattern = new RegExp('max-age=([0-9]*)');
+ const regexResult = pattern.exec(cacheControl);
+ if (regexResult && regexResult.length === 2) {
+ // Cache results with max-age (in seconds)
+ cacheAge = Number(regexResult[1]) * 1000; // milliseconds
+ }
+ }
+ const now = new Date();
+ this.certificateExpiry =
+ cacheAge === -1 ? null : new Date(now.getTime() + cacheAge);
+ this.certificateCache = res.data;
+ return { certs: res.data, res };
+ });
+ }
+ /**
+ * Verify the id token is signed with the correct certificate
+ * and is from the correct audience.
+ * @param jwt The jwt to verify (The ID Token in this case).
+ * @param certs The array of certs to test the jwt against.
+ * @param requiredAudience The audience to test the jwt against.
+ * @param issuers The allowed issuers of the jwt (Optional).
+ * @param maxExpiry The max expiry the certificate can be (Optional).
+ * @return Returns a LoginTicket on verification.
+ */
+ verifySignedJwtWithCerts(jwt, certs, requiredAudience, issuers, maxExpiry) {
+ if (!maxExpiry) {
+ maxExpiry = OAuth2Client.MAX_TOKEN_LIFETIME_SECS_;
+ }
+ const segments = jwt.split('.');
+ if (segments.length !== 3) {
+ throw new Error('Wrong number of segments in token: ' + jwt);
+ }
+ const signed = segments[0] + '.' + segments[1];
+ const signature = segments[2];
+ let envelope;
+ let payload;
+ try {
+ envelope = JSON.parse(this.decodeBase64(segments[0]));
+ }
+ catch (err) {
+ throw new Error('Can\'t parse token envelope: ' + segments[0]);
+ }
+ if (!envelope) {
+ throw new Error('Can\'t parse token envelope: ' + segments[0]);
+ }
+ try {
+ payload = JSON.parse(this.decodeBase64(segments[1]));
+ }
+ catch (err) {
+ throw new Error('Can\'t parse token payload: ' + segments[0]);
+ }
+ if (!payload) {
+ throw new Error('Can\'t parse token payload: ' + segments[1]);
+ }
+ if (!certs.hasOwnProperty(envelope.kid)) {
+ // If this is not present, then there's no reason to attempt verification
+ throw new Error('No pem found for envelope: ' + JSON.stringify(envelope));
+ }
+ const pem = certs[envelope.kid];
+ const pemVerifier = new pemverifier_1.PemVerifier();
+ const verified = pemVerifier.verify(pem, signed, signature, 'base64');
+ if (!verified) {
+ throw new Error('Invalid token signature: ' + jwt);
+ }
+ if (!payload.iat) {
+ throw new Error('No issue time in token: ' + JSON.stringify(payload));
+ }
+ if (!payload.exp) {
+ throw new Error('No expiration time in token: ' + JSON.stringify(payload));
+ }
+ const iat = Number(payload.iat);
+ if (isNaN(iat))
+ throw new Error('iat field using invalid format');
+ const exp = Number(payload.exp);
+ if (isNaN(exp))
+ throw new Error('exp field using invalid format');
+ const now = new Date().getTime() / 1000;
+ if (exp >= now + maxExpiry) {
+ throw new Error('Expiration time too far in future: ' + JSON.stringify(payload));
+ }
+ const earliest = iat - OAuth2Client.CLOCK_SKEW_SECS_;
+ const latest = exp + OAuth2Client.CLOCK_SKEW_SECS_;
+ if (now < earliest) {
+ throw new Error('Token used too early, ' + now + ' < ' + earliest + ': ' +
+ JSON.stringify(payload));
+ }
+ if (now > latest) {
+ throw new Error('Token used too late, ' + now + ' > ' + latest + ': ' +
+ JSON.stringify(payload));
+ }
+ if (issuers && issuers.indexOf(payload.iss) < 0) {
+ throw new Error('Invalid issuer, expected one of [' + issuers + '], but got ' +
+ payload.iss);
+ }
+ // Check the audience matches if we have one
+ if (typeof requiredAudience !== 'undefined' && requiredAudience !== null) {
+ const aud = payload.aud;
+ let audVerified = false;
+ // If the requiredAudience is an array, check if it contains token
+ // audience
+ if (requiredAudience.constructor === Array) {
+ audVerified = (requiredAudience.indexOf(aud) > -1);
+ }
+ else {
+ audVerified = (aud === requiredAudience);
+ }
+ if (!audVerified) {
+ throw new Error('Wrong recipient, payload audience != requiredAudience');
+ }
+ }
+ return new loginticket_1.LoginTicket(envelope, payload);
+ }
+ /**
+ * This is a utils method to decode a base64 string
+ * @param b64String The string to base64 decode
+ * @return The decoded string
+ */
+ decodeBase64(b64String) {
+ const buffer = Buffer.from(b64String, 'base64');
+ return buffer.toString('utf8');
+ }
+ /**
+ * Returns true if a token is expired or will expire within
+ * eagerRefreshThresholdMillismilliseconds.
+ * If there is no expiry time, assumes the token is not expired or expiring.
+ */
+ isTokenExpiring() {
+ const expiryDate = this.credentials.expiry_date;
+ return expiryDate ? expiryDate <=
+ ((new Date()).getTime() + this.eagerRefreshThresholdMillis) :
+ false;
+ }
+}
+OAuth2Client.GOOGLE_TOKEN_INFO_URL = 'https://oauth2.googleapis.com/tokeninfo';
+/**
+ * The base URL for auth endpoints.
+ */
+OAuth2Client.GOOGLE_OAUTH2_AUTH_BASE_URL_ = 'https://accounts.google.com/o/oauth2/v2/auth';
+/**
+ * The base endpoint for token retrieval.
+ */
+OAuth2Client.GOOGLE_OAUTH2_TOKEN_URL_ = 'https://oauth2.googleapis.com/token';
+/**
+ * The base endpoint to revoke tokens.
+ */
+OAuth2Client.GOOGLE_OAUTH2_REVOKE_URL_ = 'https://oauth2.googleapis.com/revoke';
+/**
+ * Google Sign on certificates.
+ */
+OAuth2Client.GOOGLE_OAUTH2_FEDERATED_SIGNON_CERTS_URL_ = 'https://www.googleapis.com/oauth2/v1/certs';
+/**
+ * Clock skew - five minutes in seconds
+ */
+OAuth2Client.CLOCK_SKEW_SECS_ = 300;
+/**
+ * Max Token Lifetime is one day in seconds
+ */
+OAuth2Client.MAX_TOKEN_LIFETIME_SECS_ = 86400;
+/**
+ * The allowed oauth token issuers.
+ */
+OAuth2Client.ISSUERS_ = ['accounts.google.com', 'https://accounts.google.com'];
+exports.OAuth2Client = OAuth2Client;
+//# sourceMappingURL=oauth2client.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/oauth2client.js.map b/express-server/node_modules/google-auth-library/build/src/auth/oauth2client.js.map
new file mode 100644
index 00000000..a8091b43
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/oauth2client.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"oauth2client.js","sourceRoot":"","sources":["../../../src/auth/oauth2client.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;AAGH,iCAAiC;AAEjC,2CAA2C;AAC3C,iCAAiC;AACjC,wCAAwC;AACxC,kDAA6C;AAE7C,6CAAwC;AAExC,+CAAwD;AAUxD,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,oCAAa,CAAA;AACf,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B;AAuRD,MAAa,YAAa,SAAQ,uBAAU;IA8B1C,YACI,iBAA8C,EAAE,YAAqB,EACrE,WAAoB;QACtB,KAAK,EAAE,CAAC;QA9BF,sBAAiB,GAAc,IAAI,CAAC;QAClC,yBAAoB,GAAG,IAAI,GAAG,EAAq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AC;IAC5B,CAAC;;AApsByB,kCAAqB,GAC3C,yCAAyC,CAAC;AAE9C;;GAEG;AACqB,yCAA4B,GAChD,8CAA8C,CAAC;AAEnD;;GAEG;AACqB,qCAAwB,GAC5C,qCAAqC,CAAC;AAE1C;;GAEG;AACqB,sCAAyB,GAC7C,sCAAsC,CAAC;AAE3C;;GAEG;AACqB,sDAAyC,GAC7D,4CAA4C,CAAC;AAEjD;;GAEG;AACqB,6BAAgB,GAAG,GAAG,CAAC;AAE/C;;GAEG;AACqB,qCAAwB,GAAG,KAAK,CAAC;AAEzD;;GAEG;AACqB,qBAAQ,GAC5B,CAAC,qBAAqB,EAAE,6BAA6B,CAAC,CAAC;AArF7D,oCAivBC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/refreshclient.d.ts b/express-server/node_modules/google-auth-library/build/src/auth/refreshclient.d.ts
new file mode 100644
index 00000000..459caddd
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/refreshclient.d.ts
@@ -0,0 +1,58 @@
+/**
+ * Copyright 2015 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///
+import * as stream from 'stream';
+import { JWTInput } from './credentials';
+import { GetTokenResponse, OAuth2Client, RefreshOptions } from './oauth2client';
+export interface UserRefreshClientOptions extends RefreshOptions {
+ clientId?: string;
+ clientSecret?: string;
+ refreshToken?: string;
+}
+export declare class UserRefreshClient extends OAuth2Client {
+ _refreshToken?: string | null;
+ /**
+ * User Refresh Token credentials.
+ *
+ * @param clientId The authentication client ID.
+ * @param clientSecret The authentication client secret.
+ * @param refreshToken The authentication refresh token.
+ */
+ constructor(clientId?: string, clientSecret?: string, refreshToken?: string);
+ constructor(options: UserRefreshClientOptions);
+ constructor(clientId?: string, clientSecret?: string, refreshToken?: string);
+ /**
+ * Refreshes the access token.
+ * @param refreshToken An ignored refreshToken..
+ * @param callback Optional callback.
+ */
+ protected refreshTokenNoCache(refreshToken?: string | null): Promise;
+ /**
+ * Create a UserRefreshClient credentials instance using the given input
+ * options.
+ * @param json The input object.
+ */
+ fromJSON(json: JWTInput): void;
+ /**
+ * Create a UserRefreshClient credentials instance using the given input
+ * stream.
+ * @param inputStream The input stream.
+ * @param callback Optional callback.
+ */
+ fromStream(inputStream: stream.Readable): Promise;
+ fromStream(inputStream: stream.Readable, callback: (err?: Error) => void): void;
+ private fromStreamAsync;
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/refreshclient.js b/express-server/node_modules/google-auth-library/build/src/auth/refreshclient.js
new file mode 100644
index 00000000..39a71492
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/refreshclient.js
@@ -0,0 +1,114 @@
+"use strict";
+/**
+ * Copyright 2015 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const oauth2client_1 = require("./oauth2client");
+class UserRefreshClient extends oauth2client_1.OAuth2Client {
+ constructor(optionsOrClientId, clientSecret, refreshToken, eagerRefreshThresholdMillis) {
+ const opts = (optionsOrClientId && typeof optionsOrClientId === 'object') ?
+ optionsOrClientId :
+ {
+ clientId: optionsOrClientId,
+ clientSecret,
+ refreshToken,
+ eagerRefreshThresholdMillis
+ };
+ super({
+ clientId: opts.clientId,
+ clientSecret: opts.clientSecret,
+ eagerRefreshThresholdMillis: opts.eagerRefreshThresholdMillis
+ });
+ this._refreshToken = opts.refreshToken;
+ }
+ /**
+ * Refreshes the access token.
+ * @param refreshToken An ignored refreshToken..
+ * @param callback Optional callback.
+ */
+ refreshTokenNoCache(refreshToken) {
+ const _super = name => super[name];
+ return __awaiter(this, void 0, void 0, function* () {
+ return _super("refreshTokenNoCache").call(this, this._refreshToken);
+ });
+ }
+ /**
+ * Create a UserRefreshClient credentials instance using the given input
+ * options.
+ * @param json The input object.
+ */
+ fromJSON(json) {
+ if (!json) {
+ throw new Error('Must pass in a JSON object containing the user refresh token');
+ }
+ if (json.type !== 'authorized_user') {
+ throw new Error('The incoming JSON object does not have the "authorized_user" type');
+ }
+ if (!json.client_id) {
+ throw new Error('The incoming JSON object does not contain a client_id field');
+ }
+ if (!json.client_secret) {
+ throw new Error('The incoming JSON object does not contain a client_secret field');
+ }
+ if (!json.refresh_token) {
+ throw new Error('The incoming JSON object does not contain a refresh_token field');
+ }
+ this._clientId = json.client_id;
+ this._clientSecret = json.client_secret;
+ this._refreshToken = json.refresh_token;
+ this.credentials.refresh_token = json.refresh_token;
+ }
+ fromStream(inputStream, callback) {
+ if (callback) {
+ this.fromStreamAsync(inputStream).then(r => callback(), callback);
+ }
+ else {
+ return this.fromStreamAsync(inputStream);
+ }
+ }
+ fromStreamAsync(inputStream) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return new Promise((resolve, reject) => {
+ if (!inputStream) {
+ return reject(new Error('Must pass in a stream containing the user refresh token.'));
+ }
+ let s = '';
+ inputStream.setEncoding('utf8')
+ .on('error', reject)
+ .on('data', (chunk) => s += chunk)
+ .on('end', () => {
+ try {
+ const data = JSON.parse(s);
+ this.fromJSON(data);
+ return resolve();
+ }
+ catch (err) {
+ return reject(err);
+ }
+ });
+ });
+ });
+ }
+}
+exports.UserRefreshClient = UserRefreshClient;
+//# sourceMappingURL=refreshclient.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/auth/refreshclient.js.map b/express-server/node_modules/google-auth-library/build/src/auth/refreshclient.js.map
new file mode 100644
index 00000000..8f247687
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/auth/refreshclient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"refreshclient.js","sourceRoot":"","sources":["../../../src/auth/refreshclient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;AAIH,iDAA8E;AAQ9E,MAAa,iBAAkB,SAAQ,2BAAY;IAgBjD,YACI,iBAAmD,EACnD,YAAqB,EAAE,YAAqB,EAC5C,2BAAoC;QACtC,MAAM,IAAI,GAAG,CAAC,iBAAiB,IAAI,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC;YACvE,iBAAiB,CAAC,CAAC;YACnB;gBACE,QAAQ,EAAE,iBAAiB;gBAC3B,YAAY;gBACZ,YAAY;gBACZ,2BAA2B;aAC5B,CAAC;QACN,KAAK,CAAC;YACJ,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,2BAA2B,EAAE,IAAI,CAAC,2BAA2B;SAC9D,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACa,mBAAmB,CAAC,YACI;;;YACtC,OAAO,6BAAyB,YAAC,IAAI,CAAC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0D,CAAC,CAAC,CAAC;iBAClE;gBACD,IAAI,CAAC,GAAG,EAAE,CAAC;gBACX,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC;qBAC1B,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;qBACnB,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC;qBACjC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;oBACd,IAAI;wBACF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;wBAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;wBACpB,OAAO,OAAO,EAAE,CAAC;qBAClB;oBAAC,OAAO,GAAG,EAAE;wBACZ,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;qBACpB;gBACH,CAAC,CAAC,CAAC;YACT,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AArHD,8CAqHC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/index.d.ts b/express-server/node_modules/google-auth-library/build/src/index.d.ts
new file mode 100644
index 00000000..9809eddb
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/index.d.ts
@@ -0,0 +1,27 @@
+/**
+ * Copyright 2017 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { GoogleAuth } from './auth/googleauth';
+export { Compute, ComputeOptions } from './auth/computeclient';
+export { Credentials } from './auth/credentials';
+export { GoogleAuthOptions } from './auth/googleauth';
+export { IAMAuth } from './auth/iam';
+export { JWTAccess } from './auth/jwtaccess';
+export { JWT } from './auth/jwtclient';
+export { CodeChallengeMethod, OAuth2Client } from './auth/oauth2client';
+export { UserRefreshClient } from './auth/refreshclient';
+export { DefaultTransporter } from './transporters';
+declare const auth: GoogleAuth;
+export { auth, GoogleAuth };
diff --git a/express-server/node_modules/google-auth-library/build/src/index.js b/express-server/node_modules/google-auth-library/build/src/index.js
new file mode 100644
index 00000000..22ae5c11
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/index.js
@@ -0,0 +1,37 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Copyright 2017 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+const googleauth_1 = require("./auth/googleauth");
+exports.GoogleAuth = googleauth_1.GoogleAuth;
+var computeclient_1 = require("./auth/computeclient");
+exports.Compute = computeclient_1.Compute;
+var iam_1 = require("./auth/iam");
+exports.IAMAuth = iam_1.IAMAuth;
+var jwtaccess_1 = require("./auth/jwtaccess");
+exports.JWTAccess = jwtaccess_1.JWTAccess;
+var jwtclient_1 = require("./auth/jwtclient");
+exports.JWT = jwtclient_1.JWT;
+var oauth2client_1 = require("./auth/oauth2client");
+exports.CodeChallengeMethod = oauth2client_1.CodeChallengeMethod;
+exports.OAuth2Client = oauth2client_1.OAuth2Client;
+var refreshclient_1 = require("./auth/refreshclient");
+exports.UserRefreshClient = refreshclient_1.UserRefreshClient;
+var transporters_1 = require("./transporters");
+exports.DefaultTransporter = transporters_1.DefaultTransporter;
+const auth = new googleauth_1.GoogleAuth();
+exports.auth = auth;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/index.js.map b/express-server/node_modules/google-auth-library/build/src/index.js.map
new file mode 100644
index 00000000..8eccaa71
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;GAcG;AACH,kDAA6C;AAa/B,qBAbN,uBAAU,CAaM;AAXxB,sDAA6D;AAArD,kCAAA,OAAO,CAAA;AAGf,kCAAmC;AAA3B,wBAAA,OAAO,CAAA;AACf,8CAA2C;AAAnC,gCAAA,SAAS,CAAA;AACjB,8CAAqC;AAA7B,0BAAA,GAAG,CAAA;AACX,oDAAsE;AAA9D,6CAAA,mBAAmB,CAAA;AAAE,sCAAA,YAAY,CAAA;AACzC,sDAAuD;AAA/C,4CAAA,iBAAiB,CAAA;AACzB,+CAAkD;AAA1C,4CAAA,kBAAkB,CAAA;AAE1B,MAAM,IAAI,GAAG,IAAI,uBAAU,EAAE,CAAC;AACtB,oBAAI"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/messages.d.ts b/express-server/node_modules/google-auth-library/build/src/messages.d.ts
new file mode 100644
index 00000000..723b5ccf
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/messages.d.ts
@@ -0,0 +1,76 @@
+/**
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+export declare enum WarningTypes {
+ WARNING = "Warning",
+ DEPRECATION = "DeprecationWarning"
+}
+export declare function warn(warning: Warning): void;
+export interface Warning {
+ code: string;
+ type: WarningTypes;
+ message: string;
+ warned?: boolean;
+}
+export declare const PROBLEMATIC_CREDENTIALS_WARNING: {
+ code: string;
+ type: WarningTypes;
+ message: string;
+};
+export declare const DEFAULT_PROJECT_ID_DEPRECATED: {
+ code: string;
+ type: WarningTypes;
+ message: string;
+};
+export declare const COMPUTE_CREATE_SCOPED_DEPRECATED: {
+ code: string;
+ type: WarningTypes;
+ message: string;
+};
+export declare const JWT_CREATE_SCOPED_DEPRECATED: {
+ code: string;
+ type: WarningTypes;
+ message: string;
+};
+export declare const IAM_CREATE_SCOPED_DEPRECATED: {
+ code: string;
+ type: WarningTypes;
+ message: string;
+};
+export declare const JWT_ACCESS_CREATE_SCOPED_DEPRECATED: {
+ code: string;
+ type: WarningTypes;
+ message: string;
+};
+export declare const REFRESH_ACCESS_TOKEN_DEPRECATED: {
+ code: string;
+ type: WarningTypes;
+ message: string;
+};
+export declare const OAUTH_GET_REQUEST_METADATA_DEPRECATED: {
+ code: string;
+ type: WarningTypes;
+ message: string;
+};
+export declare const IAM_GET_REQUEST_METADATA_DEPRECATED: {
+ code: string;
+ type: WarningTypes;
+ message: string;
+};
+export declare const JWT_ACCESS_GET_REQUEST_METADATA_DEPRECATED: {
+ code: string;
+ type: WarningTypes;
+ message: string;
+};
diff --git a/express-server/node_modules/google-auth-library/build/src/messages.js b/express-server/node_modules/google-auth-library/build/src/messages.js
new file mode 100644
index 00000000..785f6132
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/messages.js
@@ -0,0 +1,133 @@
+"use strict";
+/**
+ * Copyright 2018 Google LLC. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const semver = require("semver");
+var WarningTypes;
+(function (WarningTypes) {
+ WarningTypes["WARNING"] = "Warning";
+ WarningTypes["DEPRECATION"] = "DeprecationWarning";
+})(WarningTypes = exports.WarningTypes || (exports.WarningTypes = {}));
+function warn(warning) {
+ // Only show a given warning once
+ if (warning.warned) {
+ return;
+ }
+ warning.warned = true;
+ if (semver.satisfies(process.version, '>=8')) {
+ // @types/node doesn't recognize the emitWarning syntax which
+ // accepts a config object, so `as any` it is
+ // https://nodejs.org/docs/latest-v8.x/api/process.html#process_process_emitwarning_warning_options
+ // tslint:disable-next-line no-any
+ process.emitWarning(warning.message, warning);
+ }
+ else {
+ // This path can be removed once we drop support for Node 6.
+ // https://nodejs.org/docs/latest-v6.x/api/process.html#process_process_emitwarning_warning_name_ctor
+ process.emitWarning(warning.message, warning.type);
+ }
+}
+exports.warn = warn;
+exports.PROBLEMATIC_CREDENTIALS_WARNING = {
+ code: 'google-auth-library:00001',
+ type: WarningTypes.WARNING,
+ message: [
+ 'Your application has authenticated using end user credentials from Google',
+ 'Cloud SDK. We recommend that most server applications use service accounts',
+ 'instead. If your application continues to use end user credentials from',
+ 'Cloud SDK, you might receive a "quota exceeded" or "API not enabled" error.',
+ 'For more information about service accounts, see',
+ 'https://cloud.google.com/docs/authentication/.'
+ ].join(' ')
+};
+exports.DEFAULT_PROJECT_ID_DEPRECATED = {
+ code: 'google-auth-library:DEP002',
+ type: WarningTypes.DEPRECATION,
+ message: [
+ 'The `getDefaultProjectId` method has been deprecated, and will be removed',
+ 'in the 3.0 release of google-auth-library. Please use the `getProjectId`',
+ 'method instead.'
+ ].join(' ')
+};
+exports.COMPUTE_CREATE_SCOPED_DEPRECATED = {
+ code: 'google-auth-library:DEP003',
+ type: WarningTypes.DEPRECATION,
+ message: [
+ 'The `createScopedRequired` method on the `Compute` class has been deprecated,',
+ 'and will be removed in the 3.0 release of google-auth-library.'
+ ].join(' ')
+};
+exports.JWT_CREATE_SCOPED_DEPRECATED = {
+ code: 'google-auth-library:DEP004',
+ type: WarningTypes.DEPRECATION,
+ message: [
+ 'The `createScopedRequired` method on the `JWT` class has been deprecated,',
+ 'and will be removed in the 3.0 release of google-auth-library.'
+ ].join(' ')
+};
+exports.IAM_CREATE_SCOPED_DEPRECATED = {
+ code: 'google-auth-library:DEP005',
+ type: WarningTypes.DEPRECATION,
+ message: [
+ 'The `createScopedRequired` method on the `IAM` class has been deprecated,',
+ 'and will be removed in the 3.0 release of google-auth-library.'
+ ].join(' ')
+};
+exports.JWT_ACCESS_CREATE_SCOPED_DEPRECATED = {
+ code: 'google-auth-library:DEP006',
+ type: WarningTypes.DEPRECATION,
+ message: [
+ 'The `createScopedRequired` method on the `JWTAccess` class has been deprecated,',
+ 'and will be removed in the 3.0 release of google-auth-library.'
+ ].join(' ')
+};
+exports.REFRESH_ACCESS_TOKEN_DEPRECATED = {
+ code: 'google-auth-library:DEP007',
+ type: WarningTypes.DEPRECATION,
+ message: [
+ 'The `refreshAccessToken` method has been deprecated, and will be removed',
+ 'in the 3.0 release of google-auth-library. Please use the `getRequestHeaders`',
+ 'method instead.'
+ ].join(' ')
+};
+exports.OAUTH_GET_REQUEST_METADATA_DEPRECATED = {
+ code: 'google-auth-library:DEP004',
+ type: WarningTypes.DEPRECATION,
+ message: [
+ 'The `getRequestMetadata` method on the `OAuth2` class has been deprecated,',
+ 'and will be removed in the 3.0 release of google-auth-library. Please use',
+ 'the `getRequestHeaders` method instead.'
+ ].join(' ')
+};
+exports.IAM_GET_REQUEST_METADATA_DEPRECATED = {
+ code: 'google-auth-library:DEP005',
+ type: WarningTypes.DEPRECATION,
+ message: [
+ 'The `getRequestMetadata` method on the `IAM` class has been deprecated,',
+ 'and will be removed in the 3.0 release of google-auth-library. Please use',
+ 'the `getRequestHeaders` method instead.'
+ ].join(' ')
+};
+exports.JWT_ACCESS_GET_REQUEST_METADATA_DEPRECATED = {
+ code: 'google-auth-library:DEP006',
+ type: WarningTypes.DEPRECATION,
+ message: [
+ 'The `getRequestMetadata` method on the `JWTAccess` class has been deprecated,',
+ 'and will be removed in the 3.0 release of google-auth-library. Please use',
+ 'the `getRequestHeaders` method instead.'
+ ].join(' ')
+};
+//# sourceMappingURL=messages.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/messages.js.map b/express-server/node_modules/google-auth-library/build/src/messages.js.map
new file mode 100644
index 00000000..939ea514
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/messages.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/messages.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,iCAAiC;AAEjC,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,kDAAkC,CAAA;AACpC,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB;AAED,SAAgB,IAAI,CAAC,OAAgB;IACnC,iCAAiC;IACjC,IAAI,OAAO,CAAC,MAAM,EAAE;QAClB,OAAO;KACR;IACD,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;QAC5C,6DAA6D;QAC7D,6CAA6C;QAC7C,mGAAmG;QACnG,kCAAkC;QAClC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,OAAc,CAAC,CAAC;KACtD;SAAM;QACL,4DAA4D;QAC5D,qGAAqG;QACrG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;KACpD;AACH,CAAC;AAjBD,oBAiBC;AASY,QAAA,+BAA+B,GAAG;IAC7C,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,YA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0EAA0E;QAC1E,+EAA+E;QAC/E,iBAAiB;KAClB,CAAC,IAAI,CAAC,GAAG,CAAC;CACZ,CAAC;AACW,QAAA,qCAAqC,GAAG;IACnD,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,YAAY,CAAC,WAAW;IAC9B,OAAO,EAAE;QACP,4EAA4E;QAC5E,2EAA2E;QAC3E,yCAAyC;KAC1C,CAAC,IAAI,CAAC,GAAG,CAAC;CACZ,CAAC;AAEW,QAAA,mCAAmC,GAAG;IACjD,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,YAAY,CAAC,WAAW;IAC9B,OAAO,EAAE;QACP,yEAAyE;QACzE,2EAA2E;QAC3E,yCAAyC;KAC1C,CAAC,IAAI,CAAC,GAAG,CAAC;CACZ,CAAC;AAEW,QAAA,0CAA0C,GAAG;IACxD,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,YAAY,CAAC,WAAW;IAC9B,OAAO,EAAE;QACP,+EAA+E;QAC/E,2EAA2E;QAC3E,yCAAyC;KAC1C,CAAC,IAAI,CAAC,GAAG,CAAC;CACZ,CAAC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/options.d.ts b/express-server/node_modules/google-auth-library/build/src/options.d.ts
new file mode 100644
index 00000000..4f20e612
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/options.d.ts
@@ -0,0 +1,16 @@
+/**
+ * Copyright 2017 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+export declare function validate(options: any): void;
diff --git a/express-server/node_modules/google-auth-library/build/src/options.js b/express-server/node_modules/google-auth-library/build/src/options.js
new file mode 100644
index 00000000..e7b457c0
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/options.js
@@ -0,0 +1,36 @@
+"use strict";
+/**
+ * Copyright 2017 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+// Accepts an options object passed from the user to the API. In the
+// previous version of the API, it referred to a `Request` options object.
+// Now it refers to an Axiox Request Config object. This is here to help
+// ensure users don't pass invalid options when they upgrade from 0.x to 1.x.
+// tslint:disable-next-line no-any
+function validate(options) {
+ const vpairs = [
+ { invalid: 'uri', expected: 'url' }, { invalid: 'json', expected: 'data' },
+ { invalid: 'qs', expected: 'params' }
+ ];
+ for (const pair of vpairs) {
+ if (options[pair.invalid]) {
+ const e = `'${pair.invalid}' is not a valid configuration option. Please use '${pair.expected}' instead. This library is using Axios for requests. Please see https://github.com/axios/axios to learn more about the valid request options.`;
+ throw new Error(e);
+ }
+ }
+}
+exports.validate = validate;
+//# sourceMappingURL=options.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/options.js.map b/express-server/node_modules/google-auth-library/build/src/options.js.map
new file mode 100644
index 00000000..cac7841b
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/options.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,qEAAqE;AACrE,0EAA0E;AAC1E,yEAAyE;AACzE,6EAA6E;AAC7E,kCAAkC;AAClC,SAAgB,QAAQ,CAAC,OAAY;IACnC,MAAM,MAAM,GAAG;QACb,EAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAC,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAC;QACtE,EAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAC;KACpC,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE;QACzB,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YACzB,MAAM,CAAC,GAAG,IACN,IAAI,CAAC,OAAO,sDACZ,IAAI,CAAC,QAAQ,+IAA+I,CAAC;YACjK,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;SACpB;KACF;AACH,CAAC;AAbD,4BAaC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/pemverifier.d.ts b/express-server/node_modules/google-auth-library/build/src/pemverifier.d.ts
new file mode 100644
index 00000000..cebe17d4
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/pemverifier.d.ts
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2014 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///
+import * as crypto from 'crypto';
+export declare class PemVerifier {
+ verify(pubkey: string, data: string | Buffer, signature: string, encoding: crypto.HexBase64Latin1Encoding): boolean;
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/pemverifier.js b/express-server/node_modules/google-auth-library/build/src/pemverifier.js
new file mode 100644
index 00000000..16a4105a
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/pemverifier.js
@@ -0,0 +1,27 @@
+"use strict";
+/**
+ * Copyright 2014 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const crypto = require("crypto");
+class PemVerifier {
+ verify(pubkey, data, signature, encoding) {
+ const verifier = crypto.createVerify('sha256');
+ verifier.update(data);
+ return verifier.verify(pubkey, signature, encoding);
+ }
+}
+exports.PemVerifier = PemVerifier;
+//# sourceMappingURL=pemverifier.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/pemverifier.js.map b/express-server/node_modules/google-auth-library/build/src/pemverifier.js.map
new file mode 100644
index 00000000..bec372d9
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/pemverifier.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"pemverifier.js","sourceRoot":"","sources":["../../src/pemverifier.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,iCAAiC;AAEjC,MAAa,WAAW;IACtB,MAAM,CACF,MAAc,EAAE,IAAmB,EAAE,SAAiB,EACtD,QAAwC;QAC1C,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC/C,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtB,OAAO,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;CACF;AARD,kCAQC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/transporters.d.ts b/express-server/node_modules/google-auth-library/build/src/transporters.d.ts
new file mode 100644
index 00000000..150af51a
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/transporters.d.ts
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2012 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { AxiosError, AxiosPromise, AxiosRequestConfig, AxiosResponse } from 'axios';
+export interface Transporter {
+ request(opts: AxiosRequestConfig): AxiosPromise;
+ request(opts: AxiosRequestConfig, callback?: BodyResponseCallback): void;
+ request(opts: AxiosRequestConfig, callback?: BodyResponseCallback): AxiosPromise | void;
+}
+export interface BodyResponseCallback {
+ (err: Error | null, res?: AxiosResponse | null): void;
+}
+export interface RequestError extends AxiosError {
+ errors: Error[];
+}
+export declare class DefaultTransporter {
+ /**
+ * Default user agent.
+ */
+ static readonly USER_AGENT: string;
+ /**
+ * Configures request options before making a request.
+ * @param opts AxiosRequestConfig options.
+ * @return Configured options.
+ */
+ configure(opts?: AxiosRequestConfig): AxiosRequestConfig;
+ /**
+ * Makes a request using Axios with given options.
+ * @param opts AxiosRequestConfig options.
+ * @param callback optional callback that contains AxiosResponse object.
+ * @return AxiosPromise, assuming no callback is passed.
+ */
+ request(opts: AxiosRequestConfig): AxiosPromise;
+ request(opts: AxiosRequestConfig, callback?: BodyResponseCallback): void;
+ /**
+ * Changes the error to include details from the body.
+ */
+ private processError;
+}
diff --git a/express-server/node_modules/google-auth-library/build/src/transporters.js b/express-server/node_modules/google-auth-library/build/src/transporters.js
new file mode 100644
index 00000000..c1336bad
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/transporters.js
@@ -0,0 +1,122 @@
+"use strict";
+/**
+ * Copyright 2012 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const axios_1 = require("axios");
+const options_1 = require("./options");
+// tslint:disable-next-line variable-name
+const HttpsProxyAgent = require('https-proxy-agent');
+// tslint:disable-next-line no-var-requires
+const pkg = require('../../package.json');
+const PRODUCT_NAME = 'google-api-nodejs-client';
+/**
+ * Axios will use XHR if it is available. In the case of Electron,
+ * since XHR is there it will try to use that. This leads to OPTIONS
+ * preflight requests which googleapis DOES NOT like. This line of
+ * code pins the adapter to ensure it uses node.
+ * https://github.com/google/google-api-nodejs-client/issues/1083
+ */
+axios_1.default.defaults.adapter = require('axios/lib/adapters/http');
+class DefaultTransporter {
+ /**
+ * Configures request options before making a request.
+ * @param opts AxiosRequestConfig options.
+ * @return Configured options.
+ */
+ configure(opts = {}) {
+ // set transporter user agent
+ opts.headers = opts.headers || {};
+ const uaValue = opts.headers['User-Agent'];
+ if (!uaValue) {
+ opts.headers['User-Agent'] = DefaultTransporter.USER_AGENT;
+ }
+ else if (!uaValue.includes(`${PRODUCT_NAME}/`)) {
+ opts.headers['User-Agent'] =
+ `${uaValue} ${DefaultTransporter.USER_AGENT}`;
+ }
+ return opts;
+ }
+ request(opts, callback) {
+ // ensure the user isn't passing in request-style options
+ opts = this.configure(opts);
+ try {
+ options_1.validate(opts);
+ }
+ catch (e) {
+ if (callback) {
+ return callback(e);
+ }
+ else {
+ throw e;
+ }
+ }
+ // If the user configured an `HTTPS_PROXY` environment variable, create
+ // a custom agent to proxy the request.
+ const proxy = process.env.HTTPS_PROXY || process.env.https_proxy;
+ if (proxy) {
+ opts.httpsAgent = new HttpsProxyAgent(proxy);
+ opts.proxy = false;
+ }
+ if (callback) {
+ axios_1.default(opts).then(r => {
+ callback(null, r);
+ }, e => {
+ callback(this.processError(e));
+ });
+ }
+ else {
+ return axios_1.default(opts).catch(e => {
+ throw this.processError(e);
+ });
+ }
+ }
+ /**
+ * Changes the error to include details from the body.
+ */
+ processError(e) {
+ const res = e.response;
+ const err = e;
+ const body = res ? res.data : null;
+ if (res && body && body.error && res.status !== 200) {
+ if (typeof body.error === 'string') {
+ err.message = body.error;
+ err.code = res.status.toString();
+ }
+ else if (Array.isArray(body.error.errors)) {
+ err.message =
+ body.error.errors.map((err2) => err2.message).join('\n');
+ err.code = body.error.code;
+ err.errors = body.error.errors;
+ }
+ else {
+ err.message = body.error.message;
+ err.code = body.error.code || res.status;
+ }
+ }
+ else if (res && res.status >= 400) {
+ // Consider all 4xx and 5xx responses errors.
+ err.message = body;
+ err.code = res.status.toString();
+ }
+ return err;
+ }
+}
+/**
+ * Default user agent.
+ */
+DefaultTransporter.USER_AGENT = `${PRODUCT_NAME}/${pkg.version}`;
+exports.DefaultTransporter = DefaultTransporter;
+//# sourceMappingURL=transporters.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/build/src/transporters.js.map b/express-server/node_modules/google-auth-library/build/src/transporters.js.map
new file mode 100644
index 00000000..22cca740
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/build/src/transporters.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"transporters.js","sourceRoot":"","sources":["../../src/transporters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,iCAAyF;AACzF,uCAAmC;AAEnC,yCAAyC;AACzC,MAAM,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAErD,2CAA2C;AAC3C,MAAM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C,IAAI,CAAC,IAAI,CAAC,CAAC;gBACpE,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;gBAC3B,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;aAChC;iBAAM;gBACL,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;gBACjC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,GAAG,CAAC,MAAM,CAAC;aAC1C;SACF;aAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,EAAE;YACnC,6CAA6C;YAC7C,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;YACnB,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;SAClC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;;AA/FD;;GAEG;AACa,6BAAU,GAAG,GAAG,YAAY,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;AAJhE,gDAiGC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-auth-library/package.json b/express-server/node_modules/google-auth-library/package.json
new file mode 100644
index 00000000..8e897ea3
--- /dev/null
+++ b/express-server/node_modules/google-auth-library/package.json
@@ -0,0 +1,130 @@
+{
+ "_from": "google-auth-library@^2.0.0",
+ "_id": "google-auth-library@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-lN6jecH8L30uAirTeOm9ij9CTMJniwg7fbuyOpgH4lFkO50LKhPrx/ZbLGK8aBCzi/u4/tpdZnJABFuMqtIx0A==",
+ "_location": "/google-auth-library",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "google-auth-library@^2.0.0",
+ "name": "google-auth-library",
+ "escapedName": "google-auth-library",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/googleapis",
+ "/googleapis-common"
+ ],
+ "_resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-2.0.0.tgz",
+ "_shasum": "55d20e03a9820a1c28ee14cd1b6864b7be38b5e4",
+ "_spec": "google-auth-library@^2.0.0",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\googleapis",
+ "author": {
+ "name": "Google Inc."
+ },
+ "bugs": {
+ "url": "https://github.com/google/google-auth-library-nodejs/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "axios": "^0.18.0",
+ "gcp-metadata": "^0.7.0",
+ "gtoken": "^2.3.0",
+ "https-proxy-agent": "^2.2.1",
+ "jws": "^3.1.5",
+ "lodash.isstring": "^4.0.1",
+ "lru-cache": "^4.1.3",
+ "semver": "^5.5.0"
+ },
+ "deprecated": false,
+ "description": "Google APIs Authentication Client Library for Node.js",
+ "devDependencies": {
+ "@types/jws": "^3.1.0",
+ "@types/lodash.isstring": "^4.0.3",
+ "@types/lru-cache": "^4.1.0",
+ "@types/mocha": "^5.2.1",
+ "@types/mv": "^2.1.0",
+ "@types/ncp": "^2.0.1",
+ "@types/nock": "^9.1.3",
+ "@types/node": "^10.5.1",
+ "@types/pify": "^3.0.2",
+ "@types/semver": "^5.5.0",
+ "@types/sinon": "^5.0.1",
+ "@types/tmp": "^0.0.33",
+ "assert-rejects": "^1.0.0",
+ "codecov": "^3.0.2",
+ "gh-pages": "^1.2.0",
+ "gts": "^0.8.0",
+ "hard-rejection": "^1.0.0",
+ "intelli-espower-loader": "^1.0.1",
+ "js-green-licenses": "^0.5.0",
+ "keypair": "^1.0.1",
+ "mocha": "^5.2.0",
+ "mv": "^2.1.1",
+ "ncp": "^2.0.0",
+ "nock": "^9.3.0",
+ "nyc": "^13.0.0",
+ "pify": "^4.0.0",
+ "prettier": "^1.13.4",
+ "sinon": "^6.0.0",
+ "source-map-support": "^0.5.6",
+ "tmp": "^0.0.33",
+ "typedoc": "^0.12.0",
+ "typescript": "~3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "LICENSE",
+ "README.md",
+ "build/src",
+ "package.json"
+ ],
+ "homepage": "https://github.com/google/google-auth-library-nodejs#readme",
+ "keywords": [
+ "google",
+ "api",
+ "google apis",
+ "client",
+ "client library"
+ ],
+ "license": "Apache-2.0",
+ "main": "./build/src/index.js",
+ "name": "google-auth-library",
+ "nyc": {
+ "exclude": [
+ "build/test"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/google/google-auth-library-nodejs.git"
+ },
+ "scripts": {
+ "check": "gts check",
+ "clean": "gts clean",
+ "codecov": "nyc report --reporter=json && codecov -f coverage/*.json",
+ "compile": "tsc -p .",
+ "docs": "exit 0; typedoc --excludePrivate --excludeExternals --mode modules --out docs src && touch docs/.nojekyll",
+ "fix": "gts fix && npm run fix-samples",
+ "fix-samples": "prettier --write --single-quote samples/*.js",
+ "license-check": "jsgl --local .",
+ "lint": "npm run check",
+ "posttest": "npm run check && npm run license-check",
+ "prepare": "npm run compile",
+ "presystem-test": "npm run compile",
+ "pretest": "npm run compile",
+ "publish-docs": "gh-pages --dotfiles --dist docs --remote upstream",
+ "samples-test": "mocha samples/system-test",
+ "system-test": "mocha build/system-test",
+ "test": "npm run test-only",
+ "test-only": "nyc mocha build/test"
+ },
+ "types": "./build/src/index.d.ts",
+ "version": "2.0.0"
+}
diff --git a/express-server/node_modules/google-p12-pem/LICENSE b/express-server/node_modules/google-p12-pem/LICENSE
new file mode 100644
index 00000000..8dafa3b9
--- /dev/null
+++ b/express-server/node_modules/google-p12-pem/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Ryan Seys
+
+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/express-server/node_modules/google-p12-pem/README.md b/express-server/node_modules/google-p12-pem/README.md
new file mode 100644
index 00000000..ef0b1f5c
--- /dev/null
+++ b/express-server/node_modules/google-p12-pem/README.md
@@ -0,0 +1,68 @@
+# google-p12-pem
+
+[![NPM Version][npm-image]][npm-url]
+[![Build Status][travis-image]][travis-url]
+[![Dependency Status][david-image]][david-url]
+[![devDependency Status][david-dev-image]][david-dev-url]
+[![Known Vulnerabilities][snyk-image]][snyk-url]
+[](https://greenkeeper.io/)
+
+Convert Google `.p12` keys to `.pem` keys.
+
+## Installation
+
+``` sh
+npm install google-p12-pem
+```
+
+## Usage
+
+### async/await style
+```js
+const {getPem} = require('google-p12-pem');
+async function foo() {
+ const pem = await getPem('/path/to/key.p12');
+ console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
+}
+```
+
+### promise style
+```js
+const {getPem} = require('google-p12-pem');
+getPem('/path/to/key.p12')
+ .then(pem => {
+ console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
+ })
+ .catch(err => {
+ console.error(err); // :(
+ });
+
+```
+
+### callback style
+```js
+const {getPem} = require('google-p12-pem');
+getPem('/path/to/key.p12', function(err, pem) {
+ console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
+});
+```
+
+### CLI style
+
+``` sh
+gp12-pem myfile.p12 > output.pem
+```
+
+## License
+[MIT](LICENSE)
+
+[david-image]: https://david-dm.org/google/google-p12-pem.svg
+[david-url]: https://david-dm.org/google/google-p12-pem
+[david-dev-image]: https://david-dm.org/google/google-p12-pem/dev-status.svg
+[david-dev-url]: https://david-dm.org/google/google-p12-pem?type=dev
+[npm-image]: https://img.shields.io/npm/v/google-p12-pem.svg
+[npm-url]: https://www.npmjs.com/package/google-p12-pem
+[snyk-image]: https://snyk.io/test/github/google/google-p12-pem/badge.svg
+[snyk-url]: https://snyk.io/test/github/google/google-p12-pem
+[travis-image]: https://travis-ci.org/google/google-p12-pem.svg?branch=master
+[travis-url]: https://travis-ci.org/google/google-p12-pem
diff --git a/express-server/node_modules/google-p12-pem/build/src/bin/gp12-pem.d.ts b/express-server/node_modules/google-p12-pem/build/src/bin/gp12-pem.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/express-server/node_modules/google-p12-pem/build/src/bin/gp12-pem.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/express-server/node_modules/google-p12-pem/build/src/bin/gp12-pem.js b/express-server/node_modules/google-p12-pem/build/src/bin/gp12-pem.js
new file mode 100644
index 00000000..3a2fabcd
--- /dev/null
+++ b/express-server/node_modules/google-p12-pem/build/src/bin/gp12-pem.js
@@ -0,0 +1,20 @@
+#!/usr/bin/env node
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var gp12 = require("../index");
+var argv = process.argv;
+var p12Path = argv[2];
+if (!p12Path) {
+ console.error('Please specify a *.p12 file to convert.');
+ process.exit(1);
+}
+gp12.getPem(p12Path, function (err, pem) {
+ if (err) {
+ console.log(err);
+ process.exit(1);
+ }
+ else {
+ console.log(pem);
+ }
+});
+//# sourceMappingURL=gp12-pem.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-p12-pem/build/src/bin/gp12-pem.js.map b/express-server/node_modules/google-p12-pem/build/src/bin/gp12-pem.js.map
new file mode 100644
index 00000000..496638be
--- /dev/null
+++ b/express-server/node_modules/google-p12-pem/build/src/bin/gp12-pem.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"gp12-pem.js","sourceRoot":"","sources":["../../../src/bin/gp12-pem.ts"],"names":[],"mappings":";;;AACA,+BAAiC;AAEjC,IAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAC1B,IAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAExB,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACb,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;IACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,UAAC,GAAG,EAAE,GAAG;IAC5B,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACR,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,IAAI,CAAC,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC,CAAC,CAAC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-p12-pem/build/src/index.d.ts b/express-server/node_modules/google-p12-pem/build/src/index.d.ts
new file mode 100644
index 00000000..6e5eb81a
--- /dev/null
+++ b/express-server/node_modules/google-p12-pem/build/src/index.d.ts
@@ -0,0 +1,9 @@
+/**
+ * Convert a .p12 file to .pem string
+ * @param filename The .p12 key filename.
+ * @param callback The callback function.
+ * @return A promise that resolves with the .pem private key
+ * if no callback provided.
+ */
+export declare function getPem(filename: string): Promise;
+export declare function getPem(filename: string, callback: (err: Error | null, pem: string | null) => void): void;
diff --git a/express-server/node_modules/google-p12-pem/build/src/index.js b/express-server/node_modules/google-p12-pem/build/src/index.js
new file mode 100644
index 00000000..35dab0be
--- /dev/null
+++ b/express-server/node_modules/google-p12-pem/build/src/index.js
@@ -0,0 +1,42 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var fs = require("fs");
+var forge = require("node-forge");
+var pify = require("pify");
+var readFile = pify(fs.readFile);
+function getPem(filename, callback) {
+ if (callback) {
+ getPemAsync(filename)
+ .then(function (pem) { return callback(null, pem); })
+ .catch(function (err) { return callback(err, null); });
+ }
+ else {
+ return getPemAsync(filename);
+ }
+}
+exports.getPem = getPem;
+function getPemAsync(filename) {
+ return readFile(filename, { encoding: 'base64' }).then(function (keyp12) {
+ return convertToPem(keyp12);
+ });
+}
+/**
+ * Converts a P12 in base64 encoding to a pem.
+ * @param p12base64 String containing base64 encoded p12.
+ * @returns a string containing the pem.
+ */
+function convertToPem(p12base64) {
+ var p12Der = forge.util.decode64(p12base64);
+ var p12Asn1 = forge.asn1.fromDer(p12Der);
+ var p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, 'notasecret');
+ var bags = p12.getBags({ friendlyName: 'privatekey' });
+ if (bags.friendlyName) {
+ var privateKey = bags.friendlyName[0].key;
+ var pem = forge.pki.privateKeyToPem(privateKey);
+ return pem.replace(/\r\n/g, '\n');
+ }
+ else {
+ throw new Error('Unable to get friendly name.');
+ }
+}
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/google-p12-pem/build/src/index.js.map b/express-server/node_modules/google-p12-pem/build/src/index.js.map
new file mode 100644
index 00000000..0b4775b3
--- /dev/null
+++ b/express-server/node_modules/google-p12-pem/build/src/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,uBAAyB;AACzB,kCAAoC;AACpC,2BAA6B;AAE7B,IAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;AAanC,gBACI,QAAgB,EAAE,QA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AAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAAC,IAAI,CAAC,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;AACH,CAAC"}
\ No newline at end of file
diff --git a/express-server/node_modules/google-p12-pem/package.json b/express-server/node_modules/google-p12-pem/package.json
new file mode 100644
index 00000000..159f02e6
--- /dev/null
+++ b/express-server/node_modules/google-p12-pem/package.json
@@ -0,0 +1,80 @@
+{
+ "_from": "google-p12-pem@^1.0.0",
+ "_id": "google-p12-pem@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==",
+ "_location": "/google-p12-pem",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "google-p12-pem@^1.0.0",
+ "name": "google-p12-pem",
+ "escapedName": "google-p12-pem",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/gtoken"
+ ],
+ "_resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz",
+ "_shasum": "c8a3843504012283a0dbffc7430b7c753ecd4b07",
+ "_spec": "google-p12-pem@^1.0.0",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\gtoken",
+ "author": {
+ "name": "Ryan Seys"
+ },
+ "bin": {
+ "gp12-pem": "build/src/bin/gp12-pem.js"
+ },
+ "bugs": {
+ "url": "https://github.com/google/google-p12-pem/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "node-forge": "^0.7.4",
+ "pify": "^3.0.0"
+ },
+ "deprecated": false,
+ "description": "Convert Google .p12 keys to .pem keys",
+ "devDependencies": {
+ "@types/mocha": "^2.2.48",
+ "@types/node": "^9.4.6",
+ "@types/node-forge": "^0.7.2",
+ "@types/pify": "^3.0.0",
+ "codecov": "^3.0.0",
+ "gts": "latest",
+ "js-green-licenses": "^0.5.0",
+ "mocha": "^5.0.2",
+ "nyc": "^11.4.1",
+ "typescript": "~2.7.2"
+ },
+ "files": [
+ "LICENSE",
+ "README.md",
+ "build/src"
+ ],
+ "homepage": "https://github.com/google/google-p12-pem#readme",
+ "license": "MIT",
+ "main": "build/src/index.js",
+ "name": "google-p12-pem",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/google/google-p12-pem.git"
+ },
+ "scripts": {
+ "check": "gts check",
+ "clean": "gts clean",
+ "codecov": "nyc report --reporter=json && codecov -f coverage/*.json",
+ "compile": "tsc -p .",
+ "fix": "gts fix",
+ "license-check": "jsgl --local .",
+ "posttest": "npm run check && npm run license-check",
+ "prepare": "npm run compile",
+ "pretest": "npm run compile",
+ "test": "nyc mocha build/test"
+ },
+ "types": "./build/src/index.d.ts",
+ "version": "1.0.2"
+}
diff --git a/express-server/node_modules/googleapi/index.js b/express-server/node_modules/googleapi/index.js
new file mode 100644
index 00000000..35724c71
--- /dev/null
+++ b/express-server/node_modules/googleapi/index.js
@@ -0,0 +1,9 @@
+/**
+ * GoogleAPI
+ *
+ * Under construction
+ */
+
+module.exports = function(){
+ console.log('module under construction');
+};
diff --git a/express-server/node_modules/googleapi/package.json b/express-server/node_modules/googleapi/package.json
new file mode 100644
index 00000000..cf60f9b1
--- /dev/null
+++ b/express-server/node_modules/googleapi/package.json
@@ -0,0 +1,48 @@
+{
+ "_from": "googleapi",
+ "_id": "googleapi@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-knBKNCfC/QHqQhmpLBsPvGtCGVQ=",
+ "_location": "/googleapi",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "googleapi",
+ "name": "googleapi",
+ "escapedName": "googleapi",
+ "rawSpec": "",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/googleapi/-/googleapi-1.0.2.tgz",
+ "_shasum": "92704a3427c2fd01ea4219a92c1b0fbc6b421954",
+ "_spec": "googleapi",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server",
+ "author": {
+ "name": "Malik Nurmatov",
+ "email": "mnurmatov@gmail.com",
+ "url": "https://github.com/maliknurmatov"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Google API",
+ "keywords": [
+ "google",
+ "api",
+ "rest",
+ "node",
+ "search"
+ ],
+ "license": "BSD-2-Clause",
+ "main": "index.js",
+ "name": "googleapi",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "1.0.2"
+}
diff --git a/express-server/node_modules/googleapis-common/CHANGELOG.md b/express-server/node_modules/googleapis-common/CHANGELOG.md
new file mode 100644
index 00000000..38cb49cf
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/CHANGELOG.md
@@ -0,0 +1,18 @@
+# Changelog
+
+[npm history][1]
+
+[1]: https://www.npmjs.com/package/nodejs-googleapis-common?activeTab=versions
+
+## v0.3.0
+
+This release uses the 2.0 release of `google-auth-library`. A summary of these changes (including breaking changes) can be found in the [release notes](https://github.com/google/google-auth-library-nodejs/releases/tag/v2.0.0).
+
+### Dependencies
+- Upgrade to google-auth-library 2.0 (#6)
+
+## v0.2.1
+
+### Fixes
+- fix: use the latest google-auth-library (#4)
+
diff --git a/express-server/node_modules/googleapis-common/LICENSE b/express-server/node_modules/googleapis-common/LICENSE
new file mode 100644
index 00000000..b7c9ed18
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2013 Google Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/express-server/node_modules/googleapis-common/README.md b/express-server/node_modules/googleapis-common/README.md
new file mode 100644
index 00000000..472c26d6
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/README.md
@@ -0,0 +1,76 @@
+
+
+# [Google APIs Common Module: Node.js Client](https://github.com/google/google-api-nodejs-client)
+
+[](https://cloud.google.com/terms/launch-stages)
+
+> Node.js googleapis common package
+
+Google Cloud Common node.js module contains stuff used by other Cloud API modules.
+
+* [github.com/googlecloudplatform/google-cloud-node](https://github.com/googlecloudplatform/google-cloud-node)
+
+Read more about the client libraries for Cloud APIs, including the older
+Google APIs Client Libraries, in [Client Libraries Explained][explained].
+
+[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
+
+**Table of contents:**
+
+* [Quickstart](#quickstart)
+ * [Before you begin](#before-you-begin)
+ * [Installing the client library](#installing-the-client-library)
+ * [Using the client library](#using-the-client-library)
+* [Versioning](#versioning)
+* [Contributing](#contributing)
+* [License](#license)
+
+## Quickstart
+
+### Before you begin
+
+1. Select or create a Cloud Platform project.
+
+ [Go to the projects page][projects]
+
+1. Enable billing for your project.
+
+ [Enable billing][billing]
+
+1. [Set up authentication with a service account][auth] so you can access the
+ API from your local workstation.
+
+[projects]: https://console.cloud.google.com/project
+[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
+[auth]: https://cloud.google.com/docs/authentication/getting-started
+
+### Installing the package
+
+ npm install --save googleapis-common
+
+It's unlikely you will need to install this package directly, as it will be
+installed as a dependency when you install other `@google` packages.
+
+## Versioning
+
+This library follows [Semantic Versioning](http://semver.org/).
+
+This library is considered to be in **alpha**. This means it is still a
+work-in-progress and under active development. Any release is subject to
+backwards-incompatible changes at any time.
+
+More Information: [Google Cloud Platform Launch Stages][launch_stages]
+
+[launch_stages]: https://cloud.google.com/terms/launch-stages
+
+## Contributing
+
+Contributions welcome! See the [Contributing Guide](https://github.com/googlecloudplatform/google-cloud-node/blob/master/.github/CONTRIBUTING.md).
+
+## License
+
+Apache Version 2.0
+
+See [LICENSE](https://github.com/googlecloudplatform/google-cloud-node/blob/master/LICENSE)
+
+[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png
diff --git a/express-server/node_modules/googleapis-common/build/src/api.d.ts b/express-server/node_modules/googleapis-common/build/src/api.d.ts
new file mode 100644
index 00000000..1c3d5bb3
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/api.d.ts
@@ -0,0 +1,59 @@
+import { AxiosAdapter, AxiosProxyConfig, AxiosRequestConfig, AxiosResponse, AxiosTransformer, CancelToken } from 'axios';
+import { OAuth2Client } from 'google-auth-library';
+import { Endpoint } from './endpoint';
+export interface APIRequestParams {
+ options: AxiosRequestConfig;
+ params: T;
+ requiredParams: string[];
+ pathParams: string[];
+ context: APIRequestContext;
+ mediaUrl?: string | null;
+}
+export interface GoogleConfigurable {
+ _options: GlobalOptions;
+}
+export interface APIRequestContext {
+ google?: GoogleConfigurable;
+ _options: GlobalOptions;
+}
+/**
+ * This interface is a mix of the AxiosRequestConfig options
+ * and our `auth: OAuth2Client|string` options. We need to redefine
+ * the interface here because the `auth` property already exists
+ * on AxiosRequestConfig, and uses an entirely different type.
+ */
+export interface GlobalOptions {
+ url?: string;
+ method?: string;
+ baseURL?: string;
+ transformRequest?: AxiosTransformer | AxiosTransformer[];
+ transformResponse?: AxiosTransformer | AxiosTransformer[];
+ headers?: any;
+ params?: any;
+ paramsSerializer?: (params: any) => string;
+ data?: any;
+ timeout?: number;
+ withCredentials?: boolean;
+ adapter?: AxiosAdapter;
+ auth?: OAuth2Client | string;
+ responseType?: string;
+ xsrfCookieName?: string;
+ xsrfHeaderName?: string;
+ onUploadProgress?: (progressEvent: any) => void;
+ onDownloadProgress?: (progressEvent: any) => void;
+ maxContentLength?: number;
+ validateStatus?: (status: number) => boolean;
+ maxRedirects?: number;
+ httpAgent?: any;
+ httpsAgent?: any;
+ proxy?: AxiosProxyConfig | false;
+ cancelToken?: CancelToken;
+}
+export interface MethodOptions extends AxiosRequestConfig {
+ rootUrl?: string;
+}
+export interface ServiceOptions extends GlobalOptions {
+ version?: string;
+}
+export declare type BodyResponseCallback = (err: Error | null, res?: AxiosResponse | null) => void;
+export declare type APIEndpoint = Readonly;
diff --git a/express-server/node_modules/googleapis-common/build/src/api.js b/express-server/node_modules/googleapis-common/build/src/api.js
new file mode 100644
index 00000000..ca94da48
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/api.js
@@ -0,0 +1,15 @@
+"use strict";
+// Copyright 2018, Google, LLC.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=api.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/api.js.map b/express-server/node_modules/googleapis-common/build/src/api.js.map
new file mode 100644
index 00000000..bec4340d
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/api.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/apiIndex.d.ts b/express-server/node_modules/googleapis-common/build/src/apiIndex.d.ts
new file mode 100644
index 00000000..d6bfaba2
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/apiIndex.d.ts
@@ -0,0 +1,4 @@
+import { GoogleConfigurable, ServiceOptions } from '.';
+export declare function getAPI(api: string, options: ServiceOptions | string, versions: {
+ [index: string]: any;
+}, context?: GoogleConfigurable): T;
diff --git a/express-server/node_modules/googleapis-common/build/src/apiIndex.js b/express-server/node_modules/googleapis-common/build/src/apiIndex.js
new file mode 100644
index 00000000..ff4fc578
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/apiIndex.js
@@ -0,0 +1,40 @@
+"use strict";
+// Copyright 2018, Google, LLC.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", { value: true });
+function getAPI(api, options,
+// tslint:disable-next-line no-any
+versions, context) {
+ let version;
+ if (typeof options === 'string') {
+ version = options;
+ options = {};
+ }
+ else if (typeof options === 'object') {
+ version = options.version;
+ delete options.version;
+ }
+ else {
+ throw new Error('Argument error: Accepts only string or object');
+ }
+ try {
+ const ctr = versions[version];
+ const ep = new ctr(options, context);
+ return Object.freeze(ep);
+ }
+ catch (e) {
+ throw new Error(`Unable to load endpoint ${api}("${version}"): ${e.message}`);
+ }
+}
+exports.getAPI = getAPI;
+//# sourceMappingURL=apiIndex.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/apiIndex.js.map b/express-server/node_modules/googleapis-common/build/src/apiIndex.js.map
new file mode 100644
index 00000000..27f3e151
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/apiIndex.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"apiIndex.js","sourceRoot":"","sources":["../../src/apiIndex.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAIjC,SAAgB,MAAM,CAClB,GAAW,EAAE,OAA8B;AAC3C,kCAAkC;AAClC,QAAgC,EAAE,OAA4B;IAChE,IAAI,OAAe,CAAC;IACpB,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,OAAO,GAAG,OAAO,CAAC;QAClB,OAAO,GAAG,EAAE,CAAC;KACd;SAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QACtC,OAAO,GAAG,OAAO,CAAC,OAAQ,CAAC;QAC3B,OAAO,OAAO,CAAC,OAAO,CAAC;KACxB;SAAM;QACL,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KAClE;IACD,IAAI;QACF,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC9B,MAAM,EAAE,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACrC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,CAAM,CAAC;KAC/B;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CACX,2BAA2B,GAAG,KAAK,OAAO,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACnE;AACH,CAAC;AAtBD,wBAsBC"}
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/apirequest.d.ts b/express-server/node_modules/googleapis-common/build/src/apirequest.d.ts
new file mode 100644
index 00000000..338fc8bf
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/apirequest.d.ts
@@ -0,0 +1,10 @@
+import { AxiosPromise } from 'axios';
+import { BodyResponseCallback } from 'google-auth-library/build/src/transporters';
+import { APIRequestParams } from './api';
+/**
+ * Create and send request to Google API
+ * @param parameters Parameters used to form request
+ * @param callback Callback when request finished or error found
+ */
+export declare function createAPIRequest(parameters: APIRequestParams): AxiosPromise;
+export declare function createAPIRequest(parameters: APIRequestParams, callback: BodyResponseCallback): void;
diff --git a/express-server/node_modules/googleapis-common/build/src/apirequest.js b/express-server/node_modules/googleapis-common/build/src/apirequest.js
new file mode 100644
index 00000000..a3ae0160
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/apirequest.js
@@ -0,0 +1,249 @@
+"use strict";
+// Copyright 2014-2016, Google, Inc.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const google_auth_library_1 = require("google-auth-library");
+const qs = require("qs");
+const stream = require("stream");
+const urlTemplate = require("url-template");
+const uuid = require("uuid");
+const maxContentLength = Math.pow(2, 31);
+// tslint:disable-next-line no-var-requires
+const pkg = require('../../package.json');
+const USER_AGENT = `google-api-nodejs-client/${pkg.version} (gzip)`;
+function isReadableStream(obj) {
+ return obj instanceof stream.Readable && typeof obj._read === 'function';
+}
+function getMissingParams(params, required) {
+ const missing = new Array();
+ required.forEach(param => {
+ // Is the required param in the params object?
+ if (params[param] === undefined) {
+ missing.push(param);
+ }
+ });
+ // If there are any required params missing, return their names in array,
+ // otherwise return null
+ return missing.length > 0 ? missing : null;
+}
+function createAPIRequest(parameters, callback) {
+ if (callback) {
+ createAPIRequestAsync(parameters).then(r => callback(null, r), callback);
+ }
+ else {
+ return createAPIRequestAsync(parameters);
+ }
+}
+exports.createAPIRequest = createAPIRequest;
+function createAPIRequestAsync(parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ let params = parameters.params;
+ const options = Object.assign({}, parameters.options);
+ // Create a new params object so it can no longer be modified from outside
+ // code Also support global and per-client params, but allow them to be
+ // overriden per-request
+ const topOptions = parameters.context.google ?
+ parameters.context.google._options.params :
+ {};
+ params = Object.assign({}, // New base object
+ topOptions, // Global params
+ parameters.context._options.params, // Per-client params
+ params // API call params
+ );
+ const media = params.media || {};
+ /**
+ * In a previous version of this API, the request body was stuffed in a field
+ * named `resource`. This caused lots of problems, because it's not uncommon
+ * to have an actual named parameter required which is also named `resource`.
+ * This mean that users would have to use `resource_` in those cases, which
+ * pretty much nobody figures out on their own. The request body is now
+ * documented as being in the `requestBody` property, but we also need to keep
+ * using `resource` for reasons of back-compat. Cases that need to be covered
+ * here:
+ * - user provides just a `resource` with a request body
+ * - user provides both a `resource` and a `resource_`
+ * - user provides just a `requestBody`
+ * - user provides both a `requestBody` and a `resource`
+ */
+ const resource = params.requestBody ? params.requestBody : params.resource;
+ if (!params.requestBody && params.resource) {
+ delete params.resource;
+ }
+ delete params.requestBody;
+ let authClient = params.auth || parameters.context._options.auth ||
+ (parameters.context.google ? parameters.context.google._options.auth :
+ null);
+ const defaultMime = typeof media.body === 'string' ?
+ 'text/plain' :
+ 'application/octet-stream';
+ delete params.media;
+ delete params.auth;
+ // Grab headers from user provided options
+ const headers = params.headers || {};
+ delete params.headers;
+ // Un-alias parameters that were modified due to conflicts with reserved names
+ Object.keys(params).forEach(key => {
+ if (key.slice(-1) === '_') {
+ const newKey = key.slice(0, -1);
+ params[newKey] = params[key];
+ delete params[key];
+ }
+ });
+ // Check for missing required parameters in the API request
+ const missingParams = getMissingParams(params, parameters.requiredParams);
+ if (missingParams) {
+ // Some params are missing - stop further operations and inform the
+ // developer which required params are not included in the request
+ throw new Error('Missing required parameters: ' + missingParams.join(', '));
+ }
+ // Parse urls
+ if (options.url) {
+ options.url = urlTemplate.parse(options.url).expand(params);
+ }
+ if (parameters.mediaUrl) {
+ parameters.mediaUrl = urlTemplate.parse(parameters.mediaUrl).expand(params);
+ }
+ // When forming the querystring, override the serializer so that array
+ // values are serialized like this:
+ // myParams: ['one', 'two'] ---> 'myParams=one&myParams=two'
+ // This serializer also encodes spaces in the querystring as `%20`,
+ // whereas the default serializer in axios encodes to a `+`.
+ options.paramsSerializer = (params) => {
+ return qs.stringify(params, { arrayFormat: 'repeat' });
+ };
+ // delete path parameters from the params object so they do not end up in
+ // query
+ parameters.pathParams.forEach(param => {
+ delete params[param];
+ });
+ // if authClient is actually a string, use it as an API KEY
+ if (typeof authClient === 'string') {
+ params.key = params.key || authClient;
+ authClient = undefined;
+ }
+ if (parameters.mediaUrl && media.body) {
+ options.url = parameters.mediaUrl;
+ if (resource) {
+ // Axios doesn't support multipart/related uploads, so it has to
+ // be implemented here.
+ params.uploadType = 'multipart';
+ const multipart = [
+ { 'Content-Type': 'application/json', body: JSON.stringify(resource) }, {
+ 'Content-Type': media.mimeType || (resource && resource.mimeType) || defaultMime,
+ body: media.body // can be a readable stream or raw string!
+ }
+ ];
+ const boundary = uuid.v4();
+ const finale = `--${boundary}--`;
+ const rStream = new stream.PassThrough();
+ const pStream = new ProgressStream();
+ const isStream = isReadableStream(multipart[1].body);
+ headers['Content-Type'] = `multipart/related; boundary=${boundary}`;
+ for (const part of multipart) {
+ const preamble = `--${boundary}\r\nContent-Type: ${part['Content-Type']}\r\n\r\n`;
+ rStream.push(preamble);
+ if (typeof part.body === 'string') {
+ rStream.push(part.body);
+ rStream.push('\r\n');
+ }
+ else {
+ // Axios does not natively support onUploadProgress in node.js.
+ // Pipe through the pStream first to read the number of bytes read
+ // for the purpose of tracking progress.
+ pStream.on('progress', bytesRead => {
+ if (options.onUploadProgress) {
+ options.onUploadProgress({ bytesRead });
+ }
+ });
+ part.body.pipe(pStream).pipe(rStream, { end: false });
+ part.body.on('end', () => {
+ rStream.push('\r\n');
+ rStream.push(finale);
+ rStream.push(null);
+ });
+ }
+ }
+ if (!isStream) {
+ rStream.push(finale);
+ rStream.push(null);
+ }
+ options.data = rStream;
+ }
+ else {
+ params.uploadType = 'media';
+ Object.assign(headers, { 'Content-Type': media.mimeType || defaultMime });
+ options.data = media.body;
+ }
+ }
+ else {
+ options.data = resource || undefined;
+ }
+ options.headers = headers;
+ options.params = params;
+ // We need to set a default content size, or the max defaults
+ // to 10MB. Setting to 2GB by default.
+ // https://github.com/google/google-api-nodejs-client/issues/991
+ options.maxContentLength = options.maxContentLength || maxContentLength;
+ options.headers['Accept-Encoding'] = 'gzip';
+ options.headers['User-Agent'] = USER_AGENT;
+ // By default Axios treats any 2xx as valid, and all non 2xx status
+ // codes as errors. This is a problem for HTTP 304s when used along
+ // with an eTag.
+ if (!options.validateStatus) {
+ options.validateStatus = (status) => {
+ return (status >= 200 && status < 300) || status === 304;
+ };
+ }
+ // Combine the AxiosRequestConfig options passed with this specific
+ // API call witht the global options configured at the API Context
+ // level, or at the global level.
+ const mergedOptions = Object.assign({}, (parameters.context.google ? parameters.context.google._options : {}), parameters.context._options, options);
+ delete mergedOptions.auth; // is overridden by our auth code
+ // Perform the HTTP request. NOTE: this function used to return a
+ // mikeal/request object. Since the transition to Axios, the method is
+ // now void. This may be a source of confusion for users upgrading from
+ // version 24.0 -> 25.0 or up.
+ if (authClient && typeof authClient === 'object') {
+ return authClient.request(mergedOptions);
+ }
+ else {
+ return (new google_auth_library_1.DefaultTransporter()).request(mergedOptions);
+ }
+ });
+}
+/**
+ * Basic Passthrough Stream that records the number of bytes read
+ * every time the cursor is moved.
+ */
+class ProgressStream extends stream.Transform {
+ constructor() {
+ super(...arguments);
+ this.bytesRead = 0;
+ }
+ // tslint:disable-next-line: no-any
+ _transform(chunk, encoding, callback) {
+ this.bytesRead += chunk.length;
+ this.emit('progress', this.bytesRead);
+ this.push(chunk);
+ callback();
+ }
+}
+//# sourceMappingURL=apirequest.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/apirequest.js.map b/express-server/node_modules/googleapis-common/build/src/apirequest.js.map
new file mode 100644
index 00000000..aa78a0de
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/apirequest.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"apirequest.js","sourceRoot":"","sources":["../../src/apirequest.ts"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;AAGjC,6DAAqE;AAErE,yBAAyB;AACzB,iCAAiC;AACjC,4CAA4C;AAC5C,6BAA6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;QAClE,sEAAsE;QACtE,wEAAwE;QACxE,8BAA8B;QAC9B,IAAI,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;YAChD,OAAQ,UAA2B,CAAC,OAAO,CAAI,aAAa,CAAC,CAAC;SAC/D;aAAM;YACL,OAAO,CAAC,IAAI,wCAAkB,EAAE,CAAC,CAAC,OAAO,CAAI,aAAa,CAAC,CAAC;SAC7D;IACH,CAAC;CAAA;AAED;;;GAGG;AACH,MAAM,cAAe,SAAQ,MAAM,CAAC,SAAS;IAA7C;;QACE,cAAS,GAAG,CAAC,CAAC;IAQhB,CAAC;IAPC,mCAAmC;IACnC,UAAU,CAAC,KAAU,EAAE,QAAgB,EAAE,QAAkB;QACzD,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjB,QAAQ,EAAE,CAAC;IACb,CAAC;CACF"}
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/discovery.d.ts b/express-server/node_modules/googleapis-common/build/src/discovery.d.ts
new file mode 100644
index 00000000..3eea6205
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/discovery.d.ts
@@ -0,0 +1,42 @@
+import { GlobalOptions } from './api';
+import { Endpoint } from './endpoint';
+export declare type EndpointCreator = (options: GlobalOptions, google: {}) => Endpoint;
+export interface DiscoveryOptions {
+ includePrivate?: boolean;
+ debug?: boolean;
+}
+export declare class Discovery {
+ private transporter;
+ private options;
+ /**
+ * Discovery for discovering API endpoints
+ *
+ * @param options Options for discovery
+ */
+ constructor(options: DiscoveryOptions);
+ /**
+ * Generate and Endpoint from an endpoint schema object.
+ *
+ * @param schema The schema from which to generate the Endpoint.
+ * @return A function that creates an endpoint.
+ */
+ private makeEndpoint;
+ /**
+ * Log output of generator. Works just like console.log
+ */
+ private log;
+ /**
+ * Generate all APIs and return as in-memory object.
+ * @param discoveryUrl
+ */
+ discoverAllAPIs(discoveryUrl: string): Promise<{}>;
+ /**
+ * Generate API file given discovery URL
+ *
+ * @param apiDiscoveryUrl URL or filename of discovery doc for API
+ * @returns A promise that resolves with a function that creates the endpoint
+ */
+ discoverAPI(apiDiscoveryUrl: string | {
+ url: string;
+ }): Promise;
+}
diff --git a/express-server/node_modules/googleapis-common/build/src/discovery.js b/express-server/node_modules/googleapis-common/build/src/discovery.js
new file mode 100644
index 00000000..03bf55fe
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/discovery.js
@@ -0,0 +1,152 @@
+"use strict";
+// Copyright 2014-2016, Google, Inc.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const fs = require("fs");
+const google_auth_library_1 = require("google-auth-library");
+const pify = require("pify");
+const url = require("url");
+const util = require("util");
+const apirequest_1 = require("./apirequest");
+const endpoint_1 = require("./endpoint");
+const fsp = pify(fs);
+class Discovery {
+ /**
+ * Discovery for discovering API endpoints
+ *
+ * @param options Options for discovery
+ */
+ constructor(options) {
+ this.transporter = new google_auth_library_1.DefaultTransporter();
+ this.options = options || {};
+ }
+ /**
+ * Generate and Endpoint from an endpoint schema object.
+ *
+ * @param schema The schema from which to generate the Endpoint.
+ * @return A function that creates an endpoint.
+ */
+ makeEndpoint(schema) {
+ return (options) => {
+ const ep = new endpoint_1.Endpoint(options);
+ ep.applySchema(ep, schema, schema, ep);
+ return ep;
+ };
+ }
+ /**
+ * Log output of generator. Works just like console.log
+ */
+ log(...args) {
+ if (this.options && this.options.debug) {
+ console.log.apply(this, arguments);
+ }
+ }
+ /**
+ * Generate all APIs and return as in-memory object.
+ * @param discoveryUrl
+ */
+ discoverAllAPIs(discoveryUrl) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const headers = this.options.includePrivate ? {} : { 'X-User-Ip': '0.0.0.0' };
+ const res = yield this.transporter.request({ url: discoveryUrl, headers });
+ const items = res.data.items;
+ const apis = yield Promise.all(items.map((api) => __awaiter(this, void 0, void 0, function* () {
+ const endpointCreator = yield this.discoverAPI(api.discoveryRestUrl);
+ return { api, endpointCreator };
+ })));
+ const versionIndex = {};
+ // tslint:disable-next-line no-any
+ const apisIndex = {};
+ for (const set of apis) {
+ if (!apisIndex[set.api.name]) {
+ versionIndex[set.api.name] = {};
+ apisIndex[set.api.name] = (options) => {
+ const type = typeof options;
+ let version;
+ if (type === 'string') {
+ version = options;
+ options = {};
+ }
+ else if (type === 'object') {
+ version = options.version;
+ delete options.version;
+ }
+ else {
+ throw new Error('Argument error: Accepts only string or object');
+ }
+ try {
+ const ep =
+ // tslint:disable-next-line: no-any
+ set.endpointCreator(options, this);
+ return Object.freeze(ep); // create new & freeze
+ }
+ catch (e) {
+ throw new Error(util.format('Unable to load endpoint %s("%s"): %s', set.api.name, version, e.message));
+ }
+ };
+ }
+ versionIndex[set.api.name][set.api.version] = set.endpointCreator;
+ }
+ return apisIndex;
+ });
+ }
+ /**
+ * Generate API file given discovery URL
+ *
+ * @param apiDiscoveryUrl URL or filename of discovery doc for API
+ * @returns A promise that resolves with a function that creates the endpoint
+ */
+ discoverAPI(apiDiscoveryUrl) {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (typeof apiDiscoveryUrl === 'string') {
+ const parts = url.parse(apiDiscoveryUrl);
+ if (apiDiscoveryUrl && !parts.protocol) {
+ this.log('Reading from file ' + apiDiscoveryUrl);
+ const file = yield fsp.readFile(apiDiscoveryUrl, { encoding: 'utf8' });
+ return this.makeEndpoint(JSON.parse(file));
+ }
+ else {
+ this.log('Requesting ' + apiDiscoveryUrl);
+ const res = yield this.transporter.request({ url: apiDiscoveryUrl });
+ return this.makeEndpoint(res.data);
+ }
+ }
+ else {
+ const options = apiDiscoveryUrl;
+ this.log('Requesting ' + options.url);
+ const url = options.url;
+ delete options.url;
+ const parameters = {
+ options: { url, method: 'GET' },
+ requiredParams: [],
+ pathParams: [],
+ params: options,
+ context: { google: { _options: {} }, _options: {} }
+ };
+ const pcr = pify(apirequest_1.createAPIRequest);
+ const res = yield pcr(parameters);
+ return this.makeEndpoint(res.data);
+ }
+ });
+ }
+}
+exports.Discovery = Discovery;
+//# sourceMappingURL=discovery.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/discovery.js.map b/express-server/node_modules/googleapis-common/build/src/discovery.js.map
new file mode 100644
index 00000000..6d80f7e9
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/discovery.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../../src/discovery.ts"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;AAEjC,yBAAyB;AACzB,6DAAuD;AACvD,6BAA6B;AAC7B,2BAA2B;AAC3B,6BAA6B;AAE7B,6CAA8C;AAC9C,yCAAoC;AAKpC,MAAM,GAAG,GAAG,IAAI,CA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ACd,MAAM,EAAE,OAAO;oBACf,OAAO,EAAE,EAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAC,EAAE,QAAQ,EAAE,EAAE,EAAC;iBAChD,CAAC;gBACF,MAAM,GAAG,GAAG,IAAI,CAAC,6BAAgB,CAAC,CAAC;gBACnC,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,CAAC;gBAClC,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;aACpC;QACH,CAAC;KAAA;CACF;AA3HD,8BA2HC"}
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/endpoint.d.ts b/express-server/node_modules/googleapis-common/build/src/endpoint.d.ts
new file mode 100644
index 00000000..284ee09d
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/endpoint.d.ts
@@ -0,0 +1,42 @@
+import { APIRequestContext, GlobalOptions } from './api';
+import { Schema, SchemaResource } from './schema';
+export interface Target {
+ [index: string]: {};
+}
+export declare class Endpoint implements Target, APIRequestContext {
+ _options: GlobalOptions;
+ google: any;
+ [index: string]: {};
+ constructor(options: {});
+ /**
+ * Given a schema, add methods and resources to a target.
+ *
+ * @param {object} target The target to which to apply the schema.
+ * @param {object} rootSchema The top-level schema, so we don't lose track of it
+ * during recursion.
+ * @param {object} schema The current schema from which to extract methods and
+ * resources.
+ * @param {object} context The context to add to each method.
+ */
+ applySchema(target: Target, rootSchema: Schema, schema: SchemaResource, context: APIRequestContext): void;
+ /**
+ * Given a schema, add methods to a target.
+ *
+ * @param {object} target The target to which to apply the methods.
+ * @param {object} rootSchema The top-level schema, so we don't lose track of it
+ * during recursion.
+ * @param {object} schema The current schema from which to extract methods.
+ * @param {object} context The context to add to each method.
+ */
+ private applyMethodsFromSchema;
+ /**
+ * Given a method schema, add a method to a target.
+ *
+ * @param target The target to which to add the method.
+ * @param schema The top-level schema that contains the rootUrl, etc.
+ * @param method The method schema from which to generate the method.
+ * @param context The context to add to the method.
+ */
+ private makeMethod;
+ private getPathParams;
+}
diff --git a/express-server/node_modules/googleapis-common/build/src/endpoint.js b/express-server/node_modules/googleapis-common/build/src/endpoint.js
new file mode 100644
index 00000000..3f2cb89f
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/endpoint.js
@@ -0,0 +1,124 @@
+"use strict";
+// Copyright 2018, Google, LLC.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", { value: true });
+const apirequest_1 = require("./apirequest");
+class Endpoint {
+ constructor(options) {
+ this._options = options || {};
+ }
+ /**
+ * Given a schema, add methods and resources to a target.
+ *
+ * @param {object} target The target to which to apply the schema.
+ * @param {object} rootSchema The top-level schema, so we don't lose track of it
+ * during recursion.
+ * @param {object} schema The current schema from which to extract methods and
+ * resources.
+ * @param {object} context The context to add to each method.
+ */
+ applySchema(target, rootSchema, schema, context) {
+ this.applyMethodsFromSchema(target, rootSchema, schema, context);
+ if (schema.resources) {
+ for (const resourceName in schema.resources) {
+ if (schema.resources.hasOwnProperty(resourceName)) {
+ const resource = schema.resources[resourceName];
+ if (!target[resourceName]) {
+ target[resourceName] = {};
+ }
+ this.applySchema(target[resourceName], rootSchema, resource, context);
+ }
+ }
+ }
+ }
+ /**
+ * Given a schema, add methods to a target.
+ *
+ * @param {object} target The target to which to apply the methods.
+ * @param {object} rootSchema The top-level schema, so we don't lose track of it
+ * during recursion.
+ * @param {object} schema The current schema from which to extract methods.
+ * @param {object} context The context to add to each method.
+ */
+ applyMethodsFromSchema(target, rootSchema, schema, context) {
+ if (schema.methods) {
+ for (const name in schema.methods) {
+ if (schema.methods.hasOwnProperty(name)) {
+ const method = schema.methods[name];
+ target[name] = this.makeMethod(rootSchema, method, context);
+ }
+ }
+ }
+ }
+ /**
+ * Given a method schema, add a method to a target.
+ *
+ * @param target The target to which to add the method.
+ * @param schema The top-level schema that contains the rootUrl, etc.
+ * @param method The method schema from which to generate the method.
+ * @param context The context to add to the method.
+ */
+ makeMethod(schema, method, context) {
+ return (paramsOrCallback, callback) => {
+ const params = typeof paramsOrCallback === 'function' ? {} : paramsOrCallback;
+ callback =
+ typeof paramsOrCallback === 'function' ? paramsOrCallback : callback;
+ const schemaUrl = buildurl(schema.rootUrl + schema.servicePath + method.path);
+ const parameters = {
+ options: {
+ url: schemaUrl.substring(1, schemaUrl.length - 1),
+ method: method.httpMethod
+ },
+ params,
+ requiredParams: method.parameterOrder || [],
+ pathParams: this.getPathParams(method.parameters),
+ context
+ };
+ if (method.mediaUpload && method.mediaUpload.protocols &&
+ method.mediaUpload.protocols.simple &&
+ method.mediaUpload.protocols.simple.path) {
+ const mediaUrl = buildurl(schema.rootUrl + method.mediaUpload.protocols.simple.path);
+ parameters.mediaUrl = mediaUrl.substring(1, mediaUrl.length - 1);
+ }
+ if (!callback) {
+ return apirequest_1.createAPIRequest(parameters);
+ }
+ apirequest_1.createAPIRequest(parameters, callback);
+ return;
+ };
+ }
+ getPathParams(params) {
+ const pathParams = new Array();
+ if (typeof params !== 'object') {
+ params = {};
+ }
+ Object.keys(params).forEach(key => {
+ if (params[key].location === 'path') {
+ pathParams.push(key);
+ }
+ });
+ return pathParams;
+ }
+}
+exports.Endpoint = Endpoint;
+/**
+ * Build a string used to create a URL from the discovery doc provided URL.
+ * replace double slashes with single slash (except in https://)
+ * @private
+ * @param input URL to build from
+ * @return Resulting built URL
+ */
+function buildurl(input) {
+ return input ? `'${input}'`.replace(/([^:]\/)\/+/g, '$1') : '';
+}
+//# sourceMappingURL=endpoint.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/endpoint.js.map b/express-server/node_modules/googleapis-common/build/src/endpoint.js.map
new file mode 100644
index 00000000..e618af7e
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/endpoint.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"endpoint.js","sourceRoot":"","sources":["../../src/endpoint.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAKjC,6CAA8C;AAO9C,MAAa,QAAQ;IAMnB,YAAY,OAAW;QACrB,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;;;;OASG;IACH,WAAW,CACP,MAAc,EAAE,UAAkB,EAAE,MAAsB,EAC1D,OAA0B;QAC5B,IAAI,CAAC,sBAAsB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QACjE,IAAI,MAAM,CAAC,SAAS,EAAE;YACpB,KAAK,MAAM,YAAY,IAAI,MAAM,CAAC,SAAS,EAAE;gBAC3C,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE;oBACjD,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;oBAChD,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;wBACzB,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;qBAC3B;oBACD,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;iBACvE;aACF;SACF;IACH,CAAC;IAED;;;;;;;;OAQG;IACK,sBAAsB,CAC1B,MAAc,EAAE,UAAkB,EAAE,MAAsB,EAC1D,OAA0B;QAC5B,IAAI,MAAM,CAAC,OAAO,EAAE;YA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,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE;gBAC5C,MAAM,QAAQ,GACV,QAAQ,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBACxE,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;aAClE;YAED,IAAI,CAAC,QAAQ,EAAE;gBACb,OAAO,6BAAgB,CAAC,UAAU,CAAC,CAAC;aACrC;YACD,6BAAgB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;YACvC,OAAO;QACT,CAAC,CAAC;IACJ,CAAC;IAEO,aAAa,CAAC,MAAyB;QAC7C,MAAM,UAAU,GAAG,IAAI,KAAK,EAAU,CAAC;QACvC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;YAC9B,MAAM,GAAG,EAAE,CAAC;SACb;QACD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAChC,IAAI,MAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,KAAK,MAAM,EAAE;gBACpC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACtB;QACH,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AArHD,4BAqHC;AAED;;;;;;GAMG;AACH,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACjE,CAAC"}
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/index.d.ts b/express-server/node_modules/googleapis-common/build/src/index.d.ts
new file mode 100644
index 00000000..a3f0bea1
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/index.d.ts
@@ -0,0 +1,6 @@
+export { APIEndpoint, APIRequestContext, APIRequestParams, BodyResponseCallback, GlobalOptions, GoogleConfigurable, MethodOptions, ServiceOptions } from './api';
+export { getAPI } from './apiIndex';
+export { createAPIRequest } from './apirequest';
+export { Discovery, DiscoveryOptions, EndpointCreator } from './discovery';
+export { Endpoint, Target } from './endpoint';
+export { FragmentResponse, HttpMethod, ParameterFormat, Schema, SchemaItem, SchemaItems, SchemaMethod, SchemaMethods, SchemaParameter, SchemaParameters, SchemaResource, SchemaResources, Schemas, SchemaType } from './schema';
diff --git a/express-server/node_modules/googleapis-common/build/src/index.js b/express-server/node_modules/googleapis-common/build/src/index.js
new file mode 100644
index 00000000..ee799df7
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/index.js
@@ -0,0 +1,23 @@
+"use strict";
+// Copyright 2018, Google, LLC.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", { value: true });
+var apiIndex_1 = require("./apiIndex");
+exports.getAPI = apiIndex_1.getAPI;
+var apirequest_1 = require("./apirequest");
+exports.createAPIRequest = apirequest_1.createAPIRequest;
+var discovery_1 = require("./discovery");
+exports.Discovery = discovery_1.Discovery;
+var endpoint_1 = require("./endpoint");
+exports.Endpoint = endpoint_1.Endpoint;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/index.js.map b/express-server/node_modules/googleapis-common/build/src/index.js.map
new file mode 100644
index 00000000..ee037d35
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,uCAAkC;AAA1B,4BAAA,MAAM,CAAA;AACd,2CAA8C;AAAtC,wCAAA,gBAAgB,CAAA;AACxB,yCAAyE;AAAjE,gCAAA,SAAS,CAAA;AACjB,uCAA4C;AAApC,8BAAA,QAAQ,CAAA"}
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/schema.d.ts b/express-server/node_modules/googleapis-common/build/src/schema.d.ts
new file mode 100644
index 00000000..82c1ee28
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/schema.d.ts
@@ -0,0 +1,123 @@
+/**
+ * These are a collection of interfaces that represent the GoogleApis
+ * Discovery json formats.
+ */
+export interface Schemas {
+ discoveryVersion: string;
+ kind: string;
+ items: Schema[];
+}
+export interface Schema {
+ auth: {
+ oauth2: {
+ scopes: {
+ [index: string]: {
+ description: string;
+ };
+ };
+ };
+ };
+ basePath: string;
+ baseUrl: string;
+ batchPath: string;
+ description: string;
+ discoveryVersion: string;
+ discoveryRestUrl: string;
+ documentationLink: string;
+ etag: string;
+ icons: {
+ x16: string;
+ x32: string;
+ };
+ id: string;
+ kind: string;
+ methods: SchemaMethods;
+ name: string;
+ ownerDomain: string;
+ ownerName: string;
+ parameters: SchemaParameters;
+ protocol: string;
+ resources: SchemaResources;
+ revision: string;
+ rootUrl: string;
+ schemas: SchemaItems;
+ servicePath: string;
+ title: string;
+ version: string;
+}
+export interface SchemaResources {
+ [index: string]: SchemaResource;
+}
+export interface SchemaResource {
+ methods?: SchemaMethods;
+ resources?: SchemaResources;
+}
+export interface SchemaItems {
+ [index: string]: SchemaItem;
+}
+export interface SchemaItem {
+ description?: string;
+ default?: string;
+ id?: string;
+ properties?: {
+ [index: string]: SchemaItem;
+ };
+ items?: {
+ [index: string]: SchemaItem;
+ };
+ type?: SchemaType;
+ format?: ParameterFormat;
+ $ref?: string;
+}
+export interface SchemaParameters {
+ [index: string]: SchemaParameter;
+}
+export interface SchemaParameter {
+ default: string;
+ description: string;
+ location: string;
+ enum: string[];
+ enumDescription: string[];
+ type: SchemaType;
+ format: ParameterFormat;
+ required: boolean;
+}
+export interface SchemaMethods {
+ [index: string]: SchemaMethod;
+}
+export interface SchemaMethod {
+ description: string;
+ httpMethod: HttpMethod;
+ id: string;
+ parameterOrder?: string[];
+ parameters?: {
+ [index: string]: SchemaParameter;
+ };
+ path: string;
+ request: {
+ $ref: string;
+ };
+ response: {
+ $ref: string;
+ };
+ sampleUrl: string;
+ scopes: string[];
+ fragment: string;
+ mediaUpload: {
+ protocols: {
+ simple: {
+ path: string;
+ };
+ };
+ };
+}
+export interface FragmentResponse {
+ codeFragment: {
+ [index: string]: {
+ fragment: string;
+ };
+ };
+}
+export declare type ParameterFormat = 'int32';
+export declare type HttpMethod = 'GET' | 'PATCH' | 'PUT';
+export declare type SchemaType = 'object' | 'integer' | 'string' | 'array' | 'boolean';
diff --git a/express-server/node_modules/googleapis-common/build/src/schema.js b/express-server/node_modules/googleapis-common/build/src/schema.js
new file mode 100644
index 00000000..07a42ea8
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/schema.js
@@ -0,0 +1,15 @@
+"use strict";
+// Copyright 2018, Google, LLC.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=schema.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/build/src/schema.js.map b/express-server/node_modules/googleapis-common/build/src/schema.js.map
new file mode 100644
index 00000000..e9d3a34e
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/build/src/schema.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis-common/package.json b/express-server/node_modules/googleapis-common/package.json
new file mode 100644
index 00000000..90a88bd3
--- /dev/null
+++ b/express-server/node_modules/googleapis-common/package.json
@@ -0,0 +1,80 @@
+{
+ "_from": "googleapis-common@^0.3.0",
+ "_id": "googleapis-common@0.3.0",
+ "_inBundle": false,
+ "_integrity": "sha512-OqQ2iskzjPHLoM+AXk7e/TmEsdgxyAk8PVbMg0S8v2wPhgMu2wTawEL7zH9QG236u/RqQ1Ak120oSWsamPnWGg==",
+ "_location": "/googleapis-common",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "googleapis-common@^0.3.0",
+ "name": "googleapis-common",
+ "escapedName": "googleapis-common",
+ "rawSpec": "^0.3.0",
+ "saveSpec": null,
+ "fetchSpec": "^0.3.0"
+ },
+ "_requiredBy": [
+ "/googleapis"
+ ],
+ "_resolved": "https://registry.npmjs.org/googleapis-common/-/googleapis-common-0.3.0.tgz",
+ "_shasum": "97ba111f7420367e636a30a2b87be4a7f220c7e9",
+ "_spec": "googleapis-common@^0.3.0",
+ "_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\googleapis",
+ "author": {
+ "name": "Google LLC"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "axios": "^0.18.0",
+ "google-auth-library": "^2.0.0",
+ "pify": "^3.0.0",
+ "qs": "^6.5.2",
+ "url-template": "^2.0.8",
+ "uuid": "^3.2.1"
+ },
+ "deprecated": false,
+ "description": "A common tooling library used by the googleapis npm module. You probably don't want to use this directly.",
+ "devDependencies": {
+ "@types/mocha": "^5.2.5",
+ "@types/nock": "^9.3.0",
+ "@types/pify": "^3.0.2",
+ "@types/qs": "^6.5.1",
+ "@types/url-template": "^2.0.28",
+ "@types/uuid": "^3.4.3",
+ "codecov": "^3.0.4",
+ "gts": "^0.8.0",
+ "ink-docstrap": "^1.3.2",
+ "intelli-espower-loader": "^1.0.1",
+ "jsdoc": "^3.5.5",
+ "mocha": "^5.2.0",
+ "nock": "^9.6.0",
+ "source-map-support": "^0.5.8",
+ "typescript": "~3.0.0"
+ },
+ "files": [
+ "build/src"
+ ],
+ "keywords": [],
+ "license": "Apache-2.0",
+ "main": "build/src/index.js",
+ "name": "googleapis-common",
+ "scripts": {
+ "check": "gts check",
+ "clean": "gts clean",
+ "compile": "tsc -p .",
+ "docs": "jsdoc -c .jsdoc.js",
+ "fix": "gts fix",
+ "lint": "npm run check",
+ "posttest": "npm run check",
+ "prepare": "npm run compile",
+ "presystem-test": "npm run compile",
+ "pretest": "npm run compile",
+ "samples-test": "mocha build/samples-test",
+ "system-test": "mocha build/system-test",
+ "test": "mocha build/test"
+ },
+ "types": "build/src/index.d.ts",
+ "version": "0.3.0"
+}
diff --git a/express-server/node_modules/googleapis/CHANGELOG.md b/express-server/node_modules/googleapis/CHANGELOG.md
new file mode 100644
index 00000000..5519d844
--- /dev/null
+++ b/express-server/node_modules/googleapis/CHANGELOG.md
@@ -0,0 +1,57 @@
+# Changelog
+
+[npm history][1]
+
+[1]: https://www.npmjs.com/package/googleapis?activeTab=versions
+
+## v34.0.0
+
+Welcome to the `googleapis@34` 🎊 This release has breaking changes, new features, and a bunch of bug fixes. Enjoy!
+
+The following APIs have been removed:
+- adexchangeseller/v1.1
+- adexchangeseller/v1'
+- adexchangeseller/v2.0
+- sqladmin/v1beta3
+
+The following APIs have been added:
+- cloudtasks/v2beta3
+- redis/v1
+- file/v1beta1
+- jobs/v3p1beta1
+- videointelligence/v1p1beta1
+
+
+### Fixes
+- fix: upgrade to the latest google-auth-library ([#1313](https://github.com/google/google-api-nodejs-client/pull/1313))
+- fix: add better error handling around sample client and redirect URIs ([#1285](https://github.com/google/google-api-nodejs-client/pull/1285))
+- chore(deps): update dependency p-queue to v3 ([#1310](https://github.com/google/google-api-nodejs-client/pull/1310))
+- chore(deps): update dependency nyc to v13 ([#1307](https://github.com/google/google-api-nodejs-client/pull/1307))
+
+### New Features
+- feat: run the generator ([#1359](https://github.com/google/google-api-nodejs-client/pull/1359))
+- feat: run the generator ([#1326](https://github.com/google/google-api-nodejs-client/pull/1326))
+- feat: run the generator and synth ([#1324](https://github.com/google/google-api-nodejs-client/pull/1324))
+
+### Documentation
+- docs: add supported versions of node.js to the readme ([#1355](https://github.com/google/google-api-nodejs-client/pull/1355))
+- docs: fix generator script path ([#1345](https://github.com/google/google-api-nodejs-client/pull/1345))
+- docs: replace google/ with googleapis/ in URIs ([#1342](https://github.com/google/google-api-nodejs-client/pull/1342))
+- docs: Fix error handling in batchGet sample ([#1338](https://github.com/google/google-api-nodejs-client/pull/1338))
+- docs: Add statement of support to readme ([#1333](https://github.com/google/google-api-nodejs-client/pull/1333))
+- docs: Remove reference docs ([#1331](https://github.com/google/google-api-nodejs-client/pull/1331))
+
+### Internal / Testing Changes
+- Update the kokoro config ([#1353](https://github.com/google/google-api-nodejs-client/pull/1353))
+- test: remove appveyor config ([#1357](https://github.com/google/google-api-nodejs-client/pull/1357))
+- Do not generate libraries with synth ([#1350](https://github.com/google/google-api-nodejs-client/pull/1350))
+- Enable prefer-const in the eslint config ([#1347](https://github.com/google/google-api-nodejs-client/pull/1347))
+- Fix the sample tests ([#1344](https://github.com/google/google-api-nodejs-client/pull/1344))
+- Make npm install timeout configurable ([#1343](https://github.com/google/google-api-nodejs-client/pull/1343))
+- Enable no-var in eslint ([#1340](https://github.com/google/google-api-nodejs-client/pull/1340))
+- Use prettier and eslint on samples ([#1341](https://github.com/google/google-api-nodejs-client/pull/1341))
+- Fix samples tests ([#1323](https://github.com/google/google-api-nodejs-client/pull/1323))
+- Use synth templating and update CI ([#1321](https://github.com/google/google-api-nodejs-client/pull/1321))
+- Retry npm install in CI ([#1320](https://github.com/google/google-api-nodejs-client/pull/1320))
+- Add synth.py for automating client library generation ([#1306](https://github.com/google/google-api-nodejs-client/pull/1306))
+
diff --git a/express-server/node_modules/googleapis/README.md b/express-server/node_modules/googleapis/README.md
new file mode 100644
index 00000000..0592ce2c
--- /dev/null
+++ b/express-server/node_modules/googleapis/README.md
@@ -0,0 +1,545 @@
+
+
+# Google APIs Node.js Client
+
+[![Release Level][releaselevelimg]][releaselevel]
+[![CircleCI][circleimg]][circle]
+[![npm version][npmimg]][npm]
+[![Code Coverage][codecovimg]][codecov]
+[![Downloads][downloadsimg]][downloads]
+[![Dependency Status][david-image]][david-url]
+[![Known Vulnerabilities][snyk-image]][snyk-url]
+
+[Node.js][node] client library for using Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT tokens is included.
+
+* [Google APIs](#google-apis)
+* [Getting started](#getting-started)
+ * [Installation](#installation)
+ * [First example](#first-example)
+ * [Samples](#samples)
+ * [Reference API](#reference-api)
+* [Authentication and authorization](#authentication-and-authorization)
+ * [OAuth2 client](#oauth2-client)
+ * [Using API keys](#using-api-keys)
+ * [Service <--> Service authentication](#service-to-service-authentication)
+ * [Setting global or service-level auth](#setting-global-or-service-level-auth)
+* [Usage](#usage)
+ * [Specifying request body](#specifying-request-body)
+ * [Media uploads](#media-uploads)
+ * [Request Options](#request-options)
+ * [Using a Proxy](#using-a-proxy)
+ * [Supported APIs](#getting-supported-apis)
+ * [TypeScript](#typescript)
+* [License](#license)
+* [Contributing](#contributing)
+* [Questions/problems?](#questionsproblems)
+
+## Google APIs
+The full list of supported APIs can be found [here][supported-list]. The API endpoints are automatically generated, so if the API is not in the list, it is currently not supported by this API client library.
+
+Supported APIs are listed on the [Google APIs Explorer][apiexplorer].
+
+### Working with Google Cloud Platform APIs?
+If you're working with [Google Cloud Platform][cloudplatform] APIs such as Datastore, Cloud Storage or Pub/Sub, consider using the [`@google-cloud`][googlecloud] client libraries: single purpose idiomatic Node.js clients for Google Cloud Platform services.
+
+### Support and maintenance
+These client libraries are official supported by Google. However, these libraries are considered complete and are in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features. For Google Cloud Platform APIs, we recommend using [google-cloud-node](https://github.com/GoogleCloudPlatform/google-cloud-node) which is under active development.
+
+This library supports the maintenance LTS, active LTS, and current release of node.js. See the [node.js release schedule](https://github.com/nodejs/Release) for more information.
+
+## Getting started
+
+### Installation
+This library is distributed on `npm`. In order to add it as a dependency, run the following command:
+
+``` sh
+$ npm install googleapis
+```
+
+### First example
+This is a very simple example. This creates a Blogger client and retrieves the details of a blog given the blog Id:
+
+``` js
+const {google} = require('googleapis');
+
+// Each API may support multiple version. With this sample, we're getting
+// v3 of the blogger API, and using an API key to authenticate.
+const blogger = google.blogger({
+ version: 'v3',
+ auth: 'YOUR API KEY'
+});
+
+const params = {
+ blogId: 3213900
+};
+
+// get the blog details
+blogger.blogs.get(params, (err, res) => {
+ if (err) {
+ console.error(err);
+ throw err;
+ }
+ console.log(`The blog url is ${res.data.url}`);
+});
+```
+
+Instead of using callbacks you can also use promises!
+
+``` js
+blogger.blogs.get(params)
+ .then(res => {
+ console.log(`The blog url is ${res.data.url}`);
+ })
+ .catch(error => {
+ console.error(error);
+ });
+```
+
+Or async/await:
+
+``` js
+async function runSample() {
+ const res = await blogger.blogs.get(params);
+ console.log(`The blog url is ${res.data.url}`);
+}
+runSample().catch(console.error);
+```
+
+### Samples
+There are a lot of [samples](https://github.com/googleapis/google-api-nodejs-client/tree/master/samples) 🤗 If you're trying to figure out how to use an API ... look there first! If there's a sample you need missing, feel free to file an [issue][bugs].
+
+## Authentication and authorization
+The are three primary ways to authenticate to Google APIs. Some service support all authentication methods, other may only support one or two.
+
+- **OAuth2** - This allows you to make API calls on behalf of a given user. In this model, the user visits your application, signs in with their Google account, and provides your application with authorization against a set of scopes. [Learn more](#oauth2-client).
+
+- **Service <--> Service** - In this model, your application talks directly to Google APIs using a Service Account. It's useful when you have a backend application that will talk directly to Google APIs from the backend. [Learn more](#service-to-service-authentication).
+
+- **API Key** - With an API key, you can access your service from a client or the server. Typically less secure, this is only available on a small subset of services with limited scopes. [Learn more](#using-api-keys).
+
+To learn more about the authentication client, see the [Google Auth Library](https://github.com/googleapis/google-auth-library-nodejs).
+
+### OAuth2 client
+This client comes with an [OAuth2][oauth] client that allows you to retrieve an access token and refreshes the token and retry the request seamlessly The basics of Google's OAuth2 implementation is explained on [Google Authorization and Authentication documentation][authdocs].
+
+In the following examples, you may need a `CLIENT_ID`, `CLIENT_SECRET` and `REDIRECT_URL`. You can find these pieces of information by going to the [Developer Console][devconsole], clicking your project --> APIs & auth --> credentials.
+
+For more information about OAuth2 and how it works, [see here][oauth].
+
+A complete sample application that authorizes and authenticates with the OAuth2 client is available at [`samples/oauth2.js`][oauthexample].
+
+#### Generating an authentication URL
+
+To ask for permissions from a user to retrieve an access token, you redirect them to a consent page. To create a consent page URL:
+
+``` js
+const {google} = require('googleapis');
+
+const oauth2Client = new google.auth.OAuth2(
+ YOUR_CLIENT_ID,
+ YOUR_CLIENT_SECRET,
+ YOUR_REDIRECT_URL
+);
+
+// generate a url that asks permissions for Google+ and Google Calendar scopes
+const scopes = [
+ 'https://www.googleapis.com/auth/plus.me',
+ 'https://www.googleapis.com/auth/calendar'
+];
+
+const url = oauth2Client.generateAuthUrl({
+ // 'online' (default) or 'offline' (gets refresh_token)
+ access_type: 'offline',
+
+ // If you only need one scope you can pass it as a string
+ scope: scopes
+});
+```
+
+**IMPORTANT NOTE** - The `refresh_token` is only returned on the first authorization. More details [here](https://github.com/googleapis/google-api-nodejs-client/issues/750#issuecomment-304521450).
+
+#### Retrieve authorization code
+
+Once a user has given permissions on the consent page, Google will redirect the page to the redirect URL you have provided with a code query parameter.
+
+ GET /oauthcallback?code={authorizationCode}
+
+#### Retrieve access token
+
+With the code returned, you can ask for an access token as shown below:
+
+``` js
+// This will provide an object with the access_token and refresh_token.
+// Save these somewhere safe so they can be used at a later time.
+const {tokens} = await oauth2Client.getToken(code)
+oauth2Client.setCredentials(tokens);
+```
+
+With the credentials set on your OAuth2 client - you're ready to go!
+
+#### Handling refresh tokens
+Access tokens expire. This library will automatically use a refresh token to obtain a new access token if it is about to expire. An easy way to make sure you always store the most recent tokens is to use the `tokens` event:
+
+```js
+oauth2client.on('tokens', (tokens) => {
+ if (tokens.refresh_token) {
+ // store the refresh_token in my database!
+ console.log(tokens.refresh_token);
+ }
+ console.log(tokens.access_token);
+});
+```
+
+To set the `refresh_token` at a later time, you can use the `setCredentials` method:
+
+```js
+oauth2client.setCredentials({
+ refresh_token: `STORED_REFRESH_TOKEN`
+});
+```
+
+Once the client has a refresh token, access tokens will be acquired and refreshed automatically in the next call to the API.
+
+### Using API keys
+You may need to send an API key with the request you are going to make. The following uses an API key to make a request to the Google+ API service to retrieve a person's profile given a userId:
+
+``` js
+const {google} = require('googleapis');
+const plus = google.plus({
+ version: 'v1',
+ auth: 'YOUR_API_KEY' // specify your API key here
+});
+
+async function main() {
+ const res = await plus.people.get({ userId: 'me' });
+ console.log(`Hello ${res.data.displayName}!`);
+};
+
+main().catch(console.error);
+```
+
+To learn more about API keys, please see the [documentation][usingkeys].
+
+#### Service to Service Authentication
+
+Rather than manually creating an OAuth2 client, JWT client, or Compute client, the auth library can create the correct credential type for you, depending upon the environment your code is running under.
+
+For example, a JWT auth client will be created when your code is running on your local developer machine, and a Compute client will be created when the same code is running on a configured instance of Google Compute Engine.
+
+The code below shows how to retrieve a default credential type, depending upon the runtime environment. The createScopedRequired must be called to determine when you need to pass in the scopes manually, and when they have been set for you automatically based on the configured runtime environment.
+
+```js
+async function main () {
+
+ // This method looks for the GCLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS
+ // environment variables.
+ const auth = await google.auth.getClient({
+ // Scopes can be specified either as an array or as a single, space-delimited string.
+ scopes: ['https://www.googleapis.com/auth/compute']
+ });
+
+ // obtain the current project Id
+ const project = await google.auth.getDefaultProjectId();
+
+ // Fetch the list of GCE zones within a project.
+ const res = await compute.zones.list({ project, auth });
+ console.log(res.data);
+}
+
+main().catch(console.error);
+```
+
+### Setting global or service-level auth
+
+You can set the `auth` as a global or service-level option so you don't need to specify it every request. For example, you can set `auth` as a global option:
+
+``` js
+const {google} = require('googleapis');
+
+const oauth2Client = new google.auth.OAuth2(
+ YOUR_CLIENT_ID,
+ YOUR_CLIENT_SECRET,
+ YOUR_REDIRECT_URL
+);
+
+// set auth as a global default
+google.options({
+ auth: oauth2Client
+});
+```
+
+Instead of setting the option globally, you can also set the authentication client at the service-level:
+
+``` js
+const {google} = require('googleapis');
+const oauth2Client = new google.auth.OAuth2(
+ YOUR_CLIENT_ID,
+ YOUR_CLIENT_SECRET,
+ YOUR_REDIRECT_URL
+);
+
+const drive = google.drive({
+ version: 'v2',
+ auth: oauth2Client
+});
+```
+
+See the [Options section][options] for more information.
+
+## Usage
+
+### Specifying request body
+
+The body of the request is specified in the `requestBody` parameter object of the request. The body is specified as a JavaScript object with key/value pairs. For example, this sample creates a watcher that posts notifications to a Google Cloud Pub/Sub topic when emails are sent to a gmail account:
+
+```js
+const res = await gmail.users.watch({
+ userId: 'me',
+ requestBody: {
+ // Replace with `projects/${PROJECT_ID}/topics/${TOPIC_NAME}`
+ topicName: `projects/el-gato/topics/gmail`
+ }
+});
+console.log(res.data);
+```
+
+### Media uploads
+This client supports multipart media uploads. The resource parameters are specified in the `requestBody` parameter object, and the media itself is specified in the `media.body` parameter with mime-type specified in `media.mimeType`.
+
+This example uploads a plain text file to Google Drive with the title "Test" and contents "Hello World".
+
+``` js
+const drive = google.drive({
+ version: 'v3',
+ auth: oauth2Client
+});
+
+const res = await drive.files.create({
+ requestBody: {
+ name: 'Test',
+ mimeType: 'text/plain'
+ },
+ media: {
+ mimeType: 'text/plain',
+ body: 'Hello World'
+ }
+});
+```
+
+You can also upload media by specifying `media.body` as a [Readable stream][stream]. This can allow you to upload very large files that cannot fit into memory.
+
+```js
+const fs = require('fs');
+
+const drive = google.drive({
+ version: 'v3',
+ auth: oauth2Client
+});
+
+async function main() {
+ const res = await drive.files.create({
+ requestBody: {
+ name: 'testimage.png',
+ mimeType: 'image/png'
+ },
+ media: {
+ mimeType: 'image/png',
+ body: fs.createReadStream('awesome.png')
+ }
+ });
+ console.log(res.data);
+}
+
+main().catch(console.error);
+```
+
+For more examples of creation and modification requests with media attachments, take a look at the `samples/drive/upload.js` sample.
+
+### Request Options
+For more fine-tuned control over how your API calls are made, we provide you with the ability to specify additional options that can be applied directly to the ['axios'][axios] object used in this library to make network calls to the API.
+
+You may specify additional options either in the global `google` object or on a service client basis. The options you specify are attached to the `axios` object so whatever `axios` supports, this library supports. You may also specify global or per-service request parameters that will be attached to all API calls you make.
+
+A full list of supported options can be [found here][requestopts].
+
+#### Global options
+You can choose default options that will be sent with each request. These options will be used for every service instantiated by the google client. In this example, the `timeout` property of `AxiosRequestConfig` will be set for every request:
+
+```js
+const {google} = require('googleapis');
+google.options({
+ // All requests made with this object will use these settings unless overridden.
+ timeout: 1000,
+ auth: auth
+});
+```
+
+You can also modify the parameters sent with each request:
+
+```js
+const {google} = require('googleapis');
+google.options({
+ // All requests from all services will contain the above query parameter
+ // unless overridden either in a service client or in individual API calls.
+ params: {
+ quotaUser: 'user123@example.com'
+ }
+});
+```
+
+#### Service-client options
+
+You can also specify options when creating a service client.
+
+```js
+const blogger = google.blogger({
+ version: 'v3',
+ // All requests made with this object will use the specified auth.
+ auth: 'API KEY';
+});
+```
+
+By doing this, every API call made with this service client will use `'API KEY'` to authenticate.
+
+**Note:** Created clients are **immutable** so you must create a new one if you want to specify different options.
+
+Similar to the examples above, you can also modify the parameters used for every call of a given service:
+
+```js
+const blogger = google.blogger({
+ version: 'v3',
+ // All requests made with this service client will contain the
+ // blogId query parameter unless overridden in individual API calls.
+ params: {
+ blogId: 3213900
+ }
+});
+
+// Calls with this drive client will NOT contain the blogId query parameter.
+const drive = google.drive('v3');
+...
+
+```
+
+#### Request-level options
+You can specify an `auth` object to be used per request. Each request also inherits the options specified at the service level and global level.
+
+For example:
+
+```js
+const {google} = require('googleapis');
+const bigquery = google.bigquery('v2');
+
+async function main() {
+
+ // This method looks for the GCLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS
+ // environment variables.
+ const client = await google.auth.getClient({
+ scopes: ['https://www.googleapis.com/auth/cloud-platform']
+ });
+
+ const projectId = await google.auth.getDefaultProjectId();
+
+ const request = {
+ projectId,
+ datasetId: '',
+
+ // This is a "request-level" option
+ auth: client
+ };
+
+ const res = await bigquery.datasets.delete(request);
+ console.log(res.data);
+
+}
+
+main().catch(console.error);
+```
+
+You can also override *axios* options per request, such as `url`, `method`, and `encoding`.
+
+For example:
+
+```js
+const res = await drive.files.export({
+ fileId: 'asxKJod9s79', // A Google Doc
+ mimeType: 'application/pdf'
+}, {
+ // Make sure we get the binary data
+ encoding: null
+});
+```
+
+### Using a Proxy
+You can use the following environment variables to proxy HTTP and HTTPS requests:
+
+- `HTTP_PROXY` / `http_proxy`
+- `HTTPS_PROXY` / `https_proxy`
+
+When HTTP_PROXY / http_proxy are set, they will be used to proxy non-SSL requests that do not have an explicit proxy configuration option present. Similarly, HTTPS_PROXY / https_proxy will be respected for SSL requests that do not have an explicit proxy configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the proxy configuration option.
+
+### Getting Supported APIs
+You can programatically obtain the list of supported APIs, and all available versions:
+
+```js
+const {google} = require('googleapis');
+const apis = google.getSupportedAPIs();
+```
+
+This will return an object with the API name as object property names, and an array of version strings as the object values;
+
+### TypeScript
+This library is written in TypeScript, and provides types out of the box. All classes and interfaces generated for each API are exported under the `${apiName}_${version}` namespace. For example, the Drive v3 API types are are all available from the `drive_v3` namespace:
+
+```ts
+import { drive_v3 } from 'googleapis';
+```
+
+## Release Notes & Breaking Changes
+You can find a detailed list of breaking changes and new features in our [Release Notes][releasenotes]. If you've used this library before `25.x`, see our [Release Notes][releasenotes] to learn about migrating your code from `24.x.x` to `25.x.x`. It's pretty easy :)
+
+## License
+This library is licensed under Apache 2.0. Full license text is available in [COPYING][copying].
+
+## Contributing
+We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING][contributing].
+
+## Questions/problems?
+* Ask your development related questions on [Stackoverflow][stackoverflow].
+* If you've found an bug/issue, please [file it on GitHub][bugs].
+
+
+[snyk-image]: https://snyk.io/test/github/googleapis/google-api-nodejs-client/badge.svg
+[snyk-url]: https://snyk.io/test/github/googleapis/google-api-nodejs-client
+[david-image]: https://david-dm.org/googleapis/google-api-nodejs-client.svg
+[david-url]: https://david-dm.org/googleapis/google-api-nodejs-client
+[npmimg]: https://img.shields.io/npm/v/googleapis.svg
+[npm]: https://www.npmjs.org/package/googleapis
+[circle]: https://circleci.com/gh/googleapis/google-api-nodejs-client
+[circleimg]: https://circleci.com/gh/googleapis/google-api-nodejs-client.svg?style=shield
+[releaselevel]: https://cloud.google.com/terms/launch-stages
+[releaselevelimg]: https://img.shields.io/badge/Release%20Level-Alpha-ff69b4.svg
+[supported-list]: https://developers.google.com/apis-explorer/
+[bugs]: https://github.com/googleapis/google-api-nodejs-client/issues
+[node]: http://nodejs.org/
+[stackoverflow]: http://stackoverflow.com/questions/tagged/google-api-nodejs-client
+[apiexplorer]: https://developers.google.com/apis-explorer
+[usingkeys]: https://support.google.com/cloud/answer/6158862?hl=en
+[contributing]: https://github.com/googleapis/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md
+[copying]: https://github.com/googleapis/google-api-nodejs-client/tree/master/COPYING
+[authdocs]: https://developers.google.com/identity/protocols/OpenIDConnect
+[axios]: https://github.com/axios/axios
+[requestopts]: https://github.com/axios/axios#request-config
+[stream]: http://nodejs.org/api/stream.html#stream_class_stream_readable
+[releasenotes]: https://github.com/googleapis/google-api-nodejs-client/releases
+[devconsole]: https://console.developer.google.com
+[oauth]: https://developers.google.com/identity/protocols/OAuth2
+[oauthexample]: https://github.com/googleapis/google-api-nodejs-client/tree/master/samples/oauth2.js
+[options]: https://github.com/googleapis/google-api-nodejs-client/tree/master#options
+[googlecloud]: https://cloud.google.com/nodejs/docs/reference/libraries
+[googlecloudapis]: https://cloud.google.com/nodejs/docs/reference/apis
+[cloudplatform]: https://cloud.google.com/docs/
+[codecovimg]: https://codecov.io/github/googleapis/google-api-nodejs-client/coverage.svg?branch=master
+[codecov]: https://codecov.io/github/googleapis/google-api-nodejs-client?branch=master
+[downloadsimg]: https://img.shields.io/npm/dm/googleapis.svg
+[downloads]: https://nodei.co/npm/googleapis/
diff --git a/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/README.md b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/README.md
new file mode 100644
index 00000000..84a3ae20
--- /dev/null
+++ b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/README.md
@@ -0,0 +1,27 @@
+
+
+# @google/abusiveexperiencereport
+
+> View Abusive Experience Report data, and get a list of sites that have a significant number of abusive experiences.
+
+## Installation
+
+```sh
+$ npm install @google/abusiveexperiencereport
+```
+
+## Usage
+All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
+
+## License
+This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
+
+## Contributing
+We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
+
+## Questions/problems?
+* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
+* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
+
+
+*Crafted with ❤️ by the Google Node.js team*
diff --git a/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/index.d.ts b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/index.d.ts
new file mode 100644
index 00000000..40d89fdd
--- /dev/null
+++ b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/index.d.ts
@@ -0,0 +1,6 @@
+import { abusiveexperiencereport_v1 } from './v1';
+export declare const VERSIONS: {
+ 'v1': typeof abusiveexperiencereport_v1.Abusiveexperiencereport;
+};
+export declare function abusiveexperiencereport(version: 'v1'): abusiveexperiencereport_v1.Abusiveexperiencereport;
+export declare function abusiveexperiencereport(options: abusiveexperiencereport_v1.Options): abusiveexperiencereport_v1.Abusiveexperiencereport;
diff --git a/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/index.js b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/index.js
new file mode 100644
index 00000000..41adc3c0
--- /dev/null
+++ b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/index.js
@@ -0,0 +1,25 @@
+"use strict";
+// Copyright 2018, Google, LLC.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+Object.defineProperty(exports, "__esModule", { value: true });
+/*! THIS FILE IS AUTO-GENERATED */
+const googleapis_common_1 = require("googleapis-common");
+const v1_1 = require("./v1");
+exports.VERSIONS = {
+ 'v1': v1_1.abusiveexperiencereport_v1.Abusiveexperiencereport,
+};
+function abusiveexperiencereport(versionOrOptions) {
+ return googleapis_common_1.getAPI('abusiveexperiencereport', versionOrOptions, exports.VERSIONS, this);
+}
+exports.abusiveexperiencereport = abusiveexperiencereport;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/index.js.map b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/index.js.map
new file mode 100644
index 00000000..b0f3a65a
--- /dev/null
+++ b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apis/abusiveexperiencereport/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,kCAAkC;AAElC,yDAA6D;AAC7D,6BAAgD;AAEnC,QAAA,QAAQ,GAAG;IACtB,IAAI,EAAE,+BAA0B,CAAC,uBAAuB;CACzD,CAAC;AAOF,SACA,uBAAuB,CAEnB,gBAAyD;IAC3D,OAAO,0BAAM,CAAI,yBAAyB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AAChF,CAAC;AALD,0DAKC"}
\ No newline at end of file
diff --git a/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/package.json b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/package.json
new file mode 100644
index 00000000..4e344c63
--- /dev/null
+++ b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "@google/abusiveexperiencereport",
+ "version": "0.1.0",
+ "description": "abusiveexperiencereport",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "keywords": ["google"],
+ "author": "Google LLC",
+ "license": "Apache-2.0",
+ "homepage": "https://github.com/google/google-api-nodejs-client",
+ "bugs": {
+ "url" : "https://github.com/google/google-api-nodejs-client/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url" : "https://github.com/google/google-api-nodejs-client.git"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ },
+ "dependencies": {
+ "googleapis-common": "^0.2.0"
+ }
+}
diff --git a/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/v1.d.ts b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/v1.d.ts
new file mode 100644
index 00000000..4648225c
--- /dev/null
+++ b/express-server/node_modules/googleapis/build/src/apis/abusiveexperiencereport/v1.d.ts
@@ -0,0 +1,155 @@
+/**
+ * Copyright 2015 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { AxiosPromise } from 'axios';
+import { Compute, JWT, OAuth2Client, UserRefreshClient } from 'google-auth-library';
+import { BodyResponseCallback, GlobalOptions, GoogleConfigurable, MethodOptions } from 'googleapis-common';
+export declare namespace abusiveexperiencereport_v1 {
+ interface Options extends GlobalOptions {
+ version: 'v1';
+ }
+ /**
+ * Abusive Experience Report API
+ *
+ * View Abusive Experience Report data, and get a list of sites that have a
+ * significant number of abusive experiences.
+ *
+ * @example
+ * const {google} = require('googleapis');
+ * const abusiveexperiencereport = google.abusiveexperiencereport('v1');
+ *
+ * @namespace abusiveexperiencereport
+ * @type {Function}
+ * @version v1
+ * @variation v1
+ * @param {object=} options Options for Abusiveexperiencereport
+ */
+ class Abusiveexperiencereport {
+ _options: GlobalOptions;
+ google?: GoogleConfigurable;
+ root: this;
+ sites: Resource$Sites;
+ violatingSites: Resource$Violatingsites;
+ constructor(options: GlobalOptions, google?: GoogleConfigurable);
+ getRoot(): this;
+ }
+ /**
+ * Response message for GetSiteSummary. Do not confuse with same message in
+ * google.ads.experiencereport.v1
+ */
+ interface Schema$SiteSummaryResponse {
+ /**
+ * The status of the site reviewed for the abusive experiences.
+ */
+ abusiveStatus?: string;
+ /**
+ * The date on which enforcement begins.
+ */
+ enforcementTime?: string;
+ /**
+ * The abusive experience enforcement status of the site.
+ */
+ filterStatus?: string;
+ /**
+ * The last time that the site changed status.
+ */
+ lastChangeTime?: string;
+ /**
+ * A link that leads to a full abusive experience report.
+ */
+ reportUrl?: string;
+ /**
+ * The name of the site reviewed.
+ */
+ reviewedSite?: string;
+ /**
+ * Whether the site is currently under review.
+ */
+ underReview?: boolean;
+ }
+ /**
+ * Response message for ListViolatingSites.
+ */
+ interface Schema$ViolatingSitesResponse {
+ /**
+ * A list of summaries of violating sites.
+ */
+ violatingSites?: Schema$SiteSummaryResponse[];
+ }
+ class Resource$Sites {
+ root: Abusiveexperiencereport;
+ constructor(root: Abusiveexperiencereport);
+ getRoot(): Abusiveexperiencereport;
+ /**
+ * abusiveexperiencereport.sites.get
+ * @desc Gets a summary of the abusive experience rating of a site.
+ * @alias abusiveexperiencereport.sites.get
+ * @memberOf! ()
+ *
+ * @param {object} params Parameters for request
+ * @param {string} params.name The required site name. This is the site property whose abusive experiences have been reviewed, and it must be URL-encoded. For example, sites/https%3A%2F%2Fwww.google.com. The server will return an error of BAD_REQUEST if this field is not filled in. Note that if the site property is not yet verified in Search Console, the reportUrl field returned by the API will lead to the verification page, prompting the user to go through that process before they can gain access to the Abusive Experience Report.
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
+ * @param {callback} callback The callback that handles the response.
+ * @return {object} Request object
+ */
+ get(params?: Params$Resource$Sites$Get, options?: MethodOptions): AxiosPromise;
+ get(params: Params$Resource$Sites$Get, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback): void;
+ get(params: Params$Resource$Sites$Get, callback: BodyResponseCallback): void;
+ get(callback: BodyResponseCallback): void;
+ }
+ interface Params$Resource$Sites$Get {
+ /**
+ * Auth client or API Key for the request
+ */
+ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
+ /**
+ * The required site name. This is the site property whose abusive
+ * experiences have been reviewed, and it must be URL-encoded. For example,
+ * sites/https%3A%2F%2Fwww.google.com. The server will return an error of
+ * BAD_REQUEST if this field is not filled in. Note that if the site
+ * property is not yet verified in Search Console, the reportUrl field
+ * returned by the API will lead to the verification page, prompting the
+ * user to go through that process before they can gain access to the
+ * Abusive Experience Report.
+ */
+ name?: string;
+ }
+ class Resource$Violatingsites {
+ root: Abusiveexperiencereport;
+ constructor(root: Abusiveexperiencereport);
+ getRoot(): Abusiveexperiencereport;
+ /**
+ * abusiveexperiencereport.violatingSites.list
+ * @desc Lists sites with Abusive Experience Report statuses of "Failing".
+ * @alias abusiveexperiencereport.violatingSites.list
+ * @memberOf! ()
+ *
+ * @param {object} params Parameters for request
+ * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
+ * @param {callback} callback The callback that handles the response.
+ * @return {object} Request object
+ */
+ list(params?: Params$Resource$Violatingsites$List, options?: MethodOptions): AxiosPromise;
+ list(params: Params$Resource$Violatingsites$List, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback): void;
+ list(params: Params$Resource$Violatingsites$List, callback: BodyResponseCallback): void;
+ list(callback: BodyResponseCallback