diff --git a/CHANGELOG.md b/CHANGELOG.md
index a88f66e..db6fab4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# changelog
+## 6.0.6 - 19 Sept 2016
+
+* Add library delete
+
## 6.0.5 - 8 Sept 2016
* Add library publish
diff --git a/dist/particle.min.js b/dist/particle.min.js
index d07dcfa..9e367fc 100644
--- a/dist/particle.min.js
+++ b/dist/particle.min.js
@@ -1,7 +1,7 @@
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Particle = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o for examples\n * of using the `Particle` class.\n *\n * Most Particle methods take a single unnamed argument object documented as\n * `$0` with key/value pairs for each option.\n */\nvar Particle = function () {\n\t/**\n * Contructor for the Cloud API wrapper.\n *\n * Create a new Particle object and call methods below on it.\n *\n * @param {Object} options Options to be used for all requests (see [Defaults](../src/Defaults.js))\n */\n\tfunction Particle() {\n\t\tvar options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\t(0, _classCallCheck3.default)(this, Particle);\n\n\t\t(0, _assign2.default)(this, _Defaults2.default, options);\n\t\tthis.agent = new _Agent2.default(this.baseUrl);\n\t}\n\n\t/**\n * Login to Particle Cloud using an existing Particle acccount.\n * @param {String} $0.username Username for the Particle account\n * @param {String} $0.password Password for the Particle account\n * @param {Number} $0.tokenDuration How long the access token should last in seconds\n * @return {Promise}\n */\n\n\n\t(0, _createClass3.default)(Particle, [{\n\t\tkey: 'login',\n\t\tvalue: function login(_ref) {\n\t\t\tvar username = _ref.username;\n\t\t\tvar password = _ref.password;\n\t\t\tvar _ref$tokenDuration = _ref.tokenDuration;\n\t\t\tvar tokenDuration = _ref$tokenDuration === undefined ? this.tokenDuration : _ref$tokenDuration;\n\n\t\t\treturn this.request({ uri: '/oauth/token', form: {\n\t\t\t\t\tusername: username,\n\t\t\t\t\tpassword: password,\n\t\t\t\t\tgrant_type: 'password',\n\t\t\t\t\tclient_id: this.clientId,\n\t\t\t\t\tclient_secret: this.clientSecret,\n\t\t\t\t\texpires_in: tokenDuration\n\t\t\t\t}, method: 'post' });\n\t\t}\n\n\t\t/**\n * Create a user account for the Particle Cloud\n * @param {String} $0.username Email of the new user\n * @param {String} $0.password Password\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'createUser',\n\t\tvalue: function createUser(_ref2) {\n\t\t\tvar username = _ref2.username;\n\t\t\tvar password = _ref2.password;\n\n\t\t\treturn this.post('/v1/users', {\n\t\t\t\tusername: username, password: password\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Send reset password email for a Particle Cloud user account\n * @param {String} $0.username Email of the user\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'resetPassword',\n\t\tvalue: function resetPassword(_ref3) {\n\t\t\tvar username = _ref3.username;\n\n\t\t\treturn this.post('/v1/user/password-reset', { username: username });\n\t\t}\n\n\t\t/**\n * Revoke an access token\n * @param {String} $0.username Username of the Particle cloud account that the token belongs to.\n * @param {String} $0.password Password for the account\n * @param {String} $0.token Access token you wish to revoke\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'removeAccessToken',\n\t\tvalue: function removeAccessToken(_ref4) {\n\t\t\tvar username = _ref4.username;\n\t\t\tvar password = _ref4.password;\n\t\t\tvar token = _ref4.token;\n\n\t\t\treturn this.delete('/v1/access_tokens/' + token, {\n\t\t\t\taccess_token: token\n\t\t\t}, { username: username, password: password });\n\t\t}\n\n\t\t/**\n * List all valid access tokens for a Particle Cloud account\n * @param {String} $0.username Username\n * @param {String} $0.password Password\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'listAccessTokens',\n\t\tvalue: function listAccessTokens(_ref5) {\n\t\t\tvar username = _ref5.username;\n\t\t\tvar password = _ref5.password;\n\n\t\t\treturn this.get('/v1/access_tokens', { username: username, password: password });\n\t\t}\n\n\t\t/**\n * List devices claimed to the account\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'listDevices',\n\t\tvalue: function listDevices(_ref6) {\n\t\t\tvar auth = _ref6.auth;\n\n\t\t\treturn this.get('/v1/devices', auth);\n\t\t}\n\n\t\t/**\n * Get detailed informationa about a device\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.auth Access token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getDevice',\n\t\tvalue: function getDevice(_ref7) {\n\t\t\tvar deviceId = _ref7.deviceId;\n\t\t\tvar auth = _ref7.auth;\n\n\t\t\treturn this.get('/v1/devices/' + deviceId, auth);\n\t\t}\n\n\t\t/**\n * Claim a device to the account. The device must be online and unclaimed.\n * @param {String} $0.deviceId Device ID\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'claimDevice',\n\t\tvalue: function claimDevice(_ref8) {\n\t\t\tvar deviceId = _ref8.deviceId;\n\t\t\tvar requestTransfer = _ref8.requestTransfer;\n\t\t\tvar auth = _ref8.auth;\n\n\t\t\treturn this.post('/v1/devices', {\n\t\t\t\tid: deviceId,\n\t\t\t\trequest_transfer: !!requestTransfer\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Unclaim / Remove a device from your account\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'removeDevice',\n\t\tvalue: function removeDevice(_ref9) {\n\t\t\tvar deviceId = _ref9.deviceId;\n\t\t\tvar auth = _ref9.auth;\n\n\t\t\treturn this.delete('/v1/devices/' + deviceId, null, auth);\n\t\t}\n\n\t\t/**\n * Rename a device\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.name Desired Name\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'renameDevice',\n\t\tvalue: function renameDevice(_ref10) {\n\t\t\tvar deviceId = _ref10.deviceId;\n\t\t\tvar name = _ref10.name;\n\t\t\tvar auth = _ref10.auth;\n\n\t\t\treturn this.put('/v1/devices/' + deviceId, { name: name }, auth);\n\t\t}\n\n\t\t/**\n * Generate a claim code to use in the device claiming process.\n * @param {String} $0.auth Access Token\n * @param {String} [$0.iccid] ICCID of the SIM card used in the Electron\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getClaimCode',\n\t\tvalue: function getClaimCode(_ref11) {\n\t\t\tvar auth = _ref11.auth;\n\t\t\tvar _ref11$iccid = _ref11.iccid;\n\t\t\tvar iccid = _ref11$iccid === undefined ? undefined : _ref11$iccid;\n\n\t\t\treturn this.post('/v1/device_claims', { iccid: iccid }, auth);\n\t\t}\n\t}, {\n\t\tkey: 'validatePromoCode',\n\t\tvalue: function validatePromoCode(_ref12) {\n\t\t\tvar auth = _ref12.auth;\n\t\t\tvar promoCode = _ref12.promoCode;\n\n\t\t\treturn this.get('/v1/promo_code/' + promoCode, auth);\n\t\t}\n\t}, {\n\t\tkey: 'changeProduct',\n\t\tvalue: function changeProduct(_ref13) {\n\t\t\tvar deviceId = _ref13.deviceId;\n\t\t\tvar productId = _ref13.productId;\n\t\t\tvar shouldUpdate = _ref13.shouldUpdate;\n\t\t\tvar auth = _ref13.auth;\n\n\t\t\treturn this.put('/v1/devices/' + deviceId, {\n\t\t\t\tproduct_id: productId,\n\t\t\t\tupdate_after_claim: shouldUpdate || false\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Get the value of a device variable\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.name Variable name\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getVariable',\n\t\tvalue: function getVariable(_ref14) {\n\t\t\tvar deviceId = _ref14.deviceId;\n\t\t\tvar name = _ref14.name;\n\t\t\tvar auth = _ref14.auth;\n\n\t\t\treturn this.get('/v1/devices/' + deviceId + '/' + name, auth);\n\t\t}\n\n\t\t/**\n * Instruct the device to turn on/off the LED in a rainbow pattern\n * @param {String} $0.deviceId Device ID or Name\n * @param {Boolean} $0.signal Signal on or off\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'signalDevice',\n\t\tvalue: function signalDevice(_ref15) {\n\t\t\tvar deviceId = _ref15.deviceId;\n\t\t\tvar signal = _ref15.signal;\n\t\t\tvar auth = _ref15.auth;\n\n\t\t\treturn this.put('/v1/devices/' + deviceId, {\n\t\t\t\tsignal: !!signal ? '1' : '0'\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Compile and flash application firmware to a device\n * @param {String} $0.deviceId Device ID or Name\n * @param {Object} $0.files Object containing files to be compiled. Keys should be the filenames, and the values should be a path or Buffer of the file contents.\n * @param {String} [$0.targetVersion=latest] System firmware version to compile against\n * @param {String} $0.auth String\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'flashDevice',\n\t\tvalue: function flashDevice(_ref16) {\n\t\t\tvar deviceId = _ref16.deviceId;\n\t\t\tvar files = _ref16.files;\n\t\t\tvar targetVersion = _ref16.targetVersion;\n\t\t\tvar auth = _ref16.auth;\n\n\t\t\tvar form = {};\n\t\t\tif (targetVersion) {\n\t\t\t\tform.build_target_version = targetVersion;\n\t\t\t} else {\n\t\t\t\tform.latest = 'true';\n\t\t\t}\n\t\t\treturn this.request({ uri: '/v1/devices/' + deviceId,\n\t\t\t\tfiles: files, auth: auth, form: form, method: 'put' });\n\t\t}\n\n\t\t/**\n * Flash the Tinker application to a device\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'flashTinker',\n\t\tvalue: function flashTinker(_ref17) {\n\t\t\tvar deviceId = _ref17.deviceId;\n\t\t\tvar auth = _ref17.auth;\n\n\t\t\treturn this.put('/v1/devices/' + deviceId, {\n\t\t\t\tapp: 'tinker'\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Compile firmware using the Particle Cloud\n * @param {Object} $0.files Object containing files to be compiled. Keys should be the filenames, and the values should be a path or Buffer of the file contents.\n * @param {Number} [$0.platformId] Platform id number of the device you are compiling for. Common values are 0=Core, 6=Photon, 10=Electron.\n * @param {String} [$0.targetVersion=latest] System firmware version to compile against\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'compileCode',\n\t\tvalue: function compileCode(_ref18) {\n\t\t\tvar files = _ref18.files;\n\t\t\tvar platformId = _ref18.platformId;\n\t\t\tvar targetVersion = _ref18.targetVersion;\n\t\t\tvar auth = _ref18.auth;\n\n\t\t\tvar form = { platform_id: platformId };\n\t\t\tif (targetVersion) {\n\t\t\t\tform.build_target_version = targetVersion;\n\t\t\t} else {\n\t\t\t\tform.latest = 'true';\n\t\t\t}\n\t\t\treturn this.request({ uri: '/v1/binaries',\n\t\t\t\tfiles: files, auth: auth, form: form, method: 'post' });\n\t\t}\n\n\t\t/**\n * Download a firmware binary\n * @param {String} $0.binaryId Binary ID received from a successful compile call\n * @param {String} $0.auth Access Token\n * @return {Request}\n */\n\n\t}, {\n\t\tkey: 'downloadFirmwareBinary',\n\t\tvalue: function downloadFirmwareBinary(_ref19) {\n\t\t\tvar binaryId = _ref19.binaryId;\n\t\t\tvar auth = _ref19.auth;\n\n\t\t\tvar uri = '/v1/binaries/' + binaryId;\n\t\t\tvar req = (0, _superagent2.default)('get', uri);\n\t\t\treq.use(this.prefix);\n\t\t\tthis.headers(req, auth);\n\t\t\tif (this.debug) {\n\t\t\t\tthis.debug(req);\n\t\t\t}\n\t\t\treturn req;\n\t\t}\n\n\t\t/**\n * Send a new device public key to the Particle Cloud\n * @param {String} $0.deviceId Device ID or Name\n * @param {(String|Buffer)} $0.key Public key contents\n * @param {String} [$0.algorithm=rsa] Algorithm used to generate the public key. Valid values are `rsa` or `ecc`.\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'sendPublicKey',\n\t\tvalue: function sendPublicKey(_ref20) {\n\t\t\tvar deviceId = _ref20.deviceId;\n\t\t\tvar key = _ref20.key;\n\t\t\tvar algorithm = _ref20.algorithm;\n\t\t\tvar auth = _ref20.auth;\n\n\t\t\treturn this.post('/v1/provisioning/' + deviceId, {\n\t\t\t\tdeviceID: deviceId,\n\t\t\t\tpublicKey: typeof key === 'string' ? key : key.toString(),\n\t\t\t\tfilename: 'particle-api',\n\t\t\t\torder: 'manual_' + Date.now(),\n\t\t\t\talgorithm: algorithm || 'rsa'\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Call a device function\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.name Function name\n * @param {String} $0.argument Function argument\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'callFunction',\n\t\tvalue: function callFunction(_ref21) {\n\t\t\tvar deviceId = _ref21.deviceId;\n\t\t\tvar name = _ref21.name;\n\t\t\tvar argument = _ref21.argument;\n\t\t\tvar auth = _ref21.auth;\n\n\t\t\treturn this.post('/v1/devices/' + deviceId + '/' + name, {\n\t\t\t\targs: argument\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Get a stream of events\n * @param {String} [$0.deviceId] Device ID or Name, or `mine` to indicate only your devices.\n * @param {String} [$0.name] Event Name\n * @param {String} [$0.org] Organization Slug\n * @param {String} [$0.product] Product Slug or Product ID\n * @param {String} $0.auth Access Token\n * @return {Promise} If the promise resolves, the resolution value will be an EventStream object that will\n * emit 'event' events, as well as the specific named event.\n */\n\n\t}, {\n\t\tkey: 'getEventStream',\n\t\tvalue: function getEventStream(_ref22) {\n\t\t\tvar deviceId = _ref22.deviceId;\n\t\t\tvar name = _ref22.name;\n\t\t\tvar org = _ref22.org;\n\t\t\tvar product = _ref22.product;\n\t\t\tvar auth = _ref22.auth;\n\n\t\t\tvar uri = '/v1/';\n\t\t\tif (org) {\n\t\t\t\turi += 'orgs/' + org + '/';\n\t\t\t}\n\n\t\t\tif (product) {\n\t\t\t\turi += 'products/' + product + '/';\n\t\t\t}\n\n\t\t\tif (deviceId) {\n\t\t\t\turi += 'devices/';\n\t\t\t\tif (!(deviceId.toLowerCase() === 'mine')) {\n\t\t\t\t\turi += deviceId + '/';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\turi += 'events';\n\n\t\t\tif (name) {\n\t\t\t\turi += '/' + encodeURIComponent(name);\n\t\t\t}\n\n\t\t\treturn new _EventStream2.default('' + this.baseUrl + uri, auth, { debug: this.debug }).connect();\n\t\t}\n\n\t\t/**\n * Publish a event to the Particle Cloud\n * @param {String} $0.name Event name\n * @param {String} $0.data Event data\n * @param {Boolean} $0.isPrivate Should the event be publicly available?\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'publishEvent',\n\t\tvalue: function publishEvent(_ref23) {\n\t\t\tvar name = _ref23.name;\n\t\t\tvar data = _ref23.data;\n\t\t\tvar isPrivate = _ref23.isPrivate;\n\t\t\tvar auth = _ref23.auth;\n\n\t\t\treturn this.post('/v1/devices/events', {\n\t\t\t\tname: name,\n\t\t\t\tdata: data,\n\t\t\t\t'private': isPrivate\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Create a webhook\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.name Webhook name\n * @param {String} $0.url URL the webhook should hit\n * @param {String} [$0.requestType=POST] HTTP method to use\n * @param {Object} [$0.headers] Additional headers to add to the webhook\n * @param {Object} [$0.json] JSON data\n * @param {Object} [$0.query] Query string data\n * @param {Object} [$0.responseTemplate] Webhook response template\n * @param {Object} [$0.responseTopic] Webhook response topic\n * @param {Boolean} [$0.rejectUnauthorized] Reject invalid HTTPS certificates\n * @param {Object} [$0.webhookAuth] HTTP Basic Auth information\n * @param {Object} [$0.form] Form data\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'createWebhook',\n\t\tvalue: function createWebhook(_ref24) {\n\t\t\tvar deviceId = _ref24.deviceId;\n\t\t\tvar name = _ref24.name;\n\t\t\tvar url = _ref24.url;\n\t\t\tvar requestType = _ref24.requestType;\n\t\t\tvar headers = _ref24.headers;\n\t\t\tvar json = _ref24.json;\n\t\t\tvar query = _ref24.query;\n\t\t\tvar responseTemplate = _ref24.responseTemplate;\n\t\t\tvar responseTopic = _ref24.responseTopic;\n\t\t\tvar rejectUnauthorized = _ref24.rejectUnauthorized;\n\t\t\tvar webhookAuth = _ref24.webhookAuth;\n\t\t\tvar form = _ref24.form;\n\t\t\tvar auth = _ref24.auth;\n\n\t\t\tvar data = { event: name, url: url, requestType: requestType, headers: headers, json: json, query: query, responseTemplate: responseTemplate, responseTopic: responseTopic, rejectUnauthorized: rejectUnauthorized, auth: webhookAuth, form: form };\n\t\t\tif (deviceId === 'mine') {\n\t\t\t\tdata.mydevices = true;\n\t\t\t} else {\n\t\t\t\tdata.deviceid = deviceId;\n\t\t\t}\n\t\t\treturn this.post('/v1/webhooks', data, auth);\n\t\t}\n\n\t\t/**\n * Delete a webhook\n * @param {String} $0.hookId Webhook ID\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'deleteWebhook',\n\t\tvalue: function deleteWebhook(_ref25) {\n\t\t\tvar hookId = _ref25.hookId;\n\t\t\tvar auth = _ref25.auth;\n\n\t\t\treturn this.delete('/v1/webhooks/' + hookId, null, auth);\n\t\t}\n\n\t\t/**\n * List all webhooks owned by the account\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'listWebhooks',\n\t\tvalue: function listWebhooks(_ref26) {\n\t\t\tvar auth = _ref26.auth;\n\n\t\t\treturn this.get('/v1/webhooks', auth);\n\t\t}\n\n\t\t/**\n * Get details about the current user\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getUserInfo',\n\t\tvalue: function getUserInfo(_ref27) {\n\t\t\tvar auth = _ref27.auth;\n\n\t\t\treturn this.get('/v1/user', auth);\n\t\t}\n\t}, {\n\t\tkey: 'setUserInfo',\n\t\tvalue: function setUserInfo(_ref28) {\n\t\t\tvar stripeToken = _ref28.stripeToken;\n\t\t\tvar auth = _ref28.auth;\n\n\t\t\treturn this.put('/v1/user', {\n\t\t\t\tstripe_token: stripeToken\n\t\t\t}, auth);\n\t\t}\n\t}, {\n\t\tkey: 'checkSIM',\n\t\tvalue: function checkSIM(_ref29) {\n\t\t\tvar iccid = _ref29.iccid;\n\t\t\tvar auth = _ref29.auth;\n\n\t\t\treturn this.head('/v1/sims/' + iccid, auth);\n\t\t}\n\t}, {\n\t\tkey: 'activateSIM',\n\t\tvalue: function activateSIM(_ref30) {\n\t\t\tvar iccid = _ref30.iccid;\n\t\t\tvar countryCode = _ref30.countryCode;\n\t\t\tvar promoCode = _ref30.promoCode;\n\t\t\tvar auth = _ref30.auth;\n\n\t\t\treturn this.put('/v1/sims/' + iccid, {\n\t\t\t\tcountry: countryCode,\n\t\t\t\tpromo_code: promoCode,\n\t\t\t\taction: 'activate'\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * List valid build targets to be used for compiling\n * @param {String} $0.auth Access Token\n * @param {Boolean} [$0.onlyFeatured=false] Only list featured build targets\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'listBuildTargets',\n\t\tvalue: function listBuildTargets(_ref31) {\n\t\t\tvar auth = _ref31.auth;\n\t\t\tvar _ref31$onlyFeatured = _ref31.onlyFeatured;\n\t\t\tvar onlyFeatured = _ref31$onlyFeatured === undefined ? undefined : _ref31$onlyFeatured;\n\n\t\t\tvar query = void 0;\n\t\t\tif (onlyFeatured !== undefined) {\n\t\t\t\tquery = { featured: !!onlyFeatured };\n\t\t\t}\n\t\t\treturn this.get('/v1/build_targets', auth, query);\n\t\t}\n\n\t\t/**\n * List firmware libraries\n * @param {String} $0.auth Access Token\n * @param {Number} $0.page Page index (default, first page)\n * @param {Number} $0.limit Number of items per page\n * @param {String} $0.filter Search term for the libraries\n * @param {String} $0.sort Ordering key for the library list\n * @param {Array} $0.architectures List of architectures to filter\n * @param {String} $0.category Category to filter\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'listLibraries',\n\t\tvalue: function listLibraries(_ref32) {\n\t\t\tvar auth = _ref32.auth;\n\t\t\tvar page = _ref32.page;\n\t\t\tvar limit = _ref32.limit;\n\t\t\tvar filter = _ref32.filter;\n\t\t\tvar sort = _ref32.sort;\n\t\t\tvar architectures = _ref32.architectures;\n\t\t\tvar category = _ref32.category;\n\n\t\t\treturn this.get('/v1/libraries', auth, {\n\t\t\t\tpage: page,\n\t\t\t\tfilter: filter,\n\t\t\t\tlimit: limit,\n\t\t\t\tsort: sort,\n\t\t\t\tarchitectures: Array.isArray(architectures) ? architectures.join(',') : architectures,\n\t\t\t\tcategory: category\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get firmware library details\n * @param {String} $0.auth Access Token\n * @param {String} $0.name Name of the library to fetch\n * @param {String} $0.version Version of the library to fetch (default: latest)\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getLibrary',\n\t\tvalue: function getLibrary(_ref33) {\n\t\t\tvar auth = _ref33.auth;\n\t\t\tvar name = _ref33.name;\n\t\t\tvar version = _ref33.version;\n\n\t\t\treturn this.get('/v1/libraries/' + name, auth, { version: version });\n\t\t}\n\n\t\t/**\n * Firmware library details for each version\n * @param {String} $0.auth Access Token\n * @param {String} $0.name Name of the library to fetch\n * @param {Number} $0.page Page index (default, first page)\n * @param {Number} $0.limit Number of items per page\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getLibraryVersions',\n\t\tvalue: function getLibraryVersions(_ref34) {\n\t\t\tvar auth = _ref34.auth;\n\t\t\tvar name = _ref34.name;\n\t\t\tvar page = _ref34.page;\n\t\t\tvar limit = _ref34.limit;\n\n\t\t\treturn this.get('/v1/libraries/' + name + '/versions', auth, {\n\t\t\t\tpage: page,\n\t\t\t\tlimit: limit\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Publish a new library version int the compressed archive\n * @param {String} $0.auth Access Token\n * @param {String} $0.archive Compressed archive file containing the library sources\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'publishLibrary',\n\t\tvalue: function publishLibrary(_ref35) {\n\t\t\tvar auth = _ref35.auth;\n\t\t\tvar archive = _ref35.archive;\n\n\t\t\tvar files = {\n\t\t\t\t'archive.tar.gz': archive\n\t\t\t};\n\n\t\t\treturn this.request({ uri: '/v1/libraries',\n\t\t\t\tfiles: files, auth: auth, method: 'post' });\n\t\t}\n\n\t\t/**\n * Delete one version of a library or an entire published library\n * @param {String} $0.auth Access Token\n * @param {String} $0.name Name of the library to delete\n * @param {String} $0.force Key to force deleting a public library\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'deleteLibrary',\n\t\tvalue: function deleteLibrary(_ref36) {\n\t\t\tvar auth = _ref36.auth;\n\t\t\tvar name = _ref36.name;\n\t\t\tvar force = _ref36.force;\n\n\t\t\treturn this.delete('/v1/libraries/' + name, { force: force }, auth);\n\t\t}\n\n\t\t/**\n * Download an external file that may not be on the API\n * @param {String} $0.url URL of the file.\n * @return {Promise} Resolves to a buffer with the file data\n */\n\n\t}, {\n\t\tkey: 'downloadFile',\n\t\tvalue: function downloadFile(_ref37) {\n\t\t\tvar url = _ref37.url;\n\n\t\t\tvar req = _superagent2.default.get(url);\n\t\t\tif (req.buffer) {\n\t\t\t\treq = req.buffer(true).parse(_superagentBinaryParser2.default);\n\t\t\t} else if (req.responseType) {\n\t\t\t\treq = req.responseType('arraybuffer').then(function (res) {\n\t\t\t\t\tres.body = res.xhr.response;\n\t\t\t\t\treturn res;\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn req.then(function (res) {\n\t\t\t\treturn res.body;\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'get',\n\t\tvalue: function get(uri, auth) {\n\t\t\tvar query = arguments.length <= 2 || arguments[2] === undefined ? undefined : arguments[2];\n\n\t\t\treturn this.agent.get(uri, auth, query);\n\t\t}\n\t}, {\n\t\tkey: 'head',\n\t\tvalue: function head(uri, auth) {\n\t\t\treturn this.agent.head(uri, auth);\n\t\t}\n\t}, {\n\t\tkey: 'post',\n\t\tvalue: function post(uri, data, auth) {\n\t\t\treturn this.agent.post(uri, data, auth);\n\t\t}\n\t}, {\n\t\tkey: 'put',\n\t\tvalue: function put(uri, data, auth) {\n\t\t\treturn this.agent.put(uri, data, auth);\n\t\t}\n\t}, {\n\t\tkey: 'delete',\n\t\tvalue: function _delete(uri, data, auth) {\n\t\t\treturn this.agent.delete(uri, data, auth);\n\t\t}\n\t}, {\n\t\tkey: 'request',\n\t\tvalue: function request(args) {\n\t\t\treturn this.agent.request(args);\n\t\t}\n\t}, {\n\t\tkey: 'client',\n\t\tvalue: function client() {\n\t\t\tvar options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t\t\treturn new _Client2.default((0, _assign2.default)({ api: this }, options));\n\t\t}\n\t}]);\n\treturn Particle;\n}();\n\nexports.default = Particle;\nmodule.exports = exports['default'];\n//# sourceMappingURL=Particle.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = binaryParser;\n// Binary parser for superagent\n\nfunction binaryParser(res, fn) {\n\t/* global Buffer */\n\tvar data = [];\n\tres.on('data', function (chunk) {\n\t\treturn data.push(chunk);\n\t});\n\tres.on('end', function () {\n\t\treturn fn(null, Buffer.concat(data));\n\t});\n};\nmodule.exports = exports['default'];\n//# sourceMappingURL=superagent-binary-parser.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = {\n\tbaseUrl: 'https://api.particle.io',\n\tclientSecret: 'particle-api',\n\tclientId: 'particle-api',\n\ttokenDuration: 7776000 };\nmodule.exports = exports['default'];\n//# sourceMappingURL=Defaults.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _isNan = require('babel-runtime/core-js/number/is-nan');\n\nvar _isNan2 = _interopRequireDefault(_isNan);\n\nvar _typeof2 = require('babel-runtime/helpers/typeof');\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nvar _promise = require('babel-runtime/core-js/promise');\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _assign = require('babel-runtime/core-js/object/assign');\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _http = require('http');\n\nvar _http2 = _interopRequireDefault(_http);\n\nvar _https = require('https');\n\nvar _https2 = _interopRequireDefault(_https);\n\nvar _url = require('url');\n\nvar _url2 = _interopRequireDefault(_url);\n\nvar _events = require('events');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint max-depth: 0 */\nvar EventStream = function (_EventEmitter) {\n\t(0, _inherits3.default)(EventStream, _EventEmitter);\n\n\tfunction EventStream(uri, token, options) {\n\t\t(0, _classCallCheck3.default)(this, EventStream);\n\n\t\tvar _this = (0, _possibleConstructorReturn3.default)(this, (EventStream.__proto__ || (0, _getPrototypeOf2.default)(EventStream)).call(this));\n\n\t\t_this.uri = uri;\n\t\t_this.token = token;\n\t\t_this.reconnectInterval = 2000;\n\t\t(0, _assign2.default)(_this, options);\n\t\treturn _this;\n\t}\n\n\t(0, _createClass3.default)(EventStream, [{\n\t\tkey: 'connect',\n\t\tvalue: function connect() {\n\t\t\tvar _this2 = this;\n\n\t\t\treturn new _promise2.default(function (resolve, reject) {\n\t\t\t\tvar _url$parse = _url2.default.parse(_this2.uri);\n\n\t\t\t\tvar hostname = _url$parse.hostname;\n\t\t\t\tvar protocol = _url$parse.protocol;\n\t\t\t\tvar port = _url$parse.port;\n\t\t\t\tvar path = _url$parse.path;\n\n\t\t\t\t_this2.origin = protocol + '//' + hostname + (port ? ':' + port : '');\n\n\t\t\t\tvar isSecure = protocol === 'https:';\n\t\t\t\tvar requestor = isSecure ? _https2.default : _http2.default;\n\t\t\t\tvar req = requestor.request({\n\t\t\t\t\thostname: hostname,\n\t\t\t\t\tprotocol: protocol,\n\t\t\t\t\tpath: path + '?history_limit=30&access_token=' + _this2.token,\n\t\t\t\t\tmethod: 'get',\n\t\t\t\t\tport: port || (isSecure ? 443 : 80),\n\t\t\t\t\tavoidFetch: true,\n\t\t\t\t\tmode: 'prefer-streaming'\n\t\t\t\t});\n\n\t\t\t\t_this2.req = req;\n\t\t\t\tif (_this2.debug) {\n\t\t\t\t\t_this2.debug(_this2);\n\t\t\t\t}\n\n\t\t\t\treq.on('error', function (e) {\n\t\t\t\t\treject({ error: e, errorDescription: 'Network error from ' + _this2.uri });\n\t\t\t\t});\n\n\t\t\t\treq.on('response', function (res) {\n\t\t\t\t\tvar statusCode = res.statusCode;\n\t\t\t\t\tif (statusCode !== 200) {\n\t\t\t\t\t\tvar _ret = function () {\n\t\t\t\t\t\t\tvar body = '';\n\t\t\t\t\t\t\tres.on('data', function (chunk) {\n\t\t\t\t\t\t\t\treturn body += chunk;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tres.on('end', function () {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tbody = JSON.parse(body);\n\t\t\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t\t\t\t_this2.emit('response', {\n\t\t\t\t\t\t\t\t\tstatusCode: statusCode,\n\t\t\t\t\t\t\t\t\tbody: body\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tvar errorDescription = 'HTTP error ' + statusCode + ' from ' + _this2.uri;\n\t\t\t\t\t\t\t\tif (body && body.error_description) {\n\t\t\t\t\t\t\t\t\terrorDescription += ' - ' + body.error_description;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treject({ statusCode: statusCode, errorDescription: errorDescription, body: body });\n\t\t\t\t\t\t\t\t_this2.req = undefined;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tv: void 0\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}();\n\n\t\t\t\t\t\tif ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === \"object\") return _ret.v;\n\t\t\t\t\t}\n\n\t\t\t\t\t_this2.data = '';\n\t\t\t\t\t_this2.buf = '';\n\t\t\t\t\t_this2.eventName;\n\t\t\t\t\t_this2.lastEventId;\n\n\t\t\t\t\tres.on('data', _this2.parse.bind(_this2));\n\t\t\t\t\tres.once('end', _this2.end.bind(_this2));\n\t\t\t\t\tresolve(_this2);\n\t\t\t\t});\n\t\t\t\treq.end();\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'abort',\n\t\tvalue: function abort() {\n\t\t\tif (this.req) {\n\t\t\t\tthis.req.abort();\n\t\t\t\tthis.req = undefined;\n\t\t\t}\n\t\t\tthis.removeAllListeners();\n\t\t}\n\t}, {\n\t\tkey: 'end',\n\t\tvalue: function end() {\n\t\t\tvar _this3 = this;\n\n\t\t\tthis.req = undefined;\n\t\t\tsetTimeout(function () {\n\t\t\t\t_this3.connect().catch(function (err) {\n\t\t\t\t\t_this3.emit('error', err);\n\t\t\t\t\t_this3.removeAllListeners();\n\t\t\t\t});\n\t\t\t}, this.reconnectInterval);\n\t\t}\n\t}, {\n\t\tkey: 'parse',\n\t\tvalue: function parse(chunk) {\n\t\t\tthis.buf += chunk;\n\t\t\tvar pos = 0;\n\t\t\tvar length = this.buf.length;\n\t\t\tvar discardTrailingNewline = false;\n\n\t\t\twhile (pos < length) {\n\t\t\t\tif (discardTrailingNewline) {\n\t\t\t\t\tif (this.buf[pos] === '\\n') {\n\t\t\t\t\t\t++pos;\n\t\t\t\t\t}\n\t\t\t\t\tdiscardTrailingNewline = false;\n\t\t\t\t}\n\n\t\t\t\tvar lineLength = -1;\n\t\t\t\tvar fieldLength = -1;\n\n\t\t\t\tfor (var i = pos; lineLength < 0 && i < length; ++i) {\n\t\t\t\t\tvar c = this.buf[i];\n\t\t\t\t\tif (c === ':') {\n\t\t\t\t\t\tif (fieldLength < 0) {\n\t\t\t\t\t\t\tfieldLength = i - pos;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (c === '\\r') {\n\t\t\t\t\t\tdiscardTrailingNewline = true;\n\t\t\t\t\t\tlineLength = i - pos;\n\t\t\t\t\t} else if (c === '\\n') {\n\t\t\t\t\t\tlineLength = i - pos;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (lineLength < 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.parseEventStreamLine(pos, fieldLength, lineLength);\n\n\t\t\t\tpos += lineLength + 1;\n\t\t\t}\n\n\t\t\tif (pos === length) {\n\t\t\t\tthis.buf = '';\n\t\t\t} else if (pos > 0) {\n\t\t\t\tthis.buf = this.buf.slice(pos);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'parseEventStreamLine',\n\t\tvalue: function parseEventStreamLine(pos, fieldLength, lineLength) {\n\t\t\tif (lineLength === 0) {\n\t\t\t\ttry {\n\t\t\t\t\tif (this.data.length > 0 && this.event) {\n\t\t\t\t\t\tvar event = JSON.parse(this.data);\n\t\t\t\t\t\tevent.name = this.eventName || '';\n\t\t\t\t\t\tif (this.eventName !== 'event') {\n\t\t\t\t\t\t\tthis.emit(this.eventName, event);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.emit('event', event);\n\t\t\t\t\t\tthis.data = '';\n\t\t\t\t\t}\n\t\t\t\t\tthis.eventName = undefined;\n\t\t\t\t\tthis.event = false;\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// do nothing if JSON.parse fails\n\t\t\t\t}\n\t\t\t} else if (fieldLength > 0) {\n\t\t\t\tvar field = this.buf.slice(pos, pos + fieldLength);\n\t\t\t\tvar step = 0;\n\n\t\t\t\tif (this.buf[pos + fieldLength + 1] !== ' ') {\n\t\t\t\t\tstep = fieldLength + 1;\n\t\t\t\t} else {\n\t\t\t\t\tstep = fieldLength + 2;\n\t\t\t\t}\n\t\t\t\tpos += step;\n\t\t\t\tvar valueLength = lineLength - step;\n\t\t\t\tvar value = this.buf.slice(pos, pos + valueLength);\n\n\t\t\t\tif (field === 'data') {\n\t\t\t\t\tthis.data += value + '\\n';\n\t\t\t\t} else if (field === 'event') {\n\t\t\t\t\tthis.eventName = value;\n\t\t\t\t\tthis.event = true;\n\t\t\t\t} else if (field === 'id') {\n\t\t\t\t\tthis.lastEventId = value;\n\t\t\t\t} else if (field === 'retry') {\n\t\t\t\t\tvar retry = parseInt(value, 10);\n\t\t\t\t\tif (!(0, _isNan2.default)(retry)) {\n\t\t\t\t\t\tthis.reconnectInterval = retry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}]);\n\treturn EventStream;\n}(_events.EventEmitter);\n\nexports.default = EventStream;\nmodule.exports = exports['default'];\n//# sourceMappingURL=EventStream.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _keys = require('babel-runtime/core-js/object/keys');\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _slicedToArray2 = require('babel-runtime/helpers/slicedToArray');\n\nvar _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\nvar _entries = require('babel-runtime/core-js/object/entries');\n\nvar _entries2 = _interopRequireDefault(_entries);\n\nvar _getIterator2 = require('babel-runtime/core-js/get-iterator');\n\nvar _getIterator3 = _interopRequireDefault(_getIterator2);\n\nvar _assign = require('babel-runtime/core-js/object/assign');\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _promise = require('babel-runtime/core-js/promise');\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _superagent = require('superagent');\n\nvar _superagent2 = _interopRequireDefault(_superagent);\n\nvar _superagentPrefix = require('superagent-prefix');\n\nvar _superagentPrefix2 = _interopRequireDefault(_superagentPrefix);\n\nvar _path = require('path');\n\nvar _path2 = _interopRequireDefault(_path);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Agent = function () {\n\tfunction Agent(baseUrl) {\n\t\t(0, _classCallCheck3.default)(this, Agent);\n\n\t\tthis.prefix = (0, _superagentPrefix2.default)(baseUrl);\n\t}\n\n\t(0, _createClass3.default)(Agent, [{\n\t\tkey: 'get',\n\t\tvalue: function get(uri, auth, query) {\n\t\t\treturn this.request({ uri: uri, auth: auth, method: 'get', query: query });\n\t\t}\n\t}, {\n\t\tkey: 'head',\n\t\tvalue: function head(uri, auth) {\n\t\t\treturn this.request({ uri: uri, auth: auth, method: 'head' });\n\t\t}\n\t}, {\n\t\tkey: 'post',\n\t\tvalue: function post(uri, data, auth) {\n\t\t\treturn this.request({ uri: uri, data: data, auth: auth, method: 'post' });\n\t\t}\n\t}, {\n\t\tkey: 'put',\n\t\tvalue: function put(uri, data, auth) {\n\t\t\treturn this.request({ uri: uri, data: data, auth: auth, method: 'put' });\n\t\t}\n\t}, {\n\t\tkey: 'delete',\n\t\tvalue: function _delete(uri, data, auth) {\n\t\t\treturn this.request({ uri: uri, data: data, auth: auth, method: 'delete' });\n\t\t}\n\n\t\t/**\n *\n * @param {String} uri The URI to request\n * @param {String} method The method used to request the URI, should be in uppercase.\n * @param {String} data Arbitrary data to send as the body.\n * @param {Object} auth Authorization\n * @param {String} query Query parameters\n * @param {Object} form Form fields\n * @param {Object} files array of file names and file content\n * @return {Promise} A promise. fulfilled with {body, statusCode}, rejected with { statusCode, errorDescription, error, body }\n */\n\n\t}, {\n\t\tkey: 'request',\n\t\tvalue: function request(_ref) {\n\t\t\tvar uri = _ref.uri;\n\t\t\tvar method = _ref.method;\n\t\t\tvar _ref$data = _ref.data;\n\t\t\tvar data = _ref$data === undefined ? undefined : _ref$data;\n\t\t\tvar auth = _ref.auth;\n\t\t\tvar _ref$query = _ref.query;\n\t\t\tvar query = _ref$query === undefined ? undefined : _ref$query;\n\t\t\tvar _ref$form = _ref.form;\n\t\t\tvar form = _ref$form === undefined ? undefined : _ref$form;\n\t\t\tvar _ref$files = _ref.files;\n\t\t\tvar files = _ref$files === undefined ? undefined : _ref$files;\n\n\t\t\tvar requestFiles = this._sanitizeFiles(files);\n\t\t\treturn this._request({ uri: uri, method: method, data: data, auth: auth, query: query, form: form, files: requestFiles });\n\t\t}\n\n\t\t/**\n *\n * @param {String} uri The URI to request\n * @param {String} method The method used to request the URI, should be in uppercase.\n * @param {String} data Arbitrary data to send as the body.\n * @param {Object} auth Authorization\n * @param {String} query Query parameters\n * @param {Object} form Form fields\n * @param {Object} files array of file names and file content\n * @return {Promise} A promise. fulfilled with {body, statusCode}, rejected with { statusCode, errorDescription, error, body }\n */\n\n\t}, {\n\t\tkey: '_request',\n\t\tvalue: function _request(_ref2) {\n\t\t\tvar uri = _ref2.uri;\n\t\t\tvar method = _ref2.method;\n\t\t\tvar data = _ref2.data;\n\t\t\tvar auth = _ref2.auth;\n\t\t\tvar query = _ref2.query;\n\t\t\tvar form = _ref2.form;\n\t\t\tvar files = _ref2.files;\n\n\t\t\tvar req = this._buildRequest({ uri: uri, method: method, data: data, auth: auth, query: query, form: form, files: files });\n\t\t\treturn this._promiseResponse(req);\n\t\t}\n\n\t\t/**\n * Promises to send the request and retreive the response.\n * @param {Request} req The request to send\n * @returns {Promise} The promise to send the request and retrieve the response.\n * @private\n */\n\n\t}, {\n\t\tkey: '_promiseResponse',\n\t\tvalue: function _promiseResponse(req) {\n\t\t\tvar _this = this;\n\n\t\t\treturn new _promise2.default(function (fulfill, reject) {\n\t\t\t\treturn _this._sendRequest(req, fulfill, reject);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Sends the given request, calling the fulfill or reject methods for success/failure.\n * @param {object} request The request to send\n * @param {function} fulfill Called on success with the response\n * @param {function} reject Called on failure with the failure reason.\n * @private\n * @returns {undefined} Nothing\n */\n\n\t}, {\n\t\tkey: '_sendRequest',\n\t\tvalue: function _sendRequest(request, fulfill, reject) {\n\t\t\trequest.end(function (error, res) {\n\t\t\t\tvar body = res && res.body;\n\t\t\t\tif (error) {\n\t\t\t\t\tvar uri = request.url;\n\t\t\t\t\tvar statusCode = error.status;\n\t\t\t\t\tvar errorDescription = (statusCode ? 'HTTP error ' + statusCode : 'Network error') + ' from ' + uri;\n\t\t\t\t\tif (body && body.error_description) {\n\t\t\t\t\t\terrorDescription += ' - ' + body.error_description;\n\t\t\t\t\t}\n\t\t\t\t\tvar reason = new Error(errorDescription);\n\t\t\t\t\t(0, _assign2.default)(reason, { statusCode: statusCode, errorDescription: errorDescription, error: error, body: body });\n\t\t\t\t\treject(reason);\n\t\t\t\t} else {\n\t\t\t\t\tfulfill({\n\t\t\t\t\t\tbody: body,\n\t\t\t\t\t\tstatusCode: res.statusCode\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: '_buildRequest',\n\t\tvalue: function _buildRequest(_ref3) {\n\t\t\tvar uri = _ref3.uri;\n\t\t\tvar method = _ref3.method;\n\t\t\tvar data = _ref3.data;\n\t\t\tvar auth = _ref3.auth;\n\t\t\tvar query = _ref3.query;\n\t\t\tvar form = _ref3.form;\n\t\t\tvar files = _ref3.files;\n\t\t\tvar _ref3$makerequest = _ref3.makerequest;\n\t\t\tvar makerequest = _ref3$makerequest === undefined ? _superagent2.default : _ref3$makerequest;\n\n\t\t\tvar req = makerequest(method, uri);\n\t\t\tif (this.prefix) {\n\t\t\t\treq.use(this.prefix);\n\t\t\t}\n\t\t\tthis._authorizationHeader(req, auth);\n\t\t\tif (query) {\n\t\t\t\treq.query(query);\n\t\t\t}\n\t\t\tif (files) {\n\t\t\t\tvar _iteratorNormalCompletion = true;\n\t\t\t\tvar _didIteratorError = false;\n\t\t\t\tvar _iteratorError = undefined;\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator = (0, _getIterator3.default)((0, _entries2.default)(files)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\tvar _step$value = (0, _slicedToArray3.default)(_step.value, 2);\n\n\t\t\t\t\t\tvar name = _step$value[0];\n\t\t\t\t\t\tvar file = _step$value[1];\n\n\t\t\t\t\t\treq._getFormData().append(name, file.data, {\n\t\t\t\t\t\t\tfilename: file.path,\n\t\t\t\t\t\t\trelativePath: _path2.default.dirname(file.path)\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t_iteratorError = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (form) {\n\t\t\t\t\tvar _iteratorNormalCompletion2 = true;\n\t\t\t\t\tvar _didIteratorError2 = false;\n\t\t\t\t\tvar _iteratorError2 = undefined;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator2 = (0, _getIterator3.default)((0, _entries2.default)(form)), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\t\t\t\tvar _step2$value = (0, _slicedToArray3.default)(_step2.value, 2);\n\n\t\t\t\t\t\t\tvar name = _step2$value[0];\n\t\t\t\t\t\t\tvar value = _step2$value[1];\n\n\t\t\t\t\t\t\treq.field(name, value);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t\t\t_iteratorError2 = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tif (_didIteratorError2) {\n\t\t\t\t\t\t\t\tthrow _iteratorError2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (form) {\n\t\t\t\treq.type('form');\n\t\t\t\treq.send(form);\n\t\t\t} else if (data) {\n\t\t\t\treq.send(data);\n\t\t\t}\n\t\t\treturn req;\n\t\t}\n\n\t\t/**\n * Adds an authorization header.\n * @param {Request} req The request to add the authorization header to.\n * @param {object|string} auth The authorization. Either a string authorization bearer token,\n * or a username/password object.\n * @returns {Request} req The original request.\n */\n\n\t}, {\n\t\tkey: '_authorizationHeader',\n\t\tvalue: function _authorizationHeader(req, auth) {\n\t\t\tif (auth) {\n\t\t\t\tif (auth.username !== undefined) {\n\t\t\t\t\treq.auth(auth.username, auth.password);\n\t\t\t\t} else {\n\t\t\t\t\treq.set({ Authorization: 'Bearer ' + auth });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn req;\n\t\t}\n\n\t\t/**\n *\n * @param {Array} files converts the file names to file, file1, file2.\n * @returns {object} the renamed files.\n */\n\n\t}, {\n\t\tkey: '_sanitizeFiles',\n\t\tvalue: function _sanitizeFiles(files) {\n\t\t\tvar requestFiles = void 0;\n\t\t\tif (files) {\n\t\t\t\trequestFiles = {};\n\t\t\t\t(0, _keys2.default)(files).forEach(function (k, i) {\n\t\t\t\t\tvar name = i ? 'file' + (i + 1) : 'file';\n\t\t\t\t\trequestFiles[name] = {\n\t\t\t\t\t\tdata: files[k],\n\t\t\t\t\t\tpath: k\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn requestFiles;\n\t\t}\n\t}]);\n\treturn Agent;\n}(); /*\n ******************************************************************************\n Copyright (c) 2016 Particle Industries, Inc. All rights reserved.\n \n This program is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation, either\n version 3 of the License, or (at your option) any later version.\n \n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n \n You should have received a copy of the GNU Lesser General Public\n License along with this program; if not, see .\n ******************************************************************************\n */\n\nexports.default = Agent;\nmodule.exports = exports['default'];\n//# sourceMappingURL=Agent.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _assign = require('babel-runtime/core-js/object/assign');\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _Particle = require('./Particle');\n\nvar _Particle2 = _interopRequireDefault(_Particle);\n\nvar _Library = require('./Library');\n\nvar _Library2 = _interopRequireDefault(_Library);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Client = function () {\n\tfunction Client(_ref) {\n\t\tvar auth = _ref.auth;\n\t\tvar _ref$api = _ref.api;\n\t\tvar api = _ref$api === undefined ? new _Particle2.default() : _ref$api;\n\t\t(0, _classCallCheck3.default)(this, Client);\n\n\t\t(0, _assign2.default)(this, { auth: auth, api: api });\n\t}\n\n\t/**\n * Get firmware library objects\n * @param {Object} query The query parameters for libraries. See Particle.listLibraries\n * @return {Promise}\n */\n\n\n\t(0, _createClass3.default)(Client, [{\n\t\tkey: 'libraries',\n\t\tvalue: function libraries() {\n\t\t\tvar _this = this;\n\n\t\t\tvar query = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t\t\treturn this.api.listLibraries((0, _assign2.default)({}, query, { auth: this.auth })).then(function (payload) {\n\t\t\t\tvar libraries = payload.body.data || [];\n\t\t\t\treturn libraries.map(function (l) {\n\t\t\t\t\treturn new _Library2.default(_this, l);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get one firmware library object\n * @param {String} name Name of the library to fetch\n * @param {Object} query The query parameters for libraries. See Particle.getLibrary\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'library',\n\t\tvalue: function library(name) {\n\t\t\tvar _this2 = this;\n\n\t\t\tvar query = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n\t\t\treturn this.api.getLibrary((0, _assign2.default)({}, query, { name: name, auth: this.auth })).then(function (payload) {\n\t\t\t\tvar library = payload.body.data || {};\n\t\t\t\treturn new _Library2.default(_this2, library);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Publish a new library version\n * @param {Buffer} archive The compressed archive with the library source\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'publishLibrary',\n\t\tvalue: function publishLibrary(archive) {\n\t\t\tvar _this3 = this;\n\n\t\t\treturn this.api.publishLibrary({ archive: archive, auth: this.auth }).then(function (payload) {\n\t\t\t\tvar library = payload.body.data || {};\n\t\t\t\treturn new _Library2.default(_this3, library);\n\t\t\t}, function (error) {\n\t\t\t\t_this3._throwError(error);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Delete an entire published library\n * @param {String} $0.name Name of the library to delete\n * @param {String} $0.force Key to force deleting a public library\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'deleteLibrary',\n\t\tvalue: function deleteLibrary(_ref2) {\n\t\t\tvar _this4 = this;\n\n\t\t\tvar name = _ref2.name;\n\t\t\tvar version = _ref2.version;\n\t\t\tvar force = _ref2.force;\n\n\t\t\treturn this.api.deleteLibrary({ name: name, force: force }).then(function (payload) {\n\t\t\t\treturn true;\n\t\t\t}, function (error) {\n\t\t\t\t_this4._throwError(error);\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: '_throwError',\n\t\tvalue: function _throwError(error) {\n\t\t\tif (error.body && error.body.errors) {\n\t\t\t\tvar errorMessages = error.body.errors.map(function (e) {\n\t\t\t\t\treturn e.message;\n\t\t\t\t}).join('\\n');\n\t\t\t\tthrow new Error(errorMessages);\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t}, {\n\t\tkey: 'downloadFile',\n\t\tvalue: function downloadFile(url) {\n\t\t\treturn this.api.downloadFile({ url: url });\n\t\t}\n\t}, {\n\t\tkey: 'compileCode',\n\t\tvalue: function compileCode(files, platformId, targetVersion) {\n\t\t\treturn this.api.compileCode({ files: files, platformId: platformId, targetVersion: targetVersion, auth: this.auth });\n\t\t}\n\t}]);\n\treturn Client;\n}();\n\nexports.default = Client;\nmodule.exports = exports['default'];\n//# sourceMappingURL=Client.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _promise = require('babel-runtime/core-js/promise');\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _assign = require('babel-runtime/core-js/object/assign');\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* Library\n * Represents a version of a library published in the cloud.\n */\n\nvar Library = function () {\n\tfunction Library(client, data) {\n\t\t(0, _classCallCheck3.default)(this, Library);\n\n\t\t// Make client non-enumerable so it doesn't show up in Object.keys, JSON.stringify, etc\n\t\tObject.defineProperty(this, 'client', { value: client });\n\t\tthis._assignAttributes(data);\n\t\tthis.downloadUrl = data.links && data.links.download;\n\t}\n\n\t(0, _createClass3.default)(Library, [{\n\t\tkey: '_assignAttributes',\n\t\tvalue: function _assignAttributes(data) {\n\t\t\t(0, _assign2.default)(this, data.attributes);\n\t\t}\n\n\t\t/**\n * Download the compressed file containing the source code for this library version.\n * @return {Promise} Resolves to the .tar.gz compressed source code\n */\n\n\t}, {\n\t\tkey: 'download',\n\t\tvalue: function download() {\n\t\t\tif (!this.downloadUrl) {\n\t\t\t\treturn _promise2.default.reject(new Error('No download URL for this library'));\n\t\t\t}\n\t\t\treturn this.client.downloadFile(this.downloadUrl);\n\t\t}\n\n\t\t/* TODO: add a versions() method to fetch an array of library objects */\n\n\t}]);\n\treturn Library;\n}();\n\nexports.default = Library;\nmodule.exports = exports['default'];\n//# sourceMappingURL=Library.js.map","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","/**\n * Root reference for iframes.\n */\n\nvar root;\nif (typeof window !== 'undefined') { // Browser window\n root = window;\n} else if (typeof self !== 'undefined') { // Web Worker\n root = self;\n} else { // Other environments\n console.warn(\"Using browser-only version of superagent in non-browser environment\");\n root = this;\n}\n\nvar Emitter = require('emitter');\nvar requestBase = require('./request-base');\nvar isObject = require('./is-object');\n\n/**\n * Noop.\n */\n\nfunction noop(){};\n\n/**\n * Expose `request`.\n */\n\nvar request = module.exports = require('./request').bind(null, Request);\n\n/**\n * Determine XHR.\n */\n\nrequest.getXHR = function () {\n if (root.XMLHttpRequest\n && (!root.location || 'file:' != root.location.protocol\n || !root.ActiveXObject)) {\n return new XMLHttpRequest;\n } else {\n try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {}\n try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {}\n try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {}\n try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {}\n }\n throw Error(\"Browser-only verison of superagent could not find XHR\");\n};\n\n/**\n * Removes leading and trailing whitespace, added to support IE.\n *\n * @param {String} s\n * @return {String}\n * @api private\n */\n\nvar trim = ''.trim\n ? function(s) { return s.trim(); }\n : function(s) { return s.replace(/(^\\s*|\\s*$)/g, ''); };\n\n/**\n * Serialize the given `obj`.\n *\n * @param {Object} obj\n * @return {String}\n * @api private\n */\n\nfunction serialize(obj) {\n if (!isObject(obj)) return obj;\n var pairs = [];\n for (var key in obj) {\n pushEncodedKeyValuePair(pairs, key, obj[key]);\n }\n return pairs.join('&');\n}\n\n/**\n * Helps 'serialize' with serializing arrays.\n * Mutates the pairs array.\n *\n * @param {Array} pairs\n * @param {String} key\n * @param {Mixed} val\n */\n\nfunction pushEncodedKeyValuePair(pairs, key, val) {\n if (val != null) {\n if (Array.isArray(val)) {\n val.forEach(function(v) {\n pushEncodedKeyValuePair(pairs, key, v);\n });\n } else if (isObject(val)) {\n for(var subkey in val) {\n pushEncodedKeyValuePair(pairs, key + '[' + subkey + ']', val[subkey]);\n }\n } else {\n pairs.push(encodeURIComponent(key)\n + '=' + encodeURIComponent(val));\n }\n } else if (val === null) {\n pairs.push(encodeURIComponent(key));\n }\n}\n\n/**\n * Expose serialization method.\n */\n\n request.serializeObject = serialize;\n\n /**\n * Parse the given x-www-form-urlencoded `str`.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction parseString(str) {\n var obj = {};\n var pairs = str.split('&');\n var pair;\n var pos;\n\n for (var i = 0, len = pairs.length; i < len; ++i) {\n pair = pairs[i];\n pos = pair.indexOf('=');\n if (pos == -1) {\n obj[decodeURIComponent(pair)] = '';\n } else {\n obj[decodeURIComponent(pair.slice(0, pos))] =\n decodeURIComponent(pair.slice(pos + 1));\n }\n }\n\n return obj;\n}\n\n/**\n * Expose parser.\n */\n\nrequest.parseString = parseString;\n\n/**\n * Default MIME type map.\n *\n * superagent.types.xml = 'application/xml';\n *\n */\n\nrequest.types = {\n html: 'text/html',\n json: 'application/json',\n xml: 'application/xml',\n urlencoded: 'application/x-www-form-urlencoded',\n 'form': 'application/x-www-form-urlencoded',\n 'form-data': 'application/x-www-form-urlencoded'\n};\n\n/**\n * Default serialization map.\n *\n * superagent.serialize['application/xml'] = function(obj){\n * return 'generated xml here';\n * };\n *\n */\n\n request.serialize = {\n 'application/x-www-form-urlencoded': serialize,\n 'application/json': JSON.stringify\n };\n\n /**\n * Default parsers.\n *\n * superagent.parse['application/xml'] = function(str){\n * return { object parsed from str };\n * };\n *\n */\n\nrequest.parse = {\n 'application/x-www-form-urlencoded': parseString,\n 'application/json': JSON.parse\n};\n\n/**\n * Parse the given header `str` into\n * an object containing the mapped fields.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction parseHeader(str) {\n var lines = str.split(/\\r?\\n/);\n var fields = {};\n var index;\n var line;\n var field;\n var val;\n\n lines.pop(); // trailing CRLF\n\n for (var i = 0, len = lines.length; i < len; ++i) {\n line = lines[i];\n index = line.indexOf(':');\n field = line.slice(0, index).toLowerCase();\n val = trim(line.slice(index + 1));\n fields[field] = val;\n }\n\n return fields;\n}\n\n/**\n * Check if `mime` is json or has +json structured syntax suffix.\n *\n * @param {String} mime\n * @return {Boolean}\n * @api private\n */\n\nfunction isJSON(mime) {\n return /[\\/+]json\\b/.test(mime);\n}\n\n/**\n * Return the mime type for the given `str`.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction type(str){\n return str.split(/ *; */).shift();\n};\n\n/**\n * Return header field parameters.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction params(str){\n return str.split(/ *; */).reduce(function(obj, str){\n var parts = str.split(/ *= */),\n key = parts.shift(),\n val = parts.shift();\n\n if (key && val) obj[key] = val;\n return obj;\n }, {});\n};\n\n/**\n * Initialize a new `Response` with the given `xhr`.\n *\n * - set flags (.ok, .error, etc)\n * - parse header\n *\n * Examples:\n *\n * Aliasing `superagent` as `request` is nice:\n *\n * request = superagent;\n *\n * We can use the promise-like API, or pass callbacks:\n *\n * request.get('/').end(function(res){});\n * request.get('/', function(res){});\n *\n * Sending data can be chained:\n *\n * request\n * .post('/user')\n * .send({ name: 'tj' })\n * .end(function(res){});\n *\n * Or passed to `.send()`:\n *\n * request\n * .post('/user')\n * .send({ name: 'tj' }, function(res){});\n *\n * Or passed to `.post()`:\n *\n * request\n * .post('/user', { name: 'tj' })\n * .end(function(res){});\n *\n * Or further reduced to a single call for simple cases:\n *\n * request\n * .post('/user', { name: 'tj' }, function(res){});\n *\n * @param {XMLHTTPRequest} xhr\n * @param {Object} options\n * @api private\n */\n\nfunction Response(req, options) {\n options = options || {};\n this.req = req;\n this.xhr = this.req.xhr;\n // responseText is accessible only if responseType is '' or 'text' and on older browsers\n this.text = ((this.req.method !='HEAD' && (this.xhr.responseType === '' || this.xhr.responseType === 'text')) || typeof this.xhr.responseType === 'undefined')\n ? this.xhr.responseText\n : null;\n this.statusText = this.req.xhr.statusText;\n this._setStatusProperties(this.xhr.status);\n this.header = this.headers = parseHeader(this.xhr.getAllResponseHeaders());\n // getAllResponseHeaders sometimes falsely returns \"\" for CORS requests, but\n // getResponseHeader still works. so we get content-type even if getting\n // other headers fails.\n this.header['content-type'] = this.xhr.getResponseHeader('content-type');\n this._setHeaderProperties(this.header);\n this.body = this.req.method != 'HEAD'\n ? this._parseBody(this.text ? this.text : this.xhr.response)\n : null;\n}\n\n/**\n * Get case-insensitive `field` value.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nResponse.prototype.get = function(field){\n return this.header[field.toLowerCase()];\n};\n\n/**\n * Set header related properties:\n *\n * - `.type` the content type without params\n *\n * A response of \"Content-Type: text/plain; charset=utf-8\"\n * will provide you with a `.type` of \"text/plain\".\n *\n * @param {Object} header\n * @api private\n */\n\nResponse.prototype._setHeaderProperties = function(header){\n // content-type\n var ct = this.header['content-type'] || '';\n this.type = type(ct);\n\n // params\n var obj = params(ct);\n for (var key in obj) this[key] = obj[key];\n};\n\n/**\n * Parse the given body `str`.\n *\n * Used for auto-parsing of bodies. Parsers\n * are defined on the `superagent.parse` object.\n *\n * @param {String} str\n * @return {Mixed}\n * @api private\n */\n\nResponse.prototype._parseBody = function(str){\n var parse = request.parse[this.type];\n if (!parse && isJSON(this.type)) {\n parse = request.parse['application/json'];\n }\n return parse && str && (str.length || str instanceof Object)\n ? parse(str)\n : null;\n};\n\n/**\n * Set flags such as `.ok` based on `status`.\n *\n * For example a 2xx response will give you a `.ok` of __true__\n * whereas 5xx will be __false__ and `.error` will be __true__. The\n * `.clientError` and `.serverError` are also available to be more\n * specific, and `.statusType` is the class of error ranging from 1..5\n * sometimes useful for mapping respond colors etc.\n *\n * \"sugar\" properties are also defined for common cases. Currently providing:\n *\n * - .noContent\n * - .badRequest\n * - .unauthorized\n * - .notAcceptable\n * - .notFound\n *\n * @param {Number} status\n * @api private\n */\n\nResponse.prototype._setStatusProperties = function(status){\n // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request\n if (status === 1223) {\n status = 204;\n }\n\n var type = status / 100 | 0;\n\n // status / class\n this.status = this.statusCode = status;\n this.statusType = type;\n\n // basics\n this.info = 1 == type;\n this.ok = 2 == type;\n this.clientError = 4 == type;\n this.serverError = 5 == type;\n this.error = (4 == type || 5 == type)\n ? this.toError()\n : false;\n\n // sugar\n this.accepted = 202 == status;\n this.noContent = 204 == status;\n this.badRequest = 400 == status;\n this.unauthorized = 401 == status;\n this.notAcceptable = 406 == status;\n this.notFound = 404 == status;\n this.forbidden = 403 == status;\n};\n\n/**\n * Return an `Error` representative of this response.\n *\n * @return {Error}\n * @api public\n */\n\nResponse.prototype.toError = function(){\n var req = this.req;\n var method = req.method;\n var url = req.url;\n\n var msg = 'cannot ' + method + ' ' + url + ' (' + this.status + ')';\n var err = new Error(msg);\n err.status = this.status;\n err.method = method;\n err.url = url;\n\n return err;\n};\n\n/**\n * Expose `Response`.\n */\n\nrequest.Response = Response;\n\n/**\n * Initialize a new `Request` with the given `method` and `url`.\n *\n * @param {String} method\n * @param {String} url\n * @api public\n */\n\nfunction Request(method, url) {\n var self = this;\n this._query = this._query || [];\n this.method = method;\n this.url = url;\n this.header = {}; // preserves header name case\n this._header = {}; // coerces header names to lowercase\n this.on('end', function(){\n var err = null;\n var res = null;\n\n try {\n res = new Response(self);\n } catch(e) {\n err = new Error('Parser is unable to parse the response');\n err.parse = true;\n err.original = e;\n // issue #675: return the raw response if the response parsing fails\n err.rawResponse = self.xhr && self.xhr.responseText ? self.xhr.responseText : null;\n // issue #876: return the http status code if the response parsing fails\n err.statusCode = self.xhr && self.xhr.status ? self.xhr.status : null;\n return self.callback(err);\n }\n\n self.emit('response', res);\n\n var new_err;\n try {\n if (res.status < 200 || res.status >= 300) {\n new_err = new Error(res.statusText || 'Unsuccessful HTTP response');\n new_err.original = err;\n new_err.response = res;\n new_err.status = res.status;\n }\n } catch(e) {\n new_err = e; // #985 touching res may cause INVALID_STATE_ERR on old Android\n }\n\n // #1000 don't catch errors from the callback to avoid double calling it\n if (new_err) {\n self.callback(new_err, res);\n } else {\n self.callback(null, res);\n }\n });\n}\n\n/**\n * Mixin `Emitter` and `requestBase`.\n */\n\nEmitter(Request.prototype);\nfor (var key in requestBase) {\n Request.prototype[key] = requestBase[key];\n}\n\n/**\n * Set Content-Type to `type`, mapping values from `request.types`.\n *\n * Examples:\n *\n * superagent.types.xml = 'application/xml';\n *\n * request.post('/')\n * .type('xml')\n * .send(xmlstring)\n * .end(callback);\n *\n * request.post('/')\n * .type('application/xml')\n * .send(xmlstring)\n * .end(callback);\n *\n * @param {String} type\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.type = function(type){\n this.set('Content-Type', request.types[type] || type);\n return this;\n};\n\n/**\n * Set responseType to `val`. Presently valid responseTypes are 'blob' and\n * 'arraybuffer'.\n *\n * Examples:\n *\n * req.get('/')\n * .responseType('blob')\n * .end(callback);\n *\n * @param {String} val\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.responseType = function(val){\n this._responseType = val;\n return this;\n};\n\n/**\n * Set Accept to `type`, mapping values from `request.types`.\n *\n * Examples:\n *\n * superagent.types.json = 'application/json';\n *\n * request.get('/agent')\n * .accept('json')\n * .end(callback);\n *\n * request.get('/agent')\n * .accept('application/json')\n * .end(callback);\n *\n * @param {String} accept\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.accept = function(type){\n this.set('Accept', request.types[type] || type);\n return this;\n};\n\n/**\n * Set Authorization field value with `user` and `pass`.\n *\n * @param {String} user\n * @param {String} pass\n * @param {Object} options with 'type' property 'auto' or 'basic' (default 'basic')\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.auth = function(user, pass, options){\n if (!options) {\n options = {\n type: 'basic'\n }\n }\n\n switch (options.type) {\n case 'basic':\n var str = btoa(user + ':' + pass);\n this.set('Authorization', 'Basic ' + str);\n break;\n\n case 'auto':\n this.username = user;\n this.password = pass;\n break;\n }\n return this;\n};\n\n/**\n* Add query-string `val`.\n*\n* Examples:\n*\n* request.get('/shoes')\n* .query('size=10')\n* .query({ color: 'blue' })\n*\n* @param {Object|String} val\n* @return {Request} for chaining\n* @api public\n*/\n\nRequest.prototype.query = function(val){\n if ('string' != typeof val) val = serialize(val);\n if (val) this._query.push(val);\n return this;\n};\n\n/**\n * Queue the given `file` as an attachment to the specified `field`,\n * with optional `filename`.\n *\n * ``` js\n * request.post('/upload')\n * .attach('content', new Blob(['hey!'], { type: \"text/html\"}))\n * .end(callback);\n * ```\n *\n * @param {String} field\n * @param {Blob|File} file\n * @param {String} filename\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.attach = function(field, file, filename){\n this._getFormData().append(field, file, filename || file.name);\n return this;\n};\n\nRequest.prototype._getFormData = function(){\n if (!this._formData) {\n this._formData = new root.FormData();\n }\n return this._formData;\n};\n\n/**\n * Invoke the callback with `err` and `res`\n * and handle arity check.\n *\n * @param {Error} err\n * @param {Response} res\n * @api private\n */\n\nRequest.prototype.callback = function(err, res){\n var fn = this._callback;\n this.clearTimeout();\n fn(err, res);\n};\n\n/**\n * Invoke callback with x-domain error.\n *\n * @api private\n */\n\nRequest.prototype.crossDomainError = function(){\n var err = new Error('Request has been terminated\\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.');\n err.crossDomain = true;\n\n err.status = this.status;\n err.method = this.method;\n err.url = this.url;\n\n this.callback(err);\n};\n\n/**\n * Invoke callback with timeout error.\n *\n * @api private\n */\n\nRequest.prototype._timeoutError = function(){\n var timeout = this._timeout;\n var err = new Error('timeout of ' + timeout + 'ms exceeded');\n err.timeout = timeout;\n this.callback(err);\n};\n\n/**\n * Compose querystring to append to req.url\n *\n * @api private\n */\n\nRequest.prototype._appendQueryString = function(){\n var query = this._query.join('&');\n if (query) {\n this.url += ~this.url.indexOf('?')\n ? '&' + query\n : '?' + query;\n }\n};\n\n/**\n * Initiate request, invoking callback `fn(res)`\n * with an instanceof `Response`.\n *\n * @param {Function} fn\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.end = function(fn){\n var self = this;\n var xhr = this.xhr = request.getXHR();\n var timeout = this._timeout;\n var data = this._formData || this._data;\n\n // store callback\n this._callback = fn || noop;\n\n // state change\n xhr.onreadystatechange = function(){\n if (4 != xhr.readyState) return;\n\n // In IE9, reads to any property (e.g. status) off of an aborted XHR will\n // result in the error \"Could not complete the operation due to error c00c023f\"\n var status;\n try { status = xhr.status } catch(e) { status = 0; }\n\n if (0 == status) {\n if (self.timedout) return self._timeoutError();\n if (self._aborted) return;\n return self.crossDomainError();\n }\n self.emit('end');\n };\n\n // progress\n var handleProgress = function(e){\n if (e.total > 0) {\n e.percent = e.loaded / e.total * 100;\n }\n e.direction = 'download';\n self.emit('progress', e);\n };\n if (this.hasListeners('progress')) {\n xhr.onprogress = handleProgress;\n }\n try {\n if (xhr.upload && this.hasListeners('progress')) {\n xhr.upload.onprogress = handleProgress;\n }\n } catch(e) {\n // Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist.\n // Reported here:\n // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context\n }\n\n // timeout\n if (timeout && !this._timer) {\n this._timer = setTimeout(function(){\n self.timedout = true;\n self.abort();\n }, timeout);\n }\n\n // querystring\n this._appendQueryString();\n\n // initiate request\n if (this.username && this.password) {\n xhr.open(this.method, this.url, true, this.username, this.password);\n } else {\n xhr.open(this.method, this.url, true);\n }\n\n // CORS\n if (this._withCredentials) xhr.withCredentials = true;\n\n // body\n if ('GET' != this.method && 'HEAD' != this.method && 'string' != typeof data && !this._isHost(data)) {\n // serialize stuff\n var contentType = this._header['content-type'];\n var serialize = this._serializer || request.serialize[contentType ? contentType.split(';')[0] : ''];\n if (!serialize && isJSON(contentType)) serialize = request.serialize['application/json'];\n if (serialize) data = serialize(data);\n }\n\n // set header fields\n for (var field in this.header) {\n if (null == this.header[field]) continue;\n xhr.setRequestHeader(field, this.header[field]);\n }\n\n if (this._responseType) {\n xhr.responseType = this._responseType;\n }\n\n // send stuff\n this.emit('request', this);\n\n // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing)\n // We need null here if data is undefined\n xhr.send(typeof data !== 'undefined' ? data : null);\n return this;\n};\n\n\n/**\n * Expose `Request`.\n */\n\nrequest.Request = Request;\n\n/**\n * GET `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.get = function(url, data, fn){\n var req = request('GET', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.query(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * HEAD `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.head = function(url, data, fn){\n var req = request('HEAD', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * OPTIONS query to `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.options = function(url, data, fn){\n var req = request('OPTIONS', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * DELETE `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nfunction del(url, fn){\n var req = request('DELETE', url);\n if (fn) req.end(fn);\n return req;\n};\n\nrequest['del'] = del;\nrequest['delete'] = del;\n\n/**\n * PATCH `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed} [data]\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.patch = function(url, data, fn){\n var req = request('PATCH', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * POST `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed} [data]\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.post = function(url, data, fn){\n var req = request('POST', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * PUT `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.put = function(url, data, fn){\n var req = request('PUT', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n var result = splitPath(path),\n root = result[0],\n dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPath(path)[2];\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPath(path)[3];\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};","var ClientRequest = require('./lib/request')\nvar extend = require('xtend')\nvar statusCodes = require('builtin-status-codes')\nvar url = require('url')\n\nvar http = exports\n\nhttp.request = function (opts, cb) {\n\tif (typeof opts === 'string')\n\t\topts = url.parse(opts)\n\telse\n\t\topts = extend(opts)\n\n\t// Normally, the page is loaded from http or https, so not specifying a protocol\n\t// will result in a (valid) protocol-relative url. However, this won't work if\n\t// the protocol is something else, like 'file:'\n\tvar defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : ''\n\n\tvar protocol = opts.protocol || defaultProtocol\n\tvar host = opts.hostname || opts.host\n\tvar port = opts.port\n\tvar path = opts.path || '/'\n\n\t// Necessary for IPv6 addresses\n\tif (host && host.indexOf(':') !== -1)\n\t\thost = '[' + host + ']'\n\n\t// This may be a relative url. The browser should always be able to interpret it correctly.\n\topts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path\n\topts.method = (opts.method || 'GET').toUpperCase()\n\topts.headers = opts.headers || {}\n\n\t// Also valid opts.auth, opts.mode\n\n\tvar req = new ClientRequest(opts)\n\tif (cb)\n\t\treq.on('response', cb)\n\treturn req\n}\n\nhttp.get = function get (opts, cb) {\n\tvar req = http.request(opts, cb)\n\treq.end()\n\treturn req\n}\n\nhttp.Agent = function () {}\nhttp.Agent.defaultMaxSockets = 4\n\nhttp.STATUS_CODES = statusCodes\n\nhttp.METHODS = [\n\t'CHECKOUT',\n\t'CONNECT',\n\t'COPY',\n\t'DELETE',\n\t'GET',\n\t'HEAD',\n\t'LOCK',\n\t'M-SEARCH',\n\t'MERGE',\n\t'MKACTIVITY',\n\t'MKCOL',\n\t'MOVE',\n\t'NOTIFY',\n\t'OPTIONS',\n\t'PATCH',\n\t'POST',\n\t'PROPFIND',\n\t'PROPPATCH',\n\t'PURGE',\n\t'PUT',\n\t'REPORT',\n\t'SEARCH',\n\t'SUBSCRIBE',\n\t'TRACE',\n\t'UNLOCK',\n\t'UNSUBSCRIBE'\n]","module.exports = function (prefix) {\n return function (request) {\n if (request.url[0] === '/') {\n request.url = prefix + request.url;\n }\n\n return request;\n };\n}","'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n","/**\n * Module of mixed-in functions shared between node and client code\n */\nvar isObject = require('./is-object');\n\n/**\n * Clear previous timeout.\n *\n * @return {Request} for chaining\n * @api public\n */\n\nexports.clearTimeout = function _clearTimeout(){\n this._timeout = 0;\n clearTimeout(this._timer);\n return this;\n};\n\n/**\n * Override default response body parser\n *\n * This function will be called to convert incoming data into request.body\n *\n * @param {Function}\n * @api public\n */\n\nexports.parse = function parse(fn){\n this._parser = fn;\n return this;\n};\n\n/**\n * Override default request body serializer\n *\n * This function will be called to convert data set via .send or .attach into payload to send\n *\n * @param {Function}\n * @api public\n */\n\nexports.serialize = function serialize(fn){\n this._serializer = fn;\n return this;\n};\n\n/**\n * Set timeout to `ms`.\n *\n * @param {Number} ms\n * @return {Request} for chaining\n * @api public\n */\n\nexports.timeout = function timeout(ms){\n this._timeout = ms;\n return this;\n};\n\n/**\n * Promise support\n *\n * @param {Function} resolve\n * @param {Function} reject\n * @return {Request}\n */\n\nexports.then = function then(resolve, reject) {\n if (!this._fullfilledPromise) {\n var self = this;\n this._fullfilledPromise = new Promise(function(innerResolve, innerReject){\n self.end(function(err, res){\n if (err) innerReject(err); else innerResolve(res);\n });\n });\n }\n return this._fullfilledPromise.then(resolve, reject);\n}\n\n/**\n * Allow for extension\n */\n\nexports.use = function use(fn) {\n fn(this);\n return this;\n}\n\n\n/**\n * Get request header `field`.\n * Case-insensitive.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nexports.get = function(field){\n return this._header[field.toLowerCase()];\n};\n\n/**\n * Get case-insensitive header `field` value.\n * This is a deprecated internal API. Use `.get(field)` instead.\n *\n * (getHeader is no longer used internally by the superagent code base)\n *\n * @param {String} field\n * @return {String}\n * @api private\n * @deprecated\n */\n\nexports.getHeader = exports.get;\n\n/**\n * Set header `field` to `val`, or multiple fields with one object.\n * Case-insensitive.\n *\n * Examples:\n *\n * req.get('/')\n * .set('Accept', 'application/json')\n * .set('X-API-Key', 'foobar')\n * .end(callback);\n *\n * req.get('/')\n * .set({ Accept: 'application/json', 'X-API-Key': 'foobar' })\n * .end(callback);\n *\n * @param {String|Object} field\n * @param {String} val\n * @return {Request} for chaining\n * @api public\n */\n\nexports.set = function(field, val){\n if (isObject(field)) {\n for (var key in field) {\n this.set(key, field[key]);\n }\n return this;\n }\n this._header[field.toLowerCase()] = val;\n this.header[field] = val;\n return this;\n};\n\n/**\n * Remove header `field`.\n * Case-insensitive.\n *\n * Example:\n *\n * req.get('/')\n * .unset('User-Agent')\n * .end(callback);\n *\n * @param {String} field\n */\nexports.unset = function(field){\n delete this._header[field.toLowerCase()];\n delete this.header[field];\n return this;\n};\n\n/**\n * Write the field `name` and `val` for \"multipart/form-data\"\n * request bodies.\n *\n * ``` js\n * request.post('/upload')\n * .field('foo', 'bar')\n * .end(callback);\n * ```\n *\n * @param {String} name\n * @param {String|Blob|File|Buffer|fs.ReadStream} val\n * @return {Request} for chaining\n * @api public\n */\nexports.field = function(name, val) {\n this._getFormData().append(name, val);\n return this;\n};\n\n/**\n * Abort the request, and clear potential timeout.\n *\n * @return {Request}\n * @api public\n */\nexports.abort = function(){\n if (this._aborted) {\n return this;\n }\n this._aborted = true;\n this.xhr && this.xhr.abort(); // browser\n this.req && this.req.abort(); // node\n this.clearTimeout();\n this.emit('abort');\n return this;\n};\n\n/**\n * Enable transmission of cookies with x-domain requests.\n *\n * Note that for this to work the origin must not be\n * using \"Access-Control-Allow-Origin\" with a wildcard,\n * and also must set \"Access-Control-Allow-Credentials\"\n * to \"true\".\n *\n * @api public\n */\n\nexports.withCredentials = function(){\n // This is browser-only functionality. Node side is no-op.\n this._withCredentials = true;\n return this;\n};\n\n/**\n * Set the max redirects to `n`. Does noting in browser XHR implementation.\n *\n * @param {Number} n\n * @return {Request} for chaining\n * @api public\n */\n\nexports.redirects = function(n){\n this._maxRedirects = n;\n return this;\n};\n\n/**\n * Convert to a plain javascript object (not JSON string) of scalar properties.\n * Note as this method is designed to return a useful non-this value,\n * it cannot be chained.\n *\n * @return {Object} describing method, url, and data of this request\n * @api public\n */\n\nexports.toJSON = function(){\n return {\n method: this.method,\n url: this.url,\n data: this._data,\n headers: this._header\n };\n};\n\n/**\n * Check if `obj` is a host object,\n * we don't want to serialize these :)\n *\n * TODO: future proof, move to compoent land\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api private\n */\n\nexports._isHost = function _isHost(obj) {\n var str = {}.toString.call(obj);\n\n switch (str) {\n case '[object File]':\n case '[object Blob]':\n case '[object FormData]':\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Send `data` as the request body, defaulting the `.type()` to \"json\" when\n * an object is given.\n *\n * Examples:\n *\n * // manual json\n * request.post('/user')\n * .type('json')\n * .send('{\"name\":\"tj\"}')\n * .end(callback)\n *\n * // auto json\n * request.post('/user')\n * .send({ name: 'tj' })\n * .end(callback)\n *\n * // manual x-www-form-urlencoded\n * request.post('/user')\n * .type('form')\n * .send('name=tj')\n * .end(callback)\n *\n * // auto x-www-form-urlencoded\n * request.post('/user')\n * .type('form')\n * .send({ name: 'tj' })\n * .end(callback)\n *\n * // defaults to x-www-form-urlencoded\n * request.post('/user')\n * .send('name=tobi')\n * .send('species=ferret')\n * .end(callback)\n *\n * @param {String|Object} data\n * @return {Request} for chaining\n * @api public\n */\n\nexports.send = function(data){\n var obj = isObject(data);\n var type = this._header['content-type'];\n\n // merge\n if (obj && isObject(this._data)) {\n for (var key in data) {\n this._data[key] = data[key];\n }\n } else if ('string' == typeof data) {\n // default to x-www-form-urlencoded\n if (!type) this.type('form');\n type = this._header['content-type'];\n if ('application/x-www-form-urlencoded' == type) {\n this._data = this._data\n ? this._data + '&' + data\n : data;\n } else {\n this._data = (this._data || '') + data;\n }\n } else {\n this._data = data;\n }\n\n if (!obj || this._isHost(data)) return this;\n\n // default to json\n if (!type) this.type('json');\n return this;\n};\n","/**\n * Check if `obj` is an object.\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api private\n */\n\nfunction isObject(obj) {\n return null !== obj && 'object' === typeof obj;\n}\n\nmodule.exports = isObject;\n","// The node and browser modules expose versions of this with the\n// appropriate constructor function bound as first argument\n/**\n * Issue a request:\n *\n * Examples:\n *\n * request('GET', '/users').end(callback)\n * request('/users').end(callback)\n * request('/users', callback)\n *\n * @param {String} method\n * @param {String|Function} url or callback\n * @return {Request}\n * @api public\n */\n\nfunction request(RequestConstructor, method, url) {\n // callback\n if ('function' == typeof url) {\n return new RequestConstructor('GET', method).end(url);\n }\n\n // url first\n if (2 == arguments.length) {\n return new RequestConstructor('GET', method);\n }\n\n return new RequestConstructor(method, url);\n}\n\nmodule.exports = request;\n","/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\n(function () {\n try {\n cachedSetTimeout = setTimeout;\n } catch (e) {\n cachedSetTimeout = function () {\n throw new Error('setTimeout is not defined');\n }\n }\n try {\n cachedClearTimeout = clearTimeout;\n } catch (e) {\n cachedClearTimeout = function () {\n throw new Error('clearTimeout is not defined');\n }\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/promise\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = require(\"../core-js/object/set-prototype-of\");\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = require(\"../core-js/object/create\");\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _isIterable2 = require(\"../core-js/is-iterable\");\n\nvar _isIterable3 = _interopRequireDefault(_isIterable2);\n\nvar _getIterator2 = require(\"../core-js/get-iterator\");\n\nvar _getIterator3 = _interopRequireDefault(_getIterator2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if ((0, _isIterable3.default)(Object(arr))) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();","module.exports = { \"default\": require(\"core-js/library/fn/get-iterator\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };","// var Base64 = require('Base64')\nvar capability = require('./capability')\nvar inherits = require('inherits')\nvar response = require('./response')\nvar stream = require('stream')\nvar toArrayBuffer = require('to-arraybuffer')\n\nvar IncomingMessage = response.IncomingMessage\nvar rStates = response.readyStates\n\nfunction decideMode (preferBinary, avoidFetch) {\n\tif (capability.fetch && !avoidFetch) {\n\t\treturn 'fetch'\n\t} else if (capability.mozchunkedarraybuffer) {\n\t\treturn 'moz-chunked-arraybuffer'\n\t} else if (capability.msstream) {\n\t\treturn 'ms-stream'\n\t} else if (capability.arraybuffer && preferBinary) {\n\t\treturn 'arraybuffer'\n\t} else if (capability.vbArray && preferBinary) {\n\t\treturn 'text:vbarray'\n\t} else {\n\t\treturn 'text'\n\t}\n}\n\nvar ClientRequest = module.exports = function (opts) {\n\tvar self = this\n\tstream.Writable.call(self)\n\n\tself._opts = opts\n\tself._body = []\n\tself._headers = {}\n\tif (opts.auth)\n\t\tself.setHeader('Authorization', 'Basic ' + new Buffer(opts.auth).toString('base64'))\n\tObject.keys(opts.headers).forEach(function (name) {\n\t\tself.setHeader(name, opts.headers[name])\n\t})\n\n\tvar preferBinary\n\tif (opts.mode === 'prefer-streaming') {\n\t\t// If streaming is a high priority but binary compatibility and\n\t\t// the accuracy of the 'content-type' header aren't\n\t\tpreferBinary = false\n\t} else if (opts.mode === 'allow-wrong-content-type') {\n\t\t// If streaming is more important than preserving the 'content-type' header\n\t\tpreferBinary = !capability.overrideMimeType\n\t} else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') {\n\t\t// Use binary if text streaming may corrupt data or the content-type header, or for speed\n\t\tpreferBinary = true\n\t} else {\n\t\tthrow new Error('Invalid value for opts.mode')\n\t}\n\tself._mode = decideMode(preferBinary, opts.avoidFetch)\n\n\tself.on('finish', function () {\n\t\tself._onFinish()\n\t})\n}\n\ninherits(ClientRequest, stream.Writable)\n\nClientRequest.prototype.setHeader = function (name, value) {\n\tvar self = this\n\tvar lowerName = name.toLowerCase()\n\t// This check is not necessary, but it prevents warnings from browsers about setting unsafe\n\t// headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but\n\t// http-browserify did it, so I will too.\n\tif (unsafeHeaders.indexOf(lowerName) !== -1)\n\t\treturn\n\n\tself._headers[lowerName] = {\n\t\tname: name,\n\t\tvalue: value\n\t}\n}\n\nClientRequest.prototype.getHeader = function (name) {\n\tvar self = this\n\treturn self._headers[name.toLowerCase()].value\n}\n\nClientRequest.prototype.removeHeader = function (name) {\n\tvar self = this\n\tdelete self._headers[name.toLowerCase()]\n}\n\nClientRequest.prototype._onFinish = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\tvar opts = self._opts\n\n\tvar headersObj = self._headers\n\tvar body\n\tif (opts.method === 'POST' || opts.method === 'PUT' || opts.method === 'PATCH') {\n\t\tif (capability.blobConstructor) {\n\t\t\tbody = new global.Blob(self._body.map(function (buffer) {\n\t\t\t\treturn toArrayBuffer(buffer)\n\t\t\t}), {\n\t\t\t\ttype: (headersObj['content-type'] || {}).value || ''\n\t\t\t})\n\t\t} else {\n\t\t\t// get utf8 string\n\t\t\tbody = Buffer.concat(self._body).toString()\n\t\t}\n\t}\n\n\tif (self._mode === 'fetch') {\n\t\tvar headers = Object.keys(headersObj).map(function (name) {\n\t\t\treturn [headersObj[name].name, headersObj[name].value]\n\t\t})\n\n\t\tglobal.fetch(self._opts.url, {\n\t\t\tmethod: self._opts.method,\n\t\t\theaders: headers,\n\t\t\tbody: body,\n\t\t\tmode: 'cors',\n\t\t\tcredentials: opts.withCredentials ? 'include' : 'same-origin'\n\t\t}).then(function (response) {\n\t\t\tself._fetchResponse = response\n\t\t\tself._connect()\n\t\t}, function (reason) {\n\t\t\tself.emit('error', reason)\n\t\t})\n\t} else {\n\t\tvar xhr = self._xhr = new global.XMLHttpRequest()\n\t\ttry {\n\t\t\txhr.open(self._opts.method, self._opts.url, true)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\n\t\t// Can't set responseType on really old browsers\n\t\tif ('responseType' in xhr)\n\t\t\txhr.responseType = self._mode.split(':')[0]\n\n\t\tif ('withCredentials' in xhr)\n\t\t\txhr.withCredentials = !!opts.withCredentials\n\n\t\tif (self._mode === 'text' && 'overrideMimeType' in xhr)\n\t\t\txhr.overrideMimeType('text/plain; charset=x-user-defined')\n\n\t\tObject.keys(headersObj).forEach(function (name) {\n\t\t\txhr.setRequestHeader(headersObj[name].name, headersObj[name].value)\n\t\t})\n\n\t\tself._response = null\n\t\txhr.onreadystatechange = function () {\n\t\t\tswitch (xhr.readyState) {\n\t\t\t\tcase rStates.LOADING:\n\t\t\t\tcase rStates.DONE:\n\t\t\t\t\tself._onXHRProgress()\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Necessary for streaming in Firefox, since xhr.response is ONLY defined\n\t\t// in onprogress, not in onreadystatechange with xhr.readyState = 3\n\t\tif (self._mode === 'moz-chunked-arraybuffer') {\n\t\t\txhr.onprogress = function () {\n\t\t\t\tself._onXHRProgress()\n\t\t\t}\n\t\t}\n\n\t\txhr.onerror = function () {\n\t\t\tif (self._destroyed)\n\t\t\t\treturn\n\t\t\tself.emit('error', new Error('XHR error'))\n\t\t}\n\n\t\ttry {\n\t\t\txhr.send(body)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t}\n}\n\n/**\n * Checks if xhr.status is readable and non-zero, indicating no error.\n * Even though the spec says it should be available in readyState 3,\n * accessing it throws an exception in IE8\n */\nfunction statusValid (xhr) {\n\ttry {\n\t\tvar status = xhr.status\n\t\treturn (status !== null && status !== 0)\n\t} catch (e) {\n\t\treturn false\n\t}\n}\n\nClientRequest.prototype._onXHRProgress = function () {\n\tvar self = this\n\n\tif (!statusValid(self._xhr) || self._destroyed)\n\t\treturn\n\n\tif (!self._response)\n\t\tself._connect()\n\n\tself._response._onXHRProgress()\n}\n\nClientRequest.prototype._connect = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\n\tself._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode)\n\tself.emit('response', self._response)\n}\n\nClientRequest.prototype._write = function (chunk, encoding, cb) {\n\tvar self = this\n\n\tself._body.push(chunk)\n\tcb()\n}\n\nClientRequest.prototype.abort = ClientRequest.prototype.destroy = function () {\n\tvar self = this\n\tself._destroyed = true\n\tif (self._response)\n\t\tself._response._destroyed = true\n\tif (self._xhr)\n\t\tself._xhr.abort()\n\t// Currently, there isn't a way to truly abort a fetch.\n\t// If you like bikeshedding, see https://github.com/whatwg/fetch/issues/27\n}\n\nClientRequest.prototype.end = function (data, encoding, cb) {\n\tvar self = this\n\tif (typeof data === 'function') {\n\t\tcb = data\n\t\tdata = undefined\n\t}\n\n\tstream.Writable.prototype.end.call(self, data, encoding, cb)\n}\n\nClientRequest.prototype.flushHeaders = function () {}\nClientRequest.prototype.setTimeout = function () {}\nClientRequest.prototype.setNoDelay = function () {}\nClientRequest.prototype.setSocketKeepAlive = function () {}\n\n// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method\nvar unsafeHeaders = [\n\t'accept-charset',\n\t'accept-encoding',\n\t'access-control-request-headers',\n\t'access-control-request-method',\n\t'connection',\n\t'content-length',\n\t'cookie',\n\t'cookie2',\n\t'date',\n\t'dnt',\n\t'expect',\n\t'host',\n\t'keep-alive',\n\t'origin',\n\t'referer',\n\t'te',\n\t'trailer',\n\t'transfer-encoding',\n\t'upgrade',\n\t'user-agent',\n\t'via'\n]\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","'use strict'\n\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nfunction init () {\n var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n }\n\n revLookup['-'.charCodeAt(0)] = 62\n revLookup['_'.charCodeAt(0)] = 63\n}\n\ninit()\n\nfunction toByteArray (b64) {\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/number/is-nan\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/get-prototype-of\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/keys\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/entries\"), __esModule: true };","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n var args = [].slice.call(arguments, 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/is-iterable\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/set-prototype-of\"), __esModule: true };","module.exports = {\n \"100\": \"Continue\",\n \"101\": \"Switching Protocols\",\n \"102\": \"Processing\",\n \"200\": \"OK\",\n \"201\": \"Created\",\n \"202\": \"Accepted\",\n \"203\": \"Non-Authoritative Information\",\n \"204\": \"No Content\",\n \"205\": \"Reset Content\",\n \"206\": \"Partial Content\",\n \"207\": \"Multi-Status\",\n \"208\": \"Already Reported\",\n \"226\": \"IM Used\",\n \"300\": \"Multiple Choices\",\n \"301\": \"Moved Permanently\",\n \"302\": \"Found\",\n \"303\": \"See Other\",\n \"304\": \"Not Modified\",\n \"305\": \"Use Proxy\",\n \"307\": \"Temporary Redirect\",\n \"308\": \"Permanent Redirect\",\n \"400\": \"Bad Request\",\n \"401\": \"Unauthorized\",\n \"402\": \"Payment Required\",\n \"403\": \"Forbidden\",\n \"404\": \"Not Found\",\n \"405\": \"Method Not Allowed\",\n \"406\": \"Not Acceptable\",\n \"407\": \"Proxy Authentication Required\",\n \"408\": \"Request Timeout\",\n \"409\": \"Conflict\",\n \"410\": \"Gone\",\n \"411\": \"Length Required\",\n \"412\": \"Precondition Failed\",\n \"413\": \"Payload Too Large\",\n \"414\": \"URI Too Long\",\n \"415\": \"Unsupported Media Type\",\n \"416\": \"Range Not Satisfiable\",\n \"417\": \"Expectation Failed\",\n \"418\": \"I'm a teapot\",\n \"421\": \"Misdirected Request\",\n \"422\": \"Unprocessable Entity\",\n \"423\": \"Locked\",\n \"424\": \"Failed Dependency\",\n \"425\": \"Unordered Collection\",\n \"426\": \"Upgrade Required\",\n \"428\": \"Precondition Required\",\n \"429\": \"Too Many Requests\",\n \"431\": \"Request Header Fields Too Large\",\n \"500\": \"Internal Server Error\",\n \"501\": \"Not Implemented\",\n \"502\": \"Bad Gateway\",\n \"503\": \"Service Unavailable\",\n \"504\": \"Gateway Timeout\",\n \"505\": \"HTTP Version Not Supported\",\n \"506\": \"Variant Also Negotiates\",\n \"507\": \"Insufficient Storage\",\n \"508\": \"Loop Detected\",\n \"509\": \"Bandwidth Limit Exceeded\",\n \"510\": \"Not Extended\",\n \"511\": \"Network Authentication Required\"\n}\n","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableByteStream)\n\nexports.blobConstructor = false\ntry {\n\tnew Blob([new ArrayBuffer(1)])\n\texports.blobConstructor = true\n} catch (e) {}\n\nvar xhr = new global.XMLHttpRequest()\n// If location.host is empty, e.g. if this page/worker was loaded\n// from a Blob, then use example.com to avoid an error\nxhr.open('GET', global.location.host ? '/' : 'https://example.com')\n\nfunction checkTypeSupport (type) {\n\ttry {\n\t\txhr.responseType = type\n\t\treturn xhr.responseType === type\n\t} catch (e) {}\n\treturn false\n}\n\n// For some strange reason, Safari 7.0 reports typeof global.ArrayBuffer === 'object'.\n// Safari 7.1 appears to have fixed this bug.\nvar haveArrayBuffer = typeof global.ArrayBuffer !== 'undefined'\nvar haveSlice = haveArrayBuffer && isFunction(global.ArrayBuffer.prototype.slice)\n\nexports.arraybuffer = haveArrayBuffer && checkTypeSupport('arraybuffer')\n// These next two tests unavoidably show warnings in Chrome. Since fetch will always\n// be used if it's available, just return false for these to avoid the warnings.\nexports.msstream = !exports.fetch && haveSlice && checkTypeSupport('ms-stream')\nexports.mozchunkedarraybuffer = !exports.fetch && haveArrayBuffer &&\n\tcheckTypeSupport('moz-chunked-arraybuffer')\nexports.overrideMimeType = isFunction(xhr.overrideMimeType)\nexports.vbArray = isFunction(global.VBArray)\n\nfunction isFunction (value) {\n return typeof value === 'function'\n}\n\nxhr = null // Help gc\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar stream = require('stream')\n\nvar rStates = exports.readyStates = {\n\tUNSENT: 0,\n\tOPENED: 1,\n\tHEADERS_RECEIVED: 2,\n\tLOADING: 3,\n\tDONE: 4\n}\n\nvar IncomingMessage = exports.IncomingMessage = function (xhr, response, mode) {\n\tvar self = this\n\tstream.Readable.call(self)\n\n\tself._mode = mode\n\tself.headers = {}\n\tself.rawHeaders = []\n\tself.trailers = {}\n\tself.rawTrailers = []\n\n\t// Fake the 'close' event, but only once 'end' fires\n\tself.on('end', function () {\n\t\t// The nextTick is necessary to prevent the 'request' module from causing an infinite loop\n\t\tprocess.nextTick(function () {\n\t\t\tself.emit('close')\n\t\t})\n\t})\n\n\tif (mode === 'fetch') {\n\t\tself._fetchResponse = response\n\n\t\tself.statusCode = response.status\n\t\tself.statusMessage = response.statusText\n\t\t// backwards compatible version of for (- of ):\n\t\t// for (var
- ,_i,_it = [Symbol.iterator]();
- = (_i = _it.next()).value,!_i.done;)\n\t\tfor (var header, _i, _it = response.headers[Symbol.iterator](); header = (_i = _it.next()).value, !_i.done;) {\n\t\t\tself.headers[header[0].toLowerCase()] = header[1]\n\t\t\tself.rawHeaders.push(header[0], header[1])\n\t\t}\n\n\t\t// TODO: this doesn't respect backpressure. Once WritableStream is available, this can be fixed\n\t\tvar reader = response.body.getReader()\n\t\tfunction read () {\n\t\t\treader.read().then(function (result) {\n\t\t\t\tif (self._destroyed)\n\t\t\t\t\treturn\n\t\t\t\tif (result.done) {\n\t\t\t\t\tself.push(null)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tself.push(new Buffer(result.value))\n\t\t\t\tread()\n\t\t\t})\n\t\t}\n\t\tread()\n\n\t} else {\n\t\tself._xhr = xhr\n\t\tself._pos = 0\n\n\t\tself.statusCode = xhr.status\n\t\tself.statusMessage = xhr.statusText\n\t\tvar headers = xhr.getAllResponseHeaders().split(/\\r?\\n/)\n\t\theaders.forEach(function (header) {\n\t\t\tvar matches = header.match(/^([^:]+):\\s*(.*)/)\n\t\t\tif (matches) {\n\t\t\t\tvar key = matches[1].toLowerCase()\n\t\t\t\tif (key === 'set-cookie') {\n\t\t\t\t\tif (self.headers[key] === undefined) {\n\t\t\t\t\t\tself.headers[key] = []\n\t\t\t\t\t}\n\t\t\t\t\tself.headers[key].push(matches[2])\n\t\t\t\t} else if (self.headers[key] !== undefined) {\n\t\t\t\t\tself.headers[key] += ', ' + matches[2]\n\t\t\t\t} else {\n\t\t\t\t\tself.headers[key] = matches[2]\n\t\t\t\t}\n\t\t\t\tself.rawHeaders.push(matches[1], matches[2])\n\t\t\t}\n\t\t})\n\n\t\tself._charset = 'x-user-defined'\n\t\tif (!capability.overrideMimeType) {\n\t\t\tvar mimeType = self.rawHeaders['mime-type']\n\t\t\tif (mimeType) {\n\t\t\t\tvar charsetMatch = mimeType.match(/;\\s*charset=([^;])(;|$)/)\n\t\t\t\tif (charsetMatch) {\n\t\t\t\t\tself._charset = charsetMatch[1].toLowerCase()\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!self._charset)\n\t\t\t\tself._charset = 'utf-8' // best guess\n\t\t}\n\t}\n}\n\ninherits(IncomingMessage, stream.Readable)\n\nIncomingMessage.prototype._read = function () {}\n\nIncomingMessage.prototype._onXHRProgress = function () {\n\tvar self = this\n\n\tvar xhr = self._xhr\n\n\tvar response = null\n\tswitch (self._mode) {\n\t\tcase 'text:vbarray': // For IE9\n\t\t\tif (xhr.readyState !== rStates.DONE)\n\t\t\t\tbreak\n\t\t\ttry {\n\t\t\t\t// This fails in IE8\n\t\t\t\tresponse = new global.VBArray(xhr.responseBody).toArray()\n\t\t\t} catch (e) {}\n\t\t\tif (response !== null) {\n\t\t\t\tself.push(new Buffer(response))\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// Falls through in IE8\t\n\t\tcase 'text':\n\t\t\ttry { // This will fail when readyState = 3 in IE9. Switch mode and wait for readyState = 4\n\t\t\t\tresponse = xhr.responseText\n\t\t\t} catch (e) {\n\t\t\t\tself._mode = 'text:vbarray'\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif (response.length > self._pos) {\n\t\t\t\tvar newData = response.substr(self._pos)\n\t\t\t\tif (self._charset === 'x-user-defined') {\n\t\t\t\t\tvar buffer = new Buffer(newData.length)\n\t\t\t\t\tfor (var i = 0; i < newData.length; i++)\n\t\t\t\t\t\tbuffer[i] = newData.charCodeAt(i) & 0xff\n\n\t\t\t\t\tself.push(buffer)\n\t\t\t\t} else {\n\t\t\t\t\tself.push(newData, self._charset)\n\t\t\t\t}\n\t\t\t\tself._pos = response.length\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'arraybuffer':\n\t\t\tif (xhr.readyState !== rStates.DONE)\n\t\t\t\tbreak\n\t\t\tresponse = xhr.response\n\t\t\tself.push(new Buffer(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'moz-chunked-arraybuffer': // take whole\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING || !response)\n\t\t\t\tbreak\n\t\t\tself.push(new Buffer(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'ms-stream':\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING)\n\t\t\t\tbreak\n\t\t\tvar reader = new global.MSStreamReader()\n\t\t\treader.onprogress = function () {\n\t\t\t\tif (reader.result.byteLength > self._pos) {\n\t\t\t\t\tself.push(new Buffer(new Uint8Array(reader.result.slice(self._pos))))\n\t\t\t\t\tself._pos = reader.result.byteLength\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.onload = function () {\n\t\t\t\tself.push(null)\n\t\t\t}\n\t\t\t// reader.onerror = ??? // TODO: this\n\t\t\treader.readAsArrayBuffer(response)\n\t\t\tbreak\n\t}\n\n\t// The ms-stream case handles end separately in reader.onload()\n\tif (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') {\n\t\tself.push(null)\n\t}\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","var Buffer = require('buffer').Buffer\n\nmodule.exports = function (buf) {\n\t// If the buffer is backed by a Uint8Array, a faster version will work\n\tif (buf instanceof Uint8Array) {\n\t\t// If the buffer isn't a subarray, return the underlying ArrayBuffer\n\t\tif (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {\n\t\t\treturn buf.buffer\n\t\t} else if (typeof buf.buffer.slice === 'function') {\n\t\t\t// Otherwise we need to get a proper copy\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength)\n\t\t}\n\t}\n\n\tif (Buffer.isBuffer(buf)) {\n\t\t// This is the slow version that will work with any Buffer\n\t\t// implementation (even in old browsers)\n\t\tvar arrayCopy = new Uint8Array(buf.length)\n\t\tvar len = buf.length\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tarrayCopy[i] = buf[i]\n\t\t}\n\t\treturn arrayCopy.buffer\n\t} else {\n\t\tthrow new Error('Argument must be a Buffer')\n\t}\n}\n","module.exports = require(\"./lib/_stream_duplex.js\")\n","module.exports = require(\"./lib/_stream_writable.js\")\n","var Stream = (function (){\n try {\n return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify\n } catch(_){}\n}());\nexports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = Stream || exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n\nif (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) {\n module.exports = Stream;\n}\n","module.exports = require(\"./lib/_stream_transform.js\")\n","module.exports = require(\"./lib/_stream_passthrough.js\")\n","// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/**/\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }return keys;\n};\n/**/\n\nmodule.exports = Duplex;\n\n/**/\nvar processNextTick = require('process-nextick-args');\n/**/\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\nvar keys = objectKeys(Writable.prototype);\nfor (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n processNextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}","// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/**/\nvar processNextTick = require('process-nextick-args');\n/**/\n\n/**/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream;\n(function () {\n try {\n Stream = require('st' + 'ream');\n } catch (_) {} finally {\n if (!Stream) Stream = require('events').EventEmitter;\n }\n})();\n/**/\n\nvar Buffer = require('buffer').Buffer;\n/**/\nvar bufferShim = require('buffer-shims');\n/**/\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\nvar Duplex;\nfunction WritableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~ ~this.highWaterMark;\n\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function writableStateGetBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')\n });\n } catch (_) {}\n})();\n\nvar Duplex;\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, though they're not\n // instanceof Writable, they're instanceof Readable.\n if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n processNextTick(cb, er);\n}\n\n// If we get something that is not a buffer, string, null, or undefined,\n// and we're not in objectMode, then that's an error.\n// Otherwise stream chunks are all considered to be of length=1, and the\n// watermarks determine how many objects to keep in the buffer, rather than\n// how many bytes or characters.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n // Always throw error if a null is written\n // if we are not in object mode then throw\n // if it is not a buffer, string, or undefined.\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = bufferShim.from(chunk, encoding);\n }\n return chunk;\n}\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, chunk, encoding, cb) {\n chunk = decodeChunk(state, chunk, encoding);\n\n if (Buffer.isBuffer(chunk)) encoding = 'buffer';\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) processNextTick(cb, er);else cb(er);\n\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /**/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /**/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished) {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n if (state.pendingcb === 0) {\n prefinish(stream, state);\n state.finished = true;\n stream.emit('finish');\n } else {\n prefinish(stream, state);\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) processNextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n\n this.finish = function (err) {\n var entry = _this.entry;\n _this.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = _this;\n } else {\n state.corkedRequestsFree = _this;\n }\n };\n}","'use strict';\n\nmodule.exports = Readable;\n\n/**/\nvar processNextTick = require('process-nextick-args');\n/**/\n\n/**/\nvar isArray = require('isarray');\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream;\n(function () {\n try {\n Stream = require('st' + 'ream');\n } catch (_) {} finally {\n if (!Stream) Stream = require('events').EventEmitter;\n }\n})();\n/**/\n\nvar Buffer = require('buffer').Buffer;\n/**/\nvar bufferShim = require('buffer-shims');\n/**/\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\n/**/\nvar debugUtil = require('util');\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/**/\n\nvar BufferList = require('./internal/streams/BufferList');\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nfunction prependListener(emitter, event, fn) {\n if (typeof emitter.prependListener === 'function') {\n return emitter.prependListener(event, fn);\n } else {\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n }\n}\n\nvar Duplex;\nfunction ReadableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~ ~this.highWaterMark;\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // when piping, we only care about 'readable' events that happen\n // after read()ing all the bytes and not getting any pushback.\n this.ranOut = false;\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nvar Duplex;\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options && typeof options.read === 'function') this._read = options.read;\n\n Stream.call(this);\n}\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n\n if (!state.objectMode && typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = bufferShim.from(chunk, encoding);\n encoding = '';\n }\n }\n\n return readableAddChunk(this, state, chunk, encoding, false);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n var state = this._readableState;\n return readableAddChunk(this, state, chunk, '', true);\n};\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\nfunction readableAddChunk(stream, state, chunk, encoding, addToFront) {\n var er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (state.ended && !addToFront) {\n var e = new Error('stream.push() after EOF');\n stream.emit('error', e);\n } else if (state.endEmitted && addToFront) {\n var _e = new Error('stream.unshift() after end event');\n stream.emit('error', _e);\n } else {\n var skipAdd;\n if (state.decoder && !addToFront && !encoding) {\n chunk = state.decoder.write(chunk);\n skipAdd = !state.objectMode && chunk.length === 0;\n }\n\n if (!addToFront) state.reading = false;\n\n // Don't add to the buffer if we've decoded to an empty string chunk and\n // we're not in object mode\n if (!skipAdd) {\n // if we want the data now, just emit it.\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n }\n\n maybeReadMore(stream, state);\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n\n return needMoreData(state);\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction chunkInvalid(state, chunk) {\n var er = null;\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n processNextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : cleanup;\n if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable) {\n debug('onunpipe');\n if (readable === src) {\n cleanup();\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', cleanup);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var _i = 0; _i < len; _i++) {\n dests[_i].emit('unpipe', this);\n }return this;\n }\n\n // try to find the right one.\n var i = indexOf(state.pipes, dest);\n if (i === -1) return this;\n\n state.pipes.splice(i, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n processNextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this, state);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n processNextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var state = this._readableState;\n var paused = false;\n\n var self = this;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) self.push(chunk);\n }\n\n self.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = self.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n var events = ['error', 'close', 'destroy', 'pause', 'resume'];\n forEach(events, function (ev) {\n stream.on(ev, self.emit.bind(self, ev));\n });\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n self._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return self;\n};\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = bufferShim.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n processNextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}","// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(Transform, Duplex);\n\nfunction TransformState(stream) {\n this.afterTransform = function (er, data) {\n return afterTransform(stream, er, data);\n };\n\n this.needTransform = false;\n this.transforming = false;\n this.writecb = null;\n this.writechunk = null;\n this.writeencoding = null;\n}\n\nfunction afterTransform(stream, er, data) {\n var ts = stream._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data !== null && data !== undefined) stream.push(data);\n\n cb(er);\n\n var rs = stream._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n stream._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = new TransformState(this);\n\n // when the writable side finishes, then flush out anything remaining.\n var stream = this;\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n this.once('prefinish', function () {\n if (typeof this._flush === 'function') this._flush(function (er) {\n done(stream, er);\n });else done(stream);\n });\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('Not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nfunction done(stream, er) {\n if (er) return stream.emit('error', er);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n var ws = stream._writableState;\n var ts = stream._transformState;\n\n if (ws.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (ts.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n}","// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nmodule.exports = require('../modules/_core').Promise;","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.get-iterator');","'use strict';\n\nvar Buffer = require('buffer').Buffer;\n/**/\nvar bufferShim = require('buffer-shims');\n/**/\n\nmodule.exports = BufferList;\n\nfunction BufferList() {\n this.head = null;\n this.tail = null;\n this.length = 0;\n}\n\nBufferList.prototype.push = function (v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n};\n\nBufferList.prototype.unshift = function (v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n};\n\nBufferList.prototype.shift = function () {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n};\n\nBufferList.prototype.clear = function () {\n this.head = this.tail = null;\n this.length = 0;\n};\n\nBufferList.prototype.join = function (s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n};\n\nBufferList.prototype.concat = function (n) {\n if (this.length === 0) return bufferShim.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = bufferShim.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n p.data.copy(ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n};","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.is-iterable');","require('./es6.array.iterator');\nvar global = require('./_global')\n , hide = require('./_hide')\n , Iterators = require('./_iterators')\n , TO_STRING_TAG = require('./_wks')('toStringTag');\n\nfor(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){\n var NAME = collections[i]\n , Collection = global[NAME]\n , proto = Collection && Collection.prototype;\n if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function(iterated){\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , index = this._i\n , point;\n if(index >= O.length)return {value: undefined, done: true};\n point = $at(O, index);\n this._i += point.length;\n return {value: point, done: false};\n});","'use strict';\nvar LIBRARY = require('./_library')\n , global = require('./_global')\n , ctx = require('./_ctx')\n , classof = require('./_classof')\n , $export = require('./_export')\n , isObject = require('./_is-object')\n , aFunction = require('./_a-function')\n , anInstance = require('./_an-instance')\n , forOf = require('./_for-of')\n , speciesConstructor = require('./_species-constructor')\n , task = require('./_task').set\n , microtask = require('./_microtask')()\n , PROMISE = 'Promise'\n , TypeError = global.TypeError\n , process = global.process\n , $Promise = global[PROMISE]\n , process = global.process\n , isNode = classof(process) == 'process'\n , empty = function(){ /* empty */ }\n , Internal, GenericPromiseCapability, Wrapper;\n\nvar USE_NATIVE = !!function(){\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1)\n , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch(e){ /* empty */ }\n}();\n\n// helpers\nvar sameConstructor = function(a, b){\n // with library wrapper special case\n return a === b || a === $Promise && b === Wrapper;\n};\nvar isThenable = function(it){\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar newPromiseCapability = function(C){\n return sameConstructor($Promise, C)\n ? new PromiseCapability(C)\n : new GenericPromiseCapability(C);\n};\nvar PromiseCapability = GenericPromiseCapability = function(C){\n var resolve, reject;\n this.promise = new C(function($$resolve, $$reject){\n if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\nvar perform = function(exec){\n try {\n exec();\n } catch(e){\n return {error: e};\n }\n};\nvar notify = function(promise, isReject){\n if(promise._n)return;\n promise._n = true;\n var chain = promise._c;\n microtask(function(){\n var value = promise._v\n , ok = promise._s == 1\n , i = 0;\n var run = function(reaction){\n var handler = ok ? reaction.ok : reaction.fail\n , resolve = reaction.resolve\n , reject = reaction.reject\n , domain = reaction.domain\n , result, then;\n try {\n if(handler){\n if(!ok){\n if(promise._h == 2)onHandleUnhandled(promise);\n promise._h = 1;\n }\n if(handler === true)result = value;\n else {\n if(domain)domain.enter();\n result = handler(value);\n if(domain)domain.exit();\n }\n if(result === reaction.promise){\n reject(TypeError('Promise-chain cycle'));\n } else if(then = isThenable(result)){\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch(e){\n reject(e);\n }\n };\n while(chain.length > i)run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if(isReject && !promise._h)onUnhandled(promise);\n });\n};\nvar onUnhandled = function(promise){\n task.call(global, function(){\n var value = promise._v\n , abrupt, handler, console;\n if(isUnhandled(promise)){\n abrupt = perform(function(){\n if(isNode){\n process.emit('unhandledRejection', value, promise);\n } else if(handler = global.onunhandledrejection){\n handler({promise: promise, reason: value});\n } else if((console = global.console) && console.error){\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if(abrupt)throw abrupt.error;\n });\n};\nvar isUnhandled = function(promise){\n if(promise._h == 1)return false;\n var chain = promise._a || promise._c\n , i = 0\n , reaction;\n while(chain.length > i){\n reaction = chain[i++];\n if(reaction.fail || !isUnhandled(reaction.promise))return false;\n } return true;\n};\nvar onHandleUnhandled = function(promise){\n task.call(global, function(){\n var handler;\n if(isNode){\n process.emit('rejectionHandled', promise);\n } else if(handler = global.onrejectionhandled){\n handler({promise: promise, reason: promise._v});\n }\n });\n};\nvar $reject = function(value){\n var promise = this;\n if(promise._d)return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if(!promise._a)promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function(value){\n var promise = this\n , then;\n if(promise._d)return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if(promise === value)throw TypeError(\"Promise can't be resolved itself\");\n if(then = isThenable(value)){\n microtask(function(){\n var wrapper = {_w: promise, _d: false}; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch(e){\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch(e){\n $reject.call({_w: promise, _d: false}, e); // wrap\n }\n};\n\n// constructor polyfill\nif(!USE_NATIVE){\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor){\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch(err){\n $reject.call(this, err);\n }\n };\n Internal = function Promise(executor){\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected){\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if(this._a)this._a.push(reaction);\n if(this._s)notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function(onRejected){\n return this.then(undefined, onRejected);\n }\n });\n PromiseCapability = function(){\n var promise = new Internal;\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r){\n var capability = newPromiseCapability(this)\n , $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x){\n // instanceof instead of internal slot check because we should fix it without replacement native Promise core\n if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;\n var capability = newPromiseCapability(this)\n , $$resolve = capability.resolve;\n $$resolve(x);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable){\n var C = this\n , capability = newPromiseCapability(C)\n , resolve = capability.resolve\n , reject = capability.reject;\n var abrupt = perform(function(){\n var values = []\n , index = 0\n , remaining = 1;\n forOf(iterable, false, function(promise){\n var $index = index++\n , alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function(value){\n if(alreadyCalled)return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable){\n var C = this\n , capability = newPromiseCapability(C)\n , reject = capability.reject;\n var abrupt = perform(function(){\n forOf(iterable, false, function(promise){\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n }\n});","var core = module.exports = {version: '2.4.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef","var anObject = require('./_an-object')\n , get = require('./core.get-iterator-method');\nmodule.exports = require('./_core').getIterator = function(it){\n var iterFn = get(it);\n if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');\n return anObject(iterFn.call(it));\n};","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nrequire('../../modules/es7.symbol.async-iterator');\nrequire('../../modules/es7.symbol.observable');\nmodule.exports = require('../../modules/_core').Symbol;","'use strict';\n\nif (!process.version ||\n process.version.indexOf('v0.') === 0 ||\n process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = nextTick;\n} else {\n module.exports = process.nextTick;\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n var len = arguments.length;\n var args, i;\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n default:\n args = new Array(len - 1);\n i = 0;\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}\n","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n","'use strict';\n\nvar buffer = require('buffer');\nvar Buffer = buffer.Buffer;\nvar SlowBuffer = buffer.SlowBuffer;\nvar MAX_LEN = buffer.kMaxLength || 2147483647;\nexports.alloc = function alloc(size, fill, encoding) {\n if (typeof Buffer.alloc === 'function') {\n return Buffer.alloc(size, fill, encoding);\n }\n if (typeof encoding === 'number') {\n throw new TypeError('encoding must not be number');\n }\n if (typeof size !== 'number') {\n throw new TypeError('size must be a number');\n }\n if (size > MAX_LEN) {\n throw new RangeError('size is too large');\n }\n var enc = encoding;\n var _fill = fill;\n if (_fill === undefined) {\n enc = undefined;\n _fill = 0;\n }\n var buf = new Buffer(size);\n if (typeof _fill === 'string') {\n var fillBuf = new Buffer(_fill, enc);\n var flen = fillBuf.length;\n var i = -1;\n while (++i < size) {\n buf[i] = fillBuf[i % flen];\n }\n } else {\n buf.fill(_fill);\n }\n return buf;\n}\nexports.allocUnsafe = function allocUnsafe(size) {\n if (typeof Buffer.allocUnsafe === 'function') {\n return Buffer.allocUnsafe(size);\n }\n if (typeof size !== 'number') {\n throw new TypeError('size must be a number');\n }\n if (size > MAX_LEN) {\n throw new RangeError('size is too large');\n }\n return new Buffer(size);\n}\nexports.from = function from(value, encodingOrOffset, length) {\n if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) {\n return Buffer.from(value, encodingOrOffset, length);\n }\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number');\n }\n if (typeof value === 'string') {\n return new Buffer(value, encodingOrOffset);\n }\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n var offset = encodingOrOffset;\n if (arguments.length === 1) {\n return new Buffer(value);\n }\n if (typeof offset === 'undefined') {\n offset = 0;\n }\n var len = length;\n if (typeof len === 'undefined') {\n len = value.byteLength - offset;\n }\n if (offset >= value.byteLength) {\n throw new RangeError('\\'offset\\' is out of bounds');\n }\n if (len > value.byteLength - offset) {\n throw new RangeError('\\'length\\' is out of bounds');\n }\n return new Buffer(value.slice(offset, offset + len));\n }\n if (Buffer.isBuffer(value)) {\n var out = new Buffer(value.length);\n value.copy(out, 0, 0, value.length);\n return out;\n }\n if (value) {\n if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) {\n return new Buffer(value);\n }\n if (value.type === 'Buffer' && Array.isArray(value.data)) {\n return new Buffer(value.data);\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.');\n}\nexports.allocUnsafeSlow = function allocUnsafeSlow(size) {\n if (typeof Buffer.allocUnsafeSlow === 'function') {\n return Buffer.allocUnsafeSlow(size);\n }\n if (typeof size !== 'number') {\n throw new TypeError('size must be a number');\n }\n if (size >= MAX_LEN) {\n throw new RangeError('size is too large');\n }\n return new SlowBuffer(size);\n}\n","var classof = require('./_classof')\n , ITERATOR = require('./_wks')('iterator')\n , Iterators = require('./_iterators');\nmodule.exports = require('./_core').isIterable = function(it){\n var O = Object(it);\n return O[ITERATOR] !== undefined\n || '@@iterator' in O\n || Iterators.hasOwnProperty(classof(O));\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables')\n , step = require('./_iter-step')\n , Iterators = require('./_iterators')\n , toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef","var dP = require('./_object-dp')\n , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};","module.exports = {};","var toInteger = require('./_to-integer')\n , defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function(TO_STRING){\n return function(that, pos){\n var s = String(defined(that))\n , i = toInteger(pos)\n , l = s.length\n , a, b;\n if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};","'use strict';\nvar LIBRARY = require('./_library')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , hide = require('./_hide')\n , has = require('./_has')\n , Iterators = require('./_iterators')\n , $iterCreate = require('./_iter-create')\n , setToStringTag = require('./_set-to-string-tag')\n , getPrototypeOf = require('./_object-gpo')\n , ITERATOR = require('./_wks')('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined\n , $anyNative = NAME == 'Array' ? proto.entries || $native : $native\n , methods, key, IteratorPrototype;\n // Fix native\n if($anyNative){\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base));\n if(IteratorPrototype !== Object.prototype){\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};","var store = require('./_shared')('wks')\n , uid = require('./_uid')\n , Symbol = require('./_global').Symbol\n , USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function(name){\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;","module.exports = true;","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof')\n , TAG = require('./_wks')('toStringTag')\n // ES3 wrong here\n , ARG = cof(function(){ return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function(it, key){\n try {\n return it[key];\n } catch(e){ /* empty */ }\n};\n\nmodule.exports = function(it){\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};","var global = require('./_global')\n , core = require('./_core')\n , ctx = require('./_ctx')\n , hide = require('./_hide')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , expProto = exports[PROTOTYPE]\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(a, b, c){\n if(this instanceof C){\n switch(arguments.length){\n case 0: return new C;\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if(IS_PROTO){\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};","module.exports = function(it, Constructor, name, forbiddenField){\n if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object')\n , aFunction = require('./_a-function')\n , SPECIES = require('./_wks')('species');\nmodule.exports = function(O, D){\n var C = anObject(O).constructor, S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};","var ctx = require('./_ctx')\n , call = require('./_iter-call')\n , isArrayIter = require('./_is-array-iter')\n , anObject = require('./_an-object')\n , toLength = require('./_to-length')\n , getIterFn = require('./core.get-iterator-method')\n , BREAK = {}\n , RETURN = {};\nvar exports = module.exports = function(iterable, entries, fn, that, ITERATOR){\n var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)\n , f = ctx(fn, that, entries ? 2 : 1)\n , index = 0\n , length, step, iterator, result;\n if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if(result === BREAK || result === RETURN)return result;\n } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){\n result = call(iterator, f, step.value, entries);\n if(result === BREAK || result === RETURN)return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;","var ctx = require('./_ctx')\n , invoke = require('./_invoke')\n , html = require('./_html')\n , cel = require('./_dom-create')\n , global = require('./_global')\n , process = global.process\n , setTask = global.setImmediate\n , clearTask = global.clearImmediate\n , MessageChannel = global.MessageChannel\n , counter = 0\n , queue = {}\n , ONREADYSTATECHANGE = 'onreadystatechange'\n , defer, channel, port;\nvar run = function(){\n var id = +this;\n if(queue.hasOwnProperty(id)){\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function(event){\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n setTask = function setImmediate(fn){\n var args = [], i = 1;\n while(arguments.length > i)args.push(arguments[i++]);\n queue[++counter] = function(){\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id){\n delete queue[id];\n };\n // Node.js 0.8-\n if(require('./_cof')(process) == 'process'){\n defer = function(id){\n process.nextTick(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if(MessageChannel){\n channel = new MessageChannel;\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n defer = function(id){\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if(ONREADYSTATECHANGE in cel('script')){\n defer = function(id){\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function(id){\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};","var global = require('./_global')\n , macrotask = require('./_task').set\n , Observer = global.MutationObserver || global.WebKitMutationObserver\n , process = global.process\n , Promise = global.Promise\n , isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function(){\n var head, last, notify;\n\n var flush = function(){\n var parent, fn;\n if(isNode && (parent = process.domain))parent.exit();\n while(head){\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch(e){\n if(head)notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if(parent)parent.enter();\n };\n\n // Node.js\n if(isNode){\n notify = function(){\n process.nextTick(flush);\n };\n // browsers with MutationObserver\n } else if(Observer){\n var toggle = true\n , node = document.createTextNode('');\n new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new\n notify = function(){\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if(Promise && Promise.resolve){\n var promise = Promise.resolve();\n notify = function(){\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function(){\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function(fn){\n var task = {fn: fn, next: undefined};\n if(last)last.next = task;\n if(!head){\n head = task;\n notify();\n } last = task;\n };\n};","var hide = require('./_hide');\nmodule.exports = function(target, src, safe){\n for(var key in src){\n if(safe && target[key])target[key] = src[key];\n else hide(target, key, src[key]);\n } return target;\n};","var def = require('./_object-dp').f\n , has = require('./_has')\n , TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};","'use strict';\nvar global = require('./_global')\n , core = require('./_core')\n , dP = require('./_object-dp')\n , DESCRIPTORS = require('./_descriptors')\n , SPECIES = require('./_wks')('species');\n\nmodule.exports = function(KEY){\n var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {\n configurable: true,\n get: function(){ return this; }\n });\n};","var ITERATOR = require('./_wks')('iterator')\n , SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function(){ SAFE_CLOSING = true; };\n Array.from(riter, function(){ throw 2; });\n} catch(e){ /* empty */ }\n\nmodule.exports = function(exec, skipClosing){\n if(!skipClosing && !SAFE_CLOSING)return false;\n var safe = false;\n try {\n var arr = [7]\n , iter = arr[ITERATOR]();\n iter.next = function(){ return {done: safe = true}; };\n arr[ITERATOR] = function(){ return iter; };\n exec(arr);\n } catch(e){ /* empty */ }\n return safe;\n};","var isObject = require('./_is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};","var classof = require('./_classof')\n , ITERATOR = require('./_wks')('iterator')\n , Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function(it){\n if(it != undefined)return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar Buffer = require('buffer').Buffer;\n\nvar isBufferEncoding = Buffer.isEncoding\n || function(encoding) {\n switch (encoding && encoding.toLowerCase()) {\n case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;\n default: return false;\n }\n }\n\n\nfunction assertEncoding(encoding) {\n if (encoding && !isBufferEncoding(encoding)) {\n throw new Error('Unknown encoding: ' + encoding);\n }\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters. CESU-8 is handled as part of the UTF-8 encoding.\n//\n// @TODO Handling all encodings inside a single object makes it very difficult\n// to reason about this code, so it should be split up in the future.\n// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code\n// points as used by CESU-8.\nvar StringDecoder = exports.StringDecoder = function(encoding) {\n this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');\n assertEncoding(encoding);\n switch (this.encoding) {\n case 'utf8':\n // CESU-8 represents each of Surrogate Pair by 3-bytes\n this.surrogateSize = 3;\n break;\n case 'ucs2':\n case 'utf16le':\n // UTF-16 represents each of Surrogate Pair by 2-bytes\n this.surrogateSize = 2;\n this.detectIncompleteChar = utf16DetectIncompleteChar;\n break;\n case 'base64':\n // Base-64 stores 3 bytes in 4 chars, and pads the remainder.\n this.surrogateSize = 3;\n this.detectIncompleteChar = base64DetectIncompleteChar;\n break;\n default:\n this.write = passThroughWrite;\n return;\n }\n\n // Enough space to store all bytes of a single character. UTF-8 needs 4\n // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).\n this.charBuffer = new Buffer(6);\n // Number of bytes received for the current incomplete multi-byte character.\n this.charReceived = 0;\n // Number of bytes expected for the current incomplete multi-byte character.\n this.charLength = 0;\n};\n\n\n// write decodes the given buffer and returns it as JS string that is\n// guaranteed to not contain any partial multi-byte characters. Any partial\n// character found at the end of the buffer is buffered up, and will be\n// returned when calling write again with the remaining bytes.\n//\n// Note: Converting a Buffer containing an orphan surrogate to a String\n// currently works, but converting a String to a Buffer (via `new Buffer`, or\n// Buffer#write) will replace incomplete surrogates with the unicode\n// replacement character. See https://codereview.chromium.org/121173009/ .\nStringDecoder.prototype.write = function(buffer) {\n var charStr = '';\n // if our last write ended with an incomplete multibyte character\n while (this.charLength) {\n // determine how many remaining bytes this buffer has to offer for this char\n var available = (buffer.length >= this.charLength - this.charReceived) ?\n this.charLength - this.charReceived :\n buffer.length;\n\n // add the new bytes to the char buffer\n buffer.copy(this.charBuffer, this.charReceived, 0, available);\n this.charReceived += available;\n\n if (this.charReceived < this.charLength) {\n // still not enough chars in this buffer? wait for more ...\n return '';\n }\n\n // remove bytes belonging to the current character from the buffer\n buffer = buffer.slice(available, buffer.length);\n\n // get the character that was split\n charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);\n\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n var charCode = charStr.charCodeAt(charStr.length - 1);\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n this.charLength += this.surrogateSize;\n charStr = '';\n continue;\n }\n this.charReceived = this.charLength = 0;\n\n // if there are no more bytes in this buffer, just emit our char\n if (buffer.length === 0) {\n return charStr;\n }\n break;\n }\n\n // determine and set charLength / charReceived\n this.detectIncompleteChar(buffer);\n\n var end = buffer.length;\n if (this.charLength) {\n // buffer the incomplete character bytes we got\n buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);\n end -= this.charReceived;\n }\n\n charStr += buffer.toString(this.encoding, 0, end);\n\n var end = charStr.length - 1;\n var charCode = charStr.charCodeAt(end);\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n var size = this.surrogateSize;\n this.charLength += size;\n this.charReceived += size;\n this.charBuffer.copy(this.charBuffer, size, 0, size);\n buffer.copy(this.charBuffer, 0, 0, size);\n return charStr.substring(0, end);\n }\n\n // or just emit the charStr\n return charStr;\n};\n\n// detectIncompleteChar determines if there is an incomplete UTF-8 character at\n// the end of the given buffer. If so, it sets this.charLength to the byte\n// length that character, and sets this.charReceived to the number of bytes\n// that are available for this character.\nStringDecoder.prototype.detectIncompleteChar = function(buffer) {\n // determine how many bytes we have to check at the end of this buffer\n var i = (buffer.length >= 3) ? 3 : buffer.length;\n\n // Figure out if one of the last i bytes of our buffer announces an\n // incomplete char.\n for (; i > 0; i--) {\n var c = buffer[buffer.length - i];\n\n // See http://en.wikipedia.org/wiki/UTF-8#Description\n\n // 110XXXXX\n if (i == 1 && c >> 5 == 0x06) {\n this.charLength = 2;\n break;\n }\n\n // 1110XXXX\n if (i <= 2 && c >> 4 == 0x0E) {\n this.charLength = 3;\n break;\n }\n\n // 11110XXX\n if (i <= 3 && c >> 3 == 0x1E) {\n this.charLength = 4;\n break;\n }\n }\n this.charReceived = i;\n};\n\nStringDecoder.prototype.end = function(buffer) {\n var res = '';\n if (buffer && buffer.length)\n res = this.write(buffer);\n\n if (this.charReceived) {\n var cr = this.charReceived;\n var buf = this.charBuffer;\n var enc = this.encoding;\n res += buf.slice(0, cr).toString(enc);\n }\n\n return res;\n};\n\nfunction passThroughWrite(buffer) {\n return buffer.toString(this.encoding);\n}\n\nfunction utf16DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 2;\n this.charLength = this.charReceived ? 2 : 0;\n}\n\nfunction base64DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 3;\n this.charLength = this.charReceived ? 3 : 0;\n}\n","require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc){\n return $Object.defineProperty(it, key, desc);\n};","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global')\n , has = require('./_has')\n , DESCRIPTORS = require('./_descriptors')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , META = require('./_meta').KEY\n , $fails = require('./_fails')\n , shared = require('./_shared')\n , setToStringTag = require('./_set-to-string-tag')\n , uid = require('./_uid')\n , wks = require('./_wks')\n , wksExt = require('./_wks-ext')\n , wksDefine = require('./_wks-define')\n , keyOf = require('./_keyof')\n , enumKeys = require('./_enum-keys')\n , isArray = require('./_is-array')\n , anObject = require('./_an-object')\n , toIObject = require('./_to-iobject')\n , toPrimitive = require('./_to-primitive')\n , createDesc = require('./_property-desc')\n , _create = require('./_object-create')\n , gOPNExt = require('./_object-gopn-ext')\n , $GOPD = require('./_object-gopd')\n , $DP = require('./_object-dp')\n , $keys = require('./_object-keys')\n , gOPD = $GOPD.f\n , dP = $DP.f\n , gOPN = gOPNExt.f\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , PROTOTYPE = 'prototype'\n , HIDDEN = wks('_hidden')\n , TO_PRIMITIVE = wks('toPrimitive')\n , isEnum = {}.propertyIsEnumerable\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , OPSymbols = shared('op-symbols')\n , ObjectProto = Object[PROTOTYPE]\n , USE_NATIVE = typeof $Symbol == 'function'\n , QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n return _create(dP({}, 'a', {\n get: function(){ return dP(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = gOPD(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n dP(it, key, D);\n if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){\n return typeof it == 'symbol';\n} : function(it){\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(it === ObjectProto)$defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if(has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n it = toIObject(it);\n key = toPrimitive(key, true);\n if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;\n var D = gOPD(it, key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = gOPN(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var IS_OP = it === ObjectProto\n , names = gOPN(IS_OP ? OPSymbols : toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif(!USE_NATIVE){\n $Symbol = function Symbol(){\n if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function(value){\n if(this === ObjectProto)$set.call(OPSymbols, value);\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString(){\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if(DESCRIPTORS && !require('./_library')){\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function(name){\n return wrap(wks(name));\n }\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});\n\nfor(var symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);\n\nfor(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n if(isSymbol(key))return keyOf(SymbolRegistry, key);\n throw TypeError(key + ' is not a symbol!');\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it){\n if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n var args = [it]\n , i = 1\n , replacer, $replacer;\n while(arguments.length > i)args.push(arguments[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);","require('./_wks-define')('asyncIterator');","require('./_wks-define')('observable');","/*!\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","require('../../modules/es6.number.is-nan');\nmodule.exports = require('../../modules/_core').Number.isNaN;","require('../../modules/es6.object.get-prototype-of');\nmodule.exports = require('../../modules/_core').Object.getPrototypeOf;","require('../../modules/es7.object.entries');\nmodule.exports = require('../../modules/_core').Object.entries;","require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;","module.exports = function(){ /* empty */ };","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject')\n , defined = require('./_defined');\nmodule.exports = function(it){\n return IObject(defined(it));\n};","module.exports = function(done, value){\n return {value: value, done: !!done};\n};","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});","var anObject = require('./_an-object')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , toPrimitive = require('./_to-primitive')\n , dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if(IE8_DOM_DEFINE)try {\n return dP(O, P, Attributes);\n } catch(e){ /* empty */ }\n if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n if('value' in Attributes)O[P] = Attributes.value;\n return O;\n};","// 7.1.4 ToInteger\nvar ceil = Math.ceil\n , floor = Math.floor;\nmodule.exports = function(it){\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};","module.exports = require('./_hide');","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};","'use strict';\nvar create = require('./_object-create')\n , descriptor = require('./_property-desc')\n , setToStringTag = require('./_set-to-string-tag')\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});\n setToStringTag(Constructor, NAME + ' Iterator');\n};","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has')\n , toObject = require('./_to-object')\n , IE_PROTO = require('./_shared-key')('IE_PROTO')\n , ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function(O){\n O = toObject(O);\n if(has(O, IE_PROTO))return O[IE_PROTO];\n if(typeof O.constructor == 'function' && O instanceof O.constructor){\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};","var global = require('./_global')\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};","var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function(iterator, fn, value, entries){\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch(e){\n var ret = iterator['return'];\n if(ret !== undefined)anObject(ret.call(iterator));\n throw e;\n }\n};","// check on default Array iterator\nvar Iterators = require('./_iterators')\n , ITERATOR = require('./_wks')('iterator')\n , ArrayProto = Array.prototype;\n\nmodule.exports = function(it){\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer')\n , min = Math.min;\nmodule.exports = function(it){\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n var un = that === undefined;\n switch(args.length){\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};","module.exports = require('./_global').document && document.documentElement;","var isObject = require('./_is-object')\n , document = require('./_global').document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')});","require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D){\n return $Object.create(P, D);\n};","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/_core').Object.setPrototypeOf;","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');","var META = require('./_uid')('meta')\n , isObject = require('./_is-object')\n , has = require('./_has')\n , setDesc = require('./_object-dp').f\n , id = 0;\nvar isExtensible = Object.isExtensible || function(){\n return true;\n};\nvar FREEZE = !require('./_fails')(function(){\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function(it){\n setDesc(it, META, {value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n }});\n};\nvar fastKey = function(it, create){\n // return primitive with prefix\n if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return 'F';\n // not necessary to add metadata\n if(!create)return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function(it, create){\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return true;\n // not necessary to add metadata\n if(!create)return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function(it){\n if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};","exports.f = require('./_wks');","var global = require('./_global')\n , core = require('./_core')\n , LIBRARY = require('./_library')\n , wksExt = require('./_wks-ext')\n , defineProperty = require('./_object-dp').f;\nmodule.exports = function(name){\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});\n};","var getKeys = require('./_object-keys')\n , toIObject = require('./_to-iobject');\nmodule.exports = function(object, el){\n var O = toIObject(object)\n , keys = getKeys(O)\n , length = keys.length\n , index = 0\n , key;\n while(length > index)if(O[key = keys[index++]] === el)return key;\n};","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys')\n , gOPS = require('./_object-gops')\n , pIE = require('./_object-pie');\nmodule.exports = function(it){\n var result = getKeys(it)\n , getSymbols = gOPS.f;\n if(getSymbols){\n var symbols = getSymbols(it)\n , isEnum = pIE.f\n , i = 0\n , key;\n while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);\n } return result;\n};","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg){\n return cof(arg) == 'Array';\n};","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n if(!isObject(it))return it;\n var fn, val;\n if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object')\n , dPs = require('./_object-dps')\n , enumBugKeys = require('./_enum-bug-keys')\n , IE_PROTO = require('./_shared-key')('IE_PROTO')\n , Empty = function(){ /* empty */ }\n , PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function(){\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe')\n , i = enumBugKeys.length\n , lt = '<'\n , gt = '>'\n , iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties){\n var result;\n if(O !== null){\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty;\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject')\n , gOPN = require('./_object-gopn').f\n , toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return gOPN(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it){\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n","var pIE = require('./_object-pie')\n , createDesc = require('./_property-desc')\n , toIObject = require('./_to-iobject')\n , toPrimitive = require('./_to-primitive')\n , has = require('./_has')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){\n O = toIObject(O);\n P = toPrimitive(P, true);\n if(IE8_DOM_DEFINE)try {\n return gOPD(O, P);\n } catch(e){ /* empty */ }\n if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);\n};","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal')\n , enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O){\n return $keys(O, enumBugKeys);\n};","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal')\n , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){\n return $keys(O, hiddenKeys);\n};","exports.f = {}.propertyIsEnumerable;","exports.f = Object.getOwnPropertySymbols;","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f});","// 20.1.2.4 Number.isNaN(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', {\n isNaN: function isNaN(number){\n return number != number;\n }\n});","// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = require('./_to-object')\n , $getPrototypeOf = require('./_object-gpo');\n\nrequire('./_object-sap')('getPrototypeOf', function(){\n return function getPrototypeOf(it){\n return $getPrototypeOf(toObject(it));\n };\n});","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export')\n , $entries = require('./_object-to-array')(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it){\n return $entries(it);\n }\n});","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object')\n , $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function(){\n return function keys(it){\n return $keys(toObject(it));\n };\n});","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};","module.exports = !require('./_descriptors') && !require('./_fails')(function(){\n return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;\n});","var shared = require('./_shared')('keys')\n , uid = require('./_uid');\nmodule.exports = function(key){\n return shared[key] || (shared[key] = uid(key));\n};","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function(it){\n return Object(defined(it));\n};","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys')\n , gOPS = require('./_object-gops')\n , pIE = require('./_object-pie')\n , toObject = require('./_to-object')\n , IObject = require('./_iobject')\n , $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function(){\n var A = {}\n , B = {}\n , S = Symbol()\n , K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function(k){ B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source){ // eslint-disable-line no-unused-vars\n var T = toObject(target)\n , aLen = arguments.length\n , index = 1\n , getSymbols = gOPS.f\n , isEnum = pIE.f;\n while(aLen > index){\n var S = IObject(arguments[index++])\n , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)\n , length = keys.length\n , j = 0\n , key;\n while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];\n } return T;\n} : $assign;","var $export = require('./_export')\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', {create: require('./_object-create')});","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set});","var dP = require('./_object-dp')\n , anObject = require('./_an-object')\n , getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties){\n anObject(O);\n var keys = getKeys(Properties)\n , length = keys.length\n , i = 0\n , P;\n while(length > i)dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');","var has = require('./_has')\n , toIObject = require('./_to-iobject')\n , arrayIndexOf = require('./_array-includes')(false)\n , IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function(object, names){\n var O = toIObject(object)\n , i = 0\n , result = []\n , key;\n for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while(names.length > i)if(has(O, key = names[i++])){\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export')\n , core = require('./_core')\n , fails = require('./_fails');\nmodule.exports = function(KEY, exec){\n var fn = (core.Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\n};","var getKeys = require('./_object-keys')\n , toIObject = require('./_to-iobject')\n , isEnum = require('./_object-pie').f;\nmodule.exports = function(isEntries){\n return function(it){\n var O = toIObject(it)\n , keys = getKeys(O)\n , length = keys.length\n , i = 0\n , result = []\n , key;\n while(length > i)if(isEnum.call(O, key = keys[i++])){\n result.push(isEntries ? [key, O[key]] : O[key]);\n } return result;\n };\n};","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object')\n , anObject = require('./_an-object');\nvar check = function(O, proto){\n anObject(O);\n if(!isObject(proto) && proto !== null)throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function(test, buggy, set){\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch(e){ buggy = true; }\n return function setPrototypeOf(O, proto){\n check(O, proto);\n if(buggy)O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject')\n , toLength = require('./_to-length')\n , toIndex = require('./_to-index');\nmodule.exports = function(IS_INCLUDES){\n return function($this, el, fromIndex){\n var O = toIObject($this)\n , length = toLength(O.length)\n , index = toIndex(fromIndex, length)\n , value;\n // Array#includes uses SameValueZero equality algorithm\n if(IS_INCLUDES && el != el)while(length > index){\n value = O[index++];\n if(value != value)return true;\n // Array#toIndex ignores holes, Array#includes - not\n } else for(;length > index; index++)if(IS_INCLUDES || index in O){\n if(O[index] === el)return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};","var toInteger = require('./_to-integer')\n , max = Math.max\n , min = Math.min;\nmodule.exports = function(index, length){\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};"]}
\ No newline at end of file
+{"version":3,"sources":["node_modules/browser-pack/_prelude.js","lib/Particle.js","lib/superagent-binary-parser.js","lib/Defaults.js","lib/EventStream.js","lib/Agent.js","lib/Client.js","lib/Library.js","node_modules/superagent/lib/client.js","node_modules/buffer/index.js","node_modules/url/url.js","node_modules/events/events.js","node_modules/path-browserify/index.js","node_modules/babel-runtime/helpers/classCallCheck.js","node_modules/babel-runtime/helpers/createClass.js","node_modules/stream-http/index.js","node_modules/superagent-prefix/index.js","node_modules/url/util.js","node_modules/superagent/lib/request-base.js","node_modules/superagent/lib/is-object.js","node_modules/superagent/lib/request.js","node_modules/punycode/punycode.js","node_modules/querystring-es3/index.js","node_modules/process/browser.js","node_modules/babel-runtime/core-js/object/assign.js","node_modules/babel-runtime/helpers/typeof.js","node_modules/babel-runtime/core-js/promise.js","node_modules/babel-runtime/helpers/possibleConstructorReturn.js","node_modules/babel-runtime/helpers/inherits.js","node_modules/babel-runtime/helpers/slicedToArray.js","node_modules/babel-runtime/core-js/get-iterator.js","node_modules/babel-runtime/core-js/object/define-property.js","node_modules/stream-http/lib/request.js","node_modules/ieee754/index.js","node_modules/isarray/index.js","node_modules/base64-js/lib/b64.js","node_modules/querystring-es3/decode.js","node_modules/querystring-es3/encode.js","node_modules/babel-runtime/core-js/number/is-nan.js","node_modules/babel-runtime/core-js/object/get-prototype-of.js","node_modules/babel-runtime/core-js/object/keys.js","node_modules/babel-runtime/core-js/object/entries.js","node_modules/component-emitter/index.js","node_modules/babel-runtime/core-js/symbol.js","node_modules/babel-runtime/core-js/is-iterable.js","node_modules/babel-runtime/core-js/symbol/iterator.js","node_modules/babel-runtime/core-js/object/set-prototype-of.js","node_modules/babel-runtime/core-js/object/create.js","node_modules/builtin-status-codes/browser.js","node_modules/xtend/immutable.js","node_modules/stream-http/lib/capability.js","node_modules/stream-http/lib/response.js","node_modules/stream-browserify/index.js","node_modules/inherits/inherits_browser.js","node_modules/to-arraybuffer/index.js","node_modules/readable-stream/readable.js","node_modules/readable-stream/writable.js","node_modules/readable-stream/duplex.js","node_modules/readable-stream/transform.js","node_modules/readable-stream/passthrough.js","node_modules/readable-stream/lib/_stream_readable.js","node_modules/readable-stream/lib/_stream_writable.js","node_modules/readable-stream/lib/_stream_duplex.js","node_modules/readable-stream/lib/_stream_transform.js","node_modules/readable-stream/lib/_stream_passthrough.js","node_modules/core-js/library/fn/promise.js","node_modules/core-js/library/fn/get-iterator.js","node_modules/readable-stream/lib/internal/streams/BufferList.js","node_modules/core-js/library/fn/is-iterable.js","node_modules/core-js/library/modules/es6.string.iterator.js","node_modules/core-js/library/modules/web.dom.iterable.js","node_modules/core-js/library/modules/es6.promise.js","node_modules/core-js/library/modules/_core.js","node_modules/core-js/library/modules/core.get-iterator.js","node_modules/core-js/library/fn/symbol/index.js","node_modules/buffer-shims/index.js","node_modules/process-nextick-args/index.js","node_modules/util-deprecate/browser.js","node_modules/core-js/library/modules/core.is-iterable.js","node_modules/core-util-is/lib/util.js","node_modules/core-js/library/modules/_string-at.js","node_modules/core-js/library/modules/_iter-define.js","node_modules/core-js/library/modules/es6.array.iterator.js","node_modules/core-js/library/modules/_global.js","node_modules/core-js/library/modules/_hide.js","node_modules/core-js/library/modules/_iterators.js","node_modules/core-js/library/modules/_wks.js","node_modules/core-js/library/modules/_library.js","node_modules/core-js/library/modules/_ctx.js","node_modules/core-js/library/modules/_classof.js","node_modules/core-js/library/modules/_export.js","node_modules/core-js/library/modules/_is-object.js","node_modules/core-js/library/modules/_an-instance.js","node_modules/core-js/library/modules/_a-function.js","node_modules/core-js/library/modules/_for-of.js","node_modules/core-js/library/modules/_species-constructor.js","node_modules/core-js/library/modules/_microtask.js","node_modules/core-js/library/modules/_task.js","node_modules/core-js/library/modules/_redefine-all.js","node_modules/core-js/library/modules/_set-to-string-tag.js","node_modules/core-js/library/modules/_set-species.js","node_modules/core-js/library/modules/_iter-detect.js","node_modules/core-js/library/fn/object/assign.js","node_modules/core-js/library/modules/_an-object.js","node_modules/core-js/library/modules/core.get-iterator-method.js","node_modules/string_decoder/index.js","node_modules/core-js/library/fn/object/define-property.js","node_modules/core-js/library/modules/es6.symbol.js","node_modules/core-js/library/modules/es7.symbol.async-iterator.js","node_modules/core-js/library/modules/es7.symbol.observable.js","node_modules/is-buffer/index.js","node_modules/core-js/library/fn/number/is-nan.js","node_modules/core-js/library/fn/object/get-prototype-of.js","node_modules/core-js/library/fn/object/entries.js","node_modules/core-js/library/fn/object/keys.js","node_modules/core-js/library/modules/_to-integer.js","node_modules/core-js/library/modules/_defined.js","node_modules/core-js/library/modules/_redefine.js","node_modules/core-js/library/modules/_has.js","node_modules/core-js/library/modules/_iter-create.js","node_modules/core-js/library/modules/_object-gpo.js","node_modules/core-js/library/modules/_add-to-unscopables.js","node_modules/core-js/library/modules/_iter-step.js","node_modules/core-js/library/modules/_to-iobject.js","node_modules/core-js/library/modules/_object-dp.js","node_modules/core-js/library/modules/_property-desc.js","node_modules/core-js/library/modules/_descriptors.js","node_modules/core-js/library/modules/_shared.js","node_modules/core-js/library/modules/_uid.js","node_modules/core-js/library/modules/_cof.js","node_modules/core-js/library/modules/_iter-call.js","node_modules/core-js/library/modules/_is-array-iter.js","node_modules/core-js/library/modules/_to-length.js","node_modules/core-js/library/modules/_invoke.js","node_modules/core-js/library/modules/_dom-create.js","node_modules/core-js/library/modules/_html.js","node_modules/core-js/library/modules/es6.object.assign.js","node_modules/core-js/library/fn/symbol/iterator.js","node_modules/core-js/library/fn/object/set-prototype-of.js","node_modules/core-js/library/fn/object/create.js","node_modules/core-js/library/modules/_meta.js","node_modules/core-js/library/modules/_fails.js","node_modules/core-js/library/modules/_wks-ext.js","node_modules/core-js/library/modules/_wks-define.js","node_modules/core-js/library/modules/_keyof.js","node_modules/core-js/library/modules/_enum-keys.js","node_modules/core-js/library/modules/_is-array.js","node_modules/core-js/library/modules/_to-primitive.js","node_modules/core-js/library/modules/_object-create.js","node_modules/core-js/library/modules/_object-gopn-ext.js","node_modules/core-js/library/modules/_object-gopd.js","node_modules/core-js/library/modules/_object-keys.js","node_modules/core-js/library/modules/_object-gopn.js","node_modules/core-js/library/modules/_object-pie.js","node_modules/core-js/library/modules/_object-gops.js","node_modules/core-js/library/modules/es6.object.define-property.js","node_modules/core-js/library/modules/es6.number.is-nan.js","node_modules/core-js/library/modules/es6.object.get-prototype-of.js","node_modules/core-js/library/modules/es7.object.entries.js","node_modules/core-js/library/modules/es6.object.keys.js","node_modules/core-js/library/modules/_to-object.js","node_modules/core-js/library/modules/_shared-key.js","node_modules/core-js/library/modules/_iobject.js","node_modules/core-js/library/modules/_ie8-dom-define.js","node_modules/core-js/library/modules/_object-assign.js","node_modules/core-js/library/modules/es6.object.set-prototype-of.js","node_modules/core-js/library/modules/es6.object.create.js","node_modules/core-js/library/modules/_enum-bug-keys.js","node_modules/core-js/library/modules/_object-dps.js","node_modules/core-js/library/modules/_object-keys-internal.js","node_modules/core-js/library/modules/_object-sap.js","node_modules/core-js/library/modules/_object-to-array.js","node_modules/core-js/library/modules/_set-proto.js","node_modules/core-js/library/modules/_array-includes.js","node_modules/core-js/library/modules/_to-index.js"],"names":["_interopRequireDefault","obj","__esModule","default","Object","defineProperty","exports","value","_assign","require","_assign2","_classCallCheck2","_classCallCheck3","_createClass2","_createClass3","_superagent","_superagent2","_superagentBinaryParser","_superagentBinaryParser2","_Defaults","_Defaults2","_EventStream","_EventStream2","_Agent","_Agent2","_Client","_Client2","Particle","options","arguments","length","undefined","this","agent","baseUrl","key","_ref","username","password","_ref$tokenDuration","tokenDuration","request","uri","form","grant_type","client_id","clientId","client_secret","clientSecret","expires_in","method","_ref2","post","_ref3","_ref4","token","delete","access_token","_ref5","get","_ref6","auth","_ref7","deviceId","_ref8","requestTransfer","id","request_transfer","_ref9","_ref10","name","put","_ref11","_ref11$iccid","iccid","_ref12","promoCode","_ref13","productId","shouldUpdate","product_id","update_after_claim","_ref14","_ref15","signal","_ref16","files","targetVersion","build_target_version","latest","_ref17","app","_ref18","platformId","platform_id","_ref19","binaryId","req","use","prefix","headers","debug","_ref20","algorithm","deviceID","publicKey","toString","filename","order","Date","now","_ref21","argument","args","_ref22","org","product","toLowerCase","encodeURIComponent","connect","_ref23","data","isPrivate","private","_ref24","url","requestType","json","query","responseTemplate","responseTopic","rejectUnauthorized","webhookAuth","event","mydevices","deviceid","_ref25","hookId","_ref26","_ref27","_ref28","stripeToken","stripe_token","_ref29","head","_ref30","countryCode","country","promo_code","action","_ref31","_ref31$onlyFeatured","onlyFeatured","featured","_ref32","page","limit","filter","sort","architectures","category","Array","isArray","join","_ref33","version","_ref34","_ref35","archive","archive.tar.gz","_ref36","force","_ref37","buffer","parse","responseType","then","res","body","xhr","response","api","module","binaryParser","fn","on","chunk","push","Buffer","concat","_isNan","_isNan2","_typeof2","_typeof3","_promise","_promise2","_getPrototypeOf","_getPrototypeOf2","_possibleConstructorReturn2","_possibleConstructorReturn3","_inherits2","_inherits3","_http","_http2","_https","_https2","_url","_url2","_events","EventStream","_EventEmitter","_this","__proto__","call","reconnectInterval","_this2","resolve","reject","_url$parse","hostname","protocol","port","path","origin","isSecure","requestor","avoidFetch","mode","e","error","errorDescription","statusCode","_ret","JSON","emit","error_description","v","buf","eventName","lastEventId","bind","once","end","abort","removeAllListeners","_this3","setTimeout","catch","err","pos","discardTrailingNewline","lineLength","fieldLength","i","c","parseEventStreamLine","slice","field","step","valueLength","retry","parseInt","EventEmitter","_keys","_keys2","_slicedToArray2","_slicedToArray3","_entries","_entries2","_getIterator2","_getIterator3","_superagentPrefix","_superagentPrefix2","_path","_path2","Agent","_ref$data","_ref$query","_ref$form","_ref$files","requestFiles","_sanitizeFiles","_request","_buildRequest","_promiseResponse","fulfill","_sendRequest","status","reason","Error","_ref3$makerequest","makerequest","_authorizationHeader","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","next","done","_step$value","file","_getFormData","append","relativePath","dirname","return","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","_iterator2","_step2$value","type","send","set","Authorization","forEach","k","_Particle","_Particle2","_Library","_Library2","Client","_ref$api","listLibraries","payload","libraries","map","l","getLibrary","library","publishLibrary","_throwError","_this4","deleteLibrary","errors","errorMessages","message","downloadFile","compileCode","Library","client","_assignAttributes","downloadUrl","links","download","attributes","noop","serialize","isObject","pairs","pushEncodedKeyValuePair","val","subkey","parseString","str","pair","split","len","indexOf","decodeURIComponent","parseHeader","index","line","lines","fields","pop","trim","isJSON","mime","test","shift","params","reduce","parts","Response","text","responseText","statusText","_setStatusProperties","header","getAllResponseHeaders","getResponseHeader","_setHeaderProperties","_parseBody","Request","self","_query","_header","original","rawResponse","callback","new_err","del","root","window","console","warn","Emitter","requestBase","getXHR","XMLHttpRequest","location","ActiveXObject","s","replace","serializeObject","types","html","xml","urlencoded","form-data","application/x-www-form-urlencoded","application/json","stringify","prototype","ct","statusType","info","ok","clientError","serverError","toError","accepted","noContent","badRequest","unauthorized","notAcceptable","notFound","forbidden","msg","_responseType","accept","user","pass","btoa","attach","_formData","FormData","_callback","clearTimeout","crossDomainError","crossDomain","_timeoutError","timeout","_timeout","_appendQueryString","_data","onreadystatechange","readyState","timedout","_aborted","handleProgress","total","percent","loaded","direction","hasListeners","onprogress","upload","_timer","open","_withCredentials","withCredentials","_isHost","contentType","_serializer","setRequestHeader","patch","typedArraySupport","arr","Uint8Array","foo","subarray","byteLength","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","arg","encodingOrOffset","allocUnsafe","from","TypeError","ArrayBuffer","fromArrayBuffer","fromString","fromObject","assertSize","size","alloc","fill","encoding","checked","string","isEncoding","actual","write","fromArrayLike","array","byteOffset","isBuffer","copy","isnan","SlowBuffer","isView","loweredCase","utf8ToBytes","base64ToBytes","slowToString","start","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","b","n","m","bidirectionalIndexOf","dir","isNaN","arrayIndexOf","lastIndexOf","read","indexSize","readUInt16BE","arrLength","valLength","String","foundIndex","found","j","hexWrite","offset","Number","remaining","strLen","parsed","substr","utf8Write","blitBuffer","asciiWrite","asciiToBytes","latin1Write","base64Write","ucs2Write","utf16leToBytes","base64","fromByteArray","Math","min","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","apply","ret","out","toHex","bytes","checkOffset","ext","checkInt","max","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754","writeDouble","base64clean","stringtrim","INVALID_BASE64_RE","units","Infinity","leadSurrogate","charCodeAt","byteArray","hi","lo","toByteArray","src","dst","INSPECT_MAX_BYTES","global","poolSize","_augment","Symbol","species","configurable","allocUnsafeSlow","_isBuffer","compare","a","x","y","list","swap16","swap32","swap64","equals","inspect","match","target","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","_arr","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","maxBytes","writeUIntBE","writeUInt8","floor","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","code","Url","slashes","host","hash","search","pathname","href","urlParse","parseQueryString","slashesDenoteHost","util","u","urlFormat","isString","format","urlResolve","source","relative","urlResolveObject","resolveObject","punycode","protocolPattern","portPattern","simplePathPattern","delims","unwise","autoEscape","nonHostChars","hostEndingChars","hostnameMaxLen","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","http","https","ftp","gopher","http:","https:","ftp:","gopher:","file:","querystring","queryIndex","splitter","uSplit","slashRegex","rest","simplePath","exec","proto","lowerProto","hostEnd","hec","atSign","parseHost","ipv6Hostname","hostparts","part","newpart","validParts","notHost","bit","unshift","toASCII","p","h","ae","esc","escape","qm","keys","charAt","rel","result","tkeys","tk","tkey","rkeys","rk","rkey","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","isNullOrUndefined","authInHost","isNull","last","hasTrailingSlash","up","splice","isAbsolute","_maxListeners","isFunction","isNumber","isUndefined","defaultMaxListeners","setMaxListeners","er","handler","listeners","context","addListener","listener","newListener","warned","trace","g","removeListener","fired","position","listenerCount","evlistener","emitter","normalizeArray","allowAboveRoot","xs","f","splitPathRe","splitPath","resolvedPath","resolvedAbsolute","process","cwd","normalize","trailingSlash","paths","to","fromParts","toParts","samePartsLength","outputParts","sep","delimiter","basename","extname","instance","Constructor","_defineProperty","_defineProperty2","defineProperties","props","descriptor","enumerable","writable","protoProps","staticProps","ClientRequest","extend","statusCodes","opts","cb","defaultProtocol","toUpperCase","defaultMaxSockets","STATUS_CODES","METHODS","_parser","ms","_fullfilledPromise","Promise","innerResolve","innerReject","getHeader","unset","redirects","_maxRedirects","RequestConstructor","mapDomain","regexSeparators","labels","encoded","ucs2decode","extra","output","counter","ucs2encode","stringFromCharCode","basicToDigit","base","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","damp","baseMinusTMin","tMax","skew","decode","input","basic","oldi","w","t","baseMinusT","inputLength","initialN","bias","initialBias","maxInt","tMin","encode","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","toUnicode","regexPunycode","regexNonASCII","freeExports","nodeType","freeModule","freeGlobal","overflow","not-basic","invalid-input","ucs2","define","amd","hasOwnProperty","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queue","queueIndex","drainQueue","run","Item","nextTick","title","browser","env","argv","versions","off","binding","chdir","umask","_symbol","_symbol2","_typeof","constructor","ReferenceError","_setPrototypeOf","_setPrototypeOf2","_create","_create2","subClass","superClass","_isIterable2","_isIterable3","sliceIterator","_n","_d","_e","_s","_i","decideMode","preferBinary","capability","fetch","mozchunkedarraybuffer","msstream","arraybuffer","vbArray","statusValid","inherits","stream","toArrayBuffer","IncomingMessage","rStates","readyStates","Writable","_opts","_body","_headers","setHeader","overrideMimeType","_mode","_onFinish","lowerName","unsafeHeaders","removeHeader","_destroyed","headersObj","blobConstructor","Blob","credentials","_fetchResponse","_connect","_xhr","_response","LOADING","DONE","_onXHRProgress","onerror","_write","destroy","flushHeaders","setNoDelay","setSocketKeepAlive","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","NaN","rt","abs","log","LN2","init","lookup","revLookup","b64","tmp","placeHolders","Arr","L","tripletToBase64","num","encodeChunk","uint8","extraBytes","maxChunkLength","len2","prop","qs","eq","regexp","maxKeys","kstr","vstr","idx","stringifyPrimitive","objectKeys","ks","mixin","addEventListener","_callbacks","removeEventListener","callbacks","100","101","102","200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","307","308","400","401","402","403","404","405","406","407","408","409","410","411","412","413","414","415","416","417","418","421","422","423","424","425","426","428","429","431","500","501","502","503","504","505","506","507","508","509","510","511","checkTypeSupport","ReadableByteStream","haveArrayBuffer","haveSlice","VBArray","UNSENT","OPENED","HEADERS_RECEIVED","reader","Readable","rawHeaders","trailers","rawTrailers","statusMessage","_it","iterator","getReader","_pos","matches","_charset","mimeType","charsetMatch","_read","responseBody","toArray","newData","MSStreamReader","onload","readAsArrayBuffer","Stream","EE","Duplex","Transform","PassThrough","pipe","dest","ondata","pause","ondrain","readable","resume","onend","didOnEnd","onclose","cleanup","_isStdio","create","ctor","superCtor","super_","TempCtor","arrayCopy","_","READABLE_STREAM","prependListener","ReadableState","objectMode","readableObjectMode","hwm","highWaterMark","defaultHwm","BufferList","pipes","pipesCount","flowing","ended","endEmitted","reading","sync","needReadable","emittedReadable","readableListening","resumeScheduled","defaultEncoding","ranOut","awaitDrain","readingMore","decoder","StringDecoder","_readableState","readableAddChunk","state","addToFront","chunkInvalid","onEofChunk","skipAdd","emitReadable","maybeReadMore","needMoreData","computeNewHighWaterMark","MAX_HWM","howMuchToRead","processNextTick","emitReadable_","flow","maybeReadMore_","pipeOnDrain","EElistenerCount","nReadingNextTick","resume_","fromList","clear","fromListPartial","hasStrings","copyFromBufferString","copyFromBuffer","nb","tail","bufferShim","endReadable","endReadableNT","debugUtil","debuglog","isPaused","setEncoding","enc","nOrig","doRead","pipeOpts","onunpipe","onfinish","cleanedUp","_writableState","needDrain","increasedAwaitDrain","unpipe","doEnd","stdout","stderr","endFn","dests","ev","wrap","paused","events","_fromList","nop","WriteReq","WritableState","writableObjectMode","ending","finished","noDecode","decodeStrings","writing","corked","bufferProcessing","onwrite","writecb","writelen","bufferedRequest","lastBufferedRequest","pendingcb","prefinished","errorEmitted","bufferedRequestCount","corkedRequestsFree","CorkedRequest","writev","_writev","writeAfterEnd","validChunk","valid","decodeChunk","writeOrBuffer","doWrite","onwriteError","onwriteStateUpdate","needFinish","clearBuffer","asyncWrite","afterWrite","onwriteDrain","finishMaybe","entry","holder","count","finish","prefinish","need","endWritable","setImmediate","internalUtil","deprecate","getBuffer","current","cork","uncork","setDefaultEncoding","allowHalfOpen","onEndNT","TransformState","afterTransform","needTransform","transforming","writechunk","writeencoding","ts","_transformState","rs","transform","_transform","flush","_flush","ws","$at","iterated","_t","point","O","hide","Iterators","TO_STRING_TAG","collections","NAME","Collection","LIBRARY","ctx","classof","$export","aFunction","anInstance","forOf","speciesConstructor","task","microtask","PROMISE","$Promise","isNode","empty","Internal","GenericPromiseCapability","Wrapper","USE_NATIVE","promise","FakePromise","PromiseRejectionEvent","sameConstructor","isThenable","it","newPromiseCapability","C","PromiseCapability","$$resolve","$$reject","perform","notify","isReject","chain","_c","_v","reaction","fail","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","abrupt","isUnhandled","onunhandledrejection","_a","onrejectionhandled","$reject","_w","$resolve","wrapper","executor","onFulfilled","onRejected","G","W","F","S","r","iter","all","iterable","values","$index","alreadyCalled","race","core","__e","anObject","getIterator","iterFn","MAX_LEN","_fill","fillBuf","flen","arg1","arg2","arg3","deprecated","config","localStorage","ITERATOR","isIterable","objectToString","isBoolean","isSymbol","isRegExp","re","isDate","isError","isPrimitive","o","toInteger","defined","TO_STRING","redefine","has","$iterCreate","setToStringTag","getPrototypeOf","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Base","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","TAG","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","entries","P","addToUnscopables","toIObject","_k","Arguments","Function","__g","dP","createDesc","object","store","uid","USE_SYMBOL","$exports","cof","ARG","tryGet","T","B","callee","PROTOTYPE","own","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","IS_WRAP","expProto","virtual","R","U","forbiddenField","isArrayIter","toLength","getIterFn","BREAK","RETURN","SPECIES","D","macrotask","Observer","MutationObserver","WebKitMutationObserver","parent","toggle","node","document","createTextNode","observe","characterData","invoke","cel","setTask","clearTask","clearImmediate","MessageChannel","ONREADYSTATECHANGE","defer","channel","port2","port1","onmessage","postMessage","importScripts","appendChild","removeChild","safe","def","tag","stat","DESCRIPTORS","KEY","SAFE_CLOSING","riter","skipClosing","assign","getIteratorMethod","assertEncoding","isBufferEncoding","passThroughWrite","utf16DetectIncompleteChar","charReceived","charLength","base64DetectIncompleteChar","surrogateSize","detectIncompleteChar","charBuffer","charStr","available","charCode","substring","cr","$Object","desc","META","$fails","shared","wks","wksExt","wksDefine","keyOf","enumKeys","toPrimitive","gOPNExt","$GOPD","$DP","$keys","gOPD","gOPN","$Symbol","$JSON","_stringify","HIDDEN","TO_PRIMITIVE","isEnum","propertyIsEnumerable","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","QObject","setter","findChild","setSymbolDesc","protoDesc","sym","$defineProperty","$defineProperties","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","names","$getOwnPropertySymbols","IS_OP","$set","symbols","for","keyFor","useSetter","useSimple","getOwnPropertyDescriptor","getOwnPropertyNames","getOwnPropertySymbols","replacer","$replacer","valueOf","isSlowBuffer","ceil","toObject","IE_PROTO","IObject","IE8_DOM_DEFINE","Attributes","bitmap","SHARED","px","random","ArrayProto","un","is","createElement","documentElement","setPrototypeOf","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","fastKey","getWeak","onFreeze","meta","NEED","getKeys","el","gOPS","pIE","getSymbols","dPs","enumBugKeys","Empty","createDict","iframeDocument","iframe","lt","gt","style","display","contentWindow","close","Properties","windowNames","getWindowNames","hiddenKeys","number","$getPrototypeOf","$assign","A","K","aLen","fails","exp","isEntries","check","buggy","toIndex","IS_INCLUDES","$this","fromIndex"],"mappings":"AAAA;AKAA,YAkDA,SAASA,wBAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,GAhDvFG,OAAOC,eAAeC,QAAS,cAC9BC,OAAO,GAGR,IAAIgQ,OAAQ9P,QAAQ,qCAEhB+P,OAASxQ,uBAAuBuQ,OAEhCE,gBAAkBhQ,QAAQ,uCAE1BiQ,gBAAkB1Q,uBAAuByQ,iBAEzCE,SAAWlQ,QAAQ,wCAEnBmQ,UAAY5Q,uBAAuB2Q,UAEnCE,cAAgBpQ,QAAQ,sCAExBqQ,cAAgB9Q,uBAAuB6Q,eAEvCrQ,QAAUC,QAAQ,uCAElBC,SAAWV,uBAAuBQ,SAElC0L,SAAWzL,QAAQ,iCAEnB0L,UAAYnM,uBAAuBkM,UAEnCvL,iBAAmBF,QAAQ,wCAE3BG,iBAAmBZ,uBAAuBW,kBAE1CE,cAAgBJ,QAAQ,qCAExBK,cAAgBd,uBAAuBa,eAEvCE,YAAcN,QAAQ,cAEtBO,aAAehB,uBAAuBe,aAEtCgQ,kBAAoBtQ,QAAQ,qBAE5BuQ,mBAAqBhR,uBAAuB+Q,mBAE5CE,MAAQ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AM,IAAI9kC,OAAM8I,EACPg8B,QAAO,oBAChBl+B,QAAQmY,MAAMjW,GAEdlC,QAAQC,KAAKiC,GAEfgW,GAAS,EAEX,MAAOvlB,GAAG+X,MAAMvhB,KAAMH,WAhBxB,GAAIk1C,OAAO,iBACT,MAAOvrC,EAGT,IAAIulB,IAAS,CAeb,OAAO+lB,GAWT,QAASC,QAAQzyC,GAEf,IACE,IAAKghB,OAAO0xB,aAAc,OAAO,EACjC,MAAOrP,GACP,OAAO,EAET,GAAI1xB,GAAMqP,OAAO0xB,aAAa1yC,EAC9B,OAAI,OAAQ2R,GACyB,SAA9BoL,OAAOpL,GAAK5O,cA5DrBiE,OAAOhL,QAAUwvC;;;;A5BDjB,QAASpc,UAGL,IAAK,GAFDjN,MAEK5W,EAAI,EAAGA,EAAIhO,UAAUC,OAAQ+N,IAAK,CACvC,GAAIib,GAASjpB,UAAUgO,EAEvB,KAAK,GAAI1N,KAAO2oB,GACRwN,eAAejrB,KAAKyd,EAAQ3oB,KAC5BskB,EAAOtkB,GAAO2oB,EAAO3oB,IAKjC,MAAOskB,GAjBXnb,OAAOhL,QAAUozB,MAEjB,IAAI4E,gBAAiBl4B,OAAO4Z,UAAUse","file":"bundle.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o for examples\n * of using the `Particle` class.\n *\n * Most Particle methods take a single unnamed argument object documented as\n * `$0` with key/value pairs for each option.\n */\nvar Particle = function () {\n\t/**\n * Contructor for the Cloud API wrapper.\n *\n * Create a new Particle object and call methods below on it.\n *\n * @param {Object} options Options to be used for all requests (see [Defaults](../src/Defaults.js))\n */\n\tfunction Particle() {\n\t\tvar options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\t(0, _classCallCheck3.default)(this, Particle);\n\n\t\t(0, _assign2.default)(this, _Defaults2.default, options);\n\t\tthis.agent = new _Agent2.default(this.baseUrl);\n\t}\n\n\t/**\n * Login to Particle Cloud using an existing Particle acccount.\n * @param {String} $0.username Username for the Particle account\n * @param {String} $0.password Password for the Particle account\n * @param {Number} $0.tokenDuration How long the access token should last in seconds\n * @return {Promise}\n */\n\n\n\t(0, _createClass3.default)(Particle, [{\n\t\tkey: 'login',\n\t\tvalue: function login(_ref) {\n\t\t\tvar username = _ref.username;\n\t\t\tvar password = _ref.password;\n\t\t\tvar _ref$tokenDuration = _ref.tokenDuration;\n\t\t\tvar tokenDuration = _ref$tokenDuration === undefined ? this.tokenDuration : _ref$tokenDuration;\n\n\t\t\treturn this.request({ uri: '/oauth/token', form: {\n\t\t\t\t\tusername: username,\n\t\t\t\t\tpassword: password,\n\t\t\t\t\tgrant_type: 'password',\n\t\t\t\t\tclient_id: this.clientId,\n\t\t\t\t\tclient_secret: this.clientSecret,\n\t\t\t\t\texpires_in: tokenDuration\n\t\t\t\t}, method: 'post' });\n\t\t}\n\n\t\t/**\n * Create a user account for the Particle Cloud\n * @param {String} $0.username Email of the new user\n * @param {String} $0.password Password\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'createUser',\n\t\tvalue: function createUser(_ref2) {\n\t\t\tvar username = _ref2.username;\n\t\t\tvar password = _ref2.password;\n\n\t\t\treturn this.post('/v1/users', {\n\t\t\t\tusername: username, password: password\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Send reset password email for a Particle Cloud user account\n * @param {String} $0.username Email of the user\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'resetPassword',\n\t\tvalue: function resetPassword(_ref3) {\n\t\t\tvar username = _ref3.username;\n\n\t\t\treturn this.post('/v1/user/password-reset', { username: username });\n\t\t}\n\n\t\t/**\n * Revoke an access token\n * @param {String} $0.username Username of the Particle cloud account that the token belongs to.\n * @param {String} $0.password Password for the account\n * @param {String} $0.token Access token you wish to revoke\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'removeAccessToken',\n\t\tvalue: function removeAccessToken(_ref4) {\n\t\t\tvar username = _ref4.username;\n\t\t\tvar password = _ref4.password;\n\t\t\tvar token = _ref4.token;\n\n\t\t\treturn this.delete('/v1/access_tokens/' + token, {\n\t\t\t\taccess_token: token\n\t\t\t}, { username: username, password: password });\n\t\t}\n\n\t\t/**\n * List all valid access tokens for a Particle Cloud account\n * @param {String} $0.username Username\n * @param {String} $0.password Password\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'listAccessTokens',\n\t\tvalue: function listAccessTokens(_ref5) {\n\t\t\tvar username = _ref5.username;\n\t\t\tvar password = _ref5.password;\n\n\t\t\treturn this.get('/v1/access_tokens', { username: username, password: password });\n\t\t}\n\n\t\t/**\n * List devices claimed to the account\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'listDevices',\n\t\tvalue: function listDevices(_ref6) {\n\t\t\tvar auth = _ref6.auth;\n\n\t\t\treturn this.get('/v1/devices', auth);\n\t\t}\n\n\t\t/**\n * Get detailed informationa about a device\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.auth Access token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getDevice',\n\t\tvalue: function getDevice(_ref7) {\n\t\t\tvar deviceId = _ref7.deviceId;\n\t\t\tvar auth = _ref7.auth;\n\n\t\t\treturn this.get('/v1/devices/' + deviceId, auth);\n\t\t}\n\n\t\t/**\n * Claim a device to the account. The device must be online and unclaimed.\n * @param {String} $0.deviceId Device ID\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'claimDevice',\n\t\tvalue: function claimDevice(_ref8) {\n\t\t\tvar deviceId = _ref8.deviceId;\n\t\t\tvar requestTransfer = _ref8.requestTransfer;\n\t\t\tvar auth = _ref8.auth;\n\n\t\t\treturn this.post('/v1/devices', {\n\t\t\t\tid: deviceId,\n\t\t\t\trequest_transfer: !!requestTransfer\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Unclaim / Remove a device from your account\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'removeDevice',\n\t\tvalue: function removeDevice(_ref9) {\n\t\t\tvar deviceId = _ref9.deviceId;\n\t\t\tvar auth = _ref9.auth;\n\n\t\t\treturn this.delete('/v1/devices/' + deviceId, null, auth);\n\t\t}\n\n\t\t/**\n * Rename a device\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.name Desired Name\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'renameDevice',\n\t\tvalue: function renameDevice(_ref10) {\n\t\t\tvar deviceId = _ref10.deviceId;\n\t\t\tvar name = _ref10.name;\n\t\t\tvar auth = _ref10.auth;\n\n\t\t\treturn this.put('/v1/devices/' + deviceId, { name: name }, auth);\n\t\t}\n\n\t\t/**\n * Generate a claim code to use in the device claiming process.\n * @param {String} $0.auth Access Token\n * @param {String} [$0.iccid] ICCID of the SIM card used in the Electron\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getClaimCode',\n\t\tvalue: function getClaimCode(_ref11) {\n\t\t\tvar auth = _ref11.auth;\n\t\t\tvar _ref11$iccid = _ref11.iccid;\n\t\t\tvar iccid = _ref11$iccid === undefined ? undefined : _ref11$iccid;\n\n\t\t\treturn this.post('/v1/device_claims', { iccid: iccid }, auth);\n\t\t}\n\t}, {\n\t\tkey: 'validatePromoCode',\n\t\tvalue: function validatePromoCode(_ref12) {\n\t\t\tvar auth = _ref12.auth;\n\t\t\tvar promoCode = _ref12.promoCode;\n\n\t\t\treturn this.get('/v1/promo_code/' + promoCode, auth);\n\t\t}\n\t}, {\n\t\tkey: 'changeProduct',\n\t\tvalue: function changeProduct(_ref13) {\n\t\t\tvar deviceId = _ref13.deviceId;\n\t\t\tvar productId = _ref13.productId;\n\t\t\tvar shouldUpdate = _ref13.shouldUpdate;\n\t\t\tvar auth = _ref13.auth;\n\n\t\t\treturn this.put('/v1/devices/' + deviceId, {\n\t\t\t\tproduct_id: productId,\n\t\t\t\tupdate_after_claim: shouldUpdate || false\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Get the value of a device variable\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.name Variable name\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getVariable',\n\t\tvalue: function getVariable(_ref14) {\n\t\t\tvar deviceId = _ref14.deviceId;\n\t\t\tvar name = _ref14.name;\n\t\t\tvar auth = _ref14.auth;\n\n\t\t\treturn this.get('/v1/devices/' + deviceId + '/' + name, auth);\n\t\t}\n\n\t\t/**\n * Instruct the device to turn on/off the LED in a rainbow pattern\n * @param {String} $0.deviceId Device ID or Name\n * @param {Boolean} $0.signal Signal on or off\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'signalDevice',\n\t\tvalue: function signalDevice(_ref15) {\n\t\t\tvar deviceId = _ref15.deviceId;\n\t\t\tvar signal = _ref15.signal;\n\t\t\tvar auth = _ref15.auth;\n\n\t\t\treturn this.put('/v1/devices/' + deviceId, {\n\t\t\t\tsignal: !!signal ? '1' : '0'\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Compile and flash application firmware to a device\n * @param {String} $0.deviceId Device ID or Name\n * @param {Object} $0.files Object containing files to be compiled. Keys should be the filenames, and the values should be a path or Buffer of the file contents.\n * @param {String} [$0.targetVersion=latest] System firmware version to compile against\n * @param {String} $0.auth String\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'flashDevice',\n\t\tvalue: function flashDevice(_ref16) {\n\t\t\tvar deviceId = _ref16.deviceId;\n\t\t\tvar files = _ref16.files;\n\t\t\tvar targetVersion = _ref16.targetVersion;\n\t\t\tvar auth = _ref16.auth;\n\n\t\t\tvar form = {};\n\t\t\tif (targetVersion) {\n\t\t\t\tform.build_target_version = targetVersion;\n\t\t\t} else {\n\t\t\t\tform.latest = 'true';\n\t\t\t}\n\t\t\treturn this.request({ uri: '/v1/devices/' + deviceId,\n\t\t\t\tfiles: files, auth: auth, form: form, method: 'put' });\n\t\t}\n\n\t\t/**\n * Flash the Tinker application to a device\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'flashTinker',\n\t\tvalue: function flashTinker(_ref17) {\n\t\t\tvar deviceId = _ref17.deviceId;\n\t\t\tvar auth = _ref17.auth;\n\n\t\t\treturn this.put('/v1/devices/' + deviceId, {\n\t\t\t\tapp: 'tinker'\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Compile firmware using the Particle Cloud\n * @param {Object} $0.files Object containing files to be compiled. Keys should be the filenames, and the values should be a path or Buffer of the file contents.\n * @param {Number} [$0.platformId] Platform id number of the device you are compiling for. Common values are 0=Core, 6=Photon, 10=Electron.\n * @param {String} [$0.targetVersion=latest] System firmware version to compile against\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'compileCode',\n\t\tvalue: function compileCode(_ref18) {\n\t\t\tvar files = _ref18.files;\n\t\t\tvar platformId = _ref18.platformId;\n\t\t\tvar targetVersion = _ref18.targetVersion;\n\t\t\tvar auth = _ref18.auth;\n\n\t\t\tvar form = { platform_id: platformId };\n\t\t\tif (targetVersion) {\n\t\t\t\tform.build_target_version = targetVersion;\n\t\t\t} else {\n\t\t\t\tform.latest = 'true';\n\t\t\t}\n\t\t\treturn this.request({ uri: '/v1/binaries',\n\t\t\t\tfiles: files, auth: auth, form: form, method: 'post' });\n\t\t}\n\n\t\t/**\n * Download a firmware binary\n * @param {String} $0.binaryId Binary ID received from a successful compile call\n * @param {String} $0.auth Access Token\n * @return {Request}\n */\n\n\t}, {\n\t\tkey: 'downloadFirmwareBinary',\n\t\tvalue: function downloadFirmwareBinary(_ref19) {\n\t\t\tvar binaryId = _ref19.binaryId;\n\t\t\tvar auth = _ref19.auth;\n\n\t\t\tvar uri = '/v1/binaries/' + binaryId;\n\t\t\tvar req = (0, _superagent2.default)('get', uri);\n\t\t\treq.use(this.prefix);\n\t\t\tthis.headers(req, auth);\n\t\t\tif (this.debug) {\n\t\t\t\tthis.debug(req);\n\t\t\t}\n\t\t\treturn req;\n\t\t}\n\n\t\t/**\n * Send a new device public key to the Particle Cloud\n * @param {String} $0.deviceId Device ID or Name\n * @param {(String|Buffer)} $0.key Public key contents\n * @param {String} [$0.algorithm=rsa] Algorithm used to generate the public key. Valid values are `rsa` or `ecc`.\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'sendPublicKey',\n\t\tvalue: function sendPublicKey(_ref20) {\n\t\t\tvar deviceId = _ref20.deviceId;\n\t\t\tvar key = _ref20.key;\n\t\t\tvar algorithm = _ref20.algorithm;\n\t\t\tvar auth = _ref20.auth;\n\n\t\t\treturn this.post('/v1/provisioning/' + deviceId, {\n\t\t\t\tdeviceID: deviceId,\n\t\t\t\tpublicKey: typeof key === 'string' ? key : key.toString(),\n\t\t\t\tfilename: 'particle-api',\n\t\t\t\torder: 'manual_' + Date.now(),\n\t\t\t\talgorithm: algorithm || 'rsa'\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Call a device function\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.name Function name\n * @param {String} $0.argument Function argument\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'callFunction',\n\t\tvalue: function callFunction(_ref21) {\n\t\t\tvar deviceId = _ref21.deviceId;\n\t\t\tvar name = _ref21.name;\n\t\t\tvar argument = _ref21.argument;\n\t\t\tvar auth = _ref21.auth;\n\n\t\t\treturn this.post('/v1/devices/' + deviceId + '/' + name, {\n\t\t\t\targs: argument\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Get a stream of events\n * @param {String} [$0.deviceId] Device ID or Name, or `mine` to indicate only your devices.\n * @param {String} [$0.name] Event Name\n * @param {String} [$0.org] Organization Slug\n * @param {String} [$0.product] Product Slug or Product ID\n * @param {String} $0.auth Access Token\n * @return {Promise} If the promise resolves, the resolution value will be an EventStream object that will\n * emit 'event' events, as well as the specific named event.\n */\n\n\t}, {\n\t\tkey: 'getEventStream',\n\t\tvalue: function getEventStream(_ref22) {\n\t\t\tvar deviceId = _ref22.deviceId;\n\t\t\tvar name = _ref22.name;\n\t\t\tvar org = _ref22.org;\n\t\t\tvar product = _ref22.product;\n\t\t\tvar auth = _ref22.auth;\n\n\t\t\tvar uri = '/v1/';\n\t\t\tif (org) {\n\t\t\t\turi += 'orgs/' + org + '/';\n\t\t\t}\n\n\t\t\tif (product) {\n\t\t\t\turi += 'products/' + product + '/';\n\t\t\t}\n\n\t\t\tif (deviceId) {\n\t\t\t\turi += 'devices/';\n\t\t\t\tif (!(deviceId.toLowerCase() === 'mine')) {\n\t\t\t\t\turi += deviceId + '/';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\turi += 'events';\n\n\t\t\tif (name) {\n\t\t\t\turi += '/' + encodeURIComponent(name);\n\t\t\t}\n\n\t\t\treturn new _EventStream2.default('' + this.baseUrl + uri, auth, { debug: this.debug }).connect();\n\t\t}\n\n\t\t/**\n * Publish a event to the Particle Cloud\n * @param {String} $0.name Event name\n * @param {String} $0.data Event data\n * @param {Boolean} $0.isPrivate Should the event be publicly available?\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'publishEvent',\n\t\tvalue: function publishEvent(_ref23) {\n\t\t\tvar name = _ref23.name;\n\t\t\tvar data = _ref23.data;\n\t\t\tvar isPrivate = _ref23.isPrivate;\n\t\t\tvar auth = _ref23.auth;\n\n\t\t\treturn this.post('/v1/devices/events', {\n\t\t\t\tname: name,\n\t\t\t\tdata: data,\n\t\t\t\t'private': isPrivate\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * Create a webhook\n * @param {String} $0.deviceId Device ID or Name\n * @param {String} $0.name Webhook name\n * @param {String} $0.url URL the webhook should hit\n * @param {String} [$0.requestType=POST] HTTP method to use\n * @param {Object} [$0.headers] Additional headers to add to the webhook\n * @param {Object} [$0.json] JSON data\n * @param {Object} [$0.query] Query string data\n * @param {Object} [$0.responseTemplate] Webhook response template\n * @param {Object} [$0.responseTopic] Webhook response topic\n * @param {Boolean} [$0.rejectUnauthorized] Reject invalid HTTPS certificates\n * @param {Object} [$0.webhookAuth] HTTP Basic Auth information\n * @param {Object} [$0.form] Form data\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'createWebhook',\n\t\tvalue: function createWebhook(_ref24) {\n\t\t\tvar deviceId = _ref24.deviceId;\n\t\t\tvar name = _ref24.name;\n\t\t\tvar url = _ref24.url;\n\t\t\tvar requestType = _ref24.requestType;\n\t\t\tvar headers = _ref24.headers;\n\t\t\tvar json = _ref24.json;\n\t\t\tvar query = _ref24.query;\n\t\t\tvar responseTemplate = _ref24.responseTemplate;\n\t\t\tvar responseTopic = _ref24.responseTopic;\n\t\t\tvar rejectUnauthorized = _ref24.rejectUnauthorized;\n\t\t\tvar webhookAuth = _ref24.webhookAuth;\n\t\t\tvar form = _ref24.form;\n\t\t\tvar auth = _ref24.auth;\n\n\t\t\tvar data = { event: name, url: url, requestType: requestType, headers: headers, json: json, query: query, responseTemplate: responseTemplate, responseTopic: responseTopic, rejectUnauthorized: rejectUnauthorized, auth: webhookAuth, form: form };\n\t\t\tif (deviceId === 'mine') {\n\t\t\t\tdata.mydevices = true;\n\t\t\t} else {\n\t\t\t\tdata.deviceid = deviceId;\n\t\t\t}\n\t\t\treturn this.post('/v1/webhooks', data, auth);\n\t\t}\n\n\t\t/**\n * Delete a webhook\n * @param {String} $0.hookId Webhook ID\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'deleteWebhook',\n\t\tvalue: function deleteWebhook(_ref25) {\n\t\t\tvar hookId = _ref25.hookId;\n\t\t\tvar auth = _ref25.auth;\n\n\t\t\treturn this.delete('/v1/webhooks/' + hookId, null, auth);\n\t\t}\n\n\t\t/**\n * List all webhooks owned by the account\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'listWebhooks',\n\t\tvalue: function listWebhooks(_ref26) {\n\t\t\tvar auth = _ref26.auth;\n\n\t\t\treturn this.get('/v1/webhooks', auth);\n\t\t}\n\n\t\t/**\n * Get details about the current user\n * @param {String} $0.auth Access Token\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getUserInfo',\n\t\tvalue: function getUserInfo(_ref27) {\n\t\t\tvar auth = _ref27.auth;\n\n\t\t\treturn this.get('/v1/user', auth);\n\t\t}\n\t}, {\n\t\tkey: 'setUserInfo',\n\t\tvalue: function setUserInfo(_ref28) {\n\t\t\tvar stripeToken = _ref28.stripeToken;\n\t\t\tvar auth = _ref28.auth;\n\n\t\t\treturn this.put('/v1/user', {\n\t\t\t\tstripe_token: stripeToken\n\t\t\t}, auth);\n\t\t}\n\t}, {\n\t\tkey: 'checkSIM',\n\t\tvalue: function checkSIM(_ref29) {\n\t\t\tvar iccid = _ref29.iccid;\n\t\t\tvar auth = _ref29.auth;\n\n\t\t\treturn this.head('/v1/sims/' + iccid, auth);\n\t\t}\n\t}, {\n\t\tkey: 'activateSIM',\n\t\tvalue: function activateSIM(_ref30) {\n\t\t\tvar iccid = _ref30.iccid;\n\t\t\tvar countryCode = _ref30.countryCode;\n\t\t\tvar promoCode = _ref30.promoCode;\n\t\t\tvar auth = _ref30.auth;\n\n\t\t\treturn this.put('/v1/sims/' + iccid, {\n\t\t\t\tcountry: countryCode,\n\t\t\t\tpromo_code: promoCode,\n\t\t\t\taction: 'activate'\n\t\t\t}, auth);\n\t\t}\n\n\t\t/**\n * List valid build targets to be used for compiling\n * @param {String} $0.auth Access Token\n * @param {Boolean} [$0.onlyFeatured=false] Only list featured build targets\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'listBuildTargets',\n\t\tvalue: function listBuildTargets(_ref31) {\n\t\t\tvar auth = _ref31.auth;\n\t\t\tvar _ref31$onlyFeatured = _ref31.onlyFeatured;\n\t\t\tvar onlyFeatured = _ref31$onlyFeatured === undefined ? undefined : _ref31$onlyFeatured;\n\n\t\t\tvar query = void 0;\n\t\t\tif (onlyFeatured !== undefined) {\n\t\t\t\tquery = { featured: !!onlyFeatured };\n\t\t\t}\n\t\t\treturn this.get('/v1/build_targets', auth, query);\n\t\t}\n\n\t\t/**\n * List firmware libraries\n * @param {String} $0.auth Access Token\n * @param {Number} $0.page Page index (default, first page)\n * @param {Number} $0.limit Number of items per page\n * @param {String} $0.filter Search term for the libraries\n * @param {String} $0.sort Ordering key for the library list\n * @param {Array} $0.architectures List of architectures to filter\n * @param {String} $0.category Category to filter\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'listLibraries',\n\t\tvalue: function listLibraries(_ref32) {\n\t\t\tvar auth = _ref32.auth;\n\t\t\tvar page = _ref32.page;\n\t\t\tvar limit = _ref32.limit;\n\t\t\tvar filter = _ref32.filter;\n\t\t\tvar sort = _ref32.sort;\n\t\t\tvar architectures = _ref32.architectures;\n\t\t\tvar category = _ref32.category;\n\n\t\t\treturn this.get('/v1/libraries', auth, {\n\t\t\t\tpage: page,\n\t\t\t\tfilter: filter,\n\t\t\t\tlimit: limit,\n\t\t\t\tsort: sort,\n\t\t\t\tarchitectures: Array.isArray(architectures) ? architectures.join(',') : architectures,\n\t\t\t\tcategory: category\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get firmware library details\n * @param {String} $0.auth Access Token\n * @param {String} $0.name Name of the library to fetch\n * @param {String} $0.version Version of the library to fetch (default: latest)\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getLibrary',\n\t\tvalue: function getLibrary(_ref33) {\n\t\t\tvar auth = _ref33.auth;\n\t\t\tvar name = _ref33.name;\n\t\t\tvar version = _ref33.version;\n\n\t\t\treturn this.get('/v1/libraries/' + name, auth, { version: version });\n\t\t}\n\n\t\t/**\n * Firmware library details for each version\n * @param {String} $0.auth Access Token\n * @param {String} $0.name Name of the library to fetch\n * @param {Number} $0.page Page index (default, first page)\n * @param {Number} $0.limit Number of items per page\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'getLibraryVersions',\n\t\tvalue: function getLibraryVersions(_ref34) {\n\t\t\tvar auth = _ref34.auth;\n\t\t\tvar name = _ref34.name;\n\t\t\tvar page = _ref34.page;\n\t\t\tvar limit = _ref34.limit;\n\n\t\t\treturn this.get('/v1/libraries/' + name + '/versions', auth, {\n\t\t\t\tpage: page,\n\t\t\t\tlimit: limit\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Publish a new library version int the compressed archive\n * @param {String} $0.auth Access Token\n * @param {String} $0.archive Compressed archive file containing the library sources\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'publishLibrary',\n\t\tvalue: function publishLibrary(_ref35) {\n\t\t\tvar auth = _ref35.auth;\n\t\t\tvar archive = _ref35.archive;\n\n\t\t\tvar files = {\n\t\t\t\t'archive.tar.gz': archive\n\t\t\t};\n\n\t\t\treturn this.request({ uri: '/v1/libraries',\n\t\t\t\tfiles: files, auth: auth, method: 'post' });\n\t\t}\n\n\t\t/**\n * Delete one version of a library or an entire published library\n * @param {String} $0.auth Access Token\n * @param {String} $0.name Name of the library to delete\n * @param {String} $0.force Key to force deleting a public library\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'deleteLibrary',\n\t\tvalue: function deleteLibrary(_ref36) {\n\t\t\tvar auth = _ref36.auth;\n\t\t\tvar name = _ref36.name;\n\t\t\tvar force = _ref36.force;\n\n\t\t\treturn this.delete('/v1/libraries/' + name, { force: force }, auth);\n\t\t}\n\n\t\t/**\n * Download an external file that may not be on the API\n * @param {String} $0.url URL of the file.\n * @return {Promise} Resolves to a buffer with the file data\n */\n\n\t}, {\n\t\tkey: 'downloadFile',\n\t\tvalue: function downloadFile(_ref37) {\n\t\t\tvar url = _ref37.url;\n\n\t\t\tvar req = _superagent2.default.get(url);\n\t\t\tif (req.buffer) {\n\t\t\t\treq = req.buffer(true).parse(_superagentBinaryParser2.default);\n\t\t\t} else if (req.responseType) {\n\t\t\t\treq = req.responseType('arraybuffer').then(function (res) {\n\t\t\t\t\tres.body = res.xhr.response;\n\t\t\t\t\treturn res;\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn req.then(function (res) {\n\t\t\t\treturn res.body;\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'get',\n\t\tvalue: function get(uri, auth) {\n\t\t\tvar query = arguments.length <= 2 || arguments[2] === undefined ? undefined : arguments[2];\n\n\t\t\treturn this.agent.get(uri, auth, query);\n\t\t}\n\t}, {\n\t\tkey: 'head',\n\t\tvalue: function head(uri, auth) {\n\t\t\treturn this.agent.head(uri, auth);\n\t\t}\n\t}, {\n\t\tkey: 'post',\n\t\tvalue: function post(uri, data, auth) {\n\t\t\treturn this.agent.post(uri, data, auth);\n\t\t}\n\t}, {\n\t\tkey: 'put',\n\t\tvalue: function put(uri, data, auth) {\n\t\t\treturn this.agent.put(uri, data, auth);\n\t\t}\n\t}, {\n\t\tkey: 'delete',\n\t\tvalue: function _delete(uri, data, auth) {\n\t\t\treturn this.agent.delete(uri, data, auth);\n\t\t}\n\t}, {\n\t\tkey: 'request',\n\t\tvalue: function request(args) {\n\t\t\treturn this.agent.request(args);\n\t\t}\n\t}, {\n\t\tkey: 'client',\n\t\tvalue: function client() {\n\t\t\tvar options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t\t\treturn new _Client2.default((0, _assign2.default)({ api: this }, options));\n\t\t}\n\t}]);\n\treturn Particle;\n}();\n\nexports.default = Particle;\nmodule.exports = exports['default'];\n//# sourceMappingURL=Particle.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = binaryParser;\n// Binary parser for superagent\n\nfunction binaryParser(res, fn) {\n\t/* global Buffer */\n\tvar data = [];\n\tres.on('data', function (chunk) {\n\t\treturn data.push(chunk);\n\t});\n\tres.on('end', function () {\n\t\treturn fn(null, Buffer.concat(data));\n\t});\n};\nmodule.exports = exports['default'];\n//# sourceMappingURL=superagent-binary-parser.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.default = {\n\tbaseUrl: 'https://api.particle.io',\n\tclientSecret: 'particle-api',\n\tclientId: 'particle-api',\n\ttokenDuration: 7776000 };\nmodule.exports = exports['default'];\n//# sourceMappingURL=Defaults.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _isNan = require('babel-runtime/core-js/number/is-nan');\n\nvar _isNan2 = _interopRequireDefault(_isNan);\n\nvar _typeof2 = require('babel-runtime/helpers/typeof');\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nvar _promise = require('babel-runtime/core-js/promise');\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _assign = require('babel-runtime/core-js/object/assign');\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require('babel-runtime/helpers/inherits');\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _http = require('http');\n\nvar _http2 = _interopRequireDefault(_http);\n\nvar _https = require('https');\n\nvar _https2 = _interopRequireDefault(_https);\n\nvar _url = require('url');\n\nvar _url2 = _interopRequireDefault(_url);\n\nvar _events = require('events');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint max-depth: 0 */\nvar EventStream = function (_EventEmitter) {\n\t(0, _inherits3.default)(EventStream, _EventEmitter);\n\n\tfunction EventStream(uri, token, options) {\n\t\t(0, _classCallCheck3.default)(this, EventStream);\n\n\t\tvar _this = (0, _possibleConstructorReturn3.default)(this, (EventStream.__proto__ || (0, _getPrototypeOf2.default)(EventStream)).call(this));\n\n\t\t_this.uri = uri;\n\t\t_this.token = token;\n\t\t_this.reconnectInterval = 2000;\n\t\t(0, _assign2.default)(_this, options);\n\t\treturn _this;\n\t}\n\n\t(0, _createClass3.default)(EventStream, [{\n\t\tkey: 'connect',\n\t\tvalue: function connect() {\n\t\t\tvar _this2 = this;\n\n\t\t\treturn new _promise2.default(function (resolve, reject) {\n\t\t\t\tvar _url$parse = _url2.default.parse(_this2.uri);\n\n\t\t\t\tvar hostname = _url$parse.hostname;\n\t\t\t\tvar protocol = _url$parse.protocol;\n\t\t\t\tvar port = _url$parse.port;\n\t\t\t\tvar path = _url$parse.path;\n\n\t\t\t\t_this2.origin = protocol + '//' + hostname + (port ? ':' + port : '');\n\n\t\t\t\tvar isSecure = protocol === 'https:';\n\t\t\t\tvar requestor = isSecure ? _https2.default : _http2.default;\n\t\t\t\tvar req = requestor.request({\n\t\t\t\t\thostname: hostname,\n\t\t\t\t\tprotocol: protocol,\n\t\t\t\t\tpath: path + '?history_limit=30&access_token=' + _this2.token,\n\t\t\t\t\tmethod: 'get',\n\t\t\t\t\tport: port || (isSecure ? 443 : 80),\n\t\t\t\t\tavoidFetch: true,\n\t\t\t\t\tmode: 'prefer-streaming'\n\t\t\t\t});\n\n\t\t\t\t_this2.req = req;\n\t\t\t\tif (_this2.debug) {\n\t\t\t\t\t_this2.debug(_this2);\n\t\t\t\t}\n\n\t\t\t\treq.on('error', function (e) {\n\t\t\t\t\treject({ error: e, errorDescription: 'Network error from ' + _this2.uri });\n\t\t\t\t});\n\n\t\t\t\treq.on('response', function (res) {\n\t\t\t\t\tvar statusCode = res.statusCode;\n\t\t\t\t\tif (statusCode !== 200) {\n\t\t\t\t\t\tvar _ret = function () {\n\t\t\t\t\t\t\tvar body = '';\n\t\t\t\t\t\t\tres.on('data', function (chunk) {\n\t\t\t\t\t\t\t\treturn body += chunk;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tres.on('end', function () {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tbody = JSON.parse(body);\n\t\t\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t\t\t\t_this2.emit('response', {\n\t\t\t\t\t\t\t\t\tstatusCode: statusCode,\n\t\t\t\t\t\t\t\t\tbody: body\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tvar errorDescription = 'HTTP error ' + statusCode + ' from ' + _this2.uri;\n\t\t\t\t\t\t\t\tif (body && body.error_description) {\n\t\t\t\t\t\t\t\t\terrorDescription += ' - ' + body.error_description;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treject({ statusCode: statusCode, errorDescription: errorDescription, body: body });\n\t\t\t\t\t\t\t\t_this2.req = undefined;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tv: void 0\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}();\n\n\t\t\t\t\t\tif ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === \"object\") return _ret.v;\n\t\t\t\t\t}\n\n\t\t\t\t\t_this2.data = '';\n\t\t\t\t\t_this2.buf = '';\n\t\t\t\t\t_this2.eventName;\n\t\t\t\t\t_this2.lastEventId;\n\n\t\t\t\t\tres.on('data', _this2.parse.bind(_this2));\n\t\t\t\t\tres.once('end', _this2.end.bind(_this2));\n\t\t\t\t\tresolve(_this2);\n\t\t\t\t});\n\t\t\t\treq.end();\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'abort',\n\t\tvalue: function abort() {\n\t\t\tif (this.req) {\n\t\t\t\tthis.req.abort();\n\t\t\t\tthis.req = undefined;\n\t\t\t}\n\t\t\tthis.removeAllListeners();\n\t\t}\n\t}, {\n\t\tkey: 'end',\n\t\tvalue: function end() {\n\t\t\tvar _this3 = this;\n\n\t\t\tthis.req = undefined;\n\t\t\tsetTimeout(function () {\n\t\t\t\t_this3.connect().catch(function (err) {\n\t\t\t\t\t_this3.emit('error', err);\n\t\t\t\t\t_this3.removeAllListeners();\n\t\t\t\t});\n\t\t\t}, this.reconnectInterval);\n\t\t}\n\t}, {\n\t\tkey: 'parse',\n\t\tvalue: function parse(chunk) {\n\t\t\tthis.buf += chunk;\n\t\t\tvar pos = 0;\n\t\t\tvar length = this.buf.length;\n\t\t\tvar discardTrailingNewline = false;\n\n\t\t\twhile (pos < length) {\n\t\t\t\tif (discardTrailingNewline) {\n\t\t\t\t\tif (this.buf[pos] === '\\n') {\n\t\t\t\t\t\t++pos;\n\t\t\t\t\t}\n\t\t\t\t\tdiscardTrailingNewline = false;\n\t\t\t\t}\n\n\t\t\t\tvar lineLength = -1;\n\t\t\t\tvar fieldLength = -1;\n\n\t\t\t\tfor (var i = pos; lineLength < 0 && i < length; ++i) {\n\t\t\t\t\tvar c = this.buf[i];\n\t\t\t\t\tif (c === ':') {\n\t\t\t\t\t\tif (fieldLength < 0) {\n\t\t\t\t\t\t\tfieldLength = i - pos;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (c === '\\r') {\n\t\t\t\t\t\tdiscardTrailingNewline = true;\n\t\t\t\t\t\tlineLength = i - pos;\n\t\t\t\t\t} else if (c === '\\n') {\n\t\t\t\t\t\tlineLength = i - pos;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (lineLength < 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.parseEventStreamLine(pos, fieldLength, lineLength);\n\n\t\t\t\tpos += lineLength + 1;\n\t\t\t}\n\n\t\t\tif (pos === length) {\n\t\t\t\tthis.buf = '';\n\t\t\t} else if (pos > 0) {\n\t\t\t\tthis.buf = this.buf.slice(pos);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'parseEventStreamLine',\n\t\tvalue: function parseEventStreamLine(pos, fieldLength, lineLength) {\n\t\t\tif (lineLength === 0) {\n\t\t\t\ttry {\n\t\t\t\t\tif (this.data.length > 0 && this.event) {\n\t\t\t\t\t\tvar event = JSON.parse(this.data);\n\t\t\t\t\t\tevent.name = this.eventName || '';\n\t\t\t\t\t\tif (this.eventName !== 'event') {\n\t\t\t\t\t\t\tthis.emit(this.eventName, event);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.emit('event', event);\n\t\t\t\t\t\tthis.data = '';\n\t\t\t\t\t}\n\t\t\t\t\tthis.eventName = undefined;\n\t\t\t\t\tthis.event = false;\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// do nothing if JSON.parse fails\n\t\t\t\t}\n\t\t\t} else if (fieldLength > 0) {\n\t\t\t\tvar field = this.buf.slice(pos, pos + fieldLength);\n\t\t\t\tvar step = 0;\n\n\t\t\t\tif (this.buf[pos + fieldLength + 1] !== ' ') {\n\t\t\t\t\tstep = fieldLength + 1;\n\t\t\t\t} else {\n\t\t\t\t\tstep = fieldLength + 2;\n\t\t\t\t}\n\t\t\t\tpos += step;\n\t\t\t\tvar valueLength = lineLength - step;\n\t\t\t\tvar value = this.buf.slice(pos, pos + valueLength);\n\n\t\t\t\tif (field === 'data') {\n\t\t\t\t\tthis.data += value + '\\n';\n\t\t\t\t} else if (field === 'event') {\n\t\t\t\t\tthis.eventName = value;\n\t\t\t\t\tthis.event = true;\n\t\t\t\t} else if (field === 'id') {\n\t\t\t\t\tthis.lastEventId = value;\n\t\t\t\t} else if (field === 'retry') {\n\t\t\t\t\tvar retry = parseInt(value, 10);\n\t\t\t\t\tif (!(0, _isNan2.default)(retry)) {\n\t\t\t\t\t\tthis.reconnectInterval = retry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}]);\n\treturn EventStream;\n}(_events.EventEmitter);\n\nexports.default = EventStream;\nmodule.exports = exports['default'];\n//# sourceMappingURL=EventStream.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _keys = require('babel-runtime/core-js/object/keys');\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _slicedToArray2 = require('babel-runtime/helpers/slicedToArray');\n\nvar _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\nvar _entries = require('babel-runtime/core-js/object/entries');\n\nvar _entries2 = _interopRequireDefault(_entries);\n\nvar _getIterator2 = require('babel-runtime/core-js/get-iterator');\n\nvar _getIterator3 = _interopRequireDefault(_getIterator2);\n\nvar _assign = require('babel-runtime/core-js/object/assign');\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _promise = require('babel-runtime/core-js/promise');\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _superagent = require('superagent');\n\nvar _superagent2 = _interopRequireDefault(_superagent);\n\nvar _superagentPrefix = require('superagent-prefix');\n\nvar _superagentPrefix2 = _interopRequireDefault(_superagentPrefix);\n\nvar _path = require('path');\n\nvar _path2 = _interopRequireDefault(_path);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Agent = function () {\n\tfunction Agent(baseUrl) {\n\t\t(0, _classCallCheck3.default)(this, Agent);\n\n\t\tthis.prefix = (0, _superagentPrefix2.default)(baseUrl);\n\t}\n\n\t(0, _createClass3.default)(Agent, [{\n\t\tkey: 'get',\n\t\tvalue: function get(uri, auth, query) {\n\t\t\treturn this.request({ uri: uri, auth: auth, method: 'get', query: query });\n\t\t}\n\t}, {\n\t\tkey: 'head',\n\t\tvalue: function head(uri, auth) {\n\t\t\treturn this.request({ uri: uri, auth: auth, method: 'head' });\n\t\t}\n\t}, {\n\t\tkey: 'post',\n\t\tvalue: function post(uri, data, auth) {\n\t\t\treturn this.request({ uri: uri, data: data, auth: auth, method: 'post' });\n\t\t}\n\t}, {\n\t\tkey: 'put',\n\t\tvalue: function put(uri, data, auth) {\n\t\t\treturn this.request({ uri: uri, data: data, auth: auth, method: 'put' });\n\t\t}\n\t}, {\n\t\tkey: 'delete',\n\t\tvalue: function _delete(uri, data, auth) {\n\t\t\treturn this.request({ uri: uri, data: data, auth: auth, method: 'delete' });\n\t\t}\n\n\t\t/**\n *\n * @param {String} uri The URI to request\n * @param {String} method The method used to request the URI, should be in uppercase.\n * @param {String} data Arbitrary data to send as the body.\n * @param {Object} auth Authorization\n * @param {String} query Query parameters\n * @param {Object} form Form fields\n * @param {Object} files array of file names and file content\n * @return {Promise} A promise. fulfilled with {body, statusCode}, rejected with { statusCode, errorDescription, error, body }\n */\n\n\t}, {\n\t\tkey: 'request',\n\t\tvalue: function request(_ref) {\n\t\t\tvar uri = _ref.uri;\n\t\t\tvar method = _ref.method;\n\t\t\tvar _ref$data = _ref.data;\n\t\t\tvar data = _ref$data === undefined ? undefined : _ref$data;\n\t\t\tvar auth = _ref.auth;\n\t\t\tvar _ref$query = _ref.query;\n\t\t\tvar query = _ref$query === undefined ? undefined : _ref$query;\n\t\t\tvar _ref$form = _ref.form;\n\t\t\tvar form = _ref$form === undefined ? undefined : _ref$form;\n\t\t\tvar _ref$files = _ref.files;\n\t\t\tvar files = _ref$files === undefined ? undefined : _ref$files;\n\n\t\t\tvar requestFiles = this._sanitizeFiles(files);\n\t\t\treturn this._request({ uri: uri, method: method, data: data, auth: auth, query: query, form: form, files: requestFiles });\n\t\t}\n\n\t\t/**\n *\n * @param {String} uri The URI to request\n * @param {String} method The method used to request the URI, should be in uppercase.\n * @param {String} data Arbitrary data to send as the body.\n * @param {Object} auth Authorization\n * @param {String} query Query parameters\n * @param {Object} form Form fields\n * @param {Object} files array of file names and file content\n * @return {Promise} A promise. fulfilled with {body, statusCode}, rejected with { statusCode, errorDescription, error, body }\n */\n\n\t}, {\n\t\tkey: '_request',\n\t\tvalue: function _request(_ref2) {\n\t\t\tvar uri = _ref2.uri;\n\t\t\tvar method = _ref2.method;\n\t\t\tvar data = _ref2.data;\n\t\t\tvar auth = _ref2.auth;\n\t\t\tvar query = _ref2.query;\n\t\t\tvar form = _ref2.form;\n\t\t\tvar files = _ref2.files;\n\n\t\t\tvar req = this._buildRequest({ uri: uri, method: method, data: data, auth: auth, query: query, form: form, files: files });\n\t\t\treturn this._promiseResponse(req);\n\t\t}\n\n\t\t/**\n * Promises to send the request and retreive the response.\n * @param {Request} req The request to send\n * @returns {Promise} The promise to send the request and retrieve the response.\n * @private\n */\n\n\t}, {\n\t\tkey: '_promiseResponse',\n\t\tvalue: function _promiseResponse(req) {\n\t\t\tvar _this = this;\n\n\t\t\treturn new _promise2.default(function (fulfill, reject) {\n\t\t\t\treturn _this._sendRequest(req, fulfill, reject);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Sends the given request, calling the fulfill or reject methods for success/failure.\n * @param {object} request The request to send\n * @param {function} fulfill Called on success with the response\n * @param {function} reject Called on failure with the failure reason.\n * @private\n * @returns {undefined} Nothing\n */\n\n\t}, {\n\t\tkey: '_sendRequest',\n\t\tvalue: function _sendRequest(request, fulfill, reject) {\n\t\t\trequest.end(function (error, res) {\n\t\t\t\tvar body = res && res.body;\n\t\t\t\tif (error) {\n\t\t\t\t\tvar uri = request.url;\n\t\t\t\t\tvar statusCode = error.status;\n\t\t\t\t\tvar errorDescription = (statusCode ? 'HTTP error ' + statusCode : 'Network error') + ' from ' + uri;\n\t\t\t\t\tif (body && body.error_description) {\n\t\t\t\t\t\terrorDescription += ' - ' + body.error_description;\n\t\t\t\t\t}\n\t\t\t\t\tvar reason = new Error(errorDescription);\n\t\t\t\t\t(0, _assign2.default)(reason, { statusCode: statusCode, errorDescription: errorDescription, error: error, body: body });\n\t\t\t\t\treject(reason);\n\t\t\t\t} else {\n\t\t\t\t\tfulfill({\n\t\t\t\t\t\tbody: body,\n\t\t\t\t\t\tstatusCode: res.statusCode\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: '_buildRequest',\n\t\tvalue: function _buildRequest(_ref3) {\n\t\t\tvar uri = _ref3.uri;\n\t\t\tvar method = _ref3.method;\n\t\t\tvar data = _ref3.data;\n\t\t\tvar auth = _ref3.auth;\n\t\t\tvar query = _ref3.query;\n\t\t\tvar form = _ref3.form;\n\t\t\tvar files = _ref3.files;\n\t\t\tvar _ref3$makerequest = _ref3.makerequest;\n\t\t\tvar makerequest = _ref3$makerequest === undefined ? _superagent2.default : _ref3$makerequest;\n\n\t\t\tvar req = makerequest(method, uri);\n\t\t\tif (this.prefix) {\n\t\t\t\treq.use(this.prefix);\n\t\t\t}\n\t\t\tthis._authorizationHeader(req, auth);\n\t\t\tif (query) {\n\t\t\t\treq.query(query);\n\t\t\t}\n\t\t\tif (files) {\n\t\t\t\tvar _iteratorNormalCompletion = true;\n\t\t\t\tvar _didIteratorError = false;\n\t\t\t\tvar _iteratorError = undefined;\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator = (0, _getIterator3.default)((0, _entries2.default)(files)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\tvar _step$value = (0, _slicedToArray3.default)(_step.value, 2);\n\n\t\t\t\t\t\tvar name = _step$value[0];\n\t\t\t\t\t\tvar file = _step$value[1];\n\n\t\t\t\t\t\treq._getFormData().append(name, file.data, {\n\t\t\t\t\t\t\tfilename: file.path,\n\t\t\t\t\t\t\trelativePath: _path2.default.dirname(file.path)\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t_iteratorError = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (form) {\n\t\t\t\t\tvar _iteratorNormalCompletion2 = true;\n\t\t\t\t\tvar _didIteratorError2 = false;\n\t\t\t\t\tvar _iteratorError2 = undefined;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator2 = (0, _getIterator3.default)((0, _entries2.default)(form)), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\t\t\t\tvar _step2$value = (0, _slicedToArray3.default)(_step2.value, 2);\n\n\t\t\t\t\t\t\tvar name = _step2$value[0];\n\t\t\t\t\t\t\tvar value = _step2$value[1];\n\n\t\t\t\t\t\t\treq.field(name, value);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t\t\t_iteratorError2 = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tif (_didIteratorError2) {\n\t\t\t\t\t\t\t\tthrow _iteratorError2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (form) {\n\t\t\t\treq.type('form');\n\t\t\t\treq.send(form);\n\t\t\t} else if (data) {\n\t\t\t\treq.send(data);\n\t\t\t}\n\t\t\treturn req;\n\t\t}\n\n\t\t/**\n * Adds an authorization header.\n * @param {Request} req The request to add the authorization header to.\n * @param {object|string} auth The authorization. Either a string authorization bearer token,\n * or a username/password object.\n * @returns {Request} req The original request.\n */\n\n\t}, {\n\t\tkey: '_authorizationHeader',\n\t\tvalue: function _authorizationHeader(req, auth) {\n\t\t\tif (auth) {\n\t\t\t\tif (auth.username !== undefined) {\n\t\t\t\t\treq.auth(auth.username, auth.password);\n\t\t\t\t} else {\n\t\t\t\t\treq.set({ Authorization: 'Bearer ' + auth });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn req;\n\t\t}\n\n\t\t/**\n *\n * @param {Array} files converts the file names to file, file1, file2.\n * @returns {object} the renamed files.\n */\n\n\t}, {\n\t\tkey: '_sanitizeFiles',\n\t\tvalue: function _sanitizeFiles(files) {\n\t\t\tvar requestFiles = void 0;\n\t\t\tif (files) {\n\t\t\t\trequestFiles = {};\n\t\t\t\t(0, _keys2.default)(files).forEach(function (k, i) {\n\t\t\t\t\tvar name = i ? 'file' + (i + 1) : 'file';\n\t\t\t\t\trequestFiles[name] = {\n\t\t\t\t\t\tdata: files[k],\n\t\t\t\t\t\tpath: k\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn requestFiles;\n\t\t}\n\t}]);\n\treturn Agent;\n}(); /*\n ******************************************************************************\n Copyright (c) 2016 Particle Industries, Inc. All rights reserved.\n \n This program is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation, either\n version 3 of the License, or (at your option) any later version.\n \n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n \n You should have received a copy of the GNU Lesser General Public\n License along with this program; if not, see .\n ******************************************************************************\n */\n\nexports.default = Agent;\nmodule.exports = exports['default'];\n//# sourceMappingURL=Agent.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _assign = require('babel-runtime/core-js/object/assign');\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _Particle = require('./Particle');\n\nvar _Particle2 = _interopRequireDefault(_Particle);\n\nvar _Library = require('./Library');\n\nvar _Library2 = _interopRequireDefault(_Library);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Client = function () {\n\tfunction Client(_ref) {\n\t\tvar auth = _ref.auth;\n\t\tvar _ref$api = _ref.api;\n\t\tvar api = _ref$api === undefined ? new _Particle2.default() : _ref$api;\n\t\t(0, _classCallCheck3.default)(this, Client);\n\n\t\t(0, _assign2.default)(this, { auth: auth, api: api });\n\t}\n\n\t/**\n * Get firmware library objects\n * @param {Object} query The query parameters for libraries. See Particle.listLibraries\n * @return {Promise}\n */\n\n\n\t(0, _createClass3.default)(Client, [{\n\t\tkey: 'libraries',\n\t\tvalue: function libraries() {\n\t\t\tvar _this = this;\n\n\t\t\tvar query = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t\t\treturn this.api.listLibraries((0, _assign2.default)({}, query, { auth: this.auth })).then(function (payload) {\n\t\t\t\tvar libraries = payload.body.data || [];\n\t\t\t\treturn libraries.map(function (l) {\n\t\t\t\t\treturn new _Library2.default(_this, l);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get one firmware library object\n * @param {String} name Name of the library to fetch\n * @param {Object} query The query parameters for libraries. See Particle.getLibrary\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'library',\n\t\tvalue: function library(name) {\n\t\t\tvar _this2 = this;\n\n\t\t\tvar query = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n\t\t\treturn this.api.getLibrary((0, _assign2.default)({}, query, { name: name, auth: this.auth })).then(function (payload) {\n\t\t\t\tvar library = payload.body.data || {};\n\t\t\t\treturn new _Library2.default(_this2, library);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Publish a new library version\n * @param {Buffer} archive The compressed archive with the library source\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'publishLibrary',\n\t\tvalue: function publishLibrary(archive) {\n\t\t\tvar _this3 = this;\n\n\t\t\treturn this.api.publishLibrary({ archive: archive, auth: this.auth }).then(function (payload) {\n\t\t\t\tvar library = payload.body.data || {};\n\t\t\t\treturn new _Library2.default(_this3, library);\n\t\t\t}, function (error) {\n\t\t\t\t_this3._throwError(error);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Delete an entire published library\n * @param {String} $0.name Name of the library to delete\n * @param {String} $0.force Key to force deleting a public library\n * @return {Promise}\n */\n\n\t}, {\n\t\tkey: 'deleteLibrary',\n\t\tvalue: function deleteLibrary(_ref2) {\n\t\t\tvar _this4 = this;\n\n\t\t\tvar name = _ref2.name;\n\t\t\tvar version = _ref2.version;\n\t\t\tvar force = _ref2.force;\n\n\t\t\treturn this.api.deleteLibrary({ name: name, force: force, auth: this.auth }).then(function (payload) {\n\t\t\t\treturn true;\n\t\t\t}, function (error) {\n\t\t\t\t_this4._throwError(error);\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: '_throwError',\n\t\tvalue: function _throwError(error) {\n\t\t\tif (error.body && error.body.errors) {\n\t\t\t\tvar errorMessages = error.body.errors.map(function (e) {\n\t\t\t\t\treturn e.message;\n\t\t\t\t}).join('\\n');\n\t\t\t\tthrow new Error(errorMessages);\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t}, {\n\t\tkey: 'downloadFile',\n\t\tvalue: function downloadFile(url) {\n\t\t\treturn this.api.downloadFile({ url: url });\n\t\t}\n\t}, {\n\t\tkey: 'compileCode',\n\t\tvalue: function compileCode(files, platformId, targetVersion) {\n\t\t\treturn this.api.compileCode({ files: files, platformId: platformId, targetVersion: targetVersion, auth: this.auth });\n\t\t}\n\t}]);\n\treturn Client;\n}();\n\nexports.default = Client;\nmodule.exports = exports['default'];\n//# sourceMappingURL=Client.js.map","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _promise = require('babel-runtime/core-js/promise');\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _assign = require('babel-runtime/core-js/object/assign');\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nvar _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require('babel-runtime/helpers/createClass');\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* Library\n * Represents a version of a library published in the cloud.\n */\n\nvar Library = function () {\n\tfunction Library(client, data) {\n\t\t(0, _classCallCheck3.default)(this, Library);\n\n\t\t// Make client non-enumerable so it doesn't show up in Object.keys, JSON.stringify, etc\n\t\tObject.defineProperty(this, 'client', { value: client });\n\t\tthis._assignAttributes(data);\n\t\tthis.downloadUrl = data.links && data.links.download;\n\t}\n\n\t(0, _createClass3.default)(Library, [{\n\t\tkey: '_assignAttributes',\n\t\tvalue: function _assignAttributes(data) {\n\t\t\t(0, _assign2.default)(this, data.attributes);\n\t\t}\n\n\t\t/**\n * Download the compressed file containing the source code for this library version.\n * @return {Promise} Resolves to the .tar.gz compressed source code\n */\n\n\t}, {\n\t\tkey: 'download',\n\t\tvalue: function download() {\n\t\t\tif (!this.downloadUrl) {\n\t\t\t\treturn _promise2.default.reject(new Error('No download URL for this library'));\n\t\t\t}\n\t\t\treturn this.client.downloadFile(this.downloadUrl);\n\t\t}\n\n\t\t/* TODO: add a versions() method to fetch an array of library objects */\n\n\t}]);\n\treturn Library;\n}();\n\nexports.default = Library;\nmodule.exports = exports['default'];\n//# sourceMappingURL=Library.js.map","/**\n * Root reference for iframes.\n */\n\nvar root;\nif (typeof window !== 'undefined') { // Browser window\n root = window;\n} else if (typeof self !== 'undefined') { // Web Worker\n root = self;\n} else { // Other environments\n console.warn(\"Using browser-only version of superagent in non-browser environment\");\n root = this;\n}\n\nvar Emitter = require('emitter');\nvar requestBase = require('./request-base');\nvar isObject = require('./is-object');\n\n/**\n * Noop.\n */\n\nfunction noop(){};\n\n/**\n * Expose `request`.\n */\n\nvar request = module.exports = require('./request').bind(null, Request);\n\n/**\n * Determine XHR.\n */\n\nrequest.getXHR = function () {\n if (root.XMLHttpRequest\n && (!root.location || 'file:' != root.location.protocol\n || !root.ActiveXObject)) {\n return new XMLHttpRequest;\n } else {\n try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {}\n try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {}\n try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {}\n try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {}\n }\n throw Error(\"Browser-only verison of superagent could not find XHR\");\n};\n\n/**\n * Removes leading and trailing whitespace, added to support IE.\n *\n * @param {String} s\n * @return {String}\n * @api private\n */\n\nvar trim = ''.trim\n ? function(s) { return s.trim(); }\n : function(s) { return s.replace(/(^\\s*|\\s*$)/g, ''); };\n\n/**\n * Serialize the given `obj`.\n *\n * @param {Object} obj\n * @return {String}\n * @api private\n */\n\nfunction serialize(obj) {\n if (!isObject(obj)) return obj;\n var pairs = [];\n for (var key in obj) {\n pushEncodedKeyValuePair(pairs, key, obj[key]);\n }\n return pairs.join('&');\n}\n\n/**\n * Helps 'serialize' with serializing arrays.\n * Mutates the pairs array.\n *\n * @param {Array} pairs\n * @param {String} key\n * @param {Mixed} val\n */\n\nfunction pushEncodedKeyValuePair(pairs, key, val) {\n if (val != null) {\n if (Array.isArray(val)) {\n val.forEach(function(v) {\n pushEncodedKeyValuePair(pairs, key, v);\n });\n } else if (isObject(val)) {\n for(var subkey in val) {\n pushEncodedKeyValuePair(pairs, key + '[' + subkey + ']', val[subkey]);\n }\n } else {\n pairs.push(encodeURIComponent(key)\n + '=' + encodeURIComponent(val));\n }\n } else if (val === null) {\n pairs.push(encodeURIComponent(key));\n }\n}\n\n/**\n * Expose serialization method.\n */\n\n request.serializeObject = serialize;\n\n /**\n * Parse the given x-www-form-urlencoded `str`.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction parseString(str) {\n var obj = {};\n var pairs = str.split('&');\n var pair;\n var pos;\n\n for (var i = 0, len = pairs.length; i < len; ++i) {\n pair = pairs[i];\n pos = pair.indexOf('=');\n if (pos == -1) {\n obj[decodeURIComponent(pair)] = '';\n } else {\n obj[decodeURIComponent(pair.slice(0, pos))] =\n decodeURIComponent(pair.slice(pos + 1));\n }\n }\n\n return obj;\n}\n\n/**\n * Expose parser.\n */\n\nrequest.parseString = parseString;\n\n/**\n * Default MIME type map.\n *\n * superagent.types.xml = 'application/xml';\n *\n */\n\nrequest.types = {\n html: 'text/html',\n json: 'application/json',\n xml: 'application/xml',\n urlencoded: 'application/x-www-form-urlencoded',\n 'form': 'application/x-www-form-urlencoded',\n 'form-data': 'application/x-www-form-urlencoded'\n};\n\n/**\n * Default serialization map.\n *\n * superagent.serialize['application/xml'] = function(obj){\n * return 'generated xml here';\n * };\n *\n */\n\n request.serialize = {\n 'application/x-www-form-urlencoded': serialize,\n 'application/json': JSON.stringify\n };\n\n /**\n * Default parsers.\n *\n * superagent.parse['application/xml'] = function(str){\n * return { object parsed from str };\n * };\n *\n */\n\nrequest.parse = {\n 'application/x-www-form-urlencoded': parseString,\n 'application/json': JSON.parse\n};\n\n/**\n * Parse the given header `str` into\n * an object containing the mapped fields.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction parseHeader(str) {\n var lines = str.split(/\\r?\\n/);\n var fields = {};\n var index;\n var line;\n var field;\n var val;\n\n lines.pop(); // trailing CRLF\n\n for (var i = 0, len = lines.length; i < len; ++i) {\n line = lines[i];\n index = line.indexOf(':');\n field = line.slice(0, index).toLowerCase();\n val = trim(line.slice(index + 1));\n fields[field] = val;\n }\n\n return fields;\n}\n\n/**\n * Check if `mime` is json or has +json structured syntax suffix.\n *\n * @param {String} mime\n * @return {Boolean}\n * @api private\n */\n\nfunction isJSON(mime) {\n return /[\\/+]json\\b/.test(mime);\n}\n\n/**\n * Return the mime type for the given `str`.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction type(str){\n return str.split(/ *; */).shift();\n};\n\n/**\n * Return header field parameters.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction params(str){\n return str.split(/ *; */).reduce(function(obj, str){\n var parts = str.split(/ *= */),\n key = parts.shift(),\n val = parts.shift();\n\n if (key && val) obj[key] = val;\n return obj;\n }, {});\n};\n\n/**\n * Initialize a new `Response` with the given `xhr`.\n *\n * - set flags (.ok, .error, etc)\n * - parse header\n *\n * Examples:\n *\n * Aliasing `superagent` as `request` is nice:\n *\n * request = superagent;\n *\n * We can use the promise-like API, or pass callbacks:\n *\n * request.get('/').end(function(res){});\n * request.get('/', function(res){});\n *\n * Sending data can be chained:\n *\n * request\n * .post('/user')\n * .send({ name: 'tj' })\n * .end(function(res){});\n *\n * Or passed to `.send()`:\n *\n * request\n * .post('/user')\n * .send({ name: 'tj' }, function(res){});\n *\n * Or passed to `.post()`:\n *\n * request\n * .post('/user', { name: 'tj' })\n * .end(function(res){});\n *\n * Or further reduced to a single call for simple cases:\n *\n * request\n * .post('/user', { name: 'tj' }, function(res){});\n *\n * @param {XMLHTTPRequest} xhr\n * @param {Object} options\n * @api private\n */\n\nfunction Response(req, options) {\n options = options || {};\n this.req = req;\n this.xhr = this.req.xhr;\n // responseText is accessible only if responseType is '' or 'text' and on older browsers\n this.text = ((this.req.method !='HEAD' && (this.xhr.responseType === '' || this.xhr.responseType === 'text')) || typeof this.xhr.responseType === 'undefined')\n ? this.xhr.responseText\n : null;\n this.statusText = this.req.xhr.statusText;\n this._setStatusProperties(this.xhr.status);\n this.header = this.headers = parseHeader(this.xhr.getAllResponseHeaders());\n // getAllResponseHeaders sometimes falsely returns \"\" for CORS requests, but\n // getResponseHeader still works. so we get content-type even if getting\n // other headers fails.\n this.header['content-type'] = this.xhr.getResponseHeader('content-type');\n this._setHeaderProperties(this.header);\n this.body = this.req.method != 'HEAD'\n ? this._parseBody(this.text ? this.text : this.xhr.response)\n : null;\n}\n\n/**\n * Get case-insensitive `field` value.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nResponse.prototype.get = function(field){\n return this.header[field.toLowerCase()];\n};\n\n/**\n * Set header related properties:\n *\n * - `.type` the content type without params\n *\n * A response of \"Content-Type: text/plain; charset=utf-8\"\n * will provide you with a `.type` of \"text/plain\".\n *\n * @param {Object} header\n * @api private\n */\n\nResponse.prototype._setHeaderProperties = function(header){\n // content-type\n var ct = this.header['content-type'] || '';\n this.type = type(ct);\n\n // params\n var obj = params(ct);\n for (var key in obj) this[key] = obj[key];\n};\n\n/**\n * Parse the given body `str`.\n *\n * Used for auto-parsing of bodies. Parsers\n * are defined on the `superagent.parse` object.\n *\n * @param {String} str\n * @return {Mixed}\n * @api private\n */\n\nResponse.prototype._parseBody = function(str){\n var parse = request.parse[this.type];\n if (!parse && isJSON(this.type)) {\n parse = request.parse['application/json'];\n }\n return parse && str && (str.length || str instanceof Object)\n ? parse(str)\n : null;\n};\n\n/**\n * Set flags such as `.ok` based on `status`.\n *\n * For example a 2xx response will give you a `.ok` of __true__\n * whereas 5xx will be __false__ and `.error` will be __true__. The\n * `.clientError` and `.serverError` are also available to be more\n * specific, and `.statusType` is the class of error ranging from 1..5\n * sometimes useful for mapping respond colors etc.\n *\n * \"sugar\" properties are also defined for common cases. Currently providing:\n *\n * - .noContent\n * - .badRequest\n * - .unauthorized\n * - .notAcceptable\n * - .notFound\n *\n * @param {Number} status\n * @api private\n */\n\nResponse.prototype._setStatusProperties = function(status){\n // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request\n if (status === 1223) {\n status = 204;\n }\n\n var type = status / 100 | 0;\n\n // status / class\n this.status = this.statusCode = status;\n this.statusType = type;\n\n // basics\n this.info = 1 == type;\n this.ok = 2 == type;\n this.clientError = 4 == type;\n this.serverError = 5 == type;\n this.error = (4 == type || 5 == type)\n ? this.toError()\n : false;\n\n // sugar\n this.accepted = 202 == status;\n this.noContent = 204 == status;\n this.badRequest = 400 == status;\n this.unauthorized = 401 == status;\n this.notAcceptable = 406 == status;\n this.notFound = 404 == status;\n this.forbidden = 403 == status;\n};\n\n/**\n * Return an `Error` representative of this response.\n *\n * @return {Error}\n * @api public\n */\n\nResponse.prototype.toError = function(){\n var req = this.req;\n var method = req.method;\n var url = req.url;\n\n var msg = 'cannot ' + method + ' ' + url + ' (' + this.status + ')';\n var err = new Error(msg);\n err.status = this.status;\n err.method = method;\n err.url = url;\n\n return err;\n};\n\n/**\n * Expose `Response`.\n */\n\nrequest.Response = Response;\n\n/**\n * Initialize a new `Request` with the given `method` and `url`.\n *\n * @param {String} method\n * @param {String} url\n * @api public\n */\n\nfunction Request(method, url) {\n var self = this;\n this._query = this._query || [];\n this.method = method;\n this.url = url;\n this.header = {}; // preserves header name case\n this._header = {}; // coerces header names to lowercase\n this.on('end', function(){\n var err = null;\n var res = null;\n\n try {\n res = new Response(self);\n } catch(e) {\n err = new Error('Parser is unable to parse the response');\n err.parse = true;\n err.original = e;\n // issue #675: return the raw response if the response parsing fails\n err.rawResponse = self.xhr && self.xhr.responseText ? self.xhr.responseText : null;\n // issue #876: return the http status code if the response parsing fails\n err.statusCode = self.xhr && self.xhr.status ? self.xhr.status : null;\n return self.callback(err);\n }\n\n self.emit('response', res);\n\n var new_err;\n try {\n if (res.status < 200 || res.status >= 300) {\n new_err = new Error(res.statusText || 'Unsuccessful HTTP response');\n new_err.original = err;\n new_err.response = res;\n new_err.status = res.status;\n }\n } catch(e) {\n new_err = e; // #985 touching res may cause INVALID_STATE_ERR on old Android\n }\n\n // #1000 don't catch errors from the callback to avoid double calling it\n if (new_err) {\n self.callback(new_err, res);\n } else {\n self.callback(null, res);\n }\n });\n}\n\n/**\n * Mixin `Emitter` and `requestBase`.\n */\n\nEmitter(Request.prototype);\nfor (var key in requestBase) {\n Request.prototype[key] = requestBase[key];\n}\n\n/**\n * Set Content-Type to `type`, mapping values from `request.types`.\n *\n * Examples:\n *\n * superagent.types.xml = 'application/xml';\n *\n * request.post('/')\n * .type('xml')\n * .send(xmlstring)\n * .end(callback);\n *\n * request.post('/')\n * .type('application/xml')\n * .send(xmlstring)\n * .end(callback);\n *\n * @param {String} type\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.type = function(type){\n this.set('Content-Type', request.types[type] || type);\n return this;\n};\n\n/**\n * Set responseType to `val`. Presently valid responseTypes are 'blob' and\n * 'arraybuffer'.\n *\n * Examples:\n *\n * req.get('/')\n * .responseType('blob')\n * .end(callback);\n *\n * @param {String} val\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.responseType = function(val){\n this._responseType = val;\n return this;\n};\n\n/**\n * Set Accept to `type`, mapping values from `request.types`.\n *\n * Examples:\n *\n * superagent.types.json = 'application/json';\n *\n * request.get('/agent')\n * .accept('json')\n * .end(callback);\n *\n * request.get('/agent')\n * .accept('application/json')\n * .end(callback);\n *\n * @param {String} accept\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.accept = function(type){\n this.set('Accept', request.types[type] || type);\n return this;\n};\n\n/**\n * Set Authorization field value with `user` and `pass`.\n *\n * @param {String} user\n * @param {String} pass\n * @param {Object} options with 'type' property 'auto' or 'basic' (default 'basic')\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.auth = function(user, pass, options){\n if (!options) {\n options = {\n type: 'basic'\n }\n }\n\n switch (options.type) {\n case 'basic':\n var str = btoa(user + ':' + pass);\n this.set('Authorization', 'Basic ' + str);\n break;\n\n case 'auto':\n this.username = user;\n this.password = pass;\n break;\n }\n return this;\n};\n\n/**\n* Add query-string `val`.\n*\n* Examples:\n*\n* request.get('/shoes')\n* .query('size=10')\n* .query({ color: 'blue' })\n*\n* @param {Object|String} val\n* @return {Request} for chaining\n* @api public\n*/\n\nRequest.prototype.query = function(val){\n if ('string' != typeof val) val = serialize(val);\n if (val) this._query.push(val);\n return this;\n};\n\n/**\n * Queue the given `file` as an attachment to the specified `field`,\n * with optional `filename`.\n *\n * ``` js\n * request.post('/upload')\n * .attach('content', new Blob(['hey!'], { type: \"text/html\"}))\n * .end(callback);\n * ```\n *\n * @param {String} field\n * @param {Blob|File} file\n * @param {String} filename\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.attach = function(field, file, filename){\n this._getFormData().append(field, file, filename || file.name);\n return this;\n};\n\nRequest.prototype._getFormData = function(){\n if (!this._formData) {\n this._formData = new root.FormData();\n }\n return this._formData;\n};\n\n/**\n * Invoke the callback with `err` and `res`\n * and handle arity check.\n *\n * @param {Error} err\n * @param {Response} res\n * @api private\n */\n\nRequest.prototype.callback = function(err, res){\n var fn = this._callback;\n this.clearTimeout();\n fn(err, res);\n};\n\n/**\n * Invoke callback with x-domain error.\n *\n * @api private\n */\n\nRequest.prototype.crossDomainError = function(){\n var err = new Error('Request has been terminated\\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.');\n err.crossDomain = true;\n\n err.status = this.status;\n err.method = this.method;\n err.url = this.url;\n\n this.callback(err);\n};\n\n/**\n * Invoke callback with timeout error.\n *\n * @api private\n */\n\nRequest.prototype._timeoutError = function(){\n var timeout = this._timeout;\n var err = new Error('timeout of ' + timeout + 'ms exceeded');\n err.timeout = timeout;\n this.callback(err);\n};\n\n/**\n * Compose querystring to append to req.url\n *\n * @api private\n */\n\nRequest.prototype._appendQueryString = function(){\n var query = this._query.join('&');\n if (query) {\n this.url += ~this.url.indexOf('?')\n ? '&' + query\n : '?' + query;\n }\n};\n\n/**\n * Initiate request, invoking callback `fn(res)`\n * with an instanceof `Response`.\n *\n * @param {Function} fn\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.end = function(fn){\n var self = this;\n var xhr = this.xhr = request.getXHR();\n var timeout = this._timeout;\n var data = this._formData || this._data;\n\n // store callback\n this._callback = fn || noop;\n\n // state change\n xhr.onreadystatechange = function(){\n if (4 != xhr.readyState) return;\n\n // In IE9, reads to any property (e.g. status) off of an aborted XHR will\n // result in the error \"Could not complete the operation due to error c00c023f\"\n var status;\n try { status = xhr.status } catch(e) { status = 0; }\n\n if (0 == status) {\n if (self.timedout) return self._timeoutError();\n if (self._aborted) return;\n return self.crossDomainError();\n }\n self.emit('end');\n };\n\n // progress\n var handleProgress = function(e){\n if (e.total > 0) {\n e.percent = e.loaded / e.total * 100;\n }\n e.direction = 'download';\n self.emit('progress', e);\n };\n if (this.hasListeners('progress')) {\n xhr.onprogress = handleProgress;\n }\n try {\n if (xhr.upload && this.hasListeners('progress')) {\n xhr.upload.onprogress = handleProgress;\n }\n } catch(e) {\n // Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist.\n // Reported here:\n // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context\n }\n\n // timeout\n if (timeout && !this._timer) {\n this._timer = setTimeout(function(){\n self.timedout = true;\n self.abort();\n }, timeout);\n }\n\n // querystring\n this._appendQueryString();\n\n // initiate request\n if (this.username && this.password) {\n xhr.open(this.method, this.url, true, this.username, this.password);\n } else {\n xhr.open(this.method, this.url, true);\n }\n\n // CORS\n if (this._withCredentials) xhr.withCredentials = true;\n\n // body\n if ('GET' != this.method && 'HEAD' != this.method && 'string' != typeof data && !this._isHost(data)) {\n // serialize stuff\n var contentType = this._header['content-type'];\n var serialize = this._serializer || request.serialize[contentType ? contentType.split(';')[0] : ''];\n if (!serialize && isJSON(contentType)) serialize = request.serialize['application/json'];\n if (serialize) data = serialize(data);\n }\n\n // set header fields\n for (var field in this.header) {\n if (null == this.header[field]) continue;\n xhr.setRequestHeader(field, this.header[field]);\n }\n\n if (this._responseType) {\n xhr.responseType = this._responseType;\n }\n\n // send stuff\n this.emit('request', this);\n\n // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing)\n // We need null here if data is undefined\n xhr.send(typeof data !== 'undefined' ? data : null);\n return this;\n};\n\n\n/**\n * Expose `Request`.\n */\n\nrequest.Request = Request;\n\n/**\n * GET `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.get = function(url, data, fn){\n var req = request('GET', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.query(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * HEAD `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.head = function(url, data, fn){\n var req = request('HEAD', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * OPTIONS query to `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.options = function(url, data, fn){\n var req = request('OPTIONS', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * DELETE `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nfunction del(url, fn){\n var req = request('DELETE', url);\n if (fn) req.end(fn);\n return req;\n};\n\nrequest['del'] = del;\nrequest['delete'] = del;\n\n/**\n * PATCH `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed} [data]\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.patch = function(url, data, fn){\n var req = request('PATCH', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * POST `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed} [data]\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.post = function(url, data, fn){\n var req = request('POST', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * PUT `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.put = function(url, data, fn){\n var req = request('PUT', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n var result = splitPath(path),\n root = result[0],\n dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPath(path)[2];\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPath(path)[3];\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();","var ClientRequest = require('./lib/request')\nvar extend = require('xtend')\nvar statusCodes = require('builtin-status-codes')\nvar url = require('url')\n\nvar http = exports\n\nhttp.request = function (opts, cb) {\n\tif (typeof opts === 'string')\n\t\topts = url.parse(opts)\n\telse\n\t\topts = extend(opts)\n\n\t// Normally, the page is loaded from http or https, so not specifying a protocol\n\t// will result in a (valid) protocol-relative url. However, this won't work if\n\t// the protocol is something else, like 'file:'\n\tvar defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : ''\n\n\tvar protocol = opts.protocol || defaultProtocol\n\tvar host = opts.hostname || opts.host\n\tvar port = opts.port\n\tvar path = opts.path || '/'\n\n\t// Necessary for IPv6 addresses\n\tif (host && host.indexOf(':') !== -1)\n\t\thost = '[' + host + ']'\n\n\t// This may be a relative url. The browser should always be able to interpret it correctly.\n\topts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path\n\topts.method = (opts.method || 'GET').toUpperCase()\n\topts.headers = opts.headers || {}\n\n\t// Also valid opts.auth, opts.mode\n\n\tvar req = new ClientRequest(opts)\n\tif (cb)\n\t\treq.on('response', cb)\n\treturn req\n}\n\nhttp.get = function get (opts, cb) {\n\tvar req = http.request(opts, cb)\n\treq.end()\n\treturn req\n}\n\nhttp.Agent = function () {}\nhttp.Agent.defaultMaxSockets = 4\n\nhttp.STATUS_CODES = statusCodes\n\nhttp.METHODS = [\n\t'CHECKOUT',\n\t'CONNECT',\n\t'COPY',\n\t'DELETE',\n\t'GET',\n\t'HEAD',\n\t'LOCK',\n\t'M-SEARCH',\n\t'MERGE',\n\t'MKACTIVITY',\n\t'MKCOL',\n\t'MOVE',\n\t'NOTIFY',\n\t'OPTIONS',\n\t'PATCH',\n\t'POST',\n\t'PROPFIND',\n\t'PROPPATCH',\n\t'PURGE',\n\t'PUT',\n\t'REPORT',\n\t'SEARCH',\n\t'SUBSCRIBE',\n\t'TRACE',\n\t'UNLOCK',\n\t'UNSUBSCRIBE'\n]","module.exports = function (prefix) {\n return function (request) {\n if (request.url[0] === '/') {\n request.url = prefix + request.url;\n }\n\n return request;\n };\n}","'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n","/**\n * Module of mixed-in functions shared between node and client code\n */\nvar isObject = require('./is-object');\n\n/**\n * Clear previous timeout.\n *\n * @return {Request} for chaining\n * @api public\n */\n\nexports.clearTimeout = function _clearTimeout(){\n this._timeout = 0;\n clearTimeout(this._timer);\n return this;\n};\n\n/**\n * Override default response body parser\n *\n * This function will be called to convert incoming data into request.body\n *\n * @param {Function}\n * @api public\n */\n\nexports.parse = function parse(fn){\n this._parser = fn;\n return this;\n};\n\n/**\n * Override default request body serializer\n *\n * This function will be called to convert data set via .send or .attach into payload to send\n *\n * @param {Function}\n * @api public\n */\n\nexports.serialize = function serialize(fn){\n this._serializer = fn;\n return this;\n};\n\n/**\n * Set timeout to `ms`.\n *\n * @param {Number} ms\n * @return {Request} for chaining\n * @api public\n */\n\nexports.timeout = function timeout(ms){\n this._timeout = ms;\n return this;\n};\n\n/**\n * Promise support\n *\n * @param {Function} resolve\n * @param {Function} reject\n * @return {Request}\n */\n\nexports.then = function then(resolve, reject) {\n if (!this._fullfilledPromise) {\n var self = this;\n this._fullfilledPromise = new Promise(function(innerResolve, innerReject){\n self.end(function(err, res){\n if (err) innerReject(err); else innerResolve(res);\n });\n });\n }\n return this._fullfilledPromise.then(resolve, reject);\n}\n\n/**\n * Allow for extension\n */\n\nexports.use = function use(fn) {\n fn(this);\n return this;\n}\n\n\n/**\n * Get request header `field`.\n * Case-insensitive.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nexports.get = function(field){\n return this._header[field.toLowerCase()];\n};\n\n/**\n * Get case-insensitive header `field` value.\n * This is a deprecated internal API. Use `.get(field)` instead.\n *\n * (getHeader is no longer used internally by the superagent code base)\n *\n * @param {String} field\n * @return {String}\n * @api private\n * @deprecated\n */\n\nexports.getHeader = exports.get;\n\n/**\n * Set header `field` to `val`, or multiple fields with one object.\n * Case-insensitive.\n *\n * Examples:\n *\n * req.get('/')\n * .set('Accept', 'application/json')\n * .set('X-API-Key', 'foobar')\n * .end(callback);\n *\n * req.get('/')\n * .set({ Accept: 'application/json', 'X-API-Key': 'foobar' })\n * .end(callback);\n *\n * @param {String|Object} field\n * @param {String} val\n * @return {Request} for chaining\n * @api public\n */\n\nexports.set = function(field, val){\n if (isObject(field)) {\n for (var key in field) {\n this.set(key, field[key]);\n }\n return this;\n }\n this._header[field.toLowerCase()] = val;\n this.header[field] = val;\n return this;\n};\n\n/**\n * Remove header `field`.\n * Case-insensitive.\n *\n * Example:\n *\n * req.get('/')\n * .unset('User-Agent')\n * .end(callback);\n *\n * @param {String} field\n */\nexports.unset = function(field){\n delete this._header[field.toLowerCase()];\n delete this.header[field];\n return this;\n};\n\n/**\n * Write the field `name` and `val` for \"multipart/form-data\"\n * request bodies.\n *\n * ``` js\n * request.post('/upload')\n * .field('foo', 'bar')\n * .end(callback);\n * ```\n *\n * @param {String} name\n * @param {String|Blob|File|Buffer|fs.ReadStream} val\n * @return {Request} for chaining\n * @api public\n */\nexports.field = function(name, val) {\n this._getFormData().append(name, val);\n return this;\n};\n\n/**\n * Abort the request, and clear potential timeout.\n *\n * @return {Request}\n * @api public\n */\nexports.abort = function(){\n if (this._aborted) {\n return this;\n }\n this._aborted = true;\n this.xhr && this.xhr.abort(); // browser\n this.req && this.req.abort(); // node\n this.clearTimeout();\n this.emit('abort');\n return this;\n};\n\n/**\n * Enable transmission of cookies with x-domain requests.\n *\n * Note that for this to work the origin must not be\n * using \"Access-Control-Allow-Origin\" with a wildcard,\n * and also must set \"Access-Control-Allow-Credentials\"\n * to \"true\".\n *\n * @api public\n */\n\nexports.withCredentials = function(){\n // This is browser-only functionality. Node side is no-op.\n this._withCredentials = true;\n return this;\n};\n\n/**\n * Set the max redirects to `n`. Does noting in browser XHR implementation.\n *\n * @param {Number} n\n * @return {Request} for chaining\n * @api public\n */\n\nexports.redirects = function(n){\n this._maxRedirects = n;\n return this;\n};\n\n/**\n * Convert to a plain javascript object (not JSON string) of scalar properties.\n * Note as this method is designed to return a useful non-this value,\n * it cannot be chained.\n *\n * @return {Object} describing method, url, and data of this request\n * @api public\n */\n\nexports.toJSON = function(){\n return {\n method: this.method,\n url: this.url,\n data: this._data,\n headers: this._header\n };\n};\n\n/**\n * Check if `obj` is a host object,\n * we don't want to serialize these :)\n *\n * TODO: future proof, move to compoent land\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api private\n */\n\nexports._isHost = function _isHost(obj) {\n var str = {}.toString.call(obj);\n\n switch (str) {\n case '[object File]':\n case '[object Blob]':\n case '[object FormData]':\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Send `data` as the request body, defaulting the `.type()` to \"json\" when\n * an object is given.\n *\n * Examples:\n *\n * // manual json\n * request.post('/user')\n * .type('json')\n * .send('{\"name\":\"tj\"}')\n * .end(callback)\n *\n * // auto json\n * request.post('/user')\n * .send({ name: 'tj' })\n * .end(callback)\n *\n * // manual x-www-form-urlencoded\n * request.post('/user')\n * .type('form')\n * .send('name=tj')\n * .end(callback)\n *\n * // auto x-www-form-urlencoded\n * request.post('/user')\n * .type('form')\n * .send({ name: 'tj' })\n * .end(callback)\n *\n * // defaults to x-www-form-urlencoded\n * request.post('/user')\n * .send('name=tobi')\n * .send('species=ferret')\n * .end(callback)\n *\n * @param {String|Object} data\n * @return {Request} for chaining\n * @api public\n */\n\nexports.send = function(data){\n var obj = isObject(data);\n var type = this._header['content-type'];\n\n // merge\n if (obj && isObject(this._data)) {\n for (var key in data) {\n this._data[key] = data[key];\n }\n } else if ('string' == typeof data) {\n // default to x-www-form-urlencoded\n if (!type) this.type('form');\n type = this._header['content-type'];\n if ('application/x-www-form-urlencoded' == type) {\n this._data = this._data\n ? this._data + '&' + data\n : data;\n } else {\n this._data = (this._data || '') + data;\n }\n } else {\n this._data = data;\n }\n\n if (!obj || this._isHost(data)) return this;\n\n // default to json\n if (!type) this.type('json');\n return this;\n};\n","/**\n * Check if `obj` is an object.\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api private\n */\n\nfunction isObject(obj) {\n return null !== obj && 'object' === typeof obj;\n}\n\nmodule.exports = isObject;\n","// The node and browser modules expose versions of this with the\n// appropriate constructor function bound as first argument\n/**\n * Issue a request:\n *\n * Examples:\n *\n * request('GET', '/users').end(callback)\n * request('/users').end(callback)\n * request('/users', callback)\n *\n * @param {String} method\n * @param {String|Function} url or callback\n * @return {Request}\n * @api public\n */\n\nfunction request(RequestConstructor, method, url) {\n // callback\n if ('function' == typeof url) {\n return new RequestConstructor('GET', method).end(url);\n }\n\n // url first\n if (2 == arguments.length) {\n return new RequestConstructor('GET', method);\n }\n\n return new RequestConstructor(method, url);\n}\n\nmodule.exports = request;\n","/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\n(function () {\n try {\n cachedSetTimeout = setTimeout;\n } catch (e) {\n cachedSetTimeout = function () {\n throw new Error('setTimeout is not defined');\n }\n }\n try {\n cachedClearTimeout = clearTimeout;\n } catch (e) {\n cachedClearTimeout = function () {\n throw new Error('clearTimeout is not defined');\n }\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};","module.exports = { \"default\": require(\"core-js/library/fn/promise\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = require(\"../core-js/object/set-prototype-of\");\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = require(\"../core-js/object/create\");\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _isIterable2 = require(\"../core-js/is-iterable\");\n\nvar _isIterable3 = _interopRequireDefault(_isIterable2);\n\nvar _getIterator2 = require(\"../core-js/get-iterator\");\n\nvar _getIterator3 = _interopRequireDefault(_getIterator2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if ((0, _isIterable3.default)(Object(arr))) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();","module.exports = { \"default\": require(\"core-js/library/fn/get-iterator\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };","// var Base64 = require('Base64')\nvar capability = require('./capability')\nvar inherits = require('inherits')\nvar response = require('./response')\nvar stream = require('stream')\nvar toArrayBuffer = require('to-arraybuffer')\n\nvar IncomingMessage = response.IncomingMessage\nvar rStates = response.readyStates\n\nfunction decideMode (preferBinary, avoidFetch) {\n\tif (capability.fetch && !avoidFetch) {\n\t\treturn 'fetch'\n\t} else if (capability.mozchunkedarraybuffer) {\n\t\treturn 'moz-chunked-arraybuffer'\n\t} else if (capability.msstream) {\n\t\treturn 'ms-stream'\n\t} else if (capability.arraybuffer && preferBinary) {\n\t\treturn 'arraybuffer'\n\t} else if (capability.vbArray && preferBinary) {\n\t\treturn 'text:vbarray'\n\t} else {\n\t\treturn 'text'\n\t}\n}\n\nvar ClientRequest = module.exports = function (opts) {\n\tvar self = this\n\tstream.Writable.call(self)\n\n\tself._opts = opts\n\tself._body = []\n\tself._headers = {}\n\tif (opts.auth)\n\t\tself.setHeader('Authorization', 'Basic ' + new Buffer(opts.auth).toString('base64'))\n\tObject.keys(opts.headers).forEach(function (name) {\n\t\tself.setHeader(name, opts.headers[name])\n\t})\n\n\tvar preferBinary\n\tif (opts.mode === 'prefer-streaming') {\n\t\t// If streaming is a high priority but binary compatibility and\n\t\t// the accuracy of the 'content-type' header aren't\n\t\tpreferBinary = false\n\t} else if (opts.mode === 'allow-wrong-content-type') {\n\t\t// If streaming is more important than preserving the 'content-type' header\n\t\tpreferBinary = !capability.overrideMimeType\n\t} else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') {\n\t\t// Use binary if text streaming may corrupt data or the content-type header, or for speed\n\t\tpreferBinary = true\n\t} else {\n\t\tthrow new Error('Invalid value for opts.mode')\n\t}\n\tself._mode = decideMode(preferBinary, opts.avoidFetch)\n\n\tself.on('finish', function () {\n\t\tself._onFinish()\n\t})\n}\n\ninherits(ClientRequest, stream.Writable)\n\nClientRequest.prototype.setHeader = function (name, value) {\n\tvar self = this\n\tvar lowerName = name.toLowerCase()\n\t// This check is not necessary, but it prevents warnings from browsers about setting unsafe\n\t// headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but\n\t// http-browserify did it, so I will too.\n\tif (unsafeHeaders.indexOf(lowerName) !== -1)\n\t\treturn\n\n\tself._headers[lowerName] = {\n\t\tname: name,\n\t\tvalue: value\n\t}\n}\n\nClientRequest.prototype.getHeader = function (name) {\n\tvar self = this\n\treturn self._headers[name.toLowerCase()].value\n}\n\nClientRequest.prototype.removeHeader = function (name) {\n\tvar self = this\n\tdelete self._headers[name.toLowerCase()]\n}\n\nClientRequest.prototype._onFinish = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\tvar opts = self._opts\n\n\tvar headersObj = self._headers\n\tvar body\n\tif (opts.method === 'POST' || opts.method === 'PUT' || opts.method === 'PATCH') {\n\t\tif (capability.blobConstructor) {\n\t\t\tbody = new global.Blob(self._body.map(function (buffer) {\n\t\t\t\treturn toArrayBuffer(buffer)\n\t\t\t}), {\n\t\t\t\ttype: (headersObj['content-type'] || {}).value || ''\n\t\t\t})\n\t\t} else {\n\t\t\t// get utf8 string\n\t\t\tbody = Buffer.concat(self._body).toString()\n\t\t}\n\t}\n\n\tif (self._mode === 'fetch') {\n\t\tvar headers = Object.keys(headersObj).map(function (name) {\n\t\t\treturn [headersObj[name].name, headersObj[name].value]\n\t\t})\n\n\t\tglobal.fetch(self._opts.url, {\n\t\t\tmethod: self._opts.method,\n\t\t\theaders: headers,\n\t\t\tbody: body,\n\t\t\tmode: 'cors',\n\t\t\tcredentials: opts.withCredentials ? 'include' : 'same-origin'\n\t\t}).then(function (response) {\n\t\t\tself._fetchResponse = response\n\t\t\tself._connect()\n\t\t}, function (reason) {\n\t\t\tself.emit('error', reason)\n\t\t})\n\t} else {\n\t\tvar xhr = self._xhr = new global.XMLHttpRequest()\n\t\ttry {\n\t\t\txhr.open(self._opts.method, self._opts.url, true)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\n\t\t// Can't set responseType on really old browsers\n\t\tif ('responseType' in xhr)\n\t\t\txhr.responseType = self._mode.split(':')[0]\n\n\t\tif ('withCredentials' in xhr)\n\t\t\txhr.withCredentials = !!opts.withCredentials\n\n\t\tif (self._mode === 'text' && 'overrideMimeType' in xhr)\n\t\t\txhr.overrideMimeType('text/plain; charset=x-user-defined')\n\n\t\tObject.keys(headersObj).forEach(function (name) {\n\t\t\txhr.setRequestHeader(headersObj[name].name, headersObj[name].value)\n\t\t})\n\n\t\tself._response = null\n\t\txhr.onreadystatechange = function () {\n\t\t\tswitch (xhr.readyState) {\n\t\t\t\tcase rStates.LOADING:\n\t\t\t\tcase rStates.DONE:\n\t\t\t\t\tself._onXHRProgress()\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\t// Necessary for streaming in Firefox, since xhr.response is ONLY defined\n\t\t// in onprogress, not in onreadystatechange with xhr.readyState = 3\n\t\tif (self._mode === 'moz-chunked-arraybuffer') {\n\t\t\txhr.onprogress = function () {\n\t\t\t\tself._onXHRProgress()\n\t\t\t}\n\t\t}\n\n\t\txhr.onerror = function () {\n\t\t\tif (self._destroyed)\n\t\t\t\treturn\n\t\t\tself.emit('error', new Error('XHR error'))\n\t\t}\n\n\t\ttry {\n\t\t\txhr.send(body)\n\t\t} catch (err) {\n\t\t\tprocess.nextTick(function () {\n\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t}\n}\n\n/**\n * Checks if xhr.status is readable and non-zero, indicating no error.\n * Even though the spec says it should be available in readyState 3,\n * accessing it throws an exception in IE8\n */\nfunction statusValid (xhr) {\n\ttry {\n\t\tvar status = xhr.status\n\t\treturn (status !== null && status !== 0)\n\t} catch (e) {\n\t\treturn false\n\t}\n}\n\nClientRequest.prototype._onXHRProgress = function () {\n\tvar self = this\n\n\tif (!statusValid(self._xhr) || self._destroyed)\n\t\treturn\n\n\tif (!self._response)\n\t\tself._connect()\n\n\tself._response._onXHRProgress()\n}\n\nClientRequest.prototype._connect = function () {\n\tvar self = this\n\n\tif (self._destroyed)\n\t\treturn\n\n\tself._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode)\n\tself.emit('response', self._response)\n}\n\nClientRequest.prototype._write = function (chunk, encoding, cb) {\n\tvar self = this\n\n\tself._body.push(chunk)\n\tcb()\n}\n\nClientRequest.prototype.abort = ClientRequest.prototype.destroy = function () {\n\tvar self = this\n\tself._destroyed = true\n\tif (self._response)\n\t\tself._response._destroyed = true\n\tif (self._xhr)\n\t\tself._xhr.abort()\n\t// Currently, there isn't a way to truly abort a fetch.\n\t// If you like bikeshedding, see https://github.com/whatwg/fetch/issues/27\n}\n\nClientRequest.prototype.end = function (data, encoding, cb) {\n\tvar self = this\n\tif (typeof data === 'function') {\n\t\tcb = data\n\t\tdata = undefined\n\t}\n\n\tstream.Writable.prototype.end.call(self, data, encoding, cb)\n}\n\nClientRequest.prototype.flushHeaders = function () {}\nClientRequest.prototype.setTimeout = function () {}\nClientRequest.prototype.setNoDelay = function () {}\nClientRequest.prototype.setSocketKeepAlive = function () {}\n\n// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method\nvar unsafeHeaders = [\n\t'accept-charset',\n\t'accept-encoding',\n\t'access-control-request-headers',\n\t'access-control-request-method',\n\t'connection',\n\t'content-length',\n\t'cookie',\n\t'cookie2',\n\t'date',\n\t'dnt',\n\t'expect',\n\t'host',\n\t'keep-alive',\n\t'origin',\n\t'referer',\n\t'te',\n\t'trailer',\n\t'transfer-encoding',\n\t'upgrade',\n\t'user-agent',\n\t'via'\n]\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","'use strict'\n\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nfunction init () {\n var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n }\n\n revLookup['-'.charCodeAt(0)] = 62\n revLookup['_'.charCodeAt(0)] = 63\n}\n\ninit()\n\nfunction toByteArray (b64) {\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/number/is-nan\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/get-prototype-of\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/keys\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/entries\"), __esModule: true };","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n var args = [].slice.call(arguments, 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/is-iterable\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/set-prototype-of\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };","module.exports = {\n \"100\": \"Continue\",\n \"101\": \"Switching Protocols\",\n \"102\": \"Processing\",\n \"200\": \"OK\",\n \"201\": \"Created\",\n \"202\": \"Accepted\",\n \"203\": \"Non-Authoritative Information\",\n \"204\": \"No Content\",\n \"205\": \"Reset Content\",\n \"206\": \"Partial Content\",\n \"207\": \"Multi-Status\",\n \"208\": \"Already Reported\",\n \"226\": \"IM Used\",\n \"300\": \"Multiple Choices\",\n \"301\": \"Moved Permanently\",\n \"302\": \"Found\",\n \"303\": \"See Other\",\n \"304\": \"Not Modified\",\n \"305\": \"Use Proxy\",\n \"307\": \"Temporary Redirect\",\n \"308\": \"Permanent Redirect\",\n \"400\": \"Bad Request\",\n \"401\": \"Unauthorized\",\n \"402\": \"Payment Required\",\n \"403\": \"Forbidden\",\n \"404\": \"Not Found\",\n \"405\": \"Method Not Allowed\",\n \"406\": \"Not Acceptable\",\n \"407\": \"Proxy Authentication Required\",\n \"408\": \"Request Timeout\",\n \"409\": \"Conflict\",\n \"410\": \"Gone\",\n \"411\": \"Length Required\",\n \"412\": \"Precondition Failed\",\n \"413\": \"Payload Too Large\",\n \"414\": \"URI Too Long\",\n \"415\": \"Unsupported Media Type\",\n \"416\": \"Range Not Satisfiable\",\n \"417\": \"Expectation Failed\",\n \"418\": \"I'm a teapot\",\n \"421\": \"Misdirected Request\",\n \"422\": \"Unprocessable Entity\",\n \"423\": \"Locked\",\n \"424\": \"Failed Dependency\",\n \"425\": \"Unordered Collection\",\n \"426\": \"Upgrade Required\",\n \"428\": \"Precondition Required\",\n \"429\": \"Too Many Requests\",\n \"431\": \"Request Header Fields Too Large\",\n \"500\": \"Internal Server Error\",\n \"501\": \"Not Implemented\",\n \"502\": \"Bad Gateway\",\n \"503\": \"Service Unavailable\",\n \"504\": \"Gateway Timeout\",\n \"505\": \"HTTP Version Not Supported\",\n \"506\": \"Variant Also Negotiates\",\n \"507\": \"Insufficient Storage\",\n \"508\": \"Loop Detected\",\n \"509\": \"Bandwidth Limit Exceeded\",\n \"510\": \"Not Extended\",\n \"511\": \"Network Authentication Required\"\n}\n","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableByteStream)\n\nexports.blobConstructor = false\ntry {\n\tnew Blob([new ArrayBuffer(1)])\n\texports.blobConstructor = true\n} catch (e) {}\n\nvar xhr = new global.XMLHttpRequest()\n// If location.host is empty, e.g. if this page/worker was loaded\n// from a Blob, then use example.com to avoid an error\nxhr.open('GET', global.location.host ? '/' : 'https://example.com')\n\nfunction checkTypeSupport (type) {\n\ttry {\n\t\txhr.responseType = type\n\t\treturn xhr.responseType === type\n\t} catch (e) {}\n\treturn false\n}\n\n// For some strange reason, Safari 7.0 reports typeof global.ArrayBuffer === 'object'.\n// Safari 7.1 appears to have fixed this bug.\nvar haveArrayBuffer = typeof global.ArrayBuffer !== 'undefined'\nvar haveSlice = haveArrayBuffer && isFunction(global.ArrayBuffer.prototype.slice)\n\nexports.arraybuffer = haveArrayBuffer && checkTypeSupport('arraybuffer')\n// These next two tests unavoidably show warnings in Chrome. Since fetch will always\n// be used if it's available, just return false for these to avoid the warnings.\nexports.msstream = !exports.fetch && haveSlice && checkTypeSupport('ms-stream')\nexports.mozchunkedarraybuffer = !exports.fetch && haveArrayBuffer &&\n\tcheckTypeSupport('moz-chunked-arraybuffer')\nexports.overrideMimeType = isFunction(xhr.overrideMimeType)\nexports.vbArray = isFunction(global.VBArray)\n\nfunction isFunction (value) {\n return typeof value === 'function'\n}\n\nxhr = null // Help gc\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar stream = require('stream')\n\nvar rStates = exports.readyStates = {\n\tUNSENT: 0,\n\tOPENED: 1,\n\tHEADERS_RECEIVED: 2,\n\tLOADING: 3,\n\tDONE: 4\n}\n\nvar IncomingMessage = exports.IncomingMessage = function (xhr, response, mode) {\n\tvar self = this\n\tstream.Readable.call(self)\n\n\tself._mode = mode\n\tself.headers = {}\n\tself.rawHeaders = []\n\tself.trailers = {}\n\tself.rawTrailers = []\n\n\t// Fake the 'close' event, but only once 'end' fires\n\tself.on('end', function () {\n\t\t// The nextTick is necessary to prevent the 'request' module from causing an infinite loop\n\t\tprocess.nextTick(function () {\n\t\t\tself.emit('close')\n\t\t})\n\t})\n\n\tif (mode === 'fetch') {\n\t\tself._fetchResponse = response\n\n\t\tself.statusCode = response.status\n\t\tself.statusMessage = response.statusText\n\t\t// backwards compatible version of for (
- of ):\n\t\t// for (var
- ,_i,_it = [Symbol.iterator]();
- = (_i = _it.next()).value,!_i.done;)\n\t\tfor (var header, _i, _it = response.headers[Symbol.iterator](); header = (_i = _it.next()).value, !_i.done;) {\n\t\t\tself.headers[header[0].toLowerCase()] = header[1]\n\t\t\tself.rawHeaders.push(header[0], header[1])\n\t\t}\n\n\t\t// TODO: this doesn't respect backpressure. Once WritableStream is available, this can be fixed\n\t\tvar reader = response.body.getReader()\n\t\tfunction read () {\n\t\t\treader.read().then(function (result) {\n\t\t\t\tif (self._destroyed)\n\t\t\t\t\treturn\n\t\t\t\tif (result.done) {\n\t\t\t\t\tself.push(null)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tself.push(new Buffer(result.value))\n\t\t\t\tread()\n\t\t\t})\n\t\t}\n\t\tread()\n\n\t} else {\n\t\tself._xhr = xhr\n\t\tself._pos = 0\n\n\t\tself.statusCode = xhr.status\n\t\tself.statusMessage = xhr.statusText\n\t\tvar headers = xhr.getAllResponseHeaders().split(/\\r?\\n/)\n\t\theaders.forEach(function (header) {\n\t\t\tvar matches = header.match(/^([^:]+):\\s*(.*)/)\n\t\t\tif (matches) {\n\t\t\t\tvar key = matches[1].toLowerCase()\n\t\t\t\tif (key === 'set-cookie') {\n\t\t\t\t\tif (self.headers[key] === undefined) {\n\t\t\t\t\t\tself.headers[key] = []\n\t\t\t\t\t}\n\t\t\t\t\tself.headers[key].push(matches[2])\n\t\t\t\t} else if (self.headers[key] !== undefined) {\n\t\t\t\t\tself.headers[key] += ', ' + matches[2]\n\t\t\t\t} else {\n\t\t\t\t\tself.headers[key] = matches[2]\n\t\t\t\t}\n\t\t\t\tself.rawHeaders.push(matches[1], matches[2])\n\t\t\t}\n\t\t})\n\n\t\tself._charset = 'x-user-defined'\n\t\tif (!capability.overrideMimeType) {\n\t\t\tvar mimeType = self.rawHeaders['mime-type']\n\t\t\tif (mimeType) {\n\t\t\t\tvar charsetMatch = mimeType.match(/;\\s*charset=([^;])(;|$)/)\n\t\t\t\tif (charsetMatch) {\n\t\t\t\t\tself._charset = charsetMatch[1].toLowerCase()\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!self._charset)\n\t\t\t\tself._charset = 'utf-8' // best guess\n\t\t}\n\t}\n}\n\ninherits(IncomingMessage, stream.Readable)\n\nIncomingMessage.prototype._read = function () {}\n\nIncomingMessage.prototype._onXHRProgress = function () {\n\tvar self = this\n\n\tvar xhr = self._xhr\n\n\tvar response = null\n\tswitch (self._mode) {\n\t\tcase 'text:vbarray': // For IE9\n\t\t\tif (xhr.readyState !== rStates.DONE)\n\t\t\t\tbreak\n\t\t\ttry {\n\t\t\t\t// This fails in IE8\n\t\t\t\tresponse = new global.VBArray(xhr.responseBody).toArray()\n\t\t\t} catch (e) {}\n\t\t\tif (response !== null) {\n\t\t\t\tself.push(new Buffer(response))\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// Falls through in IE8\t\n\t\tcase 'text':\n\t\t\ttry { // This will fail when readyState = 3 in IE9. Switch mode and wait for readyState = 4\n\t\t\t\tresponse = xhr.responseText\n\t\t\t} catch (e) {\n\t\t\t\tself._mode = 'text:vbarray'\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif (response.length > self._pos) {\n\t\t\t\tvar newData = response.substr(self._pos)\n\t\t\t\tif (self._charset === 'x-user-defined') {\n\t\t\t\t\tvar buffer = new Buffer(newData.length)\n\t\t\t\t\tfor (var i = 0; i < newData.length; i++)\n\t\t\t\t\t\tbuffer[i] = newData.charCodeAt(i) & 0xff\n\n\t\t\t\t\tself.push(buffer)\n\t\t\t\t} else {\n\t\t\t\t\tself.push(newData, self._charset)\n\t\t\t\t}\n\t\t\t\tself._pos = response.length\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'arraybuffer':\n\t\t\tif (xhr.readyState !== rStates.DONE)\n\t\t\t\tbreak\n\t\t\tresponse = xhr.response\n\t\t\tself.push(new Buffer(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'moz-chunked-arraybuffer': // take whole\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING || !response)\n\t\t\t\tbreak\n\t\t\tself.push(new Buffer(new Uint8Array(response)))\n\t\t\tbreak\n\t\tcase 'ms-stream':\n\t\t\tresponse = xhr.response\n\t\t\tif (xhr.readyState !== rStates.LOADING)\n\t\t\t\tbreak\n\t\t\tvar reader = new global.MSStreamReader()\n\t\t\treader.onprogress = function () {\n\t\t\t\tif (reader.result.byteLength > self._pos) {\n\t\t\t\t\tself.push(new Buffer(new Uint8Array(reader.result.slice(self._pos))))\n\t\t\t\t\tself._pos = reader.result.byteLength\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.onload = function () {\n\t\t\t\tself.push(null)\n\t\t\t}\n\t\t\t// reader.onerror = ??? // TODO: this\n\t\t\treader.readAsArrayBuffer(response)\n\t\t\tbreak\n\t}\n\n\t// The ms-stream case handles end separately in reader.onload()\n\tif (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') {\n\t\tself.push(null)\n\t}\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","var Buffer = require('buffer').Buffer\n\nmodule.exports = function (buf) {\n\t// If the buffer is backed by a Uint8Array, a faster version will work\n\tif (buf instanceof Uint8Array) {\n\t\t// If the buffer isn't a subarray, return the underlying ArrayBuffer\n\t\tif (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {\n\t\t\treturn buf.buffer\n\t\t} else if (typeof buf.buffer.slice === 'function') {\n\t\t\t// Otherwise we need to get a proper copy\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength)\n\t\t}\n\t}\n\n\tif (Buffer.isBuffer(buf)) {\n\t\t// This is the slow version that will work with any Buffer\n\t\t// implementation (even in old browsers)\n\t\tvar arrayCopy = new Uint8Array(buf.length)\n\t\tvar len = buf.length\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tarrayCopy[i] = buf[i]\n\t\t}\n\t\treturn arrayCopy.buffer\n\t} else {\n\t\tthrow new Error('Argument must be a Buffer')\n\t}\n}\n","var Stream = (function (){\n try {\n return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify\n } catch(_){}\n}());\nexports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = Stream || exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n\nif (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) {\n module.exports = Stream;\n}\n","module.exports = require(\"./lib/_stream_writable.js\")\n","module.exports = require(\"./lib/_stream_duplex.js\")\n","module.exports = require(\"./lib/_stream_transform.js\")\n","module.exports = require(\"./lib/_stream_passthrough.js\")\n","'use strict';\n\nmodule.exports = Readable;\n\n/**/\nvar processNextTick = require('process-nextick-args');\n/**/\n\n/**/\nvar isArray = require('isarray');\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream;\n(function () {\n try {\n Stream = require('st' + 'ream');\n } catch (_) {} finally {\n if (!Stream) Stream = require('events').EventEmitter;\n }\n})();\n/**/\n\nvar Buffer = require('buffer').Buffer;\n/**/\nvar bufferShim = require('buffer-shims');\n/**/\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\n/**/\nvar debugUtil = require('util');\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/**/\n\nvar BufferList = require('./internal/streams/BufferList');\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nfunction prependListener(emitter, event, fn) {\n if (typeof emitter.prependListener === 'function') {\n return emitter.prependListener(event, fn);\n } else {\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n }\n}\n\nvar Duplex;\nfunction ReadableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~ ~this.highWaterMark;\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // when piping, we only care about 'readable' events that happen\n // after read()ing all the bytes and not getting any pushback.\n this.ranOut = false;\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nvar Duplex;\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options && typeof options.read === 'function') this._read = options.read;\n\n Stream.call(this);\n}\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n\n if (!state.objectMode && typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = bufferShim.from(chunk, encoding);\n encoding = '';\n }\n }\n\n return readableAddChunk(this, state, chunk, encoding, false);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n var state = this._readableState;\n return readableAddChunk(this, state, chunk, '', true);\n};\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\nfunction readableAddChunk(stream, state, chunk, encoding, addToFront) {\n var er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (state.ended && !addToFront) {\n var e = new Error('stream.push() after EOF');\n stream.emit('error', e);\n } else if (state.endEmitted && addToFront) {\n var _e = new Error('stream.unshift() after end event');\n stream.emit('error', _e);\n } else {\n var skipAdd;\n if (state.decoder && !addToFront && !encoding) {\n chunk = state.decoder.write(chunk);\n skipAdd = !state.objectMode && chunk.length === 0;\n }\n\n if (!addToFront) state.reading = false;\n\n // Don't add to the buffer if we've decoded to an empty string chunk and\n // we're not in object mode\n if (!skipAdd) {\n // if we want the data now, just emit it.\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n }\n\n maybeReadMore(stream, state);\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n\n return needMoreData(state);\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction chunkInvalid(state, chunk) {\n var er = null;\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n processNextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : cleanup;\n if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable) {\n debug('onunpipe');\n if (readable === src) {\n cleanup();\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', cleanup);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var _i = 0; _i < len; _i++) {\n dests[_i].emit('unpipe', this);\n }return this;\n }\n\n // try to find the right one.\n var i = indexOf(state.pipes, dest);\n if (i === -1) return this;\n\n state.pipes.splice(i, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n processNextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this, state);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n processNextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var state = this._readableState;\n var paused = false;\n\n var self = this;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) self.push(chunk);\n }\n\n self.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = self.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n var events = ['error', 'close', 'destroy', 'pause', 'resume'];\n forEach(events, function (ev) {\n stream.on(ev, self.emit.bind(self, ev));\n });\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n self._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return self;\n};\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = bufferShim.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n processNextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}","// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/**/\nvar processNextTick = require('process-nextick-args');\n/**/\n\n/**/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream;\n(function () {\n try {\n Stream = require('st' + 'ream');\n } catch (_) {} finally {\n if (!Stream) Stream = require('events').EventEmitter;\n }\n})();\n/**/\n\nvar Buffer = require('buffer').Buffer;\n/**/\nvar bufferShim = require('buffer-shims');\n/**/\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\nvar Duplex;\nfunction WritableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~ ~this.highWaterMark;\n\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function writableStateGetBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')\n });\n } catch (_) {}\n})();\n\nvar Duplex;\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, though they're not\n // instanceof Writable, they're instanceof Readable.\n if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n processNextTick(cb, er);\n}\n\n// If we get something that is not a buffer, string, null, or undefined,\n// and we're not in objectMode, then that's an error.\n// Otherwise stream chunks are all considered to be of length=1, and the\n// watermarks determine how many objects to keep in the buffer, rather than\n// how many bytes or characters.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n // Always throw error if a null is written\n // if we are not in object mode then throw\n // if it is not a buffer, string, or undefined.\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = bufferShim.from(chunk, encoding);\n }\n return chunk;\n}\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, chunk, encoding, cb) {\n chunk = decodeChunk(state, chunk, encoding);\n\n if (Buffer.isBuffer(chunk)) encoding = 'buffer';\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) processNextTick(cb, er);else cb(er);\n\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /**/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /**/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished) {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n if (state.pendingcb === 0) {\n prefinish(stream, state);\n state.finished = true;\n stream.emit('finish');\n } else {\n prefinish(stream, state);\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) processNextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n\n this.finish = function (err) {\n var entry = _this.entry;\n _this.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = _this;\n } else {\n state.corkedRequestsFree = _this;\n }\n };\n}","// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/**/\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }return keys;\n};\n/**/\n\nmodule.exports = Duplex;\n\n/**/\nvar processNextTick = require('process-nextick-args');\n/**/\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\nvar keys = objectKeys(Writable.prototype);\nfor (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n processNextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}","// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(Transform, Duplex);\n\nfunction TransformState(stream) {\n this.afterTransform = function (er, data) {\n return afterTransform(stream, er, data);\n };\n\n this.needTransform = false;\n this.transforming = false;\n this.writecb = null;\n this.writechunk = null;\n this.writeencoding = null;\n}\n\nfunction afterTransform(stream, er, data) {\n var ts = stream._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data !== null && data !== undefined) stream.push(data);\n\n cb(er);\n\n var rs = stream._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n stream._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = new TransformState(this);\n\n // when the writable side finishes, then flush out anything remaining.\n var stream = this;\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n this.once('prefinish', function () {\n if (typeof this._flush === 'function') this._flush(function (er) {\n done(stream, er);\n });else done(stream);\n });\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('Not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nfunction done(stream, er) {\n if (er) return stream.emit('error', er);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n var ws = stream._writableState;\n var ts = stream._transformState;\n\n if (ws.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (ts.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n}","// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nmodule.exports = require('../modules/_core').Promise;","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.get-iterator');","'use strict';\n\nvar Buffer = require('buffer').Buffer;\n/**/\nvar bufferShim = require('buffer-shims');\n/**/\n\nmodule.exports = BufferList;\n\nfunction BufferList() {\n this.head = null;\n this.tail = null;\n this.length = 0;\n}\n\nBufferList.prototype.push = function (v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n};\n\nBufferList.prototype.unshift = function (v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n};\n\nBufferList.prototype.shift = function () {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n};\n\nBufferList.prototype.clear = function () {\n this.head = this.tail = null;\n this.length = 0;\n};\n\nBufferList.prototype.join = function (s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n};\n\nBufferList.prototype.concat = function (n) {\n if (this.length === 0) return bufferShim.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = bufferShim.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n p.data.copy(ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n};","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.is-iterable');","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function(iterated){\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , index = this._i\n , point;\n if(index >= O.length)return {value: undefined, done: true};\n point = $at(O, index);\n this._i += point.length;\n return {value: point, done: false};\n});","require('./es6.array.iterator');\nvar global = require('./_global')\n , hide = require('./_hide')\n , Iterators = require('./_iterators')\n , TO_STRING_TAG = require('./_wks')('toStringTag');\n\nfor(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){\n var NAME = collections[i]\n , Collection = global[NAME]\n , proto = Collection && Collection.prototype;\n if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}","'use strict';\nvar LIBRARY = require('./_library')\n , global = require('./_global')\n , ctx = require('./_ctx')\n , classof = require('./_classof')\n , $export = require('./_export')\n , isObject = require('./_is-object')\n , aFunction = require('./_a-function')\n , anInstance = require('./_an-instance')\n , forOf = require('./_for-of')\n , speciesConstructor = require('./_species-constructor')\n , task = require('./_task').set\n , microtask = require('./_microtask')()\n , PROMISE = 'Promise'\n , TypeError = global.TypeError\n , process = global.process\n , $Promise = global[PROMISE]\n , process = global.process\n , isNode = classof(process) == 'process'\n , empty = function(){ /* empty */ }\n , Internal, GenericPromiseCapability, Wrapper;\n\nvar USE_NATIVE = !!function(){\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1)\n , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;\n } catch(e){ /* empty */ }\n}();\n\n// helpers\nvar sameConstructor = function(a, b){\n // with library wrapper special case\n return a === b || a === $Promise && b === Wrapper;\n};\nvar isThenable = function(it){\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar newPromiseCapability = function(C){\n return sameConstructor($Promise, C)\n ? new PromiseCapability(C)\n : new GenericPromiseCapability(C);\n};\nvar PromiseCapability = GenericPromiseCapability = function(C){\n var resolve, reject;\n this.promise = new C(function($$resolve, $$reject){\n if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\nvar perform = function(exec){\n try {\n exec();\n } catch(e){\n return {error: e};\n }\n};\nvar notify = function(promise, isReject){\n if(promise._n)return;\n promise._n = true;\n var chain = promise._c;\n microtask(function(){\n var value = promise._v\n , ok = promise._s == 1\n , i = 0;\n var run = function(reaction){\n var handler = ok ? reaction.ok : reaction.fail\n , resolve = reaction.resolve\n , reject = reaction.reject\n , domain = reaction.domain\n , result, then;\n try {\n if(handler){\n if(!ok){\n if(promise._h == 2)onHandleUnhandled(promise);\n promise._h = 1;\n }\n if(handler === true)result = value;\n else {\n if(domain)domain.enter();\n result = handler(value);\n if(domain)domain.exit();\n }\n if(result === reaction.promise){\n reject(TypeError('Promise-chain cycle'));\n } else if(then = isThenable(result)){\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch(e){\n reject(e);\n }\n };\n while(chain.length > i)run(chain[i++]); // variable length - can't use forEach\n promise._c = [];\n promise._n = false;\n if(isReject && !promise._h)onUnhandled(promise);\n });\n};\nvar onUnhandled = function(promise){\n task.call(global, function(){\n var value = promise._v\n , abrupt, handler, console;\n if(isUnhandled(promise)){\n abrupt = perform(function(){\n if(isNode){\n process.emit('unhandledRejection', value, promise);\n } else if(handler = global.onunhandledrejection){\n handler({promise: promise, reason: value});\n } else if((console = global.console) && console.error){\n console.error('Unhandled promise rejection', value);\n }\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n promise._h = isNode || isUnhandled(promise) ? 2 : 1;\n } promise._a = undefined;\n if(abrupt)throw abrupt.error;\n });\n};\nvar isUnhandled = function(promise){\n if(promise._h == 1)return false;\n var chain = promise._a || promise._c\n , i = 0\n , reaction;\n while(chain.length > i){\n reaction = chain[i++];\n if(reaction.fail || !isUnhandled(reaction.promise))return false;\n } return true;\n};\nvar onHandleUnhandled = function(promise){\n task.call(global, function(){\n var handler;\n if(isNode){\n process.emit('rejectionHandled', promise);\n } else if(handler = global.onrejectionhandled){\n handler({promise: promise, reason: promise._v});\n }\n });\n};\nvar $reject = function(value){\n var promise = this;\n if(promise._d)return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n promise._v = value;\n promise._s = 2;\n if(!promise._a)promise._a = promise._c.slice();\n notify(promise, true);\n};\nvar $resolve = function(value){\n var promise = this\n , then;\n if(promise._d)return;\n promise._d = true;\n promise = promise._w || promise; // unwrap\n try {\n if(promise === value)throw TypeError(\"Promise can't be resolved itself\");\n if(then = isThenable(value)){\n microtask(function(){\n var wrapper = {_w: promise, _d: false}; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch(e){\n $reject.call(wrapper, e);\n }\n });\n } else {\n promise._v = value;\n promise._s = 1;\n notify(promise, false);\n }\n } catch(e){\n $reject.call({_w: promise, _d: false}, e); // wrap\n }\n};\n\n// constructor polyfill\nif(!USE_NATIVE){\n // 25.4.3.1 Promise(executor)\n $Promise = function Promise(executor){\n anInstance(this, $Promise, PROMISE, '_h');\n aFunction(executor);\n Internal.call(this);\n try {\n executor(ctx($resolve, this, 1), ctx($reject, this, 1));\n } catch(err){\n $reject.call(this, err);\n }\n };\n Internal = function Promise(executor){\n this._c = []; // <- awaiting reactions\n this._a = undefined; // <- checked in isUnhandled reactions\n this._s = 0; // <- state\n this._d = false; // <- done\n this._v = undefined; // <- value\n this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled\n this._n = false; // <- notify\n };\n Internal.prototype = require('./_redefine-all')($Promise.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected){\n var reaction = newPromiseCapability(speciesConstructor(this, $Promise));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = isNode ? process.domain : undefined;\n this._c.push(reaction);\n if(this._a)this._a.push(reaction);\n if(this._s)notify(this, false);\n return reaction.promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function(onRejected){\n return this.then(undefined, onRejected);\n }\n });\n PromiseCapability = function(){\n var promise = new Internal;\n this.promise = promise;\n this.resolve = ctx($resolve, promise, 1);\n this.reject = ctx($reject, promise, 1);\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});\nrequire('./_set-to-string-tag')($Promise, PROMISE);\nrequire('./_set-species')(PROMISE);\nWrapper = require('./_core')[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r){\n var capability = newPromiseCapability(this)\n , $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x){\n // instanceof instead of internal slot check because we should fix it without replacement native Promise core\n if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;\n var capability = newPromiseCapability(this)\n , $$resolve = capability.resolve;\n $$resolve(x);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){\n $Promise.all(iter)['catch'](empty);\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable){\n var C = this\n , capability = newPromiseCapability(C)\n , resolve = capability.resolve\n , reject = capability.reject;\n var abrupt = perform(function(){\n var values = []\n , index = 0\n , remaining = 1;\n forOf(iterable, false, function(promise){\n var $index = index++\n , alreadyCalled = false;\n values.push(undefined);\n remaining++;\n C.resolve(promise).then(function(value){\n if(alreadyCalled)return;\n alreadyCalled = true;\n values[$index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable){\n var C = this\n , capability = newPromiseCapability(C)\n , reject = capability.reject;\n var abrupt = perform(function(){\n forOf(iterable, false, function(promise){\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n }\n});","var core = module.exports = {version: '2.4.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef","var anObject = require('./_an-object')\n , get = require('./core.get-iterator-method');\nmodule.exports = require('./_core').getIterator = function(it){\n var iterFn = get(it);\n if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');\n return anObject(iterFn.call(it));\n};","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nrequire('../../modules/es7.symbol.async-iterator');\nrequire('../../modules/es7.symbol.observable');\nmodule.exports = require('../../modules/_core').Symbol;","'use strict';\n\nvar buffer = require('buffer');\nvar Buffer = buffer.Buffer;\nvar SlowBuffer = buffer.SlowBuffer;\nvar MAX_LEN = buffer.kMaxLength || 2147483647;\nexports.alloc = function alloc(size, fill, encoding) {\n if (typeof Buffer.alloc === 'function') {\n return Buffer.alloc(size, fill, encoding);\n }\n if (typeof encoding === 'number') {\n throw new TypeError('encoding must not be number');\n }\n if (typeof size !== 'number') {\n throw new TypeError('size must be a number');\n }\n if (size > MAX_LEN) {\n throw new RangeError('size is too large');\n }\n var enc = encoding;\n var _fill = fill;\n if (_fill === undefined) {\n enc = undefined;\n _fill = 0;\n }\n var buf = new Buffer(size);\n if (typeof _fill === 'string') {\n var fillBuf = new Buffer(_fill, enc);\n var flen = fillBuf.length;\n var i = -1;\n while (++i < size) {\n buf[i] = fillBuf[i % flen];\n }\n } else {\n buf.fill(_fill);\n }\n return buf;\n}\nexports.allocUnsafe = function allocUnsafe(size) {\n if (typeof Buffer.allocUnsafe === 'function') {\n return Buffer.allocUnsafe(size);\n }\n if (typeof size !== 'number') {\n throw new TypeError('size must be a number');\n }\n if (size > MAX_LEN) {\n throw new RangeError('size is too large');\n }\n return new Buffer(size);\n}\nexports.from = function from(value, encodingOrOffset, length) {\n if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) {\n return Buffer.from(value, encodingOrOffset, length);\n }\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number');\n }\n if (typeof value === 'string') {\n return new Buffer(value, encodingOrOffset);\n }\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n var offset = encodingOrOffset;\n if (arguments.length === 1) {\n return new Buffer(value);\n }\n if (typeof offset === 'undefined') {\n offset = 0;\n }\n var len = length;\n if (typeof len === 'undefined') {\n len = value.byteLength - offset;\n }\n if (offset >= value.byteLength) {\n throw new RangeError('\\'offset\\' is out of bounds');\n }\n if (len > value.byteLength - offset) {\n throw new RangeError('\\'length\\' is out of bounds');\n }\n return new Buffer(value.slice(offset, offset + len));\n }\n if (Buffer.isBuffer(value)) {\n var out = new Buffer(value.length);\n value.copy(out, 0, 0, value.length);\n return out;\n }\n if (value) {\n if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) {\n return new Buffer(value);\n }\n if (value.type === 'Buffer' && Array.isArray(value.data)) {\n return new Buffer(value.data);\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.');\n}\nexports.allocUnsafeSlow = function allocUnsafeSlow(size) {\n if (typeof Buffer.allocUnsafeSlow === 'function') {\n return Buffer.allocUnsafeSlow(size);\n }\n if (typeof size !== 'number') {\n throw new TypeError('size must be a number');\n }\n if (size >= MAX_LEN) {\n throw new RangeError('size is too large');\n }\n return new SlowBuffer(size);\n}\n","'use strict';\n\nif (!process.version ||\n process.version.indexOf('v0.') === 0 ||\n process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = nextTick;\n} else {\n module.exports = process.nextTick;\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n var len = arguments.length;\n var args, i;\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n default:\n args = new Array(len - 1);\n i = 0;\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}\n","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n","var classof = require('./_classof')\n , ITERATOR = require('./_wks')('iterator')\n , Iterators = require('./_iterators');\nmodule.exports = require('./_core').isIterable = function(it){\n var O = Object(it);\n return O[ITERATOR] !== undefined\n || '@@iterator' in O\n || Iterators.hasOwnProperty(classof(O));\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n","var toInteger = require('./_to-integer')\n , defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function(TO_STRING){\n return function(that, pos){\n var s = String(defined(that))\n , i = toInteger(pos)\n , l = s.length\n , a, b;\n if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};","'use strict';\nvar LIBRARY = require('./_library')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , hide = require('./_hide')\n , has = require('./_has')\n , Iterators = require('./_iterators')\n , $iterCreate = require('./_iter-create')\n , setToStringTag = require('./_set-to-string-tag')\n , getPrototypeOf = require('./_object-gpo')\n , ITERATOR = require('./_wks')('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined\n , $anyNative = NAME == 'Array' ? proto.entries || $native : $native\n , methods, key, IteratorPrototype;\n // Fix native\n if($anyNative){\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base));\n if(IteratorPrototype !== Object.prototype){\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables')\n , step = require('./_iter-step')\n , Iterators = require('./_iterators')\n , toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef","var dP = require('./_object-dp')\n , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};","module.exports = {};","var store = require('./_shared')('wks')\n , uid = require('./_uid')\n , Symbol = require('./_global').Symbol\n , USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function(name){\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;","module.exports = true;","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof')\n , TAG = require('./_wks')('toStringTag')\n // ES3 wrong here\n , ARG = cof(function(){ return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function(it, key){\n try {\n return it[key];\n } catch(e){ /* empty */ }\n};\n\nmodule.exports = function(it){\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};","var global = require('./_global')\n , core = require('./_core')\n , ctx = require('./_ctx')\n , hide = require('./_hide')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , expProto = exports[PROTOTYPE]\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(a, b, c){\n if(this instanceof C){\n switch(arguments.length){\n case 0: return new C;\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if(IS_PROTO){\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};","module.exports = function(it, Constructor, name, forbiddenField){\n if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};","var ctx = require('./_ctx')\n , call = require('./_iter-call')\n , isArrayIter = require('./_is-array-iter')\n , anObject = require('./_an-object')\n , toLength = require('./_to-length')\n , getIterFn = require('./core.get-iterator-method')\n , BREAK = {}\n , RETURN = {};\nvar exports = module.exports = function(iterable, entries, fn, that, ITERATOR){\n var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)\n , f = ctx(fn, that, entries ? 2 : 1)\n , index = 0\n , length, step, iterator, result;\n if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if(result === BREAK || result === RETURN)return result;\n } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){\n result = call(iterator, f, step.value, entries);\n if(result === BREAK || result === RETURN)return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object')\n , aFunction = require('./_a-function')\n , SPECIES = require('./_wks')('species');\nmodule.exports = function(O, D){\n var C = anObject(O).constructor, S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};","var global = require('./_global')\n , macrotask = require('./_task').set\n , Observer = global.MutationObserver || global.WebKitMutationObserver\n , process = global.process\n , Promise = global.Promise\n , isNode = require('./_cof')(process) == 'process';\n\nmodule.exports = function(){\n var head, last, notify;\n\n var flush = function(){\n var parent, fn;\n if(isNode && (parent = process.domain))parent.exit();\n while(head){\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch(e){\n if(head)notify();\n else last = undefined;\n throw e;\n }\n } last = undefined;\n if(parent)parent.enter();\n };\n\n // Node.js\n if(isNode){\n notify = function(){\n process.nextTick(flush);\n };\n // browsers with MutationObserver\n } else if(Observer){\n var toggle = true\n , node = document.createTextNode('');\n new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new\n notify = function(){\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if(Promise && Promise.resolve){\n var promise = Promise.resolve();\n notify = function(){\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function(){\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n\n return function(fn){\n var task = {fn: fn, next: undefined};\n if(last)last.next = task;\n if(!head){\n head = task;\n notify();\n } last = task;\n };\n};","var ctx = require('./_ctx')\n , invoke = require('./_invoke')\n , html = require('./_html')\n , cel = require('./_dom-create')\n , global = require('./_global')\n , process = global.process\n , setTask = global.setImmediate\n , clearTask = global.clearImmediate\n , MessageChannel = global.MessageChannel\n , counter = 0\n , queue = {}\n , ONREADYSTATECHANGE = 'onreadystatechange'\n , defer, channel, port;\nvar run = function(){\n var id = +this;\n if(queue.hasOwnProperty(id)){\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listener = function(event){\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n setTask = function setImmediate(fn){\n var args = [], i = 1;\n while(arguments.length > i)args.push(arguments[i++]);\n queue[++counter] = function(){\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id){\n delete queue[id];\n };\n // Node.js 0.8-\n if(require('./_cof')(process) == 'process'){\n defer = function(id){\n process.nextTick(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if(MessageChannel){\n channel = new MessageChannel;\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n defer = function(id){\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listener, false);\n // IE8-\n } else if(ONREADYSTATECHANGE in cel('script')){\n defer = function(id){\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function(id){\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};","var hide = require('./_hide');\nmodule.exports = function(target, src, safe){\n for(var key in src){\n if(safe && target[key])target[key] = src[key];\n else hide(target, key, src[key]);\n } return target;\n};","var def = require('./_object-dp').f\n , has = require('./_has')\n , TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};","'use strict';\nvar global = require('./_global')\n , core = require('./_core')\n , dP = require('./_object-dp')\n , DESCRIPTORS = require('./_descriptors')\n , SPECIES = require('./_wks')('species');\n\nmodule.exports = function(KEY){\n var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];\n if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {\n configurable: true,\n get: function(){ return this; }\n });\n};","var ITERATOR = require('./_wks')('iterator')\n , SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function(){ SAFE_CLOSING = true; };\n Array.from(riter, function(){ throw 2; });\n} catch(e){ /* empty */ }\n\nmodule.exports = function(exec, skipClosing){\n if(!skipClosing && !SAFE_CLOSING)return false;\n var safe = false;\n try {\n var arr = [7]\n , iter = arr[ITERATOR]();\n iter.next = function(){ return {done: safe = true}; };\n arr[ITERATOR] = function(){ return iter; };\n exec(arr);\n } catch(e){ /* empty */ }\n return safe;\n};","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;","var isObject = require('./_is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};","var classof = require('./_classof')\n , ITERATOR = require('./_wks')('iterator')\n , Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function(it){\n if(it != undefined)return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar Buffer = require('buffer').Buffer;\n\nvar isBufferEncoding = Buffer.isEncoding\n || function(encoding) {\n switch (encoding && encoding.toLowerCase()) {\n case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;\n default: return false;\n }\n }\n\n\nfunction assertEncoding(encoding) {\n if (encoding && !isBufferEncoding(encoding)) {\n throw new Error('Unknown encoding: ' + encoding);\n }\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters. CESU-8 is handled as part of the UTF-8 encoding.\n//\n// @TODO Handling all encodings inside a single object makes it very difficult\n// to reason about this code, so it should be split up in the future.\n// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code\n// points as used by CESU-8.\nvar StringDecoder = exports.StringDecoder = function(encoding) {\n this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');\n assertEncoding(encoding);\n switch (this.encoding) {\n case 'utf8':\n // CESU-8 represents each of Surrogate Pair by 3-bytes\n this.surrogateSize = 3;\n break;\n case 'ucs2':\n case 'utf16le':\n // UTF-16 represents each of Surrogate Pair by 2-bytes\n this.surrogateSize = 2;\n this.detectIncompleteChar = utf16DetectIncompleteChar;\n break;\n case 'base64':\n // Base-64 stores 3 bytes in 4 chars, and pads the remainder.\n this.surrogateSize = 3;\n this.detectIncompleteChar = base64DetectIncompleteChar;\n break;\n default:\n this.write = passThroughWrite;\n return;\n }\n\n // Enough space to store all bytes of a single character. UTF-8 needs 4\n // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).\n this.charBuffer = new Buffer(6);\n // Number of bytes received for the current incomplete multi-byte character.\n this.charReceived = 0;\n // Number of bytes expected for the current incomplete multi-byte character.\n this.charLength = 0;\n};\n\n\n// write decodes the given buffer and returns it as JS string that is\n// guaranteed to not contain any partial multi-byte characters. Any partial\n// character found at the end of the buffer is buffered up, and will be\n// returned when calling write again with the remaining bytes.\n//\n// Note: Converting a Buffer containing an orphan surrogate to a String\n// currently works, but converting a String to a Buffer (via `new Buffer`, or\n// Buffer#write) will replace incomplete surrogates with the unicode\n// replacement character. See https://codereview.chromium.org/121173009/ .\nStringDecoder.prototype.write = function(buffer) {\n var charStr = '';\n // if our last write ended with an incomplete multibyte character\n while (this.charLength) {\n // determine how many remaining bytes this buffer has to offer for this char\n var available = (buffer.length >= this.charLength - this.charReceived) ?\n this.charLength - this.charReceived :\n buffer.length;\n\n // add the new bytes to the char buffer\n buffer.copy(this.charBuffer, this.charReceived, 0, available);\n this.charReceived += available;\n\n if (this.charReceived < this.charLength) {\n // still not enough chars in this buffer? wait for more ...\n return '';\n }\n\n // remove bytes belonging to the current character from the buffer\n buffer = buffer.slice(available, buffer.length);\n\n // get the character that was split\n charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);\n\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n var charCode = charStr.charCodeAt(charStr.length - 1);\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n this.charLength += this.surrogateSize;\n charStr = '';\n continue;\n }\n this.charReceived = this.charLength = 0;\n\n // if there are no more bytes in this buffer, just emit our char\n if (buffer.length === 0) {\n return charStr;\n }\n break;\n }\n\n // determine and set charLength / charReceived\n this.detectIncompleteChar(buffer);\n\n var end = buffer.length;\n if (this.charLength) {\n // buffer the incomplete character bytes we got\n buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);\n end -= this.charReceived;\n }\n\n charStr += buffer.toString(this.encoding, 0, end);\n\n var end = charStr.length - 1;\n var charCode = charStr.charCodeAt(end);\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n var size = this.surrogateSize;\n this.charLength += size;\n this.charReceived += size;\n this.charBuffer.copy(this.charBuffer, size, 0, size);\n buffer.copy(this.charBuffer, 0, 0, size);\n return charStr.substring(0, end);\n }\n\n // or just emit the charStr\n return charStr;\n};\n\n// detectIncompleteChar determines if there is an incomplete UTF-8 character at\n// the end of the given buffer. If so, it sets this.charLength to the byte\n// length that character, and sets this.charReceived to the number of bytes\n// that are available for this character.\nStringDecoder.prototype.detectIncompleteChar = function(buffer) {\n // determine how many bytes we have to check at the end of this buffer\n var i = (buffer.length >= 3) ? 3 : buffer.length;\n\n // Figure out if one of the last i bytes of our buffer announces an\n // incomplete char.\n for (; i > 0; i--) {\n var c = buffer[buffer.length - i];\n\n // See http://en.wikipedia.org/wiki/UTF-8#Description\n\n // 110XXXXX\n if (i == 1 && c >> 5 == 0x06) {\n this.charLength = 2;\n break;\n }\n\n // 1110XXXX\n if (i <= 2 && c >> 4 == 0x0E) {\n this.charLength = 3;\n break;\n }\n\n // 11110XXX\n if (i <= 3 && c >> 3 == 0x1E) {\n this.charLength = 4;\n break;\n }\n }\n this.charReceived = i;\n};\n\nStringDecoder.prototype.end = function(buffer) {\n var res = '';\n if (buffer && buffer.length)\n res = this.write(buffer);\n\n if (this.charReceived) {\n var cr = this.charReceived;\n var buf = this.charBuffer;\n var enc = this.encoding;\n res += buf.slice(0, cr).toString(enc);\n }\n\n return res;\n};\n\nfunction passThroughWrite(buffer) {\n return buffer.toString(this.encoding);\n}\n\nfunction utf16DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 2;\n this.charLength = this.charReceived ? 2 : 0;\n}\n\nfunction base64DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 3;\n this.charLength = this.charReceived ? 3 : 0;\n}\n","require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc){\n return $Object.defineProperty(it, key, desc);\n};","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global')\n , has = require('./_has')\n , DESCRIPTORS = require('./_descriptors')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , META = require('./_meta').KEY\n , $fails = require('./_fails')\n , shared = require('./_shared')\n , setToStringTag = require('./_set-to-string-tag')\n , uid = require('./_uid')\n , wks = require('./_wks')\n , wksExt = require('./_wks-ext')\n , wksDefine = require('./_wks-define')\n , keyOf = require('./_keyof')\n , enumKeys = require('./_enum-keys')\n , isArray = require('./_is-array')\n , anObject = require('./_an-object')\n , toIObject = require('./_to-iobject')\n , toPrimitive = require('./_to-primitive')\n , createDesc = require('./_property-desc')\n , _create = require('./_object-create')\n , gOPNExt = require('./_object-gopn-ext')\n , $GOPD = require('./_object-gopd')\n , $DP = require('./_object-dp')\n , $keys = require('./_object-keys')\n , gOPD = $GOPD.f\n , dP = $DP.f\n , gOPN = gOPNExt.f\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , PROTOTYPE = 'prototype'\n , HIDDEN = wks('_hidden')\n , TO_PRIMITIVE = wks('toPrimitive')\n , isEnum = {}.propertyIsEnumerable\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , OPSymbols = shared('op-symbols')\n , ObjectProto = Object[PROTOTYPE]\n , USE_NATIVE = typeof $Symbol == 'function'\n , QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n return _create(dP({}, 'a', {\n get: function(){ return dP(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = gOPD(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n dP(it, key, D);\n if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){\n return typeof it == 'symbol';\n} : function(it){\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(it === ObjectProto)$defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if(has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n it = toIObject(it);\n key = toPrimitive(key, true);\n if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;\n var D = gOPD(it, key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = gOPN(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var IS_OP = it === ObjectProto\n , names = gOPN(IS_OP ? OPSymbols : toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i){\n if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif(!USE_NATIVE){\n $Symbol = function Symbol(){\n if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function(value){\n if(this === ObjectProto)$set.call(OPSymbols, value);\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString(){\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if(DESCRIPTORS && !require('./_library')){\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function(name){\n return wrap(wks(name));\n }\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});\n\nfor(var symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);\n\nfor(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n if(isSymbol(key))return keyOf(SymbolRegistry, key);\n throw TypeError(key + ' is not a symbol!');\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it){\n if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n var args = [it]\n , i = 1\n , replacer, $replacer;\n while(arguments.length > i)args.push(arguments[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);","require('./_wks-define')('asyncIterator');","require('./_wks-define')('observable');","/*!\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","require('../../modules/es6.number.is-nan');\nmodule.exports = require('../../modules/_core').Number.isNaN;","require('../../modules/es6.object.get-prototype-of');\nmodule.exports = require('../../modules/_core').Object.getPrototypeOf;","require('../../modules/es7.object.entries');\nmodule.exports = require('../../modules/_core').Object.entries;","require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;","// 7.1.4 ToInteger\nvar ceil = Math.ceil\n , floor = Math.floor;\nmodule.exports = function(it){\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};","module.exports = require('./_hide');","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};","'use strict';\nvar create = require('./_object-create')\n , descriptor = require('./_property-desc')\n , setToStringTag = require('./_set-to-string-tag')\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});\n setToStringTag(Constructor, NAME + ' Iterator');\n};","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has')\n , toObject = require('./_to-object')\n , IE_PROTO = require('./_shared-key')('IE_PROTO')\n , ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function(O){\n O = toObject(O);\n if(has(O, IE_PROTO))return O[IE_PROTO];\n if(typeof O.constructor == 'function' && O instanceof O.constructor){\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};","module.exports = function(){ /* empty */ };","module.exports = function(done, value){\n return {value: value, done: !!done};\n};","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject')\n , defined = require('./_defined');\nmodule.exports = function(it){\n return IObject(defined(it));\n};","var anObject = require('./_an-object')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , toPrimitive = require('./_to-primitive')\n , dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if(IE8_DOM_DEFINE)try {\n return dP(O, P, Attributes);\n } catch(e){ /* empty */ }\n if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n if('value' in Attributes)O[P] = Attributes.value;\n return O;\n};","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});","var global = require('./_global')\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};","var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function(iterator, fn, value, entries){\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch(e){\n var ret = iterator['return'];\n if(ret !== undefined)anObject(ret.call(iterator));\n throw e;\n }\n};","// check on default Array iterator\nvar Iterators = require('./_iterators')\n , ITERATOR = require('./_wks')('iterator')\n , ArrayProto = Array.prototype;\n\nmodule.exports = function(it){\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer')\n , min = Math.min;\nmodule.exports = function(it){\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n var un = that === undefined;\n switch(args.length){\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};","var isObject = require('./_is-object')\n , document = require('./_global').document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};","module.exports = require('./_global').document && document.documentElement;","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')});","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/_core').Object.setPrototypeOf;","require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D){\n return $Object.create(P, D);\n};","var META = require('./_uid')('meta')\n , isObject = require('./_is-object')\n , has = require('./_has')\n , setDesc = require('./_object-dp').f\n , id = 0;\nvar isExtensible = Object.isExtensible || function(){\n return true;\n};\nvar FREEZE = !require('./_fails')(function(){\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function(it){\n setDesc(it, META, {value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n }});\n};\nvar fastKey = function(it, create){\n // return primitive with prefix\n if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return 'F';\n // not necessary to add metadata\n if(!create)return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function(it, create){\n if(!has(it, META)){\n // can't set metadata to uncaught frozen object\n if(!isExtensible(it))return true;\n // not necessary to add metadata\n if(!create)return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function(it){\n if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};","exports.f = require('./_wks');","var global = require('./_global')\n , core = require('./_core')\n , LIBRARY = require('./_library')\n , wksExt = require('./_wks-ext')\n , defineProperty = require('./_object-dp').f;\nmodule.exports = function(name){\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});\n};","var getKeys = require('./_object-keys')\n , toIObject = require('./_to-iobject');\nmodule.exports = function(object, el){\n var O = toIObject(object)\n , keys = getKeys(O)\n , length = keys.length\n , index = 0\n , key;\n while(length > index)if(O[key = keys[index++]] === el)return key;\n};","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys')\n , gOPS = require('./_object-gops')\n , pIE = require('./_object-pie');\nmodule.exports = function(it){\n var result = getKeys(it)\n , getSymbols = gOPS.f;\n if(getSymbols){\n var symbols = getSymbols(it)\n , isEnum = pIE.f\n , i = 0\n , key;\n while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);\n } return result;\n};","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg){\n return cof(arg) == 'Array';\n};","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n if(!isObject(it))return it;\n var fn, val;\n if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object')\n , dPs = require('./_object-dps')\n , enumBugKeys = require('./_enum-bug-keys')\n , IE_PROTO = require('./_shared-key')('IE_PROTO')\n , Empty = function(){ /* empty */ }\n , PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function(){\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe')\n , i = enumBugKeys.length\n , lt = '<'\n , gt = '>'\n , iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties){\n var result;\n if(O !== null){\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty;\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject')\n , gOPN = require('./_object-gopn').f\n , toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return gOPN(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it){\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n","var pIE = require('./_object-pie')\n , createDesc = require('./_property-desc')\n , toIObject = require('./_to-iobject')\n , toPrimitive = require('./_to-primitive')\n , has = require('./_has')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){\n O = toIObject(O);\n P = toPrimitive(P, true);\n if(IE8_DOM_DEFINE)try {\n return gOPD(O, P);\n } catch(e){ /* empty */ }\n if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);\n};","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal')\n , enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O){\n return $keys(O, enumBugKeys);\n};","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal')\n , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){\n return $keys(O, hiddenKeys);\n};","exports.f = {}.propertyIsEnumerable;","exports.f = Object.getOwnPropertySymbols;","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f});","// 20.1.2.4 Number.isNaN(number)\nvar $export = require('./_export');\n\n$export($export.S, 'Number', {\n isNaN: function isNaN(number){\n return number != number;\n }\n});","// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = require('./_to-object')\n , $getPrototypeOf = require('./_object-gpo');\n\nrequire('./_object-sap')('getPrototypeOf', function(){\n return function getPrototypeOf(it){\n return $getPrototypeOf(toObject(it));\n };\n});","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export')\n , $entries = require('./_object-to-array')(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it){\n return $entries(it);\n }\n});","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object')\n , $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function(){\n return function keys(it){\n return $keys(toObject(it));\n };\n});","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function(it){\n return Object(defined(it));\n};","var shared = require('./_shared')('keys')\n , uid = require('./_uid');\nmodule.exports = function(key){\n return shared[key] || (shared[key] = uid(key));\n};","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};","module.exports = !require('./_descriptors') && !require('./_fails')(function(){\n return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;\n});","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys')\n , gOPS = require('./_object-gops')\n , pIE = require('./_object-pie')\n , toObject = require('./_to-object')\n , IObject = require('./_iobject')\n , $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function(){\n var A = {}\n , B = {}\n , S = Symbol()\n , K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function(k){ B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source){ // eslint-disable-line no-unused-vars\n var T = toObject(target)\n , aLen = arguments.length\n , index = 1\n , getSymbols = gOPS.f\n , isEnum = pIE.f;\n while(aLen > index){\n var S = IObject(arguments[index++])\n , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)\n , length = keys.length\n , j = 0\n , key;\n while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];\n } return T;\n} : $assign;","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set});","var $export = require('./_export')\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', {create: require('./_object-create')});","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');","var dP = require('./_object-dp')\n , anObject = require('./_an-object')\n , getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties){\n anObject(O);\n var keys = getKeys(Properties)\n , length = keys.length\n , i = 0\n , P;\n while(length > i)dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};","var has = require('./_has')\n , toIObject = require('./_to-iobject')\n , arrayIndexOf = require('./_array-includes')(false)\n , IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function(object, names){\n var O = toIObject(object)\n , i = 0\n , result = []\n , key;\n for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while(names.length > i)if(has(O, key = names[i++])){\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export')\n , core = require('./_core')\n , fails = require('./_fails');\nmodule.exports = function(KEY, exec){\n var fn = (core.Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\n};","var getKeys = require('./_object-keys')\n , toIObject = require('./_to-iobject')\n , isEnum = require('./_object-pie').f;\nmodule.exports = function(isEntries){\n return function(it){\n var O = toIObject(it)\n , keys = getKeys(O)\n , length = keys.length\n , i = 0\n , result = []\n , key;\n while(length > i)if(isEnum.call(O, key = keys[i++])){\n result.push(isEntries ? [key, O[key]] : O[key]);\n } return result;\n };\n};","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object')\n , anObject = require('./_an-object');\nvar check = function(O, proto){\n anObject(O);\n if(!isObject(proto) && proto !== null)throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function(test, buggy, set){\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch(e){ buggy = true; }\n return function setPrototypeOf(O, proto){\n check(O, proto);\n if(buggy)O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject')\n , toLength = require('./_to-length')\n , toIndex = require('./_to-index');\nmodule.exports = function(IS_INCLUDES){\n return function($this, el, fromIndex){\n var O = toIObject($this)\n , length = toLength(O.length)\n , index = toIndex(fromIndex, length)\n , value;\n // Array#includes uses SameValueZero equality algorithm\n if(IS_INCLUDES && el != el)while(length > index){\n value = O[index++];\n if(value != value)return true;\n // Array#toIndex ignores holes, Array#includes - not\n } else for(;length > index; index++)if(IS_INCLUDES || index in O){\n if(O[index] === el)return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};","var toInteger = require('./_to-integer')\n , max = Math.max\n , min = Math.min;\nmodule.exports = function(index, length){\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};"]}
\ No newline at end of file
diff --git a/docs/api.md b/docs/api.md
index 4a3d034..a13fdf1 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -2,7 +2,7 @@
# Particle
-[src/Particle.js:17-536](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L17-L536 "Source code on GitHub")
+[src/Particle.js:17-547](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L17-L547 "Source code on GitHub")
Particle Cloud API wrapper.
@@ -14,7 +14,7 @@ Most Particle methods take a single unnamed argument object documented as
## constructor
-[src/Particle.js:25-28](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L25-L28 "Source code on GitHub")
+[src/Particle.js:25-28](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L25-L28 "Source code on GitHub")
Contructor for the Cloud API wrapper.
@@ -26,7 +26,7 @@ Create a new Particle object and call methods below on it.
## login
-[src/Particle.js:37-46](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L37-L46 "Source code on GitHub")
+[src/Particle.js:37-46](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L37-L46 "Source code on GitHub")
Login to Particle Cloud using an existing Particle acccount.
@@ -41,7 +41,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## createUser
-[src/Particle.js:54-58](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L54-L58 "Source code on GitHub")
+[src/Particle.js:54-58](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L54-L58 "Source code on GitHub")
Create a user account for the Particle Cloud
@@ -55,7 +55,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## resetPassword
-[src/Particle.js:65-67](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L65-L67 "Source code on GitHub")
+[src/Particle.js:65-67](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L65-L67 "Source code on GitHub")
Send reset password email for a Particle Cloud user account
@@ -68,7 +68,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## removeAccessToken
-[src/Particle.js:76-80](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L76-L80 "Source code on GitHub")
+[src/Particle.js:76-80](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L76-L80 "Source code on GitHub")
Revoke an access token
@@ -83,7 +83,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## listAccessTokens
-[src/Particle.js:88-90](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L88-L90 "Source code on GitHub")
+[src/Particle.js:88-90](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L88-L90 "Source code on GitHub")
List all valid access tokens for a Particle Cloud account
@@ -97,7 +97,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## listDevices
-[src/Particle.js:97-99](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L97-L99 "Source code on GitHub")
+[src/Particle.js:97-99](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L97-L99 "Source code on GitHub")
List devices claimed to the account
@@ -110,7 +110,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## getDevice
-[src/Particle.js:107-109](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L107-L109 "Source code on GitHub")
+[src/Particle.js:107-109](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L107-L109 "Source code on GitHub")
Get detailed informationa about a device
@@ -124,7 +124,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## claimDevice
-[src/Particle.js:117-122](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L117-L122 "Source code on GitHub")
+[src/Particle.js:117-122](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L117-L122 "Source code on GitHub")
Claim a device to the account. The device must be online and unclaimed.
@@ -139,7 +139,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## removeDevice
-[src/Particle.js:130-132](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L130-L132 "Source code on GitHub")
+[src/Particle.js:130-132](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L130-L132 "Source code on GitHub")
Unclaim / Remove a device from your account
@@ -153,7 +153,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## renameDevice
-[src/Particle.js:141-143](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L141-L143 "Source code on GitHub")
+[src/Particle.js:141-143](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L141-L143 "Source code on GitHub")
Rename a device
@@ -168,7 +168,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## getClaimCode
-[src/Particle.js:151-153](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L151-L153 "Source code on GitHub")
+[src/Particle.js:151-153](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L151-L153 "Source code on GitHub")
Generate a claim code to use in the device claiming process.
@@ -182,7 +182,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## getVariable
-[src/Particle.js:173-175](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L173-L175 "Source code on GitHub")
+[src/Particle.js:173-175](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L173-L175 "Source code on GitHub")
Get the value of a device variable
@@ -197,7 +197,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## signalDevice
-[src/Particle.js:184-188](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L184-L188 "Source code on GitHub")
+[src/Particle.js:184-188](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L184-L188 "Source code on GitHub")
Instruct the device to turn on/off the LED in a rainbow pattern
@@ -212,7 +212,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## flashDevice
-[src/Particle.js:198-207](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L198-L207 "Source code on GitHub")
+[src/Particle.js:198-207](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L198-L207 "Source code on GitHub")
Compile and flash application firmware to a device
@@ -228,7 +228,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## flashTinker
-[src/Particle.js:215-219](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L215-L219 "Source code on GitHub")
+[src/Particle.js:215-219](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L215-L219 "Source code on GitHub")
Flash the Tinker application to a device
@@ -242,7 +242,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## compileCode
-[src/Particle.js:229-238](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L229-L238 "Source code on GitHub")
+[src/Particle.js:229-238](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L229-L238 "Source code on GitHub")
Compile firmware using the Particle Cloud
@@ -258,7 +258,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## downloadFirmwareBinary
-[src/Particle.js:246-255](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L246-L255 "Source code on GitHub")
+[src/Particle.js:246-255](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L246-L255 "Source code on GitHub")
Download a firmware binary
@@ -272,7 +272,7 @@ Returns **[Request](https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_A
## sendPublicKey
-[src/Particle.js:265-273](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L265-L273 "Source code on GitHub")
+[src/Particle.js:265-273](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L265-L273 "Source code on GitHub")
Send a new device public key to the Particle Cloud
@@ -288,7 +288,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## callFunction
-[src/Particle.js:283-287](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L283-L287 "Source code on GitHub")
+[src/Particle.js:283-287](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L283-L287 "Source code on GitHub")
Call a device function
@@ -304,7 +304,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## getEventStream
-[src/Particle.js:299-323](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L299-L323 "Source code on GitHub")
+[src/Particle.js:299-323](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L299-L323 "Source code on GitHub")
Get a stream of events
@@ -322,7 +322,7 @@ emit 'event' events, as well as the specific named event.
## publishEvent
-[src/Particle.js:333-339](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L333-L339 "Source code on GitHub")
+[src/Particle.js:333-339](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L333-L339 "Source code on GitHub")
Publish a event to the Particle Cloud
@@ -338,7 +338,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## createWebhook
-[src/Particle.js:358-366](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L358-L366 "Source code on GitHub")
+[src/Particle.js:358-366](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L358-L366 "Source code on GitHub")
Create a webhook
@@ -363,7 +363,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## deleteWebhook
-[src/Particle.js:374-376](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L374-L376 "Source code on GitHub")
+[src/Particle.js:374-376](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L374-L376 "Source code on GitHub")
Delete a webhook
@@ -377,7 +377,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## listWebhooks
-[src/Particle.js:383-385](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L383-L385 "Source code on GitHub")
+[src/Particle.js:383-385](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L383-L385 "Source code on GitHub")
List all webhooks owned by the account
@@ -390,7 +390,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## getUserInfo
-[src/Particle.js:392-394](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L392-L394 "Source code on GitHub")
+[src/Particle.js:392-394](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L392-L394 "Source code on GitHub")
Get details about the current user
@@ -403,7 +403,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## listBuildTargets
-[src/Particle.js:420-426](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L420-L426 "Source code on GitHub")
+[src/Particle.js:420-426](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L420-L426 "Source code on GitHub")
List valid build targets to be used for compiling
@@ -417,7 +417,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## listLibraries
-[src/Particle.js:439-448](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L439-L448 "Source code on GitHub")
+[src/Particle.js:439-448](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L439-L448 "Source code on GitHub")
List firmware libraries
@@ -436,7 +436,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## getLibrary
-[src/Particle.js:457-459](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L457-L459 "Source code on GitHub")
+[src/Particle.js:457-459](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L457-L459 "Source code on GitHub")
Get firmware library details
@@ -451,7 +451,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## getLibraryVersions
-[src/Particle.js:469-474](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L469-L474 "Source code on GitHub")
+[src/Particle.js:469-474](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L469-L474 "Source code on GitHub")
Firmware library details for each version
@@ -467,7 +467,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
## publishLibrary
-[src/Particle.js:482-489](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L482-L489 "Source code on GitHub")
+[src/Particle.js:482-489](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L482-L489 "Source code on GitHub")
Publish a new library version int the compressed archive
@@ -479,9 +479,24 @@ Publish a new library version int the compressed archive
Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
+## deleteLibrary
+
+[src/Particle.js:498-500](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L498-L500 "Source code on GitHub")
+
+Delete one version of a library or an entire published library
+
+**Parameters**
+
+- `$0` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
+ - `$0.auth` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Access Token
+ - `$0.name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the library to delete
+ - `$0.force` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to force deleting a public library
+
+Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
+
## downloadFile
-[src/Particle.js:496-507](https://github.com/spark/particle-api-js/blob/ee3da4efce4df23d1de044bafaf0f3d7a36cb6e2/src/Particle.js#L496-L507 "Source code on GitHub")
+[src/Particle.js:507-518](https://github.com/spark/particle-api-js/blob/f26e9bac9e14a87a77da673d0a185fc72d4f2616/src/Particle.js#L507-L518 "Source code on GitHub")
Download an external file that may not be on the API
diff --git a/package.json b/package.json
index a74ed3c..d168f27 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "particle-api-js",
- "version": "6.0.5",
+ "version": "6.0.6",
"description": "Particle API Client",
"main": "lib/Particle.js",
"scripts": {