diff --git a/dist/particle.min.js b/dist/particle.min.js index 036cba6..621cbcd 100644 --- a/dist/particle.min.js +++ b/dist/particle.min.js @@ -9,7 +9,7 @@ },{"babel-runtime/core-js/object/get-prototype-of":14,"babel-runtime/core-js/promise":17,"babel-runtime/helpers/classCallCheck":20,"babel-runtime/helpers/createClass":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/possibleConstructorReturn":23,"events":136,"http":145,"https":145,"url":176}],5:[function(require,module,exports){ "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var _promise=require("babel-runtime/core-js/promise"),_promise2=_interopRequireDefault(_promise),_assign=require("babel-runtime/core-js/object/assign"),_assign2=_interopRequireDefault(_assign),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),Library=function(){function e(r,t){(0,_classCallCheck3.default)(this,e),Object.defineProperty(this,"client",{value:r}),this._assignAttributes(t),this.downloadUrl=t.links&&t.links.download}return(0,_createClass3.default)(e,[{key:"_assignAttributes",value:function(e){(0,_assign2.default)(this,e.attributes)}},{key:"download",value:function(){return this.downloadUrl?this.client.downloadFile(this.downloadUrl):_promise2.default.reject(new Error("No download URL for this library"))}}]),e}();exports.default=Library,module.exports=exports.default; },{"babel-runtime/core-js/object/assign":10,"babel-runtime/core-js/promise":17,"babel-runtime/helpers/classCallCheck":20,"babel-runtime/helpers/createClass":21}],6:[function(require,module,exports){ -"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var _assign=require("babel-runtime/core-js/object/assign"),_assign2=_interopRequireDefault(_assign),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),_superagentBinaryParser=require("./superagent-binary-parser"),_superagentBinaryParser2=_interopRequireDefault(_superagentBinaryParser),_Defaults=require("./Defaults"),_Defaults2=_interopRequireDefault(_Defaults),_EventStream=require("./EventStream"),_EventStream2=_interopRequireDefault(_EventStream),_Agent=require("./Agent"),_Agent2=_interopRequireDefault(_Agent),_Client=require("./Client"),_Client2=_interopRequireDefault(_Client),Particle=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,_classCallCheck3.default)(this,e),t.auth&&this.setDefaultAuth(t.auth),(0,_assign2.default)(this,_Defaults2.default,t),this.context={},this.agent=new _Agent2.default(this.baseUrl)}return(0,_createClass3.default)(e,[{key:"_isValidContext",value:function(e,t){return("tool"===e||"project"===e)&&void 0!==t}},{key:"setContext",value:function(e,t){if(void 0!==t){if(!this._isValidContext(e,t))throw Error("unknown context name or undefined context: "+e);this.context[e]=t}}},{key:"_buildContext",value:function(e){return(0,_assign2.default)(this.context,e)}},{key:"login",value:function(e){var t=e.username,r=e.password,a=e.tokenDuration,u=void 0===a?this.tokenDuration:a,n=e.headers,i=e.context;return this.request({uri:"/oauth/token",method:"post",headers:n,form:{username:t,password:r,grant_type:"password",client_id:this.clientId,client_secret:this.clientSecret,expires_in:u},context:i})}},{key:"sendOtp",value:function(e){var t=e.mfaToken,r=e.otp,a=e.headers,u=e.context;return this.request({uri:"/oauth/token",method:"post",headers:a,form:{grant_type:"urn:custom:mfa-otp",mfa_token:t,otp:r,client_id:this.clientId,client_secret:this.clientSecret},context:u})}},{key:"enableMfa",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.get({uri:"/v1/user/mfa-enable",auth:t,headers:r,context:a})}},{key:"confirmMfa",value:function(e){var t=e.mfaToken,r=e.otp,a=e.invalidateTokens,u=void 0!==a&&a,n=e.auth,i=e.headers,s=e.context,o={mfa_token:t,otp:r};return u&&(o.invalidate_tokens=!0),this.post({uri:"/v1/user/mfa-enable",auth:n,headers:i,data:o,context:s})}},{key:"disableMfa",value:function(e){var t=e.currentPassword,r=e.auth,a=e.headers,u=e.context;return this.put({uri:"/v1/user/mfa-disable",auth:r,headers:a,data:{current_password:t},context:u})}},{key:"createCustomer",value:function(e){var t=e.email,r=e.password,a=e.product,u=e.headers,n=e.context;return this.request({uri:"/v1/products/"+a+"/customers",method:"post",headers:u,form:{email:t,password:r,grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:n})}},{key:"loginAsClientOwner",value:function(e){var t=e.headers,r=e.context;return this.request({uri:"/oauth/token",method:"post",headers:t,form:{grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:r})}},{key:"createUser",value:function(e){var t=e.username,r=e.password,a=e.accountInfo,u=e.headers,n=e.context;return this.post({uri:"/v1/users",headers:u,data:{username:t,password:r,account_info:a},context:n})}},{key:"verifyUser",value:function(e){var t=e.token,r=e.headers,a=e.context;return this.post({uri:"/v1/user/verify",headers:r,data:{token:t},context:a})}},{key:"resetPassword",value:function(e){var t=e.username,r=e.headers,a=e.context;return this.post({uri:"/v1/user/password-reset",headers:r,data:{username:t},context:a})}},{key:"deleteAccessToken",value:function(e){var t=e.username,r=e.password,a=e.token,u=e.headers,n=e.context;return this.delete({uri:"/v1/access_tokens/"+a,auth:{username:t,password:r},headers:u,data:{access_token:a},context:n})}},{key:"deleteCurrentAccessToken",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.delete({uri:"/v1/access_tokens/current",auth:t,headers:r,context:a})}},{key:"deleteActiveAccessTokens",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.delete({uri:"/v1/access_tokens",auth:t,headers:r,context:a})}},{key:"deleteUser",value:function(e){var t=e.auth,r=e.password,a=e.headers,u=e.context;return this.delete({uri:"/v1/user",data:{password:r},auth:t,headers:a,context:u})}},{key:"listAccessTokens",value:function(e){var t=e.username,r=e.password,a=e.otp,u=e.headers,n=e.context;return this.get({uri:"/v1/access_tokens",auth:{username:t,password:r},query:a?{otp:a}:void 0,headers:u,context:n})}},{key:"trackingIdentity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.full,r=void 0!==t&&t,a=e.auth,u=e.headers,n=e.context;return this.get({uri:"/v1/user/identify",auth:a,headers:u,query:r?void 0:{tracking:1},context:n})}},{key:"listDevices",value:function(e){var t=e.deviceId,r=e.deviceName,a=e.groups,u=e.sortAttr,n=e.sortDir,i=e.page,s=e.perPage,o=e.product,c=e.auth,d=e.headers,h=e.context,v=void 0,l=void 0;return o?(v="/v1/products/"+o+"/devices",a=Array.isArray(a)?a.join(","):void 0,l={deviceId:t,deviceName:r,groups:a,sortAttr:u,sortDir:n,page:i,per_page:s}):v="/v1/devices",this.get({uri:v,auth:c,headers:d,query:l,context:h})}},{key:"getDevice",value:function(e){var t=e.deviceId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=this.deviceUri({deviceId:t,product:r});return this.get({uri:i,auth:a,headers:u,context:n})}},{key:"claimDevice",value:function(e){var t=e.deviceId,r=e.requestTransfer,a=e.auth,u=e.headers,n=e.context;return this.post({uri:"/v1/devices",auth:a,headers:u,data:{id:t,request_transfer:!!r},context:n})}},{key:"addDeviceToProduct",value:function(e){var t=e.deviceId,r=e.product,a=e.file,u=e.auth,n=e.headers,i=e.context,s=void 0,o=void 0;return a?s={file:a}:t&&(o={id:t}),this.request({uri:"/v1/products/"+r+"/devices",method:"post",headers:n,data:o,files:s,auth:u,context:i})}},{key:"removeDevice",value:function(e){var t=e.deviceId,r=e.deny,a=e.product,u=e.auth,n=e.headers,i=e.context,s=this.deviceUri({deviceId:t,product:a}),o=a?{deny:r}:void 0;return this.delete({uri:s,data:o,auth:u,headers:n,context:i})}},{key:"removeDeviceOwner",value:function(e){var t=e.deviceId,r=e.product,a=e.auth,u=e.headers,n=e.context,i="/v1/products/"+r+"/devices/"+t+"/owner";return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"renameDevice",value:function(e){var t=e.deviceId,r=e.name,a=e.product,u=e.auth,n=e.headers,i=e.context;return this.updateDevice({deviceId:t,name:r,product:a,auth:u,headers:n,context:i})}},{key:"signalDevice",value:function(e){var t=e.deviceId,r=e.signal,a=e.product,u=e.auth,n=e.headers,i=e.context;return this.updateDevice({deviceId:t,signal:r,product:a,auth:u,headers:n,context:i})}},{key:"setDeviceNotes",value:function(e){var t=e.deviceId,r=e.notes,a=e.product,u=e.auth,n=e.headers,i=e.context;return this.updateDevice({deviceId:t,notes:r,product:a,auth:u,headers:n,context:i})}},{key:"markAsDevelopmentDevice",value:function(e){var t=e.deviceId,r=e.development,a=void 0===r||r,u=e.product,n=e.auth,i=e.headers,s=e.context;return this.updateDevice({deviceId:t,development:a,product:u,auth:n,headers:i,context:s})}},{key:"lockDeviceProductFirmware",value:function(e){var t=e.deviceId,r=e.desiredFirmwareVersion,a=e.flash,u=e.product,n=e.auth,i=e.context;return this.updateDevice({deviceId:t,desiredFirmwareVersion:r,flash:a,product:u,auth:n,context:i})}},{key:"unlockDeviceProductFirmware",value:function(e){var t=e.deviceId,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.updateDevice({deviceId:t,desiredFirmwareVersion:null,product:r,auth:a,headers:u,context:n})}},{key:"updateDevice",value:function(e){var t=e.deviceId,r=e.name,a=e.signal,u=e.notes,n=e.development,i=e.desiredFirmwareVersion,s=e.flash,o=e.product,c=e.auth,d=e.headers,h=e.context;void 0!==a&&(a=a?"1":"0");var v=this.deviceUri({deviceId:t,product:o}),l=o?{name:r,signal:a,notes:u,development:n,desired_firmware_version:i,flash:s}:{name:r,signal:a,notes:u};return this.put({uri:v,auth:c,headers:d,data:l,context:h})}},{key:"provisionDevice",value:function(e){var t=e.productId,r=e.auth,a=e.headers,u=e.context;return this.post({uri:"/v1/devices",auth:r,headers:a,data:{product_id:t},context:u})}},{key:"getClaimCode",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/device_claims":"/v1/device_claims";return this.post({uri:i,auth:a,headers:u,data:{iccid:t},context:n})}},{key:"validatePromoCode",value:function(e){var t=e.promoCode,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/promo_code/"+t,auth:r,headers:a,context:u})}},{key:"changeProduct",value:function(e){var t=e.deviceId,r=e.productId,a=e.auth,u=e.headers,n=e.context;return this.put({uri:"/v1/devices/"+t,auth:a,headers:u,data:{product_id:r},context:n})}},{key:"getVariable",value:function(e){var t=e.deviceId,r=e.name,a=e.product,u=e.auth,n=e.headers,i=e.context,s=a?"/v1/products/"+a+"/devices/"+t+"/"+r:"/v1/devices/"+t+"/"+r;return this.get({uri:s,auth:u,headers:n,context:i})}},{key:"flashDevice",value:function(e){var t=e.deviceId,r=e.product,a=e.files,u=e.targetVersion,n=e.auth,i=e.headers,s=e.context,o=this.deviceUri({deviceId:t,product:r}),c={};return u?c.build_target_version=u:c.latest="true",this.request({uri:o,method:"put",auth:n,headers:i,files:a,form:c,context:s})}},{key:"flashTinker",value:function(e){var t=e.deviceId,r=e.auth,a=e.headers,u=e.context;return console&&console.warning&&console.warning("Particle.flashTinker is deprecated"),this.put({uri:"/v1/devices/"+t,headers:a,data:{app:"tinker"},auth:r,context:u})}},{key:"compileCode",value:function(e){var t=e.files,r=e.platformId,a=e.targetVersion,u=e.auth,n=e.headers,i=e.context,s={platform_id:r};return a?s.build_target_version=a:s.latest="true",this.request({uri:"/v1/binaries",method:"post",auth:u,headers:n,files:t,form:s,context:i})}},{key:"downloadFirmwareBinary",value:function(e){var t=e.binaryId,r=e.auth,a=e.headers,u=e.context,n=this.request({uri:"/v1/binaries/"+t,method:"get",auth:r,headers:a,context:u,raw:!0});return this._provideFileData(n)}},{key:"sendPublicKey",value:function(e){var t=e.deviceId,r=e.key,a=e.algorithm,u=e.auth,n=e.headers,i=e.context;return this.post({uri:"/v1/provisioning/"+t,auth:u,headers:n,data:{deviceID:t,publicKey:"string"==typeof r?r:r.toString(),filename:"particle-api",order:"manual_"+Date.now(),algorithm:a||"rsa"},context:i})}},{key:"callFunction",value:function(e){var t=e.deviceId,r=e.name,a=e.argument,u=e.product,n=e.auth,i=e.headers,s=e.context,o=u?"/v1/products/"+u+"/devices/"+t+"/"+r:"/v1/devices/"+t+"/"+r;return this.post({uri:o,auth:n,headers:i,data:{args:a},context:s})}},{key:"getEventStream",value:function(e){var t=e.deviceId,r=e.name,a=e.org,u=e.product,n=e.auth,i="/v1/";return a&&(i+="orgs/"+a+"/"),u&&(i+="products/"+u+"/"),t&&(i+="devices/","mine"!==t.toLowerCase()&&(i+=t+"/")),i+="events",r&&(i+="/"+encodeURIComponent(r)),n=this._getActiveAuthToken(n),new _EventStream2.default(""+this.baseUrl+i,n).connect()}},{key:"publishEvent",value:function(e){var t=e.name,r=e.data,a=e.isPrivate,u=e.product,n=e.auth,i=e.headers,s=e.context,o=u?"/v1/products/"+u+"/events":"/v1/devices/events",c={name:t,data:r,private:a};return this.post({uri:o,auth:n,headers:i,data:c,context:s})}},{key:"createWebhook",value:function(e){var t=e.event,r=e.url,a=e.device,u=e.rejectUnauthorized,n=e.noDefaults,i=e.hook,s=e.product,o=e.auth,c=e.headers,d=e.context,h=s?"/v1/products/"+s+"/webhooks":"/v1/webhooks",v={event:t,url:r,deviceId:a,rejectUnauthorized:u,noDefaults:n};return i&&(v.requestType=i.method,v.auth=i.auth,v.headers=i.headers,v.query=i.query,v.json=i.json,v.form=i.form,v.body=i.body,v.responseTemplate=i.responseTemplate,v.responseTopic=i.responseEvent,v.errorResponseTopic=i.errorResponseEvent),v.requestType||(v.requestType="POST"),this.post({uri:h,auth:o,headers:c,data:v,context:d})}},{key:"deleteWebhook",value:function(e){var t=e.hookId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/webhooks/"+t:"/v1/webhooks/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listWebhooks",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context,n=t?"/v1/products/"+t+"/webhooks":"/v1/webhooks";return this.get({uri:n,auth:r,headers:a,context:u})}},{key:"createIntegration",value:function(e){var t=e.event,r=e.settings,a=e.deviceId,u=e.product,n=e.auth,i=e.headers,s=e.context,o=u?"/v1/products/"+u+"/integrations":"/v1/integrations",c=(0,_assign2.default)({event:t,deviceid:a},r);return this.post({uri:o,data:c,auth:n,headers:i,context:s})}},{key:"editIntegration",value:function(e){var t=e.integrationId,r=e.event,a=e.settings,u=e.deviceId,n=e.product,i=e.auth,s=e.headers,o=e.context,c=n?"/v1/products/"+n+"/integrations/"+t:"/v1/integrations/"+t,d=(0,_assign2.default)({event:r,deviceid:u},a);return this.put({uri:c,auth:i,headers:s,data:d,context:o})}},{key:"deleteIntegration",value:function(e){var t=e.integrationId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/integrations/"+t:"/v1/integrations/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listIntegrations",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context,n=t?"/v1/products/"+t+"/integrations":"/v1/integrations";return this.get({uri:n,auth:r,headers:a,context:u})}},{key:"getUserInfo",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.get({uri:"/v1/user",auth:t,headers:r,context:a})}},{key:"setUserInfo",value:function(e){var t=e.accountInfo,r=e.auth,a=e.headers,u=e.context,n={account_info:t};return this.put({uri:"/v1/user",auth:r,headers:a,data:n,context:u})}},{key:"changeUsername",value:function(e){var t=e.currentPassword,r=e.username,a=e.invalidateTokens,u=void 0!==a&&a,n=e.auth,i=e.headers,s=e.context,o={username:r,current_password:t};return u&&(o.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:i,data:o,context:s})}},{key:"changeUserPassword",value:function(e){var t=e.currentPassword,r=e.password,a=e.invalidateTokens,u=void 0!==a&&a,n=e.auth,i=e.headers,s=e.context,o={password:r,current_password:t};return u&&(o.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:i,data:o,context:s})}},{key:"listSIMs",value:function(e){var t=e.iccid,r=e.deviceId,a=e.deviceName,u=e.page,n=e.perPage,i=e.product,s=e.auth,o=e.headers,c=e.context,d=i?"/v1/products/"+i+"/sims":"/v1/sims",h=i?{iccid:t,deviceId:r,deviceName:a,page:u,per_page:n}:void 0;return this.get({uri:d,auth:s,headers:o,query:h,context:c})}},{key:"getSIMDataUsage",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/sims/"+t+"/data_usage":"/v1/sims/"+t+"/data_usage";return this.get({uri:i,auth:a,headers:u,context:n})}},{key:"getFleetDataUsage",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t+"/sims/data_usage",auth:r,headers:a,context:u})}},{key:"checkSIM",value:function(e){var t=e.iccid,r=e.auth,a=e.headers,u=e.context;return this.head({uri:"/v1/sims/"+t,auth:r,headers:a,context:u})}},{key:"activateSIM",value:function(e){var t=e.iccid,r=e.iccids,a=e.country,u=e.promoCode,n=e.product,i=e.auth,s=e.headers,o=e.context;r=r||[t];var c=n?"/v1/products/"+n+"/sims":"/v1/sims/"+t,d=n?{sims:r,country:a}:{country:a,promoCode:u,action:"activate"},h=n?"post":"put";return this.request({uri:c,method:h,headers:s,data:d,auth:i,context:o})}},{key:"deactivateSIM",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/sims/"+t:"/v1/sims/"+t,s={action:"deactivate"};return this.put({uri:i,auth:a,headers:u,data:s,context:n})}},{key:"reactivateSIM",value:function(e){var t=e.iccid,r=e.mbLimit,a=e.product,u=e.auth,n=e.headers,i=e.context,s=a?"/v1/products/"+a+"/sims/"+t:"/v1/sims/"+t,o={mb_limit:r,action:"reactivate"};return this.put({uri:s,auth:u,headers:n,data:o,context:i})}},{key:"updateSIM",value:function(e){var t=e.iccid,r=e.mbLimit,a=e.product,u=e.auth,n=e.headers,i=e.context,s=a?"/v1/products/"+a+"/sims/"+t:"/v1/sims/"+t,o={mb_limit:r};return this.put({uri:s,auth:u,headers:n,data:o,context:i})}},{key:"removeSIM",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/sims/"+t:"/v1/sims/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listBuildTargets",value:function(e){var t=e.onlyFeatured,r=e.auth,a=e.headers,u=e.context,n=t?{featured:!!t}:void 0;return this.get({uri:"/v1/build_targets",auth:r,headers:a,query:n,context:u})}},{key:"listLibraries",value:function(e){var t=e.page,r=e.limit,a=e.filter,u=e.sort,n=e.architectures,i=e.category,s=e.scope,o=e.excludeScopes,c=e.auth,d=e.headers,h=e.context;return this.get({uri:"/v1/libraries",auth:c,headers:d,query:{page:t,filter:a,limit:r,sort:u,architectures:this._asList(n),category:i,scope:s,excludeScopes:this._asList(o)},context:h})}},{key:"_asList",value:function(e){return Array.isArray(e)?e.join(","):e}},{key:"getLibrary",value:function(e){var t=e.name,r=e.version,a=e.auth,u=e.headers,n=e.context;return this.get({uri:"/v1/libraries/"+t,auth:a,headers:u,query:{version:r},context:n})}},{key:"getLibraryVersions",value:function(e){var t=e.name,r=e.page,a=e.limit,u=e.auth,n=e.headers,i=e.context;return this.get({uri:"/v1/libraries/"+t+"/versions",auth:u,headers:n,query:{page:r,limit:a},context:i})}},{key:"contributeLibrary",value:function(e){var t=e.archive,r=e.auth,a=e.headers,u=e.context,n={"archive.tar.gz":t};return this.request({uri:"/v1/libraries",method:"post",auth:r,headers:a,files:n,context:u})}},{key:"publishLibrary",value:function(e){var t=e.name,r=e.auth,a=e.headers,u=e.context;return this.request({uri:"/v1/libraries/"+t,method:"patch",auth:r,headers:a,data:{visibility:"public"},context:u})}},{key:"deleteLibrary",value:function(e){var t=e.name,r=e.force,a=e.auth,u=e.headers,n=e.context;return this.delete({uri:"/v1/libraries/"+t,auth:a,headers:u,data:{force:r},context:n})}},{key:"downloadFile",value:function(e){var t=e.uri,r=e.headers,a=e.context,u=this.request({uri:t,method:"get",headers:r,context:a,raw:!0});return this._provideFileData(u)}},{key:"listOAuthClients",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context,n=t?"/v1/products/"+t+"/clients":"/v1/clients";return this.get({uri:n,auth:r,headers:a,context:u})}},{key:"createOAuthClient",value:function(e){var t=e.name,r=e.type,a=e.redirect_uri,u=e.scope,n=e.product,i=e.auth,s=e.headers,o=e.context,c=n?"/v1/products/"+n+"/clients":"/v1/clients",d={name:t,type:r,redirect_uri:a,scope:u};return this.post({uri:c,auth:i,headers:s,data:d,context:o})}},{key:"updateOAuthClient",value:function(e){var t=e.clientId,r=e.name,a=e.scope,u=e.product,n=e.auth,i=e.headers,s=e.context,o=u?"/v1/products/"+u+"/clients/"+t:"/v1/clients/"+t,c={name:r,scope:a};return this.put({uri:o,data:c,auth:n,headers:i,context:s})}},{key:"deleteOAuthClient",value:function(e){var t=e.clientId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/clients/"+t:"/v1/clients/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listProducts",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.get({uri:"/v1/products",auth:t,headers:r,context:a})}},{key:"getProduct",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t,auth:r,headers:a,context:u})}},{key:"listProductFirmware",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t+"/firmware",auth:r,headers:a,context:u})}},{key:"uploadProductFirmware",value:function(e){var t=e.file,r=e.version,a=e.title,u=e.description,n=e.product,i=e.auth,s=e.headers,o=e.context;return this.request({uri:"/v1/products/"+n+"/firmware",method:"post",auth:i,headers:s,form:{version:r,title:a,description:u},files:{"firmware.bin":t},context:o})}},{key:"getProductFirmware",value:function(e){var t=e.version,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.get({uri:"/v1/products/"+r+"/firmware/"+t,auth:a,headers:u,context:n})}},{key:"updateProductFirmware",value:function(e){var t=e.version,r=e.title,a=e.description,u=e.product,n=e.auth,i=e.headers,s=e.context,o="/v1/products/"+u+"/firmware/"+t;return this.put({uri:o,auth:n,headers:i,data:{title:r,description:a},context:s})}},{key:"downloadProductFirmware",value:function(e){var t=e.version,r=e.product,a=e.auth,u=e.headers,n=e.context,i=this.request({uri:"/v1/products/"+r+"/firmware/"+t+"/binary",method:"get",auth:a,headers:u,context:n,raw:!0});return this._provideFileData(i)}},{key:"_provideFileData",value:function(e){return e=this.agent.isForBrowser()?e.responseType("arraybuffer").then(function(e){return e.body=e.xhr.response,e}):e.buffer(!0).parse(_superagentBinaryParser2.default),e.then(function(e){return e.body})}},{key:"releaseProductFirmware",value:function(e){var t=e.version,r=e.product,a=e.auth,u=e.headers,n=e.context,i="/v1/products/"+r+"/firmware/release";return this.put({uri:i,auth:a,headers:u,data:{version:t},context:n})}},{key:"listTeamMembers",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t+"/team",auth:r,headers:a,context:u})}},{key:"inviteTeamMember",value:function(e){var t=e.username,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.post({uri:"/v1/products/"+r+"/team",auth:a,headers:u,data:{username:t},context:n})}},{key:"removeTeamMember",value:function(e){var t=e.username,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.delete({uri:"/v1/products/"+r+"/team/"+t,auth:a,headers:u,context:n})}},{key:"lookupSerialNumber",value:function(e){var t=e.serialNumber,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/serial_numbers/"+t,auth:r,headers:a,context:u})}},{key:"createMeshNetwork",value:function(e){var t=e.name,r=e.deviceId,a=e.iccid,u=e.auth,n=e.headers,i=e.context;return this.post({uri:"/v1/networks",auth:u,headers:n,data:{name:t,device_id:r,iccid:a},context:i})}},{key:"removeMeshNetwork",value:function(e){var t=e.networkId,r=e.auth,a=e.headers,u=e.context;return this.delete({uri:"/v1/networks/"+t,auth:r,headers:a,context:u})}},{key:"listMeshNetworks",value:function(e){var t=e.page,r=e.perPage,a=e.auth,u=e.headers,n=e.context,i=t?{page:t,per_page:r}:void 0;return this.get({uri:"/v1/networks",auth:a,headers:u,query:i,context:n})}},{key:"getMeshNetwork",value:function(e){var t=e.networkId,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/networks/"+t,auth:r,headers:a,context:u})}},{key:"updateMeshNetwork",value:function(e){var t=e.networkId,r=e.action,a=e.deviceId,u=e.auth,n=e.headers,i=e.context;return this.put({uri:"/v1/networks/"+t,auth:u,headers:n,data:{action:r,device_id:a},context:i})}},{key:"addMeshNetworkDevice",value:function(e){var t=e.networkId,r=e.deviceId,a=e.auth,u=e.headers,n=e.context;return this.updateMeshNetwork({action:"add-device",networkId:t,deviceId:r,auth:a,headers:u,context:n})}},{key:"removeMeshNetworkDevice",value:function(e){var t=e.networkId,r=e.deviceId,a=e.auth,u=e.headers,n=e.context;return t?this.updateMeshNetwork({action:"remove-device",networkId:t,deviceId:r,auth:a,headers:u,context:n}):this.delete({uri:"/v1/devices/"+r+"/network",auth:a,headers:u,context:n})}},{key:"listMeshNetworkDevices",value:function(e){var t=e.networkId,r=e.role,a=e.page,u=e.perPage,n=e.auth,i=e.headers,s=e.context,o=r||a?{role:r,page:a,per_page:u}:void 0;return this.get({uri:"/v1/networks/"+t+"/devices",auth:n,headers:i,query:o,context:s})}},{key:"getProductConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+r+"/config",auth:t,headers:a,context:u})}},{key:"getProductConfigurationSchema",value:function(e){var t=e.auth,r=e.product,a=e.headers,u=void 0===a?{}:a,n=e.context;return u.accept="application/schema+json",this.get({uri:"/v1/products/"+r+"/config",auth:t,headers:u,context:n})}},{key:"getProductDeviceConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.deviceId,u=e.headers,n=e.context;return this.get({uri:"/v1/products/"+r+"/config/"+a,auth:t,headers:u,context:n})}},{key:"getProductDeviceConfigurationSchema",value:function(e){var t=e.auth,r=e.product,a=e.deviceId,u=e.headers,n=e.context;return u.accept="application/schema+json",this.get({uri:"/v1/products/"+r+"/config/"+a,auth:t,headers:u,context:n})}},{key:"setProductConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.config,u=e.headers,n=e.context;return this.put({uri:"/v1/products/"+r+"/config",auth:t,data:a,headers:u,context:n})}},{key:"setProductDeviceConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.deviceId,u=e.config,n=e.headers,i=e.context;return this.put({uri:"/v1/products/"+r+"/config/"+a,data:u,auth:t,headers:n,context:i})}},{key:"getProductLocations",value:function(e){var t=e.auth,r=e.product,a=e.dateRange,u=e.rectBl,n=e.rectTr,i=e.deviceId,s=e.deviceName,o=e.groups,c=e.page,d=e.perPage,h=e.headers,v=e.context;return this.get({uri:"/v1/products/"+r+"/locations",query:{date_range:a,rect_bl:u,rect_tr:n,device_id:i,device_name:s,groups:o,page:c,per_page:d},auth:t,headers:h,context:v})}},{key:"getProductDeviceLocations",value:function(e){var t=e.auth,r=e.product,a=e.dateRange,u=e.rectBl,n=e.rectTr,i=e.deviceId,s=e.headers,o=e.context;return this.get({uri:"/v1/products/"+r+"/locations/"+i,query:{date_range:a,rect_bl:u,rect_tr:n},auth:t,headers:s,context:o})}},{key:"setDefaultAuth",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Must pass a non-empty string");this._defaultAuth=e}},{key:"_getActiveAuthToken",value:function(e){return e||this._defaultAuth}},{key:"deviceUri",value:function(e){var t=e.deviceId,r=e.product;return r?"/v1/products/"+r+"/devices/"+t:"/v1/devices/"+t}},{key:"get",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.query,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.get({uri:t,auth:r,headers:a,query:u,context:n})}},{key:"head",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.query,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.head({uri:t,auth:r,headers:a,query:u,context:n})}},{key:"post",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.data,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.post({uri:t,auth:r,headers:a,data:u,context:n})}},{key:"put",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.data,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.put({uri:t,auth:r,headers:a,data:u,context:n})}},{key:"delete",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.data,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.delete({uri:t,auth:r,headers:a,data:u,context:n})}},{key:"request",value:function(e){return e.context=this._buildContext(e.context),e.auth=this._getActiveAuthToken(e.auth),this.agent.request(e)}},{key:"client",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new _Client2.default((0,_assign2.default)({api:this},e))}},{key:"setBaseUrl",value:function(e){this.baseUrl=e,this.agent.setBaseUrl(e)}}]),e}();Particle.prototype.removeAccessToken=Particle.prototype.deleteAccessToken,exports.default=Particle,module.exports=exports.default; +"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var _assign=require("babel-runtime/core-js/object/assign"),_assign2=_interopRequireDefault(_assign),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),_superagentBinaryParser=require("./superagent-binary-parser"),_superagentBinaryParser2=_interopRequireDefault(_superagentBinaryParser),_Defaults=require("./Defaults"),_Defaults2=_interopRequireDefault(_Defaults),_EventStream=require("./EventStream"),_EventStream2=_interopRequireDefault(_EventStream),_Agent=require("./Agent"),_Agent2=_interopRequireDefault(_Agent),_Client=require("./Client"),_Client2=_interopRequireDefault(_Client),Particle=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,_classCallCheck3.default)(this,e),t.auth&&this.setDefaultAuth(t.auth),(0,_assign2.default)(this,_Defaults2.default,t),this.context={},this.agent=new _Agent2.default(this.baseUrl)}return(0,_createClass3.default)(e,[{key:"_isValidContext",value:function(e,t){return("tool"===e||"project"===e)&&void 0!==t}},{key:"setContext",value:function(e,t){if(void 0!==t){if(!this._isValidContext(e,t))throw Error("unknown context name or undefined context: "+e);this.context[e]=t}}},{key:"_buildContext",value:function(e){return(0,_assign2.default)(this.context,e)}},{key:"login",value:function(e){var t=e.username,r=e.password,a=e.tokenDuration,u=void 0===a?this.tokenDuration:a,n=e.headers,i=e.context;return this.request({uri:"/oauth/token",method:"post",headers:n,form:{username:t,password:r,grant_type:"password",client_id:this.clientId,client_secret:this.clientSecret,expires_in:u},context:i})}},{key:"sendOtp",value:function(e){var t=e.mfaToken,r=e.otp,a=e.headers,u=e.context;return this.request({uri:"/oauth/token",method:"post",headers:a,form:{grant_type:"urn:custom:mfa-otp",mfa_token:t,otp:r,client_id:this.clientId,client_secret:this.clientSecret},context:u})}},{key:"enableMfa",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.get({uri:"/v1/user/mfa-enable",auth:t,headers:r,context:a})}},{key:"confirmMfa",value:function(e){var t=e.mfaToken,r=e.otp,a=e.invalidateTokens,u=void 0!==a&&a,n=e.auth,i=e.headers,o=e.context,s={mfa_token:t,otp:r};return u&&(s.invalidate_tokens=!0),this.post({uri:"/v1/user/mfa-enable",auth:n,headers:i,data:s,context:o})}},{key:"disableMfa",value:function(e){var t=e.currentPassword,r=e.auth,a=e.headers,u=e.context;return this.put({uri:"/v1/user/mfa-disable",auth:r,headers:a,data:{current_password:t},context:u})}},{key:"createCustomer",value:function(e){var t=e.email,r=e.password,a=e.product,u=e.headers,n=e.context;return this.request({uri:"/v1/products/"+a+"/customers",method:"post",headers:u,form:{email:t,password:r,grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:n})}},{key:"loginAsClientOwner",value:function(e){var t=e.headers,r=e.context;return this.request({uri:"/oauth/token",method:"post",headers:t,form:{grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:r})}},{key:"createUser",value:function(e){var t=e.username,r=e.password,a=e.accountInfo,u=e.headers,n=e.context;return this.post({uri:"/v1/users",headers:u,data:{username:t,password:r,account_info:a},context:n})}},{key:"verifyUser",value:function(e){var t=e.token,r=e.headers,a=e.context;return this.post({uri:"/v1/user/verify",headers:r,data:{token:t},context:a})}},{key:"resetPassword",value:function(e){var t=e.username,r=e.headers,a=e.context;return this.post({uri:"/v1/user/password-reset",headers:r,data:{username:t},context:a})}},{key:"deleteAccessToken",value:function(e){var t=e.username,r=e.password,a=e.token,u=e.headers,n=e.context;return this.delete({uri:"/v1/access_tokens/"+a,auth:{username:t,password:r},headers:u,data:{access_token:a},context:n})}},{key:"deleteCurrentAccessToken",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.delete({uri:"/v1/access_tokens/current",auth:t,headers:r,context:a})}},{key:"deleteActiveAccessTokens",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.delete({uri:"/v1/access_tokens",auth:t,headers:r,context:a})}},{key:"deleteUser",value:function(e){var t=e.auth,r=e.password,a=e.headers,u=e.context;return this.delete({uri:"/v1/user",data:{password:r},auth:t,headers:a,context:u})}},{key:"listAccessTokens",value:function(e){var t=e.username,r=e.password,a=e.otp,u=e.headers,n=e.context;return this.get({uri:"/v1/access_tokens",auth:{username:t,password:r},query:a?{otp:a}:void 0,headers:u,context:n})}},{key:"trackingIdentity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.full,r=void 0!==t&&t,a=e.auth,u=e.headers,n=e.context;return this.get({uri:"/v1/user/identify",auth:a,headers:u,query:r?void 0:{tracking:1},context:n})}},{key:"listDevices",value:function(e){var t=e.deviceId,r=e.deviceName,a=e.groups,u=e.sortAttr,n=e.sortDir,i=e.page,o=e.perPage,s=e.product,c=e.auth,d=e.headers,h=e.context,v=void 0,l=void 0;return s?(v="/v1/products/"+s+"/devices",a=Array.isArray(a)?a.join(","):void 0,l={deviceId:t,deviceName:r,groups:a,sortAttr:u,sortDir:n,page:i,per_page:o}):v="/v1/devices",this.get({uri:v,auth:c,headers:d,query:l,context:h})}},{key:"getDevice",value:function(e){var t=e.deviceId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=this.deviceUri({deviceId:t,product:r});return this.get({uri:i,auth:a,headers:u,context:n})}},{key:"claimDevice",value:function(e){var t=e.deviceId,r=e.requestTransfer,a=e.auth,u=e.headers,n=e.context;return this.post({uri:"/v1/devices",auth:a,headers:u,data:{id:t,request_transfer:!!r},context:n})}},{key:"addDeviceToProduct",value:function(e){var t=e.deviceId,r=e.product,a=e.file,u=e.auth,n=e.headers,i=e.context,o=void 0,s=void 0;return a?o={file:a}:t&&(s={id:t}),this.request({uri:"/v1/products/"+r+"/devices",method:"post",headers:n,data:s,files:o,auth:u,context:i})}},{key:"removeDevice",value:function(e){var t=e.deviceId,r=e.deny,a=e.product,u=e.auth,n=e.headers,i=e.context,o=this.deviceUri({deviceId:t,product:a}),s=a?{deny:r}:void 0;return this.delete({uri:o,data:s,auth:u,headers:n,context:i})}},{key:"removeDeviceOwner",value:function(e){var t=e.deviceId,r=e.product,a=e.auth,u=e.headers,n=e.context,i="/v1/products/"+r+"/devices/"+t+"/owner";return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"renameDevice",value:function(e){var t=e.deviceId,r=e.name,a=e.product,u=e.auth,n=e.headers,i=e.context;return this.updateDevice({deviceId:t,name:r,product:a,auth:u,headers:n,context:i})}},{key:"signalDevice",value:function(e){var t=e.deviceId,r=e.signal,a=e.product,u=e.auth,n=e.headers,i=e.context;return this.updateDevice({deviceId:t,signal:r,product:a,auth:u,headers:n,context:i})}},{key:"setDeviceNotes",value:function(e){var t=e.deviceId,r=e.notes,a=e.product,u=e.auth,n=e.headers,i=e.context;return this.updateDevice({deviceId:t,notes:r,product:a,auth:u,headers:n,context:i})}},{key:"markAsDevelopmentDevice",value:function(e){var t=e.deviceId,r=e.development,a=void 0===r||r,u=e.product,n=e.auth,i=e.headers,o=e.context;return this.updateDevice({deviceId:t,development:a,product:u,auth:n,headers:i,context:o})}},{key:"lockDeviceProductFirmware",value:function(e){var t=e.deviceId,r=e.desiredFirmwareVersion,a=e.flash,u=e.product,n=e.auth,i=e.context;return this.updateDevice({deviceId:t,desiredFirmwareVersion:r,flash:a,product:u,auth:n,context:i})}},{key:"unlockDeviceProductFirmware",value:function(e){var t=e.deviceId,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.updateDevice({deviceId:t,desiredFirmwareVersion:null,product:r,auth:a,headers:u,context:n})}},{key:"updateDevice",value:function(e){var t=e.deviceId,r=e.name,a=e.signal,u=e.notes,n=e.development,i=e.desiredFirmwareVersion,o=e.flash,s=e.product,c=e.auth,d=e.headers,h=e.context;void 0!==a&&(a=a?"1":"0");var v=this.deviceUri({deviceId:t,product:s}),l=s?{name:r,signal:a,notes:u,development:n,desired_firmware_version:i,flash:o}:{name:r,signal:a,notes:u};return this.put({uri:v,auth:c,headers:d,data:l,context:h})}},{key:"provisionDevice",value:function(e){var t=e.productId,r=e.auth,a=e.headers,u=e.context;return this.post({uri:"/v1/devices",auth:r,headers:a,data:{product_id:t},context:u})}},{key:"getClaimCode",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/device_claims":"/v1/device_claims";return this.post({uri:i,auth:a,headers:u,data:{iccid:t},context:n})}},{key:"validatePromoCode",value:function(e){var t=e.promoCode,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/promo_code/"+t,auth:r,headers:a,context:u})}},{key:"changeProduct",value:function(e){var t=e.deviceId,r=e.productId,a=e.auth,u=e.headers,n=e.context;return this.put({uri:"/v1/devices/"+t,auth:a,headers:u,data:{product_id:r},context:n})}},{key:"getVariable",value:function(e){var t=e.deviceId,r=e.name,a=e.product,u=e.auth,n=e.headers,i=e.context,o=a?"/v1/products/"+a+"/devices/"+t+"/"+r:"/v1/devices/"+t+"/"+r;return this.get({uri:o,auth:u,headers:n,context:i})}},{key:"flashDevice",value:function(e){var t=e.deviceId,r=e.product,a=e.files,u=e.targetVersion,n=e.auth,i=e.headers,o=e.context,s=this.deviceUri({deviceId:t,product:r}),c={};return u?c.build_target_version=u:c.latest="true",this.request({uri:s,method:"put",auth:n,headers:i,files:a,form:c,context:o})}},{key:"flashTinker",value:function(e){var t=e.deviceId,r=e.auth,a=e.headers,u=e.context;return console&&console.warning&&console.warning("Particle.flashTinker is deprecated"),this.put({uri:"/v1/devices/"+t,headers:a,data:{app:"tinker"},auth:r,context:u})}},{key:"compileCode",value:function(e){var t=e.files,r=e.platformId,a=e.targetVersion,u=e.auth,n=e.headers,i=e.context,o={platform_id:r};return a?o.build_target_version=a:o.latest="true",this.request({uri:"/v1/binaries",method:"post",auth:u,headers:n,files:t,form:o,context:i})}},{key:"downloadFirmwareBinary",value:function(e){var t=e.binaryId,r=e.auth,a=e.headers,u=e.context,n=this.request({uri:"/v1/binaries/"+t,method:"get",auth:r,headers:a,context:u,raw:!0});return this._provideFileData(n)}},{key:"sendPublicKey",value:function(e){var t=e.deviceId,r=e.key,a=e.algorithm,u=e.auth,n=e.headers,i=e.context;return this.post({uri:"/v1/provisioning/"+t,auth:u,headers:n,data:{deviceID:t,publicKey:"string"==typeof r?r:r.toString(),filename:"particle-api",order:"manual_"+Date.now(),algorithm:a||"rsa"},context:i})}},{key:"callFunction",value:function(e){var t=e.deviceId,r=e.name,a=e.argument,u=e.product,n=e.auth,i=e.headers,o=e.context,s=u?"/v1/products/"+u+"/devices/"+t+"/"+r:"/v1/devices/"+t+"/"+r;return this.post({uri:s,auth:n,headers:i,data:{args:a},context:o})}},{key:"getEventStream",value:function(e){var t=e.deviceId,r=e.name,a=e.org,u=e.product,n=e.auth,i="/v1/";return a&&(i+="orgs/"+a+"/"),u&&(i+="products/"+u+"/"),t&&(i+="devices/","mine"!==t.toLowerCase()&&(i+=t+"/")),i+="events",r&&(i+="/"+encodeURIComponent(r)),n=this._getActiveAuthToken(n),new _EventStream2.default(""+this.baseUrl+i,n).connect()}},{key:"publishEvent",value:function(e){var t=e.name,r=e.data,a=e.isPrivate,u=e.product,n=e.auth,i=e.headers,o=e.context,s=u?"/v1/products/"+u+"/events":"/v1/devices/events",c={name:t,data:r,private:a};return this.post({uri:s,auth:n,headers:i,data:c,context:o})}},{key:"createWebhook",value:function(e){var t=e.event,r=e.url,a=e.device,u=e.rejectUnauthorized,n=e.noDefaults,i=e.hook,o=e.product,s=e.auth,c=e.headers,d=e.context,h=o?"/v1/products/"+o+"/webhooks":"/v1/webhooks",v={event:t,url:r,deviceId:a,rejectUnauthorized:u,noDefaults:n};return i&&(v.requestType=i.method,v.auth=i.auth,v.headers=i.headers,v.query=i.query,v.json=i.json,v.form=i.form,v.body=i.body,v.responseTemplate=i.responseTemplate,v.responseTopic=i.responseEvent,v.errorResponseTopic=i.errorResponseEvent),v.requestType||(v.requestType="POST"),this.post({uri:h,auth:s,headers:c,data:v,context:d})}},{key:"deleteWebhook",value:function(e){var t=e.hookId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/webhooks/"+t:"/v1/webhooks/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listWebhooks",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context,n=t?"/v1/products/"+t+"/webhooks":"/v1/webhooks";return this.get({uri:n,auth:r,headers:a,context:u})}},{key:"createIntegration",value:function(e){var t=e.event,r=e.settings,a=e.deviceId,u=e.product,n=e.auth,i=e.headers,o=e.context,s=u?"/v1/products/"+u+"/integrations":"/v1/integrations",c=(0,_assign2.default)({event:t,deviceid:a},r);return this.post({uri:s,data:c,auth:n,headers:i,context:o})}},{key:"editIntegration",value:function(e){var t=e.integrationId,r=e.event,a=e.settings,u=e.deviceId,n=e.product,i=e.auth,o=e.headers,s=e.context,c=n?"/v1/products/"+n+"/integrations/"+t:"/v1/integrations/"+t,d=(0,_assign2.default)({event:r,deviceid:u},a);return this.put({uri:c,auth:i,headers:o,data:d,context:s})}},{key:"deleteIntegration",value:function(e){var t=e.integrationId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/integrations/"+t:"/v1/integrations/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listIntegrations",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context,n=t?"/v1/products/"+t+"/integrations":"/v1/integrations";return this.get({uri:n,auth:r,headers:a,context:u})}},{key:"getUserInfo",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.get({uri:"/v1/user",auth:t,headers:r,context:a})}},{key:"setUserInfo",value:function(e){var t=e.accountInfo,r=e.auth,a=e.headers,u=e.context,n={account_info:t};return this.put({uri:"/v1/user",auth:r,headers:a,data:n,context:u})}},{key:"changeUsername",value:function(e){var t=e.currentPassword,r=e.username,a=e.invalidateTokens,u=void 0!==a&&a,n=e.auth,i=e.headers,o=e.context,s={username:r,current_password:t};return u&&(s.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:i,data:s,context:o})}},{key:"changeUserPassword",value:function(e){var t=e.currentPassword,r=e.password,a=e.invalidateTokens,u=void 0!==a&&a,n=e.auth,i=e.headers,o=e.context,s={password:r,current_password:t};return u&&(s.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:i,data:s,context:o})}},{key:"listSIMs",value:function(e){var t=e.iccid,r=e.deviceId,a=e.deviceName,u=e.page,n=e.perPage,i=e.product,o=e.auth,s=e.headers,c=e.context,d=i?"/v1/products/"+i+"/sims":"/v1/sims",h=i?{iccid:t,deviceId:r,deviceName:a,page:u,per_page:n}:void 0;return this.get({uri:d,auth:o,headers:s,query:h,context:c})}},{key:"getSIMDataUsage",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/sims/"+t+"/data_usage":"/v1/sims/"+t+"/data_usage";return this.get({uri:i,auth:a,headers:u,context:n})}},{key:"getFleetDataUsage",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t+"/sims/data_usage",auth:r,headers:a,context:u})}},{key:"checkSIM",value:function(e){var t=e.iccid,r=e.auth,a=e.headers,u=e.context;return this.head({uri:"/v1/sims/"+t,auth:r,headers:a,context:u})}},{key:"activateSIM",value:function(e){var t=e.iccid,r=e.iccids,a=e.country,u=e.promoCode,n=e.product,i=e.auth,o=e.headers,s=e.context;r=r||[t];var c=n?"/v1/products/"+n+"/sims":"/v1/sims/"+t,d=n?{sims:r,country:a}:{country:a,promoCode:u,action:"activate"},h=n?"post":"put";return this.request({uri:c,method:h,headers:o,data:d,auth:i,context:s})}},{key:"deactivateSIM",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/sims/"+t:"/v1/sims/"+t,o={action:"deactivate"};return this.put({uri:i,auth:a,headers:u,data:o,context:n})}},{key:"reactivateSIM",value:function(e){var t=e.iccid,r=e.mbLimit,a=e.product,u=e.auth,n=e.headers,i=e.context,o=a?"/v1/products/"+a+"/sims/"+t:"/v1/sims/"+t,s={mb_limit:r,action:"reactivate"};return this.put({uri:o,auth:u,headers:n,data:s,context:i})}},{key:"updateSIM",value:function(e){var t=e.iccid,r=e.mbLimit,a=e.product,u=e.auth,n=e.headers,i=e.context,o=a?"/v1/products/"+a+"/sims/"+t:"/v1/sims/"+t,s={mb_limit:r};return this.put({uri:o,auth:u,headers:n,data:s,context:i})}},{key:"removeSIM",value:function(e){var t=e.iccid,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/sims/"+t:"/v1/sims/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listBuildTargets",value:function(e){var t=e.onlyFeatured,r=e.auth,a=e.headers,u=e.context,n=t?{featured:!!t}:void 0;return this.get({uri:"/v1/build_targets",auth:r,headers:a,query:n,context:u})}},{key:"listLibraries",value:function(e){var t=e.page,r=e.limit,a=e.filter,u=e.sort,n=e.architectures,i=e.category,o=e.scope,s=e.excludeScopes,c=e.auth,d=e.headers,h=e.context;return this.get({uri:"/v1/libraries",auth:c,headers:d,query:{page:t,filter:a,limit:r,sort:u,architectures:this._asList(n),category:i,scope:o,excludeScopes:this._asList(s)},context:h})}},{key:"_asList",value:function(e){return Array.isArray(e)?e.join(","):e}},{key:"getLibrary",value:function(e){var t=e.name,r=e.version,a=e.auth,u=e.headers,n=e.context;return this.get({uri:"/v1/libraries/"+t,auth:a,headers:u,query:{version:r},context:n})}},{key:"getLibraryVersions",value:function(e){var t=e.name,r=e.page,a=e.limit,u=e.auth,n=e.headers,i=e.context;return this.get({uri:"/v1/libraries/"+t+"/versions",auth:u,headers:n,query:{page:r,limit:a},context:i})}},{key:"contributeLibrary",value:function(e){var t=e.archive,r=e.auth,a=e.headers,u=e.context,n={"archive.tar.gz":t};return this.request({uri:"/v1/libraries",method:"post",auth:r,headers:a,files:n,context:u})}},{key:"publishLibrary",value:function(e){var t=e.name,r=e.auth,a=e.headers,u=e.context;return this.request({uri:"/v1/libraries/"+t,method:"patch",auth:r,headers:a,data:{visibility:"public"},context:u})}},{key:"deleteLibrary",value:function(e){var t=e.name,r=e.force,a=e.auth,u=e.headers,n=e.context;return this.delete({uri:"/v1/libraries/"+t,auth:a,headers:u,data:{force:r},context:n})}},{key:"downloadFile",value:function(e){var t=e.uri,r=e.headers,a=e.context,u=this.request({uri:t,method:"get",headers:r,context:a,raw:!0});return this._provideFileData(u)}},{key:"listOAuthClients",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context,n=t?"/v1/products/"+t+"/clients":"/v1/clients";return this.get({uri:n,auth:r,headers:a,context:u})}},{key:"createOAuthClient",value:function(e){var t=e.name,r=e.type,a=e.redirect_uri,u=e.scope,n=e.product,i=e.auth,o=e.headers,s=e.context,c=n?"/v1/products/"+n+"/clients":"/v1/clients",d={name:t,type:r,redirect_uri:a,scope:u};return this.post({uri:c,auth:i,headers:o,data:d,context:s})}},{key:"updateOAuthClient",value:function(e){var t=e.clientId,r=e.name,a=e.scope,u=e.product,n=e.auth,i=e.headers,o=e.context,s=u?"/v1/products/"+u+"/clients/"+t:"/v1/clients/"+t,c={name:r,scope:a};return this.put({uri:s,data:c,auth:n,headers:i,context:o})}},{key:"deleteOAuthClient",value:function(e){var t=e.clientId,r=e.product,a=e.auth,u=e.headers,n=e.context,i=r?"/v1/products/"+r+"/clients/"+t:"/v1/clients/"+t;return this.delete({uri:i,auth:a,headers:u,context:n})}},{key:"listProducts",value:function(e){var t=e.auth,r=e.headers,a=e.context;return this.get({uri:"/v1/products",auth:t,headers:r,context:a})}},{key:"getProduct",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t,auth:r,headers:a,context:u})}},{key:"listProductFirmware",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t+"/firmware",auth:r,headers:a,context:u})}},{key:"uploadProductFirmware",value:function(e){var t=e.file,r=e.version,a=e.title,u=e.description,n=e.product,i=e.auth,o=e.headers,s=e.context;return this.request({uri:"/v1/products/"+n+"/firmware",method:"post",auth:i,headers:o,form:{version:r,title:a,description:u},files:{"firmware.bin":t},context:s})}},{key:"getProductFirmware",value:function(e){var t=e.version,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.get({uri:"/v1/products/"+r+"/firmware/"+t,auth:a,headers:u,context:n})}},{key:"updateProductFirmware",value:function(e){var t=e.version,r=e.title,a=e.description,u=e.product,n=e.auth,i=e.headers,o=e.context,s="/v1/products/"+u+"/firmware/"+t;return this.put({uri:s,auth:n,headers:i,data:{title:r,description:a},context:o})}},{key:"downloadProductFirmware",value:function(e){var t=e.version,r=e.product,a=e.auth,u=e.headers,n=e.context,i=this.request({uri:"/v1/products/"+r+"/firmware/"+t+"/binary",method:"get",auth:a,headers:u,context:n,raw:!0});return this._provideFileData(i)}},{key:"_provideFileData",value:function(e){return e=this.agent.isForBrowser()?e.responseType("arraybuffer").then(function(e){return e.body=e.xhr.response,e}):e.buffer(!0).parse(_superagentBinaryParser2.default),e.then(function(e){return e.body})}},{key:"releaseProductFirmware",value:function(e){var t=e.version,r=e.product,a=e.auth,u=e.headers,n=e.context,i="/v1/products/"+r+"/firmware/release";return this.put({uri:i,auth:a,headers:u,data:{version:t},context:n})}},{key:"listTeamMembers",value:function(e){var t=e.product,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+t+"/team",auth:r,headers:a,context:u})}},{key:"inviteTeamMember",value:function(e){var t=e.username,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.post({uri:"/v1/products/"+r+"/team",auth:a,headers:u,data:{username:t},context:n})}},{key:"removeTeamMember",value:function(e){var t=e.username,r=e.product,a=e.auth,u=e.headers,n=e.context;return this.delete({uri:"/v1/products/"+r+"/team/"+t,auth:a,headers:u,context:n})}},{key:"lookupSerialNumber",value:function(e){var t=e.serialNumber,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/serial_numbers/"+t,auth:r,headers:a,context:u})}},{key:"createMeshNetwork",value:function(e){var t=e.name,r=e.deviceId,a=e.iccid,u=e.auth,n=e.headers,i=e.context;return this.post({uri:"/v1/networks",auth:u,headers:n,data:{name:t,device_id:r,iccid:a},context:i})}},{key:"removeMeshNetwork",value:function(e){var t=e.networkId,r=e.auth,a=e.headers,u=e.context;return this.delete({uri:"/v1/networks/"+t,auth:r,headers:a,context:u})}},{key:"listMeshNetworks",value:function(e){var t=e.page,r=e.perPage,a=e.auth,u=e.headers,n=e.context,i=t?{page:t,per_page:r}:void 0;return this.get({uri:"/v1/networks",auth:a,headers:u,query:i,context:n})}},{key:"getMeshNetwork",value:function(e){var t=e.networkId,r=e.auth,a=e.headers,u=e.context;return this.get({uri:"/v1/networks/"+t,auth:r,headers:a,context:u})}},{key:"updateMeshNetwork",value:function(e){var t=e.networkId,r=e.action,a=e.deviceId,u=e.auth,n=e.headers,i=e.context;return this.put({uri:"/v1/networks/"+t,auth:u,headers:n,data:{action:r,device_id:a},context:i})}},{key:"addMeshNetworkDevice",value:function(e){var t=e.networkId,r=e.deviceId,a=e.auth,u=e.headers,n=e.context;return this.updateMeshNetwork({action:"add-device",networkId:t,deviceId:r,auth:a,headers:u,context:n})}},{key:"removeMeshNetworkDevice",value:function(e){var t=e.networkId,r=e.deviceId,a=e.auth,u=e.headers,n=e.context;return t?this.updateMeshNetwork({action:"remove-device",networkId:t,deviceId:r,auth:a,headers:u,context:n}):this.delete({uri:"/v1/devices/"+r+"/network",auth:a,headers:u,context:n})}},{key:"listMeshNetworkDevices",value:function(e){var t=e.networkId,r=e.role,a=e.page,u=e.perPage,n=e.auth,i=e.headers,o=e.context,s=r||a?{role:r,page:a,per_page:u}:void 0;return this.get({uri:"/v1/networks/"+t+"/devices",auth:n,headers:i,query:s,context:o})}},{key:"getProductConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.headers,u=e.context;return this.get({uri:"/v1/products/"+r+"/config",auth:t,headers:a,context:u})}},{key:"getProductConfigurationSchema",value:function(e){var t=e.auth,r=e.product,a=e.headers,u=void 0===a?{}:a,n=e.context;return u.accept="application/schema+json",this.get({uri:"/v1/products/"+r+"/config",auth:t,headers:u,context:n})}},{key:"getProductDeviceConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.deviceId,u=e.headers,n=e.context;return this.get({uri:"/v1/products/"+r+"/config/"+a,auth:t,headers:u,context:n})}},{key:"getProductDeviceConfigurationSchema",value:function(e){var t=e.auth,r=e.product,a=e.deviceId,u=e.headers,n=e.context;return u.accept="application/schema+json",this.get({uri:"/v1/products/"+r+"/config/"+a,auth:t,headers:u,context:n})}},{key:"setProductConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.config,u=e.headers,n=e.context;return this.put({uri:"/v1/products/"+r+"/config",auth:t,data:a,headers:u,context:n})}},{key:"setProductDeviceConfiguration",value:function(e){var t=e.auth,r=e.product,a=e.deviceId,u=e.config,n=e.headers,i=e.context;return this.put({uri:"/v1/products/"+r+"/config/"+a,data:u,auth:t,headers:n,context:i})}},{key:"getProductLocations",value:function(e){var t=e.auth,r=e.product,a=e.dateRange,u=e.rectBl,n=e.rectTr,i=e.deviceId,o=e.deviceName,s=e.groups,c=e.page,d=e.perPage,h=e.headers,v=e.context;return this.get({uri:"/v1/products/"+r+"/locations",query:{date_range:a,rect_bl:u,rect_tr:n,device_id:i,device_name:o,groups:s,page:c,per_page:d},auth:t,headers:h,context:v})}},{key:"getProductDeviceLocations",value:function(e){var t=e.auth,r=e.product,a=e.dateRange,u=e.rectBl,n=e.rectTr,i=e.deviceId,o=e.headers,s=e.context;return this.get({uri:"/v1/products/"+r+"/locations/"+i,query:{date_range:a,rect_bl:u,rect_tr:n},auth:t,headers:o,context:s})}},{key:"createLogicBlock",value:function(e){var t=e.auth,r=e.org,a=e.block,u=e.headers,n=e.context;return this.post({uri:"/v1/orgs/"+r+"/block",auth:t,data:{block:a},headers:u,context:n})}},{key:"getLogicBlock",value:function(e){var t=e.auth,r=e.org,a=e.blockId,u=e.headers,n=e.context;return this.get({uri:"/v1/orgs/"+r+"/block/"+a,auth:t,headers:u,context:n})}},{key:"updateLogicBlock",value:function(e){var t=e.auth,r=e.org,a=e.blockId,u=e.block,n=e.headers,i=e.context;return this.put({uri:"/v1/orgs/"+r+"/block/"+a,auth:t,data:{block:u},headers:n,context:i})}},{key:"patchLogicBlock",value:function(e){var t=e.auth,r=e.org,a=e.blockName,u=e.block,n=e.headers,i=e.context;return this.post({uri:"/v1/orgs/"+r+"/block/"+a,auth:t,data:{block:u},headers:n,context:i})}},{key:"deleteLogicBlock",value:function(e){var t=e.auth,r=e.org,a=e.blockId,u=e.headers,n=e.context;return this.delete({uri:"/v1/orgs/"+r+"/block/"+a,auth:t,headers:u,context:n})}},{key:"listLogicBlocks",value:function(e){var t=e.auth,r=e.org,a=e.headers,u=e.context;return this.get({uri:"/v1/orgs/"+r+"/block",auth:t,headers:a,context:u})}},{key:"listBlockRuns",value:function(e){var t=e.auth,r=e.org,a=e.blockId,u=e.headers,n=e.context;return this.get({uri:"/v1/orgs/"+r+"/block/"+a+"/run",auth:t,headers:u,context:n})}},{key:"getBlockRun",value:function(e){var t=e.auth,r=e.org,a=e.blockId,u=e.runId,n=e.headers,i=e.context;return this.get({uri:"/v1/orgs/"+r+"/block/"+a+"/run/"+u,auth:t,headers:n,context:i})}},{key:"getBlockRunLog",value:function(e){var t=e.auth,r=e.org,a=e.blockId,u=e.runId,n=e.headers,i=e.context;return this.get({uri:"/v1/orgs/"+r+"/block/"+a+"/run/"+u+"/logs",auth:t,headers:n,context:i})}},{key:"setDefaultAuth",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Must pass a non-empty string");this._defaultAuth=e}},{key:"_getActiveAuthToken",value:function(e){return e||this._defaultAuth}},{key:"deviceUri",value:function(e){var t=e.deviceId,r=e.product;return r?"/v1/products/"+r+"/devices/"+t:"/v1/devices/"+t}},{key:"get",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.query,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.get({uri:t,auth:r,headers:a,query:u,context:n})}},{key:"head",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.query,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.head({uri:t,auth:r,headers:a,query:u,context:n})}},{key:"post",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.data,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.post({uri:t,auth:r,headers:a,data:u,context:n})}},{key:"put",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.data,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.put({uri:t,auth:r,headers:a,data:u,context:n})}},{key:"delete",value:function(e){var t=e.uri,r=e.auth,a=e.headers,u=e.data,n=e.context;return n=this._buildContext(n),r=this._getActiveAuthToken(r),this.agent.delete({uri:t,auth:r,headers:a,data:u,context:n})}},{key:"request",value:function(e){return e.context=this._buildContext(e.context),e.auth=this._getActiveAuthToken(e.auth),this.agent.request(e)}},{key:"client",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new _Client2.default((0,_assign2.default)({api:this},e))}},{key:"setBaseUrl",value:function(e){this.baseUrl=e,this.agent.setBaseUrl(e)}}]),e}();Particle.prototype.removeAccessToken=Particle.prototype.deleteAccessToken,exports.default=Particle,module.exports=exports.default; },{"./Agent":1,"./Client":2,"./Defaults":3,"./EventStream":4,"./superagent-binary-parser":7,"babel-runtime/core-js/object/assign":10,"babel-runtime/helpers/classCallCheck":20,"babel-runtime/helpers/createClass":21}],7:[function(require,module,exports){ (function (Buffer){ "use strict";function binaryParser(e,r){var t=[];e.on("data",function(e){return t.push(e)}),e.on("end",function(){return r(null,Buffer.concat(t))})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=binaryParser,module.exports=exports.default; diff --git a/dist/particle.min.js.map b/dist/particle.min.js.map index 051a194..6c3a8c4 100644 --- a/dist/particle.min.js.map +++ b/dist/particle.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","lib/Agent.js","lib/Client.js","lib/Defaults.js","lib/EventStream.js","lib/Library.js","lib/Particle.js","lib/superagent-binary-parser.js","node_modules/babel-runtime/core-js/get-iterator.js","node_modules/babel-runtime/core-js/is-iterable.js","node_modules/babel-runtime/core-js/object/assign.js","node_modules/babel-runtime/core-js/object/create.js","node_modules/babel-runtime/core-js/object/define-property.js","node_modules/babel-runtime/core-js/object/entries.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/set-prototype-of.js","node_modules/babel-runtime/core-js/promise.js","node_modules/babel-runtime/core-js/symbol.js","node_modules/babel-runtime/core-js/symbol/iterator.js","node_modules/babel-runtime/helpers/classCallCheck.js","node_modules/babel-runtime/helpers/createClass.js","node_modules/babel-runtime/helpers/inherits.js","node_modules/babel-runtime/helpers/possibleConstructorReturn.js","node_modules/babel-runtime/helpers/slicedToArray.js","node_modules/babel-runtime/helpers/typeof.js","node_modules/base64-js/index.js","node_modules/buffer/index.js","node_modules/builtin-status-codes/browser.js","node_modules/core-js/library/fn/get-iterator.js","node_modules/core-js/library/fn/is-iterable.js","node_modules/core-js/library/fn/object/assign.js","node_modules/core-js/library/fn/object/create.js","node_modules/core-js/library/fn/object/define-property.js","node_modules/core-js/library/fn/object/entries.js","node_modules/core-js/library/fn/object/get-prototype-of.js","node_modules/core-js/library/fn/object/keys.js","node_modules/core-js/library/fn/object/set-prototype-of.js","node_modules/core-js/library/fn/promise.js","node_modules/core-js/library/fn/symbol/index.js","node_modules/core-js/library/fn/symbol/iterator.js","node_modules/core-js/library/modules/_a-function.js","node_modules/core-js/library/modules/_add-to-unscopables.js","node_modules/core-js/library/modules/_an-instance.js","node_modules/core-js/library/modules/_an-object.js","node_modules/core-js/library/modules/_array-includes.js","node_modules/core-js/library/modules/_classof.js","node_modules/core-js/library/modules/_cof.js","node_modules/core-js/library/modules/_core.js","node_modules/core-js/library/modules/_ctx.js","node_modules/core-js/library/modules/_defined.js","node_modules/core-js/library/modules/_descriptors.js","node_modules/core-js/library/modules/_dom-create.js","node_modules/core-js/library/modules/_enum-bug-keys.js","node_modules/core-js/library/modules/_enum-keys.js","node_modules/core-js/library/modules/_export.js","node_modules/core-js/library/modules/_fails.js","node_modules/core-js/library/modules/_for-of.js","node_modules/core-js/library/modules/_global.js","node_modules/core-js/library/modules/_has.js","node_modules/core-js/library/modules/_hide.js","node_modules/core-js/library/modules/_html.js","node_modules/core-js/library/modules/_ie8-dom-define.js","node_modules/core-js/library/modules/_invoke.js","node_modules/core-js/library/modules/_iobject.js","node_modules/core-js/library/modules/_is-array-iter.js","node_modules/core-js/library/modules/_is-array.js","node_modules/core-js/library/modules/_is-object.js","node_modules/core-js/library/modules/_iter-call.js","node_modules/core-js/library/modules/_iter-create.js","node_modules/core-js/library/modules/_iter-define.js","node_modules/core-js/library/modules/_iter-detect.js","node_modules/core-js/library/modules/_iter-step.js","node_modules/core-js/library/modules/_iterators.js","node_modules/core-js/library/modules/_library.js","node_modules/core-js/library/modules/_meta.js","node_modules/core-js/library/modules/_microtask.js","node_modules/core-js/library/modules/_new-promise-capability.js","node_modules/core-js/library/modules/_object-assign.js","node_modules/core-js/library/modules/_object-create.js","node_modules/core-js/library/modules/_object-dp.js","node_modules/core-js/library/modules/_object-dps.js","node_modules/core-js/library/modules/_object-gopd.js","node_modules/core-js/library/modules/_object-gopn-ext.js","node_modules/core-js/library/modules/_object-gopn.js","node_modules/core-js/library/modules/_object-gops.js","node_modules/core-js/library/modules/_object-gpo.js","node_modules/core-js/library/modules/_object-keys-internal.js","node_modules/core-js/library/modules/_object-keys.js","node_modules/core-js/library/modules/_object-pie.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/_perform.js","node_modules/core-js/library/modules/_promise-resolve.js","node_modules/core-js/library/modules/_property-desc.js","node_modules/core-js/library/modules/_redefine-all.js","node_modules/core-js/library/modules/_redefine.js","node_modules/core-js/library/modules/_set-proto.js","node_modules/core-js/library/modules/_set-species.js","node_modules/core-js/library/modules/_set-to-string-tag.js","node_modules/core-js/library/modules/_shared-key.js","node_modules/core-js/library/modules/_shared.js","node_modules/core-js/library/modules/_species-constructor.js","node_modules/core-js/library/modules/_string-at.js","node_modules/core-js/library/modules/_task.js","node_modules/core-js/library/modules/_to-absolute-index.js","node_modules/core-js/library/modules/_to-integer.js","node_modules/core-js/library/modules/_to-iobject.js","node_modules/core-js/library/modules/_to-length.js","node_modules/core-js/library/modules/_to-object.js","node_modules/core-js/library/modules/_to-primitive.js","node_modules/core-js/library/modules/_uid.js","node_modules/core-js/library/modules/_wks-define.js","node_modules/core-js/library/modules/_wks-ext.js","node_modules/core-js/library/modules/_wks.js","node_modules/core-js/library/modules/core.get-iterator-method.js","node_modules/core-js/library/modules/core.get-iterator.js","node_modules/core-js/library/modules/core.is-iterable.js","node_modules/core-js/library/modules/es6.array.iterator.js","node_modules/core-js/library/modules/es6.object.assign.js","node_modules/core-js/library/modules/es6.object.create.js","node_modules/core-js/library/modules/es6.object.define-property.js","node_modules/core-js/library/modules/es6.object.get-prototype-of.js","node_modules/core-js/library/modules/es6.object.keys.js","node_modules/core-js/library/modules/es6.object.set-prototype-of.js","node_modules/core-js/library/modules/es6.promise.js","node_modules/core-js/library/modules/es6.string.iterator.js","node_modules/core-js/library/modules/es6.symbol.js","node_modules/core-js/library/modules/es7.object.entries.js","node_modules/core-js/library/modules/es7.promise.finally.js","node_modules/core-js/library/modules/es7.promise.try.js","node_modules/core-js/library/modules/es7.symbol.async-iterator.js","node_modules/core-js/library/modules/es7.symbol.observable.js","node_modules/core-js/library/modules/web.dom.iterable.js","node_modules/events/events.js","node_modules/fast-safe-stringify/index.js","node_modules/ieee754/index.js","node_modules/isarray/index.js","node_modules/process/browser.js","node_modules/punycode/punycode.js","node_modules/querystring-es3/decode.js","node_modules/querystring-es3/encode.js","node_modules/querystring-es3/index.js","node_modules/stream-http/index.js","node_modules/stream-http/lib/capability.js","node_modules/stream-http/lib/request.js","node_modules/stream-http/lib/response.js","node_modules/stream-http/node_modules/inherits/inherits_browser.js","node_modules/stream-http/node_modules/readable-stream/errors-browser.js","node_modules/stream-http/node_modules/readable-stream/lib/_stream_duplex.js","node_modules/stream-http/node_modules/readable-stream/lib/_stream_passthrough.js","node_modules/stream-http/node_modules/readable-stream/lib/_stream_readable.js","node_modules/stream-http/node_modules/readable-stream/lib/_stream_transform.js","node_modules/stream-http/node_modules/readable-stream/lib/_stream_writable.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/async_iterator.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/buffer_list.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/destroy.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/from-browser.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/pipeline.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/state.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/stream-browser.js","node_modules/stream-http/node_modules/readable-stream/readable-browser.js","node_modules/stream-http/node_modules/safe-buffer/index.js","node_modules/stream-http/node_modules/string_decoder/lib/string_decoder.js","node_modules/stream-http/node_modules/xtend/immutable.js","node_modules/superagent-prefix/index.js","node_modules/superagent/lib/agent-base.js","node_modules/superagent/lib/client.js","node_modules/superagent/lib/is-object.js","node_modules/superagent/lib/request-base.js","node_modules/superagent/lib/response-base.js","node_modules/superagent/lib/utils.js","node_modules/superagent/node_modules/component-emitter/index.js","node_modules/url/url.js","node_modules/url/util.js","node_modules/util-deprecate/browser.js"],"names":["_interopRequireDefault","obj","__esModule","default","Object","defineProperty","exports","value","_keys","require","_keys2","_slicedToArray2","_slicedToArray3","_entries","_entries2","_getIterator2","_getIterator3","_assign","_assign2","_promise","_promise2","_classCallCheck2","_classCallCheck3","_createClass2","_createClass3","_superagent","_superagent2","_superagentPrefix","_superagentPrefix2","Agent","baseUrl","this","setBaseUrl","key","prefix","_ref","uri","auth","headers","query","context","request","method","_ref2","_ref3","data","_ref4","_ref5","_ref6","_ref6$headers","undefined","_ref6$data","_ref6$query","_ref6$form","form","_ref6$files","files","_ref6$context","_ref6$raw","raw","requestFiles","_sanitizeFiles","_request","_ref7","req","_buildRequest","_promiseResponse","_this","fulfill","reject","_sendRequest","end","error","res","body","url","statusCode","status","errorDescription","shortErrorDescription","error_description","reason","Error","_ref8","_ref8$makerequest","makerequest","use","_authorizationHeader","_applyContext","set","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","next","done","_step$value","name","file","options","filepath","path","isForBrowser","attach","err","return","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","_iterator2","_step2$value","field","type","send","arguments","length","getXHR","tool","_addToolContext","project","_addProjectContext","_toolIdent","components","_iteratorNormalCompletion3","_didIteratorError3","_iteratorError3","_step3","_iterator3","component","_nameAtVersion","version","_buildSemicolonSeparatedProperties","primaryProperty","prop","hasOwnProperty","username","password","Authorization","forEach","k","i","module","_Particle","_Particle2","_Library","_Library2","Client","_ref$api","api","Boolean","listLibraries","then","payload","map","l","_this2","getLibrary","library","_this3","getLibraryVersions","archive","_this4","contributeLibrary","_throwError","_this5","publishLibrary","_this6","force","deleteLibrary","errors","errorMessages","e","message","join","downloadFile","platformId","targetVersion","compileCode","signal","deviceId","signalDevice","listDevices","listBuildTargets","onlyFeatured","targets","target","platforms","platform","push","prerelease","prereleases","indexOf","firmware_vendor","_ref4$full","full","trackingIdentity","clientSecret","clientId","tokenDuration","_getPrototypeOf","_getPrototypeOf2","_possibleConstructorReturn2","_possibleConstructorReturn3","_inherits2","_inherits3","_http","_http2","_https","_https2","_url","_url2","_events","EventStream","_EventEmitter","token","__proto__","call","reconnectInterval","timeout","buf","parse","bind","idleTimeoutExpired","resolve","_url$parse","hostname","protocol","port","origin","isSecure","requestor","parseInt","mode","connected","connectionTimeout","setTimeout","abort","on","clearTimeout","chunk","JSON","once","startIdleTimeout","removeAllListeners","event","param","emit","emitSafe","stopIdleTimeout","reconnect","isOffline","connect","catch","navigator","onLine","idleTimeout","pos","discardTrailingNewline","lineLength","fieldLength","c","parseEventStreamLine","slice","eventName","step","valueLength","EventEmitter","Library","client","_assignAttributes","downloadUrl","links","download","attributes","_superagentBinaryParser","_superagentBinaryParser2","_Defaults","_Defaults2","_EventStream","_EventStream2","_Agent","_Agent2","_Client","_Client2","Particle","setDefaultAuth","agent","_isValidContext","_ref$tokenDuration","grant_type","client_id","client_secret","expires_in","mfaToken","otp","mfa_token","get","_ref4$invalidateToken","invalidateTokens","invalidate_tokens","post","currentPassword","put","current_password","email","product","accountInfo","account_info","_ref9","_ref10","_ref11","delete","access_token","_ref12","_ref13","_ref14","_ref15","_ref16","_ref16$full","tracking","_ref17","deviceName","groups","sortAttr","sortDir","page","perPage","Array","isArray","per_page","_ref18","deviceUri","_ref19","requestTransfer","id","request_transfer","_ref20","_ref21","deny","_ref22","_ref23","updateDevice","_ref24","_ref25","notes","_ref26","_ref26$development","development","_ref27","desiredFirmwareVersion","flash","_ref28","_ref29","desired_firmware_version","_ref30","productId","product_id","_ref31","iccid","_ref32","promoCode","_ref33","_ref34","_ref35","build_target_version","latest","_ref36","console","warning","app","_ref37","platform_id","_ref38","binaryId","_provideFileData","_ref39","algorithm","deviceID","publicKey","toString","filename","order","Date","now","_ref40","argument","args","_ref41","org","toLowerCase","encodeURIComponent","_getActiveAuthToken","_ref42","isPrivate","postData","private","_ref43","device","rejectUnauthorized","noDefaults","hook","requestType","json","responseTemplate","responseTopic","responseEvent","errorResponseTopic","errorResponseEvent","_ref44","hookId","_ref45","_ref46","settings","deviceid","_ref47","integrationId","_ref48","_ref49","_ref50","_ref51","_ref52","_ref52$invalidateToke","_ref53","_ref53$invalidateToke","_ref54","_ref55","_ref56","_ref57","head","_ref58","iccids","country","sims","action","_ref59","_ref60","mbLimit","mb_limit","_ref61","_ref62","_ref63","featured","_ref64","limit","filter","sort","architectures","category","scope","excludeScopes","_asList","_ref65","_ref66","_ref67","archive.tar.gz","_ref68","visibility","_ref69","_ref70","_ref71","_ref72","redirect_uri","_ref73","_ref74","_ref75","_ref76","_ref77","_ref78","title","description","firmware.bin","_ref79","_ref80","_ref81","responseType","xhr","response","buffer","_ref82","_ref83","_ref84","_ref85","_ref86","serialNumber","_ref87","device_id","_ref88","networkId","_ref89","_ref90","_ref91","_ref92","updateMeshNetwork","_ref93","_ref94","role","_ref95","_ref96","_ref96$headers","accept","_ref97","_ref98","_ref99","config","_ref100","_ref101","dateRange","rectBl","rectTr","date_range","rect_bl","rect_tr","device_name","_ref102","_defaultAuth","_ref103","_ref104","_buildContext","_ref105","_ref106","_ref107","_ref108","prototype","removeAccessToken","deleteAccessToken","binaryParser","fn","Buffer","concat","instance","Constructor","TypeError","_defineProperty","_defineProperty2","defineProperties","props","descriptor","enumerable","configurable","writable","protoProps","staticProps","_setPrototypeOf","_setPrototypeOf2","_create","_create2","_typeof2","_typeof3","subClass","superClass","constructor","self","ReferenceError","_isIterable2","_isIterable3","sliceIterator","arr","_arr","_n","_d","_e","_s","_i","_symbol","_symbol2","_typeof","placeHoldersCount","b64","len","byteLength","toByteArray","tmp","placeHolders","Arr","L","revLookup","charCodeAt","tripletToBase64","num","lookup","encodeChunk","uint8","start","output","fromByteArray","extraBytes","parts","len2","Uint8Array","code","typedArraySupport","foo","subarray","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","arg","encodingOrOffset","allocUnsafe","from","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","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","b","n","m","bidirectionalIndexOf","val","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","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","str","stringtrim","replace","INVALID_BASE64_RE","trim","units","Infinity","leadSurrogate","byteArray","hi","lo","src","dst","INSPECT_MAX_BYTES","global","poolSize","_augment","Symbol","species","allocUnsafeSlow","_isBuffer","compare","a","x","y","list","swap16","swap32","swap64","equals","inspect","match","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","floor","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","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","451","500","501","502","503","504","505","506","507","508","509","510","511","assign","$Object","P","D","create","it","desc","entries","getPrototypeOf","keys","setPrototypeOf","Promise","f","forbiddenField","isObject","toIObject","toLength","toAbsoluteIndex","IS_INCLUDES","$this","el","fromIndex","O","index","cof","TAG","ARG","tryGet","T","B","callee","core","__e","aFunction","document","is","createElement","split","getKeys","gOPS","pIE","result","getSymbols","symbols","isEnum","ctx","hide","PROTOTYPE","$export","source","own","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","S","IS_PROTO","IS_BIND","IS_WRAP","W","expProto","C","Function","virtual","R","U","exec","isArrayIter","anObject","getIterFn","BREAK","RETURN","iterable","ITERATOR","iterator","iterFn","window","__g","dP","createDesc","object","documentElement","un","propertyIsEnumerable","Iterators","ArrayProto","setToStringTag","IteratorPrototype","NAME","LIBRARY","redefine","has","$iterCreate","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Base","DEFAULT","IS_SET","FORCED","methods","getMethod","kind","proto","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","values","SAFE_CLOSING","riter","skipClosing","safe","iter","META","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","KEY","macrotask","Observer","MutationObserver","WebKitMutationObserver","process","isNode","last","notify","flush","parent","domain","exit","enter","nextTick","toggle","node","createTextNode","observe","characterData","promise","task","PromiseCapability","$$resolve","$$reject","toObject","IObject","$assign","A","K","aLen","dPs","enumBugKeys","IE_PROTO","Empty","createDict","iframeDocument","iframe","style","display","appendChild","contentWindow","open","lt","close","Properties","IE8_DOM_DEFINE","toPrimitive","Attributes","gOPD","getOwnPropertyDescriptor","gOPN","windowNames","getOwnPropertyNames","getWindowNames","$keys","hiddenKeys","getOwnPropertySymbols","ObjectProto","names","fails","exp","isEntries","v","newPromiseCapability","promiseCapability","bitmap","check","test","buggy","DESCRIPTORS","SPECIES","def","tag","stat","shared","uid","SHARED","store","toInteger","defined","TO_STRING","s","charAt","invoke","html","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","Dispatch","counter","queue","ONREADYSTATECHANGE","defer","channel","run","listener","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","clear","ceil","valueOf","px","random","wksExt","$Symbol","USE_SYMBOL","$exports","classof","getIteratorMethod","getIterator","isIterable","addToUnscopables","iterated","_t","_k","Arguments","$getPrototypeOf","anInstance","forOf","speciesConstructor","microtask","newPromiseCapabilityModule","perform","promiseResolve","PROMISE","$Promise","empty","Internal","newGenericPromiseCapability","OwnPromiseCapability","Wrapper","USE_NATIVE","FakePromise","PromiseRejectionEvent","isThenable","isReject","chain","_c","_v","ok","reaction","handler","fail","_h","onHandleUnhandled","onUnhandled","unhandled","isUnhandled","onunhandledrejection","_a","onrejectionhandled","$reject","_w","$resolve","wrapper","executor","onFulfilled","onRejected","r","capability","all","$index","alreadyCalled","race","$at","point","$fails","wks","wksDefine","enumKeys","gOPNExt","$GOPD","$DP","$JSON","_stringify","stringify","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","QObject","setter","findChild","setSymbolDesc","protoDesc","wrap","sym","isSymbol","$defineProperty","$defineProperties","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","es6Symbols","wellKnownSymbols","for","keyFor","useSetter","useSimple","replacer","$replacer","finally","onFinally","isFunction","try","callbackfn","TO_STRING_TAG","DOMIterables","Collection","_maxListeners","isNumber","isUndefined","defaultMaxListeners","setMaxListeners","er","listeners","addListener","newListener","warned","trace","g","removeListener","fired","position","splice","listenerCount","evlistener","emitter","spacer","decirc","replacerStack","replaceGetterValues","part","pop","stack","propertyDescriptor","compareFunction","deterministicStringify","deterministicDecirc","stable","stableStringify","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","NaN","rt","abs","log","LN2","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","Item","noop","browser","env","argv","versions","off","prependListener","prependOnceListener","binding","cwd","chdir","umask","root","mapDomain","regexSeparators","ucs2decode","extra","ucs2encode","stringFromCharCode","basicToDigit","base","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","damp","baseMinusTMin","tMax","skew","decode","input","basic","oldi","t","baseMinusT","inputLength","initialN","bias","initialBias","delimiter","maxInt","tMin","encode","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","toUnicode","regexPunycode","toASCII","regexNonASCII","freeExports","nodeType","freeModule","freeGlobal","punycode","overflow","not-basic","invalid-input","ucs2","define","amd","qs","sep","eq","regexp","maxKeys","kstr","vstr","idx","decodeURIComponent","xs","stringifyPrimitive","objectKeys","ks","ClientRequest","extend","statusCodes","http","opts","cb","defaultProtocol","location","search","host","toUpperCase","IncomingMessage","defaultMaxSockets","globalAgent","STATUS_CODES","METHODS","XMLHttpRequest","XDomainRequest","checkTypeSupport","fetch","ReadableStream","writableStream","WritableStream","abortController","AbortController","arraybuffer","msstream","mozchunkedarraybuffer","overrideMimeType","decideMode","preferBinary","useFetch","statusValid","inherits","stream","rStates","readyStates","Writable","_opts","_body","_headers","setHeader","_mode","_fetchTimer","_socketTimeout","_socketTimer","_onFinish","lowerName","unsafeHeaders","getHeader","header","removeHeader","_destroyed","headersObj","Blob","headersList","keyName","controller","_fetchAbortController","requestTimeout","credentials","withCredentials","_fetchResponse","_resetTimers","_connect","_xhr","ontimeout","setRequestHeader","_response","onreadystatechange","readyState","LOADING","DONE","_onXHRProgress","onprogress","onerror","_write","destroy","flushHeaders","setNoDelay","setSocketKeepAlive","UNSENT","OPENED","HEADERS_RECEIVED","resetTimers","reader","Readable","rawHeaders","trailers","rawTrailers","statusMessage","statusText","_resumeFetch","pipeTo","getReader","_pos","responseURL","getAllResponseHeaders","matches","_charset","mimeType","charsetMatch","_read","responseText","newData","MSStreamReader","onload","readAsArrayBuffer","ctor","superCtor","super_","TempCtor","_inheritsLoose","createErrorType","getMessage","arg1","arg2","arg3","NodeError","_Base","codes","oneOf","expected","thing","startsWith","endsWith","this_len","substring","determiner","msg","Duplex","allowHalfOpen","readable","onend","_writableState","ended","onEndNT","highWaterMark","getBuffer","_readableState","destroyed","PassThrough","Transform","_transform","_uint8ArrayToBuffer","_isUint8Array","OurUint8Array","unshift","ReadableState","isDuplex","objectMode","readableObjectMode","getHighWaterMark","BufferList","pipes","pipesCount","flowing","endEmitted","reading","sync","needReadable","emittedReadable","readableListening","resumeScheduled","paused","emitClose","autoDestroy","defaultEncoding","awaitDrain","readingMore","decoder","StringDecoder","_destroy","Stream","readableAddChunk","addToFront","skipChunkCheck","debug","state","onEofChunk","chunkInvalid","errorOrDestroy","ERR_STREAM_UNSHIFT_AFTER_END_EVENT","addChunk","ERR_STREAM_PUSH_AFTER_EOF","maybeReadMore","emitReadable","ERR_INVALID_ARG_TYPE","computeNewHighWaterMark","MAX_HWM","howMuchToRead","emitReadable_","flow","maybeReadMore_","pipeOnDrain","EElistenerCount","updateReadableListening","resume","nReadingNextTick","resume_","fromList","shift","first","consume","endReadable","endReadableNT","wState","finished","EE","debugUtil","debuglog","destroyImpl","_require","_require$codes","ERR_METHOD_NOT_IMPLEMENTED","createReadableStreamAsyncIterator","kProxyEvents","_undestroy","undestroy","isPaused","setEncoding","enc","p","content","nOrig","doRead","pipe","dest","pipeOpts","onunpipe","unpipeInfo","hasUnpiped","cleanup","onclose","onfinish","ondrain","unpipe","ondata","cleanedUp","needDrain","pause","doEnd","stdout","stderr","endFn","dests","ev","asyncIterator","_fromList","afterTransform","ts","_transformState","transforming","writecb","ERR_MULTIPLE_CALLBACK","writechunk","rs","needTransform","writeencoding","transform","_flush","prefinish","ERR_TRANSFORM_WITH_LENGTH_0","ERR_TRANSFORM_ALREADY_TRANSFORMING","err2","WriteReq","callback","CorkedRequest","entry","finish","onCorkedFinish","nop","WritableState","writableObjectMode","finalCalled","ending","noDecode","decodeStrings","writing","corked","bufferProcessing","onwrite","writelen","bufferedRequest","lastBufferedRequest","pendingcb","prefinished","errorEmitted","bufferedRequestCount","corkedRequestsFree","realHasInstance","writev","_writev","final","_final","writeAfterEnd","ERR_STREAM_WRITE_AFTER_END","validChunk","ERR_STREAM_NULL_VALUES","decodeChunk","writeOrBuffer","isBuf","newChunk","doWrite","ERR_STREAM_DESTROYED","onwriteError","finishMaybe","onwriteStateUpdate","needFinish","clearBuffer","afterWrite","onwriteDrain","holder","count","allBuffers","callFinal","need","rState","endWritable","corkReq","internalUtil","deprecate","ERR_STREAM_CANNOT_PIPE","ERR_UNKNOWN_ENCODING","current","_","hasInstance","cork","uncork","setDefaultEncoding","createIterResult","readAndResolve","kLastResolve","kStream","kLastPromise","kLastReject","onReadable","wrapForNext","lastPromise","kEnded","kHandlePromise","_Object$setPrototypeO","kError","AsyncIteratorPrototype","ReadableStreamAsyncIteratorPrototype","_Object$create","ownKeys","enumerableOnly","_objectSpread","getOwnPropertyDescriptors","_classCallCheck","_defineProperties","_createClass","copyBuffer","_require2","custom","tail","hasStrings","_getString","_getBuffer","nb","depth","customInspect","readableDestroyed","writableDestroyed","emitErrorNT","emitCloseNT","emitErrorAndCloseNT","called","_len","_key","isRequest","eos","onlegacyfinish","writableEnded","readableEnded","ERR_STREAM_PREMATURE_CLOSE","onrequest","destroyer","closed","to","popCallback","streams","pipeline","ERR_MISSING_ARGS","destroys","reduce","highWaterMarkFrom","duplexKey","hwm","ERR_INVALID_OPT_VALUE","copyProps","SafeBuffer","_normalizeEncoding","retried","normalizeEncoding","nenc","text","utf16Text","utf16End","fillLast","utf8FillLast","base64Text","base64End","simpleWrite","simpleEnd","lastNeed","lastTotal","lastChar","utf8CheckByte","byte","utf8CheckIncomplete","utf8CheckExtraBytes","utf8Text","total","utf8End","_defaults","_setDefaults","_toConsumableArray","serialize","pairs","pushEncodedKeyValuePair","subkey","parseString","pair","parseHeader","line","lines","fields","isJSON","mime","Response","_setStatusProperties","getResponseHeader","_setHeaderProperties","_responseType","_parseBody","Request","_query","_header","err_","original","rawResponse","new_err","_isResponseOK","del","warn","Emitter","safeStringify","RequestBase","ResponseBase","ActiveXObject","_unused","_unused2","_unused3","_unused4","serializeObject","types","xml","urlencoded","form-data","application/x-www-form-urlencoded","application/json","_parser","toError","user","pass","btoa","encoder","_auth","_data","_getFormData","append","_formData","FormData","_shouldRetry","_retry","_callback","_maxRetries","retries","_retries","crossDomainError","crossDomain","ca","_isHost","_endCalled","_finalizeQueryString","_end","_setUploadTimeout","_uploadTimeout","_uploadTimeoutTimer","_timeoutError","_aborted","_setTimeouts","_responseTimeoutTimer","_unused5","timedout","handleProgress","direction","percent","loaded","hasListeners","upload","_unused6","_withCredentials","contentType","_serializer","patch","mixin","_timer","_timeout","_responseTimeout","option","deadline","retry","_retryCallback","ERROR_CODES","override","_fullfilledPromise","_okCallback","unset","base64Encoder","redirects","_maxRedirects","maxResponseSize","_maxResponseSize","isObj","sortQuery","_sort","queryArr","_appendQueryString","errno","utils","ct","params","link","parseLinks","statusType","info","redirect","clientError","serverError","created","accepted","noContent","badRequest","unauthorized","notAcceptable","forbidden","notFound","unprocessableEntity","cleanHeader","changesOrigin","authorization","cookie","_callbacks","removeEventListener","callbacks","Url","slashes","hash","pathname","href","urlParse","parseQueryString","slashesDenoteHost","util","u","urlFormat","isString","format","urlResolve","relative","urlResolveObject","resolveObject","protocolPattern","portPattern","simplePathPattern","delims","unwise","autoEscape","nonHostChars","hostEndingChars","hostnameMaxLen","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","https","ftp","gopher","http:","https:","ftp:","gopher:","file:","querystring","queryIndex","splitter","uSplit","slashRegex","rest","simplePath","lowerProto","hostEnd","hec","atSign","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","h","ae","esc","escape","qm","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","isNullOrUndefined","authInHost","isNull","hasTrailingSlash","up","isAbsolute","deprecated","localStorage"],"mappings":"AAAA;ACAA,YA8CA,SAASA,wBAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,GA5CvFG,OAAOC,eAAeC,QAAS,cAC9BC,OAAO,GAGR,IAAIC,OAAQC,QAAQ,qCAEhBC,OAASV,uBAAuBQ,OAEhCG,gBAAkBF,QAAQ,uCAE1BG,gBAAkBZ,uBAAuBW,iBAEzCE,SAAWJ,QAAQ,wCAEnBK,UAAYd,uBAAuBa,UAEnCE,cAAgBN,QAAQ,sCAExBO,cAAgBhB,uBAAuBe,eAEvCE,QAAUR,QAAQ,uCAElBS,SAAWlB,uBAAuBiB,SAElCE,SAAWV,QAAQ,iCAEnBW,UAAYpB,uBAAuBmB,UAEnCE,iBAAmBZ,QAAQ,wCAE3Ba,iBAAmBtB,uBAAuBqB,kBAE1CE,cAAgBd,QAAQ,qCAExBe,cAAgBxB,uBAAuBuB,eAEvCE,YAAchB,QAAQ,cAEtBiB,aAAe1B,uBAAuByB,aAEtCE,kBAAoBlB,QAAQ,qBAE5BmB,mBAAqB5B,uBAAuB2B,mBAuB5CE,MAAQ,WACX,QAASA,GA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BACT,MAAOuB,EAGT,IAAIyqB,IAAS,CAeb,OAAOowB,GAWT,QAASp8C,QAAQvZ,GAEf,IACE,IAAK0mB,OAAOkvC,aAAc,OAAO,EACjC,MAAO9T,GACP,OAAO,EAET,GAAI//B,GAAM2E,OAAOkvC,aAAa51D,EAC9B,OAAI,OAAQ+hB,GACyB,SAA9BU,OAAOV,GAAK1P,cA5DrBxP,OAAOzI,QAAUsnD","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.\n ******************************************************************************\n */\n\nvar Agent = function () {\n\tfunction Agent(baseUrl) {\n\t\t(0, _classCallCheck3.default)(this, Agent);\n\n\t\tthis.setBaseUrl(baseUrl);\n\t}\n\n\t(0, _createClass3.default)(Agent, [{\n\t\tkey: 'setBaseUrl',\n\t\tvalue: function setBaseUrl(baseUrl) {\n\t\t\tthis.prefix = (0, _superagentPrefix2.default)(baseUrl);\n\t\t}\n\t}, {\n\t\tkey: 'get',\n\t\tvalue: function get(_ref) {\n\t\t\tvar uri = _ref.uri,\n\t\t\t auth = _ref.auth,\n\t\t\t headers = _ref.headers,\n\t\t\t query = _ref.query,\n\t\t\t context = _ref.context;\n\n\t\t\treturn this.request({ uri: uri, method: 'get', auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'head',\n\t\tvalue: function head(_ref2) {\n\t\t\tvar uri = _ref2.uri,\n\t\t\t auth = _ref2.auth,\n\t\t\t headers = _ref2.headers,\n\t\t\t query = _ref2.query,\n\t\t\t context = _ref2.context;\n\n\t\t\treturn this.request({ uri: uri, method: 'head', auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'post',\n\t\tvalue: function post(_ref3) {\n\t\t\tvar uri = _ref3.uri,\n\t\t\t headers = _ref3.headers,\n\t\t\t data = _ref3.data,\n\t\t\t auth = _ref3.auth,\n\t\t\t context = _ref3.context;\n\n\t\t\treturn this.request({ uri: uri, method: 'post', auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'put',\n\t\tvalue: function put(_ref4) {\n\t\t\tvar uri = _ref4.uri,\n\t\t\t auth = _ref4.auth,\n\t\t\t headers = _ref4.headers,\n\t\t\t data = _ref4.data,\n\t\t\t context = _ref4.context;\n\n\t\t\treturn this.request({ uri: uri, method: 'put', auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'delete',\n\t\tvalue: function _delete(_ref5) {\n\t\t\tvar uri = _ref5.uri,\n\t\t\t auth = _ref5.auth,\n\t\t\t headers = _ref5.headers,\n\t\t\t data = _ref5.data,\n\t\t\t context = _ref5.context;\n\n\t\t\treturn this.request({ uri: uri, method: 'delete', auth: auth, headers: headers, data: data, context: context });\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 {Object} headers Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\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 * @parma {Object} context the invocation context, describing the tool and project.\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(_ref6) {\n\t\t\tvar uri = _ref6.uri,\n\t\t\t method = _ref6.method,\n\t\t\t _ref6$headers = _ref6.headers,\n\t\t\t headers = _ref6$headers === undefined ? undefined : _ref6$headers,\n\t\t\t _ref6$data = _ref6.data,\n\t\t\t data = _ref6$data === undefined ? undefined : _ref6$data,\n\t\t\t auth = _ref6.auth,\n\t\t\t _ref6$query = _ref6.query,\n\t\t\t query = _ref6$query === undefined ? undefined : _ref6$query,\n\t\t\t _ref6$form = _ref6.form,\n\t\t\t form = _ref6$form === undefined ? undefined : _ref6$form,\n\t\t\t _ref6$files = _ref6.files,\n\t\t\t files = _ref6$files === undefined ? undefined : _ref6$files,\n\t\t\t _ref6$context = _ref6.context,\n\t\t\t context = _ref6$context === undefined ? undefined : _ref6$context,\n\t\t\t _ref6$raw = _ref6.raw,\n\t\t\t raw = _ref6$raw === undefined ? false : _ref6$raw;\n\n\t\t\tvar requestFiles = this._sanitizeFiles(files);\n\t\t\treturn this._request({ uri: uri, method: method, headers: headers, data: data, auth: auth, query: query, form: form, context: context, files: requestFiles, raw: raw });\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 {Object} headers Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\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 * @param {Object} context the invocation context\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(_ref7) {\n\t\t\tvar uri = _ref7.uri,\n\t\t\t method = _ref7.method,\n\t\t\t headers = _ref7.headers,\n\t\t\t data = _ref7.data,\n\t\t\t auth = _ref7.auth,\n\t\t\t query = _ref7.query,\n\t\t\t form = _ref7.form,\n\t\t\t files = _ref7.files,\n\t\t\t context = _ref7.context,\n\t\t\t raw = _ref7.raw;\n\n\t\t\tvar req = this._buildRequest({ uri: uri, method: method, headers: headers, data: data, auth: auth, query: query, form: form, context: context, files: files });\n\n\t\t\tif (raw) {\n\t\t\t\treturn req;\n\t\t\t}\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\tvar shortErrorDescription = void 0;\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\tshortErrorDescription = 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, shortErrorDescription: shortErrorDescription, 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(_ref8) {\n\t\t\tvar uri = _ref8.uri,\n\t\t\t method = _ref8.method,\n\t\t\t headers = _ref8.headers,\n\t\t\t data = _ref8.data,\n\t\t\t auth = _ref8.auth,\n\t\t\t query = _ref8.query,\n\t\t\t form = _ref8.form,\n\t\t\t files = _ref8.files,\n\t\t\t context = _ref8.context,\n\t\t\t _ref8$makerequest = _ref8.makerequest,\n\t\t\t makerequest = _ref8$makerequest === undefined ? _superagent2.default : _ref8$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 (context) {\n\t\t\t\tthis._applyContext(req, context);\n\t\t\t}\n\t\t\tif (query) {\n\t\t\t\treq.query(query);\n\t\t\t}\n\t\t\tif (headers) {\n\t\t\t\treq.set(headers);\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\t\t\t\t\t\t name = _step$value[0],\n\t\t\t\t\t\t file = _step$value[1];\n\n\t\t\t\t\t\t// API for Form Data is different in Node and in browser\n\t\t\t\t\t\tvar options = {\n\t\t\t\t\t\t\tfilepath: file.path\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (this.isForBrowser(makerequest)) {\n\t\t\t\t\t\t\toptions = file.path;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treq.attach(name, file.data, options);\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\t\t\t\t\t\t\t name = _step2$value[0],\n\t\t\t\t\t\t\t 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\t}, {\n\t\tkey: 'isForBrowser',\n\t\tvalue: function isForBrowser() {\n\t\t\tvar makerequest = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _superagent2.default;\n\n\t\t\t// superagent only has the getXHR method in the browser version\n\t\t\treturn !!makerequest.getXHR;\n\t\t}\n\t}, {\n\t\tkey: '_applyContext',\n\t\tvalue: function _applyContext(req, context) {\n\t\t\tif (context.tool) {\n\t\t\t\tthis._addToolContext(req, context.tool);\n\t\t\t}\n\t\t\tif (context.project) {\n\t\t\t\tthis._addProjectContext(req, context.project);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: '_addToolContext',\n\t\tvalue: function _addToolContext(req, tool) {\n\t\t\tvar value = '';\n\t\t\tif (tool.name) {\n\t\t\t\tvalue += this._toolIdent(tool);\n\t\t\t\tif (tool.components) {\n\t\t\t\t\tvar _iteratorNormalCompletion3 = true;\n\t\t\t\t\tvar _didIteratorError3 = false;\n\t\t\t\t\tvar _iteratorError3 = undefined;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator3 = (0, _getIterator3.default)(tool.components), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n\t\t\t\t\t\t\tvar component = _step3.value;\n\n\t\t\t\t\t\t\tvalue += ', ' + this._toolIdent(component);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError3 = true;\n\t\t\t\t\t\t_iteratorError3 = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion3 && _iterator3.return) {\n\t\t\t\t\t\t\t\t_iterator3.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 (_didIteratorError3) {\n\t\t\t\t\t\t\t\tthrow _iteratorError3;\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}\n\t\t\tif (value) {\n\t\t\t\treq.set('X-Particle-Tool', value);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: '_toolIdent',\n\t\tvalue: function _toolIdent(tool) {\n\t\t\treturn this._nameAtVersion(tool.name, tool.version);\n\t\t}\n\t}, {\n\t\tkey: '_nameAtVersion',\n\t\tvalue: function _nameAtVersion(name, version) {\n\t\t\tvar value = '';\n\t\t\tif (name) {\n\t\t\t\tvalue += name;\n\t\t\t\tif (version) {\n\t\t\t\t\tvalue += '@' + version;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}, {\n\t\tkey: '_addProjectContext',\n\t\tvalue: function _addProjectContext(req, project) {\n\t\t\tvar value = this._buildSemicolonSeparatedProperties(project, 'name');\n\t\t\tif (value) {\n\t\t\t\treq.set('X-Particle-Project', value);\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Creates a string like primaryPropertyValue; name=value; name1=value\n * from the properties of an object.\n * @param {object} obj The object to create the string from\n * @param {string} primaryProperty The name of the primary property which is the default value and must be defined.\n * @private\n * @return {string} The formatted string representing the object properties and the default property.\n */\n\n\t}, {\n\t\tkey: '_buildSemicolonSeparatedProperties',\n\t\tvalue: function _buildSemicolonSeparatedProperties(obj, primaryProperty) {\n\t\t\tvar value = '';\n\t\t\tif (obj[primaryProperty]) {\n\t\t\t\tvalue += obj[primaryProperty];\n\t\t\t\tfor (var prop in obj) {\n\t\t\t\t\tif (prop !== primaryProperty && obj.hasOwnProperty(prop)) {\n\t\t\t\t\t\tvalue += '; ' + prop + '=' + obj[prop];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value;\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\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 _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 _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\t _ref$api = _ref.api,\n\t\t 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(0, _createClass3.default)(Client, [{\n\t\tkey: 'ready',\n\t\tvalue: function ready() {\n\t\t\treturn Boolean(this.auth);\n\t\t}\n\n\t\t/**\n * Get firmware library objects\n * @param {Object} query The query parameters for libraries. See Particle.listLibraries\n * @returns {Promise} A promise\n */\n\n\t}, {\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 * @returns {Promise} A 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 * Get list of library versions\n * @param {String} name Name of the library to fetch\n * @param {Object} query The query parameters for versions. See Particle.getLibraryVersions\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'libraryVersions',\n\t\tvalue: function libraryVersions(name) {\n\t\t\tvar _this3 = this;\n\n\t\t\tvar query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\t\treturn this.api.getLibraryVersions((0, _assign2.default)({}, query, { name: name, 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(_this3, l);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Contribute a new library version\n * @param {Buffer} archive The compressed archive with the library source\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'contributeLibrary',\n\t\tvalue: function contributeLibrary(archive) {\n\t\t\tvar _this4 = this;\n\n\t\t\treturn this.api.contributeLibrary({ 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(_this4, library);\n\t\t\t}, function (error) {\n\t\t\t\t_this4._throwError(error);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Make the the most recent private library version public\n * @param {string} name The name of the library to publish\n * @return {Promise} To publish the library\n */\n\n\t}, {\n\t\tkey: 'publishLibrary',\n\t\tvalue: function publishLibrary(name) {\n\t\t\tvar _this5 = this;\n\n\t\t\treturn this.api.publishLibrary({ 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(_this5, library);\n\t\t\t}, function (error) {\n\t\t\t\t_this5._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 * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteLibrary',\n\t\tvalue: function deleteLibrary(_ref2) {\n\t\t\tvar _this6 = this;\n\n\t\t\tvar name = _ref2.name,\n\t\t\t force = _ref2.force;\n\n\t\t\treturn this.api.deleteLibrary({ name: name, force: force, auth: this.auth }).then(function () {\n\t\t\t\treturn true;\n\t\t\t}, function (error) {\n\t\t\t\treturn _this6._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(uri) {\n\t\t\treturn this.api.downloadFile({ uri: uri });\n\t\t}\n\n\t\t/**\n * @param {Object} files Object containing files to be compiled\n * @param {Number} platformId Platform id number of the device you are compiling for\n * @param {String} targetVersion System firmware version to compile against\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n\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\n\t\t/**\n * @param {String} $0.deviceId Device ID or Name\n * @param {Boolean} $0.signal Signal on or off\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n\n\t}, {\n\t\tkey: 'signalDevice',\n\t\tvalue: function signalDevice(_ref3) {\n\t\t\tvar signal = _ref3.signal,\n\t\t\t deviceId = _ref3.deviceId;\n\n\t\t\treturn this.api.signalDevice({ signal: signal, deviceId: deviceId, auth: this.auth });\n\t\t}\n\n\t\t/**\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n\n\t}, {\n\t\tkey: 'listDevices',\n\t\tvalue: function listDevices() {\n\t\t\treturn this.api.listDevices({ auth: this.auth });\n\t\t}\n\n\t\t/**\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n\n\t}, {\n\t\tkey: 'listBuildTargets',\n\t\tvalue: function listBuildTargets() {\n\t\t\treturn this.api.listBuildTargets({ onlyFeatured: true, auth: this.auth }).then(function (payload) {\n\t\t\t\tvar targets = [];\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)(payload.body.targets), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\tvar target = _step.value;\n\t\t\t\t\t\tvar _iteratorNormalCompletion2 = true;\n\t\t\t\t\t\tvar _didIteratorError2 = false;\n\t\t\t\t\t\tvar _iteratorError2 = undefined;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (var _iterator2 = (0, _getIterator3.default)(target.platforms), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\t\t\t\t\tvar platform = _step2.value;\n\n\t\t\t\t\t\t\t\ttargets.push({\n\t\t\t\t\t\t\t\t\tversion: target.version,\n\t\t\t\t\t\t\t\t\tplatform: platform,\n\t\t\t\t\t\t\t\t\tprerelease: target.prereleases.indexOf(platform) > -1,\n\t\t\t\t\t\t\t\t\tfirmware_vendor: target.firmware_vendor\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t\t\t\t_iteratorError2 = err;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tif (_didIteratorError2) {\n\t\t\t\t\t\t\t\t\tthrow _iteratorError2;\n\t\t\t\t\t\t\t\t}\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} 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\treturn targets;\n\t\t\t}, function () {});\n\t\t}\n\t}, {\n\t\tkey: 'trackingIdentity',\n\t\tvalue: function trackingIdentity() {\n\t\t\tvar _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t\t\t _ref4$full = _ref4.full,\n\t\t\t full = _ref4$full === undefined ? false : _ref4$full,\n\t\t\t context = _ref4.context;\n\n\t\t\treturn this.api.trackingIdentity({ full: full, context: context, auth: this.auth }).then(function (payload) {\n\t\t\t\treturn payload.body;\n\t\t\t});\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});\nexports.default = {\n\tbaseUrl: 'https://api.particle.io',\n\tclientSecret: 'particle-api',\n\tclientId: 'particle-api',\n\ttokenDuration: 7776000, // 90 days\n\tauth: undefined\n};\nmodule.exports = exports['default'];\n//# sourceMappingURL=Defaults.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 _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) {\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_this.timeout = 13000; // keep alive can be sent up to 12 seconds after last event\n\t\t_this.data = '';\n\t\t_this.buf = '';\n\n\t\t_this.parse = _this.parse.bind(_this);\n\t\t_this.end = _this.end.bind(_this);\n\t\t_this.idleTimeoutExpired = _this.idleTimeoutExpired.bind(_this);\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\t\t\t\t hostname = _url$parse.hostname,\n\t\t\t\t protocol = _url$parse.protocol,\n\t\t\t\t port = _url$parse.port,\n\t\t\t\t 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 + '?access_token=' + _this2.token,\n\t\t\t\t\tmethod: 'get',\n\t\t\t\t\tport: parseInt(port, 10) || (isSecure ? 443 : 80),\n\t\t\t\t\tmode: 'prefer-streaming'\n\t\t\t\t});\n\n\t\t\t\t_this2.req = req;\n\n\t\t\t\tvar connected = false;\n\t\t\t\tvar connectionTimeout = setTimeout(function () {\n\t\t\t\t\tif (_this2.req) {\n\t\t\t\t\t\t_this2.req.abort();\n\t\t\t\t\t}\n\t\t\t\t\treject({ error: new Error('Timeout'), errorDescription: 'Timeout connecting to ' + _this2.uri });\n\t\t\t\t}, _this2.timeout);\n\n\t\t\t\treq.on('error', function (e) {\n\t\t\t\t\tclearTimeout(connectionTimeout);\n\n\t\t\t\t\tif (connected) {\n\t\t\t\t\t\t_this2.end();\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject({ error: e, errorDescription: 'Network error from ' + _this2.uri });\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treq.on('response', function (res) {\n\t\t\t\t\tclearTimeout(connectionTimeout);\n\n\t\t\t\t\tvar statusCode = res.statusCode;\n\t\t\t\t\tif (statusCode !== 200) {\n\t\t\t\t\t\tvar body = '';\n\t\t\t\t\t\tres.on('data', function (chunk) {\n\t\t\t\t\t\t\treturn body += chunk;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tres.on('end', function () {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tbody = JSON.parse(body);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t// don't bother doing anything special if the JSON.parse fails\n\t\t\t\t\t\t\t\t// since we are already about to reject the promise anyway\n\t\t\t\t\t\t\t} finally {\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});\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t_this2.data = '';\n\t\t\t\t\t_this2.buf = '';\n\n\t\t\t\t\tconnected = true;\n\t\t\t\t\tres.on('data', _this2.parse);\n\t\t\t\t\tres.once('end', _this2.end);\n\t\t\t\t\t_this2.startIdleTimeout();\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\n\t\t/* Private methods */\n\n\t}, {\n\t\tkey: 'emitSafe',\n\t\tvalue: function emitSafe(event, param) {\n\t\t\ttry {\n\t\t\t\tthis.emit(event, param);\n\t\t\t} catch (error) {\n\t\t\t\tif (event !== 'error') {\n\t\t\t\t\tthis.emitSafe('error', error);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'end',\n\t\tvalue: function end() {\n\t\t\tthis.stopIdleTimeout();\n\n\t\t\tif (!this.req) {\n\t\t\t\t// request was ended intentionally by abort\n\t\t\t\t// do not auto reconnect.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.req = undefined;\n\t\t\tthis.emitSafe('disconnect');\n\t\t\tthis.reconnect();\n\t\t}\n\t}, {\n\t\tkey: 'reconnect',\n\t\tvalue: function reconnect() {\n\t\t\tvar _this3 = this;\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tif (_this3.isOffline()) {\n\t\t\t\t\t_this3.reconnect();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t_this3.emitSafe('reconnect');\n\t\t\t\t_this3.connect().then(function () {\n\t\t\t\t\t_this3.emitSafe('reconnect-success');\n\t\t\t\t}).catch(function (err) {\n\t\t\t\t\t_this3.emitSafe('reconnect-error', err);\n\t\t\t\t\t_this3.reconnect();\n\t\t\t\t});\n\t\t\t}, this.reconnectInterval);\n\t\t}\n\t}, {\n\t\tkey: 'isOffline',\n\t\tvalue: function isOffline() {\n\t\t\tif (typeof navigator === 'undefined' || navigator.hasOwnProperty('onLine')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn !navigator.onLine;\n\t\t}\n\t}, {\n\t\tkey: 'startIdleTimeout',\n\t\tvalue: function startIdleTimeout() {\n\t\t\tthis.stopIdleTimeout();\n\t\t\tthis.idleTimeout = setTimeout(this.idleTimeoutExpired, this.timeout);\n\t\t}\n\t}, {\n\t\tkey: 'stopIdleTimeout',\n\t\tvalue: function stopIdleTimeout() {\n\t\t\tif (this.idleTimeout) {\n\t\t\t\tclearTimeout(this.idleTimeout);\n\t\t\t\tthis.idleTimeout = null;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'idleTimeoutExpired',\n\t\tvalue: function idleTimeoutExpired() {\n\t\t\tif (this.req) {\n\t\t\t\tthis.req.abort();\n\t\t\t\tthis.end();\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'parse',\n\t\tvalue: function parse(chunk) {\n\t\t\tthis.startIdleTimeout();\n\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\tthis.emitSafe('event', event);\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// do nothing if JSON.parse fails\n\t\t\t\t} finally {\n\t\t\t\t\tthis.data = '';\n\t\t\t\t\tthis.eventName = undefined;\n\t\t\t\t\tthis.event = false;\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}\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 _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 contributed 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","'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 _superagentBinaryParser = require('./superagent-binary-parser');\n\nvar _superagentBinaryParser2 = _interopRequireDefault(_superagentBinaryParser);\n\nvar _Defaults = require('./Defaults');\n\nvar _Defaults2 = _interopRequireDefault(_Defaults);\n\nvar _EventStream = require('./EventStream');\n\nvar _EventStream2 = _interopRequireDefault(_EventStream);\n\nvar _Agent = require('./Agent');\n\nvar _Agent2 = _interopRequireDefault(_Agent);\n\nvar _Client = require('./Client');\n\nvar _Client2 = _interopRequireDefault(_Client);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Particle Cloud API wrapper.\n *\n * See for examples\n * of using the `Particle` class.\n *\n * Most Particle methods take a single unnamed argument object documented as\n * `options` 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 for this API call 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\tif (options.auth) {\n\t\t\tthis.setDefaultAuth(options.auth);\n\t\t}\n\n\t\t// todo - this seems a bit dangerous - would be better to put all options/context in a contained object\n\t\t(0, _assign2.default)(this, _Defaults2.default, options);\n\t\tthis.context = {};\n\t\tthis.agent = new _Agent2.default(this.baseUrl);\n\t}\n\n\t(0, _createClass3.default)(Particle, [{\n\t\tkey: '_isValidContext',\n\t\tvalue: function _isValidContext(name, context) {\n\t\t\treturn (name === 'tool' || name === 'project') && context !== undefined;\n\t\t}\n\t}, {\n\t\tkey: 'setContext',\n\t\tvalue: function setContext(name, context) {\n\t\t\tif (context !== undefined) {\n\t\t\t\tif (this._isValidContext(name, context)) {\n\t\t\t\t\tthis.context[name] = context;\n\t\t\t\t} else {\n\t\t\t\t\tthrow Error('unknown context name or undefined context: ' + name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Builds the final context from the context parameter and the context items in the api.\n * @param {Object} context The invocation context, this takes precedence over the local context.\n * @returns {Object} The context to use.\n * @private\n */\n\n\t}, {\n\t\tkey: '_buildContext',\n\t\tvalue: function _buildContext(context) {\n\t\t\treturn (0, _assign2.default)(this.context, context);\n\t\t}\n\n\t\t/**\n * Login to Particle Cloud using an existing Particle acccount.\n * @param {Object} options Options for this API call\n * @param {String} options.username Username for the Particle account\n * @param {String} options.password Password for the Particle account\n * @param {Number} options.tokenDuration How long the access token should last in seconds\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Number} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'login',\n\t\tvalue: function login(_ref) {\n\t\t\tvar username = _ref.username,\n\t\t\t password = _ref.password,\n\t\t\t _ref$tokenDuration = _ref.tokenDuration,\n\t\t\t tokenDuration = _ref$tokenDuration === undefined ? this.tokenDuration : _ref$tokenDuration,\n\t\t\t headers = _ref.headers,\n\t\t\t context = _ref.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/oauth/token',\n\t\t\t\tmethod: 'post',\n\t\t\t\theaders: headers,\n\t\t\t\tform: {\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},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * If login failed with an 'mfa_required' error, this must be called with a valid OTP code to login\n * @param {Object} options Options for this API call\n * @param {String} options.mfaToken Given as 'mfa_token' in the error body of `.login()`.\n * @param {String} options.otp Current one-time-password generated from the authentication application\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Number} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'sendOtp',\n\t\tvalue: function sendOtp(_ref2) {\n\t\t\tvar mfaToken = _ref2.mfaToken,\n\t\t\t otp = _ref2.otp,\n\t\t\t headers = _ref2.headers,\n\t\t\t context = _ref2.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/oauth/token',\n\t\t\t\tmethod: 'post',\n\t\t\t\theaders: headers,\n\t\t\t\tform: {\n\t\t\t\t\tgrant_type: 'urn:custom:mfa-otp',\n\t\t\t\t\tmfa_token: mfaToken,\n\t\t\t\t\totp: otp,\n\t\t\t\t\tclient_id: this.clientId,\n\t\t\t\t\tclient_secret: this.clientSecret\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Enable MFA on the currently logged in user\n * @param {Object} options Options for this API call\n * @param {Object} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'enableMfa',\n\t\tvalue: function enableMfa(_ref3) {\n\t\t\tvar auth = _ref3.auth,\n\t\t\t headers = _ref3.headers,\n\t\t\t context = _ref3.context;\n\n\t\t\treturn this.get({ uri: '/v1/user/mfa-enable', auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Confirm MFA for the user. This must be called with current TOTP code, determined from the results of enableMfa(). You will be prompted to enter an OTP code every time you login after enrollment is confirmed.\n * @param {Object} options Options for this API call\n * @param {Object} options.auth Access token\n * @param {Object} options.mfaToken Token given from previous step to\n * @param {Object} options.otp Current one-time-password generated from the authentication app\n * @param {Boolean} options.invalidateTokens Should all tokens be invalidated\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'confirmMfa',\n\t\tvalue: function confirmMfa(_ref4) {\n\t\t\tvar mfaToken = _ref4.mfaToken,\n\t\t\t otp = _ref4.otp,\n\t\t\t _ref4$invalidateToken = _ref4.invalidateTokens,\n\t\t\t invalidateTokens = _ref4$invalidateToken === undefined ? false : _ref4$invalidateToken,\n\t\t\t auth = _ref4.auth,\n\t\t\t headers = _ref4.headers,\n\t\t\t context = _ref4.context;\n\n\t\t\tvar data = { mfa_token: mfaToken, otp: otp };\n\n\t\t\tif (invalidateTokens) {\n\t\t\t\tdata.invalidate_tokens = true;\n\t\t\t}\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/user/mfa-enable',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: data,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Disable MFA for the user.\n * @param {Object} options Options for this API call\n * @param {Object} options.auth Access token\n * @param {Object} options.currentPassword User's current password\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'disableMfa',\n\t\tvalue: function disableMfa(_ref5) {\n\t\t\tvar currentPassword = _ref5.currentPassword,\n\t\t\t auth = _ref5.auth,\n\t\t\t headers = _ref5.headers,\n\t\t\t context = _ref5.context;\n\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/user/mfa-disable',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { current_password: currentPassword },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Create Customer for Product.\n * @param {Object} options Options for this API call\n * @param {String} options.email Username for the Particle account\n * @param {String} options.password Password for the Particle account\n * @param {String} options.product Create the customer in this product ID or slug\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createCustomer',\n\t\tvalue: function createCustomer(_ref6) {\n\t\t\tvar email = _ref6.email,\n\t\t\t password = _ref6.password,\n\t\t\t product = _ref6.product,\n\t\t\t headers = _ref6.headers,\n\t\t\t context = _ref6.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/v1/products/' + product + '/customers',\n\t\t\t\tmethod: 'post',\n\t\t\t\theaders: headers,\n\t\t\t\tform: {\n\t\t\t\t\temail: email,\n\t\t\t\t\tpassword: password,\n\t\t\t\t\tgrant_type: 'client_credentials',\n\t\t\t\t\tclient_id: this.clientId,\n\t\t\t\t\tclient_secret: this.clientSecret\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Login to Particle Cloud using an OAuth client.\n * @param {Object} options Options for this API call\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'loginAsClientOwner',\n\t\tvalue: function loginAsClientOwner(_ref7) {\n\t\t\tvar headers = _ref7.headers,\n\t\t\t context = _ref7.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/oauth/token',\n\t\t\t\tmethod: 'post',\n\t\t\t\theaders: headers,\n\t\t\t\tform: {\n\t\t\t\t\tgrant_type: 'client_credentials',\n\t\t\t\t\tclient_id: this.clientId,\n\t\t\t\t\tclient_secret: this.clientSecret\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Create a user account for the Particle Cloud\n * @param {Object} options Options for this API call\n * @param {String} options.username Email of the new user\n * @param {String} options.password Password\n * @param {String} options.accountInfo Object that contains account information fields such as user real name, company name, business account flag etc\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createUser',\n\t\tvalue: function createUser(_ref8) {\n\t\t\tvar username = _ref8.username,\n\t\t\t password = _ref8.password,\n\t\t\t accountInfo = _ref8.accountInfo,\n\t\t\t headers = _ref8.headers,\n\t\t\t context = _ref8.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/users',\n\t\t\t\theaders: headers,\n\t\t\t\tdata: {\n\t\t\t\t\tusername: username,\n\t\t\t\t\tpassword: password,\n\t\t\t\t\taccount_info: accountInfo\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Verify new user account via verification email\n * @param {Object} options Options for this API call\n * @param {String} options.token The string token sent in the verification email\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'verifyUser',\n\t\tvalue: function verifyUser(_ref9) {\n\t\t\tvar token = _ref9.token,\n\t\t\t headers = _ref9.headers,\n\t\t\t context = _ref9.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/user/verify',\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { token: token },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Send reset password email for a Particle Cloud user account\n * @param {Object} options Options for this API call\n * @param {String} options.username Email of the user\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'resetPassword',\n\t\tvalue: function resetPassword(_ref10) {\n\t\t\tvar username = _ref10.username,\n\t\t\t headers = _ref10.headers,\n\t\t\t context = _ref10.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/user/password-reset',\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { username: username },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Revoke an access token\n * @param {Object} options Options for this API call\n * @param {String} options.username Username of the Particle cloud account that the token belongs to.\n * @param {String} options.password Password for the account\n * @param {String} options.token Access token you wish to revoke\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteAccessToken',\n\t\tvalue: function deleteAccessToken(_ref11) {\n\t\t\tvar username = _ref11.username,\n\t\t\t password = _ref11.password,\n\t\t\t token = _ref11.token,\n\t\t\t headers = _ref11.headers,\n\t\t\t context = _ref11.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/access_tokens/' + token,\n\t\t\t\tauth: { username: username, password: password },\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { access_token: token },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Revoke the current session access token\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteCurrentAccessToken',\n\t\tvalue: function deleteCurrentAccessToken(_ref12) {\n\t\t\tvar auth = _ref12.auth,\n\t\t\t headers = _ref12.headers,\n\t\t\t context = _ref12.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/access_tokens/current',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Revoke all active access tokens\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteActiveAccessTokens',\n\t\tvalue: function deleteActiveAccessTokens(_ref13) {\n\t\t\tvar auth = _ref13.auth,\n\t\t\t headers = _ref13.headers,\n\t\t\t context = _ref13.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/access_tokens',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Delete the current user\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {String} options.password Password\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteUser',\n\t\tvalue: function deleteUser(_ref14) {\n\t\t\tvar auth = _ref14.auth,\n\t\t\t password = _ref14.password,\n\t\t\t headers = _ref14.headers,\n\t\t\t context = _ref14.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/user',\n\t\t\t\tdata: { password: password },\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * List all valid access tokens for a Particle Cloud account\n * @param {Object} options Options for this API call\n * @param {String} options.username Username\n * @param {String} options.password Password\n * @param {String} options.otp Current one-time-password generated from the authentication application\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listAccessTokens',\n\t\tvalue: function listAccessTokens(_ref15) {\n\t\t\tvar username = _ref15.username,\n\t\t\t password = _ref15.password,\n\t\t\t otp = _ref15.otp,\n\t\t\t headers = _ref15.headers,\n\t\t\t context = _ref15.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/access_tokens',\n\t\t\t\tauth: { username: username, password: password },\n\t\t\t\tquery: otp ? { otp: otp } : undefined,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Retrieves the information that is used to identify the current login for tracking.\n * @param {Object} options Options for this API call\n * @param {String} options.auth The access token\n * @param {Boolean} options.full When true, retrieve all information for registering a user with the tracking API. When false,\n * retrieve only the unique tracking ID for the current login.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} Resolve the tracking identify of the current login\n */\n\n\t}, {\n\t\tkey: 'trackingIdentity',\n\t\tvalue: function trackingIdentity() {\n\t\t\tvar _ref16 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t\t\t _ref16$full = _ref16.full,\n\t\t\t full = _ref16$full === undefined ? false : _ref16$full,\n\t\t\t auth = _ref16.auth,\n\t\t\t headers = _ref16.headers,\n\t\t\t context = _ref16.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/user/identify',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tquery: full ? undefined : { tracking: 1 },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * List devices claimed to the account or product\n * @param {Object} options Options for this API call\n * @param {String} [options.deviceId] (Product only) Filter results to devices with this ID (partial matching)\n * @param {String} [options.deviceName] (Product only) Filter results to devices with this name (partial matching)\n * @param {Array.} [options.groups] (Product only) A list of full group names to filter results to devices belonging to these groups only.\n * @param {String} [options.sortAttr] (Product only) The attribute by which to sort results. See API docs for options.\n * @param {String} [options.sortDir] (Product only) The direction of sorting. See API docs for options.\n * @param {Number} [options.page] (Product only) Current page of results\n * @param {Number} [options.perPage] (Product only) Records per page\n * @param {String} [options.product] List devices in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listDevices',\n\t\tvalue: function listDevices(_ref17) {\n\t\t\tvar deviceId = _ref17.deviceId,\n\t\t\t deviceName = _ref17.deviceName,\n\t\t\t groups = _ref17.groups,\n\t\t\t sortAttr = _ref17.sortAttr,\n\t\t\t sortDir = _ref17.sortDir,\n\t\t\t page = _ref17.page,\n\t\t\t perPage = _ref17.perPage,\n\t\t\t product = _ref17.product,\n\t\t\t auth = _ref17.auth,\n\t\t\t headers = _ref17.headers,\n\t\t\t context = _ref17.context;\n\n\t\t\tvar uri = void 0,\n\t\t\t query = void 0;\n\n\t\t\tif (product) {\n\t\t\t\turi = '/v1/products/' + product + '/devices';\n\t\t\t\tgroups = Array.isArray(groups) ? groups.join(',') : undefined;\n\t\t\t\tquery = { deviceId: deviceId, deviceName: deviceName, groups: groups, sortAttr: sortAttr, sortDir: sortDir, page: page, per_page: perPage };\n\t\t\t} else {\n\t\t\t\turi = '/v1/devices';\n\t\t\t}\n\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\n\t\t/**\n * Get detailed informationa about a device\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getDevice',\n\t\tvalue: function getDevice(_ref18) {\n\t\t\tvar deviceId = _ref18.deviceId,\n\t\t\t product = _ref18.product,\n\t\t\t auth = _ref18.auth,\n\t\t\t headers = _ref18.headers,\n\t\t\t context = _ref18.context;\n\n\t\t\tvar uri = this.deviceUri({ deviceId: deviceId, product: product });\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Claim a device to the account. The device must be online and unclaimed.\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'claimDevice',\n\t\tvalue: function claimDevice(_ref19) {\n\t\t\tvar deviceId = _ref19.deviceId,\n\t\t\t requestTransfer = _ref19.requestTransfer,\n\t\t\t auth = _ref19.auth,\n\t\t\t headers = _ref19.headers,\n\t\t\t context = _ref19.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/devices',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: {\n\t\t\t\t\tid: deviceId,\n\t\t\t\t\trequest_transfer: !!requestTransfer\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Add a device to a product or move device out of quarantine.\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID\n * @param {Object} options.file A file that contains a single-column list of device IDs, device serial numbers, device IMEIs, or devie ICCIDs.\n * Node: Either a path or Buffer. Browser: a File or Blob.\n * @param {String} options.product Add to this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'addDeviceToProduct',\n\t\tvalue: function addDeviceToProduct(_ref20) {\n\t\t\tvar deviceId = _ref20.deviceId,\n\t\t\t product = _ref20.product,\n\t\t\t file = _ref20.file,\n\t\t\t auth = _ref20.auth,\n\t\t\t headers = _ref20.headers,\n\t\t\t context = _ref20.context;\n\n\t\t\tvar files = void 0,\n\t\t\t data = void 0;\n\n\t\t\tif (file) {\n\t\t\t\tfiles = { file: file };\n\t\t\t} else if (deviceId) {\n\t\t\t\tdata = { id: deviceId };\n\t\t\t}\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/v1/products/' + product + '/devices',\n\t\t\t\tmethod: 'post',\n\t\t\t\theaders: headers,\n\t\t\t\tdata: data,\n\t\t\t\tfiles: files,\n\t\t\t\tauth: auth,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Unclaim / Remove a device from your account or product, or deny quarantine\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {Boolean} [options.deny] (Product only) Deny this quarantined device, instead of removing an already approved device\n * @param {String} options.product Remove from this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeDevice',\n\t\tvalue: function removeDevice(_ref21) {\n\t\t\tvar deviceId = _ref21.deviceId,\n\t\t\t deny = _ref21.deny,\n\t\t\t product = _ref21.product,\n\t\t\t auth = _ref21.auth,\n\t\t\t headers = _ref21.headers,\n\t\t\t context = _ref21.context;\n\n\t\t\tvar uri = this.deviceUri({ deviceId: deviceId, product: product });\n\t\t\tvar data = product ? { deny: deny } : undefined;\n\t\t\treturn this.delete({ uri: uri, data: data, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Unclaim a product device its the owner, but keep it in the product\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.product Remove from this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeDeviceOwner',\n\t\tvalue: function removeDeviceOwner(_ref22) {\n\t\t\tvar deviceId = _ref22.deviceId,\n\t\t\t product = _ref22.product,\n\t\t\t auth = _ref22.auth,\n\t\t\t headers = _ref22.headers,\n\t\t\t context = _ref22.context;\n\n\t\t\tvar uri = '/v1/products/' + product + '/devices/' + deviceId + '/owner';\n\t\t\treturn this.delete({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Rename a device\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.name Desired Name\n * @param {String} [options.product] Rename device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'renameDevice',\n\t\tvalue: function renameDevice(_ref23) {\n\t\t\tvar deviceId = _ref23.deviceId,\n\t\t\t name = _ref23.name,\n\t\t\t product = _ref23.product,\n\t\t\t auth = _ref23.auth,\n\t\t\t headers = _ref23.headers,\n\t\t\t context = _ref23.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, name: name, product: product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Instruct the device to turn on/off the LED in a rainbow pattern\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {Boolean} options.signal Signal on or off\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'signalDevice',\n\t\tvalue: function signalDevice(_ref24) {\n\t\t\tvar deviceId = _ref24.deviceId,\n\t\t\t signal = _ref24.signal,\n\t\t\t product = _ref24.product,\n\t\t\t auth = _ref24.auth,\n\t\t\t headers = _ref24.headers,\n\t\t\t context = _ref24.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, signal: signal, product: product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Store some notes about device\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.notes Your notes about this device\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'setDeviceNotes',\n\t\tvalue: function setDeviceNotes(_ref25) {\n\t\t\tvar deviceId = _ref25.deviceId,\n\t\t\t notes = _ref25.notes,\n\t\t\t product = _ref25.product,\n\t\t\t auth = _ref25.auth,\n\t\t\t headers = _ref25.headers,\n\t\t\t context = _ref25.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, notes: notes, product: product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Mark device as being used in development of a product so it opts out of automatic firmware updates\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {Boolean} options.development Set to true to mark as development, false to return to product fleet\n * @param {String} options.product Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'markAsDevelopmentDevice',\n\t\tvalue: function markAsDevelopmentDevice(_ref26) {\n\t\t\tvar deviceId = _ref26.deviceId,\n\t\t\t _ref26$development = _ref26.development,\n\t\t\t development = _ref26$development === undefined ? true : _ref26$development,\n\t\t\t product = _ref26.product,\n\t\t\t auth = _ref26.auth,\n\t\t\t headers = _ref26.headers,\n\t\t\t context = _ref26.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, development: development, product: product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Mark device as being used in development of a product so it opts out of automatic firmware updates\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {Number} options.desiredFirmwareVersion Lock the product device to run this firmware version.\n * @param {Boolean} [options.flash] Immediately flash firmware indicated by desiredFirmwareVersion\n * @param {String} options.product Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'lockDeviceProductFirmware',\n\t\tvalue: function lockDeviceProductFirmware(_ref27) {\n\t\t\tvar deviceId = _ref27.deviceId,\n\t\t\t desiredFirmwareVersion = _ref27.desiredFirmwareVersion,\n\t\t\t flash = _ref27.flash,\n\t\t\t product = _ref27.product,\n\t\t\t auth = _ref27.auth,\n\t\t\t context = _ref27.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, desiredFirmwareVersion: desiredFirmwareVersion, flash: flash, product: product, auth: auth, context: context });\n\t\t}\n\n\t\t/**\n * Mark device as receiving automatic firmware updates\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.product Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'unlockDeviceProductFirmware',\n\t\tvalue: function unlockDeviceProductFirmware(_ref28) {\n\t\t\tvar deviceId = _ref28.deviceId,\n\t\t\t product = _ref28.product,\n\t\t\t auth = _ref28.auth,\n\t\t\t headers = _ref28.headers,\n\t\t\t context = _ref28.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, desiredFirmwareVersion: null, product: product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Update multiple device attributes at the same time\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} [options.name] Desired Name\n * @param {Boolean} options.signal Signal device on or off\n * @param {String} [options.notes] Your notes about this device\n * @param {Boolean} [options.development] (Product only) Set to true to mark as development, false to return to product fleet\n * @param {Number} [options.desiredFirmwareVersion] (Product only) Lock the product device to run this firmware version.\n * Pass `null` to unlock firmware and go back to released firmware.\n * @param {Boolean} [options.flash] (Product only) Immediately flash firmware indicated by desiredFirmwareVersion\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'updateDevice',\n\t\tvalue: function updateDevice(_ref29) {\n\t\t\tvar deviceId = _ref29.deviceId,\n\t\t\t name = _ref29.name,\n\t\t\t signal = _ref29.signal,\n\t\t\t notes = _ref29.notes,\n\t\t\t development = _ref29.development,\n\t\t\t desiredFirmwareVersion = _ref29.desiredFirmwareVersion,\n\t\t\t flash = _ref29.flash,\n\t\t\t product = _ref29.product,\n\t\t\t auth = _ref29.auth,\n\t\t\t headers = _ref29.headers,\n\t\t\t context = _ref29.context;\n\n\t\t\tif (signal !== undefined) {\n\t\t\t\tsignal = signal ? '1' : '0';\n\t\t\t}\n\n\t\t\tvar uri = this.deviceUri({ deviceId: deviceId, product: product });\n\t\t\tvar data = product ? { name: name, signal: signal, notes: notes, development: development, desired_firmware_version: desiredFirmwareVersion, flash: flash } : { name: name, signal: signal, notes: notes };\n\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Provision a new device for products that allow self-provisioning\n * @param {Object} options Options for this API call\n * @param {String} options.productId Product ID where to create this device\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'provisionDevice',\n\t\tvalue: function provisionDevice(_ref30) {\n\t\t\tvar productId = _ref30.productId,\n\t\t\t auth = _ref30.auth,\n\t\t\t headers = _ref30.headers,\n\t\t\t context = _ref30.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/devices',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { product_id: productId },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Generate a claim code to use in the device claiming process.\n * To generate a claim code for a product, the access token MUST belong to a\n * customer of the product.\n * @param {Object} options Options for this API call\n * @param {String} [options.iccid] ICCID of the SIM card used in the Electron\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getClaimCode',\n\t\tvalue: function getClaimCode(_ref31) {\n\t\t\tvar iccid = _ref31.iccid,\n\t\t\t product = _ref31.product,\n\t\t\t auth = _ref31.auth,\n\t\t\t headers = _ref31.headers,\n\t\t\t context = _ref31.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/device_claims' : '/v1/device_claims';\n\t\t\treturn this.post({ uri: uri, auth: auth, headers: headers, data: { iccid: iccid }, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'validatePromoCode',\n\t\tvalue: function validatePromoCode(_ref32) {\n\t\t\tvar promoCode = _ref32.promoCode,\n\t\t\t auth = _ref32.auth,\n\t\t\t headers = _ref32.headers,\n\t\t\t context = _ref32.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/promo_code/' + promoCode,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'changeProduct',\n\t\tvalue: function changeProduct(_ref33) {\n\t\t\tvar deviceId = _ref33.deviceId,\n\t\t\t productId = _ref33.productId,\n\t\t\t auth = _ref33.auth,\n\t\t\t headers = _ref33.headers,\n\t\t\t context = _ref33.context;\n\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/devices/' + deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { product_id: productId },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get the value of a device variable\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.name Variable name\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getVariable',\n\t\tvalue: function getVariable(_ref34) {\n\t\t\tvar deviceId = _ref34.deviceId,\n\t\t\t name = _ref34.name,\n\t\t\t product = _ref34.product,\n\t\t\t auth = _ref34.auth,\n\t\t\t headers = _ref34.headers,\n\t\t\t context = _ref34.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/devices/' + deviceId + '/' + name : '/v1/devices/' + deviceId + '/' + name;\n\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Compile and flash application firmware to a device. Pass a pre-compiled binary to flash it directly to the device.\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.product Flash device in this product ID or slug\n * @param {Object} options.files Object containing files to be compiled and flashed. Keys should be the filenames, including relative path, and the values should be a path or Buffer of the file contents in Node, or a File or Blob in the browser.\n * @param {String} [options.targetVersion=latest] System firmware version to compile against\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'flashDevice',\n\t\tvalue: function flashDevice(_ref35) {\n\t\t\tvar deviceId = _ref35.deviceId,\n\t\t\t product = _ref35.product,\n\t\t\t files = _ref35.files,\n\t\t\t targetVersion = _ref35.targetVersion,\n\t\t\t auth = _ref35.auth,\n\t\t\t headers = _ref35.headers,\n\t\t\t context = _ref35.context;\n\n\t\t\tvar uri = this.deviceUri({ deviceId: deviceId, product: product });\n\t\t\tvar form = {};\n\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\n\t\t\treturn this.request({ uri: uri, method: 'put', auth: auth, headers: headers, files: files, form: form, context: context });\n\t\t}\n\n\t\t/**\n * DEPRECATED: Flash the Tinker application to a device. Instead compile and flash the Tinker source code.\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'flashTinker',\n\t\tvalue: function flashTinker(_ref36) {\n\t\t\tvar deviceId = _ref36.deviceId,\n\t\t\t auth = _ref36.auth,\n\t\t\t headers = _ref36.headers,\n\t\t\t context = _ref36.context;\n\n\t\t\t/* eslint-disable no-console */\n\t\t\tif (console && console.warning) {\n\t\t\t\tconsole.warning('Particle.flashTinker is deprecated');\n\t\t\t}\n\t\t\t/* eslint-enable no-console */\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/devices/' + deviceId,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { app: 'tinker' },\n\t\t\t\tauth: auth,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Compile firmware using the Particle Cloud\n * @param {Object} options Options for this API call\n * @param {Object} options.files Object containing files to be compiled. Keys should be the filenames, including relative path, and the values should be a path or Buffer of the file contents in Node, or a File or Blob in the browser.\n * @param {Number} [options.platformId] Platform id number of the device you are compiling for. Common values are 0=Core, 6=Photon, 10=Electron.\n * @param {String} [options.targetVersion=latest] System firmware version to compile against\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'compileCode',\n\t\tvalue: function compileCode(_ref37) {\n\t\t\tvar files = _ref37.files,\n\t\t\t platformId = _ref37.platformId,\n\t\t\t targetVersion = _ref37.targetVersion,\n\t\t\t auth = _ref37.auth,\n\t\t\t headers = _ref37.headers,\n\t\t\t context = _ref37.context;\n\n\t\t\tvar form = { platform_id: platformId };\n\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\n\t\t\treturn this.request({\n\t\t\t\turi: '/v1/binaries',\n\t\t\t\tmethod: 'post',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tfiles: files,\n\t\t\t\tform: form,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Download a firmware binary\n * @param {Object} options Options for this API call\n * @param {String} options.binaryId Binary ID received from a successful compile call\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Request} A promise\n */\n\n\t}, {\n\t\tkey: 'downloadFirmwareBinary',\n\t\tvalue: function downloadFirmwareBinary(_ref38) {\n\t\t\tvar binaryId = _ref38.binaryId,\n\t\t\t auth = _ref38.auth,\n\t\t\t headers = _ref38.headers,\n\t\t\t context = _ref38.context;\n\n\t\t\tvar req = this.request({\n\t\t\t\turi: '/v1/binaries/' + binaryId,\n\t\t\t\tmethod: 'get',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context,\n\t\t\t\traw: true\n\t\t\t});\n\n\t\t\treturn this._provideFileData(req);\n\t\t}\n\n\t\t/**\n * Send a new device public key to the Particle Cloud\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {(String|Buffer)} options.key Public key contents\n * @param {String} [options.algorithm=rsa] Algorithm used to generate the public key. Valid values are `rsa` or `ecc`.\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'sendPublicKey',\n\t\tvalue: function sendPublicKey(_ref39) {\n\t\t\tvar deviceId = _ref39.deviceId,\n\t\t\t key = _ref39.key,\n\t\t\t algorithm = _ref39.algorithm,\n\t\t\t auth = _ref39.auth,\n\t\t\t headers = _ref39.headers,\n\t\t\t context = _ref39.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/provisioning/' + deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: {\n\t\t\t\t\tdeviceID: deviceId,\n\t\t\t\t\tpublicKey: typeof key === 'string' ? key : key.toString(),\n\t\t\t\t\tfilename: 'particle-api',\n\t\t\t\t\torder: 'manual_' + Date.now(),\n\t\t\t\t\talgorithm: algorithm || 'rsa'\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Call a device function\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.name Function name\n * @param {String} options.argument Function argument\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'callFunction',\n\t\tvalue: function callFunction(_ref40) {\n\t\t\tvar deviceId = _ref40.deviceId,\n\t\t\t name = _ref40.name,\n\t\t\t argument = _ref40.argument,\n\t\t\t product = _ref40.product,\n\t\t\t auth = _ref40.auth,\n\t\t\t headers = _ref40.headers,\n\t\t\t context = _ref40.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/devices/' + deviceId + '/' + name : '/v1/devices/' + deviceId + '/' + name;\n\t\t\treturn this.post({ uri: uri, auth: auth, headers: headers, data: { args: argument }, context: context });\n\t\t}\n\n\t\t/**\n * Get a stream of events\n * @param {Object} options Options for this API call\n * @param {String} [options.deviceId] Device ID or Name, or `mine` to indicate only your devices.\n * @param {String} [options.name] Event Name\n * @param {String} [options.org] Organization Slug\n * @param {String} [options.product] Events for this product ID or slug\n * @param {String} options.auth Access Token\n * @returns {Promise} If the promise resolves, the resolution value will be an EventStream object that will\n * emit 'event' events.\n */\n\n\t}, {\n\t\tkey: 'getEventStream',\n\t\tvalue: function getEventStream(_ref41) {\n\t\t\tvar deviceId = _ref41.deviceId,\n\t\t\t name = _ref41.name,\n\t\t\t org = _ref41.org,\n\t\t\t product = _ref41.product,\n\t\t\t auth = _ref41.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\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn new _EventStream2.default('' + this.baseUrl + uri, auth).connect();\n\t\t}\n\n\t\t/**\n * Publish a event to the Particle Cloud\n * @param {Object} options Options for this API call\n * @param {String} options.name Event name\n * @param {String} options.data Event data\n * @param {Boolean} options.isPrivate Should the event be publicly available?\n * @param {String} [options.product] Event for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'publishEvent',\n\t\tvalue: function publishEvent(_ref42) {\n\t\t\tvar name = _ref42.name,\n\t\t\t data = _ref42.data,\n\t\t\t isPrivate = _ref42.isPrivate,\n\t\t\t product = _ref42.product,\n\t\t\t auth = _ref42.auth,\n\t\t\t headers = _ref42.headers,\n\t\t\t context = _ref42.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/events' : '/v1/devices/events';\n\t\t\tvar postData = { name: name, data: data, private: isPrivate };\n\t\t\treturn this.post({ uri: uri, auth: auth, headers: headers, data: postData, context: context });\n\t\t}\n\n\t\t/**\n * Create a webhook\n * @param {Object} options Options for this API call\n * @param {String} options.event The name of the Particle event that should trigger the Webhook\n * @param {String} options.url The web address that will be targeted when the Webhook is triggered\n * @param {String} [options.device] Trigger Webhook only for this device ID or Name\n * @param {Boolean} [options.rejectUnauthorized] Set to `false` to skip SSL certificate validation of the target URL\n * @param {Boolean} [options.noDefaults] Don't include default event data in the webhook request\n * @param {Object} [options.hook] Webhook configuration settings\n * @param {String} [options.hook.method=POST] Type of web request triggered by the Webhook (GET, POST, PUT, or DELETE)\n * @param {Object} [options.hook.auth] Auth data like `{ username: 'me', password: '1234' }` to send via basic auth header with the Webhook request\n * @param {Object} [options.hook.headers] Additional headers to add to the Webhook like `{ 'X-ONE': '1', X-TWO: '2' }`\n * @param {Object} [options.hook.query] Query params to add to the Webhook request like `{ foo: 'foo', bar: 'bar' }`\n * @param {Object} [options.hook.json] JSON data to send with the Webhook request - sets `Content-Type` to `application/json`\n * @param {Object} [options.hook.form] Form data to send with the Webhook request - sets `Content-Type` to `application/x-www-form-urlencoded`\n * @param {String} [options.hook.body] Custom body to send with the Webhook request\n * @param {Object} [options.hook.responseTemplate] Template to use to customize the Webhook response body\n * @param {Object} [options.hook.responseEvent] The Webhook response event name that your devices can subscribe to\n * @param {Object} [options.hook.errorResponseEvent] The Webhook error response event name that your devices can subscribe to\n * @param {String} [options.product] Webhook for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createWebhook',\n\t\tvalue: function createWebhook(_ref43) {\n\t\t\tvar event = _ref43.event,\n\t\t\t url = _ref43.url,\n\t\t\t device = _ref43.device,\n\t\t\t rejectUnauthorized = _ref43.rejectUnauthorized,\n\t\t\t noDefaults = _ref43.noDefaults,\n\t\t\t hook = _ref43.hook,\n\t\t\t product = _ref43.product,\n\t\t\t auth = _ref43.auth,\n\t\t\t headers = _ref43.headers,\n\t\t\t context = _ref43.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/webhooks' : '/v1/webhooks';\n\t\t\tvar data = { event: event, url: url, deviceId: device, rejectUnauthorized: rejectUnauthorized, noDefaults: noDefaults };\n\n\t\t\tif (hook) {\n\t\t\t\tdata.requestType = hook.method;\n\t\t\t\tdata.auth = hook.auth;\n\t\t\t\tdata.headers = hook.headers;\n\t\t\t\tdata.query = hook.query;\n\t\t\t\tdata.json = hook.json;\n\t\t\t\tdata.form = hook.form;\n\t\t\t\tdata.body = hook.body;\n\t\t\t\tdata.responseTemplate = hook.responseTemplate;\n\t\t\t\tdata.responseTopic = hook.responseEvent;\n\t\t\t\tdata.errorResponseTopic = hook.errorResponseEvent;\n\t\t\t}\n\n\t\t\tif (!data.requestType) {\n\t\t\t\tdata.requestType = 'POST';\n\t\t\t}\n\n\t\t\treturn this.post({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Delete a webhook\n * @param {Object} options Options for this API call\n * @param {String} options.hookId Webhook ID\n * @param {String} [options.product] Webhook for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteWebhook',\n\t\tvalue: function deleteWebhook(_ref44) {\n\t\t\tvar hookId = _ref44.hookId,\n\t\t\t product = _ref44.product,\n\t\t\t auth = _ref44.auth,\n\t\t\t headers = _ref44.headers,\n\t\t\t context = _ref44.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/webhooks/' + hookId : '/v1/webhooks/' + hookId;\n\t\t\treturn this.delete({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List all webhooks owned by the account or product\n * @param {Object} options Options for this API call\n * @param {String} [options.product] Webhooks for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listWebhooks',\n\t\tvalue: function listWebhooks(_ref45) {\n\t\t\tvar product = _ref45.product,\n\t\t\t auth = _ref45.auth,\n\t\t\t headers = _ref45.headers,\n\t\t\t context = _ref45.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/webhooks' : '/v1/webhooks';\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Create an integration to send events to an external service\n *\n * See the API docs for details https://docs.particle.io/reference/api/#integrations-webhooks-\n *\n * @param {Object} options Options for this API call\n * @param {String} options.event Event that triggers the integration\n * @param {Object} options.settings Settings specific to that integration type\n * @param {String} [options.deviceId] Trigger integration only for this device ID or Name\n * @param {String} [options.product] Integration for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createIntegration',\n\t\tvalue: function createIntegration(_ref46) {\n\t\t\tvar event = _ref46.event,\n\t\t\t settings = _ref46.settings,\n\t\t\t deviceId = _ref46.deviceId,\n\t\t\t product = _ref46.product,\n\t\t\t auth = _ref46.auth,\n\t\t\t headers = _ref46.headers,\n\t\t\t context = _ref46.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/integrations' : '/v1/integrations';\n\t\t\tvar data = (0, _assign2.default)({ event: event, deviceid: deviceId }, settings);\n\t\t\treturn this.post({ uri: uri, data: data, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Edit an integration to send events to an external service\n *\n * See the API docs for details https://docs.particle.io/reference/api/#integrations-webhooks-\n *\n * @param {Object} options Options for this API call\n * @param {String} options.integrationId The integration to edit\n * @param {String} [options.event] Change the event that triggers the integration\n * @param {Object} [options.settings] Change the settings specific to that integration type\n * @param {String} [options.deviceId] Trigger integration only for this device ID or Name\n * @param {String} [options.product] Integration for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'editIntegration',\n\t\tvalue: function editIntegration(_ref47) {\n\t\t\tvar integrationId = _ref47.integrationId,\n\t\t\t event = _ref47.event,\n\t\t\t settings = _ref47.settings,\n\t\t\t deviceId = _ref47.deviceId,\n\t\t\t product = _ref47.product,\n\t\t\t auth = _ref47.auth,\n\t\t\t headers = _ref47.headers,\n\t\t\t context = _ref47.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/integrations/' + integrationId : '/v1/integrations/' + integrationId;\n\t\t\tvar data = (0, _assign2.default)({ event: event, deviceid: deviceId }, settings);\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Delete an integration to send events to an external service\n *\n * @param {Object} options Options for this API call\n * @param {String} options.integrationId The integration to remove\n * @param {String} [options.product] Integration for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteIntegration',\n\t\tvalue: function deleteIntegration(_ref48) {\n\t\t\tvar integrationId = _ref48.integrationId,\n\t\t\t product = _ref48.product,\n\t\t\t auth = _ref48.auth,\n\t\t\t headers = _ref48.headers,\n\t\t\t context = _ref48.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/integrations/' + integrationId : '/v1/integrations/' + integrationId;\n\t\t\treturn this.delete({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List all integrations owned by the account or product\n * @param {Object} options Options for this API call\n * @param {String} [options.product] Integrations for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listIntegrations',\n\t\tvalue: function listIntegrations(_ref49) {\n\t\t\tvar product = _ref49.product,\n\t\t\t auth = _ref49.auth,\n\t\t\t headers = _ref49.headers,\n\t\t\t context = _ref49.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/integrations' : '/v1/integrations';\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Get details about the current user\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getUserInfo',\n\t\tvalue: function getUserInfo(_ref50) {\n\t\t\tvar auth = _ref50.auth,\n\t\t\t headers = _ref50.headers,\n\t\t\t context = _ref50.context;\n\n\t\t\treturn this.get({ uri: '/v1/user', auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Set details on the current user\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {String} options.accountInfo Set user's extended info fields (name, business account, company name, etc)\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'setUserInfo',\n\t\tvalue: function setUserInfo(_ref51) {\n\t\t\tvar accountInfo = _ref51.accountInfo,\n\t\t\t auth = _ref51.auth,\n\t\t\t headers = _ref51.headers,\n\t\t\t context = _ref51.context;\n\n\t\t\tvar data = { account_info: accountInfo };\n\t\t\treturn this.put({ uri: '/v1/user', auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Change username (i.e, email)\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {String} options.currentPassword Current password\n * @param {String} options.username New email\n * @param {Boolean} options.invalidateTokens Should all tokens be invalidated\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'changeUsername',\n\t\tvalue: function changeUsername(_ref52) {\n\t\t\tvar currentPassword = _ref52.currentPassword,\n\t\t\t username = _ref52.username,\n\t\t\t _ref52$invalidateToke = _ref52.invalidateTokens,\n\t\t\t invalidateTokens = _ref52$invalidateToke === undefined ? false : _ref52$invalidateToke,\n\t\t\t auth = _ref52.auth,\n\t\t\t headers = _ref52.headers,\n\t\t\t context = _ref52.context;\n\n\t\t\tvar data = { username: username, current_password: currentPassword };\n\n\t\t\tif (invalidateTokens) {\n\t\t\t\tdata.invalidate_tokens = true;\n\t\t\t}\n\n\t\t\treturn this.put({ uri: '/v1/user', auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Change user's password\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {String} options.currentPassword Current password\n * @param {String} options.password New password\n * @param {Boolean} options.invalidateTokens Should all tokens be invalidated\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'changeUserPassword',\n\t\tvalue: function changeUserPassword(_ref53) {\n\t\t\tvar currentPassword = _ref53.currentPassword,\n\t\t\t password = _ref53.password,\n\t\t\t _ref53$invalidateToke = _ref53.invalidateTokens,\n\t\t\t invalidateTokens = _ref53$invalidateToke === undefined ? false : _ref53$invalidateToke,\n\t\t\t auth = _ref53.auth,\n\t\t\t headers = _ref53.headers,\n\t\t\t context = _ref53.context;\n\n\t\t\tvar data = { password: password, current_password: currentPassword };\n\n\t\t\tif (invalidateTokens) {\n\t\t\t\tdata.invalidate_tokens = true;\n\t\t\t}\n\n\t\t\treturn this.put({ uri: '/v1/user', auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * List SIM cards owned by a user or product\n * @param {Object} options Options for this API call\n * @param {String} [options.iccid] (Product only) Filter to SIM cards matching this ICCID\n * @param {String} [options.deviceId] (Product only) Filter to SIM cards matching this device ID\n * @param {String} [options.deviceName] (Product only) Filter to SIM cards matching this device name\n * @param {Number} [options.page] (Product only) Current page of results\n * @param {Number} [options.perPage] (Product only) Records per page\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listSIMs',\n\t\tvalue: function listSIMs(_ref54) {\n\t\t\tvar iccid = _ref54.iccid,\n\t\t\t deviceId = _ref54.deviceId,\n\t\t\t deviceName = _ref54.deviceName,\n\t\t\t page = _ref54.page,\n\t\t\t perPage = _ref54.perPage,\n\t\t\t product = _ref54.product,\n\t\t\t auth = _ref54.auth,\n\t\t\t headers = _ref54.headers,\n\t\t\t context = _ref54.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims' : '/v1/sims';\n\t\t\tvar query = product ? { iccid: iccid, deviceId: deviceId, deviceName: deviceName, page: page, per_page: perPage } : undefined;\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\n\t\t/**\n * Get data usage for one SIM card for the current billing period\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {String} [options.product] SIM card for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getSIMDataUsage',\n\t\tvalue: function getSIMDataUsage(_ref55) {\n\t\t\tvar iccid = _ref55.iccid,\n\t\t\t product = _ref55.product,\n\t\t\t auth = _ref55.auth,\n\t\t\t headers = _ref55.headers,\n\t\t\t context = _ref55.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims/' + iccid + '/data_usage' : '/v1/sims/' + iccid + '/data_usage';\n\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Get data usage for all SIM cards in a product the current billing period\n * @param {Object} options Options for this API call\n * @param {String} options.product SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getFleetDataUsage',\n\t\tvalue: function getFleetDataUsage(_ref56) {\n\t\t\tvar product = _ref56.product,\n\t\t\t auth = _ref56.auth,\n\t\t\t headers = _ref56.headers,\n\t\t\t context = _ref56.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/sims/data_usage',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Check SIM status\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'checkSIM',\n\t\tvalue: function checkSIM(_ref57) {\n\t\t\tvar iccid = _ref57.iccid,\n\t\t\t auth = _ref57.auth,\n\t\t\t headers = _ref57.headers,\n\t\t\t context = _ref57.context;\n\n\t\t\treturn this.head({ uri: '/v1/sims/' + iccid, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Activate and add SIM cards to an account or product\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {Array} options.iccids (Product only) ICCID of multiple SIM cards to import\n * @param {String} options.country The ISO country code for the SIM cards\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'activateSIM',\n\t\tvalue: function activateSIM(_ref58) {\n\t\t\tvar iccid = _ref58.iccid,\n\t\t\t iccids = _ref58.iccids,\n\t\t\t country = _ref58.country,\n\t\t\t promoCode = _ref58.promoCode,\n\t\t\t product = _ref58.product,\n\t\t\t auth = _ref58.auth,\n\t\t\t headers = _ref58.headers,\n\t\t\t context = _ref58.context;\n\n\t\t\t// promoCode is deprecated\n\t\t\ticcids = iccids || [iccid];\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims' : '/v1/sims/' + iccid;\n\t\t\tvar data = product ? { sims: iccids, country: country } : { country: country, promoCode: promoCode, action: 'activate' };\n\t\t\tvar method = product ? 'post' : 'put';\n\n\t\t\treturn this.request({ uri: uri, method: method, headers: headers, data: data, auth: auth, context: context });\n\t\t}\n\n\t\t/**\n * Deactivate a SIM card so it doesn't incur data usage in future months.\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deactivateSIM',\n\t\tvalue: function deactivateSIM(_ref59) {\n\t\t\tvar iccid = _ref59.iccid,\n\t\t\t product = _ref59.product,\n\t\t\t auth = _ref59.auth,\n\t\t\t headers = _ref59.headers,\n\t\t\t context = _ref59.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;\n\t\t\tvar data = { action: 'deactivate' };\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Reactivate a SIM card the was deactivated or unpause a SIM card that was automatically paused\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {Number} [options.mbLimit] New monthly data limit. Necessary if unpausing a SIM card\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'reactivateSIM',\n\t\tvalue: function reactivateSIM(_ref60) {\n\t\t\tvar iccid = _ref60.iccid,\n\t\t\t mbLimit = _ref60.mbLimit,\n\t\t\t product = _ref60.product,\n\t\t\t auth = _ref60.auth,\n\t\t\t headers = _ref60.headers,\n\t\t\t context = _ref60.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;\n\t\t\tvar data = { mb_limit: mbLimit, action: 'reactivate' };\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Update SIM card data limit\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {Array} options.mbLimit Data limit in megabyte for the SIM card\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'updateSIM',\n\t\tvalue: function updateSIM(_ref61) {\n\t\t\tvar iccid = _ref61.iccid,\n\t\t\t mbLimit = _ref61.mbLimit,\n\t\t\t product = _ref61.product,\n\t\t\t auth = _ref61.auth,\n\t\t\t headers = _ref61.headers,\n\t\t\t context = _ref61.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;\n\t\t\tvar data = { mb_limit: mbLimit };\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Remove a SIM card from an account so it can be activated by a different account\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeSIM',\n\t\tvalue: function removeSIM(_ref62) {\n\t\t\tvar iccid = _ref62.iccid,\n\t\t\t product = _ref62.product,\n\t\t\t auth = _ref62.auth,\n\t\t\t headers = _ref62.headers,\n\t\t\t context = _ref62.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;\n\t\t\treturn this.delete({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List valid build targets to be used for compiling\n * @param {Object} options Options for this API call\n * @param {Boolean} [options.onlyFeatured=false] Only list featured build targets\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listBuildTargets',\n\t\tvalue: function listBuildTargets(_ref63) {\n\t\t\tvar onlyFeatured = _ref63.onlyFeatured,\n\t\t\t auth = _ref63.auth,\n\t\t\t headers = _ref63.headers,\n\t\t\t context = _ref63.context;\n\n\t\t\tvar query = onlyFeatured ? { featured: !!onlyFeatured } : undefined;\n\t\t\treturn this.get({ uri: '/v1/build_targets', auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\n\t\t/**\n * List firmware libraries\n * @param {Object} options Options for this API call\n * @param {Number} options.page Page index (default, first page)\n * @param {Number} options.limit Number of items per page\n * @param {String} options.filter Search term for the libraries\n * @param {String} options.sort Ordering key for the library list\n * @param {Array} options.architectures List of architectures to filter\n * @param {String} options.category Category to filter\n * @param {String} options.scope The library scope to list. Default is 'all'. Other values are\n * - 'all' - list public libraries and my private libraries\n * - 'public' - list only public libraries\n * - 'private' - list only my private libraries\n * - 'mine' - list my libraries (public and private)\n * - 'official' - list only official libraries\n * - 'verified' - list only verified libraries\n * - 'featured' - list only featured libraries\n * @param {String} options.excludeScopes list of scopes to exclude\n * @param {String} options.category Category to filter\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listLibraries',\n\t\tvalue: function listLibraries(_ref64) {\n\t\t\tvar page = _ref64.page,\n\t\t\t limit = _ref64.limit,\n\t\t\t filter = _ref64.filter,\n\t\t\t sort = _ref64.sort,\n\t\t\t architectures = _ref64.architectures,\n\t\t\t category = _ref64.category,\n\t\t\t scope = _ref64.scope,\n\t\t\t excludeScopes = _ref64.excludeScopes,\n\t\t\t auth = _ref64.auth,\n\t\t\t headers = _ref64.headers,\n\t\t\t context = _ref64.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/libraries',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tquery: {\n\t\t\t\t\tpage: page,\n\t\t\t\t\tfilter: filter,\n\t\t\t\t\tlimit: limit,\n\t\t\t\t\tsort: sort,\n\t\t\t\t\tarchitectures: this._asList(architectures),\n\t\t\t\t\tcategory: category,\n\t\t\t\t\tscope: scope,\n\t\t\t\t\texcludeScopes: this._asList(excludeScopes)\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: '_asList',\n\t\tvalue: function _asList(value) {\n\t\t\treturn Array.isArray(value) ? value.join(',') : value;\n\t\t}\n\n\t\t/**\n * Get firmware library details\n * @param {Object} options Options for this API call\n * @param {String} options.name Name of the library to fetch\n * @param {String} options.version Version of the library to fetch (default: latest)\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getLibrary',\n\t\tvalue: function getLibrary(_ref65) {\n\t\t\tvar name = _ref65.name,\n\t\t\t version = _ref65.version,\n\t\t\t auth = _ref65.auth,\n\t\t\t headers = _ref65.headers,\n\t\t\t context = _ref65.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/libraries/' + name,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tquery: { version: version },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Firmware library details for each version\n * @param {Object} options Options for this API call\n * @param {String} options.name Name of the library to fetch\n * @param {Number} options.page Page index (default, first page)\n * @param {Number} options.limit Number of items per page\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getLibraryVersions',\n\t\tvalue: function getLibraryVersions(_ref66) {\n\t\t\tvar name = _ref66.name,\n\t\t\t page = _ref66.page,\n\t\t\t limit = _ref66.limit,\n\t\t\t auth = _ref66.auth,\n\t\t\t headers = _ref66.headers,\n\t\t\t context = _ref66.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/libraries/' + name + '/versions',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tquery: { page: page, limit: limit },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Contribute a new library version from a compressed archive\n * @param {Object} options Options for this API call\n * @param {String} options.archive Compressed archive file containing the library sources\n * Either a path or Buffer of the file contents in Node, or a File or Blob in the browser.\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'contributeLibrary',\n\t\tvalue: function contributeLibrary(_ref67) {\n\t\t\tvar archive = _ref67.archive,\n\t\t\t auth = _ref67.auth,\n\t\t\t headers = _ref67.headers,\n\t\t\t context = _ref67.context;\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({\n\t\t\t\turi: '/v1/libraries',\n\t\t\t\tmethod: 'post',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tfiles: files,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Publish the latest version of a library to the public\n * @param {Object} options Options for this API call\n * @param {String} options.name Name of the library to publish\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'publishLibrary',\n\t\tvalue: function publishLibrary(_ref68) {\n\t\t\tvar name = _ref68.name,\n\t\t\t auth = _ref68.auth,\n\t\t\t headers = _ref68.headers,\n\t\t\t context = _ref68.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/v1/libraries/' + name,\n\t\t\t\tmethod: 'patch',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { visibility: 'public' },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Delete one version of a library or an entire private library\n * @param {Object} options Options for this API call\n * @param {String} options.name Name of the library to remove\n * @param {String} options.force Key to force deleting a public library\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteLibrary',\n\t\tvalue: function deleteLibrary(_ref69) {\n\t\t\tvar name = _ref69.name,\n\t\t\t force = _ref69.force,\n\t\t\t auth = _ref69.auth,\n\t\t\t headers = _ref69.headers,\n\t\t\t context = _ref69.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/libraries/' + name,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { force: force },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Download an external file that may not be on the API\n * @param {Object} options Options for this API call\n * @param {String} options.uri URL of the file.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} Resolves to a buffer with the file data\n */\n\n\t}, {\n\t\tkey: 'downloadFile',\n\t\tvalue: function downloadFile(_ref70) {\n\t\t\tvar uri = _ref70.uri,\n\t\t\t headers = _ref70.headers,\n\t\t\t context = _ref70.context;\n\n\t\t\tvar req = this.request({ uri: uri, method: 'get', headers: headers, context: context, raw: true });\n\t\t\treturn this._provideFileData(req);\n\t\t}\n\n\t\t/**\n * List OAuth client created by the account\n * @param {Object} options Options for this API call\n * @param {String} [options.product] List clients for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listOAuthClients',\n\t\tvalue: function listOAuthClients(_ref71) {\n\t\t\tvar product = _ref71.product,\n\t\t\t auth = _ref71.auth,\n\t\t\t headers = _ref71.headers,\n\t\t\t context = _ref71.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/clients' : '/v1/clients';\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Create an OAuth client\n * @param {Object} options Options for this API call\n * @param {String} options.name Name of the OAuth client\n * @param {String} options.type web, installed or web\n * @param {String} [options.redirect_uri] URL to redirect after OAuth flow. Only for type web.\n * @param {Object} [options.scope] Limits what the access tokens created by this client can do.\n * @param {String} [options.product] Create client for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createOAuthClient',\n\t\tvalue: function createOAuthClient(_ref72) {\n\t\t\tvar name = _ref72.name,\n\t\t\t type = _ref72.type,\n\t\t\t redirect_uri = _ref72.redirect_uri,\n\t\t\t scope = _ref72.scope,\n\t\t\t product = _ref72.product,\n\t\t\t auth = _ref72.auth,\n\t\t\t headers = _ref72.headers,\n\t\t\t context = _ref72.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/clients' : '/v1/clients';\n\t\t\tvar data = { name: name, type: type, redirect_uri: redirect_uri, scope: scope };\n\t\t\treturn this.post({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Update an OAuth client\n * @param {Object} options Options for this API call\n * @param {String} options.clientId The OAuth client to update\n * @param {String} [options.name] New Name of the OAuth client\n * @param {Object} [options.scope] New scope of the OAuth client\n * @param {String} [options.product] Update client linked to this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'updateOAuthClient',\n\t\tvalue: function updateOAuthClient(_ref73) {\n\t\t\tvar clientId = _ref73.clientId,\n\t\t\t name = _ref73.name,\n\t\t\t scope = _ref73.scope,\n\t\t\t product = _ref73.product,\n\t\t\t auth = _ref73.auth,\n\t\t\t headers = _ref73.headers,\n\t\t\t context = _ref73.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/clients/' + clientId : '/v1/clients/' + clientId;\n\t\t\tvar data = { name: name, scope: scope };\n\t\t\treturn this.put({ uri: uri, data: data, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Delete an OAuth client\n * @param {Object} options Options for this API call\n * @param {String} options.clientId The OAuth client to update\n * @param {String} [options.product] OAuth client linked to this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteOAuthClient',\n\t\tvalue: function deleteOAuthClient(_ref74) {\n\t\t\tvar clientId = _ref74.clientId,\n\t\t\t product = _ref74.product,\n\t\t\t auth = _ref74.auth,\n\t\t\t headers = _ref74.headers,\n\t\t\t context = _ref74.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/clients/' + clientId : '/v1/clients/' + clientId;\n\t\t\treturn this.delete({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List products the account has access to\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listProducts',\n\t\tvalue: function listProducts(_ref75) {\n\t\t\tvar auth = _ref75.auth,\n\t\t\t headers = _ref75.headers,\n\t\t\t context = _ref75.context;\n\n\t\t\treturn this.get({ uri: '/v1/products', auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Get detailed information about a product\n * @param {Object} options Options for this API call\n * @param {String} options.product Product ID or slug\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProduct',\n\t\tvalue: function getProduct(_ref76) {\n\t\t\tvar product = _ref76.product,\n\t\t\t auth = _ref76.auth,\n\t\t\t headers = _ref76.headers,\n\t\t\t context = _ref76.context;\n\n\t\t\treturn this.get({ uri: '/v1/products/' + product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List product firmware versions\n * @param {Object} options Options for this API call\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listProductFirmware',\n\t\tvalue: function listProductFirmware(_ref77) {\n\t\t\tvar product = _ref77.product,\n\t\t\t auth = _ref77.auth,\n\t\t\t headers = _ref77.headers,\n\t\t\t context = _ref77.context;\n\n\t\t\treturn this.get({ uri: '/v1/products/' + product + '/firmware', auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List product firmware versions\n * @param {Object} options Options for this API call\n * @param {Object} options.file Path or Buffer of the new firmware file\n * Either a path or Buffer of the file contents in Node, or a File or Blob in the browser.\n * @param {Number} options.version Version number of new firmware\n * @param {String} options.title Short identifier for the new firmware\n * @param {String} [options.description] Longer description for the new firmware\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'uploadProductFirmware',\n\t\tvalue: function uploadProductFirmware(_ref78) {\n\t\t\tvar file = _ref78.file,\n\t\t\t version = _ref78.version,\n\t\t\t title = _ref78.title,\n\t\t\t description = _ref78.description,\n\t\t\t product = _ref78.product,\n\t\t\t auth = _ref78.auth,\n\t\t\t headers = _ref78.headers,\n\t\t\t context = _ref78.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/v1/products/' + product + '/firmware',\n\t\t\t\tmethod: 'post',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tform: {\n\t\t\t\t\tversion: version,\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tdescription: description\n\t\t\t\t},\n\t\t\t\tfiles: {\n\t\t\t\t\t'firmware.bin': file\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get information about a product firmware version\n * @param {Object} options Options for this API call\n * @param {Number} options.version Version number of firmware\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductFirmware',\n\t\tvalue: function getProductFirmware(_ref79) {\n\t\t\tvar version = _ref79.version,\n\t\t\t product = _ref79.product,\n\t\t\t auth = _ref79.auth,\n\t\t\t headers = _ref79.headers,\n\t\t\t context = _ref79.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/firmware/' + version,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Update information for a product firmware version\n * @param {Object} options Options for this API call\n * @param {Number} options.version Version number of new firmware\n * @param {String} [options.title] New title\n * @param {String} [options.description] New description\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'updateProductFirmware',\n\t\tvalue: function updateProductFirmware(_ref80) {\n\t\t\tvar version = _ref80.version,\n\t\t\t title = _ref80.title,\n\t\t\t description = _ref80.description,\n\t\t\t product = _ref80.product,\n\t\t\t auth = _ref80.auth,\n\t\t\t headers = _ref80.headers,\n\t\t\t context = _ref80.context;\n\n\t\t\tvar uri = '/v1/products/' + product + '/firmware/' + version;\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: { title: title, description: description }, context: context });\n\t\t}\n\n\t\t/**\n * Download a product firmware binary\n * @param {Object} options Options for this API call\n * @param {Number} options.version Version number of new firmware\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Request} A promise\n */\n\n\t}, {\n\t\tkey: 'downloadProductFirmware',\n\t\tvalue: function downloadProductFirmware(_ref81) {\n\t\t\tvar version = _ref81.version,\n\t\t\t product = _ref81.product,\n\t\t\t auth = _ref81.auth,\n\t\t\t headers = _ref81.headers,\n\t\t\t context = _ref81.context;\n\n\t\t\tvar req = this.request({\n\t\t\t\turi: '/v1/products/' + product + '/firmware/' + version + '/binary',\n\t\t\t\tmethod: 'get',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context,\n\t\t\t\traw: true\n\t\t\t});\n\n\t\t\treturn this._provideFileData(req);\n\t\t}\n\t}, {\n\t\tkey: '_provideFileData',\n\t\tvalue: function _provideFileData(req) {\n\t\t\tif (this.agent.isForBrowser()) {\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} else {\n\t\t\t\treq = req.buffer(true).parse(_superagentBinaryParser2.default);\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\n\t\t/**\n * Release a product firmware version as the default version\n * @param {Object} options Options for this API call\n * @param {Number} options.version Version number of new firmware\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'releaseProductFirmware',\n\t\tvalue: function releaseProductFirmware(_ref82) {\n\t\t\tvar version = _ref82.version,\n\t\t\t product = _ref82.product,\n\t\t\t auth = _ref82.auth,\n\t\t\t headers = _ref82.headers,\n\t\t\t context = _ref82.context;\n\n\t\t\tvar uri = '/v1/products/' + product + '/firmware/release';\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: { version: version }, context: context });\n\t\t}\n\n\t\t/**\n * List product team members\n * @param {Object} options Options for this API call\n * @param {String} options.product Team for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listTeamMembers',\n\t\tvalue: function listTeamMembers(_ref83) {\n\t\t\tvar product = _ref83.product,\n\t\t\t auth = _ref83.auth,\n\t\t\t headers = _ref83.headers,\n\t\t\t context = _ref83.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/team',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Invite Particle user to a product team\n * @param {Object} options Options for this API call\n * @param {String} options.username Username for the Particle account\n * @param {String} options.product Team for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'inviteTeamMember',\n\t\tvalue: function inviteTeamMember(_ref84) {\n\t\t\tvar username = _ref84.username,\n\t\t\t product = _ref84.product,\n\t\t\t auth = _ref84.auth,\n\t\t\t headers = _ref84.headers,\n\t\t\t context = _ref84.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/products/' + product + '/team',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { username: username },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Remove Particle user to a product team\n * @param {Object} options Options for this API call\n * @param {String} options.username Username for the Particle account\n * @param {String} options.product Team for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeTeamMember',\n\t\tvalue: function removeTeamMember(_ref85) {\n\t\t\tvar username = _ref85.username,\n\t\t\t product = _ref85.product,\n\t\t\t auth = _ref85.auth,\n\t\t\t headers = _ref85.headers,\n\t\t\t context = _ref85.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/products/' + product + '/team/' + username,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Fetch details about a serial number\n * @param {Object} options Options for this API call\n * @param {String} options.serialNumber The serial number printed on the barcode of the device packaging\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'lookupSerialNumber',\n\t\tvalue: function lookupSerialNumber(_ref86) {\n\t\t\tvar serialNumber = _ref86.serialNumber,\n\t\t\t auth = _ref86.auth,\n\t\t\t headers = _ref86.headers,\n\t\t\t context = _ref86.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/serial_numbers/' + serialNumber,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Create a mesh network\n * @param {Object} options Options for this API call\n * @param {String} options.name Network name\n * @param {String} options.deviceId Gateway device ID\n * @param {String} [options.iccid] ICCID of the active SIM card (only for cellular gateway devices)\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createMeshNetwork',\n\t\tvalue: function createMeshNetwork(_ref87) {\n\t\t\tvar name = _ref87.name,\n\t\t\t deviceId = _ref87.deviceId,\n\t\t\t iccid = _ref87.iccid,\n\t\t\t auth = _ref87.auth,\n\t\t\t headers = _ref87.headers,\n\t\t\t context = _ref87.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/networks',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { name: name, device_id: deviceId, iccid: iccid },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Remove a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} options.networkId Network ID or name\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeMeshNetwork',\n\t\tvalue: function removeMeshNetwork(_ref88) {\n\t\t\tvar networkId = _ref88.networkId,\n\t\t\t auth = _ref88.auth,\n\t\t\t headers = _ref88.headers,\n\t\t\t context = _ref88.context;\n\n\t\t\treturn this.delete({ uri: '/v1/networks/' + networkId, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List all mesh networks\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access token\n * @param {Number} [options.page] Current page of results\n * @param {Number} [options.perPage] Records per page\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listMeshNetworks',\n\t\tvalue: function listMeshNetworks(_ref89) {\n\t\t\tvar page = _ref89.page,\n\t\t\t perPage = _ref89.perPage,\n\t\t\t auth = _ref89.auth,\n\t\t\t headers = _ref89.headers,\n\t\t\t context = _ref89.context;\n\n\t\t\tvar query = page ? { page: page, per_page: perPage } : undefined;\n\t\t\treturn this.get({ uri: '/v1/networks', auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\n\t\t/**\n * Get information about a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} options.networkId Network ID or name\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getMeshNetwork',\n\t\tvalue: function getMeshNetwork(_ref90) {\n\t\t\tvar networkId = _ref90.networkId,\n\t\t\t auth = _ref90.auth,\n\t\t\t headers = _ref90.headers,\n\t\t\t context = _ref90.context;\n\n\t\t\treturn this.get({ uri: '/v1/networks/' + networkId, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Modify a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} options.networkId Network ID or name\n * @param {String} options.action 'add-device', 'remove-device', 'gateway-enable' or 'gateway-disable'\n * @param {String} options.deviceId Device ID\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'updateMeshNetwork',\n\t\tvalue: function updateMeshNetwork(_ref91) {\n\t\t\tvar networkId = _ref91.networkId,\n\t\t\t action = _ref91.action,\n\t\t\t deviceId = _ref91.deviceId,\n\t\t\t auth = _ref91.auth,\n\t\t\t headers = _ref91.headers,\n\t\t\t context = _ref91.context;\n\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/networks/' + networkId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { action: action, device_id: deviceId },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Add a device to a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} options.networkId Network ID or name\n * @param {String} options.deviceId Device ID\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'addMeshNetworkDevice',\n\t\tvalue: function addMeshNetworkDevice(_ref92) {\n\t\t\tvar networkId = _ref92.networkId,\n\t\t\t deviceId = _ref92.deviceId,\n\t\t\t auth = _ref92.auth,\n\t\t\t headers = _ref92.headers,\n\t\t\t context = _ref92.context;\n\n\t\t\treturn this.updateMeshNetwork({\n\t\t\t\taction: 'add-device',\n\t\t\t\tnetworkId: networkId,\n\t\t\t\tdeviceId: deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Remove a device from a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} [options.networkId] Network ID or name\n * @param {String} options.deviceId Device ID\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeMeshNetworkDevice',\n\t\tvalue: function removeMeshNetworkDevice(_ref93) {\n\t\t\tvar networkId = _ref93.networkId,\n\t\t\t deviceId = _ref93.deviceId,\n\t\t\t auth = _ref93.auth,\n\t\t\t headers = _ref93.headers,\n\t\t\t context = _ref93.context;\n\n\t\t\tif (!networkId) {\n\t\t\t\treturn this.delete({\n\t\t\t\t\turi: '/v1/devices/' + deviceId + '/network',\n\t\t\t\t\tauth: auth,\n\t\t\t\t\theaders: headers, context: context\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn this.updateMeshNetwork({\n\t\t\t\taction: 'remove-device',\n\t\t\t\tnetworkId: networkId,\n\t\t\t\tdeviceId: deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * List all devices of a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} options.networkId Network ID or name\n * @param {String} options.auth Access token\n * @param {Number} [options.role] Device role: 'gateway' or 'node'\n * @param {Number} [options.page] Current page of results\n * @param {Number} [options.perPage] Records per page\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listMeshNetworkDevices',\n\t\tvalue: function listMeshNetworkDevices(_ref94) {\n\t\t\tvar networkId = _ref94.networkId,\n\t\t\t role = _ref94.role,\n\t\t\t page = _ref94.page,\n\t\t\t perPage = _ref94.perPage,\n\t\t\t auth = _ref94.auth,\n\t\t\t headers = _ref94.headers,\n\t\t\t context = _ref94.context;\n\n\t\t\tvar query = role || page ? { role: role, page: page, per_page: perPage } : undefined;\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/networks/' + networkId + '/devices',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tquery: query,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get product configuration\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductConfiguration',\n\t\tvalue: function getProductConfiguration(_ref95) {\n\t\t\tvar auth = _ref95.auth,\n\t\t\t product = _ref95.product,\n\t\t\t headers = _ref95.headers,\n\t\t\t context = _ref95.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/config',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get product configuration schema\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductConfigurationSchema',\n\t\tvalue: function getProductConfigurationSchema(_ref96) {\n\t\t\tvar auth = _ref96.auth,\n\t\t\t product = _ref96.product,\n\t\t\t _ref96$headers = _ref96.headers,\n\t\t\t headers = _ref96$headers === undefined ? {} : _ref96$headers,\n\t\t\t context = _ref96.context;\n\n\t\t\theaders.accept = 'application/schema+json';\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/config',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get product device's configuration\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {String} options.deviceId Device ID to access\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductDeviceConfiguration',\n\t\tvalue: function getProductDeviceConfiguration(_ref97) {\n\t\t\tvar auth = _ref97.auth,\n\t\t\t product = _ref97.product,\n\t\t\t deviceId = _ref97.deviceId,\n\t\t\t headers = _ref97.headers,\n\t\t\t context = _ref97.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/config/' + deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get product device's configuration schema\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {String} options.deviceId Device ID to access\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductDeviceConfigurationSchema',\n\t\tvalue: function getProductDeviceConfigurationSchema(_ref98) {\n\t\t\tvar auth = _ref98.auth,\n\t\t\t product = _ref98.product,\n\t\t\t deviceId = _ref98.deviceId,\n\t\t\t headers = _ref98.headers,\n\t\t\t context = _ref98.context;\n\n\t\t\theaders.accept = 'application/schema+json';\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/config/' + deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Set product configuration\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} opitons.config Product configuration to update\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'setProductConfiguration',\n\t\tvalue: function setProductConfiguration(_ref99) {\n\t\t\tvar auth = _ref99.auth,\n\t\t\t product = _ref99.product,\n\t\t\t config = _ref99.config,\n\t\t\t headers = _ref99.headers,\n\t\t\t context = _ref99.context;\n\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/products/' + product + '/config',\n\t\t\t\tauth: auth,\n\t\t\t\tdata: config,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Set product configuration for a specific device within the product\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} opitons.config Product configuration to update\n * @param {String} options.deviceId Device ID to access\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'setProductDeviceConfiguration',\n\t\tvalue: function setProductDeviceConfiguration(_ref100) {\n\t\t\tvar auth = _ref100.auth,\n\t\t\t product = _ref100.product,\n\t\t\t deviceId = _ref100.deviceId,\n\t\t\t config = _ref100.config,\n\t\t\t headers = _ref100.headers,\n\t\t\t context = _ref100.context;\n\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/products/' + product + '/config/' + deviceId,\n\t\t\t\tdata: config,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Query location for devices within a product\n * @param {Object} options Options for this API call\n * @param {String} options.product Locations for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {String} options.dateRange Start and end date in ISO8601 format, separated by comma, to query\n * @param {String} options.rectBl Bottom left of the rectangular bounding box to query. Latitude and longitude separated by comma\n * @param {String} options.rectTr Top right of the rectangular bounding box to query. Latitude and longitude separated by comma\n * @param {String} options.deviceId Device ID prefix to include in the query\n * @param {String} options.deviceName Device name prefix to include in the query\n * @param {String} options.groups Array of group names to include in the query\n * @param {String} options.page Page of results to display. Defaults to 1\n * @param {String} options.perPage Number of results per page. Defaults to 20. Maximum of 100\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductLocations',\n\t\tvalue: function getProductLocations(_ref101) {\n\t\t\tvar auth = _ref101.auth,\n\t\t\t product = _ref101.product,\n\t\t\t dateRange = _ref101.dateRange,\n\t\t\t rectBl = _ref101.rectBl,\n\t\t\t rectTr = _ref101.rectTr,\n\t\t\t deviceId = _ref101.deviceId,\n\t\t\t deviceName = _ref101.deviceName,\n\t\t\t groups = _ref101.groups,\n\t\t\t page = _ref101.page,\n\t\t\t perPage = _ref101.perPage,\n\t\t\t headers = _ref101.headers,\n\t\t\t context = _ref101.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/locations',\n\t\t\t\tquery: {\n\t\t\t\t\tdate_range: dateRange,\n\t\t\t\t\trect_bl: rectBl,\n\t\t\t\t\trect_tr: rectTr,\n\t\t\t\t\tdevice_id: deviceId,\n\t\t\t\t\tdevice_name: deviceName,\n\t\t\t\t\tgroups: groups,\n\t\t\t\t\tpage: page,\n\t\t\t\t\tper_page: perPage\n\t\t\t\t},\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Query location for one device within a product\n * @param {Object} options Options for this API call\n * @param {String} options.product Locations for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {String} options.dateRange Start and end date in ISO8601 format, separated by comma, to query\n * @param {String} options.rectBl Bottom left of the rectangular bounding box to query. Latitude and longitude separated by comma\n * @param {String} options.rectTr Top right of the rectangular bounding box to query. Latitude and longitude separated by comma\n * @param {String} options.deviceId Device ID to query\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductDeviceLocations',\n\t\tvalue: function getProductDeviceLocations(_ref102) {\n\t\t\tvar auth = _ref102.auth,\n\t\t\t product = _ref102.product,\n\t\t\t dateRange = _ref102.dateRange,\n\t\t\t rectBl = _ref102.rectBl,\n\t\t\t rectTr = _ref102.rectTr,\n\t\t\t deviceId = _ref102.deviceId,\n\t\t\t headers = _ref102.headers,\n\t\t\t context = _ref102.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/locations/' + deviceId,\n\t\t\t\tquery: {\n\t\t\t\t\tdate_range: dateRange,\n\t\t\t\t\trect_bl: rectBl,\n\t\t\t\t\trect_tr: rectTr\n\t\t\t\t},\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Set default auth token that will be used in each method if `auth` is not provided\n * @param {String} auth A Particle access token\n * @returns {undefined}\n */\n\n\t}, {\n\t\tkey: 'setDefaultAuth',\n\t\tvalue: function setDefaultAuth(auth) {\n\t\t\tif (typeof auth === 'string' && auth.length !== 0) {\n\t\t\t\tthis._defaultAuth = auth;\n\t\t\t} else {\n\t\t\t\tthrow new Error('Must pass a non-empty string');\n\t\t\t}\n\t\t}\n\t\t/**\n * Return provided token if truthy else use default auth if truthy else undefined\n * @param {*} auth Optional auth token or undefined\n * @private\n * @returns {String|undefined} a Particle auth token or undefined\n */\n\n\t}, {\n\t\tkey: '_getActiveAuthToken',\n\t\tvalue: function _getActiveAuthToken(auth) {\n\t\t\treturn auth || this._defaultAuth;\n\t\t}\n\t\t/**\n * API URI to access a device\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID to access\n * @param {String} [options.product] Device only in this product ID or slug\n * @private\n * @returns {string} URI\n */\n\n\t}, {\n\t\tkey: 'deviceUri',\n\t\tvalue: function deviceUri(_ref103) {\n\t\t\tvar deviceId = _ref103.deviceId,\n\t\t\t product = _ref103.product;\n\n\t\t\treturn product ? '/v1/products/' + product + '/devices/' + deviceId : '/v1/devices/' + deviceId;\n\t\t}\n\t}, {\n\t\tkey: 'get',\n\t\tvalue: function get(_ref104) {\n\t\t\tvar uri = _ref104.uri,\n\t\t\t auth = _ref104.auth,\n\t\t\t headers = _ref104.headers,\n\t\t\t query = _ref104.query,\n\t\t\t context = _ref104.context;\n\n\t\t\tcontext = this._buildContext(context);\n\t\t\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn this.agent.get({ uri: uri, auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'head',\n\t\tvalue: function head(_ref105) {\n\t\t\tvar uri = _ref105.uri,\n\t\t\t auth = _ref105.auth,\n\t\t\t headers = _ref105.headers,\n\t\t\t query = _ref105.query,\n\t\t\t context = _ref105.context;\n\n\t\t\tcontext = this._buildContext(context);\n\t\t\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn this.agent.head({ uri: uri, auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'post',\n\t\tvalue: function post(_ref106) {\n\t\t\tvar uri = _ref106.uri,\n\t\t\t auth = _ref106.auth,\n\t\t\t headers = _ref106.headers,\n\t\t\t data = _ref106.data,\n\t\t\t context = _ref106.context;\n\n\t\t\tcontext = this._buildContext(context);\n\t\t\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn this.agent.post({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'put',\n\t\tvalue: function put(_ref107) {\n\t\t\tvar uri = _ref107.uri,\n\t\t\t auth = _ref107.auth,\n\t\t\t headers = _ref107.headers,\n\t\t\t data = _ref107.data,\n\t\t\t context = _ref107.context;\n\n\t\t\tcontext = this._buildContext(context);\n\t\t\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn this.agent.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'delete',\n\t\tvalue: function _delete(_ref108) {\n\t\t\tvar uri = _ref108.uri,\n\t\t\t auth = _ref108.auth,\n\t\t\t headers = _ref108.headers,\n\t\t\t data = _ref108.data,\n\t\t\t context = _ref108.context;\n\n\t\t\tcontext = this._buildContext(context);\n\t\t\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn this.agent.delete({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'request',\n\t\tvalue: function request(args) {\n\t\t\targs.context = this._buildContext(args.context);\n\t\t\targs.auth = this._getActiveAuthToken(args.auth);\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\n\t\t// Internal method used to target Particle's APIs other than the default\n\n\t}, {\n\t\tkey: 'setBaseUrl',\n\t\tvalue: function setBaseUrl(baseUrl) {\n\t\t\tthis.baseUrl = baseUrl;\n\t\t\tthis.agent.setBaseUrl(baseUrl);\n\t\t}\n\t}]);\n\treturn Particle;\n}();\n\n// Aliases for backwards compatibility\n\n\nParticle.prototype.removeAccessToken = Particle.prototype.deleteAccessToken;\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","module.exports = { \"default\": require(\"core-js/library/fn/get-iterator\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/is-iterable\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/entries\"), __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/set-prototype-of\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/promise\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };","\"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}();","\"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}();","\"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 && obj !== _symbol2.default.prototype ? \"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 && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\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 return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return (b64.length * 3 / 4) - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\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; i < l; i += 4) {\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","/*!\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","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 \"451\": \"Unavailable For Legal Reasons\",\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","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.get-iterator');\n","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.is-iterable');\n","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n","require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\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};\n","require('../../modules/es7.object.entries');\nmodule.exports = require('../../modules/_core').Object.entries;\n","require('../../modules/es6.object.get-prototype-of');\nmodule.exports = require('../../modules/_core').Object.getPrototypeOf;\n","require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;\n","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/_core').Object.setPrototypeOf;\n","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nrequire('../modules/es7.promise.finally');\nrequire('../modules/es7.promise.try');\nmodule.exports = require('../modules/_core').Promise;\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;\n","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","module.exports = function () { /* empty */ };\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};\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};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf 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};\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar 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};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var core = module.exports = { version: '2.5.1' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","// 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};\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};\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});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var 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;\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var 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;\n","// 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\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var dP = require('./_object-dp');\nvar 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};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\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};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\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};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar 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};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar 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 var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\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};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\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 var 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};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","module.exports = {};\n","module.exports = true;\n","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar 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};\n","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar 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 var 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};\n","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(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}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $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 var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var 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 var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar 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 var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var 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","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar 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};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar 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};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar 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","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar 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};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var 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};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","exports.f = {}.propertyIsEnumerable;\n","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","var getKeys = require('./_object-keys');\nvar toIObject = require('./_to-iobject');\nvar isEnum = require('./_object-pie').f;\nmodule.exports = function (isEntries) {\n return function (it) {\n var O = toIObject(it);\n var keys = getKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var 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};\n","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\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};\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};\n","module.exports = require('./_hide');\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar 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};\n","'use strict';\nvar global = require('./_global');\nvar core = require('./_core');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar 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};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar 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};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n","var toInteger = require('./_to-integer');\nvar 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 var i = toInteger(pos);\n var l = s.length;\n var 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};\n","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\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 = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\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 // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(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};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\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};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar 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};\n","exports.f = require('./_wks');\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar 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;\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar 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};\n","var anObject = require('./_an-object');\nvar 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};\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar 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 // eslint-disable-next-line no-prototype-builtins\n || Iterators.hasOwnProperty(classof(O));\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar 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 var kind = this._k;\n var 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');\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') });\n","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') });\n","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 });\n","// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = require('./_to-object');\nvar $getPrototypeOf = require('./_object-gpo');\n\nrequire('./_object-sap')('getPrototypeOf', function () {\n return function getPrototypeOf(it) {\n return $getPrototypeOf(toObject(it));\n };\n});\n","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });\n","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\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 isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\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 var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var 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 var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = 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 (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n if (promise._h == 1) return false;\n var chain = promise._a || promise._c;\n var i = 0;\n var 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 var 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 // eslint-disable-next-line no-unused-vars\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 OwnPromiseCapability = 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 newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\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 var $$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 return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\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 var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var 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 (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\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 var index = this._i;\n var 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});\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar 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 var i = 0;\n var l = keys.length;\n var 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 var result = [];\n var i = 0;\n var 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 var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var 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 es6Symbols = (\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(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\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(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\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 var i = 1;\n var 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);\n","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export');\nvar $entries = require('./_object-to-array')(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it) {\n return $entries(it);\n }\n});\n","// https://github.com/tc39/proposal-promise-finally\n'use strict';\nvar $export = require('./_export');\nvar core = require('./_core');\nvar global = require('./_global');\nvar speciesConstructor = require('./_species-constructor');\nvar promiseResolve = require('./_promise-resolve');\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n","'use strict';\n// https://github.com/tc39/proposal-promise-try\nvar $export = require('./_export');\nvar newPromiseCapability = require('./_new-promise-capability');\nvar perform = require('./_perform');\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapability.f(this);\n var result = perform(callbackfn);\n (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n return promiseCapability.promise;\n} });\n","require('./_wks-define')('asyncIterator');\n","require('./_wks-define')('observable');\n","require('./es6.array.iterator');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar TO_STRING_TAG = require('./_wks')('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.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\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","module.exports = stringify\nstringify.default = stringify\nstringify.stable = deterministicStringify\nstringify.stableStringify = deterministicStringify\n\nvar arr = []\nvar replacerStack = []\n\n// Regular stringify\nfunction stringify (obj, replacer, spacer) {\n decirc(obj, '', [], undefined)\n var res\n if (replacerStack.length === 0) {\n res = JSON.stringify(obj, replacer, spacer)\n } else {\n res = JSON.stringify(obj, replaceGetterValues(replacer), spacer)\n }\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n return res\n}\nfunction decirc (val, k, stack, parent) {\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k)\n if (propertyDescriptor.get !== undefined) {\n if (propertyDescriptor.configurable) {\n Object.defineProperty(parent, k, { value: '[Circular]' })\n arr.push([parent, k, val, propertyDescriptor])\n } else {\n replacerStack.push([val, k])\n }\n } else {\n parent[k] = '[Circular]'\n arr.push([parent, k, val])\n }\n return\n }\n }\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n decirc(val[i], i, stack, val)\n }\n } else {\n var keys = Object.keys(val)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n decirc(val[key], key, stack, val)\n }\n }\n stack.pop()\n }\n}\n\n// Stable-stringify\nfunction compareFunction (a, b) {\n if (a < b) {\n return -1\n }\n if (a > b) {\n return 1\n }\n return 0\n}\n\nfunction deterministicStringify (obj, replacer, spacer) {\n var tmp = deterministicDecirc(obj, '', [], undefined) || obj\n var res\n if (replacerStack.length === 0) {\n res = JSON.stringify(tmp, replacer, spacer)\n } else {\n res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer)\n }\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n return res\n}\n\nfunction deterministicDecirc (val, k, stack, parent) {\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k)\n if (propertyDescriptor.get !== undefined) {\n if (propertyDescriptor.configurable) {\n Object.defineProperty(parent, k, { value: '[Circular]' })\n arr.push([parent, k, val, propertyDescriptor])\n } else {\n replacerStack.push([val, k])\n }\n } else {\n parent[k] = '[Circular]'\n arr.push([parent, k, val])\n }\n return\n }\n }\n if (typeof val.toJSON === 'function') {\n return\n }\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n deterministicDecirc(val[i], i, stack, val)\n }\n } else {\n // Create a temporary object in the required way\n var tmp = {}\n var keys = Object.keys(val).sort(compareFunction)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n deterministicDecirc(val[key], key, stack, val)\n tmp[key] = val[key]\n }\n if (parent !== undefined) {\n arr.push([parent, k, val])\n parent[k] = tmp\n } else {\n return tmp\n }\n }\n stack.pop()\n }\n}\n\n// wraps replacer function to handle values we couldn't replace\n// and mark them as [Circular]\nfunction replaceGetterValues (replacer) {\n replacer = replacer !== undefined ? replacer : function (k, v) { return v }\n return function (key, val) {\n if (replacerStack.length > 0) {\n for (var i = 0; i < replacerStack.length; i++) {\n var part = replacerStack[i]\n if (part[1] === key && part[0] === val) {\n val = '[Circular]'\n replacerStack.splice(i, 1)\n break\n }\n }\n }\n return replacer.call(this, key, val)\n }\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","// 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\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\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 // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\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;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\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","/*! 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","// 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","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","var ClientRequest = require('./lib/request')\nvar response = require('./lib/response')\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.ClientRequest = ClientRequest\nhttp.IncomingMessage = response.IncomingMessage\n\nhttp.Agent = function () {}\nhttp.Agent.defaultMaxSockets = 4\n\nhttp.globalAgent = new http.Agent()\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]","exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream)\n\nexports.writableStream = isFunction(global.WritableStream)\n\nexports.abortController = isFunction(global.AbortController)\n\n// The xhr request to example.com may violate some restrictive CSP configurations,\n// so if we're running in a browser that supports `fetch`, avoid calling getXHR()\n// and assume support for certain features below.\nvar xhr\nfunction getXHR () {\n\t// Cache the xhr value\n\tif (xhr !== undefined) return xhr\n\n\tif (global.XMLHttpRequest) {\n\t\txhr = new global.XMLHttpRequest()\n\t\t// If XDomainRequest is available (ie only, where xhr might not work\n\t\t// cross domain), use the page location. Otherwise use example.com\n\t\t// Note: this doesn't actually make an http request.\n\t\ttry {\n\t\t\txhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com')\n\t\t} catch(e) {\n\t\t\txhr = null\n\t\t}\n\t} else {\n\t\t// Service workers don't have XHR\n\t\txhr = null\n\t}\n\treturn xhr\n}\n\nfunction checkTypeSupport (type) {\n\tvar xhr = getXHR()\n\tif (!xhr) return false\n\ttry {\n\t\txhr.responseType = type\n\t\treturn xhr.responseType === type\n\t} catch (e) {}\n\treturn false\n}\n\n// If fetch is supported, then arraybuffer will be supported too. Skip calling\n// checkTypeSupport(), since that calls getXHR().\nexports.arraybuffer = exports.fetch || checkTypeSupport('arraybuffer')\n\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 && checkTypeSupport('ms-stream')\nexports.mozchunkedarraybuffer = !exports.fetch && checkTypeSupport('moz-chunked-arraybuffer')\n\n// If fetch is supported, then overrideMimeType will be supported too. Skip calling\n// getXHR().\nexports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false)\n\nfunction isFunction (value) {\n\treturn typeof value === 'function'\n}\n\nxhr = null // Help gc\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar response = require('./response')\nvar stream = require('readable-stream')\n\nvar IncomingMessage = response.IncomingMessage\nvar rStates = response.readyStates\n\nfunction decideMode (preferBinary, useFetch) {\n\tif (capability.fetch && useFetch) {\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 {\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 ' + Buffer.from(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\tvar useFetch = true\n\tif (opts.mode === 'disable-fetch' || ('requestTimeout' in opts && !capability.abortController)) {\n\t\t// If the use of XHR should be preferred. Not typically needed.\n\t\tuseFetch = false\n\t\tpreferBinary = true\n\t} else if (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, useFetch)\n\tself._fetchTimer = null\n\tself._socketTimeout = null\n\tself._socketTimer = null\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 header = this._headers[name.toLowerCase()]\n\tif (header)\n\t\treturn header.value\n\treturn null\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\tif ('timeout' in opts && opts.timeout !== 0) {\n\t\tself.setTimeout(opts.timeout)\n\t}\n\n\tvar headersObj = self._headers\n\tvar body = null\n\tif (opts.method !== 'GET' && opts.method !== 'HEAD') {\n body = new Blob(self._body, {\n type: (headersObj['content-type'] || {}).value || ''\n });\n }\n\n\t// create flattened list of headers\n\tvar headersList = []\n\tObject.keys(headersObj).forEach(function (keyName) {\n\t\tvar name = headersObj[keyName].name\n\t\tvar value = headersObj[keyName].value\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach(function (v) {\n\t\t\t\theadersList.push([name, v])\n\t\t\t})\n\t\t} else {\n\t\t\theadersList.push([name, value])\n\t\t}\n\t})\n\n\tif (self._mode === 'fetch') {\n\t\tvar signal = null\n\t\tif (capability.abortController) {\n\t\t\tvar controller = new AbortController()\n\t\t\tsignal = controller.signal\n\t\t\tself._fetchAbortController = controller\n\n\t\t\tif ('requestTimeout' in opts && opts.requestTimeout !== 0) {\n\t\t\t\tself._fetchTimer = global.setTimeout(function () {\n\t\t\t\t\tself.emit('requestTimeout')\n\t\t\t\t\tif (self._fetchAbortController)\n\t\t\t\t\t\tself._fetchAbortController.abort()\n\t\t\t\t}, opts.requestTimeout)\n\t\t\t}\n\t\t}\n\n\t\tglobal.fetch(self._opts.url, {\n\t\t\tmethod: self._opts.method,\n\t\t\theaders: headersList,\n\t\t\tbody: body || undefined,\n\t\t\tmode: 'cors',\n\t\t\tcredentials: opts.withCredentials ? 'include' : 'same-origin',\n\t\t\tsignal: signal\n\t\t}).then(function (response) {\n\t\t\tself._fetchResponse = response\n\t\t\tself._resetTimers(false)\n\t\t\tself._connect()\n\t\t}, function (reason) {\n\t\t\tself._resetTimers(true)\n\t\t\tif (!self._destroyed)\n\t\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\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\tif ('requestTimeout' in opts) {\n\t\t\txhr.timeout = opts.requestTimeout\n\t\t\txhr.ontimeout = function () {\n\t\t\t\tself.emit('requestTimeout')\n\t\t\t}\n\t\t}\n\n\t\theadersList.forEach(function (header) {\n\t\t\txhr.setRequestHeader(header[0], header[1])\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._resetTimers(true)\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\tself._resetTimers(false)\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(self._resetTimers.bind(self))\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, self._resetTimers.bind(self))\n\tself._response.on('error', function(err) {\n\t\tself.emit('error', err)\n\t})\n\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._resetTimers = function (done) {\n\tvar self = this\n\n\tglobal.clearTimeout(self._socketTimer)\n\tself._socketTimer = null\n\n\tif (done) {\n\t\tglobal.clearTimeout(self._fetchTimer)\n\t\tself._fetchTimer = null\n\t} else if (self._socketTimeout) {\n\t\tself._socketTimer = global.setTimeout(function () {\n\t\t\tself.emit('timeout')\n\t\t}, self._socketTimeout)\n\t}\n}\n\nClientRequest.prototype.abort = ClientRequest.prototype.destroy = function (err) {\n\tvar self = this\n\tself._destroyed = true\n\tself._resetTimers(true)\n\tif (self._response)\n\t\tself._response._destroyed = true\n\tif (self._xhr)\n\t\tself._xhr.abort()\n\telse if (self._fetchAbortController)\n\t\tself._fetchAbortController.abort()\n\n\tif (err)\n\t\tself.emit('error', err)\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.setTimeout = function (timeout, cb) {\n\tvar self = this\n\n\tif (cb)\n\t\tself.once('timeout', cb)\n\n\tself._socketTimeout = timeout\n\tself._resetTimers(false)\n}\n\nClientRequest.prototype.flushHeaders = 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'via'\n]\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar stream = require('readable-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, resetTimers) {\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.url = response.url\n\t\tself.statusCode = response.status\n\t\tself.statusMessage = response.statusText\n\t\t\n\t\tresponse.headers.forEach(function (header, key){\n\t\t\tself.headers[key.toLowerCase()] = header\n\t\t\tself.rawHeaders.push(key, header)\n\t\t})\n\n\t\tif (capability.writableStream) {\n\t\t\tvar writable = new WritableStream({\n\t\t\t\twrite: function (chunk) {\n\t\t\t\t\tresetTimers(false)\n\t\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\t\tif (self._destroyed) {\n\t\t\t\t\t\t\treject()\n\t\t\t\t\t\t} else if(self.push(Buffer.from(chunk))) {\n\t\t\t\t\t\t\tresolve()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself._resumeFetch = resolve\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tclose: function () {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.push(null)\n\t\t\t\t},\n\t\t\t\tabort: function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t}\n\t\t\t})\n\n\t\t\ttry {\n\t\t\t\tresponse.body.pipeTo(writable).catch(function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t} catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this\n\t\t}\n\t\t// fallback for when writableStream or pipeTo aren't available\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\tresetTimers(result.done)\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(Buffer.from(result.value))\n\t\t\t\tread()\n\t\t\t}).catch(function (err) {\n\t\t\t\tresetTimers(true)\n\t\t\t\tif (!self._destroyed)\n\t\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t}\n\t\tread()\n\t} else {\n\t\tself._xhr = xhr\n\t\tself._pos = 0\n\n\t\tself.url = xhr.responseURL\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\tvar self = this\n\n\tvar resolve = self._resumeFetch\n\tif (resolve) {\n\t\tself._resumeFetch = null\n\t\tresolve()\n\t}\n}\n\nIncomingMessage.prototype._onXHRProgress = function (resetTimers) {\n\tvar self = this\n\n\tvar xhr = self._xhr\n\n\tvar response = null\n\tswitch (self._mode) {\n\t\tcase 'text':\n\t\t\tresponse = xhr.responseText\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 = Buffer.alloc(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 || !xhr.response)\n\t\t\t\tbreak\n\t\t\tresponse = xhr.response\n\t\t\tself.push(Buffer.from(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(Buffer.from(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(Buffer.from(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\tresetTimers(true)\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\tresetTimers(true)\n\t\tself.push(null)\n\t}\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (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 };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (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}\n","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\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// 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'use strict';\n/**/\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n\n for (var key in obj) {\n keys.push(key);\n }\n\n return keys;\n};\n/**/\n\n\nmodule.exports = Duplex;\n\nvar Readable = require('./_stream_readable');\n\nvar Writable = require('./_stream_writable');\n\nrequire('inherits')(Duplex, Readable);\n\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n\n for (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}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n}); // the no-half-open enforcer\n\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return; // no more data can be written.\n // But allow more writes to happen in this tick.\n\n process.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\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// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\nrequire('inherits')(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\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'use strict';\n\nmodule.exports = Readable;\n/**/\n\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n/**/\n\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\n\n\nvar Stream = require('./internal/streams/stream');\n/**/\n\n\nvar Buffer = require('buffer').Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n/**/\n\n\nvar debugUtil = require('util');\n\nvar debug;\n\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\n\nvar BufferList = require('./internal/streams/buffer_list');\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.\n\n\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\n\nrequire('inherits')(Readable, Stream);\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // 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\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // 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\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // 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\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; // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n\n this.sync = true; // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true; // Should close be emitted on destroy. Defaults to true.\n\n this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')\n\n this.autoDestroy = !!options.autoDestroy; // has it been destroyed\n\n this.destroyed = false; // 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\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s\n\n this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled\n\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n\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\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex); // legacy\n\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\n\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\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.\n\n\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n}; // Unshift should *always* be something directly out of read()\n\n\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n } // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n\n\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\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 if (state.needReadable) emitReadable(stream);\n }\n\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n\n return er;\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n}; // backwards compatibility.\n\n\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8\n\n this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:\n\n var p = this._readableState.buffer.head;\n var content = '';\n\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n\n this._readableState.buffer.clear();\n\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n}; // Don't raise the hwm > 1GB\n\n\nvar MAX_HWM = 0x40000000;\n\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\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\n return n;\n} // This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\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 } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.\n\n\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false; // 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\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || 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); // if we've ended, and we're now clear, then finish it up.\n\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\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 // if we need a readable event, then we need to do some reading.\n\n\n var doRead = state.needReadable;\n debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some\n\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n } // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n\n\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; // if the length is currently zero, then we *need* a readable event.\n\n if (state.length === 0) state.needReadable = true; // call internal read method\n\n this._read(state.highWaterMark);\n\n state.sync = false; // 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\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 = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\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; // If we tried to read() past the EOF, then emit end on the next tick.\n\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n\n if (state.decoder) {\n var chunk = state.decoder.end();\n\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n\n state.ended = true;\n\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n state.emittedReadable = true;\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.\n\n\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\n\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n } // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n\n\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\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.\n\n\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length) // didn't get any data, stop spinning.\n break;\n }\n\n state.readingMore = false;\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.\n\n\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\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\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n\n default:\n state.pipes.push(dest);\n break;\n }\n\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\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\n\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n\n function cleanup() {\n debug('cleanup'); // cleanup event handlers once the pipe is broken\n\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', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true; // 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\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n src.on('data', ondata);\n\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n\n if (ret === false) {\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', state.awaitDrain);\n state.awaitDrain++;\n }\n\n src.pause();\n }\n } // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n\n\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.\n\n\n prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.\n\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n\n dest.once('close', onclose);\n\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n } // tell the dest that it's being piped to\n\n\n dest.emit('pipe', src); // start the flow if it hasn't been started already.\n\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\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 var unpipeInfo = {\n hasUnpiped: false\n }; // if we're not piping anywhere, then do nothing.\n\n if (state.pipesCount === 0) return this; // just one destination. most common case.\n\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 if (!dest) dest = state.pipes; // got a match.\n\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n } // slow case. multiple pipe destinations.\n\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 hasUnpiped: false\n });\n }\n\n return this;\n } // try to find the right one.\n\n\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n}; // set up data events if they are asked for\n// Ensure readable listeners eventually get something\n\n\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused\n\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n\n return res;\n};\n\nReadable.prototype.addListener = Readable.prototype.on;\n\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n\n return res;\n};\n\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n\n return res;\n};\n\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true; // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n} // pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\n\n\nReadable.prototype.resume = function () {\n var state = this._readableState;\n\n if (!state.flowing) {\n debug('resume'); // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n\n state.paused = false;\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n\n if (!state.reading) {\n stream.read(0);\n }\n\n state.resumeScheduled = false;\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\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n\n this._readableState.paused = true;\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n\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.\n\n\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode\n\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n\n if (!ret) {\n paused = true;\n stream.pause();\n }\n }); // proxy all the other methods.\n // important when wrapping filters and duplexes.\n\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n } // proxy certain important events.\n\n\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n } // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n\n\n this._read = function (n) {\n debug('wrapped _read', n);\n\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n\n return createReadableStreamAsyncIterator(this);\n };\n}\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n}); // exposed for testing purposes only.\n\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\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.\n\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\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.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift.\n\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\n\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n\n return from(Readable, iterable, opts);\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\n return -1;\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// 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'use strict';\n\nmodule.exports = Transform;\n\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\n\nvar Duplex = require('./_stream_duplex');\n\nrequire('inherits')(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n }; // start out asking for a readable event once data is transformed.\n\n this._readableState.needReadable = true; // 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\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n } // When the writable side finishes, then flush out anything remaining.\n\n\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\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.\n\n\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\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\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}; // 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.\n\n\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n\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\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data); // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\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// 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'use strict';\n\nmodule.exports = Writable;\n/* */\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n} // It seems a linked list but it is not\n// there will be only 2 of these for each stream\n\n\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\n\n\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n/**/\n\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\n\nvar Stream = require('./internal/streams/stream');\n/**/\n\n\nvar Buffer = require('buffer').Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\n\nrequire('inherits')(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // 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\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called\n\n this.finalCalled = false; // drain event flag.\n\n this.needDrain = false; // at the start of calling end()\n\n this.ending = false; // when end() has been called, and returned\n\n this.ended = false; // when 'finish' is emitted\n\n this.finished = false; // has it been destroyed\n\n this.destroyed = false; // 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\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode; // 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\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // 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\n this.length = 0; // a flag to see when we're in the middle of a write.\n\n this.writing = false; // when true all writes will be buffered until .uncork() call\n\n this.corked = 0; // 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\n this.sync = true; // 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\n this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)\n\n this.onwrite = function (er) {\n onwrite(stream, er);\n }; // the callback that the user supplies to write(chunk,encoding,cb)\n\n\n this.writecb = null; // the amount that is being written when _write is called.\n\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null; // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n\n this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n\n this.prefinished = false; // True if the error was already emitted and should not be thrown again\n\n this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.\n\n this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')\n\n this.autoDestroy = !!options.autoDestroy; // count buffered requests\n\n this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n\n while (current) {\n out.push(current);\n current = current.next;\n }\n\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})(); // Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\n\n\nvar realHasInstance;\n\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex); // legacy.\n\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n} // Otherwise people can pipe Writable streams, which is just wrong.\n\n\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb\n\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n} // Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\n\n\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n\n return true;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\n\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !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 ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\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.\n\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.\n\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\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 (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else 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\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er); // this can emit finish, and it will always happen\n // after error\n\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er); // this can emit finish, but finish must\n // always follow error\n\n finishMaybe(stream, state);\n }\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 if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\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) || stream.destroyed;\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\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} // 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.\n\n\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it\n\n\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 var count = 0;\n var allBuffers = true;\n\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n\n state.pendingcb++;\n state.lastBufferedRequest = null;\n\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n\n state.bufferedRequestCount = 0;\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 doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--; // 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\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\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); // .end() fully uncorks\n\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n } // ignore unnecessary end() calls.\n\n\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n\n if (err) {\n errorOrDestroy(stream, err);\n }\n\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n\n if (need) {\n prefinish(stream, state);\n\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n } // reuse the free corkReq.\n\n\n state.corkedRequestsFree.next = corkReq;\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\n\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};","'use strict';\n\nvar _Object$setPrototypeO;\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar finished = require('./end-of-stream');\n\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\n\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\n\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n\n if (resolve !== null) {\n var data = iter[kStream].read(); // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\n\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\n\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\n\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n\n next: function next() {\n var _this = this;\n\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n\n if (error !== null) {\n return Promise.reject(error);\n }\n\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n } // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n\n\n var lastPromise = this[kLastPromise];\n var promise;\n\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n\n promise = new Promise(this[kHandlePromise]);\n }\n\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\n\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n\n iterator[kError] = err;\n return;\n }\n\n var resolve = iterator[kLastResolve];\n\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\n\nmodule.exports = createReadableStreamAsyncIterator;","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar _require = require('buffer'),\n Buffer = _require.Buffer;\n\nvar _require2 = require('util'),\n inspect = _require2.inspect;\n\nvar custom = inspect && inspect.custom || 'inspect';\n\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\n\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\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 }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n\n while (p = p.next) {\n ret += s + p.data;\n }\n\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n\n return ret;\n } // Consumes a specified amount of bytes or characters from the buffered data.\n\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n } // Consumes a specified amount of characters from the buffered data.\n\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n\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\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n this.length -= c;\n return ret;\n } // Consumes a specified amount of bytes from the buffered data.\n\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n\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\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n this.length -= c;\n return ret;\n } // Make sure the linked list only shows the minimal necessary information.\n\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread({}, options, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n\n return BufferList;\n}();","'use strict'; // undocumented cb() API, needed for core, not for public API\n\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n\n return this;\n } // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n } // if this is a duplex stream mark the writable part as destroyed as well\n\n\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n\n return this;\n}\n\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\n\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\n\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n callback.apply(this, args);\n };\n}\n\nfunction noop() {}\n\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\n\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n\n var writableEnded = stream._writableState && stream._writableState.finished;\n\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n\n var onclose = function onclose() {\n var err;\n\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\n\nmodule.exports = eos;","module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n","// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n'use strict';\n\nvar eos;\n\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\n\nvar _require$codes = require('../../../errors').codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\n\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\n\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\n\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = require('./end-of-stream');\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true; // request.destroy just do .end - .abort is what we want\n\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\n\nfunction call(fn) {\n fn();\n}\n\nfunction pipe(from, to) {\n return from.pipe(to);\n}\n\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\n\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\n\nmodule.exports = pipeline;","'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\n\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\n\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n\n return Math.floor(hwm);\n } // Default value\n\n\n return state.objectMode ? 16 : 16 * 1024;\n}\n\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};","module.exports = require('events').EventEmitter;\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.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');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\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/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + 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':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\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.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\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","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}","function Agent() {\n this._defaults = [];\n}\n\n[\n 'use',\n 'on',\n 'once',\n 'set',\n 'query',\n 'type',\n 'accept',\n 'auth',\n 'withCredentials',\n 'sortQuery',\n 'retry',\n 'ok',\n 'redirects',\n 'timeout',\n 'buffer',\n 'serialize',\n 'parse',\n 'ca',\n 'key',\n 'pfx',\n 'cert',\n 'disableTLSCerts'\n].forEach(fn => {\n // Default setting for all requests from this agent\n Agent.prototype[fn] = function(...args) {\n this._defaults.push({ fn, args });\n return this;\n };\n});\n\nAgent.prototype._setDefaults = function(req) {\n this._defaults.forEach(def => {\n req[def.fn](...def.args);\n });\n};\n\nmodule.exports = Agent;\n","/**\n * Root reference for iframes.\n */\n\nlet root;\nif (typeof window !== 'undefined') {\n // Browser window\n root = window;\n} else if (typeof self === 'undefined') {\n // Other environments\n console.warn(\n 'Using browser-only version of superagent in non-browser environment'\n );\n root = this;\n} else {\n // Web Worker\n root = self;\n}\n\nconst Emitter = require('component-emitter');\nconst safeStringify = require('fast-safe-stringify');\nconst RequestBase = require('./request-base');\nconst isObject = require('./is-object');\nconst ResponseBase = require('./response-base');\nconst Agent = require('./agent-base');\n\n/**\n * Noop.\n */\n\nfunction noop() {}\n\n/**\n * Expose `request`.\n */\n\nmodule.exports = function(method, url) {\n // callback\n if (typeof url === 'function') {\n return new exports.Request('GET', method).end(url);\n }\n\n // url first\n if (arguments.length === 1) {\n return new exports.Request('GET', method);\n }\n\n return new exports.Request(method, url);\n};\n\nexports = module.exports;\n\nconst request = exports;\n\nexports.Request = Request;\n\n/**\n * Determine XHR.\n */\n\nrequest.getXHR = () => {\n if (\n root.XMLHttpRequest &&\n (!root.location ||\n root.location.protocol !== 'file:' ||\n !root.ActiveXObject)\n ) {\n return new XMLHttpRequest();\n }\n\n try {\n return new ActiveXObject('Microsoft.XMLHTTP');\n } catch {}\n\n try {\n return new ActiveXObject('Msxml2.XMLHTTP.6.0');\n } catch {}\n\n try {\n return new ActiveXObject('Msxml2.XMLHTTP.3.0');\n } catch {}\n\n try {\n return new ActiveXObject('Msxml2.XMLHTTP');\n } catch {}\n\n throw new Error('Browser-only version 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\nconst trim = ''.trim ? s => s.trim() : s => 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 const pairs = [];\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key))\n pushEncodedKeyValuePair(pairs, key, obj[key]);\n }\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 === undefined) return;\n if (val === null) {\n pairs.push(encodeURIComponent(key));\n return;\n }\n\n if (Array.isArray(val)) {\n val.forEach(v => {\n pushEncodedKeyValuePair(pairs, key, v);\n });\n } else if (isObject(val)) {\n for (const subkey in val) {\n if (Object.prototype.hasOwnProperty.call(val, subkey))\n pushEncodedKeyValuePair(pairs, `${key}[${subkey}]`, val[subkey]);\n }\n } else {\n pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(val));\n }\n}\n\n/**\n * Expose serialization method.\n */\n\nrequest.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 const obj = {};\n const pairs = str.split('&');\n let pair;\n let pos;\n\n for (let 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))] = decodeURIComponent(\n pair.slice(pos + 1)\n );\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: 'text/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\nrequest.serialize = {\n 'application/x-www-form-urlencoded': serialize,\n 'application/json': safeStringify\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 const lines = str.split(/\\r?\\n/);\n const fields = {};\n let index;\n let line;\n let field;\n let val;\n\n for (let i = 0, len = lines.length; i < len; ++i) {\n line = lines[i];\n index = line.indexOf(':');\n if (index === -1) {\n // could be empty line, just skip it\n continue;\n }\n\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 // should match /json or +json\n // but not /json-seq\n return /[/+]json($|[^-\\w])/.test(mime);\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) {\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 =\n (this.req.method !== 'HEAD' &&\n (this.xhr.responseType === '' || this.xhr.responseType === 'text')) ||\n typeof this.xhr.responseType === 'undefined'\n ? this.xhr.responseText\n : null;\n this.statusText = this.req.xhr.statusText;\n let { status } = this.xhr;\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 this._setStatusProperties(status);\n this.headers = parseHeader(this.xhr.getAllResponseHeaders());\n this.header = this.headers;\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\n if (this.text === null && req._responseType) {\n this.body = this.xhr.response;\n } else {\n this.body =\n this.req.method === 'HEAD'\n ? null\n : this._parseBody(this.text ? this.text : this.xhr.response);\n }\n}\n\n// eslint-disable-next-line new-cap\nResponseBase(Response.prototype);\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 let parse = request.parse[this.type];\n if (this.req._parser) {\n return this.req._parser(this, str);\n }\n\n if (!parse && isJSON(this.type)) {\n parse = request.parse['application/json'];\n }\n\n return parse && str && (str.length > 0 || str instanceof Object)\n ? parse(str)\n : null;\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 const { req } = this;\n const { method } = req;\n const { url } = req;\n\n const msg = `cannot ${method} ${url} (${this.status})`;\n const 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 const 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', () => {\n let err = null;\n let res = null;\n\n try {\n res = new Response(self);\n } catch (err_) {\n err = new Error('Parser is unable to parse the response');\n err.parse = true;\n err.original = err_;\n // issue #675: return the raw response if the response parsing fails\n if (self.xhr) {\n // ie9 doesn't have 'response' property\n err.rawResponse =\n typeof self.xhr.responseType === 'undefined'\n ? self.xhr.responseText\n : self.xhr.response;\n // issue #876: return the http status code if the response parsing fails\n err.status = self.xhr.status ? self.xhr.status : null;\n err.statusCode = err.status; // backwards-compat only\n } else {\n err.rawResponse = null;\n err.status = null;\n }\n\n return self.callback(err);\n }\n\n self.emit('response', res);\n\n let new_err;\n try {\n if (!self._isResponseOK(res)) {\n new_err = new Error(res.statusText || 'Unsuccessful HTTP response');\n }\n } catch (err_) {\n new_err = err_; // ok() callback can throw\n }\n\n // #1000 don't catch errors from the callback to avoid double calling it\n if (new_err) {\n new_err.original = err;\n new_err.response = res;\n new_err.status = res.status;\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\n// eslint-disable-next-line new-cap\nEmitter(Request.prototype);\n// eslint-disable-next-line new-cap\nRequestBase(Request.prototype);\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 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] optional in case of using 'bearer' as type\n * @param {Object} options with 'type' property 'auto', 'basic' or 'bearer' (default 'basic')\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.auth = function(user, pass, options) {\n if (arguments.length === 1) pass = '';\n if (typeof pass === 'object' && pass !== null) {\n // pass is optional and can be replaced with options\n options = pass;\n pass = '';\n }\n\n if (!options) {\n options = {\n type: typeof btoa === 'function' ? 'basic' : 'auto'\n };\n }\n\n const encoder = string => {\n if (typeof btoa === 'function') {\n return btoa(string);\n }\n\n throw new Error('Cannot use basic auth, btoa is not a function');\n };\n\n return this._auth(user, pass, options, encoder);\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 (typeof val !== 'string') 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 `options` (or 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|Object} options\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.attach = function(field, file, options) {\n if (file) {\n if (this._data) {\n throw new Error(\"superagent can't mix .send() and .attach()\");\n }\n\n this._getFormData().append(field, file, options || file.name);\n }\n\n return this;\n};\n\nRequest.prototype._getFormData = function() {\n if (!this._formData) {\n this._formData = new root.FormData();\n }\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 if (this._shouldRetry(err, res)) {\n return this._retry();\n }\n\n const fn = this._callback;\n this.clearTimeout();\n\n if (err) {\n if (this._maxRetries) err.retries = this._retries - 1;\n this.emit('error', err);\n }\n\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 const err = new Error(\n '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 );\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// This only warns, because the request is still likely to work\nRequest.prototype.agent = function() {\n console.warn('This is not supported in browser version of superagent');\n return this;\n};\n\nRequest.prototype.buffer = Request.prototype.ca;\nRequest.prototype.ca = Request.prototype.agent;\n\n// This throws, because it can't send/receive data as expected\nRequest.prototype.write = () => {\n throw new Error(\n 'Streaming is not supported in browser version of superagent'\n );\n};\n\nRequest.prototype.pipe = Request.prototype.write;\n\n/**\n * Check if `obj` is a host object,\n * we don't want to serialize these :)\n *\n * @param {Object} obj host object\n * @return {Boolean} is a host object\n * @api private\n */\nRequest.prototype._isHost = function(obj) {\n // Native objects stringify to [object File], [object Blob], [object FormData], etc.\n return (\n obj &&\n typeof obj === 'object' &&\n !Array.isArray(obj) &&\n Object.prototype.toString.call(obj) !== '[object Object]'\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 if (this._endCalled) {\n console.warn(\n 'Warning: .end() was called twice. This is not supported in superagent'\n );\n }\n\n this._endCalled = true;\n\n // store callback\n this._callback = fn || noop;\n\n // querystring\n this._finalizeQueryString();\n\n this._end();\n};\n\nRequest.prototype._setUploadTimeout = function() {\n const self = this;\n\n // upload timeout it's wokrs only if deadline timeout is off\n if (this._uploadTimeout && !this._uploadTimeoutTimer) {\n this._uploadTimeoutTimer = setTimeout(() => {\n self._timeoutError(\n 'Upload timeout of ',\n self._uploadTimeout,\n 'ETIMEDOUT'\n );\n }, this._uploadTimeout);\n }\n};\n\n// eslint-disable-next-line complexity\nRequest.prototype._end = function() {\n if (this._aborted)\n return this.callback(\n new Error('The request has been aborted even before .end() was called')\n );\n\n const self = this;\n this.xhr = request.getXHR();\n const { xhr } = this;\n let data = this._formData || this._data;\n\n this._setTimeouts();\n\n // state change\n xhr.onreadystatechange = () => {\n const { readyState } = xhr;\n if (readyState >= 2 && self._responseTimeoutTimer) {\n clearTimeout(self._responseTimeoutTimer);\n }\n\n if (readyState !== 4) {\n return;\n }\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 let status;\n try {\n status = xhr.status;\n } catch {\n status = 0;\n }\n\n if (!status) {\n if (self.timedout || self._aborted) return;\n return self.crossDomainError();\n }\n\n self.emit('end');\n };\n\n // progress\n const handleProgress = (direction, e) => {\n if (e.total > 0) {\n e.percent = (e.loaded / e.total) * 100;\n\n if (e.percent === 100) {\n clearTimeout(self._uploadTimeoutTimer);\n }\n }\n\n e.direction = direction;\n self.emit('progress', e);\n };\n\n if (this.hasListeners('progress')) {\n try {\n xhr.addEventListener('progress', handleProgress.bind(null, 'download'));\n if (xhr.upload) {\n xhr.upload.addEventListener(\n 'progress',\n handleProgress.bind(null, 'upload')\n );\n }\n } catch {\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\n if (xhr.upload) {\n this._setUploadTimeout();\n }\n\n // initiate request\n try {\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 } catch (err) {\n // see #1149\n return this.callback(err);\n }\n\n // CORS\n if (this._withCredentials) xhr.withCredentials = true;\n\n // body\n if (\n !this._formData &&\n this.method !== 'GET' &&\n this.method !== 'HEAD' &&\n typeof data !== 'string' &&\n !this._isHost(data)\n ) {\n // serialize stuff\n const contentType = this._header['content-type'];\n let serialize =\n this._serializer ||\n request.serialize[contentType ? contentType.split(';')[0] : ''];\n if (!serialize && isJSON(contentType)) {\n serialize = request.serialize['application/json'];\n }\n\n if (serialize) data = serialize(data);\n }\n\n // set header fields\n for (const field in this.header) {\n if (this.header[field] === null) continue;\n\n if (Object.prototype.hasOwnProperty.call(this.header, field))\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' ? null : data);\n};\n\nrequest.agent = () => new Agent();\n\n['GET', 'POST', 'OPTIONS', 'PATCH', 'PUT', 'DELETE'].forEach(method => {\n Agent.prototype[method.toLowerCase()] = function(url, fn) {\n const req = new request.Request(method, url);\n this._setDefaults(req);\n if (fn) {\n req.end(fn);\n }\n\n return req;\n };\n});\n\nAgent.prototype.del = Agent.prototype.delete;\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 = (url, data, fn) => {\n const req = request('GET', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\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 = (url, data, fn) => {\n const req = request('HEAD', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\n if (data) req.query(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 = (url, data, fn) => {\n const req = request('OPTIONS', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * DELETE `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\nfunction del(url, data, fn) {\n const req = request('DELETE', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\n if (data) req.send(data);\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 = (url, data, fn) => {\n const req = request('PATCH', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\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 = (url, data, fn) => {\n const req = request('POST', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\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 = (url, data, fn) => {\n const req = request('PUT', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\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 obj !== null && typeof obj === 'object';\n}\n\nmodule.exports = isObject;\n","/**\n * Module of mixed-in functions shared between node and client code\n */\nconst isObject = require('./is-object');\n\n/**\n * Expose `RequestBase`.\n */\n\nmodule.exports = RequestBase;\n\n/**\n * Initialize a new `RequestBase`.\n *\n * @api public\n */\n\nfunction RequestBase(obj) {\n if (obj) return mixin(obj);\n}\n\n/**\n * Mixin the prototype properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (const key in RequestBase.prototype) {\n if (Object.prototype.hasOwnProperty.call(RequestBase.prototype, key))\n obj[key] = RequestBase.prototype[key];\n }\n\n return obj;\n}\n\n/**\n * Clear previous timeout.\n *\n * @return {Request} for chaining\n * @api public\n */\n\nRequestBase.prototype.clearTimeout = function() {\n clearTimeout(this._timer);\n clearTimeout(this._responseTimeoutTimer);\n clearTimeout(this._uploadTimeoutTimer);\n delete this._timer;\n delete this._responseTimeoutTimer;\n delete this._uploadTimeoutTimer;\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\nRequestBase.prototype.parse = function(fn) {\n this._parser = fn;\n return this;\n};\n\n/**\n * Set format of binary response body.\n * In browser valid formats are 'blob' and 'arraybuffer',\n * which return Blob and ArrayBuffer, respectively.\n *\n * In Node all values result in Buffer.\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\nRequestBase.prototype.responseType = function(val) {\n this._responseType = val;\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\nRequestBase.prototype.serialize = function(fn) {\n this._serializer = fn;\n return this;\n};\n\n/**\n * Set timeouts.\n *\n * - response timeout is time between sending request and receiving the first byte of the response. Includes DNS and connection time.\n * - deadline is the time from start of the request to receiving response body in full. If the deadline is too short large files may not load at all on slow connections.\n * - upload is the time since last bit of data was sent or received. This timeout works only if deadline timeout is off\n *\n * Value of 0 or false means no timeout.\n *\n * @param {Number|Object} ms or {response, deadline}\n * @return {Request} for chaining\n * @api public\n */\n\nRequestBase.prototype.timeout = function(options) {\n if (!options || typeof options !== 'object') {\n this._timeout = options;\n this._responseTimeout = 0;\n this._uploadTimeout = 0;\n return this;\n }\n\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option)) {\n switch (option) {\n case 'deadline':\n this._timeout = options.deadline;\n break;\n case 'response':\n this._responseTimeout = options.response;\n break;\n case 'upload':\n this._uploadTimeout = options.upload;\n break;\n default:\n console.warn('Unknown timeout option', option);\n }\n }\n }\n\n return this;\n};\n\n/**\n * Set number of retry attempts on error.\n *\n * Failed requests will be retried 'count' times if timeout or err.code >= 500.\n *\n * @param {Number} count\n * @param {Function} [fn]\n * @return {Request} for chaining\n * @api public\n */\n\nRequestBase.prototype.retry = function(count, fn) {\n // Default to 1 if no count passed or true\n if (arguments.length === 0 || count === true) count = 1;\n if (count <= 0) count = 0;\n this._maxRetries = count;\n this._retries = 0;\n this._retryCallback = fn;\n return this;\n};\n\nconst ERROR_CODES = ['ECONNRESET', 'ETIMEDOUT', 'EADDRINFO', 'ESOCKETTIMEDOUT'];\n\n/**\n * Determine if a request should be retried.\n * (Borrowed from segmentio/superagent-retry)\n *\n * @param {Error} err an error\n * @param {Response} [res] response\n * @returns {Boolean} if segment should be retried\n */\nRequestBase.prototype._shouldRetry = function(err, res) {\n if (!this._maxRetries || this._retries++ >= this._maxRetries) {\n return false;\n }\n\n if (this._retryCallback) {\n try {\n const override = this._retryCallback(err, res);\n if (override === true) return true;\n if (override === false) return false;\n // undefined falls back to defaults\n } catch (err_) {\n console.error(err_);\n }\n }\n\n if (res && res.status && res.status >= 500 && res.status !== 501) return true;\n if (err) {\n if (err.code && ERROR_CODES.includes(err.code)) return true;\n // Superagent timeout\n if (err.timeout && err.code === 'ECONNABORTED') return true;\n if (err.crossDomain) return true;\n }\n\n return false;\n};\n\n/**\n * Retry request\n *\n * @return {Request} for chaining\n * @api private\n */\n\nRequestBase.prototype._retry = function() {\n this.clearTimeout();\n\n // node\n if (this.req) {\n this.req = null;\n this.req = this.request();\n }\n\n this._aborted = false;\n this.timedout = false;\n\n return this._end();\n};\n\n/**\n * Promise support\n *\n * @param {Function} resolve\n * @param {Function} [reject]\n * @return {Request}\n */\n\nRequestBase.prototype.then = function(resolve, reject) {\n if (!this._fullfilledPromise) {\n const self = this;\n if (this._endCalled) {\n console.warn(\n 'Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises'\n );\n }\n\n this._fullfilledPromise = new Promise((resolve, reject) => {\n self.on('abort', () => {\n const err = new Error('Aborted');\n err.code = 'ABORTED';\n err.status = this.status;\n err.method = this.method;\n err.url = this.url;\n reject(err);\n });\n self.end((err, res) => {\n if (err) reject(err);\n else resolve(res);\n });\n });\n }\n\n return this._fullfilledPromise.then(resolve, reject);\n};\n\nRequestBase.prototype.catch = function(cb) {\n return this.then(undefined, cb);\n};\n\n/**\n * Allow for extension\n */\n\nRequestBase.prototype.use = function(fn) {\n fn(this);\n return this;\n};\n\nRequestBase.prototype.ok = function(cb) {\n if (typeof cb !== 'function') throw new Error('Callback required');\n this._okCallback = cb;\n return this;\n};\n\nRequestBase.prototype._isResponseOK = function(res) {\n if (!res) {\n return false;\n }\n\n if (this._okCallback) {\n return this._okCallback(res);\n }\n\n return res.status >= 200 && res.status < 300;\n};\n\n/**\n * Get request header `field`.\n * Case-insensitive.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nRequestBase.prototype.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\nRequestBase.prototype.getHeader = RequestBase.prototype.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\nRequestBase.prototype.set = function(field, val) {\n if (isObject(field)) {\n for (const key in field) {\n if (Object.prototype.hasOwnProperty.call(field, key))\n this.set(key, field[key]);\n }\n\n return this;\n }\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 field name\n */\nRequestBase.prototype.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`, or multiple fields with one object\n * for \"multipart/form-data\" request bodies.\n *\n * ``` js\n * request.post('/upload')\n * .field('foo', 'bar')\n * .end(callback);\n *\n * request.post('/upload')\n * .field({ foo: 'bar', baz: 'qux' })\n * .end(callback);\n * ```\n *\n * @param {String|Object} name name of field\n * @param {String|Blob|File|Buffer|fs.ReadStream} val value of field\n * @return {Request} for chaining\n * @api public\n */\nRequestBase.prototype.field = function(name, val) {\n // name should be either a string or an object.\n if (name === null || undefined === name) {\n throw new Error('.field(name, val) name can not be empty');\n }\n\n if (this._data) {\n throw new Error(\n \".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()\"\n );\n }\n\n if (isObject(name)) {\n for (const key in name) {\n if (Object.prototype.hasOwnProperty.call(name, key))\n this.field(key, name[key]);\n }\n\n return this;\n }\n\n if (Array.isArray(val)) {\n for (const i in val) {\n if (Object.prototype.hasOwnProperty.call(val, i))\n this.field(name, val[i]);\n }\n\n return this;\n }\n\n // val should be defined now\n if (val === null || undefined === val) {\n throw new Error('.field(name, val) val can not be empty');\n }\n\n if (typeof val === 'boolean') {\n val = String(val);\n }\n\n this._getFormData().append(name, val);\n return this;\n};\n\n/**\n * Abort the request, and clear potential timeout.\n *\n * @return {Request} request\n * @api public\n */\nRequestBase.prototype.abort = function() {\n if (this._aborted) {\n return this;\n }\n\n this._aborted = true;\n if (this.xhr) this.xhr.abort(); // browser\n if (this.req) this.req.abort(); // node\n this.clearTimeout();\n this.emit('abort');\n return this;\n};\n\nRequestBase.prototype._auth = function(user, pass, options, base64Encoder) {\n switch (options.type) {\n case 'basic':\n this.set('Authorization', `Basic ${base64Encoder(`${user}:${pass}`)}`);\n break;\n\n case 'auto':\n this.username = user;\n this.password = pass;\n break;\n\n case 'bearer': // usage would be .auth(accessToken, { type: 'bearer' })\n this.set('Authorization', `Bearer ${user}`);\n break;\n default:\n break;\n }\n\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\nRequestBase.prototype.withCredentials = function(on) {\n // This is browser-only functionality. Node side is no-op.\n if (on === undefined) on = true;\n this._withCredentials = on;\n return this;\n};\n\n/**\n * Set the max redirects to `n`. Does nothing in browser XHR implementation.\n *\n * @param {Number} n\n * @return {Request} for chaining\n * @api public\n */\n\nRequestBase.prototype.redirects = function(n) {\n this._maxRedirects = n;\n return this;\n};\n\n/**\n * Maximum size of buffered response body, in bytes. Counts uncompressed size.\n * Default 200MB.\n *\n * @param {Number} n number of bytes\n * @return {Request} for chaining\n */\nRequestBase.prototype.maxResponseSize = function(n) {\n if (typeof n !== 'number') {\n throw new TypeError('Invalid argument');\n }\n\n this._maxResponseSize = 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\nRequestBase.prototype.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 * 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\n// eslint-disable-next-line complexity\nRequestBase.prototype.send = function(data) {\n const isObj = isObject(data);\n let type = this._header['content-type'];\n\n if (this._formData) {\n throw new Error(\n \".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()\"\n );\n }\n\n if (isObj && !this._data) {\n if (Array.isArray(data)) {\n this._data = [];\n } else if (!this._isHost(data)) {\n this._data = {};\n }\n } else if (data && this._data && this._isHost(this._data)) {\n throw new Error(\"Can't merge these send calls\");\n }\n\n // merge\n if (isObj && isObject(this._data)) {\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key))\n this._data[key] = data[key];\n }\n } else if (typeof data === 'string') {\n // default to x-www-form-urlencoded\n if (!type) this.type('form');\n type = this._header['content-type'];\n if (type === 'application/x-www-form-urlencoded') {\n this._data = this._data ? `${this._data}&${data}` : data;\n } else {\n this._data = (this._data || '') + data;\n }\n } else {\n this._data = data;\n }\n\n if (!isObj || this._isHost(data)) {\n return this;\n }\n\n // default to json\n if (!type) this.type('json');\n return this;\n};\n\n/**\n * Sort `querystring` by the sort function\n *\n *\n * Examples:\n *\n * // default order\n * request.get('/user')\n * .query('name=Nick')\n * .query('search=Manny')\n * .sortQuery()\n * .end(callback)\n *\n * // customized sort function\n * request.get('/user')\n * .query('name=Nick')\n * .query('search=Manny')\n * .sortQuery(function(a, b){\n * return a.length - b.length;\n * })\n * .end(callback)\n *\n *\n * @param {Function} sort\n * @return {Request} for chaining\n * @api public\n */\n\nRequestBase.prototype.sortQuery = function(sort) {\n // _sort default to true but otherwise can be a function or boolean\n this._sort = typeof sort === 'undefined' ? true : sort;\n return this;\n};\n\n/**\n * Compose querystring to append to req.url\n *\n * @api private\n */\nRequestBase.prototype._finalizeQueryString = function() {\n const query = this._query.join('&');\n if (query) {\n this.url += (this.url.includes('?') ? '&' : '?') + query;\n }\n\n this._query.length = 0; // Makes the call idempotent\n\n if (this._sort) {\n const index = this.url.indexOf('?');\n if (index >= 0) {\n const queryArr = this.url.slice(index + 1).split('&');\n if (typeof this._sort === 'function') {\n queryArr.sort(this._sort);\n } else {\n queryArr.sort();\n }\n\n this.url = this.url.slice(0, index) + '?' + queryArr.join('&');\n }\n }\n};\n\n// For backwards compat only\nRequestBase.prototype._appendQueryString = () => {\n console.warn('Unsupported');\n};\n\n/**\n * Invoke callback with timeout error.\n *\n * @api private\n */\n\nRequestBase.prototype._timeoutError = function(reason, timeout, errno) {\n if (this._aborted) {\n return;\n }\n\n const err = new Error(`${reason + timeout}ms exceeded`);\n err.timeout = timeout;\n err.code = 'ECONNABORTED';\n err.errno = errno;\n this.timedout = true;\n this.abort();\n this.callback(err);\n};\n\nRequestBase.prototype._setTimeouts = function() {\n const self = this;\n\n // deadline\n if (this._timeout && !this._timer) {\n this._timer = setTimeout(() => {\n self._timeoutError('Timeout of ', self._timeout, 'ETIME');\n }, this._timeout);\n }\n\n // response timeout\n if (this._responseTimeout && !this._responseTimeoutTimer) {\n this._responseTimeoutTimer = setTimeout(() => {\n self._timeoutError(\n 'Response timeout of ',\n self._responseTimeout,\n 'ETIMEDOUT'\n );\n }, this._responseTimeout);\n }\n};\n","/**\n * Module dependencies.\n */\n\nconst utils = require('./utils');\n\n/**\n * Expose `ResponseBase`.\n */\n\nmodule.exports = ResponseBase;\n\n/**\n * Initialize a new `ResponseBase`.\n *\n * @api public\n */\n\nfunction ResponseBase(obj) {\n if (obj) return mixin(obj);\n}\n\n/**\n * Mixin the prototype properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (const key in ResponseBase.prototype) {\n if (Object.prototype.hasOwnProperty.call(ResponseBase.prototype, key))\n obj[key] = ResponseBase.prototype[key];\n }\n\n return obj;\n}\n\n/**\n * Get case-insensitive `field` value.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nResponseBase.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\nResponseBase.prototype._setHeaderProperties = function(header) {\n // TODO: moar!\n // TODO: make this a util\n\n // content-type\n const ct = header['content-type'] || '';\n this.type = utils.type(ct);\n\n // params\n const params = utils.params(ct);\n for (const key in params) {\n if (Object.prototype.hasOwnProperty.call(params, key))\n this[key] = params[key];\n }\n\n this.links = {};\n\n // links\n try {\n if (header.link) {\n this.links = utils.parseLinks(header.link);\n }\n } catch {\n // ignore\n }\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\nResponseBase.prototype._setStatusProperties = function(status) {\n const type = (status / 100) | 0;\n\n // status / class\n this.statusCode = status;\n this.status = this.statusCode;\n this.statusType = type;\n\n // basics\n this.info = type === 1;\n this.ok = type === 2;\n this.redirect = type === 3;\n this.clientError = type === 4;\n this.serverError = type === 5;\n this.error = type === 4 || type === 5 ? this.toError() : false;\n\n // sugar\n this.created = status === 201;\n this.accepted = status === 202;\n this.noContent = status === 204;\n this.badRequest = status === 400;\n this.unauthorized = status === 401;\n this.notAcceptable = status === 406;\n this.forbidden = status === 403;\n this.notFound = status === 404;\n this.unprocessableEntity = status === 422;\n};\n","/**\n * Return the mime type for the given `str`.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nexports.type = str => str.split(/ *; */).shift();\n\n/**\n * Return header field parameters.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nexports.params = str =>\n str.split(/ *; */).reduce((obj, str) => {\n const parts = str.split(/ *= */);\n const key = parts.shift();\n const val = parts.shift();\n\n if (key && val) obj[key] = val;\n return obj;\n }, {});\n\n/**\n * Parse Link header fields.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nexports.parseLinks = str =>\n str.split(/ *, */).reduce((obj, str) => {\n const parts = str.split(/ *; */);\n const url = parts[0].slice(1, -1);\n const rel = parts[1].split(/ *= */)[1].slice(1, -1);\n obj[rel] = url;\n return obj;\n }, {});\n\n/**\n * Strip content related fields from `header`.\n *\n * @param {Object} header\n * @return {Object} header\n * @api private\n */\n\nexports.cleanHeader = (header, changesOrigin) => {\n delete header['content-type'];\n delete header['content-length'];\n delete header['transfer-encoding'];\n delete header.host;\n // secuirty\n if (changesOrigin) {\n delete header.authorization;\n delete header.cookie;\n }\n\n return header;\n};\n","\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\r\n // Remove event specific arrays for event types that no\r\n // one is subscribed for to avoid memory leak.\r\n if (callbacks.length === 0) {\r\n delete this._callbacks['$' + event];\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\r\n var args = new Array(arguments.length - 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n for (var i = 1; i < arguments.length; i++) {\r\n args[i - 1] = arguments[i];\r\n }\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","// 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","'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/**\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"]} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","lib/Agent.js","lib/Client.js","lib/Defaults.js","lib/EventStream.js","lib/Library.js","lib/Particle.js","lib/superagent-binary-parser.js","node_modules/babel-runtime/core-js/get-iterator.js","node_modules/babel-runtime/core-js/is-iterable.js","node_modules/babel-runtime/core-js/object/assign.js","node_modules/babel-runtime/core-js/object/create.js","node_modules/babel-runtime/core-js/object/define-property.js","node_modules/babel-runtime/core-js/object/entries.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/set-prototype-of.js","node_modules/babel-runtime/core-js/promise.js","node_modules/babel-runtime/core-js/symbol.js","node_modules/babel-runtime/core-js/symbol/iterator.js","node_modules/babel-runtime/helpers/classCallCheck.js","node_modules/babel-runtime/helpers/createClass.js","node_modules/babel-runtime/helpers/inherits.js","node_modules/babel-runtime/helpers/possibleConstructorReturn.js","node_modules/babel-runtime/helpers/slicedToArray.js","node_modules/babel-runtime/helpers/typeof.js","node_modules/base64-js/index.js","node_modules/buffer/index.js","node_modules/builtin-status-codes/browser.js","node_modules/core-js/library/fn/get-iterator.js","node_modules/core-js/library/fn/is-iterable.js","node_modules/core-js/library/fn/object/assign.js","node_modules/core-js/library/fn/object/create.js","node_modules/core-js/library/fn/object/define-property.js","node_modules/core-js/library/fn/object/entries.js","node_modules/core-js/library/fn/object/get-prototype-of.js","node_modules/core-js/library/fn/object/keys.js","node_modules/core-js/library/fn/object/set-prototype-of.js","node_modules/core-js/library/fn/promise.js","node_modules/core-js/library/fn/symbol/index.js","node_modules/core-js/library/fn/symbol/iterator.js","node_modules/core-js/library/modules/_a-function.js","node_modules/core-js/library/modules/_add-to-unscopables.js","node_modules/core-js/library/modules/_an-instance.js","node_modules/core-js/library/modules/_an-object.js","node_modules/core-js/library/modules/_array-includes.js","node_modules/core-js/library/modules/_classof.js","node_modules/core-js/library/modules/_cof.js","node_modules/core-js/library/modules/_core.js","node_modules/core-js/library/modules/_ctx.js","node_modules/core-js/library/modules/_defined.js","node_modules/core-js/library/modules/_descriptors.js","node_modules/core-js/library/modules/_dom-create.js","node_modules/core-js/library/modules/_enum-bug-keys.js","node_modules/core-js/library/modules/_enum-keys.js","node_modules/core-js/library/modules/_export.js","node_modules/core-js/library/modules/_fails.js","node_modules/core-js/library/modules/_for-of.js","node_modules/core-js/library/modules/_global.js","node_modules/core-js/library/modules/_has.js","node_modules/core-js/library/modules/_hide.js","node_modules/core-js/library/modules/_html.js","node_modules/core-js/library/modules/_ie8-dom-define.js","node_modules/core-js/library/modules/_invoke.js","node_modules/core-js/library/modules/_iobject.js","node_modules/core-js/library/modules/_is-array-iter.js","node_modules/core-js/library/modules/_is-array.js","node_modules/core-js/library/modules/_is-object.js","node_modules/core-js/library/modules/_iter-call.js","node_modules/core-js/library/modules/_iter-create.js","node_modules/core-js/library/modules/_iter-define.js","node_modules/core-js/library/modules/_iter-detect.js","node_modules/core-js/library/modules/_iter-step.js","node_modules/core-js/library/modules/_iterators.js","node_modules/core-js/library/modules/_library.js","node_modules/core-js/library/modules/_meta.js","node_modules/core-js/library/modules/_microtask.js","node_modules/core-js/library/modules/_new-promise-capability.js","node_modules/core-js/library/modules/_object-assign.js","node_modules/core-js/library/modules/_object-create.js","node_modules/core-js/library/modules/_object-dp.js","node_modules/core-js/library/modules/_object-dps.js","node_modules/core-js/library/modules/_object-gopd.js","node_modules/core-js/library/modules/_object-gopn-ext.js","node_modules/core-js/library/modules/_object-gopn.js","node_modules/core-js/library/modules/_object-gops.js","node_modules/core-js/library/modules/_object-gpo.js","node_modules/core-js/library/modules/_object-keys-internal.js","node_modules/core-js/library/modules/_object-keys.js","node_modules/core-js/library/modules/_object-pie.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/_perform.js","node_modules/core-js/library/modules/_promise-resolve.js","node_modules/core-js/library/modules/_property-desc.js","node_modules/core-js/library/modules/_redefine-all.js","node_modules/core-js/library/modules/_redefine.js","node_modules/core-js/library/modules/_set-proto.js","node_modules/core-js/library/modules/_set-species.js","node_modules/core-js/library/modules/_set-to-string-tag.js","node_modules/core-js/library/modules/_shared-key.js","node_modules/core-js/library/modules/_shared.js","node_modules/core-js/library/modules/_species-constructor.js","node_modules/core-js/library/modules/_string-at.js","node_modules/core-js/library/modules/_task.js","node_modules/core-js/library/modules/_to-absolute-index.js","node_modules/core-js/library/modules/_to-integer.js","node_modules/core-js/library/modules/_to-iobject.js","node_modules/core-js/library/modules/_to-length.js","node_modules/core-js/library/modules/_to-object.js","node_modules/core-js/library/modules/_to-primitive.js","node_modules/core-js/library/modules/_uid.js","node_modules/core-js/library/modules/_wks-define.js","node_modules/core-js/library/modules/_wks-ext.js","node_modules/core-js/library/modules/_wks.js","node_modules/core-js/library/modules/core.get-iterator-method.js","node_modules/core-js/library/modules/core.get-iterator.js","node_modules/core-js/library/modules/core.is-iterable.js","node_modules/core-js/library/modules/es6.array.iterator.js","node_modules/core-js/library/modules/es6.object.assign.js","node_modules/core-js/library/modules/es6.object.create.js","node_modules/core-js/library/modules/es6.object.define-property.js","node_modules/core-js/library/modules/es6.object.get-prototype-of.js","node_modules/core-js/library/modules/es6.object.keys.js","node_modules/core-js/library/modules/es6.object.set-prototype-of.js","node_modules/core-js/library/modules/es6.promise.js","node_modules/core-js/library/modules/es6.string.iterator.js","node_modules/core-js/library/modules/es6.symbol.js","node_modules/core-js/library/modules/es7.object.entries.js","node_modules/core-js/library/modules/es7.promise.finally.js","node_modules/core-js/library/modules/es7.promise.try.js","node_modules/core-js/library/modules/es7.symbol.async-iterator.js","node_modules/core-js/library/modules/es7.symbol.observable.js","node_modules/core-js/library/modules/web.dom.iterable.js","node_modules/events/events.js","node_modules/fast-safe-stringify/index.js","node_modules/ieee754/index.js","node_modules/isarray/index.js","node_modules/process/browser.js","node_modules/punycode/punycode.js","node_modules/querystring-es3/decode.js","node_modules/querystring-es3/encode.js","node_modules/querystring-es3/index.js","node_modules/stream-http/index.js","node_modules/stream-http/lib/capability.js","node_modules/stream-http/lib/request.js","node_modules/stream-http/lib/response.js","node_modules/stream-http/node_modules/inherits/inherits_browser.js","node_modules/stream-http/node_modules/readable-stream/errors-browser.js","node_modules/stream-http/node_modules/readable-stream/lib/_stream_duplex.js","node_modules/stream-http/node_modules/readable-stream/lib/_stream_passthrough.js","node_modules/stream-http/node_modules/readable-stream/lib/_stream_readable.js","node_modules/stream-http/node_modules/readable-stream/lib/_stream_transform.js","node_modules/stream-http/node_modules/readable-stream/lib/_stream_writable.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/async_iterator.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/buffer_list.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/destroy.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/from-browser.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/pipeline.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/state.js","node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/stream-browser.js","node_modules/stream-http/node_modules/readable-stream/readable-browser.js","node_modules/stream-http/node_modules/safe-buffer/index.js","node_modules/stream-http/node_modules/string_decoder/lib/string_decoder.js","node_modules/stream-http/node_modules/xtend/immutable.js","node_modules/superagent-prefix/index.js","node_modules/superagent/lib/agent-base.js","node_modules/superagent/lib/client.js","node_modules/superagent/lib/is-object.js","node_modules/superagent/lib/request-base.js","node_modules/superagent/lib/response-base.js","node_modules/superagent/lib/utils.js","node_modules/superagent/node_modules/component-emitter/index.js","node_modules/url/url.js","node_modules/url/util.js","node_modules/util-deprecate/browser.js"],"names":["_interopRequireDefault","obj","__esModule","default","Object","defineProperty","exports","value","_keys","require","_keys2","_slicedToArray2","_slicedToArray3","_entries","_entries2","_getIterator2","_getIterator3","_assign","_assign2","_promise","_promise2","_classCallCheck2","_classCallCheck3","_createClass2","_createClass3","_superagent","_superagent2","_superagentPrefix","_superagentPrefix2","Agent","baseUrl","this","setBaseUrl","key","prefix","_ref","uri","auth","headers","query","context","request","method","_ref2","_ref3","data","_ref4","_ref5","_ref6","_ref6$headers","undefined","_ref6$data","_ref6$query","_ref6$form","form","_ref6$files","files","_ref6$context","_ref6$raw","raw","requestFiles","_sanitizeFiles","_request","_ref7","req","_buildRequest","_promiseResponse","_this","fulfill","reject","_sendRequest","end","error","res","body","url","statusCode","status","errorDescription","shortErrorDescription","error_description","reason","Error","_ref8","_ref8$makerequest","makerequest","use","_authorizationHeader","_applyContext","set","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","next","done","_step$value","name","file","options","filepath","path","isForBrowser","attach","err","return","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","_iterator2","_step2$value","field","type","send","arguments","length","getXHR","tool","_addToolContext","project","_addProjectContext","_toolIdent","components","_iteratorNormalCompletion3","_didIteratorError3","_iteratorError3","_step3","_iterator3","component","_nameAtVersion","version","_buildSemicolonSeparatedProperties","primaryProperty","prop","hasOwnProperty","username","password","Authorization","forEach","k","i","module","_Particle","_Particle2","_Library","_Library2","Client","_ref$api","api","Boolean","listLibraries","then","payload","map","l","_this2","getLibrary","library","_this3","getLibraryVersions","archive","_this4","contributeLibrary","_throwError","_this5","publishLibrary","_this6","force","deleteLibrary","errors","errorMessages","e","message","join","downloadFile","platformId","targetVersion","compileCode","signal","deviceId","signalDevice","listDevices","listBuildTargets","onlyFeatured","targets","target","platforms","platform","push","prerelease","prereleases","indexOf","firmware_vendor","_ref4$full","full","trackingIdentity","clientSecret","clientId","tokenDuration","_getPrototypeOf","_getPrototypeOf2","_possibleConstructorReturn2","_possibleConstructorReturn3","_inherits2","_inherits3","_http","_http2","_https","_https2","_url","_url2","_events","EventStream","_EventEmitter","token","__proto__","call","reconnectInterval","timeout","buf","parse","bind","idleTimeoutExpired","resolve","_url$parse","hostname","protocol","port","origin","isSecure","requestor","parseInt","mode","connected","connectionTimeout","setTimeout","abort","on","clearTimeout","chunk","JSON","once","startIdleTimeout","removeAllListeners","event","param","emit","emitSafe","stopIdleTimeout","reconnect","isOffline","connect","catch","navigator","onLine","idleTimeout","pos","discardTrailingNewline","lineLength","fieldLength","c","parseEventStreamLine","slice","eventName","step","valueLength","EventEmitter","Library","client","_assignAttributes","downloadUrl","links","download","attributes","_superagentBinaryParser","_superagentBinaryParser2","_Defaults","_Defaults2","_EventStream","_EventStream2","_Agent","_Agent2","_Client","_Client2","Particle","setDefaultAuth","agent","_isValidContext","_ref$tokenDuration","grant_type","client_id","client_secret","expires_in","mfaToken","otp","mfa_token","get","_ref4$invalidateToken","invalidateTokens","invalidate_tokens","post","currentPassword","put","current_password","email","product","accountInfo","account_info","_ref9","_ref10","_ref11","delete","access_token","_ref12","_ref13","_ref14","_ref15","_ref16","_ref16$full","tracking","_ref17","deviceName","groups","sortAttr","sortDir","page","perPage","Array","isArray","per_page","_ref18","deviceUri","_ref19","requestTransfer","id","request_transfer","_ref20","_ref21","deny","_ref22","_ref23","updateDevice","_ref24","_ref25","notes","_ref26","_ref26$development","development","_ref27","desiredFirmwareVersion","flash","_ref28","_ref29","desired_firmware_version","_ref30","productId","product_id","_ref31","iccid","_ref32","promoCode","_ref33","_ref34","_ref35","build_target_version","latest","_ref36","console","warning","app","_ref37","platform_id","_ref38","binaryId","_provideFileData","_ref39","algorithm","deviceID","publicKey","toString","filename","order","Date","now","_ref40","argument","args","_ref41","org","toLowerCase","encodeURIComponent","_getActiveAuthToken","_ref42","isPrivate","postData","private","_ref43","device","rejectUnauthorized","noDefaults","hook","requestType","json","responseTemplate","responseTopic","responseEvent","errorResponseTopic","errorResponseEvent","_ref44","hookId","_ref45","_ref46","settings","deviceid","_ref47","integrationId","_ref48","_ref49","_ref50","_ref51","_ref52","_ref52$invalidateToke","_ref53","_ref53$invalidateToke","_ref54","_ref55","_ref56","_ref57","head","_ref58","iccids","country","sims","action","_ref59","_ref60","mbLimit","mb_limit","_ref61","_ref62","_ref63","featured","_ref64","limit","filter","sort","architectures","category","scope","excludeScopes","_asList","_ref65","_ref66","_ref67","archive.tar.gz","_ref68","visibility","_ref69","_ref70","_ref71","_ref72","redirect_uri","_ref73","_ref74","_ref75","_ref76","_ref77","_ref78","title","description","firmware.bin","_ref79","_ref80","_ref81","responseType","xhr","response","buffer","_ref82","_ref83","_ref84","_ref85","_ref86","serialNumber","_ref87","device_id","_ref88","networkId","_ref89","_ref90","_ref91","_ref92","updateMeshNetwork","_ref93","_ref94","role","_ref95","_ref96","_ref96$headers","accept","_ref97","_ref98","_ref99","config","_ref100","_ref101","dateRange","rectBl","rectTr","date_range","rect_bl","rect_tr","device_name","_ref102","_ref103","block","_ref104","blockId","_ref105","_ref106","blockName","_ref107","_ref108","_ref109","_ref110","runId","_ref111","_defaultAuth","_ref112","_ref113","_buildContext","_ref114","_ref115","_ref116","_ref117","prototype","removeAccessToken","deleteAccessToken","binaryParser","fn","Buffer","concat","instance","Constructor","TypeError","_defineProperty","_defineProperty2","defineProperties","props","descriptor","enumerable","configurable","writable","protoProps","staticProps","_setPrototypeOf","_setPrototypeOf2","_create","_create2","_typeof2","_typeof3","subClass","superClass","constructor","self","ReferenceError","_isIterable2","_isIterable3","sliceIterator","arr","_arr","_n","_d","_e","_s","_i","_symbol","_symbol2","_typeof","placeHoldersCount","b64","len","byteLength","toByteArray","tmp","placeHolders","Arr","L","revLookup","charCodeAt","tripletToBase64","num","lookup","encodeChunk","uint8","start","output","fromByteArray","extraBytes","parts","len2","Uint8Array","code","typedArraySupport","foo","subarray","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","arg","encodingOrOffset","allocUnsafe","from","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","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","b","n","m","bidirectionalIndexOf","val","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","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","str","stringtrim","replace","INVALID_BASE64_RE","trim","units","Infinity","leadSurrogate","byteArray","hi","lo","src","dst","INSPECT_MAX_BYTES","global","poolSize","_augment","Symbol","species","allocUnsafeSlow","_isBuffer","compare","a","x","y","list","swap16","swap32","swap64","equals","inspect","match","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","floor","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","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","451","500","501","502","503","504","505","506","507","508","509","510","511","assign","$Object","P","D","create","it","desc","entries","getPrototypeOf","keys","setPrototypeOf","Promise","f","forbiddenField","isObject","toIObject","toLength","toAbsoluteIndex","IS_INCLUDES","$this","el","fromIndex","O","index","cof","TAG","ARG","tryGet","T","B","callee","core","__e","aFunction","document","is","createElement","split","getKeys","gOPS","pIE","result","getSymbols","symbols","isEnum","ctx","hide","PROTOTYPE","$export","source","own","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","S","IS_PROTO","IS_BIND","IS_WRAP","W","expProto","C","Function","virtual","R","U","exec","isArrayIter","anObject","getIterFn","BREAK","RETURN","iterable","ITERATOR","iterator","iterFn","window","__g","dP","createDesc","object","documentElement","un","propertyIsEnumerable","Iterators","ArrayProto","setToStringTag","IteratorPrototype","NAME","LIBRARY","redefine","has","$iterCreate","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Base","DEFAULT","IS_SET","FORCED","methods","getMethod","kind","proto","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","values","SAFE_CLOSING","riter","skipClosing","safe","iter","META","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","KEY","macrotask","Observer","MutationObserver","WebKitMutationObserver","process","isNode","last","notify","flush","parent","domain","exit","enter","nextTick","toggle","node","createTextNode","observe","characterData","promise","task","PromiseCapability","$$resolve","$$reject","toObject","IObject","$assign","A","K","aLen","dPs","enumBugKeys","IE_PROTO","Empty","createDict","iframeDocument","iframe","style","display","appendChild","contentWindow","open","lt","close","Properties","IE8_DOM_DEFINE","toPrimitive","Attributes","gOPD","getOwnPropertyDescriptor","gOPN","windowNames","getOwnPropertyNames","getWindowNames","$keys","hiddenKeys","getOwnPropertySymbols","ObjectProto","names","fails","exp","isEntries","v","newPromiseCapability","promiseCapability","bitmap","check","test","buggy","DESCRIPTORS","SPECIES","def","tag","stat","shared","uid","SHARED","store","toInteger","defined","TO_STRING","s","charAt","invoke","html","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","Dispatch","counter","queue","ONREADYSTATECHANGE","defer","channel","run","listener","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","clear","ceil","valueOf","px","random","wksExt","$Symbol","USE_SYMBOL","$exports","classof","getIteratorMethod","getIterator","isIterable","addToUnscopables","iterated","_t","_k","Arguments","$getPrototypeOf","anInstance","forOf","speciesConstructor","microtask","newPromiseCapabilityModule","perform","promiseResolve","PROMISE","$Promise","empty","Internal","newGenericPromiseCapability","OwnPromiseCapability","Wrapper","USE_NATIVE","FakePromise","PromiseRejectionEvent","isThenable","isReject","chain","_c","_v","ok","reaction","handler","fail","_h","onHandleUnhandled","onUnhandled","unhandled","isUnhandled","onunhandledrejection","_a","onrejectionhandled","$reject","_w","$resolve","wrapper","executor","onFulfilled","onRejected","r","capability","all","$index","alreadyCalled","race","$at","point","$fails","wks","wksDefine","enumKeys","gOPNExt","$GOPD","$DP","$JSON","_stringify","stringify","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","QObject","setter","findChild","setSymbolDesc","protoDesc","wrap","sym","isSymbol","$defineProperty","$defineProperties","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","es6Symbols","wellKnownSymbols","for","keyFor","useSetter","useSimple","replacer","$replacer","finally","onFinally","isFunction","try","callbackfn","TO_STRING_TAG","DOMIterables","Collection","_maxListeners","isNumber","isUndefined","defaultMaxListeners","setMaxListeners","er","listeners","addListener","newListener","warned","trace","g","removeListener","fired","position","splice","listenerCount","evlistener","emitter","spacer","decirc","replacerStack","replaceGetterValues","part","pop","stack","propertyDescriptor","compareFunction","deterministicStringify","deterministicDecirc","stable","stableStringify","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","NaN","rt","abs","log","LN2","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queueIndex","drainQueue","Item","noop","browser","env","argv","versions","off","prependListener","prependOnceListener","binding","cwd","chdir","umask","root","mapDomain","regexSeparators","ucs2decode","extra","ucs2encode","stringFromCharCode","basicToDigit","base","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","damp","baseMinusTMin","tMax","skew","decode","input","basic","oldi","t","baseMinusT","inputLength","initialN","bias","initialBias","delimiter","maxInt","tMin","encode","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","toUnicode","regexPunycode","toASCII","regexNonASCII","freeExports","nodeType","freeModule","freeGlobal","punycode","overflow","not-basic","invalid-input","ucs2","define","amd","qs","sep","eq","regexp","maxKeys","kstr","vstr","idx","decodeURIComponent","xs","stringifyPrimitive","objectKeys","ks","ClientRequest","extend","statusCodes","http","opts","cb","defaultProtocol","location","search","host","toUpperCase","IncomingMessage","defaultMaxSockets","globalAgent","STATUS_CODES","METHODS","XMLHttpRequest","XDomainRequest","checkTypeSupport","fetch","ReadableStream","writableStream","WritableStream","abortController","AbortController","arraybuffer","msstream","mozchunkedarraybuffer","overrideMimeType","decideMode","preferBinary","useFetch","statusValid","inherits","stream","rStates","readyStates","Writable","_opts","_body","_headers","setHeader","_mode","_fetchTimer","_socketTimeout","_socketTimer","_onFinish","lowerName","unsafeHeaders","getHeader","header","removeHeader","_destroyed","headersObj","Blob","headersList","keyName","controller","_fetchAbortController","requestTimeout","credentials","withCredentials","_fetchResponse","_resetTimers","_connect","_xhr","ontimeout","setRequestHeader","_response","onreadystatechange","readyState","LOADING","DONE","_onXHRProgress","onprogress","onerror","_write","destroy","flushHeaders","setNoDelay","setSocketKeepAlive","UNSENT","OPENED","HEADERS_RECEIVED","resetTimers","reader","Readable","rawHeaders","trailers","rawTrailers","statusMessage","statusText","_resumeFetch","pipeTo","getReader","_pos","responseURL","getAllResponseHeaders","matches","_charset","mimeType","charsetMatch","_read","responseText","newData","MSStreamReader","onload","readAsArrayBuffer","ctor","superCtor","super_","TempCtor","_inheritsLoose","createErrorType","getMessage","arg1","arg2","arg3","NodeError","_Base","codes","oneOf","expected","thing","startsWith","endsWith","this_len","substring","determiner","msg","Duplex","allowHalfOpen","readable","onend","_writableState","ended","onEndNT","highWaterMark","getBuffer","_readableState","destroyed","PassThrough","Transform","_transform","_uint8ArrayToBuffer","_isUint8Array","OurUint8Array","unshift","ReadableState","isDuplex","objectMode","readableObjectMode","getHighWaterMark","BufferList","pipes","pipesCount","flowing","endEmitted","reading","sync","needReadable","emittedReadable","readableListening","resumeScheduled","paused","emitClose","autoDestroy","defaultEncoding","awaitDrain","readingMore","decoder","StringDecoder","_destroy","Stream","readableAddChunk","addToFront","skipChunkCheck","debug","state","onEofChunk","chunkInvalid","errorOrDestroy","ERR_STREAM_UNSHIFT_AFTER_END_EVENT","addChunk","ERR_STREAM_PUSH_AFTER_EOF","maybeReadMore","emitReadable","ERR_INVALID_ARG_TYPE","computeNewHighWaterMark","MAX_HWM","howMuchToRead","emitReadable_","flow","maybeReadMore_","pipeOnDrain","EElistenerCount","updateReadableListening","resume","nReadingNextTick","resume_","fromList","shift","first","consume","endReadable","endReadableNT","wState","finished","EE","debugUtil","debuglog","destroyImpl","_require","_require$codes","ERR_METHOD_NOT_IMPLEMENTED","createReadableStreamAsyncIterator","kProxyEvents","_undestroy","undestroy","isPaused","setEncoding","enc","p","content","nOrig","doRead","pipe","dest","pipeOpts","onunpipe","unpipeInfo","hasUnpiped","cleanup","onclose","onfinish","ondrain","unpipe","ondata","cleanedUp","needDrain","pause","doEnd","stdout","stderr","endFn","dests","ev","asyncIterator","_fromList","afterTransform","ts","_transformState","transforming","writecb","ERR_MULTIPLE_CALLBACK","writechunk","rs","needTransform","writeencoding","transform","_flush","prefinish","ERR_TRANSFORM_WITH_LENGTH_0","ERR_TRANSFORM_ALREADY_TRANSFORMING","err2","WriteReq","callback","CorkedRequest","entry","finish","onCorkedFinish","nop","WritableState","writableObjectMode","finalCalled","ending","noDecode","decodeStrings","writing","corked","bufferProcessing","onwrite","writelen","bufferedRequest","lastBufferedRequest","pendingcb","prefinished","errorEmitted","bufferedRequestCount","corkedRequestsFree","realHasInstance","writev","_writev","final","_final","writeAfterEnd","ERR_STREAM_WRITE_AFTER_END","validChunk","ERR_STREAM_NULL_VALUES","decodeChunk","writeOrBuffer","isBuf","newChunk","doWrite","ERR_STREAM_DESTROYED","onwriteError","finishMaybe","onwriteStateUpdate","needFinish","clearBuffer","afterWrite","onwriteDrain","holder","count","allBuffers","callFinal","need","rState","endWritable","corkReq","internalUtil","deprecate","ERR_STREAM_CANNOT_PIPE","ERR_UNKNOWN_ENCODING","current","_","hasInstance","cork","uncork","setDefaultEncoding","createIterResult","readAndResolve","kLastResolve","kStream","kLastPromise","kLastReject","onReadable","wrapForNext","lastPromise","kEnded","kHandlePromise","_Object$setPrototypeO","kError","AsyncIteratorPrototype","ReadableStreamAsyncIteratorPrototype","_Object$create","ownKeys","enumerableOnly","_objectSpread","getOwnPropertyDescriptors","_classCallCheck","_defineProperties","_createClass","copyBuffer","_require2","custom","tail","hasStrings","_getString","_getBuffer","nb","depth","customInspect","readableDestroyed","writableDestroyed","emitErrorNT","emitCloseNT","emitErrorAndCloseNT","called","_len","_key","isRequest","eos","onlegacyfinish","writableEnded","readableEnded","ERR_STREAM_PREMATURE_CLOSE","onrequest","destroyer","closed","to","popCallback","streams","pipeline","ERR_MISSING_ARGS","destroys","reduce","highWaterMarkFrom","duplexKey","hwm","ERR_INVALID_OPT_VALUE","copyProps","SafeBuffer","_normalizeEncoding","retried","normalizeEncoding","nenc","text","utf16Text","utf16End","fillLast","utf8FillLast","base64Text","base64End","simpleWrite","simpleEnd","lastNeed","lastTotal","lastChar","utf8CheckByte","byte","utf8CheckIncomplete","utf8CheckExtraBytes","utf8Text","total","utf8End","_defaults","_setDefaults","_toConsumableArray","serialize","pairs","pushEncodedKeyValuePair","subkey","parseString","pair","parseHeader","line","lines","fields","isJSON","mime","Response","_setStatusProperties","getResponseHeader","_setHeaderProperties","_responseType","_parseBody","Request","_query","_header","err_","original","rawResponse","new_err","_isResponseOK","del","warn","Emitter","safeStringify","RequestBase","ResponseBase","ActiveXObject","_unused","_unused2","_unused3","_unused4","serializeObject","types","xml","urlencoded","form-data","application/x-www-form-urlencoded","application/json","_parser","toError","user","pass","btoa","encoder","_auth","_data","_getFormData","append","_formData","FormData","_shouldRetry","_retry","_callback","_maxRetries","retries","_retries","crossDomainError","crossDomain","ca","_isHost","_endCalled","_finalizeQueryString","_end","_setUploadTimeout","_uploadTimeout","_uploadTimeoutTimer","_timeoutError","_aborted","_setTimeouts","_responseTimeoutTimer","_unused5","timedout","handleProgress","direction","percent","loaded","hasListeners","upload","_unused6","_withCredentials","contentType","_serializer","patch","mixin","_timer","_timeout","_responseTimeout","option","deadline","retry","_retryCallback","ERROR_CODES","override","_fullfilledPromise","_okCallback","unset","base64Encoder","redirects","_maxRedirects","maxResponseSize","_maxResponseSize","isObj","sortQuery","_sort","queryArr","_appendQueryString","errno","utils","ct","params","link","parseLinks","statusType","info","redirect","clientError","serverError","created","accepted","noContent","badRequest","unauthorized","notAcceptable","forbidden","notFound","unprocessableEntity","cleanHeader","changesOrigin","authorization","cookie","_callbacks","removeEventListener","callbacks","Url","slashes","hash","pathname","href","urlParse","parseQueryString","slashesDenoteHost","util","u","urlFormat","isString","format","urlResolve","relative","urlResolveObject","resolveObject","protocolPattern","portPattern","simplePathPattern","delims","unwise","autoEscape","nonHostChars","hostEndingChars","hostnameMaxLen","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","https","ftp","gopher","http:","https:","ftp:","gopher:","file:","querystring","queryIndex","splitter","uSplit","slashRegex","rest","simplePath","lowerProto","hostEnd","hec","atSign","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","h","ae","esc","escape","qm","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","isNullOrUndefined","authInHost","isNull","hasTrailingSlash","up","isAbsolute","deprecated","localStorage"],"mappings":"AAAA;ACAA,YA8CA,SAASA,wBAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,GA5CvFG,OAAOC,eAAeC,QAAS,cAC9BC,OAAO,GAGR,IAAIC,OAAQC,QAAQ,qCAEhBC,OAASV,uBAAuBQ,OAEhCG,gBAAkBF,QAAQ,uCAE1BG,gBAAkBZ,uBAAuBW,iBAEzCE,SAAWJ,QAAQ,wCAEnBK,UAAYd,uBAAuBa,UAEnCE,cAAgBN,QAAQ,sCAExBO,cAAgBhB,uBAAuBe,eAEvCE,QAAUR,QAAQ,uCAElBS,SAAWlB,uBAAuBiB,SAElCE,SAAWV,QAAQ,iCAEnBW,UAAYpB,uBAAuBmB,UAEnCE,iBAAmBZ,QAAQ,wCAE3Ba,iBAAmBtB,uBAAuBqB,kBAE1CE,cAAgBd,QAAQ,qCAExBe,cAAgBxB,uBAAuBuB,eAEvCE,YAAchB,QAAQ,cAEtBiB,aAAe1B,uBAAuByB,aAEtCE,kBAAoBlB,QAAQ,qBAE5BmB,mBAAqB5B,uBAAuB2B,mBAuB5CE,MAAQ,WACX,QAASA,GAAMC,IACd,EAAIR,iBAAiBnB,SAAS4B,KAAMF,GAEpCE,KAAKC,WAAWF,GAubjB,OApbA,EAAIN,cAAcrB,SAAS0B,IAC1BI,IAAK,aACL1B,MAAO,SAAoBuB,GAC1BC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AET+1C,kBAAmB,SAAS/1C,GAC1B,MAAc,OAAPA;;;ACYX,QAASoiC,WAAW5mC,EAAI46B,GAMtB,QAASigB,KACP,IAAKpwB,EAAQ,CACX,GAAI7sB,OAAO,oBACT,KAAM,IAAIva,OAAMu3C,EACPh9B,QAAO,oBAChBxI,QAAQs1B,MAAMkQ,GAEdxlC,QAAQq5C,KAAK7T,GAEfnQ,GAAS,EAEX,MAAOzqB,GAAG4J,MAAM1pB,KAAMqF,WAhBxB,GAAIqY,OAAO,iBACT,MAAOoC,EAGT,IAAIyqB,IAAS,CAeb,OAAOowB,GAWT,QAASj9C,QAAQvZ,GAEf,IACE,IAAKunB,OAAOkvC,aAAc,OAAO,EACjC,MAAO9T,GACP,OAAO,EAET,GAAI//B,GAAM2E,OAAOkvC,aAAaz2D,EAC9B,OAAI,OAAQ4iB,GACyB,SAA9BU,OAAOV,GAAKvQ,cA5DrBxP,OAAOzI,QAAUmoD","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.\n ******************************************************************************\n */\n\nvar Agent = function () {\n\tfunction Agent(baseUrl) {\n\t\t(0, _classCallCheck3.default)(this, Agent);\n\n\t\tthis.setBaseUrl(baseUrl);\n\t}\n\n\t(0, _createClass3.default)(Agent, [{\n\t\tkey: 'setBaseUrl',\n\t\tvalue: function setBaseUrl(baseUrl) {\n\t\t\tthis.prefix = (0, _superagentPrefix2.default)(baseUrl);\n\t\t}\n\t}, {\n\t\tkey: 'get',\n\t\tvalue: function get(_ref) {\n\t\t\tvar uri = _ref.uri,\n\t\t\t auth = _ref.auth,\n\t\t\t headers = _ref.headers,\n\t\t\t query = _ref.query,\n\t\t\t context = _ref.context;\n\n\t\t\treturn this.request({ uri: uri, method: 'get', auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'head',\n\t\tvalue: function head(_ref2) {\n\t\t\tvar uri = _ref2.uri,\n\t\t\t auth = _ref2.auth,\n\t\t\t headers = _ref2.headers,\n\t\t\t query = _ref2.query,\n\t\t\t context = _ref2.context;\n\n\t\t\treturn this.request({ uri: uri, method: 'head', auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'post',\n\t\tvalue: function post(_ref3) {\n\t\t\tvar uri = _ref3.uri,\n\t\t\t headers = _ref3.headers,\n\t\t\t data = _ref3.data,\n\t\t\t auth = _ref3.auth,\n\t\t\t context = _ref3.context;\n\n\t\t\treturn this.request({ uri: uri, method: 'post', auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'put',\n\t\tvalue: function put(_ref4) {\n\t\t\tvar uri = _ref4.uri,\n\t\t\t auth = _ref4.auth,\n\t\t\t headers = _ref4.headers,\n\t\t\t data = _ref4.data,\n\t\t\t context = _ref4.context;\n\n\t\t\treturn this.request({ uri: uri, method: 'put', auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'delete',\n\t\tvalue: function _delete(_ref5) {\n\t\t\tvar uri = _ref5.uri,\n\t\t\t auth = _ref5.auth,\n\t\t\t headers = _ref5.headers,\n\t\t\t data = _ref5.data,\n\t\t\t context = _ref5.context;\n\n\t\t\treturn this.request({ uri: uri, method: 'delete', auth: auth, headers: headers, data: data, context: context });\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 {Object} headers Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\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 * @parma {Object} context the invocation context, describing the tool and project.\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(_ref6) {\n\t\t\tvar uri = _ref6.uri,\n\t\t\t method = _ref6.method,\n\t\t\t _ref6$headers = _ref6.headers,\n\t\t\t headers = _ref6$headers === undefined ? undefined : _ref6$headers,\n\t\t\t _ref6$data = _ref6.data,\n\t\t\t data = _ref6$data === undefined ? undefined : _ref6$data,\n\t\t\t auth = _ref6.auth,\n\t\t\t _ref6$query = _ref6.query,\n\t\t\t query = _ref6$query === undefined ? undefined : _ref6$query,\n\t\t\t _ref6$form = _ref6.form,\n\t\t\t form = _ref6$form === undefined ? undefined : _ref6$form,\n\t\t\t _ref6$files = _ref6.files,\n\t\t\t files = _ref6$files === undefined ? undefined : _ref6$files,\n\t\t\t _ref6$context = _ref6.context,\n\t\t\t context = _ref6$context === undefined ? undefined : _ref6$context,\n\t\t\t _ref6$raw = _ref6.raw,\n\t\t\t raw = _ref6$raw === undefined ? false : _ref6$raw;\n\n\t\t\tvar requestFiles = this._sanitizeFiles(files);\n\t\t\treturn this._request({ uri: uri, method: method, headers: headers, data: data, auth: auth, query: query, form: form, context: context, files: requestFiles, raw: raw });\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 {Object} headers Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\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 * @param {Object} context the invocation context\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(_ref7) {\n\t\t\tvar uri = _ref7.uri,\n\t\t\t method = _ref7.method,\n\t\t\t headers = _ref7.headers,\n\t\t\t data = _ref7.data,\n\t\t\t auth = _ref7.auth,\n\t\t\t query = _ref7.query,\n\t\t\t form = _ref7.form,\n\t\t\t files = _ref7.files,\n\t\t\t context = _ref7.context,\n\t\t\t raw = _ref7.raw;\n\n\t\t\tvar req = this._buildRequest({ uri: uri, method: method, headers: headers, data: data, auth: auth, query: query, form: form, context: context, files: files });\n\n\t\t\tif (raw) {\n\t\t\t\treturn req;\n\t\t\t}\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\tvar shortErrorDescription = void 0;\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\tshortErrorDescription = 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, shortErrorDescription: shortErrorDescription, 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(_ref8) {\n\t\t\tvar uri = _ref8.uri,\n\t\t\t method = _ref8.method,\n\t\t\t headers = _ref8.headers,\n\t\t\t data = _ref8.data,\n\t\t\t auth = _ref8.auth,\n\t\t\t query = _ref8.query,\n\t\t\t form = _ref8.form,\n\t\t\t files = _ref8.files,\n\t\t\t context = _ref8.context,\n\t\t\t _ref8$makerequest = _ref8.makerequest,\n\t\t\t makerequest = _ref8$makerequest === undefined ? _superagent2.default : _ref8$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 (context) {\n\t\t\t\tthis._applyContext(req, context);\n\t\t\t}\n\t\t\tif (query) {\n\t\t\t\treq.query(query);\n\t\t\t}\n\t\t\tif (headers) {\n\t\t\t\treq.set(headers);\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\t\t\t\t\t\t name = _step$value[0],\n\t\t\t\t\t\t file = _step$value[1];\n\n\t\t\t\t\t\t// API for Form Data is different in Node and in browser\n\t\t\t\t\t\tvar options = {\n\t\t\t\t\t\t\tfilepath: file.path\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (this.isForBrowser(makerequest)) {\n\t\t\t\t\t\t\toptions = file.path;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treq.attach(name, file.data, options);\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\t\t\t\t\t\t\t name = _step2$value[0],\n\t\t\t\t\t\t\t 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\t}, {\n\t\tkey: 'isForBrowser',\n\t\tvalue: function isForBrowser() {\n\t\t\tvar makerequest = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _superagent2.default;\n\n\t\t\t// superagent only has the getXHR method in the browser version\n\t\t\treturn !!makerequest.getXHR;\n\t\t}\n\t}, {\n\t\tkey: '_applyContext',\n\t\tvalue: function _applyContext(req, context) {\n\t\t\tif (context.tool) {\n\t\t\t\tthis._addToolContext(req, context.tool);\n\t\t\t}\n\t\t\tif (context.project) {\n\t\t\t\tthis._addProjectContext(req, context.project);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: '_addToolContext',\n\t\tvalue: function _addToolContext(req, tool) {\n\t\t\tvar value = '';\n\t\t\tif (tool.name) {\n\t\t\t\tvalue += this._toolIdent(tool);\n\t\t\t\tif (tool.components) {\n\t\t\t\t\tvar _iteratorNormalCompletion3 = true;\n\t\t\t\t\tvar _didIteratorError3 = false;\n\t\t\t\t\tvar _iteratorError3 = undefined;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator3 = (0, _getIterator3.default)(tool.components), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n\t\t\t\t\t\t\tvar component = _step3.value;\n\n\t\t\t\t\t\t\tvalue += ', ' + this._toolIdent(component);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError3 = true;\n\t\t\t\t\t\t_iteratorError3 = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion3 && _iterator3.return) {\n\t\t\t\t\t\t\t\t_iterator3.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 (_didIteratorError3) {\n\t\t\t\t\t\t\t\tthrow _iteratorError3;\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}\n\t\t\tif (value) {\n\t\t\t\treq.set('X-Particle-Tool', value);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: '_toolIdent',\n\t\tvalue: function _toolIdent(tool) {\n\t\t\treturn this._nameAtVersion(tool.name, tool.version);\n\t\t}\n\t}, {\n\t\tkey: '_nameAtVersion',\n\t\tvalue: function _nameAtVersion(name, version) {\n\t\t\tvar value = '';\n\t\t\tif (name) {\n\t\t\t\tvalue += name;\n\t\t\t\tif (version) {\n\t\t\t\t\tvalue += '@' + version;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}, {\n\t\tkey: '_addProjectContext',\n\t\tvalue: function _addProjectContext(req, project) {\n\t\t\tvar value = this._buildSemicolonSeparatedProperties(project, 'name');\n\t\t\tif (value) {\n\t\t\t\treq.set('X-Particle-Project', value);\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Creates a string like primaryPropertyValue; name=value; name1=value\n * from the properties of an object.\n * @param {object} obj The object to create the string from\n * @param {string} primaryProperty The name of the primary property which is the default value and must be defined.\n * @private\n * @return {string} The formatted string representing the object properties and the default property.\n */\n\n\t}, {\n\t\tkey: '_buildSemicolonSeparatedProperties',\n\t\tvalue: function _buildSemicolonSeparatedProperties(obj, primaryProperty) {\n\t\t\tvar value = '';\n\t\t\tif (obj[primaryProperty]) {\n\t\t\t\tvalue += obj[primaryProperty];\n\t\t\t\tfor (var prop in obj) {\n\t\t\t\t\tif (prop !== primaryProperty && obj.hasOwnProperty(prop)) {\n\t\t\t\t\t\tvalue += '; ' + prop + '=' + obj[prop];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value;\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\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 _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 _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\t _ref$api = _ref.api,\n\t\t 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(0, _createClass3.default)(Client, [{\n\t\tkey: 'ready',\n\t\tvalue: function ready() {\n\t\t\treturn Boolean(this.auth);\n\t\t}\n\n\t\t/**\n * Get firmware library objects\n * @param {Object} query The query parameters for libraries. See Particle.listLibraries\n * @returns {Promise} A promise\n */\n\n\t}, {\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 * @returns {Promise} A 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 * Get list of library versions\n * @param {String} name Name of the library to fetch\n * @param {Object} query The query parameters for versions. See Particle.getLibraryVersions\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'libraryVersions',\n\t\tvalue: function libraryVersions(name) {\n\t\t\tvar _this3 = this;\n\n\t\t\tvar query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\t\treturn this.api.getLibraryVersions((0, _assign2.default)({}, query, { name: name, 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(_this3, l);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Contribute a new library version\n * @param {Buffer} archive The compressed archive with the library source\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'contributeLibrary',\n\t\tvalue: function contributeLibrary(archive) {\n\t\t\tvar _this4 = this;\n\n\t\t\treturn this.api.contributeLibrary({ 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(_this4, library);\n\t\t\t}, function (error) {\n\t\t\t\t_this4._throwError(error);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Make the the most recent private library version public\n * @param {string} name The name of the library to publish\n * @return {Promise} To publish the library\n */\n\n\t}, {\n\t\tkey: 'publishLibrary',\n\t\tvalue: function publishLibrary(name) {\n\t\t\tvar _this5 = this;\n\n\t\t\treturn this.api.publishLibrary({ 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(_this5, library);\n\t\t\t}, function (error) {\n\t\t\t\t_this5._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 * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteLibrary',\n\t\tvalue: function deleteLibrary(_ref2) {\n\t\t\tvar _this6 = this;\n\n\t\t\tvar name = _ref2.name,\n\t\t\t force = _ref2.force;\n\n\t\t\treturn this.api.deleteLibrary({ name: name, force: force, auth: this.auth }).then(function () {\n\t\t\t\treturn true;\n\t\t\t}, function (error) {\n\t\t\t\treturn _this6._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(uri) {\n\t\t\treturn this.api.downloadFile({ uri: uri });\n\t\t}\n\n\t\t/**\n * @param {Object} files Object containing files to be compiled\n * @param {Number} platformId Platform id number of the device you are compiling for\n * @param {String} targetVersion System firmware version to compile against\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n\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\n\t\t/**\n * @param {String} $0.deviceId Device ID or Name\n * @param {Boolean} $0.signal Signal on or off\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n\n\t}, {\n\t\tkey: 'signalDevice',\n\t\tvalue: function signalDevice(_ref3) {\n\t\t\tvar signal = _ref3.signal,\n\t\t\t deviceId = _ref3.deviceId;\n\n\t\t\treturn this.api.signalDevice({ signal: signal, deviceId: deviceId, auth: this.auth });\n\t\t}\n\n\t\t/**\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n\n\t}, {\n\t\tkey: 'listDevices',\n\t\tvalue: function listDevices() {\n\t\t\treturn this.api.listDevices({ auth: this.auth });\n\t\t}\n\n\t\t/**\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n\n\t}, {\n\t\tkey: 'listBuildTargets',\n\t\tvalue: function listBuildTargets() {\n\t\t\treturn this.api.listBuildTargets({ onlyFeatured: true, auth: this.auth }).then(function (payload) {\n\t\t\t\tvar targets = [];\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)(payload.body.targets), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\tvar target = _step.value;\n\t\t\t\t\t\tvar _iteratorNormalCompletion2 = true;\n\t\t\t\t\t\tvar _didIteratorError2 = false;\n\t\t\t\t\t\tvar _iteratorError2 = undefined;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (var _iterator2 = (0, _getIterator3.default)(target.platforms), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\t\t\t\t\tvar platform = _step2.value;\n\n\t\t\t\t\t\t\t\ttargets.push({\n\t\t\t\t\t\t\t\t\tversion: target.version,\n\t\t\t\t\t\t\t\t\tplatform: platform,\n\t\t\t\t\t\t\t\t\tprerelease: target.prereleases.indexOf(platform) > -1,\n\t\t\t\t\t\t\t\t\tfirmware_vendor: target.firmware_vendor\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t\t\t\t_iteratorError2 = err;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tif (_didIteratorError2) {\n\t\t\t\t\t\t\t\t\tthrow _iteratorError2;\n\t\t\t\t\t\t\t\t}\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} 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\treturn targets;\n\t\t\t}, function () {});\n\t\t}\n\t}, {\n\t\tkey: 'trackingIdentity',\n\t\tvalue: function trackingIdentity() {\n\t\t\tvar _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t\t\t _ref4$full = _ref4.full,\n\t\t\t full = _ref4$full === undefined ? false : _ref4$full,\n\t\t\t context = _ref4.context;\n\n\t\t\treturn this.api.trackingIdentity({ full: full, context: context, auth: this.auth }).then(function (payload) {\n\t\t\t\treturn payload.body;\n\t\t\t});\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});\nexports.default = {\n\tbaseUrl: 'https://api.particle.io',\n\tclientSecret: 'particle-api',\n\tclientId: 'particle-api',\n\ttokenDuration: 7776000, // 90 days\n\tauth: undefined\n};\nmodule.exports = exports['default'];\n//# sourceMappingURL=Defaults.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 _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) {\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_this.timeout = 13000; // keep alive can be sent up to 12 seconds after last event\n\t\t_this.data = '';\n\t\t_this.buf = '';\n\n\t\t_this.parse = _this.parse.bind(_this);\n\t\t_this.end = _this.end.bind(_this);\n\t\t_this.idleTimeoutExpired = _this.idleTimeoutExpired.bind(_this);\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\t\t\t\t hostname = _url$parse.hostname,\n\t\t\t\t protocol = _url$parse.protocol,\n\t\t\t\t port = _url$parse.port,\n\t\t\t\t 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 + '?access_token=' + _this2.token,\n\t\t\t\t\tmethod: 'get',\n\t\t\t\t\tport: parseInt(port, 10) || (isSecure ? 443 : 80),\n\t\t\t\t\tmode: 'prefer-streaming'\n\t\t\t\t});\n\n\t\t\t\t_this2.req = req;\n\n\t\t\t\tvar connected = false;\n\t\t\t\tvar connectionTimeout = setTimeout(function () {\n\t\t\t\t\tif (_this2.req) {\n\t\t\t\t\t\t_this2.req.abort();\n\t\t\t\t\t}\n\t\t\t\t\treject({ error: new Error('Timeout'), errorDescription: 'Timeout connecting to ' + _this2.uri });\n\t\t\t\t}, _this2.timeout);\n\n\t\t\t\treq.on('error', function (e) {\n\t\t\t\t\tclearTimeout(connectionTimeout);\n\n\t\t\t\t\tif (connected) {\n\t\t\t\t\t\t_this2.end();\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject({ error: e, errorDescription: 'Network error from ' + _this2.uri });\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treq.on('response', function (res) {\n\t\t\t\t\tclearTimeout(connectionTimeout);\n\n\t\t\t\t\tvar statusCode = res.statusCode;\n\t\t\t\t\tif (statusCode !== 200) {\n\t\t\t\t\t\tvar body = '';\n\t\t\t\t\t\tres.on('data', function (chunk) {\n\t\t\t\t\t\t\treturn body += chunk;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tres.on('end', function () {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tbody = JSON.parse(body);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t// don't bother doing anything special if the JSON.parse fails\n\t\t\t\t\t\t\t\t// since we are already about to reject the promise anyway\n\t\t\t\t\t\t\t} finally {\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});\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t_this2.data = '';\n\t\t\t\t\t_this2.buf = '';\n\n\t\t\t\t\tconnected = true;\n\t\t\t\t\tres.on('data', _this2.parse);\n\t\t\t\t\tres.once('end', _this2.end);\n\t\t\t\t\t_this2.startIdleTimeout();\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\n\t\t/* Private methods */\n\n\t}, {\n\t\tkey: 'emitSafe',\n\t\tvalue: function emitSafe(event, param) {\n\t\t\ttry {\n\t\t\t\tthis.emit(event, param);\n\t\t\t} catch (error) {\n\t\t\t\tif (event !== 'error') {\n\t\t\t\t\tthis.emitSafe('error', error);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'end',\n\t\tvalue: function end() {\n\t\t\tthis.stopIdleTimeout();\n\n\t\t\tif (!this.req) {\n\t\t\t\t// request was ended intentionally by abort\n\t\t\t\t// do not auto reconnect.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.req = undefined;\n\t\t\tthis.emitSafe('disconnect');\n\t\t\tthis.reconnect();\n\t\t}\n\t}, {\n\t\tkey: 'reconnect',\n\t\tvalue: function reconnect() {\n\t\t\tvar _this3 = this;\n\n\t\t\tsetTimeout(function () {\n\t\t\t\tif (_this3.isOffline()) {\n\t\t\t\t\t_this3.reconnect();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t_this3.emitSafe('reconnect');\n\t\t\t\t_this3.connect().then(function () {\n\t\t\t\t\t_this3.emitSafe('reconnect-success');\n\t\t\t\t}).catch(function (err) {\n\t\t\t\t\t_this3.emitSafe('reconnect-error', err);\n\t\t\t\t\t_this3.reconnect();\n\t\t\t\t});\n\t\t\t}, this.reconnectInterval);\n\t\t}\n\t}, {\n\t\tkey: 'isOffline',\n\t\tvalue: function isOffline() {\n\t\t\tif (typeof navigator === 'undefined' || navigator.hasOwnProperty('onLine')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn !navigator.onLine;\n\t\t}\n\t}, {\n\t\tkey: 'startIdleTimeout',\n\t\tvalue: function startIdleTimeout() {\n\t\t\tthis.stopIdleTimeout();\n\t\t\tthis.idleTimeout = setTimeout(this.idleTimeoutExpired, this.timeout);\n\t\t}\n\t}, {\n\t\tkey: 'stopIdleTimeout',\n\t\tvalue: function stopIdleTimeout() {\n\t\t\tif (this.idleTimeout) {\n\t\t\t\tclearTimeout(this.idleTimeout);\n\t\t\t\tthis.idleTimeout = null;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'idleTimeoutExpired',\n\t\tvalue: function idleTimeoutExpired() {\n\t\t\tif (this.req) {\n\t\t\t\tthis.req.abort();\n\t\t\t\tthis.end();\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'parse',\n\t\tvalue: function parse(chunk) {\n\t\t\tthis.startIdleTimeout();\n\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\tthis.emitSafe('event', event);\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// do nothing if JSON.parse fails\n\t\t\t\t} finally {\n\t\t\t\t\tthis.data = '';\n\t\t\t\t\tthis.eventName = undefined;\n\t\t\t\t\tthis.event = false;\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}\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 _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 contributed 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","'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 _superagentBinaryParser = require('./superagent-binary-parser');\n\nvar _superagentBinaryParser2 = _interopRequireDefault(_superagentBinaryParser);\n\nvar _Defaults = require('./Defaults');\n\nvar _Defaults2 = _interopRequireDefault(_Defaults);\n\nvar _EventStream = require('./EventStream');\n\nvar _EventStream2 = _interopRequireDefault(_EventStream);\n\nvar _Agent = require('./Agent');\n\nvar _Agent2 = _interopRequireDefault(_Agent);\n\nvar _Client = require('./Client');\n\nvar _Client2 = _interopRequireDefault(_Client);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Particle Cloud API wrapper.\n *\n * See for examples\n * of using the `Particle` class.\n *\n * Most Particle methods take a single unnamed argument object documented as\n * `options` 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 for this API call 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\tif (options.auth) {\n\t\t\tthis.setDefaultAuth(options.auth);\n\t\t}\n\n\t\t// todo - this seems a bit dangerous - would be better to put all options/context in a contained object\n\t\t(0, _assign2.default)(this, _Defaults2.default, options);\n\t\tthis.context = {};\n\t\tthis.agent = new _Agent2.default(this.baseUrl);\n\t}\n\n\t(0, _createClass3.default)(Particle, [{\n\t\tkey: '_isValidContext',\n\t\tvalue: function _isValidContext(name, context) {\n\t\t\treturn (name === 'tool' || name === 'project') && context !== undefined;\n\t\t}\n\t}, {\n\t\tkey: 'setContext',\n\t\tvalue: function setContext(name, context) {\n\t\t\tif (context !== undefined) {\n\t\t\t\tif (this._isValidContext(name, context)) {\n\t\t\t\t\tthis.context[name] = context;\n\t\t\t\t} else {\n\t\t\t\t\tthrow Error('unknown context name or undefined context: ' + name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Builds the final context from the context parameter and the context items in the api.\n * @param {Object} context The invocation context, this takes precedence over the local context.\n * @returns {Object} The context to use.\n * @private\n */\n\n\t}, {\n\t\tkey: '_buildContext',\n\t\tvalue: function _buildContext(context) {\n\t\t\treturn (0, _assign2.default)(this.context, context);\n\t\t}\n\n\t\t/**\n * Login to Particle Cloud using an existing Particle acccount.\n * @param {Object} options Options for this API call\n * @param {String} options.username Username for the Particle account\n * @param {String} options.password Password for the Particle account\n * @param {Number} options.tokenDuration How long the access token should last in seconds\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Number} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'login',\n\t\tvalue: function login(_ref) {\n\t\t\tvar username = _ref.username,\n\t\t\t password = _ref.password,\n\t\t\t _ref$tokenDuration = _ref.tokenDuration,\n\t\t\t tokenDuration = _ref$tokenDuration === undefined ? this.tokenDuration : _ref$tokenDuration,\n\t\t\t headers = _ref.headers,\n\t\t\t context = _ref.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/oauth/token',\n\t\t\t\tmethod: 'post',\n\t\t\t\theaders: headers,\n\t\t\t\tform: {\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},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * If login failed with an 'mfa_required' error, this must be called with a valid OTP code to login\n * @param {Object} options Options for this API call\n * @param {String} options.mfaToken Given as 'mfa_token' in the error body of `.login()`.\n * @param {String} options.otp Current one-time-password generated from the authentication application\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Number} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'sendOtp',\n\t\tvalue: function sendOtp(_ref2) {\n\t\t\tvar mfaToken = _ref2.mfaToken,\n\t\t\t otp = _ref2.otp,\n\t\t\t headers = _ref2.headers,\n\t\t\t context = _ref2.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/oauth/token',\n\t\t\t\tmethod: 'post',\n\t\t\t\theaders: headers,\n\t\t\t\tform: {\n\t\t\t\t\tgrant_type: 'urn:custom:mfa-otp',\n\t\t\t\t\tmfa_token: mfaToken,\n\t\t\t\t\totp: otp,\n\t\t\t\t\tclient_id: this.clientId,\n\t\t\t\t\tclient_secret: this.clientSecret\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Enable MFA on the currently logged in user\n * @param {Object} options Options for this API call\n * @param {Object} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'enableMfa',\n\t\tvalue: function enableMfa(_ref3) {\n\t\t\tvar auth = _ref3.auth,\n\t\t\t headers = _ref3.headers,\n\t\t\t context = _ref3.context;\n\n\t\t\treturn this.get({ uri: '/v1/user/mfa-enable', auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Confirm MFA for the user. This must be called with current TOTP code, determined from the results of enableMfa(). You will be prompted to enter an OTP code every time you login after enrollment is confirmed.\n * @param {Object} options Options for this API call\n * @param {Object} options.auth Access token\n * @param {Object} options.mfaToken Token given from previous step to\n * @param {Object} options.otp Current one-time-password generated from the authentication app\n * @param {Boolean} options.invalidateTokens Should all tokens be invalidated\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'confirmMfa',\n\t\tvalue: function confirmMfa(_ref4) {\n\t\t\tvar mfaToken = _ref4.mfaToken,\n\t\t\t otp = _ref4.otp,\n\t\t\t _ref4$invalidateToken = _ref4.invalidateTokens,\n\t\t\t invalidateTokens = _ref4$invalidateToken === undefined ? false : _ref4$invalidateToken,\n\t\t\t auth = _ref4.auth,\n\t\t\t headers = _ref4.headers,\n\t\t\t context = _ref4.context;\n\n\t\t\tvar data = { mfa_token: mfaToken, otp: otp };\n\n\t\t\tif (invalidateTokens) {\n\t\t\t\tdata.invalidate_tokens = true;\n\t\t\t}\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/user/mfa-enable',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: data,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Disable MFA for the user.\n * @param {Object} options Options for this API call\n * @param {Object} options.auth Access token\n * @param {Object} options.currentPassword User's current password\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'disableMfa',\n\t\tvalue: function disableMfa(_ref5) {\n\t\t\tvar currentPassword = _ref5.currentPassword,\n\t\t\t auth = _ref5.auth,\n\t\t\t headers = _ref5.headers,\n\t\t\t context = _ref5.context;\n\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/user/mfa-disable',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { current_password: currentPassword },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Create Customer for Product.\n * @param {Object} options Options for this API call\n * @param {String} options.email Username for the Particle account\n * @param {String} options.password Password for the Particle account\n * @param {String} options.product Create the customer in this product ID or slug\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createCustomer',\n\t\tvalue: function createCustomer(_ref6) {\n\t\t\tvar email = _ref6.email,\n\t\t\t password = _ref6.password,\n\t\t\t product = _ref6.product,\n\t\t\t headers = _ref6.headers,\n\t\t\t context = _ref6.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/v1/products/' + product + '/customers',\n\t\t\t\tmethod: 'post',\n\t\t\t\theaders: headers,\n\t\t\t\tform: {\n\t\t\t\t\temail: email,\n\t\t\t\t\tpassword: password,\n\t\t\t\t\tgrant_type: 'client_credentials',\n\t\t\t\t\tclient_id: this.clientId,\n\t\t\t\t\tclient_secret: this.clientSecret\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Login to Particle Cloud using an OAuth client.\n * @param {Object} options Options for this API call\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'loginAsClientOwner',\n\t\tvalue: function loginAsClientOwner(_ref7) {\n\t\t\tvar headers = _ref7.headers,\n\t\t\t context = _ref7.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/oauth/token',\n\t\t\t\tmethod: 'post',\n\t\t\t\theaders: headers,\n\t\t\t\tform: {\n\t\t\t\t\tgrant_type: 'client_credentials',\n\t\t\t\t\tclient_id: this.clientId,\n\t\t\t\t\tclient_secret: this.clientSecret\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Create a user account for the Particle Cloud\n * @param {Object} options Options for this API call\n * @param {String} options.username Email of the new user\n * @param {String} options.password Password\n * @param {String} options.accountInfo Object that contains account information fields such as user real name, company name, business account flag etc\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createUser',\n\t\tvalue: function createUser(_ref8) {\n\t\t\tvar username = _ref8.username,\n\t\t\t password = _ref8.password,\n\t\t\t accountInfo = _ref8.accountInfo,\n\t\t\t headers = _ref8.headers,\n\t\t\t context = _ref8.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/users',\n\t\t\t\theaders: headers,\n\t\t\t\tdata: {\n\t\t\t\t\tusername: username,\n\t\t\t\t\tpassword: password,\n\t\t\t\t\taccount_info: accountInfo\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Verify new user account via verification email\n * @param {Object} options Options for this API call\n * @param {String} options.token The string token sent in the verification email\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'verifyUser',\n\t\tvalue: function verifyUser(_ref9) {\n\t\t\tvar token = _ref9.token,\n\t\t\t headers = _ref9.headers,\n\t\t\t context = _ref9.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/user/verify',\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { token: token },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Send reset password email for a Particle Cloud user account\n * @param {Object} options Options for this API call\n * @param {String} options.username Email of the user\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'resetPassword',\n\t\tvalue: function resetPassword(_ref10) {\n\t\t\tvar username = _ref10.username,\n\t\t\t headers = _ref10.headers,\n\t\t\t context = _ref10.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/user/password-reset',\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { username: username },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Revoke an access token\n * @param {Object} options Options for this API call\n * @param {String} options.username Username of the Particle cloud account that the token belongs to.\n * @param {String} options.password Password for the account\n * @param {String} options.token Access token you wish to revoke\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteAccessToken',\n\t\tvalue: function deleteAccessToken(_ref11) {\n\t\t\tvar username = _ref11.username,\n\t\t\t password = _ref11.password,\n\t\t\t token = _ref11.token,\n\t\t\t headers = _ref11.headers,\n\t\t\t context = _ref11.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/access_tokens/' + token,\n\t\t\t\tauth: { username: username, password: password },\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { access_token: token },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Revoke the current session access token\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteCurrentAccessToken',\n\t\tvalue: function deleteCurrentAccessToken(_ref12) {\n\t\t\tvar auth = _ref12.auth,\n\t\t\t headers = _ref12.headers,\n\t\t\t context = _ref12.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/access_tokens/current',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Revoke all active access tokens\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteActiveAccessTokens',\n\t\tvalue: function deleteActiveAccessTokens(_ref13) {\n\t\t\tvar auth = _ref13.auth,\n\t\t\t headers = _ref13.headers,\n\t\t\t context = _ref13.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/access_tokens',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Delete the current user\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {String} options.password Password\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteUser',\n\t\tvalue: function deleteUser(_ref14) {\n\t\t\tvar auth = _ref14.auth,\n\t\t\t password = _ref14.password,\n\t\t\t headers = _ref14.headers,\n\t\t\t context = _ref14.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/user',\n\t\t\t\tdata: { password: password },\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * List all valid access tokens for a Particle Cloud account\n * @param {Object} options Options for this API call\n * @param {String} options.username Username\n * @param {String} options.password Password\n * @param {String} options.otp Current one-time-password generated from the authentication application\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listAccessTokens',\n\t\tvalue: function listAccessTokens(_ref15) {\n\t\t\tvar username = _ref15.username,\n\t\t\t password = _ref15.password,\n\t\t\t otp = _ref15.otp,\n\t\t\t headers = _ref15.headers,\n\t\t\t context = _ref15.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/access_tokens',\n\t\t\t\tauth: { username: username, password: password },\n\t\t\t\tquery: otp ? { otp: otp } : undefined,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Retrieves the information that is used to identify the current login for tracking.\n * @param {Object} options Options for this API call\n * @param {String} options.auth The access token\n * @param {Boolean} options.full When true, retrieve all information for registering a user with the tracking API. When false,\n * retrieve only the unique tracking ID for the current login.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} Resolve the tracking identify of the current login\n */\n\n\t}, {\n\t\tkey: 'trackingIdentity',\n\t\tvalue: function trackingIdentity() {\n\t\t\tvar _ref16 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t\t\t _ref16$full = _ref16.full,\n\t\t\t full = _ref16$full === undefined ? false : _ref16$full,\n\t\t\t auth = _ref16.auth,\n\t\t\t headers = _ref16.headers,\n\t\t\t context = _ref16.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/user/identify',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tquery: full ? undefined : { tracking: 1 },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * List devices claimed to the account or product\n * @param {Object} options Options for this API call\n * @param {String} [options.deviceId] (Product only) Filter results to devices with this ID (partial matching)\n * @param {String} [options.deviceName] (Product only) Filter results to devices with this name (partial matching)\n * @param {Array.} [options.groups] (Product only) A list of full group names to filter results to devices belonging to these groups only.\n * @param {String} [options.sortAttr] (Product only) The attribute by which to sort results. See API docs for options.\n * @param {String} [options.sortDir] (Product only) The direction of sorting. See API docs for options.\n * @param {Number} [options.page] (Product only) Current page of results\n * @param {Number} [options.perPage] (Product only) Records per page\n * @param {String} [options.product] List devices in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listDevices',\n\t\tvalue: function listDevices(_ref17) {\n\t\t\tvar deviceId = _ref17.deviceId,\n\t\t\t deviceName = _ref17.deviceName,\n\t\t\t groups = _ref17.groups,\n\t\t\t sortAttr = _ref17.sortAttr,\n\t\t\t sortDir = _ref17.sortDir,\n\t\t\t page = _ref17.page,\n\t\t\t perPage = _ref17.perPage,\n\t\t\t product = _ref17.product,\n\t\t\t auth = _ref17.auth,\n\t\t\t headers = _ref17.headers,\n\t\t\t context = _ref17.context;\n\n\t\t\tvar uri = void 0,\n\t\t\t query = void 0;\n\n\t\t\tif (product) {\n\t\t\t\turi = '/v1/products/' + product + '/devices';\n\t\t\t\tgroups = Array.isArray(groups) ? groups.join(',') : undefined;\n\t\t\t\tquery = { deviceId: deviceId, deviceName: deviceName, groups: groups, sortAttr: sortAttr, sortDir: sortDir, page: page, per_page: perPage };\n\t\t\t} else {\n\t\t\t\turi = '/v1/devices';\n\t\t\t}\n\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\n\t\t/**\n * Get detailed informationa about a device\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getDevice',\n\t\tvalue: function getDevice(_ref18) {\n\t\t\tvar deviceId = _ref18.deviceId,\n\t\t\t product = _ref18.product,\n\t\t\t auth = _ref18.auth,\n\t\t\t headers = _ref18.headers,\n\t\t\t context = _ref18.context;\n\n\t\t\tvar uri = this.deviceUri({ deviceId: deviceId, product: product });\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Claim a device to the account. The device must be online and unclaimed.\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'claimDevice',\n\t\tvalue: function claimDevice(_ref19) {\n\t\t\tvar deviceId = _ref19.deviceId,\n\t\t\t requestTransfer = _ref19.requestTransfer,\n\t\t\t auth = _ref19.auth,\n\t\t\t headers = _ref19.headers,\n\t\t\t context = _ref19.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/devices',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: {\n\t\t\t\t\tid: deviceId,\n\t\t\t\t\trequest_transfer: !!requestTransfer\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Add a device to a product or move device out of quarantine.\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID\n * @param {Object} options.file A file that contains a single-column list of device IDs, device serial numbers, device IMEIs, or devie ICCIDs.\n * Node: Either a path or Buffer. Browser: a File or Blob.\n * @param {String} options.product Add to this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'addDeviceToProduct',\n\t\tvalue: function addDeviceToProduct(_ref20) {\n\t\t\tvar deviceId = _ref20.deviceId,\n\t\t\t product = _ref20.product,\n\t\t\t file = _ref20.file,\n\t\t\t auth = _ref20.auth,\n\t\t\t headers = _ref20.headers,\n\t\t\t context = _ref20.context;\n\n\t\t\tvar files = void 0,\n\t\t\t data = void 0;\n\n\t\t\tif (file) {\n\t\t\t\tfiles = { file: file };\n\t\t\t} else if (deviceId) {\n\t\t\t\tdata = { id: deviceId };\n\t\t\t}\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/v1/products/' + product + '/devices',\n\t\t\t\tmethod: 'post',\n\t\t\t\theaders: headers,\n\t\t\t\tdata: data,\n\t\t\t\tfiles: files,\n\t\t\t\tauth: auth,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Unclaim / Remove a device from your account or product, or deny quarantine\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {Boolean} [options.deny] (Product only) Deny this quarantined device, instead of removing an already approved device\n * @param {String} options.product Remove from this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeDevice',\n\t\tvalue: function removeDevice(_ref21) {\n\t\t\tvar deviceId = _ref21.deviceId,\n\t\t\t deny = _ref21.deny,\n\t\t\t product = _ref21.product,\n\t\t\t auth = _ref21.auth,\n\t\t\t headers = _ref21.headers,\n\t\t\t context = _ref21.context;\n\n\t\t\tvar uri = this.deviceUri({ deviceId: deviceId, product: product });\n\t\t\tvar data = product ? { deny: deny } : undefined;\n\t\t\treturn this.delete({ uri: uri, data: data, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Unclaim a product device its the owner, but keep it in the product\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.product Remove from this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeDeviceOwner',\n\t\tvalue: function removeDeviceOwner(_ref22) {\n\t\t\tvar deviceId = _ref22.deviceId,\n\t\t\t product = _ref22.product,\n\t\t\t auth = _ref22.auth,\n\t\t\t headers = _ref22.headers,\n\t\t\t context = _ref22.context;\n\n\t\t\tvar uri = '/v1/products/' + product + '/devices/' + deviceId + '/owner';\n\t\t\treturn this.delete({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Rename a device\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.name Desired Name\n * @param {String} [options.product] Rename device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'renameDevice',\n\t\tvalue: function renameDevice(_ref23) {\n\t\t\tvar deviceId = _ref23.deviceId,\n\t\t\t name = _ref23.name,\n\t\t\t product = _ref23.product,\n\t\t\t auth = _ref23.auth,\n\t\t\t headers = _ref23.headers,\n\t\t\t context = _ref23.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, name: name, product: product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Instruct the device to turn on/off the LED in a rainbow pattern\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {Boolean} options.signal Signal on or off\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'signalDevice',\n\t\tvalue: function signalDevice(_ref24) {\n\t\t\tvar deviceId = _ref24.deviceId,\n\t\t\t signal = _ref24.signal,\n\t\t\t product = _ref24.product,\n\t\t\t auth = _ref24.auth,\n\t\t\t headers = _ref24.headers,\n\t\t\t context = _ref24.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, signal: signal, product: product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Store some notes about device\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.notes Your notes about this device\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'setDeviceNotes',\n\t\tvalue: function setDeviceNotes(_ref25) {\n\t\t\tvar deviceId = _ref25.deviceId,\n\t\t\t notes = _ref25.notes,\n\t\t\t product = _ref25.product,\n\t\t\t auth = _ref25.auth,\n\t\t\t headers = _ref25.headers,\n\t\t\t context = _ref25.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, notes: notes, product: product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Mark device as being used in development of a product so it opts out of automatic firmware updates\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {Boolean} options.development Set to true to mark as development, false to return to product fleet\n * @param {String} options.product Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'markAsDevelopmentDevice',\n\t\tvalue: function markAsDevelopmentDevice(_ref26) {\n\t\t\tvar deviceId = _ref26.deviceId,\n\t\t\t _ref26$development = _ref26.development,\n\t\t\t development = _ref26$development === undefined ? true : _ref26$development,\n\t\t\t product = _ref26.product,\n\t\t\t auth = _ref26.auth,\n\t\t\t headers = _ref26.headers,\n\t\t\t context = _ref26.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, development: development, product: product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Mark device as being used in development of a product so it opts out of automatic firmware updates\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {Number} options.desiredFirmwareVersion Lock the product device to run this firmware version.\n * @param {Boolean} [options.flash] Immediately flash firmware indicated by desiredFirmwareVersion\n * @param {String} options.product Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'lockDeviceProductFirmware',\n\t\tvalue: function lockDeviceProductFirmware(_ref27) {\n\t\t\tvar deviceId = _ref27.deviceId,\n\t\t\t desiredFirmwareVersion = _ref27.desiredFirmwareVersion,\n\t\t\t flash = _ref27.flash,\n\t\t\t product = _ref27.product,\n\t\t\t auth = _ref27.auth,\n\t\t\t context = _ref27.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, desiredFirmwareVersion: desiredFirmwareVersion, flash: flash, product: product, auth: auth, context: context });\n\t\t}\n\n\t\t/**\n * Mark device as receiving automatic firmware updates\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.product Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'unlockDeviceProductFirmware',\n\t\tvalue: function unlockDeviceProductFirmware(_ref28) {\n\t\t\tvar deviceId = _ref28.deviceId,\n\t\t\t product = _ref28.product,\n\t\t\t auth = _ref28.auth,\n\t\t\t headers = _ref28.headers,\n\t\t\t context = _ref28.context;\n\n\t\t\treturn this.updateDevice({ deviceId: deviceId, desiredFirmwareVersion: null, product: product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Update multiple device attributes at the same time\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} [options.name] Desired Name\n * @param {Boolean} options.signal Signal device on or off\n * @param {String} [options.notes] Your notes about this device\n * @param {Boolean} [options.development] (Product only) Set to true to mark as development, false to return to product fleet\n * @param {Number} [options.desiredFirmwareVersion] (Product only) Lock the product device to run this firmware version.\n * Pass `null` to unlock firmware and go back to released firmware.\n * @param {Boolean} [options.flash] (Product only) Immediately flash firmware indicated by desiredFirmwareVersion\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'updateDevice',\n\t\tvalue: function updateDevice(_ref29) {\n\t\t\tvar deviceId = _ref29.deviceId,\n\t\t\t name = _ref29.name,\n\t\t\t signal = _ref29.signal,\n\t\t\t notes = _ref29.notes,\n\t\t\t development = _ref29.development,\n\t\t\t desiredFirmwareVersion = _ref29.desiredFirmwareVersion,\n\t\t\t flash = _ref29.flash,\n\t\t\t product = _ref29.product,\n\t\t\t auth = _ref29.auth,\n\t\t\t headers = _ref29.headers,\n\t\t\t context = _ref29.context;\n\n\t\t\tif (signal !== undefined) {\n\t\t\t\tsignal = signal ? '1' : '0';\n\t\t\t}\n\n\t\t\tvar uri = this.deviceUri({ deviceId: deviceId, product: product });\n\t\t\tvar data = product ? { name: name, signal: signal, notes: notes, development: development, desired_firmware_version: desiredFirmwareVersion, flash: flash } : { name: name, signal: signal, notes: notes };\n\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Provision a new device for products that allow self-provisioning\n * @param {Object} options Options for this API call\n * @param {String} options.productId Product ID where to create this device\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'provisionDevice',\n\t\tvalue: function provisionDevice(_ref30) {\n\t\t\tvar productId = _ref30.productId,\n\t\t\t auth = _ref30.auth,\n\t\t\t headers = _ref30.headers,\n\t\t\t context = _ref30.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/devices',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { product_id: productId },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Generate a claim code to use in the device claiming process.\n * To generate a claim code for a product, the access token MUST belong to a\n * customer of the product.\n * @param {Object} options Options for this API call\n * @param {String} [options.iccid] ICCID of the SIM card used in the Electron\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getClaimCode',\n\t\tvalue: function getClaimCode(_ref31) {\n\t\t\tvar iccid = _ref31.iccid,\n\t\t\t product = _ref31.product,\n\t\t\t auth = _ref31.auth,\n\t\t\t headers = _ref31.headers,\n\t\t\t context = _ref31.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/device_claims' : '/v1/device_claims';\n\t\t\treturn this.post({ uri: uri, auth: auth, headers: headers, data: { iccid: iccid }, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'validatePromoCode',\n\t\tvalue: function validatePromoCode(_ref32) {\n\t\t\tvar promoCode = _ref32.promoCode,\n\t\t\t auth = _ref32.auth,\n\t\t\t headers = _ref32.headers,\n\t\t\t context = _ref32.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/promo_code/' + promoCode,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'changeProduct',\n\t\tvalue: function changeProduct(_ref33) {\n\t\t\tvar deviceId = _ref33.deviceId,\n\t\t\t productId = _ref33.productId,\n\t\t\t auth = _ref33.auth,\n\t\t\t headers = _ref33.headers,\n\t\t\t context = _ref33.context;\n\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/devices/' + deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { product_id: productId },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get the value of a device variable\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.name Variable name\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getVariable',\n\t\tvalue: function getVariable(_ref34) {\n\t\t\tvar deviceId = _ref34.deviceId,\n\t\t\t name = _ref34.name,\n\t\t\t product = _ref34.product,\n\t\t\t auth = _ref34.auth,\n\t\t\t headers = _ref34.headers,\n\t\t\t context = _ref34.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/devices/' + deviceId + '/' + name : '/v1/devices/' + deviceId + '/' + name;\n\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Compile and flash application firmware to a device. Pass a pre-compiled binary to flash it directly to the device.\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.product Flash device in this product ID or slug\n * @param {Object} options.files Object containing files to be compiled and flashed. Keys should be the filenames, including relative path, and the values should be a path or Buffer of the file contents in Node, or a File or Blob in the browser.\n * @param {String} [options.targetVersion=latest] System firmware version to compile against\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'flashDevice',\n\t\tvalue: function flashDevice(_ref35) {\n\t\t\tvar deviceId = _ref35.deviceId,\n\t\t\t product = _ref35.product,\n\t\t\t files = _ref35.files,\n\t\t\t targetVersion = _ref35.targetVersion,\n\t\t\t auth = _ref35.auth,\n\t\t\t headers = _ref35.headers,\n\t\t\t context = _ref35.context;\n\n\t\t\tvar uri = this.deviceUri({ deviceId: deviceId, product: product });\n\t\t\tvar form = {};\n\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\n\t\t\treturn this.request({ uri: uri, method: 'put', auth: auth, headers: headers, files: files, form: form, context: context });\n\t\t}\n\n\t\t/**\n * DEPRECATED: Flash the Tinker application to a device. Instead compile and flash the Tinker source code.\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'flashTinker',\n\t\tvalue: function flashTinker(_ref36) {\n\t\t\tvar deviceId = _ref36.deviceId,\n\t\t\t auth = _ref36.auth,\n\t\t\t headers = _ref36.headers,\n\t\t\t context = _ref36.context;\n\n\t\t\t/* eslint-disable no-console */\n\t\t\tif (console && console.warning) {\n\t\t\t\tconsole.warning('Particle.flashTinker is deprecated');\n\t\t\t}\n\t\t\t/* eslint-enable no-console */\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/devices/' + deviceId,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { app: 'tinker' },\n\t\t\t\tauth: auth,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Compile firmware using the Particle Cloud\n * @param {Object} options Options for this API call\n * @param {Object} options.files Object containing files to be compiled. Keys should be the filenames, including relative path, and the values should be a path or Buffer of the file contents in Node, or a File or Blob in the browser.\n * @param {Number} [options.platformId] Platform id number of the device you are compiling for. Common values are 0=Core, 6=Photon, 10=Electron.\n * @param {String} [options.targetVersion=latest] System firmware version to compile against\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'compileCode',\n\t\tvalue: function compileCode(_ref37) {\n\t\t\tvar files = _ref37.files,\n\t\t\t platformId = _ref37.platformId,\n\t\t\t targetVersion = _ref37.targetVersion,\n\t\t\t auth = _ref37.auth,\n\t\t\t headers = _ref37.headers,\n\t\t\t context = _ref37.context;\n\n\t\t\tvar form = { platform_id: platformId };\n\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\n\t\t\treturn this.request({\n\t\t\t\turi: '/v1/binaries',\n\t\t\t\tmethod: 'post',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tfiles: files,\n\t\t\t\tform: form,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Download a firmware binary\n * @param {Object} options Options for this API call\n * @param {String} options.binaryId Binary ID received from a successful compile call\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Request} A promise\n */\n\n\t}, {\n\t\tkey: 'downloadFirmwareBinary',\n\t\tvalue: function downloadFirmwareBinary(_ref38) {\n\t\t\tvar binaryId = _ref38.binaryId,\n\t\t\t auth = _ref38.auth,\n\t\t\t headers = _ref38.headers,\n\t\t\t context = _ref38.context;\n\n\t\t\tvar req = this.request({\n\t\t\t\turi: '/v1/binaries/' + binaryId,\n\t\t\t\tmethod: 'get',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context,\n\t\t\t\traw: true\n\t\t\t});\n\n\t\t\treturn this._provideFileData(req);\n\t\t}\n\n\t\t/**\n * Send a new device public key to the Particle Cloud\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {(String|Buffer)} options.key Public key contents\n * @param {String} [options.algorithm=rsa] Algorithm used to generate the public key. Valid values are `rsa` or `ecc`.\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'sendPublicKey',\n\t\tvalue: function sendPublicKey(_ref39) {\n\t\t\tvar deviceId = _ref39.deviceId,\n\t\t\t key = _ref39.key,\n\t\t\t algorithm = _ref39.algorithm,\n\t\t\t auth = _ref39.auth,\n\t\t\t headers = _ref39.headers,\n\t\t\t context = _ref39.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/provisioning/' + deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: {\n\t\t\t\t\tdeviceID: deviceId,\n\t\t\t\t\tpublicKey: typeof key === 'string' ? key : key.toString(),\n\t\t\t\t\tfilename: 'particle-api',\n\t\t\t\t\torder: 'manual_' + Date.now(),\n\t\t\t\t\talgorithm: algorithm || 'rsa'\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Call a device function\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID or Name\n * @param {String} options.name Function name\n * @param {String} options.argument Function argument\n * @param {String} [options.product] Device in this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'callFunction',\n\t\tvalue: function callFunction(_ref40) {\n\t\t\tvar deviceId = _ref40.deviceId,\n\t\t\t name = _ref40.name,\n\t\t\t argument = _ref40.argument,\n\t\t\t product = _ref40.product,\n\t\t\t auth = _ref40.auth,\n\t\t\t headers = _ref40.headers,\n\t\t\t context = _ref40.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/devices/' + deviceId + '/' + name : '/v1/devices/' + deviceId + '/' + name;\n\t\t\treturn this.post({ uri: uri, auth: auth, headers: headers, data: { args: argument }, context: context });\n\t\t}\n\n\t\t/**\n * Get a stream of events\n * @param {Object} options Options for this API call\n * @param {String} [options.deviceId] Device ID or Name, or `mine` to indicate only your devices.\n * @param {String} [options.name] Event Name\n * @param {String} [options.org] Organization Slug\n * @param {String} [options.product] Events for this product ID or slug\n * @param {String} options.auth Access Token\n * @returns {Promise} If the promise resolves, the resolution value will be an EventStream object that will\n * emit 'event' events.\n */\n\n\t}, {\n\t\tkey: 'getEventStream',\n\t\tvalue: function getEventStream(_ref41) {\n\t\t\tvar deviceId = _ref41.deviceId,\n\t\t\t name = _ref41.name,\n\t\t\t org = _ref41.org,\n\t\t\t product = _ref41.product,\n\t\t\t auth = _ref41.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\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn new _EventStream2.default('' + this.baseUrl + uri, auth).connect();\n\t\t}\n\n\t\t/**\n * Publish a event to the Particle Cloud\n * @param {Object} options Options for this API call\n * @param {String} options.name Event name\n * @param {String} options.data Event data\n * @param {Boolean} options.isPrivate Should the event be publicly available?\n * @param {String} [options.product] Event for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'publishEvent',\n\t\tvalue: function publishEvent(_ref42) {\n\t\t\tvar name = _ref42.name,\n\t\t\t data = _ref42.data,\n\t\t\t isPrivate = _ref42.isPrivate,\n\t\t\t product = _ref42.product,\n\t\t\t auth = _ref42.auth,\n\t\t\t headers = _ref42.headers,\n\t\t\t context = _ref42.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/events' : '/v1/devices/events';\n\t\t\tvar postData = { name: name, data: data, private: isPrivate };\n\t\t\treturn this.post({ uri: uri, auth: auth, headers: headers, data: postData, context: context });\n\t\t}\n\n\t\t/**\n * Create a webhook\n * @param {Object} options Options for this API call\n * @param {String} options.event The name of the Particle event that should trigger the Webhook\n * @param {String} options.url The web address that will be targeted when the Webhook is triggered\n * @param {String} [options.device] Trigger Webhook only for this device ID or Name\n * @param {Boolean} [options.rejectUnauthorized] Set to `false` to skip SSL certificate validation of the target URL\n * @param {Boolean} [options.noDefaults] Don't include default event data in the webhook request\n * @param {Object} [options.hook] Webhook configuration settings\n * @param {String} [options.hook.method=POST] Type of web request triggered by the Webhook (GET, POST, PUT, or DELETE)\n * @param {Object} [options.hook.auth] Auth data like `{ username: 'me', password: '1234' }` to send via basic auth header with the Webhook request\n * @param {Object} [options.hook.headers] Additional headers to add to the Webhook like `{ 'X-ONE': '1', X-TWO: '2' }`\n * @param {Object} [options.hook.query] Query params to add to the Webhook request like `{ foo: 'foo', bar: 'bar' }`\n * @param {Object} [options.hook.json] JSON data to send with the Webhook request - sets `Content-Type` to `application/json`\n * @param {Object} [options.hook.form] Form data to send with the Webhook request - sets `Content-Type` to `application/x-www-form-urlencoded`\n * @param {String} [options.hook.body] Custom body to send with the Webhook request\n * @param {Object} [options.hook.responseTemplate] Template to use to customize the Webhook response body\n * @param {Object} [options.hook.responseEvent] The Webhook response event name that your devices can subscribe to\n * @param {Object} [options.hook.errorResponseEvent] The Webhook error response event name that your devices can subscribe to\n * @param {String} [options.product] Webhook for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createWebhook',\n\t\tvalue: function createWebhook(_ref43) {\n\t\t\tvar event = _ref43.event,\n\t\t\t url = _ref43.url,\n\t\t\t device = _ref43.device,\n\t\t\t rejectUnauthorized = _ref43.rejectUnauthorized,\n\t\t\t noDefaults = _ref43.noDefaults,\n\t\t\t hook = _ref43.hook,\n\t\t\t product = _ref43.product,\n\t\t\t auth = _ref43.auth,\n\t\t\t headers = _ref43.headers,\n\t\t\t context = _ref43.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/webhooks' : '/v1/webhooks';\n\t\t\tvar data = { event: event, url: url, deviceId: device, rejectUnauthorized: rejectUnauthorized, noDefaults: noDefaults };\n\n\t\t\tif (hook) {\n\t\t\t\tdata.requestType = hook.method;\n\t\t\t\tdata.auth = hook.auth;\n\t\t\t\tdata.headers = hook.headers;\n\t\t\t\tdata.query = hook.query;\n\t\t\t\tdata.json = hook.json;\n\t\t\t\tdata.form = hook.form;\n\t\t\t\tdata.body = hook.body;\n\t\t\t\tdata.responseTemplate = hook.responseTemplate;\n\t\t\t\tdata.responseTopic = hook.responseEvent;\n\t\t\t\tdata.errorResponseTopic = hook.errorResponseEvent;\n\t\t\t}\n\n\t\t\tif (!data.requestType) {\n\t\t\t\tdata.requestType = 'POST';\n\t\t\t}\n\n\t\t\treturn this.post({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Delete a webhook\n * @param {Object} options Options for this API call\n * @param {String} options.hookId Webhook ID\n * @param {String} [options.product] Webhook for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteWebhook',\n\t\tvalue: function deleteWebhook(_ref44) {\n\t\t\tvar hookId = _ref44.hookId,\n\t\t\t product = _ref44.product,\n\t\t\t auth = _ref44.auth,\n\t\t\t headers = _ref44.headers,\n\t\t\t context = _ref44.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/webhooks/' + hookId : '/v1/webhooks/' + hookId;\n\t\t\treturn this.delete({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List all webhooks owned by the account or product\n * @param {Object} options Options for this API call\n * @param {String} [options.product] Webhooks for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listWebhooks',\n\t\tvalue: function listWebhooks(_ref45) {\n\t\t\tvar product = _ref45.product,\n\t\t\t auth = _ref45.auth,\n\t\t\t headers = _ref45.headers,\n\t\t\t context = _ref45.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/webhooks' : '/v1/webhooks';\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Create an integration to send events to an external service\n *\n * See the API docs for details https://docs.particle.io/reference/api/#integrations-webhooks-\n *\n * @param {Object} options Options for this API call\n * @param {String} options.event Event that triggers the integration\n * @param {Object} options.settings Settings specific to that integration type\n * @param {String} [options.deviceId] Trigger integration only for this device ID or Name\n * @param {String} [options.product] Integration for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createIntegration',\n\t\tvalue: function createIntegration(_ref46) {\n\t\t\tvar event = _ref46.event,\n\t\t\t settings = _ref46.settings,\n\t\t\t deviceId = _ref46.deviceId,\n\t\t\t product = _ref46.product,\n\t\t\t auth = _ref46.auth,\n\t\t\t headers = _ref46.headers,\n\t\t\t context = _ref46.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/integrations' : '/v1/integrations';\n\t\t\tvar data = (0, _assign2.default)({ event: event, deviceid: deviceId }, settings);\n\t\t\treturn this.post({ uri: uri, data: data, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Edit an integration to send events to an external service\n *\n * See the API docs for details https://docs.particle.io/reference/api/#integrations-webhooks-\n *\n * @param {Object} options Options for this API call\n * @param {String} options.integrationId The integration to edit\n * @param {String} [options.event] Change the event that triggers the integration\n * @param {Object} [options.settings] Change the settings specific to that integration type\n * @param {String} [options.deviceId] Trigger integration only for this device ID or Name\n * @param {String} [options.product] Integration for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'editIntegration',\n\t\tvalue: function editIntegration(_ref47) {\n\t\t\tvar integrationId = _ref47.integrationId,\n\t\t\t event = _ref47.event,\n\t\t\t settings = _ref47.settings,\n\t\t\t deviceId = _ref47.deviceId,\n\t\t\t product = _ref47.product,\n\t\t\t auth = _ref47.auth,\n\t\t\t headers = _ref47.headers,\n\t\t\t context = _ref47.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/integrations/' + integrationId : '/v1/integrations/' + integrationId;\n\t\t\tvar data = (0, _assign2.default)({ event: event, deviceid: deviceId }, settings);\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Delete an integration to send events to an external service\n *\n * @param {Object} options Options for this API call\n * @param {String} options.integrationId The integration to remove\n * @param {String} [options.product] Integration for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteIntegration',\n\t\tvalue: function deleteIntegration(_ref48) {\n\t\t\tvar integrationId = _ref48.integrationId,\n\t\t\t product = _ref48.product,\n\t\t\t auth = _ref48.auth,\n\t\t\t headers = _ref48.headers,\n\t\t\t context = _ref48.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/integrations/' + integrationId : '/v1/integrations/' + integrationId;\n\t\t\treturn this.delete({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List all integrations owned by the account or product\n * @param {Object} options Options for this API call\n * @param {String} [options.product] Integrations for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listIntegrations',\n\t\tvalue: function listIntegrations(_ref49) {\n\t\t\tvar product = _ref49.product,\n\t\t\t auth = _ref49.auth,\n\t\t\t headers = _ref49.headers,\n\t\t\t context = _ref49.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/integrations' : '/v1/integrations';\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Get details about the current user\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getUserInfo',\n\t\tvalue: function getUserInfo(_ref50) {\n\t\t\tvar auth = _ref50.auth,\n\t\t\t headers = _ref50.headers,\n\t\t\t context = _ref50.context;\n\n\t\t\treturn this.get({ uri: '/v1/user', auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Set details on the current user\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {String} options.accountInfo Set user's extended info fields (name, business account, company name, etc)\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'setUserInfo',\n\t\tvalue: function setUserInfo(_ref51) {\n\t\t\tvar accountInfo = _ref51.accountInfo,\n\t\t\t auth = _ref51.auth,\n\t\t\t headers = _ref51.headers,\n\t\t\t context = _ref51.context;\n\n\t\t\tvar data = { account_info: accountInfo };\n\t\t\treturn this.put({ uri: '/v1/user', auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Change username (i.e, email)\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {String} options.currentPassword Current password\n * @param {String} options.username New email\n * @param {Boolean} options.invalidateTokens Should all tokens be invalidated\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'changeUsername',\n\t\tvalue: function changeUsername(_ref52) {\n\t\t\tvar currentPassword = _ref52.currentPassword,\n\t\t\t username = _ref52.username,\n\t\t\t _ref52$invalidateToke = _ref52.invalidateTokens,\n\t\t\t invalidateTokens = _ref52$invalidateToke === undefined ? false : _ref52$invalidateToke,\n\t\t\t auth = _ref52.auth,\n\t\t\t headers = _ref52.headers,\n\t\t\t context = _ref52.context;\n\n\t\t\tvar data = { username: username, current_password: currentPassword };\n\n\t\t\tif (invalidateTokens) {\n\t\t\t\tdata.invalidate_tokens = true;\n\t\t\t}\n\n\t\t\treturn this.put({ uri: '/v1/user', auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Change user's password\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {String} options.currentPassword Current password\n * @param {String} options.password New password\n * @param {Boolean} options.invalidateTokens Should all tokens be invalidated\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'changeUserPassword',\n\t\tvalue: function changeUserPassword(_ref53) {\n\t\t\tvar currentPassword = _ref53.currentPassword,\n\t\t\t password = _ref53.password,\n\t\t\t _ref53$invalidateToke = _ref53.invalidateTokens,\n\t\t\t invalidateTokens = _ref53$invalidateToke === undefined ? false : _ref53$invalidateToke,\n\t\t\t auth = _ref53.auth,\n\t\t\t headers = _ref53.headers,\n\t\t\t context = _ref53.context;\n\n\t\t\tvar data = { password: password, current_password: currentPassword };\n\n\t\t\tif (invalidateTokens) {\n\t\t\t\tdata.invalidate_tokens = true;\n\t\t\t}\n\n\t\t\treturn this.put({ uri: '/v1/user', auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * List SIM cards owned by a user or product\n * @param {Object} options Options for this API call\n * @param {String} [options.iccid] (Product only) Filter to SIM cards matching this ICCID\n * @param {String} [options.deviceId] (Product only) Filter to SIM cards matching this device ID\n * @param {String} [options.deviceName] (Product only) Filter to SIM cards matching this device name\n * @param {Number} [options.page] (Product only) Current page of results\n * @param {Number} [options.perPage] (Product only) Records per page\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listSIMs',\n\t\tvalue: function listSIMs(_ref54) {\n\t\t\tvar iccid = _ref54.iccid,\n\t\t\t deviceId = _ref54.deviceId,\n\t\t\t deviceName = _ref54.deviceName,\n\t\t\t page = _ref54.page,\n\t\t\t perPage = _ref54.perPage,\n\t\t\t product = _ref54.product,\n\t\t\t auth = _ref54.auth,\n\t\t\t headers = _ref54.headers,\n\t\t\t context = _ref54.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims' : '/v1/sims';\n\t\t\tvar query = product ? { iccid: iccid, deviceId: deviceId, deviceName: deviceName, page: page, per_page: perPage } : undefined;\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\n\t\t/**\n * Get data usage for one SIM card for the current billing period\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {String} [options.product] SIM card for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getSIMDataUsage',\n\t\tvalue: function getSIMDataUsage(_ref55) {\n\t\t\tvar iccid = _ref55.iccid,\n\t\t\t product = _ref55.product,\n\t\t\t auth = _ref55.auth,\n\t\t\t headers = _ref55.headers,\n\t\t\t context = _ref55.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims/' + iccid + '/data_usage' : '/v1/sims/' + iccid + '/data_usage';\n\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Get data usage for all SIM cards in a product the current billing period\n * @param {Object} options Options for this API call\n * @param {String} options.product SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getFleetDataUsage',\n\t\tvalue: function getFleetDataUsage(_ref56) {\n\t\t\tvar product = _ref56.product,\n\t\t\t auth = _ref56.auth,\n\t\t\t headers = _ref56.headers,\n\t\t\t context = _ref56.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/sims/data_usage',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Check SIM status\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'checkSIM',\n\t\tvalue: function checkSIM(_ref57) {\n\t\t\tvar iccid = _ref57.iccid,\n\t\t\t auth = _ref57.auth,\n\t\t\t headers = _ref57.headers,\n\t\t\t context = _ref57.context;\n\n\t\t\treturn this.head({ uri: '/v1/sims/' + iccid, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Activate and add SIM cards to an account or product\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {Array} options.iccids (Product only) ICCID of multiple SIM cards to import\n * @param {String} options.country The ISO country code for the SIM cards\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'activateSIM',\n\t\tvalue: function activateSIM(_ref58) {\n\t\t\tvar iccid = _ref58.iccid,\n\t\t\t iccids = _ref58.iccids,\n\t\t\t country = _ref58.country,\n\t\t\t promoCode = _ref58.promoCode,\n\t\t\t product = _ref58.product,\n\t\t\t auth = _ref58.auth,\n\t\t\t headers = _ref58.headers,\n\t\t\t context = _ref58.context;\n\n\t\t\t// promoCode is deprecated\n\t\t\ticcids = iccids || [iccid];\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims' : '/v1/sims/' + iccid;\n\t\t\tvar data = product ? { sims: iccids, country: country } : { country: country, promoCode: promoCode, action: 'activate' };\n\t\t\tvar method = product ? 'post' : 'put';\n\n\t\t\treturn this.request({ uri: uri, method: method, headers: headers, data: data, auth: auth, context: context });\n\t\t}\n\n\t\t/**\n * Deactivate a SIM card so it doesn't incur data usage in future months.\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deactivateSIM',\n\t\tvalue: function deactivateSIM(_ref59) {\n\t\t\tvar iccid = _ref59.iccid,\n\t\t\t product = _ref59.product,\n\t\t\t auth = _ref59.auth,\n\t\t\t headers = _ref59.headers,\n\t\t\t context = _ref59.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;\n\t\t\tvar data = { action: 'deactivate' };\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Reactivate a SIM card the was deactivated or unpause a SIM card that was automatically paused\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {Number} [options.mbLimit] New monthly data limit. Necessary if unpausing a SIM card\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'reactivateSIM',\n\t\tvalue: function reactivateSIM(_ref60) {\n\t\t\tvar iccid = _ref60.iccid,\n\t\t\t mbLimit = _ref60.mbLimit,\n\t\t\t product = _ref60.product,\n\t\t\t auth = _ref60.auth,\n\t\t\t headers = _ref60.headers,\n\t\t\t context = _ref60.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;\n\t\t\tvar data = { mb_limit: mbLimit, action: 'reactivate' };\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Update SIM card data limit\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {Array} options.mbLimit Data limit in megabyte for the SIM card\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'updateSIM',\n\t\tvalue: function updateSIM(_ref61) {\n\t\t\tvar iccid = _ref61.iccid,\n\t\t\t mbLimit = _ref61.mbLimit,\n\t\t\t product = _ref61.product,\n\t\t\t auth = _ref61.auth,\n\t\t\t headers = _ref61.headers,\n\t\t\t context = _ref61.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;\n\t\t\tvar data = { mb_limit: mbLimit };\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Remove a SIM card from an account so it can be activated by a different account\n * @param {Object} options Options for this API call\n * @param {String} options.iccid ICCID of the SIM card\n * @param {String} [options.product] SIM cards for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeSIM',\n\t\tvalue: function removeSIM(_ref62) {\n\t\t\tvar iccid = _ref62.iccid,\n\t\t\t product = _ref62.product,\n\t\t\t auth = _ref62.auth,\n\t\t\t headers = _ref62.headers,\n\t\t\t context = _ref62.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;\n\t\t\treturn this.delete({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List valid build targets to be used for compiling\n * @param {Object} options Options for this API call\n * @param {Boolean} [options.onlyFeatured=false] Only list featured build targets\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listBuildTargets',\n\t\tvalue: function listBuildTargets(_ref63) {\n\t\t\tvar onlyFeatured = _ref63.onlyFeatured,\n\t\t\t auth = _ref63.auth,\n\t\t\t headers = _ref63.headers,\n\t\t\t context = _ref63.context;\n\n\t\t\tvar query = onlyFeatured ? { featured: !!onlyFeatured } : undefined;\n\t\t\treturn this.get({ uri: '/v1/build_targets', auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\n\t\t/**\n * List firmware libraries\n * @param {Object} options Options for this API call\n * @param {Number} options.page Page index (default, first page)\n * @param {Number} options.limit Number of items per page\n * @param {String} options.filter Search term for the libraries\n * @param {String} options.sort Ordering key for the library list\n * @param {Array} options.architectures List of architectures to filter\n * @param {String} options.category Category to filter\n * @param {String} options.scope The library scope to list. Default is 'all'. Other values are\n * - 'all' - list public libraries and my private libraries\n * - 'public' - list only public libraries\n * - 'private' - list only my private libraries\n * - 'mine' - list my libraries (public and private)\n * - 'official' - list only official libraries\n * - 'verified' - list only verified libraries\n * - 'featured' - list only featured libraries\n * @param {String} options.excludeScopes list of scopes to exclude\n * @param {String} options.category Category to filter\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listLibraries',\n\t\tvalue: function listLibraries(_ref64) {\n\t\t\tvar page = _ref64.page,\n\t\t\t limit = _ref64.limit,\n\t\t\t filter = _ref64.filter,\n\t\t\t sort = _ref64.sort,\n\t\t\t architectures = _ref64.architectures,\n\t\t\t category = _ref64.category,\n\t\t\t scope = _ref64.scope,\n\t\t\t excludeScopes = _ref64.excludeScopes,\n\t\t\t auth = _ref64.auth,\n\t\t\t headers = _ref64.headers,\n\t\t\t context = _ref64.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/libraries',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tquery: {\n\t\t\t\t\tpage: page,\n\t\t\t\t\tfilter: filter,\n\t\t\t\t\tlimit: limit,\n\t\t\t\t\tsort: sort,\n\t\t\t\t\tarchitectures: this._asList(architectures),\n\t\t\t\t\tcategory: category,\n\t\t\t\t\tscope: scope,\n\t\t\t\t\texcludeScopes: this._asList(excludeScopes)\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: '_asList',\n\t\tvalue: function _asList(value) {\n\t\t\treturn Array.isArray(value) ? value.join(',') : value;\n\t\t}\n\n\t\t/**\n * Get firmware library details\n * @param {Object} options Options for this API call\n * @param {String} options.name Name of the library to fetch\n * @param {String} options.version Version of the library to fetch (default: latest)\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getLibrary',\n\t\tvalue: function getLibrary(_ref65) {\n\t\t\tvar name = _ref65.name,\n\t\t\t version = _ref65.version,\n\t\t\t auth = _ref65.auth,\n\t\t\t headers = _ref65.headers,\n\t\t\t context = _ref65.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/libraries/' + name,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tquery: { version: version },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Firmware library details for each version\n * @param {Object} options Options for this API call\n * @param {String} options.name Name of the library to fetch\n * @param {Number} options.page Page index (default, first page)\n * @param {Number} options.limit Number of items per page\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getLibraryVersions',\n\t\tvalue: function getLibraryVersions(_ref66) {\n\t\t\tvar name = _ref66.name,\n\t\t\t page = _ref66.page,\n\t\t\t limit = _ref66.limit,\n\t\t\t auth = _ref66.auth,\n\t\t\t headers = _ref66.headers,\n\t\t\t context = _ref66.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/libraries/' + name + '/versions',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tquery: { page: page, limit: limit },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Contribute a new library version from a compressed archive\n * @param {Object} options Options for this API call\n * @param {String} options.archive Compressed archive file containing the library sources\n * Either a path or Buffer of the file contents in Node, or a File or Blob in the browser.\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'contributeLibrary',\n\t\tvalue: function contributeLibrary(_ref67) {\n\t\t\tvar archive = _ref67.archive,\n\t\t\t auth = _ref67.auth,\n\t\t\t headers = _ref67.headers,\n\t\t\t context = _ref67.context;\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({\n\t\t\t\turi: '/v1/libraries',\n\t\t\t\tmethod: 'post',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tfiles: files,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Publish the latest version of a library to the public\n * @param {Object} options Options for this API call\n * @param {String} options.name Name of the library to publish\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'publishLibrary',\n\t\tvalue: function publishLibrary(_ref68) {\n\t\t\tvar name = _ref68.name,\n\t\t\t auth = _ref68.auth,\n\t\t\t headers = _ref68.headers,\n\t\t\t context = _ref68.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/v1/libraries/' + name,\n\t\t\t\tmethod: 'patch',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { visibility: 'public' },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Delete one version of a library or an entire private library\n * @param {Object} options Options for this API call\n * @param {String} options.name Name of the library to remove\n * @param {String} options.force Key to force deleting a public library\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteLibrary',\n\t\tvalue: function deleteLibrary(_ref69) {\n\t\t\tvar name = _ref69.name,\n\t\t\t force = _ref69.force,\n\t\t\t auth = _ref69.auth,\n\t\t\t headers = _ref69.headers,\n\t\t\t context = _ref69.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/libraries/' + name,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { force: force },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Download an external file that may not be on the API\n * @param {Object} options Options for this API call\n * @param {String} options.uri URL of the file.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} Resolves to a buffer with the file data\n */\n\n\t}, {\n\t\tkey: 'downloadFile',\n\t\tvalue: function downloadFile(_ref70) {\n\t\t\tvar uri = _ref70.uri,\n\t\t\t headers = _ref70.headers,\n\t\t\t context = _ref70.context;\n\n\t\t\tvar req = this.request({ uri: uri, method: 'get', headers: headers, context: context, raw: true });\n\t\t\treturn this._provideFileData(req);\n\t\t}\n\n\t\t/**\n * List OAuth client created by the account\n * @param {Object} options Options for this API call\n * @param {String} [options.product] List clients for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listOAuthClients',\n\t\tvalue: function listOAuthClients(_ref71) {\n\t\t\tvar product = _ref71.product,\n\t\t\t auth = _ref71.auth,\n\t\t\t headers = _ref71.headers,\n\t\t\t context = _ref71.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/clients' : '/v1/clients';\n\t\t\treturn this.get({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Create an OAuth client\n * @param {Object} options Options for this API call\n * @param {String} options.name Name of the OAuth client\n * @param {String} options.type web, installed or web\n * @param {String} [options.redirect_uri] URL to redirect after OAuth flow. Only for type web.\n * @param {Object} [options.scope] Limits what the access tokens created by this client can do.\n * @param {String} [options.product] Create client for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createOAuthClient',\n\t\tvalue: function createOAuthClient(_ref72) {\n\t\t\tvar name = _ref72.name,\n\t\t\t type = _ref72.type,\n\t\t\t redirect_uri = _ref72.redirect_uri,\n\t\t\t scope = _ref72.scope,\n\t\t\t product = _ref72.product,\n\t\t\t auth = _ref72.auth,\n\t\t\t headers = _ref72.headers,\n\t\t\t context = _ref72.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/clients' : '/v1/clients';\n\t\t\tvar data = { name: name, type: type, redirect_uri: redirect_uri, scope: scope };\n\t\t\treturn this.post({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\n\t\t/**\n * Update an OAuth client\n * @param {Object} options Options for this API call\n * @param {String} options.clientId The OAuth client to update\n * @param {String} [options.name] New Name of the OAuth client\n * @param {Object} [options.scope] New scope of the OAuth client\n * @param {String} [options.product] Update client linked to this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'updateOAuthClient',\n\t\tvalue: function updateOAuthClient(_ref73) {\n\t\t\tvar clientId = _ref73.clientId,\n\t\t\t name = _ref73.name,\n\t\t\t scope = _ref73.scope,\n\t\t\t product = _ref73.product,\n\t\t\t auth = _ref73.auth,\n\t\t\t headers = _ref73.headers,\n\t\t\t context = _ref73.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/clients/' + clientId : '/v1/clients/' + clientId;\n\t\t\tvar data = { name: name, scope: scope };\n\t\t\treturn this.put({ uri: uri, data: data, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Delete an OAuth client\n * @param {Object} options Options for this API call\n * @param {String} options.clientId The OAuth client to update\n * @param {String} [options.product] OAuth client linked to this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'deleteOAuthClient',\n\t\tvalue: function deleteOAuthClient(_ref74) {\n\t\t\tvar clientId = _ref74.clientId,\n\t\t\t product = _ref74.product,\n\t\t\t auth = _ref74.auth,\n\t\t\t headers = _ref74.headers,\n\t\t\t context = _ref74.context;\n\n\t\t\tvar uri = product ? '/v1/products/' + product + '/clients/' + clientId : '/v1/clients/' + clientId;\n\t\t\treturn this.delete({ uri: uri, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List products the account has access to\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listProducts',\n\t\tvalue: function listProducts(_ref75) {\n\t\t\tvar auth = _ref75.auth,\n\t\t\t headers = _ref75.headers,\n\t\t\t context = _ref75.context;\n\n\t\t\treturn this.get({ uri: '/v1/products', auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Get detailed information about a product\n * @param {Object} options Options for this API call\n * @param {String} options.product Product ID or slug\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProduct',\n\t\tvalue: function getProduct(_ref76) {\n\t\t\tvar product = _ref76.product,\n\t\t\t auth = _ref76.auth,\n\t\t\t headers = _ref76.headers,\n\t\t\t context = _ref76.context;\n\n\t\t\treturn this.get({ uri: '/v1/products/' + product, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List product firmware versions\n * @param {Object} options Options for this API call\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listProductFirmware',\n\t\tvalue: function listProductFirmware(_ref77) {\n\t\t\tvar product = _ref77.product,\n\t\t\t auth = _ref77.auth,\n\t\t\t headers = _ref77.headers,\n\t\t\t context = _ref77.context;\n\n\t\t\treturn this.get({ uri: '/v1/products/' + product + '/firmware', auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List product firmware versions\n * @param {Object} options Options for this API call\n * @param {Object} options.file Path or Buffer of the new firmware file\n * Either a path or Buffer of the file contents in Node, or a File or Blob in the browser.\n * @param {Number} options.version Version number of new firmware\n * @param {String} options.title Short identifier for the new firmware\n * @param {String} [options.description] Longer description for the new firmware\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'uploadProductFirmware',\n\t\tvalue: function uploadProductFirmware(_ref78) {\n\t\t\tvar file = _ref78.file,\n\t\t\t version = _ref78.version,\n\t\t\t title = _ref78.title,\n\t\t\t description = _ref78.description,\n\t\t\t product = _ref78.product,\n\t\t\t auth = _ref78.auth,\n\t\t\t headers = _ref78.headers,\n\t\t\t context = _ref78.context;\n\n\t\t\treturn this.request({\n\t\t\t\turi: '/v1/products/' + product + '/firmware',\n\t\t\t\tmethod: 'post',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tform: {\n\t\t\t\t\tversion: version,\n\t\t\t\t\ttitle: title,\n\t\t\t\t\tdescription: description\n\t\t\t\t},\n\t\t\t\tfiles: {\n\t\t\t\t\t'firmware.bin': file\n\t\t\t\t},\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get information about a product firmware version\n * @param {Object} options Options for this API call\n * @param {Number} options.version Version number of firmware\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductFirmware',\n\t\tvalue: function getProductFirmware(_ref79) {\n\t\t\tvar version = _ref79.version,\n\t\t\t product = _ref79.product,\n\t\t\t auth = _ref79.auth,\n\t\t\t headers = _ref79.headers,\n\t\t\t context = _ref79.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/firmware/' + version,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Update information for a product firmware version\n * @param {Object} options Options for this API call\n * @param {Number} options.version Version number of new firmware\n * @param {String} [options.title] New title\n * @param {String} [options.description] New description\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'updateProductFirmware',\n\t\tvalue: function updateProductFirmware(_ref80) {\n\t\t\tvar version = _ref80.version,\n\t\t\t title = _ref80.title,\n\t\t\t description = _ref80.description,\n\t\t\t product = _ref80.product,\n\t\t\t auth = _ref80.auth,\n\t\t\t headers = _ref80.headers,\n\t\t\t context = _ref80.context;\n\n\t\t\tvar uri = '/v1/products/' + product + '/firmware/' + version;\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: { title: title, description: description }, context: context });\n\t\t}\n\n\t\t/**\n * Download a product firmware binary\n * @param {Object} options Options for this API call\n * @param {Number} options.version Version number of new firmware\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Request} A promise\n */\n\n\t}, {\n\t\tkey: 'downloadProductFirmware',\n\t\tvalue: function downloadProductFirmware(_ref81) {\n\t\t\tvar version = _ref81.version,\n\t\t\t product = _ref81.product,\n\t\t\t auth = _ref81.auth,\n\t\t\t headers = _ref81.headers,\n\t\t\t context = _ref81.context;\n\n\t\t\tvar req = this.request({\n\t\t\t\turi: '/v1/products/' + product + '/firmware/' + version + '/binary',\n\t\t\t\tmethod: 'get',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context,\n\t\t\t\traw: true\n\t\t\t});\n\n\t\t\treturn this._provideFileData(req);\n\t\t}\n\t}, {\n\t\tkey: '_provideFileData',\n\t\tvalue: function _provideFileData(req) {\n\t\t\tif (this.agent.isForBrowser()) {\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} else {\n\t\t\t\treq = req.buffer(true).parse(_superagentBinaryParser2.default);\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\n\t\t/**\n * Release a product firmware version as the default version\n * @param {Object} options Options for this API call\n * @param {Number} options.version Version number of new firmware\n * @param {String} options.product Firmware for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'releaseProductFirmware',\n\t\tvalue: function releaseProductFirmware(_ref82) {\n\t\t\tvar version = _ref82.version,\n\t\t\t product = _ref82.product,\n\t\t\t auth = _ref82.auth,\n\t\t\t headers = _ref82.headers,\n\t\t\t context = _ref82.context;\n\n\t\t\tvar uri = '/v1/products/' + product + '/firmware/release';\n\t\t\treturn this.put({ uri: uri, auth: auth, headers: headers, data: { version: version }, context: context });\n\t\t}\n\n\t\t/**\n * List product team members\n * @param {Object} options Options for this API call\n * @param {String} options.product Team for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listTeamMembers',\n\t\tvalue: function listTeamMembers(_ref83) {\n\t\t\tvar product = _ref83.product,\n\t\t\t auth = _ref83.auth,\n\t\t\t headers = _ref83.headers,\n\t\t\t context = _ref83.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/team',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Invite Particle user to a product team\n * @param {Object} options Options for this API call\n * @param {String} options.username Username for the Particle account\n * @param {String} options.product Team for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'inviteTeamMember',\n\t\tvalue: function inviteTeamMember(_ref84) {\n\t\t\tvar username = _ref84.username,\n\t\t\t product = _ref84.product,\n\t\t\t auth = _ref84.auth,\n\t\t\t headers = _ref84.headers,\n\t\t\t context = _ref84.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/products/' + product + '/team',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { username: username },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Remove Particle user to a product team\n * @param {Object} options Options for this API call\n * @param {String} options.username Username for the Particle account\n * @param {String} options.product Team for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeTeamMember',\n\t\tvalue: function removeTeamMember(_ref85) {\n\t\t\tvar username = _ref85.username,\n\t\t\t product = _ref85.product,\n\t\t\t auth = _ref85.auth,\n\t\t\t headers = _ref85.headers,\n\t\t\t context = _ref85.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/products/' + product + '/team/' + username,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Fetch details about a serial number\n * @param {Object} options Options for this API call\n * @param {String} options.serialNumber The serial number printed on the barcode of the device packaging\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'lookupSerialNumber',\n\t\tvalue: function lookupSerialNumber(_ref86) {\n\t\t\tvar serialNumber = _ref86.serialNumber,\n\t\t\t auth = _ref86.auth,\n\t\t\t headers = _ref86.headers,\n\t\t\t context = _ref86.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/serial_numbers/' + serialNumber,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Create a mesh network\n * @param {Object} options Options for this API call\n * @param {String} options.name Network name\n * @param {String} options.deviceId Gateway device ID\n * @param {String} [options.iccid] ICCID of the active SIM card (only for cellular gateway devices)\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'createMeshNetwork',\n\t\tvalue: function createMeshNetwork(_ref87) {\n\t\t\tvar name = _ref87.name,\n\t\t\t deviceId = _ref87.deviceId,\n\t\t\t iccid = _ref87.iccid,\n\t\t\t auth = _ref87.auth,\n\t\t\t headers = _ref87.headers,\n\t\t\t context = _ref87.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/networks',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { name: name, device_id: deviceId, iccid: iccid },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Remove a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} options.networkId Network ID or name\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeMeshNetwork',\n\t\tvalue: function removeMeshNetwork(_ref88) {\n\t\t\tvar networkId = _ref88.networkId,\n\t\t\t auth = _ref88.auth,\n\t\t\t headers = _ref88.headers,\n\t\t\t context = _ref88.context;\n\n\t\t\treturn this.delete({ uri: '/v1/networks/' + networkId, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * List all mesh networks\n * @param {Object} options Options for this API call\n * @param {String} options.auth Access token\n * @param {Number} [options.page] Current page of results\n * @param {Number} [options.perPage] Records per page\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listMeshNetworks',\n\t\tvalue: function listMeshNetworks(_ref89) {\n\t\t\tvar page = _ref89.page,\n\t\t\t perPage = _ref89.perPage,\n\t\t\t auth = _ref89.auth,\n\t\t\t headers = _ref89.headers,\n\t\t\t context = _ref89.context;\n\n\t\t\tvar query = page ? { page: page, per_page: perPage } : undefined;\n\t\t\treturn this.get({ uri: '/v1/networks', auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\n\t\t/**\n * Get information about a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} options.networkId Network ID or name\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getMeshNetwork',\n\t\tvalue: function getMeshNetwork(_ref90) {\n\t\t\tvar networkId = _ref90.networkId,\n\t\t\t auth = _ref90.auth,\n\t\t\t headers = _ref90.headers,\n\t\t\t context = _ref90.context;\n\n\t\t\treturn this.get({ uri: '/v1/networks/' + networkId, auth: auth, headers: headers, context: context });\n\t\t}\n\n\t\t/**\n * Modify a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} options.networkId Network ID or name\n * @param {String} options.action 'add-device', 'remove-device', 'gateway-enable' or 'gateway-disable'\n * @param {String} options.deviceId Device ID\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'updateMeshNetwork',\n\t\tvalue: function updateMeshNetwork(_ref91) {\n\t\t\tvar networkId = _ref91.networkId,\n\t\t\t action = _ref91.action,\n\t\t\t deviceId = _ref91.deviceId,\n\t\t\t auth = _ref91.auth,\n\t\t\t headers = _ref91.headers,\n\t\t\t context = _ref91.context;\n\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/networks/' + networkId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tdata: { action: action, device_id: deviceId },\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Add a device to a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} options.networkId Network ID or name\n * @param {String} options.deviceId Device ID\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'addMeshNetworkDevice',\n\t\tvalue: function addMeshNetworkDevice(_ref92) {\n\t\t\tvar networkId = _ref92.networkId,\n\t\t\t deviceId = _ref92.deviceId,\n\t\t\t auth = _ref92.auth,\n\t\t\t headers = _ref92.headers,\n\t\t\t context = _ref92.context;\n\n\t\t\treturn this.updateMeshNetwork({\n\t\t\t\taction: 'add-device',\n\t\t\t\tnetworkId: networkId,\n\t\t\t\tdeviceId: deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Remove a device from a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} [options.networkId] Network ID or name\n * @param {String} options.deviceId Device ID\n * @param {String} options.auth Access token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'removeMeshNetworkDevice',\n\t\tvalue: function removeMeshNetworkDevice(_ref93) {\n\t\t\tvar networkId = _ref93.networkId,\n\t\t\t deviceId = _ref93.deviceId,\n\t\t\t auth = _ref93.auth,\n\t\t\t headers = _ref93.headers,\n\t\t\t context = _ref93.context;\n\n\t\t\tif (!networkId) {\n\t\t\t\treturn this.delete({\n\t\t\t\t\turi: '/v1/devices/' + deviceId + '/network',\n\t\t\t\t\tauth: auth,\n\t\t\t\t\theaders: headers, context: context\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn this.updateMeshNetwork({\n\t\t\t\taction: 'remove-device',\n\t\t\t\tnetworkId: networkId,\n\t\t\t\tdeviceId: deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * List all devices of a mesh network.\n * @param {Object} options Options for this API call\n * @param {String} options.networkId Network ID or name\n * @param {String} options.auth Access token\n * @param {Number} [options.role] Device role: 'gateway' or 'node'\n * @param {Number} [options.page] Current page of results\n * @param {Number} [options.perPage] Records per page\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'listMeshNetworkDevices',\n\t\tvalue: function listMeshNetworkDevices(_ref94) {\n\t\t\tvar networkId = _ref94.networkId,\n\t\t\t role = _ref94.role,\n\t\t\t page = _ref94.page,\n\t\t\t perPage = _ref94.perPage,\n\t\t\t auth = _ref94.auth,\n\t\t\t headers = _ref94.headers,\n\t\t\t context = _ref94.context;\n\n\t\t\tvar query = role || page ? { role: role, page: page, per_page: perPage } : undefined;\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/networks/' + networkId + '/devices',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tquery: query,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get product configuration\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductConfiguration',\n\t\tvalue: function getProductConfiguration(_ref95) {\n\t\t\tvar auth = _ref95.auth,\n\t\t\t product = _ref95.product,\n\t\t\t headers = _ref95.headers,\n\t\t\t context = _ref95.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/config',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get product configuration schema\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductConfigurationSchema',\n\t\tvalue: function getProductConfigurationSchema(_ref96) {\n\t\t\tvar auth = _ref96.auth,\n\t\t\t product = _ref96.product,\n\t\t\t _ref96$headers = _ref96.headers,\n\t\t\t headers = _ref96$headers === undefined ? {} : _ref96$headers,\n\t\t\t context = _ref96.context;\n\n\t\t\theaders.accept = 'application/schema+json';\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/config',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get product device's configuration\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {String} options.deviceId Device ID to access\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductDeviceConfiguration',\n\t\tvalue: function getProductDeviceConfiguration(_ref97) {\n\t\t\tvar auth = _ref97.auth,\n\t\t\t product = _ref97.product,\n\t\t\t deviceId = _ref97.deviceId,\n\t\t\t headers = _ref97.headers,\n\t\t\t context = _ref97.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/config/' + deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get product device's configuration schema\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {String} options.deviceId Device ID to access\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductDeviceConfigurationSchema',\n\t\tvalue: function getProductDeviceConfigurationSchema(_ref98) {\n\t\t\tvar auth = _ref98.auth,\n\t\t\t product = _ref98.product,\n\t\t\t deviceId = _ref98.deviceId,\n\t\t\t headers = _ref98.headers,\n\t\t\t context = _ref98.context;\n\n\t\t\theaders.accept = 'application/schema+json';\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/config/' + deviceId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Set product configuration\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} opitons.config Product configuration to update\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'setProductConfiguration',\n\t\tvalue: function setProductConfiguration(_ref99) {\n\t\t\tvar auth = _ref99.auth,\n\t\t\t product = _ref99.product,\n\t\t\t config = _ref99.config,\n\t\t\t headers = _ref99.headers,\n\t\t\t context = _ref99.context;\n\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/products/' + product + '/config',\n\t\t\t\tauth: auth,\n\t\t\t\tdata: config,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Set product configuration for a specific device within the product\n * @param {Object} options Options for this API call\n * @param {String} options.product Config for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {Object} opitons.config Product configuration to update\n * @param {String} options.deviceId Device ID to access\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'setProductDeviceConfiguration',\n\t\tvalue: function setProductDeviceConfiguration(_ref100) {\n\t\t\tvar auth = _ref100.auth,\n\t\t\t product = _ref100.product,\n\t\t\t deviceId = _ref100.deviceId,\n\t\t\t config = _ref100.config,\n\t\t\t headers = _ref100.headers,\n\t\t\t context = _ref100.context;\n\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/products/' + product + '/config/' + deviceId,\n\t\t\t\tdata: config,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Query location for devices within a product\n * @param {Object} options Options for this API call\n * @param {String} options.product Locations for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {String} options.dateRange Start and end date in ISO8601 format, separated by comma, to query\n * @param {String} options.rectBl Bottom left of the rectangular bounding box to query. Latitude and longitude separated by comma\n * @param {String} options.rectTr Top right of the rectangular bounding box to query. Latitude and longitude separated by comma\n * @param {String} options.deviceId Device ID prefix to include in the query\n * @param {String} options.deviceName Device name prefix to include in the query\n * @param {String} options.groups Array of group names to include in the query\n * @param {String} options.page Page of results to display. Defaults to 1\n * @param {String} options.perPage Number of results per page. Defaults to 20. Maximum of 100\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductLocations',\n\t\tvalue: function getProductLocations(_ref101) {\n\t\t\tvar auth = _ref101.auth,\n\t\t\t product = _ref101.product,\n\t\t\t dateRange = _ref101.dateRange,\n\t\t\t rectBl = _ref101.rectBl,\n\t\t\t rectTr = _ref101.rectTr,\n\t\t\t deviceId = _ref101.deviceId,\n\t\t\t deviceName = _ref101.deviceName,\n\t\t\t groups = _ref101.groups,\n\t\t\t page = _ref101.page,\n\t\t\t perPage = _ref101.perPage,\n\t\t\t headers = _ref101.headers,\n\t\t\t context = _ref101.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/locations',\n\t\t\t\tquery: {\n\t\t\t\t\tdate_range: dateRange,\n\t\t\t\t\trect_bl: rectBl,\n\t\t\t\t\trect_tr: rectTr,\n\t\t\t\t\tdevice_id: deviceId,\n\t\t\t\t\tdevice_name: deviceName,\n\t\t\t\t\tgroups: groups,\n\t\t\t\t\tpage: page,\n\t\t\t\t\tper_page: perPage\n\t\t\t\t},\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Query location for one device within a product\n * @param {Object} options Options for this API call\n * @param {String} options.product Locations for this product ID or slug\n * @param {String} options.auth Access Token\n * @param {String} options.dateRange Start and end date in ISO8601 format, separated by comma, to query\n * @param {String} options.rectBl Bottom left of the rectangular bounding box to query. Latitude and longitude separated by comma\n * @param {String} options.rectTr Top right of the rectangular bounding box to query. Latitude and longitude separated by comma\n * @param {String} options.deviceId Device ID to query\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n * @returns {Promise} A promise\n */\n\n\t}, {\n\t\tkey: 'getProductDeviceLocations',\n\t\tvalue: function getProductDeviceLocations(_ref102) {\n\t\t\tvar auth = _ref102.auth,\n\t\t\t product = _ref102.product,\n\t\t\t dateRange = _ref102.dateRange,\n\t\t\t rectBl = _ref102.rectBl,\n\t\t\t rectTr = _ref102.rectTr,\n\t\t\t deviceId = _ref102.deviceId,\n\t\t\t headers = _ref102.headers,\n\t\t\t context = _ref102.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/products/' + product + '/locations/' + deviceId,\n\t\t\t\tquery: {\n\t\t\t\t\tdate_range: dateRange,\n\t\t\t\t\trect_bl: rectBl,\n\t\t\t\t\trect_tr: rectTr\n\t\t\t\t},\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Creates a new logic block in the specified organization using the provided block data.\n *\n * When you create a logic block with PubSub matchers, events will immediately\n * start being handled by the block code.\n *\n * When you create a Chron matcher, it will immediately be scheduled at the next time\n * according to the cron and start_at properties.\n *\n * @param {Object} options The options for creating the logic block.\n * @param {Object} options.auth Access token\n * @param {string} options.org The name of the organization.\n * @param {Block} options.block The block object containing the block details.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n *\n * @returns {Promise<{body: {block: ResponseBlock}, statusCode: int}>} A promise that resolves to the created logic block data.\n */\n\n\t}, {\n\t\tkey: 'createLogicBlock',\n\t\tvalue: function createLogicBlock(_ref103) {\n\t\t\tvar auth = _ref103.auth,\n\t\t\t org = _ref103.org,\n\t\t\t block = _ref103.block,\n\t\t\t headers = _ref103.headers,\n\t\t\t context = _ref103.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/orgs/' + org + '/block',\n\t\t\t\tauth: auth,\n\t\t\t\tdata: { block: block },\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Get a logic block in the specified organization by block ID.\n *\n * @param {Object} options The options for the logic block.\n * @param {Object} options.auth Access token\n * @param {string} options.org The name of the organization.\n * @param {Block} options.blockId The ID of the block to retrieve.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n *\n * @returns {Promise<{body: {block: ResponseBlock}, statusCode: int}>} A promise that resolves to the specified logic block data.\n */\n\n\t}, {\n\t\tkey: 'getLogicBlock',\n\t\tvalue: function getLogicBlock(_ref104) {\n\t\t\tvar auth = _ref104.auth,\n\t\t\t org = _ref104.org,\n\t\t\t blockId = _ref104.blockId,\n\t\t\t headers = _ref104.headers,\n\t\t\t context = _ref104.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/orgs/' + org + '/block/' + blockId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Updates an existing logic block in the specified organization, completely overwriting the existing block in-place.\n * If you include an id on a matcher, it will update the matcher in-place.\n *\n * See patchLogicBlock if you want to update only some properties.\n *\n * @param {Object} options The options for updating the logic block.\n * @param {Object} options.auth The authentication object with the API key.\n * @param {string} options.org The unique identifier of the organization.\n * @param {string} options.blockId The ID of the block to update.\n * @param {Block} options.block The block object containing the block details. Must include all fields.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context.\n *\n * @returns {Promise<{body: {block: ResponseBlock}, statusCode: int}>} A promise that resolves to the updated logic block data.\n */\n\n\t}, {\n\t\tkey: 'updateLogicBlock',\n\t\tvalue: function updateLogicBlock(_ref105) {\n\t\t\tvar auth = _ref105.auth,\n\t\t\t org = _ref105.org,\n\t\t\t blockId = _ref105.blockId,\n\t\t\t block = _ref105.block,\n\t\t\t headers = _ref105.headers,\n\t\t\t context = _ref105.context;\n\n\t\t\treturn this.put({\n\t\t\t\turi: '/v1/orgs/' + org + '/block/' + blockId,\n\t\t\t\tauth: auth,\n\t\t\t\tdata: { block: block },\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Updates logic block in the specified organization, partially updating the existing block in-place.\n *\n * @param {Object} options The options for updating the logic block.\n * @param {Object} options.auth The authentication object with the API key.\n * @param {string} options.org The unique identifier of the organization.\n * @param {string} options.blockName The name of the block to update.\n * @param {Block} options.block The block object containing the block details. Only the properties you want to update need to be included.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context.\n *\n * @returns {Promise<{body: {block: ResponseBlock}, statusCode: int}>} A promise that resolves to the updated logic block data.\n */\n\n\t}, {\n\t\tkey: 'patchLogicBlock',\n\t\tvalue: function patchLogicBlock(_ref106) {\n\t\t\tvar auth = _ref106.auth,\n\t\t\t org = _ref106.org,\n\t\t\t blockName = _ref106.blockName,\n\t\t\t block = _ref106.block,\n\t\t\t headers = _ref106.headers,\n\t\t\t context = _ref106.context;\n\n\t\t\treturn this.post({\n\t\t\t\turi: '/v1/orgs/' + org + '/block/' + blockName,\n\t\t\t\tauth: auth,\n\t\t\t\tdata: { block: block },\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Deletes a logic block in the specified organization by block ID.\n *\n * @param {Object} options The options for deleting the logic block.\n * @param {Object} options.auth The authentication object with the API key.\n * @param {string} options.org The unique identifier of the organization.\n * @param {string} options.blockId The ID of the block to delete.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context.\n *\n * @returns {Promise<{body: {block_id: int}, statusCode: int}>} A promise that resolves to an object containing the deleted block ID.\n */\n\n\t}, {\n\t\tkey: 'deleteLogicBlock',\n\t\tvalue: function deleteLogicBlock(_ref107) {\n\t\t\tvar auth = _ref107.auth,\n\t\t\t org = _ref107.org,\n\t\t\t blockId = _ref107.blockId,\n\t\t\t headers = _ref107.headers,\n\t\t\t context = _ref107.context;\n\n\t\t\treturn this.delete({\n\t\t\t\turi: '/v1/orgs/' + org + '/block/' + blockId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Lists all logic blocks in the specified organization.\n *\n * @param {Object} options The options for listing logic blocks.\n * @param {Object} options.auth The authentication object with the API key.\n * @param {string} options.org The unique identifier of the organization.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context.\n *\n * @returns {Promise<{body: {block: ResponseBlock[]}, statusCode: int}>} A promise that resolves to an array of logic block data.\n */\n\n\t}, {\n\t\tkey: 'listLogicBlocks',\n\t\tvalue: function listLogicBlocks(_ref108) {\n\t\t\tvar auth = _ref108.auth,\n\t\t\t org = _ref108.org,\n\t\t\t headers = _ref108.headers,\n\t\t\t context = _ref108.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/orgs/' + org + '/block',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Lists all block runs for the specified block.\n *\n * @param {Object} options The options for the request.\n * @param {Object} options.auth Access token\n * @param {string} options.org The unique identifier of the organization.\n * @param {number} options.blockId The ID of the block for which to retrieve the block runs.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n *\n * @returns {Promise<{body: {blocks: BlockRun[]}, statusCode: int}>} A promise that resolves to an array of block run data.\n */\n\n\t}, {\n\t\tkey: 'listBlockRuns',\n\t\tvalue: function listBlockRuns(_ref109) {\n\t\t\tvar auth = _ref109.auth,\n\t\t\t org = _ref109.org,\n\t\t\t blockId = _ref109.blockId,\n\t\t\t headers = _ref109.headers,\n\t\t\t context = _ref109.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/orgs/' + org + '/block/' + blockId + '/run',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Retrieves a block run by its ID for the specified block.\n *\n * @param {Object} options The options for the request.\n * @param {Object} options.auth Access token\n * @param {string} options.org The unique identifier of the organization.\n * @param {number} options.blockId The ID of the block for which to retrieve the block run.\n * @param {number} options.runId The ID of the block run to retrieve.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n *\n * @returns {Promise<{body: {block_runs: BlockRun[]}, statusCode: int}>} A promise that resolves to an array of block run data for the specified block run ID.\n */\n\n\t}, {\n\t\tkey: 'getBlockRun',\n\t\tvalue: function getBlockRun(_ref110) {\n\t\t\tvar auth = _ref110.auth,\n\t\t\t org = _ref110.org,\n\t\t\t blockId = _ref110.blockId,\n\t\t\t runId = _ref110.runId,\n\t\t\t headers = _ref110.headers,\n\t\t\t context = _ref110.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/orgs/' + org + '/block/' + blockId + '/run/' + runId,\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Retrieves the logs for a block run by its ID for the specified block.\n *\n * @param {Object} options The options for the request.\n * @param {Object} options.auth Access token\n * @param {string} options.org The unique identifier of the organization.\n * @param {number} options.blockId The ID of the block for which to retrieve the block run logs.\n * @param {number} options.runId The ID of the block run for which to retrieve the logs.\n * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {Object} [options.context] Request context\n *\n * @returns {Promise<{body: {block_run_log: BlockRunLog}, statusCode: int}>} A promise that resolves to the logs for the specified block run ID.\n */\n\n\t}, {\n\t\tkey: 'getBlockRunLog',\n\t\tvalue: function getBlockRunLog(_ref111) {\n\t\t\tvar auth = _ref111.auth,\n\t\t\t org = _ref111.org,\n\t\t\t blockId = _ref111.blockId,\n\t\t\t runId = _ref111.runId,\n\t\t\t headers = _ref111.headers,\n\t\t\t context = _ref111.context;\n\n\t\t\treturn this.get({\n\t\t\t\turi: '/v1/orgs/' + org + '/block/' + blockId + '/run/' + runId + '/logs',\n\t\t\t\tauth: auth,\n\t\t\t\theaders: headers,\n\t\t\t\tcontext: context\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Set default auth token that will be used in each method if `auth` is not provided\n * @param {String} auth A Particle access token\n * @returns {undefined}\n */\n\n\t}, {\n\t\tkey: 'setDefaultAuth',\n\t\tvalue: function setDefaultAuth(auth) {\n\t\t\tif (typeof auth === 'string' && auth.length !== 0) {\n\t\t\t\tthis._defaultAuth = auth;\n\t\t\t} else {\n\t\t\t\tthrow new Error('Must pass a non-empty string');\n\t\t\t}\n\t\t}\n\t\t/**\n * Return provided token if truthy else use default auth if truthy else undefined\n * @param {*} auth Optional auth token or undefined\n * @private\n * @returns {String|undefined} a Particle auth token or undefined\n */\n\n\t}, {\n\t\tkey: '_getActiveAuthToken',\n\t\tvalue: function _getActiveAuthToken(auth) {\n\t\t\treturn auth || this._defaultAuth;\n\t\t}\n\t\t/**\n * API URI to access a device\n * @param {Object} options Options for this API call\n * @param {String} options.deviceId Device ID to access\n * @param {String} [options.product] Device only in this product ID or slug\n * @private\n * @returns {string} URI\n */\n\n\t}, {\n\t\tkey: 'deviceUri',\n\t\tvalue: function deviceUri(_ref112) {\n\t\t\tvar deviceId = _ref112.deviceId,\n\t\t\t product = _ref112.product;\n\n\t\t\treturn product ? '/v1/products/' + product + '/devices/' + deviceId : '/v1/devices/' + deviceId;\n\t\t}\n\t}, {\n\t\tkey: 'get',\n\t\tvalue: function get(_ref113) {\n\t\t\tvar uri = _ref113.uri,\n\t\t\t auth = _ref113.auth,\n\t\t\t headers = _ref113.headers,\n\t\t\t query = _ref113.query,\n\t\t\t context = _ref113.context;\n\n\t\t\tcontext = this._buildContext(context);\n\t\t\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn this.agent.get({ uri: uri, auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'head',\n\t\tvalue: function head(_ref114) {\n\t\t\tvar uri = _ref114.uri,\n\t\t\t auth = _ref114.auth,\n\t\t\t headers = _ref114.headers,\n\t\t\t query = _ref114.query,\n\t\t\t context = _ref114.context;\n\n\t\t\tcontext = this._buildContext(context);\n\t\t\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn this.agent.head({ uri: uri, auth: auth, headers: headers, query: query, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'post',\n\t\tvalue: function post(_ref115) {\n\t\t\tvar uri = _ref115.uri,\n\t\t\t auth = _ref115.auth,\n\t\t\t headers = _ref115.headers,\n\t\t\t data = _ref115.data,\n\t\t\t context = _ref115.context;\n\n\t\t\tcontext = this._buildContext(context);\n\t\t\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn this.agent.post({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'put',\n\t\tvalue: function put(_ref116) {\n\t\t\tvar uri = _ref116.uri,\n\t\t\t auth = _ref116.auth,\n\t\t\t headers = _ref116.headers,\n\t\t\t data = _ref116.data,\n\t\t\t context = _ref116.context;\n\n\t\t\tcontext = this._buildContext(context);\n\t\t\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn this.agent.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'delete',\n\t\tvalue: function _delete(_ref117) {\n\t\t\tvar uri = _ref117.uri,\n\t\t\t auth = _ref117.auth,\n\t\t\t headers = _ref117.headers,\n\t\t\t data = _ref117.data,\n\t\t\t context = _ref117.context;\n\n\t\t\tcontext = this._buildContext(context);\n\t\t\tauth = this._getActiveAuthToken(auth);\n\t\t\treturn this.agent.delete({ uri: uri, auth: auth, headers: headers, data: data, context: context });\n\t\t}\n\t}, {\n\t\tkey: 'request',\n\t\tvalue: function request(args) {\n\t\t\targs.context = this._buildContext(args.context);\n\t\t\targs.auth = this._getActiveAuthToken(args.auth);\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\n\t\t// Internal method used to target Particle's APIs other than the default\n\n\t}, {\n\t\tkey: 'setBaseUrl',\n\t\tvalue: function setBaseUrl(baseUrl) {\n\t\t\tthis.baseUrl = baseUrl;\n\t\t\tthis.agent.setBaseUrl(baseUrl);\n\t\t}\n\t}]);\n\treturn Particle;\n}();\n\n// Aliases for backwards compatibility\n\n\nParticle.prototype.removeAccessToken = Particle.prototype.deleteAccessToken;\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","module.exports = { \"default\": require(\"core-js/library/fn/get-iterator\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/is-iterable\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/entries\"), __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/set-prototype-of\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/promise\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };","\"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}();","\"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}();","\"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 && obj !== _symbol2.default.prototype ? \"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 && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\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 return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return (b64.length * 3 / 4) - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\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; i < l; i += 4) {\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","/*!\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","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 \"451\": \"Unavailable For Legal Reasons\",\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","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.get-iterator');\n","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.is-iterable');\n","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n","require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\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};\n","require('../../modules/es7.object.entries');\nmodule.exports = require('../../modules/_core').Object.entries;\n","require('../../modules/es6.object.get-prototype-of');\nmodule.exports = require('../../modules/_core').Object.getPrototypeOf;\n","require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;\n","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/_core').Object.setPrototypeOf;\n","require('../modules/es6.object.to-string');\nrequire('../modules/es6.string.iterator');\nrequire('../modules/web.dom.iterable');\nrequire('../modules/es6.promise');\nrequire('../modules/es7.promise.finally');\nrequire('../modules/es7.promise.try');\nmodule.exports = require('../modules/_core').Promise;\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;\n","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","module.exports = function () { /* empty */ };\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};\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};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf 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};\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar 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};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var core = module.exports = { version: '2.5.1' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","// 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};\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};\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});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var 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;\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var 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;\n","// 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\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var dP = require('./_object-dp');\nvar 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};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\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};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\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};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar 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};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar 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 var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\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};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\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 var 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};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","module.exports = {};\n","module.exports = true;\n","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar 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};\n","var global = require('./_global');\nvar macrotask = require('./_task').set;\nvar Observer = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar 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 var 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};\n","'use strict';\n// 25.4.1.5 NewPromiseCapability(C)\nvar aFunction = require('./_a-function');\n\nfunction PromiseCapability(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}\n\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $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 var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var 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 var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar 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 var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var 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","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar 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};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar 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};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar 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","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar 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};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var 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};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","exports.f = {}.propertyIsEnumerable;\n","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","var getKeys = require('./_object-keys');\nvar toIObject = require('./_to-iobject');\nvar isEnum = require('./_object-pie').f;\nmodule.exports = function (isEntries) {\n return function (it) {\n var O = toIObject(it);\n var keys = getKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var 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};\n","module.exports = function (exec) {\n try {\n return { e: false, v: exec() };\n } catch (e) {\n return { e: true, v: e };\n }\n};\n","var anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar newPromiseCapability = require('./_new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\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};\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};\n","module.exports = require('./_hide');\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar 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};\n","'use strict';\nvar global = require('./_global');\nvar core = require('./_core');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar 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};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar 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};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n","// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = require('./_an-object');\nvar aFunction = require('./_a-function');\nvar SPECIES = require('./_wks')('species');\nmodule.exports = function (O, D) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n","var toInteger = require('./_to-integer');\nvar 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 var i = toInteger(pos);\n var l = s.length;\n var 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};\n","var ctx = require('./_ctx');\nvar invoke = require('./_invoke');\nvar html = require('./_html');\nvar cel = require('./_dom-create');\nvar global = require('./_global');\nvar process = global.process;\nvar setTask = global.setImmediate;\nvar clearTask = global.clearImmediate;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\nvar run = function () {\n var id = +this;\n // eslint-disable-next-line no-prototype-builtins\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 = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\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 // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(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};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\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};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar 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};\n","exports.f = require('./_wks');\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar 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;\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar 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};\n","var anObject = require('./_an-object');\nvar 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};\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar 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 // eslint-disable-next-line no-prototype-builtins\n || Iterators.hasOwnProperty(classof(O));\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar 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 var kind = this._k;\n var 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');\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') });\n","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') });\n","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 });\n","// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = require('./_to-object');\nvar $getPrototypeOf = require('./_object-gpo');\n\nrequire('./_object-sap')('getPrototypeOf', function () {\n return function getPrototypeOf(it) {\n return $getPrototypeOf(toObject(it));\n };\n});\n","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });\n","'use strict';\nvar LIBRARY = require('./_library');\nvar global = require('./_global');\nvar ctx = require('./_ctx');\nvar classof = require('./_classof');\nvar $export = require('./_export');\nvar isObject = require('./_is-object');\nvar aFunction = require('./_a-function');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar speciesConstructor = require('./_species-constructor');\nvar task = require('./_task').set;\nvar microtask = require('./_microtask')();\nvar newPromiseCapabilityModule = require('./_new-promise-capability');\nvar perform = require('./_perform');\nvar promiseResolve = require('./_promise-resolve');\nvar PROMISE = 'Promise';\nvar TypeError = global.TypeError;\nvar process = global.process;\nvar $Promise = global[PROMISE];\nvar isNode = classof(process) == 'process';\nvar empty = function () { /* empty */ };\nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;\nvar newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;\n\nvar USE_NATIVE = !!function () {\n try {\n // correct subclassing with @@species support\n var promise = $Promise.resolve(1);\n var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) {\n exec(empty, empty);\n };\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 isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\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 var ok = promise._s == 1;\n var i = 0;\n var run = function (reaction) {\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var 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 var unhandled = isUnhandled(promise);\n var result, handler, console;\n if (unhandled) {\n result = 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 (unhandled && result.e) throw result.v;\n });\n};\nvar isUnhandled = function (promise) {\n if (promise._h == 1) return false;\n var chain = promise._a || promise._c;\n var i = 0;\n var 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 var 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 // eslint-disable-next-line no-unused-vars\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 OwnPromiseCapability = 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 newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === $Promise || C === Wrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\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 var $$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 return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);\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 var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var values = [];\n var index = 0;\n var remaining = 1;\n forOf(iterable, false, function (promise) {\n var $index = index++;\n var 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 (result.e) reject(result.v);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n forOf(iterable, false, function (promise) {\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if (result.e) reject(result.v);\n return capability.promise;\n }\n});\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 var index = this._i;\n var 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});\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar 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 var i = 0;\n var l = keys.length;\n var 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 var result = [];\n var i = 0;\n var 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 var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var 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 es6Symbols = (\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(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\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(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\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 var i = 1;\n var 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);\n","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export');\nvar $entries = require('./_object-to-array')(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it) {\n return $entries(it);\n }\n});\n","// https://github.com/tc39/proposal-promise-finally\n'use strict';\nvar $export = require('./_export');\nvar core = require('./_core');\nvar global = require('./_global');\nvar speciesConstructor = require('./_species-constructor');\nvar promiseResolve = require('./_promise-resolve');\n\n$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {\n var C = speciesConstructor(this, core.Promise || global.Promise);\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n} });\n","'use strict';\n// https://github.com/tc39/proposal-promise-try\nvar $export = require('./_export');\nvar newPromiseCapability = require('./_new-promise-capability');\nvar perform = require('./_perform');\n\n$export($export.S, 'Promise', { 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapability.f(this);\n var result = perform(callbackfn);\n (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);\n return promiseCapability.promise;\n} });\n","require('./_wks-define')('asyncIterator');\n","require('./_wks-define')('observable');\n","require('./es6.array.iterator');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar TO_STRING_TAG = require('./_wks')('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.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\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","module.exports = stringify\nstringify.default = stringify\nstringify.stable = deterministicStringify\nstringify.stableStringify = deterministicStringify\n\nvar arr = []\nvar replacerStack = []\n\n// Regular stringify\nfunction stringify (obj, replacer, spacer) {\n decirc(obj, '', [], undefined)\n var res\n if (replacerStack.length === 0) {\n res = JSON.stringify(obj, replacer, spacer)\n } else {\n res = JSON.stringify(obj, replaceGetterValues(replacer), spacer)\n }\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n return res\n}\nfunction decirc (val, k, stack, parent) {\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k)\n if (propertyDescriptor.get !== undefined) {\n if (propertyDescriptor.configurable) {\n Object.defineProperty(parent, k, { value: '[Circular]' })\n arr.push([parent, k, val, propertyDescriptor])\n } else {\n replacerStack.push([val, k])\n }\n } else {\n parent[k] = '[Circular]'\n arr.push([parent, k, val])\n }\n return\n }\n }\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n decirc(val[i], i, stack, val)\n }\n } else {\n var keys = Object.keys(val)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n decirc(val[key], key, stack, val)\n }\n }\n stack.pop()\n }\n}\n\n// Stable-stringify\nfunction compareFunction (a, b) {\n if (a < b) {\n return -1\n }\n if (a > b) {\n return 1\n }\n return 0\n}\n\nfunction deterministicStringify (obj, replacer, spacer) {\n var tmp = deterministicDecirc(obj, '', [], undefined) || obj\n var res\n if (replacerStack.length === 0) {\n res = JSON.stringify(tmp, replacer, spacer)\n } else {\n res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer)\n }\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n return res\n}\n\nfunction deterministicDecirc (val, k, stack, parent) {\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k)\n if (propertyDescriptor.get !== undefined) {\n if (propertyDescriptor.configurable) {\n Object.defineProperty(parent, k, { value: '[Circular]' })\n arr.push([parent, k, val, propertyDescriptor])\n } else {\n replacerStack.push([val, k])\n }\n } else {\n parent[k] = '[Circular]'\n arr.push([parent, k, val])\n }\n return\n }\n }\n if (typeof val.toJSON === 'function') {\n return\n }\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n deterministicDecirc(val[i], i, stack, val)\n }\n } else {\n // Create a temporary object in the required way\n var tmp = {}\n var keys = Object.keys(val).sort(compareFunction)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n deterministicDecirc(val[key], key, stack, val)\n tmp[key] = val[key]\n }\n if (parent !== undefined) {\n arr.push([parent, k, val])\n parent[k] = tmp\n } else {\n return tmp\n }\n }\n stack.pop()\n }\n}\n\n// wraps replacer function to handle values we couldn't replace\n// and mark them as [Circular]\nfunction replaceGetterValues (replacer) {\n replacer = replacer !== undefined ? replacer : function (k, v) { return v }\n return function (key, val) {\n if (replacerStack.length > 0) {\n for (var i = 0; i < replacerStack.length; i++) {\n var part = replacerStack[i]\n if (part[1] === key && part[0] === val) {\n val = '[Circular]'\n replacerStack.splice(i, 1)\n break\n }\n }\n }\n return replacer.call(this, key, val)\n }\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","// 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\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\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 // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\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;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\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","/*! 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","// 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","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","var ClientRequest = require('./lib/request')\nvar response = require('./lib/response')\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.ClientRequest = ClientRequest\nhttp.IncomingMessage = response.IncomingMessage\n\nhttp.Agent = function () {}\nhttp.Agent.defaultMaxSockets = 4\n\nhttp.globalAgent = new http.Agent()\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]","exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream)\n\nexports.writableStream = isFunction(global.WritableStream)\n\nexports.abortController = isFunction(global.AbortController)\n\n// The xhr request to example.com may violate some restrictive CSP configurations,\n// so if we're running in a browser that supports `fetch`, avoid calling getXHR()\n// and assume support for certain features below.\nvar xhr\nfunction getXHR () {\n\t// Cache the xhr value\n\tif (xhr !== undefined) return xhr\n\n\tif (global.XMLHttpRequest) {\n\t\txhr = new global.XMLHttpRequest()\n\t\t// If XDomainRequest is available (ie only, where xhr might not work\n\t\t// cross domain), use the page location. Otherwise use example.com\n\t\t// Note: this doesn't actually make an http request.\n\t\ttry {\n\t\t\txhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com')\n\t\t} catch(e) {\n\t\t\txhr = null\n\t\t}\n\t} else {\n\t\t// Service workers don't have XHR\n\t\txhr = null\n\t}\n\treturn xhr\n}\n\nfunction checkTypeSupport (type) {\n\tvar xhr = getXHR()\n\tif (!xhr) return false\n\ttry {\n\t\txhr.responseType = type\n\t\treturn xhr.responseType === type\n\t} catch (e) {}\n\treturn false\n}\n\n// If fetch is supported, then arraybuffer will be supported too. Skip calling\n// checkTypeSupport(), since that calls getXHR().\nexports.arraybuffer = exports.fetch || checkTypeSupport('arraybuffer')\n\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 && checkTypeSupport('ms-stream')\nexports.mozchunkedarraybuffer = !exports.fetch && checkTypeSupport('moz-chunked-arraybuffer')\n\n// If fetch is supported, then overrideMimeType will be supported too. Skip calling\n// getXHR().\nexports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false)\n\nfunction isFunction (value) {\n\treturn typeof value === 'function'\n}\n\nxhr = null // Help gc\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar response = require('./response')\nvar stream = require('readable-stream')\n\nvar IncomingMessage = response.IncomingMessage\nvar rStates = response.readyStates\n\nfunction decideMode (preferBinary, useFetch) {\n\tif (capability.fetch && useFetch) {\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 {\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 ' + Buffer.from(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\tvar useFetch = true\n\tif (opts.mode === 'disable-fetch' || ('requestTimeout' in opts && !capability.abortController)) {\n\t\t// If the use of XHR should be preferred. Not typically needed.\n\t\tuseFetch = false\n\t\tpreferBinary = true\n\t} else if (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, useFetch)\n\tself._fetchTimer = null\n\tself._socketTimeout = null\n\tself._socketTimer = null\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 header = this._headers[name.toLowerCase()]\n\tif (header)\n\t\treturn header.value\n\treturn null\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\tif ('timeout' in opts && opts.timeout !== 0) {\n\t\tself.setTimeout(opts.timeout)\n\t}\n\n\tvar headersObj = self._headers\n\tvar body = null\n\tif (opts.method !== 'GET' && opts.method !== 'HEAD') {\n body = new Blob(self._body, {\n type: (headersObj['content-type'] || {}).value || ''\n });\n }\n\n\t// create flattened list of headers\n\tvar headersList = []\n\tObject.keys(headersObj).forEach(function (keyName) {\n\t\tvar name = headersObj[keyName].name\n\t\tvar value = headersObj[keyName].value\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach(function (v) {\n\t\t\t\theadersList.push([name, v])\n\t\t\t})\n\t\t} else {\n\t\t\theadersList.push([name, value])\n\t\t}\n\t})\n\n\tif (self._mode === 'fetch') {\n\t\tvar signal = null\n\t\tif (capability.abortController) {\n\t\t\tvar controller = new AbortController()\n\t\t\tsignal = controller.signal\n\t\t\tself._fetchAbortController = controller\n\n\t\t\tif ('requestTimeout' in opts && opts.requestTimeout !== 0) {\n\t\t\t\tself._fetchTimer = global.setTimeout(function () {\n\t\t\t\t\tself.emit('requestTimeout')\n\t\t\t\t\tif (self._fetchAbortController)\n\t\t\t\t\t\tself._fetchAbortController.abort()\n\t\t\t\t}, opts.requestTimeout)\n\t\t\t}\n\t\t}\n\n\t\tglobal.fetch(self._opts.url, {\n\t\t\tmethod: self._opts.method,\n\t\t\theaders: headersList,\n\t\t\tbody: body || undefined,\n\t\t\tmode: 'cors',\n\t\t\tcredentials: opts.withCredentials ? 'include' : 'same-origin',\n\t\t\tsignal: signal\n\t\t}).then(function (response) {\n\t\t\tself._fetchResponse = response\n\t\t\tself._resetTimers(false)\n\t\t\tself._connect()\n\t\t}, function (reason) {\n\t\t\tself._resetTimers(true)\n\t\t\tif (!self._destroyed)\n\t\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\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\tif ('requestTimeout' in opts) {\n\t\t\txhr.timeout = opts.requestTimeout\n\t\t\txhr.ontimeout = function () {\n\t\t\t\tself.emit('requestTimeout')\n\t\t\t}\n\t\t}\n\n\t\theadersList.forEach(function (header) {\n\t\t\txhr.setRequestHeader(header[0], header[1])\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._resetTimers(true)\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\tself._resetTimers(false)\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(self._resetTimers.bind(self))\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, self._resetTimers.bind(self))\n\tself._response.on('error', function(err) {\n\t\tself.emit('error', err)\n\t})\n\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._resetTimers = function (done) {\n\tvar self = this\n\n\tglobal.clearTimeout(self._socketTimer)\n\tself._socketTimer = null\n\n\tif (done) {\n\t\tglobal.clearTimeout(self._fetchTimer)\n\t\tself._fetchTimer = null\n\t} else if (self._socketTimeout) {\n\t\tself._socketTimer = global.setTimeout(function () {\n\t\t\tself.emit('timeout')\n\t\t}, self._socketTimeout)\n\t}\n}\n\nClientRequest.prototype.abort = ClientRequest.prototype.destroy = function (err) {\n\tvar self = this\n\tself._destroyed = true\n\tself._resetTimers(true)\n\tif (self._response)\n\t\tself._response._destroyed = true\n\tif (self._xhr)\n\t\tself._xhr.abort()\n\telse if (self._fetchAbortController)\n\t\tself._fetchAbortController.abort()\n\n\tif (err)\n\t\tself.emit('error', err)\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.setTimeout = function (timeout, cb) {\n\tvar self = this\n\n\tif (cb)\n\t\tself.once('timeout', cb)\n\n\tself._socketTimeout = timeout\n\tself._resetTimers(false)\n}\n\nClientRequest.prototype.flushHeaders = 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'via'\n]\n","var capability = require('./capability')\nvar inherits = require('inherits')\nvar stream = require('readable-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, resetTimers) {\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.url = response.url\n\t\tself.statusCode = response.status\n\t\tself.statusMessage = response.statusText\n\t\t\n\t\tresponse.headers.forEach(function (header, key){\n\t\t\tself.headers[key.toLowerCase()] = header\n\t\t\tself.rawHeaders.push(key, header)\n\t\t})\n\n\t\tif (capability.writableStream) {\n\t\t\tvar writable = new WritableStream({\n\t\t\t\twrite: function (chunk) {\n\t\t\t\t\tresetTimers(false)\n\t\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\t\tif (self._destroyed) {\n\t\t\t\t\t\t\treject()\n\t\t\t\t\t\t} else if(self.push(Buffer.from(chunk))) {\n\t\t\t\t\t\t\tresolve()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself._resumeFetch = resolve\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tclose: function () {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.push(null)\n\t\t\t\t},\n\t\t\t\tabort: function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t}\n\t\t\t})\n\n\t\t\ttry {\n\t\t\t\tresponse.body.pipeTo(writable).catch(function (err) {\n\t\t\t\t\tresetTimers(true)\n\t\t\t\t\tif (!self._destroyed)\n\t\t\t\t\t\tself.emit('error', err)\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t} catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this\n\t\t}\n\t\t// fallback for when writableStream or pipeTo aren't available\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\tresetTimers(result.done)\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(Buffer.from(result.value))\n\t\t\t\tread()\n\t\t\t}).catch(function (err) {\n\t\t\t\tresetTimers(true)\n\t\t\t\tif (!self._destroyed)\n\t\t\t\t\tself.emit('error', err)\n\t\t\t})\n\t\t}\n\t\tread()\n\t} else {\n\t\tself._xhr = xhr\n\t\tself._pos = 0\n\n\t\tself.url = xhr.responseURL\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\tvar self = this\n\n\tvar resolve = self._resumeFetch\n\tif (resolve) {\n\t\tself._resumeFetch = null\n\t\tresolve()\n\t}\n}\n\nIncomingMessage.prototype._onXHRProgress = function (resetTimers) {\n\tvar self = this\n\n\tvar xhr = self._xhr\n\n\tvar response = null\n\tswitch (self._mode) {\n\t\tcase 'text':\n\t\t\tresponse = xhr.responseText\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 = Buffer.alloc(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 || !xhr.response)\n\t\t\t\tbreak\n\t\t\tresponse = xhr.response\n\t\t\tself.push(Buffer.from(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(Buffer.from(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(Buffer.from(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\tresetTimers(true)\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\tresetTimers(true)\n\t\tself.push(null)\n\t}\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (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 };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (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}\n","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n\n return NodeError;\n }(Base);\n\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\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// 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'use strict';\n/**/\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n\n for (var key in obj) {\n keys.push(key);\n }\n\n return keys;\n};\n/**/\n\n\nmodule.exports = Duplex;\n\nvar Readable = require('./_stream_readable');\n\nvar Writable = require('./_stream_writable');\n\nrequire('inherits')(Duplex, Readable);\n\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n\n for (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}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n}); // the no-half-open enforcer\n\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return; // no more data can be written.\n // But allow more writes to happen in this tick.\n\n process.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\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// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\nrequire('inherits')(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\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'use strict';\n\nmodule.exports = Readable;\n/**/\n\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n/**/\n\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\n\n\nvar Stream = require('./internal/streams/stream');\n/**/\n\n\nvar Buffer = require('buffer').Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n/**/\n\n\nvar debugUtil = require('util');\n\nvar debug;\n\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\n\nvar BufferList = require('./internal/streams/buffer_list');\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.\n\n\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\n\nrequire('inherits')(Readable, Stream);\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // 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\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // 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\n this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // 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\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; // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n\n this.sync = true; // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n this.paused = true; // Should close be emitted on destroy. Defaults to true.\n\n this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')\n\n this.autoDestroy = !!options.autoDestroy; // has it been destroyed\n\n this.destroyed = false; // 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\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s\n\n this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled\n\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n\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\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside\n // the ReadableState constructor, at least with V8 6.5\n\n var isDuplex = this instanceof Duplex;\n this._readableState = new ReadableState(options, this, isDuplex); // legacy\n\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\n\nReadable.prototype._destroy = function (err, cb) {\n cb(err);\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.\n\n\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n}; // Unshift should *always* be something directly out of read()\n\n\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n debug('readableAddChunk', chunk);\n var state = stream._readableState;\n\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n\n if (er) {\n errorOrDestroy(stream, er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n } else if (state.destroyed) {\n return false;\n } else {\n state.reading = false;\n\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n maybeReadMore(stream, state);\n }\n } // We can push more data if we are below the highWaterMark.\n // Also, if we have no data yet, we can stand some more bytes.\n // This is to work around cases where hwm=0, such as the repl.\n\n\n return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n state.awaitDrain = 0;\n stream.emit('data', chunk);\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 if (state.needReadable) emitReadable(stream);\n }\n\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n }\n\n return er;\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n}; // backwards compatibility.\n\n\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n var decoder = new StringDecoder(enc);\n this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8\n\n this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:\n\n var p = this._readableState.buffer.head;\n var content = '';\n\n while (p !== null) {\n content += decoder.write(p.data);\n p = p.next;\n }\n\n this._readableState.buffer.clear();\n\n if (content !== '') this._readableState.buffer.push(content);\n this._readableState.length = content.length;\n return this;\n}; // Don't raise the hwm > 1GB\n\n\nvar MAX_HWM = 0x40000000;\n\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\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\n return n;\n} // This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\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 } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.\n\n\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false; // 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\n if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || 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); // if we've ended, and we're now clear, then finish it up.\n\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\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 // if we need a readable event, then we need to do some reading.\n\n\n var doRead = state.needReadable;\n debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some\n\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n } // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n\n\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; // if the length is currently zero, then we *need* a readable event.\n\n if (state.length === 0) state.needReadable = true; // call internal read method\n\n this._read(state.highWaterMark);\n\n state.sync = false; // 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\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 = state.length <= state.highWaterMark;\n n = 0;\n } else {\n state.length -= n;\n state.awaitDrain = 0;\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; // If we tried to read() past the EOF, then emit end on the next tick.\n\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n debug('onEofChunk');\n if (state.ended) return;\n\n if (state.decoder) {\n var chunk = state.decoder.end();\n\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n\n state.ended = true;\n\n if (state.sync) {\n // if we are sync, wait until next tick to emit the data.\n // Otherwise we risk emitting data in the flow()\n // the readable code triggers during a read() call\n emitReadable(stream);\n } else {\n // emit 'readable' now to make sure it gets picked up.\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n state.emittedReadable = true;\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.\n\n\nfunction emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}\n\nfunction emitReadable_(stream) {\n var state = stream._readableState;\n debug('emitReadable_', state.destroyed, state.length, state.ended);\n\n if (!state.destroyed && (state.length || state.ended)) {\n stream.emit('readable');\n state.emittedReadable = false;\n } // The stream needs another readable event if\n // 1. It is not flowing, as the flow mechanism will take\n // care of it.\n // 2. It is not ended.\n // 3. It is below the highWaterMark, so we can schedule\n // another readable later.\n\n\n state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n flow(stream);\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.\n\n\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n // Attempt to read more data if we should.\n //\n // The conditions for reading more data are (one of):\n // - Not enough data buffered (state.length < state.highWaterMark). The loop\n // is responsible for filling the buffer with enough data if such data\n // is available. If highWaterMark is 0 and we are not in the flowing mode\n // we should _not_ attempt to buffer any extra data. We'll get more data\n // when the stream consumer calls read() instead.\n // - No data in the buffer, and the stream is in flowing mode. In this mode\n // the loop below is responsible for ensuring read() is called. Failing to\n // call read here would abort the flow and there's no other mechanism for\n // continuing the flow if the stream consumer has just subscribed to the\n // 'data' event.\n //\n // In addition to the above conditions to keep reading data, the following\n // conditions prevent the data from being read:\n // - The stream has ended (state.ended).\n // - There is already a pending 'read' operation (state.reading). This is a\n // case where the the stream has called the implementation defined _read()\n // method, but they are processing the call asynchronously and have _not_\n // called push() with new data. In this case we skip performing more\n // read()s. The execution ends in this method again after the _read() ends\n // up calling push() with more data.\n while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n var len = state.length;\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length) // didn't get any data, stop spinning.\n break;\n }\n\n state.readingMore = false;\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.\n\n\nReadable.prototype._read = function (n) {\n errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\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\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n\n default:\n state.pipes.push(dest);\n break;\n }\n\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\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\n\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n\n function cleanup() {\n debug('cleanup'); // cleanup event handlers once the pipe is broken\n\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', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true; // 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\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n src.on('data', ondata);\n\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n debug('dest.write', ret);\n\n if (ret === false) {\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', state.awaitDrain);\n state.awaitDrain++;\n }\n\n src.pause();\n }\n } // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n\n\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.\n\n\n prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.\n\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n\n dest.once('close', onclose);\n\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n } // tell the dest that it's being piped to\n\n\n dest.emit('pipe', src); // start the flow if it hasn't been started already.\n\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\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 var unpipeInfo = {\n hasUnpiped: false\n }; // if we're not piping anywhere, then do nothing.\n\n if (state.pipesCount === 0) return this; // just one destination. most common case.\n\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 if (!dest) dest = state.pipes; // got a match.\n\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n } // slow case. multiple pipe destinations.\n\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 hasUnpiped: false\n });\n }\n\n return this;\n } // try to find the right one.\n\n\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n}; // set up data events if they are asked for\n// Ensure readable listeners eventually get something\n\n\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n var state = this._readableState;\n\n if (ev === 'data') {\n // update readableListening so that resume() may be a no-op\n // a few lines down. This is needed to support once('readable').\n state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused\n\n if (state.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.flowing = false;\n state.emittedReadable = false;\n debug('on readable', state.length, state.reading);\n\n if (state.length) {\n emitReadable(this);\n } else if (!state.reading) {\n process.nextTick(nReadingNextTick, this);\n }\n }\n }\n\n return res;\n};\n\nReadable.prototype.addListener = Readable.prototype.on;\n\nReadable.prototype.removeListener = function (ev, fn) {\n var res = Stream.prototype.removeListener.call(this, ev, fn);\n\n if (ev === 'readable') {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n\n return res;\n};\n\nReadable.prototype.removeAllListeners = function (ev) {\n var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n\n if (ev === 'readable' || ev === undefined) {\n // We need to check if there is someone still listening to\n // readable and reset the state. However this needs to happen\n // after readable has been emitted but before I/O (nextTick) to\n // support once('readable', fn) cycles. This means that calling\n // resume within the same tick will have no\n // effect.\n process.nextTick(updateReadableListening, this);\n }\n\n return res;\n};\n\nfunction updateReadableListening(self) {\n var state = self._readableState;\n state.readableListening = self.listenerCount('readable') > 0;\n\n if (state.resumeScheduled && !state.paused) {\n // flowing needs to be set to true now, otherwise\n // the upcoming resume will not flow.\n state.flowing = true; // crude way to check if we should resume\n } else if (self.listenerCount('data') > 0) {\n self.resume();\n }\n}\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n} // pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\n\n\nReadable.prototype.resume = function () {\n var state = this._readableState;\n\n if (!state.flowing) {\n debug('resume'); // we flow only if there is no one listening\n // for readable, but we still have to call\n // resume()\n\n state.flowing = !state.readableListening;\n resume(this, state);\n }\n\n state.paused = false;\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n debug('resume', state.reading);\n\n if (!state.reading) {\n stream.read(0);\n }\n\n state.resumeScheduled = false;\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\n if (this._readableState.flowing !== false) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n\n this._readableState.paused = true;\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n\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.\n\n\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode\n\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n\n if (!ret) {\n paused = true;\n stream.pause();\n }\n }); // proxy all the other methods.\n // important when wrapping filters and duplexes.\n\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function methodWrap(method) {\n return function methodWrapReturnFunction() {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n } // proxy certain important events.\n\n\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n } // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n\n\n this._read = function (n) {\n debug('wrapped _read', n);\n\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nif (typeof Symbol === 'function') {\n Readable.prototype[Symbol.asyncIterator] = function () {\n if (createReadableStreamAsyncIterator === undefined) {\n createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');\n }\n\n return createReadableStreamAsyncIterator(this);\n };\n}\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(state) {\n if (this._readableState) {\n this._readableState.flowing = state;\n }\n }\n}); // exposed for testing purposes only.\n\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.length;\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.\n\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\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.first();else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = state.buffer.consume(n, state.decoder);\n }\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n debug('endReadable', state.endEmitted);\n\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift.\n\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the writable side is ready for autoDestroy as well\n var wState = stream._writableState;\n\n if (!wState || wState.autoDestroy && wState.finished) {\n stream.destroy();\n }\n }\n }\n}\n\nif (typeof Symbol === 'function') {\n Readable.from = function (iterable, opts) {\n if (from === undefined) {\n from = require('./internal/streams/from');\n }\n\n return from(Readable, iterable, opts);\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\n return -1;\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// 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'use strict';\n\nmodule.exports = Transform;\n\nvar _require$codes = require('../errors').codes,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\n\nvar Duplex = require('./_stream_duplex');\n\nrequire('inherits')(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n\n if (cb === null) {\n return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n }; // start out asking for a readable event once data is transformed.\n\n this._readableState.needReadable = true; // 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\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n } // When the writable side finishes, then flush out anything remaining.\n\n\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\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.\n\n\nTransform.prototype._transform = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\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\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}; // 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.\n\n\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && !ts.transforming) {\n ts.transforming = true;\n\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\nTransform.prototype._destroy = function (err, cb) {\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data); // TODO(BridgeAR): Write a test for these two error cases\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n\n if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n return stream.push(null);\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// 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'use strict';\n\nmodule.exports = Writable;\n/* */\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n} // It seems a linked list but it is not\n// there will be only 2 of these for each stream\n\n\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\n\n\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n/**/\n\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\n\nvar Stream = require('./internal/streams/stream');\n/**/\n\n\nvar Buffer = require('buffer').Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nvar _require = require('./internal/streams/state'),\n getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = require('../errors').codes,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\n\nrequire('inherits')(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream, isDuplex) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream,\n // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n\n if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // 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\n this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called\n\n this.finalCalled = false; // drain event flag.\n\n this.needDrain = false; // at the start of calling end()\n\n this.ending = false; // when end() has been called, and returned\n\n this.ended = false; // when 'finish' is emitted\n\n this.finished = false; // has it been destroyed\n\n this.destroyed = false; // 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\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode; // 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\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // 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\n this.length = 0; // a flag to see when we're in the middle of a write.\n\n this.writing = false; // when true all writes will be buffered until .uncork() call\n\n this.corked = 0; // 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\n this.sync = true; // 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\n this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)\n\n this.onwrite = function (er) {\n onwrite(stream, er);\n }; // the callback that the user supplies to write(chunk,encoding,cb)\n\n\n this.writecb = null; // the amount that is being written when _write is called.\n\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null; // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n\n this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n\n this.prefinished = false; // True if the error was already emitted and should not be thrown again\n\n this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.\n\n this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')\n\n this.autoDestroy = !!options.autoDestroy; // count buffered requests\n\n this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n\n while (current) {\n out.push(current);\n current = current.next;\n }\n\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})(); // Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\n\n\nvar realHasInstance;\n\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n // Checking for a Stream.Duplex instance is faster here instead of inside\n // the WritableState constructor, at least with V8 6.5\n\n var isDuplex = this instanceof Duplex;\n if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n this._writableState = new WritableState(options, this, isDuplex); // legacy.\n\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n} // Otherwise people can pipe Writable streams, which is just wrong.\n\n\nWritable.prototype.pipe = function () {\n errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb\n\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n} // Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\n\n\nfunction validChunk(stream, state, chunk, cb) {\n var er;\n\n if (chunk === null) {\n er = new ERR_STREAM_NULL_VALUES();\n } else if (typeof chunk !== 'string' && !state.objectMode) {\n er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n }\n\n if (er) {\n errorOrDestroy(stream, er);\n process.nextTick(cb, er);\n return false;\n }\n\n return true;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\n\nWritable.prototype.cork = function () {\n this._writableState.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !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 ERR_UNKNOWN_ENCODING(encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\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.\n\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.\n\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\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 (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else 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\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n process.nextTick(cb, er); // this can emit finish, and it will always happen\n // after error\n\n process.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n errorOrDestroy(stream, er); // this can emit finish, but finish must\n // always follow error\n\n finishMaybe(stream, state);\n }\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 if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n onwriteStateUpdate(state);\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) || stream.destroyed;\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n process.nextTick(afterWrite, stream, state, finished, cb);\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} // 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.\n\n\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it\n\n\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 var count = 0;\n var allBuffers = true;\n\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n\n state.pendingcb++;\n state.lastBufferedRequest = null;\n\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n\n state.bufferedRequestCount = 0;\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 doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--; // 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\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\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); // .end() fully uncorks\n\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n } // ignore unnecessary end() calls.\n\n\n if (!state.ending) endWritable(this, state, cb);\n return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n});\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n\n if (err) {\n errorOrDestroy(stream, err);\n }\n\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function' && !state.destroyed) {\n state.pendingcb++;\n state.finalCalled = true;\n process.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n\n if (need) {\n prefinish(stream, state);\n\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n\n if (state.autoDestroy) {\n // In case of duplex streams we need a way to detect\n // if the readable side is ready for autoDestroy as well\n var rState = stream._readableState;\n\n if (!rState || rState.autoDestroy && rState.endEmitted) {\n stream.destroy();\n }\n }\n }\n }\n\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n\n if (cb) {\n if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n }\n\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n } // reuse the free corkReq.\n\n\n state.corkedRequestsFree.next = corkReq;\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\n\nWritable.prototype._destroy = function (err, cb) {\n cb(err);\n};","'use strict';\n\nvar _Object$setPrototypeO;\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar finished = require('./end-of-stream');\n\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\n\nfunction createIterResult(value, done) {\n return {\n value: value,\n done: done\n };\n}\n\nfunction readAndResolve(iter) {\n var resolve = iter[kLastResolve];\n\n if (resolve !== null) {\n var data = iter[kStream].read(); // we defer if data is null\n // we can be expecting either 'end' or\n // 'error'\n\n if (data !== null) {\n iter[kLastPromise] = null;\n iter[kLastResolve] = null;\n iter[kLastReject] = null;\n resolve(createIterResult(data, false));\n }\n }\n}\n\nfunction onReadable(iter) {\n // we wait for the next tick, because it might\n // emit an error with process.nextTick\n process.nextTick(readAndResolve, iter);\n}\n\nfunction wrapForNext(lastPromise, iter) {\n return function (resolve, reject) {\n lastPromise.then(function () {\n if (iter[kEnded]) {\n resolve(createIterResult(undefined, true));\n return;\n }\n\n iter[kHandlePromise](resolve, reject);\n }, reject);\n };\n}\n\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n get stream() {\n return this[kStream];\n },\n\n next: function next() {\n var _this = this;\n\n // if we have detected an error in the meanwhile\n // reject straight away\n var error = this[kError];\n\n if (error !== null) {\n return Promise.reject(error);\n }\n\n if (this[kEnded]) {\n return Promise.resolve(createIterResult(undefined, true));\n }\n\n if (this[kStream].destroyed) {\n // We need to defer via nextTick because if .destroy(err) is\n // called, the error will be emitted via nextTick, and\n // we cannot guarantee that there is no error lingering around\n // waiting to be emitted.\n return new Promise(function (resolve, reject) {\n process.nextTick(function () {\n if (_this[kError]) {\n reject(_this[kError]);\n } else {\n resolve(createIterResult(undefined, true));\n }\n });\n });\n } // if we have multiple next() calls\n // we will wait for the previous Promise to finish\n // this logic is optimized to support for await loops,\n // where next() is only called once at a time\n\n\n var lastPromise = this[kLastPromise];\n var promise;\n\n if (lastPromise) {\n promise = new Promise(wrapForNext(lastPromise, this));\n } else {\n // fast path needed to support multiple this.push()\n // without triggering the next() queue\n var data = this[kStream].read();\n\n if (data !== null) {\n return Promise.resolve(createIterResult(data, false));\n }\n\n promise = new Promise(this[kHandlePromise]);\n }\n\n this[kLastPromise] = promise;\n return promise;\n }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n var _this2 = this;\n\n // destroy(err, cb) is a private API\n // we can guarantee we have that here, because we control the\n // Readable class this is attached to\n return new Promise(function (resolve, reject) {\n _this2[kStream].destroy(null, function (err) {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(createIterResult(undefined, true));\n });\n });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\n\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n var _Object$create;\n\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n value: stream,\n writable: true\n }), _defineProperty(_Object$create, kLastResolve, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kLastReject, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kError, {\n value: null,\n writable: true\n }), _defineProperty(_Object$create, kEnded, {\n value: stream._readableState.endEmitted,\n writable: true\n }), _defineProperty(_Object$create, kHandlePromise, {\n value: function value(resolve, reject) {\n var data = iterator[kStream].read();\n\n if (data) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(data, false));\n } else {\n iterator[kLastResolve] = resolve;\n iterator[kLastReject] = reject;\n }\n },\n writable: true\n }), _Object$create));\n iterator[kLastPromise] = null;\n finished(stream, function (err) {\n if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise\n // returned by next() and store the error\n\n if (reject !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n reject(err);\n }\n\n iterator[kError] = err;\n return;\n }\n\n var resolve = iterator[kLastResolve];\n\n if (resolve !== null) {\n iterator[kLastPromise] = null;\n iterator[kLastResolve] = null;\n iterator[kLastReject] = null;\n resolve(createIterResult(undefined, true));\n }\n\n iterator[kEnded] = true;\n });\n stream.on('readable', onReadable.bind(null, iterator));\n return iterator;\n};\n\nmodule.exports = createReadableStreamAsyncIterator;","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar _require = require('buffer'),\n Buffer = _require.Buffer;\n\nvar _require2 = require('util'),\n inspect = _require2.inspect;\n\nvar custom = inspect && inspect.custom || 'inspect';\n\nfunction copyBuffer(src, target, offset) {\n Buffer.prototype.copy.call(src, target, offset);\n}\n\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n _createClass(BufferList, [{\n key: \"push\",\n value: function push(v) {\n var entry = {\n data: v,\n next: null\n };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(v) {\n var entry = {\n data: v,\n next: this.head\n };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\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 }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null;\n this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n\n while (p = p.next) {\n ret += s + p.data;\n }\n\n return ret;\n }\n }, {\n key: \"concat\",\n value: function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n\n return ret;\n } // Consumes a specified amount of bytes or characters from the buffered data.\n\n }, {\n key: \"consume\",\n value: function consume(n, hasStrings) {\n var ret;\n\n if (n < this.head.data.length) {\n // `slice` is the same for buffers and strings.\n ret = this.head.data.slice(0, n);\n this.head.data = this.head.data.slice(n);\n } else if (n === this.head.data.length) {\n // First chunk is a perfect match.\n ret = this.shift();\n } else {\n // Result spans more than one buffer.\n ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n }\n\n return ret;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n } // Consumes a specified amount of characters from the buffered data.\n\n }, {\n key: \"_getString\",\n value: function _getString(n) {\n var p = this.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n\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\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = str.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n this.length -= c;\n return ret;\n } // Consumes a specified amount of bytes from the buffered data.\n\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(n) {\n var ret = Buffer.allocUnsafe(n);\n var p = this.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n\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\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) this.head = p.next;else this.head = this.tail = null;\n } else {\n this.head = p;\n p.data = buf.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n this.length -= c;\n return ret;\n } // Make sure the linked list only shows the minimal necessary information.\n\n }, {\n key: custom,\n value: function value(_, options) {\n return inspect(this, _objectSpread({}, options, {\n // Only inspect one level.\n depth: 0,\n // It should not recurse.\n customInspect: false\n }));\n }\n }]);\n\n return BufferList;\n}();","'use strict'; // undocumented cb() API, needed for core, not for public API\n\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err) {\n if (!this._writableState) {\n process.nextTick(emitErrorNT, this, err);\n } else if (!this._writableState.errorEmitted) {\n this._writableState.errorEmitted = true;\n process.nextTick(emitErrorNT, this, err);\n }\n }\n\n return this;\n } // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n } // if this is a duplex stream mark the writable part as destroyed as well\n\n\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n if (!_this._writableState) {\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else if (!_this._writableState.errorEmitted) {\n _this._writableState.errorEmitted = true;\n process.nextTick(emitErrorAndCloseNT, _this, err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n } else if (cb) {\n process.nextTick(emitCloseNT, _this);\n cb(err);\n } else {\n process.nextTick(emitCloseNT, _this);\n }\n });\n\n return this;\n}\n\nfunction emitErrorAndCloseNT(self, err) {\n emitErrorNT(self, err);\n emitCloseNT(self);\n}\n\nfunction emitCloseNT(self) {\n if (self._writableState && !self._writableState.emitClose) return;\n if (self._readableState && !self._readableState.emitClose) return;\n self.emit('close');\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finalCalled = false;\n this._writableState.prefinished = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nfunction errorOrDestroy(stream, err) {\n // We have tests that rely on errors being emitted\n // in the same tick, so changing this is semver major.\n // For now when you opt-in to autoDestroy we allow\n // the error to be emitted nextTick. In a future\n // semver major update we should change the default to this.\n var rState = stream._readableState;\n var wState = stream._writableState;\n if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy,\n errorOrDestroy: errorOrDestroy\n};","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\n\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n callback.apply(this, args);\n };\n}\n\nfunction noop() {}\n\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\n\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n\n var writableEnded = stream._writableState && stream._writableState.finished;\n\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n\n var onclose = function onclose() {\n var err;\n\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\n\nmodule.exports = eos;","module.exports = function () {\n throw new Error('Readable.from is not available in the browser')\n};\n","// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n'use strict';\n\nvar eos;\n\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n callback.apply(void 0, arguments);\n };\n}\n\nvar _require$codes = require('../../../errors').codes,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\n\nfunction noop(err) {\n // Rethrow the error if it exists to avoid swallowing it\n if (err) throw err;\n}\n\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\n\nfunction destroyer(stream, reading, writing, callback) {\n callback = once(callback);\n var closed = false;\n stream.on('close', function () {\n closed = true;\n });\n if (eos === undefined) eos = require('./end-of-stream');\n eos(stream, {\n readable: reading,\n writable: writing\n }, function (err) {\n if (err) return callback(err);\n closed = true;\n callback();\n });\n var destroyed = false;\n return function (err) {\n if (closed) return;\n if (destroyed) return;\n destroyed = true; // request.destroy just do .end - .abort is what we want\n\n if (isRequest(stream)) return stream.abort();\n if (typeof stream.destroy === 'function') return stream.destroy();\n callback(err || new ERR_STREAM_DESTROYED('pipe'));\n };\n}\n\nfunction call(fn) {\n fn();\n}\n\nfunction pipe(from, to) {\n return from.pipe(to);\n}\n\nfunction popCallback(streams) {\n if (!streams.length) return noop;\n if (typeof streams[streams.length - 1] !== 'function') return noop;\n return streams.pop();\n}\n\nfunction pipeline() {\n for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n streams[_key] = arguments[_key];\n }\n\n var callback = popCallback(streams);\n if (Array.isArray(streams[0])) streams = streams[0];\n\n if (streams.length < 2) {\n throw new ERR_MISSING_ARGS('streams');\n }\n\n var error;\n var destroys = streams.map(function (stream, i) {\n var reading = i < streams.length - 1;\n var writing = i > 0;\n return destroyer(stream, reading, writing, function (err) {\n if (!error) error = err;\n if (err) destroys.forEach(call);\n if (reading) return;\n destroys.forEach(call);\n callback(error);\n });\n });\n return streams.reduce(pipe);\n}\n\nmodule.exports = pipeline;","'use strict';\n\nvar ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;\n\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\n\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n\n if (hwm != null) {\n if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n var name = isDuplex ? duplexKey : 'highWaterMark';\n throw new ERR_INVALID_OPT_VALUE(name, hwm);\n }\n\n return Math.floor(hwm);\n } // Default value\n\n\n return state.objectMode ? 16 : 16 * 1024;\n}\n\nmodule.exports = {\n getHighWaterMark: getHighWaterMark\n};","module.exports = require('events').EventEmitter;\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.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');\nexports.finished = require('./lib/internal/streams/end-of-stream.js');\nexports.pipeline = require('./lib/internal/streams/pipeline.js');\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\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/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + 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':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\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.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\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","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}","function Agent() {\n this._defaults = [];\n}\n\n[\n 'use',\n 'on',\n 'once',\n 'set',\n 'query',\n 'type',\n 'accept',\n 'auth',\n 'withCredentials',\n 'sortQuery',\n 'retry',\n 'ok',\n 'redirects',\n 'timeout',\n 'buffer',\n 'serialize',\n 'parse',\n 'ca',\n 'key',\n 'pfx',\n 'cert',\n 'disableTLSCerts'\n].forEach(fn => {\n // Default setting for all requests from this agent\n Agent.prototype[fn] = function(...args) {\n this._defaults.push({ fn, args });\n return this;\n };\n});\n\nAgent.prototype._setDefaults = function(req) {\n this._defaults.forEach(def => {\n req[def.fn](...def.args);\n });\n};\n\nmodule.exports = Agent;\n","/**\n * Root reference for iframes.\n */\n\nlet root;\nif (typeof window !== 'undefined') {\n // Browser window\n root = window;\n} else if (typeof self === 'undefined') {\n // Other environments\n console.warn(\n 'Using browser-only version of superagent in non-browser environment'\n );\n root = this;\n} else {\n // Web Worker\n root = self;\n}\n\nconst Emitter = require('component-emitter');\nconst safeStringify = require('fast-safe-stringify');\nconst RequestBase = require('./request-base');\nconst isObject = require('./is-object');\nconst ResponseBase = require('./response-base');\nconst Agent = require('./agent-base');\n\n/**\n * Noop.\n */\n\nfunction noop() {}\n\n/**\n * Expose `request`.\n */\n\nmodule.exports = function(method, url) {\n // callback\n if (typeof url === 'function') {\n return new exports.Request('GET', method).end(url);\n }\n\n // url first\n if (arguments.length === 1) {\n return new exports.Request('GET', method);\n }\n\n return new exports.Request(method, url);\n};\n\nexports = module.exports;\n\nconst request = exports;\n\nexports.Request = Request;\n\n/**\n * Determine XHR.\n */\n\nrequest.getXHR = () => {\n if (\n root.XMLHttpRequest &&\n (!root.location ||\n root.location.protocol !== 'file:' ||\n !root.ActiveXObject)\n ) {\n return new XMLHttpRequest();\n }\n\n try {\n return new ActiveXObject('Microsoft.XMLHTTP');\n } catch {}\n\n try {\n return new ActiveXObject('Msxml2.XMLHTTP.6.0');\n } catch {}\n\n try {\n return new ActiveXObject('Msxml2.XMLHTTP.3.0');\n } catch {}\n\n try {\n return new ActiveXObject('Msxml2.XMLHTTP');\n } catch {}\n\n throw new Error('Browser-only version 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\nconst trim = ''.trim ? s => s.trim() : s => 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 const pairs = [];\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key))\n pushEncodedKeyValuePair(pairs, key, obj[key]);\n }\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 === undefined) return;\n if (val === null) {\n pairs.push(encodeURIComponent(key));\n return;\n }\n\n if (Array.isArray(val)) {\n val.forEach(v => {\n pushEncodedKeyValuePair(pairs, key, v);\n });\n } else if (isObject(val)) {\n for (const subkey in val) {\n if (Object.prototype.hasOwnProperty.call(val, subkey))\n pushEncodedKeyValuePair(pairs, `${key}[${subkey}]`, val[subkey]);\n }\n } else {\n pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(val));\n }\n}\n\n/**\n * Expose serialization method.\n */\n\nrequest.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 const obj = {};\n const pairs = str.split('&');\n let pair;\n let pos;\n\n for (let 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))] = decodeURIComponent(\n pair.slice(pos + 1)\n );\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: 'text/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\nrequest.serialize = {\n 'application/x-www-form-urlencoded': serialize,\n 'application/json': safeStringify\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 const lines = str.split(/\\r?\\n/);\n const fields = {};\n let index;\n let line;\n let field;\n let val;\n\n for (let i = 0, len = lines.length; i < len; ++i) {\n line = lines[i];\n index = line.indexOf(':');\n if (index === -1) {\n // could be empty line, just skip it\n continue;\n }\n\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 // should match /json or +json\n // but not /json-seq\n return /[/+]json($|[^-\\w])/.test(mime);\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) {\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 =\n (this.req.method !== 'HEAD' &&\n (this.xhr.responseType === '' || this.xhr.responseType === 'text')) ||\n typeof this.xhr.responseType === 'undefined'\n ? this.xhr.responseText\n : null;\n this.statusText = this.req.xhr.statusText;\n let { status } = this.xhr;\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 this._setStatusProperties(status);\n this.headers = parseHeader(this.xhr.getAllResponseHeaders());\n this.header = this.headers;\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\n if (this.text === null && req._responseType) {\n this.body = this.xhr.response;\n } else {\n this.body =\n this.req.method === 'HEAD'\n ? null\n : this._parseBody(this.text ? this.text : this.xhr.response);\n }\n}\n\n// eslint-disable-next-line new-cap\nResponseBase(Response.prototype);\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 let parse = request.parse[this.type];\n if (this.req._parser) {\n return this.req._parser(this, str);\n }\n\n if (!parse && isJSON(this.type)) {\n parse = request.parse['application/json'];\n }\n\n return parse && str && (str.length > 0 || str instanceof Object)\n ? parse(str)\n : null;\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 const { req } = this;\n const { method } = req;\n const { url } = req;\n\n const msg = `cannot ${method} ${url} (${this.status})`;\n const 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 const 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', () => {\n let err = null;\n let res = null;\n\n try {\n res = new Response(self);\n } catch (err_) {\n err = new Error('Parser is unable to parse the response');\n err.parse = true;\n err.original = err_;\n // issue #675: return the raw response if the response parsing fails\n if (self.xhr) {\n // ie9 doesn't have 'response' property\n err.rawResponse =\n typeof self.xhr.responseType === 'undefined'\n ? self.xhr.responseText\n : self.xhr.response;\n // issue #876: return the http status code if the response parsing fails\n err.status = self.xhr.status ? self.xhr.status : null;\n err.statusCode = err.status; // backwards-compat only\n } else {\n err.rawResponse = null;\n err.status = null;\n }\n\n return self.callback(err);\n }\n\n self.emit('response', res);\n\n let new_err;\n try {\n if (!self._isResponseOK(res)) {\n new_err = new Error(res.statusText || 'Unsuccessful HTTP response');\n }\n } catch (err_) {\n new_err = err_; // ok() callback can throw\n }\n\n // #1000 don't catch errors from the callback to avoid double calling it\n if (new_err) {\n new_err.original = err;\n new_err.response = res;\n new_err.status = res.status;\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\n// eslint-disable-next-line new-cap\nEmitter(Request.prototype);\n// eslint-disable-next-line new-cap\nRequestBase(Request.prototype);\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 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] optional in case of using 'bearer' as type\n * @param {Object} options with 'type' property 'auto', 'basic' or 'bearer' (default 'basic')\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.auth = function(user, pass, options) {\n if (arguments.length === 1) pass = '';\n if (typeof pass === 'object' && pass !== null) {\n // pass is optional and can be replaced with options\n options = pass;\n pass = '';\n }\n\n if (!options) {\n options = {\n type: typeof btoa === 'function' ? 'basic' : 'auto'\n };\n }\n\n const encoder = string => {\n if (typeof btoa === 'function') {\n return btoa(string);\n }\n\n throw new Error('Cannot use basic auth, btoa is not a function');\n };\n\n return this._auth(user, pass, options, encoder);\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 (typeof val !== 'string') 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 `options` (or 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|Object} options\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.attach = function(field, file, options) {\n if (file) {\n if (this._data) {\n throw new Error(\"superagent can't mix .send() and .attach()\");\n }\n\n this._getFormData().append(field, file, options || file.name);\n }\n\n return this;\n};\n\nRequest.prototype._getFormData = function() {\n if (!this._formData) {\n this._formData = new root.FormData();\n }\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 if (this._shouldRetry(err, res)) {\n return this._retry();\n }\n\n const fn = this._callback;\n this.clearTimeout();\n\n if (err) {\n if (this._maxRetries) err.retries = this._retries - 1;\n this.emit('error', err);\n }\n\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 const err = new Error(\n '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 );\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// This only warns, because the request is still likely to work\nRequest.prototype.agent = function() {\n console.warn('This is not supported in browser version of superagent');\n return this;\n};\n\nRequest.prototype.buffer = Request.prototype.ca;\nRequest.prototype.ca = Request.prototype.agent;\n\n// This throws, because it can't send/receive data as expected\nRequest.prototype.write = () => {\n throw new Error(\n 'Streaming is not supported in browser version of superagent'\n );\n};\n\nRequest.prototype.pipe = Request.prototype.write;\n\n/**\n * Check if `obj` is a host object,\n * we don't want to serialize these :)\n *\n * @param {Object} obj host object\n * @return {Boolean} is a host object\n * @api private\n */\nRequest.prototype._isHost = function(obj) {\n // Native objects stringify to [object File], [object Blob], [object FormData], etc.\n return (\n obj &&\n typeof obj === 'object' &&\n !Array.isArray(obj) &&\n Object.prototype.toString.call(obj) !== '[object Object]'\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 if (this._endCalled) {\n console.warn(\n 'Warning: .end() was called twice. This is not supported in superagent'\n );\n }\n\n this._endCalled = true;\n\n // store callback\n this._callback = fn || noop;\n\n // querystring\n this._finalizeQueryString();\n\n this._end();\n};\n\nRequest.prototype._setUploadTimeout = function() {\n const self = this;\n\n // upload timeout it's wokrs only if deadline timeout is off\n if (this._uploadTimeout && !this._uploadTimeoutTimer) {\n this._uploadTimeoutTimer = setTimeout(() => {\n self._timeoutError(\n 'Upload timeout of ',\n self._uploadTimeout,\n 'ETIMEDOUT'\n );\n }, this._uploadTimeout);\n }\n};\n\n// eslint-disable-next-line complexity\nRequest.prototype._end = function() {\n if (this._aborted)\n return this.callback(\n new Error('The request has been aborted even before .end() was called')\n );\n\n const self = this;\n this.xhr = request.getXHR();\n const { xhr } = this;\n let data = this._formData || this._data;\n\n this._setTimeouts();\n\n // state change\n xhr.onreadystatechange = () => {\n const { readyState } = xhr;\n if (readyState >= 2 && self._responseTimeoutTimer) {\n clearTimeout(self._responseTimeoutTimer);\n }\n\n if (readyState !== 4) {\n return;\n }\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 let status;\n try {\n status = xhr.status;\n } catch {\n status = 0;\n }\n\n if (!status) {\n if (self.timedout || self._aborted) return;\n return self.crossDomainError();\n }\n\n self.emit('end');\n };\n\n // progress\n const handleProgress = (direction, e) => {\n if (e.total > 0) {\n e.percent = (e.loaded / e.total) * 100;\n\n if (e.percent === 100) {\n clearTimeout(self._uploadTimeoutTimer);\n }\n }\n\n e.direction = direction;\n self.emit('progress', e);\n };\n\n if (this.hasListeners('progress')) {\n try {\n xhr.addEventListener('progress', handleProgress.bind(null, 'download'));\n if (xhr.upload) {\n xhr.upload.addEventListener(\n 'progress',\n handleProgress.bind(null, 'upload')\n );\n }\n } catch {\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\n if (xhr.upload) {\n this._setUploadTimeout();\n }\n\n // initiate request\n try {\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 } catch (err) {\n // see #1149\n return this.callback(err);\n }\n\n // CORS\n if (this._withCredentials) xhr.withCredentials = true;\n\n // body\n if (\n !this._formData &&\n this.method !== 'GET' &&\n this.method !== 'HEAD' &&\n typeof data !== 'string' &&\n !this._isHost(data)\n ) {\n // serialize stuff\n const contentType = this._header['content-type'];\n let serialize =\n this._serializer ||\n request.serialize[contentType ? contentType.split(';')[0] : ''];\n if (!serialize && isJSON(contentType)) {\n serialize = request.serialize['application/json'];\n }\n\n if (serialize) data = serialize(data);\n }\n\n // set header fields\n for (const field in this.header) {\n if (this.header[field] === null) continue;\n\n if (Object.prototype.hasOwnProperty.call(this.header, field))\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' ? null : data);\n};\n\nrequest.agent = () => new Agent();\n\n['GET', 'POST', 'OPTIONS', 'PATCH', 'PUT', 'DELETE'].forEach(method => {\n Agent.prototype[method.toLowerCase()] = function(url, fn) {\n const req = new request.Request(method, url);\n this._setDefaults(req);\n if (fn) {\n req.end(fn);\n }\n\n return req;\n };\n});\n\nAgent.prototype.del = Agent.prototype.delete;\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 = (url, data, fn) => {\n const req = request('GET', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\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 = (url, data, fn) => {\n const req = request('HEAD', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\n if (data) req.query(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 = (url, data, fn) => {\n const req = request('OPTIONS', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * DELETE `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\nfunction del(url, data, fn) {\n const req = request('DELETE', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\n if (data) req.send(data);\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 = (url, data, fn) => {\n const req = request('PATCH', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\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 = (url, data, fn) => {\n const req = request('POST', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\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 = (url, data, fn) => {\n const req = request('PUT', url);\n if (typeof data === 'function') {\n fn = data;\n data = null;\n }\n\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\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 obj !== null && typeof obj === 'object';\n}\n\nmodule.exports = isObject;\n","/**\n * Module of mixed-in functions shared between node and client code\n */\nconst isObject = require('./is-object');\n\n/**\n * Expose `RequestBase`.\n */\n\nmodule.exports = RequestBase;\n\n/**\n * Initialize a new `RequestBase`.\n *\n * @api public\n */\n\nfunction RequestBase(obj) {\n if (obj) return mixin(obj);\n}\n\n/**\n * Mixin the prototype properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (const key in RequestBase.prototype) {\n if (Object.prototype.hasOwnProperty.call(RequestBase.prototype, key))\n obj[key] = RequestBase.prototype[key];\n }\n\n return obj;\n}\n\n/**\n * Clear previous timeout.\n *\n * @return {Request} for chaining\n * @api public\n */\n\nRequestBase.prototype.clearTimeout = function() {\n clearTimeout(this._timer);\n clearTimeout(this._responseTimeoutTimer);\n clearTimeout(this._uploadTimeoutTimer);\n delete this._timer;\n delete this._responseTimeoutTimer;\n delete this._uploadTimeoutTimer;\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\nRequestBase.prototype.parse = function(fn) {\n this._parser = fn;\n return this;\n};\n\n/**\n * Set format of binary response body.\n * In browser valid formats are 'blob' and 'arraybuffer',\n * which return Blob and ArrayBuffer, respectively.\n *\n * In Node all values result in Buffer.\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\nRequestBase.prototype.responseType = function(val) {\n this._responseType = val;\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\nRequestBase.prototype.serialize = function(fn) {\n this._serializer = fn;\n return this;\n};\n\n/**\n * Set timeouts.\n *\n * - response timeout is time between sending request and receiving the first byte of the response. Includes DNS and connection time.\n * - deadline is the time from start of the request to receiving response body in full. If the deadline is too short large files may not load at all on slow connections.\n * - upload is the time since last bit of data was sent or received. This timeout works only if deadline timeout is off\n *\n * Value of 0 or false means no timeout.\n *\n * @param {Number|Object} ms or {response, deadline}\n * @return {Request} for chaining\n * @api public\n */\n\nRequestBase.prototype.timeout = function(options) {\n if (!options || typeof options !== 'object') {\n this._timeout = options;\n this._responseTimeout = 0;\n this._uploadTimeout = 0;\n return this;\n }\n\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option)) {\n switch (option) {\n case 'deadline':\n this._timeout = options.deadline;\n break;\n case 'response':\n this._responseTimeout = options.response;\n break;\n case 'upload':\n this._uploadTimeout = options.upload;\n break;\n default:\n console.warn('Unknown timeout option', option);\n }\n }\n }\n\n return this;\n};\n\n/**\n * Set number of retry attempts on error.\n *\n * Failed requests will be retried 'count' times if timeout or err.code >= 500.\n *\n * @param {Number} count\n * @param {Function} [fn]\n * @return {Request} for chaining\n * @api public\n */\n\nRequestBase.prototype.retry = function(count, fn) {\n // Default to 1 if no count passed or true\n if (arguments.length === 0 || count === true) count = 1;\n if (count <= 0) count = 0;\n this._maxRetries = count;\n this._retries = 0;\n this._retryCallback = fn;\n return this;\n};\n\nconst ERROR_CODES = ['ECONNRESET', 'ETIMEDOUT', 'EADDRINFO', 'ESOCKETTIMEDOUT'];\n\n/**\n * Determine if a request should be retried.\n * (Borrowed from segmentio/superagent-retry)\n *\n * @param {Error} err an error\n * @param {Response} [res] response\n * @returns {Boolean} if segment should be retried\n */\nRequestBase.prototype._shouldRetry = function(err, res) {\n if (!this._maxRetries || this._retries++ >= this._maxRetries) {\n return false;\n }\n\n if (this._retryCallback) {\n try {\n const override = this._retryCallback(err, res);\n if (override === true) return true;\n if (override === false) return false;\n // undefined falls back to defaults\n } catch (err_) {\n console.error(err_);\n }\n }\n\n if (res && res.status && res.status >= 500 && res.status !== 501) return true;\n if (err) {\n if (err.code && ERROR_CODES.includes(err.code)) return true;\n // Superagent timeout\n if (err.timeout && err.code === 'ECONNABORTED') return true;\n if (err.crossDomain) return true;\n }\n\n return false;\n};\n\n/**\n * Retry request\n *\n * @return {Request} for chaining\n * @api private\n */\n\nRequestBase.prototype._retry = function() {\n this.clearTimeout();\n\n // node\n if (this.req) {\n this.req = null;\n this.req = this.request();\n }\n\n this._aborted = false;\n this.timedout = false;\n\n return this._end();\n};\n\n/**\n * Promise support\n *\n * @param {Function} resolve\n * @param {Function} [reject]\n * @return {Request}\n */\n\nRequestBase.prototype.then = function(resolve, reject) {\n if (!this._fullfilledPromise) {\n const self = this;\n if (this._endCalled) {\n console.warn(\n 'Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises'\n );\n }\n\n this._fullfilledPromise = new Promise((resolve, reject) => {\n self.on('abort', () => {\n const err = new Error('Aborted');\n err.code = 'ABORTED';\n err.status = this.status;\n err.method = this.method;\n err.url = this.url;\n reject(err);\n });\n self.end((err, res) => {\n if (err) reject(err);\n else resolve(res);\n });\n });\n }\n\n return this._fullfilledPromise.then(resolve, reject);\n};\n\nRequestBase.prototype.catch = function(cb) {\n return this.then(undefined, cb);\n};\n\n/**\n * Allow for extension\n */\n\nRequestBase.prototype.use = function(fn) {\n fn(this);\n return this;\n};\n\nRequestBase.prototype.ok = function(cb) {\n if (typeof cb !== 'function') throw new Error('Callback required');\n this._okCallback = cb;\n return this;\n};\n\nRequestBase.prototype._isResponseOK = function(res) {\n if (!res) {\n return false;\n }\n\n if (this._okCallback) {\n return this._okCallback(res);\n }\n\n return res.status >= 200 && res.status < 300;\n};\n\n/**\n * Get request header `field`.\n * Case-insensitive.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nRequestBase.prototype.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\nRequestBase.prototype.getHeader = RequestBase.prototype.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\nRequestBase.prototype.set = function(field, val) {\n if (isObject(field)) {\n for (const key in field) {\n if (Object.prototype.hasOwnProperty.call(field, key))\n this.set(key, field[key]);\n }\n\n return this;\n }\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 field name\n */\nRequestBase.prototype.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`, or multiple fields with one object\n * for \"multipart/form-data\" request bodies.\n *\n * ``` js\n * request.post('/upload')\n * .field('foo', 'bar')\n * .end(callback);\n *\n * request.post('/upload')\n * .field({ foo: 'bar', baz: 'qux' })\n * .end(callback);\n * ```\n *\n * @param {String|Object} name name of field\n * @param {String|Blob|File|Buffer|fs.ReadStream} val value of field\n * @return {Request} for chaining\n * @api public\n */\nRequestBase.prototype.field = function(name, val) {\n // name should be either a string or an object.\n if (name === null || undefined === name) {\n throw new Error('.field(name, val) name can not be empty');\n }\n\n if (this._data) {\n throw new Error(\n \".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()\"\n );\n }\n\n if (isObject(name)) {\n for (const key in name) {\n if (Object.prototype.hasOwnProperty.call(name, key))\n this.field(key, name[key]);\n }\n\n return this;\n }\n\n if (Array.isArray(val)) {\n for (const i in val) {\n if (Object.prototype.hasOwnProperty.call(val, i))\n this.field(name, val[i]);\n }\n\n return this;\n }\n\n // val should be defined now\n if (val === null || undefined === val) {\n throw new Error('.field(name, val) val can not be empty');\n }\n\n if (typeof val === 'boolean') {\n val = String(val);\n }\n\n this._getFormData().append(name, val);\n return this;\n};\n\n/**\n * Abort the request, and clear potential timeout.\n *\n * @return {Request} request\n * @api public\n */\nRequestBase.prototype.abort = function() {\n if (this._aborted) {\n return this;\n }\n\n this._aborted = true;\n if (this.xhr) this.xhr.abort(); // browser\n if (this.req) this.req.abort(); // node\n this.clearTimeout();\n this.emit('abort');\n return this;\n};\n\nRequestBase.prototype._auth = function(user, pass, options, base64Encoder) {\n switch (options.type) {\n case 'basic':\n this.set('Authorization', `Basic ${base64Encoder(`${user}:${pass}`)}`);\n break;\n\n case 'auto':\n this.username = user;\n this.password = pass;\n break;\n\n case 'bearer': // usage would be .auth(accessToken, { type: 'bearer' })\n this.set('Authorization', `Bearer ${user}`);\n break;\n default:\n break;\n }\n\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\nRequestBase.prototype.withCredentials = function(on) {\n // This is browser-only functionality. Node side is no-op.\n if (on === undefined) on = true;\n this._withCredentials = on;\n return this;\n};\n\n/**\n * Set the max redirects to `n`. Does nothing in browser XHR implementation.\n *\n * @param {Number} n\n * @return {Request} for chaining\n * @api public\n */\n\nRequestBase.prototype.redirects = function(n) {\n this._maxRedirects = n;\n return this;\n};\n\n/**\n * Maximum size of buffered response body, in bytes. Counts uncompressed size.\n * Default 200MB.\n *\n * @param {Number} n number of bytes\n * @return {Request} for chaining\n */\nRequestBase.prototype.maxResponseSize = function(n) {\n if (typeof n !== 'number') {\n throw new TypeError('Invalid argument');\n }\n\n this._maxResponseSize = 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\nRequestBase.prototype.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 * 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\n// eslint-disable-next-line complexity\nRequestBase.prototype.send = function(data) {\n const isObj = isObject(data);\n let type = this._header['content-type'];\n\n if (this._formData) {\n throw new Error(\n \".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()\"\n );\n }\n\n if (isObj && !this._data) {\n if (Array.isArray(data)) {\n this._data = [];\n } else if (!this._isHost(data)) {\n this._data = {};\n }\n } else if (data && this._data && this._isHost(this._data)) {\n throw new Error(\"Can't merge these send calls\");\n }\n\n // merge\n if (isObj && isObject(this._data)) {\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key))\n this._data[key] = data[key];\n }\n } else if (typeof data === 'string') {\n // default to x-www-form-urlencoded\n if (!type) this.type('form');\n type = this._header['content-type'];\n if (type === 'application/x-www-form-urlencoded') {\n this._data = this._data ? `${this._data}&${data}` : data;\n } else {\n this._data = (this._data || '') + data;\n }\n } else {\n this._data = data;\n }\n\n if (!isObj || this._isHost(data)) {\n return this;\n }\n\n // default to json\n if (!type) this.type('json');\n return this;\n};\n\n/**\n * Sort `querystring` by the sort function\n *\n *\n * Examples:\n *\n * // default order\n * request.get('/user')\n * .query('name=Nick')\n * .query('search=Manny')\n * .sortQuery()\n * .end(callback)\n *\n * // customized sort function\n * request.get('/user')\n * .query('name=Nick')\n * .query('search=Manny')\n * .sortQuery(function(a, b){\n * return a.length - b.length;\n * })\n * .end(callback)\n *\n *\n * @param {Function} sort\n * @return {Request} for chaining\n * @api public\n */\n\nRequestBase.prototype.sortQuery = function(sort) {\n // _sort default to true but otherwise can be a function or boolean\n this._sort = typeof sort === 'undefined' ? true : sort;\n return this;\n};\n\n/**\n * Compose querystring to append to req.url\n *\n * @api private\n */\nRequestBase.prototype._finalizeQueryString = function() {\n const query = this._query.join('&');\n if (query) {\n this.url += (this.url.includes('?') ? '&' : '?') + query;\n }\n\n this._query.length = 0; // Makes the call idempotent\n\n if (this._sort) {\n const index = this.url.indexOf('?');\n if (index >= 0) {\n const queryArr = this.url.slice(index + 1).split('&');\n if (typeof this._sort === 'function') {\n queryArr.sort(this._sort);\n } else {\n queryArr.sort();\n }\n\n this.url = this.url.slice(0, index) + '?' + queryArr.join('&');\n }\n }\n};\n\n// For backwards compat only\nRequestBase.prototype._appendQueryString = () => {\n console.warn('Unsupported');\n};\n\n/**\n * Invoke callback with timeout error.\n *\n * @api private\n */\n\nRequestBase.prototype._timeoutError = function(reason, timeout, errno) {\n if (this._aborted) {\n return;\n }\n\n const err = new Error(`${reason + timeout}ms exceeded`);\n err.timeout = timeout;\n err.code = 'ECONNABORTED';\n err.errno = errno;\n this.timedout = true;\n this.abort();\n this.callback(err);\n};\n\nRequestBase.prototype._setTimeouts = function() {\n const self = this;\n\n // deadline\n if (this._timeout && !this._timer) {\n this._timer = setTimeout(() => {\n self._timeoutError('Timeout of ', self._timeout, 'ETIME');\n }, this._timeout);\n }\n\n // response timeout\n if (this._responseTimeout && !this._responseTimeoutTimer) {\n this._responseTimeoutTimer = setTimeout(() => {\n self._timeoutError(\n 'Response timeout of ',\n self._responseTimeout,\n 'ETIMEDOUT'\n );\n }, this._responseTimeout);\n }\n};\n","/**\n * Module dependencies.\n */\n\nconst utils = require('./utils');\n\n/**\n * Expose `ResponseBase`.\n */\n\nmodule.exports = ResponseBase;\n\n/**\n * Initialize a new `ResponseBase`.\n *\n * @api public\n */\n\nfunction ResponseBase(obj) {\n if (obj) return mixin(obj);\n}\n\n/**\n * Mixin the prototype properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (const key in ResponseBase.prototype) {\n if (Object.prototype.hasOwnProperty.call(ResponseBase.prototype, key))\n obj[key] = ResponseBase.prototype[key];\n }\n\n return obj;\n}\n\n/**\n * Get case-insensitive `field` value.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nResponseBase.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\nResponseBase.prototype._setHeaderProperties = function(header) {\n // TODO: moar!\n // TODO: make this a util\n\n // content-type\n const ct = header['content-type'] || '';\n this.type = utils.type(ct);\n\n // params\n const params = utils.params(ct);\n for (const key in params) {\n if (Object.prototype.hasOwnProperty.call(params, key))\n this[key] = params[key];\n }\n\n this.links = {};\n\n // links\n try {\n if (header.link) {\n this.links = utils.parseLinks(header.link);\n }\n } catch {\n // ignore\n }\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\nResponseBase.prototype._setStatusProperties = function(status) {\n const type = (status / 100) | 0;\n\n // status / class\n this.statusCode = status;\n this.status = this.statusCode;\n this.statusType = type;\n\n // basics\n this.info = type === 1;\n this.ok = type === 2;\n this.redirect = type === 3;\n this.clientError = type === 4;\n this.serverError = type === 5;\n this.error = type === 4 || type === 5 ? this.toError() : false;\n\n // sugar\n this.created = status === 201;\n this.accepted = status === 202;\n this.noContent = status === 204;\n this.badRequest = status === 400;\n this.unauthorized = status === 401;\n this.notAcceptable = status === 406;\n this.forbidden = status === 403;\n this.notFound = status === 404;\n this.unprocessableEntity = status === 422;\n};\n","/**\n * Return the mime type for the given `str`.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nexports.type = str => str.split(/ *; */).shift();\n\n/**\n * Return header field parameters.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nexports.params = str =>\n str.split(/ *; */).reduce((obj, str) => {\n const parts = str.split(/ *= */);\n const key = parts.shift();\n const val = parts.shift();\n\n if (key && val) obj[key] = val;\n return obj;\n }, {});\n\n/**\n * Parse Link header fields.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nexports.parseLinks = str =>\n str.split(/ *, */).reduce((obj, str) => {\n const parts = str.split(/ *; */);\n const url = parts[0].slice(1, -1);\n const rel = parts[1].split(/ *= */)[1].slice(1, -1);\n obj[rel] = url;\n return obj;\n }, {});\n\n/**\n * Strip content related fields from `header`.\n *\n * @param {Object} header\n * @return {Object} header\n * @api private\n */\n\nexports.cleanHeader = (header, changesOrigin) => {\n delete header['content-type'];\n delete header['content-length'];\n delete header['transfer-encoding'];\n delete header.host;\n // secuirty\n if (changesOrigin) {\n delete header.authorization;\n delete header.cookie;\n }\n\n return header;\n};\n","\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\r\n // Remove event specific arrays for event types that no\r\n // one is subscribed for to avoid memory leak.\r\n if (callbacks.length === 0) {\r\n delete this._callbacks['$' + event];\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\r\n var args = new Array(arguments.length - 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n for (var i = 1; i < arguments.length; i++) {\r\n args[i - 1] = arguments[i];\r\n }\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","// 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","'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/**\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"]} \ No newline at end of file diff --git a/src/Particle.js b/src/Particle.js index 107aa53..2d5cbf4 100644 --- a/src/Particle.js +++ b/src/Particle.js @@ -2154,15 +2154,16 @@ class Particle { } /** - * Updates an existing logic block in the specified organization using the provided block data. + * Updates an existing logic block in the specified organization, completely overwriting the existing block in-place. + * If you include an id on a matcher, it will update the matcher in-place. * - * If you include an id on a matcher, it will update the matcher in place. + * See patchLogicBlock if you want to update only some properties. * * @param {Object} options The options for updating the logic block. * @param {Object} options.auth The authentication object with the API key. * @param {string} options.org The unique identifier of the organization. * @param {string} options.blockId The ID of the block to update. - * @param {Block} options.block The block object containing the block details. + * @param {Block} options.block The block object containing the block details. Must include all fields. * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. * @param {Object} [options.context] Request context. * @@ -2178,6 +2179,29 @@ class Particle { }); } + /** + * Updates logic block in the specified organization, partially updating the existing block in-place. + * + * @param {Object} options The options for updating the logic block. + * @param {Object} options.auth The authentication object with the API key. + * @param {string} options.org The unique identifier of the organization. + * @param {string} options.blockName The name of the block to update. + * @param {Block} options.block The block object containing the block details. Only the properties you want to update need to be included. + * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. + * @param {Object} [options.context] Request context. + * + * @returns {Promise<{body: {block: ResponseBlock}, statusCode: int}>} A promise that resolves to the updated logic block data. + */ + patchLogicBlock({ auth, org, blockName, block, headers, context }) { + return this.post({ + uri: `/v1/orgs/${org}/block/${blockName}`, + auth, + data: { block }, + headers, + context + }); + } + /** * Deletes a logic block in the specified organization by block ID. * diff --git a/test/Particle.spec.js b/test/Particle.spec.js index 6a7a794..f12f9ea 100644 --- a/test/Particle.spec.js +++ b/test/Particle.spec.js @@ -2654,6 +2654,27 @@ describe('ParticleAPI', () => { }); }); + describe('.patchLogicBlock', () => { + it('generates request', () => { + const propsWithBlockName = Object.assign({ blockName: props.block.name }, propsWithOrg); + return api.patchLogicBlock(propsWithBlockName).then((results) => { + results.should.match({ + method: 'post', + uri: `/v1/orgs/${org}/block/${props.block.name}`, + auth: props.auth, + data: { + block: { + logic: { + type: 'JavaScript', + code: 'console.log("hello from block-1");' + } + } + } + }); + }); + }); + }); + describe('.deleteLogicBlock', () => { it('generates request', () => { return api.deleteLogicBlock(propsWithOrg).then((results) => {