From b19e6413e579bacb4e2ad805a1466f7fbc2bf150 Mon Sep 17 00:00:00 2001 From: Cole Abbeduto Date: Tue, 19 Dec 2023 13:06:40 -0600 Subject: [PATCH] 10.4.0 --- CHANGELOG.md | 5 + dist/particle.min.js | 2 +- dist/particle.min.js.map | 2 +- docs/api.md | 1196 ++++++++++++++++++++++---------------- package-lock.json | 4 +- package.json | 2 +- 6 files changed, 690 insertions(+), 521 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 874e4d1..b07542e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # changelog +## 10.4.0 - 19 December 2023 + +* Add `listLedgerInstanceVersions` function +* Add `getLedgerInstanceVersion` function + ## 10.3.1 - 6 December 2023 * Add `todayStats` query option to listLogicFunctions diff --git a/dist/particle.min.js b/dist/particle.min.js index 8d78c38..bc75252 100644 --- a/dist/particle.min.js +++ b/dist/particle.min.js @@ -1,2 +1,2 @@ -var Particle;(()=>{var e={9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),h=0,l=u>0?a-4:a;for(r=0;r>16&255,c[h++]=t>>8&255,c[h++]=255&t;2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[h++]=255&t);1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[h++]=t>>8&255,c[h++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,c=n-o;sc?c:s+a));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),o=r(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const o=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||J(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return h(e),s(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(o)return n?-1:G(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){let i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;is&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;no&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),c=this.slice(n,o),h=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function O(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;on)&&(r=n);let o="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function C(e,t,r,n,o){F(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function M(e,t,r,n,o){F(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function B(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,i){return t=+t,r>>>=0,i||B(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,i){return t=+t,r>>>=0,i||B(e,0,r,8),o.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],o=1,i=0;for(;++i=o&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||j(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Q((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Q((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Q((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Q((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function F(e,t,r,n,o,i){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new $.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||W(t,e.length-(r+1))}(n,o,i)}function H(e,t){if("number"!=typeof e)throw new $.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new $.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},584:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},1924:(e,t,r)=>{"use strict";var n=r(210),o=r(5559),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),o=r(210),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),h=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,a,arguments);u&&c&&(u(t,"length").configurable&&c(t,"length",{value:1+h(0,e.length-(arguments.length-1))}));return t};var l=function(){return s(n,i,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}y(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,r)}(e,o,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var o,i,a,c;if(s(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),void 0===a)a=i[t]=r,++e._eventsCount;else if("function"==typeof a?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=u(e))>0&&a.length>o&&!a.warned){a.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=a.length,c=h,console&&console.warn&&console.warn(c)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=h.bind(n);return o.listener=r,n.wrapFn=o,o}function f(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,h=p(u,c);for(r=0;r=0;i--)if(r[i]===t||r[i].listener===t){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},6230:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},7648:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,i=t.call(arguments,1),a=Math.max(0,n.length-i.length),s=[],u=0;u{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},210:(e,t,r)=>{"use strict";var n,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new a},h=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,l=r(1405)(),f=r(8185)(),d=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),p={},y="undefined"!=typeof Uint8Array&&d?d(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":l&&d?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l&&d?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l&&d?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l&&d?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l&&d?d(""[Symbol.iterator]()):n,"%Symbol%":l?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":h,"%TypedArray%":y,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(d)try{null.error}catch(e){var m=d(d(e));g["%Error.prototype%"]=m}var v=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&d&&(r=d(o.prototype))}return g[t]=r,r},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=r(8612),_=r(7642),x=w.call(Function.call,Array.prototype.concat),S=w.call(Function.apply,Array.prototype.splice),E=w.call(Function.call,String.prototype.replace),A=w.call(Function.call,String.prototype.slice),T=w.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g,k=function(e,t){var r,n=e;if(_(b,n)&&(n="%"+(r=b[n])[0]+"%"),_(g,n)){var i=g[n];if(i===p&&(i=v(n)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=A(e,0,1),r=A(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return E(e,R,(function(e,t,r,o){n[n.length]=r?E(o,O,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=k("%"+n+"%",t),s=i.name,c=i.value,h=!1,l=i.alias;l&&(n=l[0],S(r,x([0,1],l)));for(var f=1,d=!0;f=r.length){var v=u(c,p);c=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[p]}else d=_(c,p),c=c[p];d&&!h&&(g[s]=c)}}return c}},8185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},1405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(5419);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7642:(e,t,r)=>{"use strict";var n=r(8612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},645:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<>1,h=-7,l=r?o-1:0,f=r?-1:1,d=e[t+l];for(l+=f,i=d&(1<<-h)-1,d>>=-h,h+=s;h>0;i=256*i+e[t+l],l+=f,h-=8);for(a=i&(1<<-h)-1,i>>=-h,h+=n;h>0;a=256*a+e[t+l],l+=f,h-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=c}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,h=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?f/u:f*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=h?(s=0,a=h):a+l>=1?(s=(t*u-1)*Math.pow(2,o),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=p,s/=256,o-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*y}},3300:(e,t,r)=>{"use strict";var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},4155:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,u=[],c=!1,h=-1;function l(){c&&s&&(c=!1,s.length?u=s.concat(u):h=-1,u.length&&f())}function f(){if(!c){var e=a(l);c=!0;for(var t=u.length;t;){for(s=u,u=[];++h1)for(var r=1;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=u-c,_=Math.floor,x=String.fromCharCode;function S(e){throw new RangeError(b[e])}function E(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function A(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+E((e=e.replace(v,".")).split("."),t).join(".")}function T(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=x(e)})).join("")}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,r){var n=0;for(e=r?_(e/f):e>>1,e+=_(e/t);e>w*h>>1;n+=u)e=_(e/w);return _(n+(w+1)*e/(e+l))}function I(e){var t,r,n,o,i,a,l,f,g,m,v,b=[],w=e.length,x=0,E=p,A=d;for((r=e.lastIndexOf(y))<0&&(r=0),n=0;n=128&&S("not-basic"),b.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=w&&S("invalid-input"),((f=(v=e.charCodeAt(o++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:u)>=u||f>_((s-x)/a))&&S("overflow"),x+=f*a,!(f<(g=l<=A?c:l>=A+h?h:l-A));l+=u)a>_(s/(m=u-g))&&S("overflow"),a*=m;A=k(x-i,t=b.length+1,0==i),_(x/t)>s-E&&S("overflow"),E+=_(x/t),x%=t,b.splice(x++,0,E)}return R(b)}function P(e){var t,r,n,o,i,a,l,f,g,m,v,b,w,E,A,R=[];for(b=(e=T(e)).length,t=p,r=0,i=d,a=0;a=t&&v_((s-r)/(w=n+1))&&S("overflow"),r+=(l-t)*w,t=l,a=0;as&&S("overflow"),v==t){for(f=r,g=u;!(f<(m=g<=i?c:g>=i+h?h:g-i));g+=u)A=f-m,E=u-m,R.push(x(O(m+A%E,0))),f=_(A/E);R.push(x(O(f,0))),i=k(r,w,n==o),r=0,++n}++r,++t}return R.join("")}a={version:"1.4.1",ucs2:{decode:T,encode:R},decode:I,encode:P,toASCII:function(e){return A(e,(function(e){return m.test(e)?"xn--"+P(e):e}))},toUnicode:function(e){return A(e,(function(e){return g.test(e)?I(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},5798:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:o}},129:(e,t,r)=>{"use strict";var n=r(8261),o=r(5235),i=r(5798);e.exports={formats:i,parse:o,stringify:n}},5235:(e,t,r)=>{"use strict";var n=r(2769),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,h=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;h.push(c)}for(var l=0;r.depth>0&&null!==(s=a.exec(i))&&l=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,h=parseInt(c,10);r.parseArrays||""!==c?!isNaN(h)&&s!==c&&String(h)===c&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(a=[])[h]=o:"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o}(h,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var h="string"==typeof e?function(e,t){var r,c={__proto__:null},h=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,f=h.split(t.delimiter,l),d=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(g=i(g)?[g]:g),o.call(c,y)?c[y]=n.combine(c[y],g):c[y]=g}return c}(e,r):e,l=r.plainObjects?Object.create(null):{},f=Object.keys(h),d=0;d{"use strict";var n=r(7478),o=r(2769),i=r(5798),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,h=function(e,t){c.apply(e,u(t)?t:[t])},l=Date.prototype.toISOString,f=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:f,formatter:i.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},p={},y=function e(t,r,i,a,s,c,l,f,y,g,m,v,b,w,_,x){for(var S,E=t,A=x,T=0,R=!1;void 0!==(A=A.get(p))&&!R;){var O=A.get(t);if(T+=1,void 0!==O){if(O===T)throw new RangeError("Cyclic object value");R=!0}void 0===A.get(p)&&(T=0)}if("function"==typeof f?E=f(r,E):E instanceof Date?E=m(E):"comma"===i&&u(E)&&(E=o.maybeMap(E,(function(e){return e instanceof Date?m(e):e}))),null===E){if(s)return l&&!w?l(r,d.encoder,_,"key",v):r;E=""}if("string"==typeof(S=E)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||o.isBuffer(E))return l?[b(w?r:l(r,d.encoder,_,"key",v))+"="+b(l(E,d.encoder,_,"value",v))]:[b(r)+"="+b(String(E))];var k,I=[];if(void 0===E)return I;if("comma"===i&&u(E))w&&l&&(E=o.maybeMap(E,l)),k=[{value:E.length>0?E.join(",")||null:void 0}];else if(u(f))k=f;else{var P=Object.keys(E);k=y?P.sort(y):P}for(var j=a&&u(E)&&1===E.length?r+"[]":r,L=0;L0?_+w:""}},2769:(e,t,r)=>{"use strict";var n=r(5798),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===n.RFC1738&&(40===h||41===h)?u+=s.charAt(c):h<128?u+=a[h]:h<2048?u+=a[192|h>>6]+a[128|63&h]:h<55296||h>=57344?u+=a[224|h>>12]+a[128|h>>6&63]+a[128|63&h]:(c+=1,h=65536+((1023&h)<<10|1023&s.charCodeAt(c)),u+=a[240|h>>18]+a[128|h>>12&63]+a[128|h>>6&63]+a[128|63&h])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n{"use strict";var n=r(210),o=r(1924),i=r(7470),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),h=o("WeakMap.prototype.set",!0),l=o("WeakMap.prototype.has",!0),f=o("Map.prototype.get",!0),d=o("Map.prototype.set",!0),p=o("Map.prototype.has",!0),y=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+i(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(u){if(t)return f(t,n)}else if(r)return function(e,t){var r=y(e,t);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return l(e,n)}else if(u){if(t)return p(t,n)}else if(r)return function(e,t){return!!y(e,t)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),h(e,n,o)):u?(t||(t=new u),d(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=y(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n}},7470:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,h=s&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,_=String.prototype.toLowerCase,x=RegExp.prototype.test,S=Array.prototype.concat,E=Array.prototype.join,A=Array.prototype.slice,T=Math.floor,R="function"==typeof BigInt?BigInt.prototype.valueOf:null,O=Object.getOwnPropertySymbols,k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||"symbol")?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,L=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function C(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-T(-e):T(e);if(n!==e){var o=String(n),i=v.call(t,o.length+1);return b.call(o,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var M=r(7165),B=M.custom,N=F(B)?B:null;function U(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function $(e){return b.call(String(e),/"/g,""")}function D(e){return!("[object Array]"!==V(e)||P&&"object"==typeof e&&P in e)}function q(e){return!("[object RegExp]"!==V(e)||P&&"object"==typeof e&&P in e)}function F(e){if(I)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,o){var s=r||{};if(W(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!W(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return z(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return y?C(t,w):w}if("bigint"==typeof t){var x=String(t)+"n";return y?C(t,x):x}var T=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=T&&T>0&&"object"==typeof t)return D(t)?"[Array]":"[Object]";var O=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=E.call(Array(e.indent+1)," ")}return{base:r,prev:E.call(Array(t+1),r)}}(s,n);if(void 0===o)o=[];else if(G(o,t)>=0)return"[Circular]";function B(t,r,i){if(r&&(o=A.call(o)).push(r),i){var a={depth:s.depth};return W(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,n+1,o)}return e(t,s,n+1,o)}if("function"==typeof t&&!q(t)){var H=function(e){if(e.name)return e.name;var t=m.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),K=Z(t,B);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(K.length>0?" { "+E.call(K,", ")+" }":"")}if(F(t)){var ee=I?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):k.call(t);return"object"!=typeof t||I?ee:Y(ee)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var te="<"+_.call(String(t.nodeName)),re=t.attributes||[],ne=0;ne"}if(D(t)){if(0===t.length)return"[]";var oe=Z(t,B);return O&&!function(e){for(var t=0;t=0)return!1;return!0}(oe)?"["+Q(oe,O)+"]":"[ "+E.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||P&&"object"==typeof e&&P in e)}(t)){var ie=Z(t,B);return"cause"in Error.prototype||!("cause"in t)||j.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+E.call(ie,", ")+" }":"{ ["+String(t)+"] "+E.call(S.call("[cause]: "+B(t.cause),ie),", ")+" }"}if("object"==typeof t&&u){if(N&&"function"==typeof t[N]&&M)return M(t,{depth:T-n});if("symbol"!==u&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return a&&a.call(t,(function(e,r){ae.push(B(r,t,!0)+" => "+B(e,t))})),X("Map",i.call(t),ae,O)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var se=[];return h&&h.call(t,(function(e){se.push(B(e,t))})),X("Set",c.call(t),se,O)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e,l);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{l.call(e,l)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return!("[object Number]"!==V(e)||P&&"object"==typeof e&&P in e)}(t))return Y(B(Number(t)));if(function(e){if(!e||"object"!=typeof e||!R)return!1;try{return R.call(e),!0}catch(e){}return!1}(t))return Y(B(R.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||P&&"object"==typeof e&&P in e)}(t))return Y(p.call(t));if(function(e){return!("[object String]"!==V(e)||P&&"object"==typeof e&&P in e)}(t))return Y(B(String(t)));if(!function(e){return!("[object Date]"!==V(e)||P&&"object"==typeof e&&P in e)}(t)&&!q(t)){var ue=Z(t,B),ce=L?L(t)===Object.prototype:t instanceof Object||t.constructor===Object,he=t instanceof Object?"":"null prototype",le=!ce&&P&&Object(t)===t&&P in t?v.call(V(t),8,-1):he?"Object":"",fe=(ce||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(le||he?"["+E.call(S.call([],le||[],he||[]),": ")+"] ":"");return 0===ue.length?fe+"{}":O?fe+"{"+Q(ue,O)+"}":fe+"{ "+E.call(ue,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return H.call(e,t)}function V(e){return y.call(e)}function G(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return z(v.call(e,0,t.maxStringLength),t)+n}return U(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Y(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function X(e,t,r,n){return e+" ("+t+") {"+(n?Q(r,n):E.call(r,", "))+"}"}function Q(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+E.call(e,","+r)+"\n"+t.prev}function Z(e,t){var r=D(e),n=[];if(r){n.length=e.length;for(var o=0;o{var n=r(1989),o=r(5676),i=r(8234),a=r(584),s=r(8575),u=t;u.request=function(e,t){e="string"==typeof e?s.parse(e):i(e);var o=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||o,u=e.hostname||e.host,c=e.port,h=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+h,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var l=new n(e);return t&&l.on("response",t),l},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=o.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(e,t,r)=>{var n;function o(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function i(e){var t=o();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),t.writableStream=a(r.g.WritableStream),t.abortController=a(r.g.AbortController),t.arraybuffer=t.fetch||i("arraybuffer"),t.msstream=!t.fetch&&i("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!o()&&a(o().overrideMimeType),n=null},1989:(e,t,r)=>{var n=r(8764).Buffer,o=r(4155),i=r(8725),a=r(1183),s=r(5676),u=r(925),c=s.IncomingMessage,h=s.readyStates;var l=e.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+n.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var o=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)o=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":"text"}(t,o),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};a(l,u.Writable),l.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===f.indexOf(r)&&(this._headers[r]={name:e,value:t})},l.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},l.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},l.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach((function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach((function(e){s.push([t,e])})):s.push([t,r])})),"fetch"===e._mode){var u=null;if(i.abortController){var c=new AbortController;u=c.signal,e._fetchAbortController=c,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var l=e._xhr=new r.g.XMLHttpRequest;try{l.open(e._opts.method,e._opts.url,!0)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}"responseType"in l&&(l.responseType=e._mode),"withCredentials"in l&&(l.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in l&&l.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(l.timeout=t.requestTimeout,l.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){l.setRequestHeader(e[0],e[1])})),e._response=null,l.onreadystatechange=function(){switch(l.readyState){case h.LOADING:case h.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(l.onprogress=function(){e._onXHRProgress()}),l.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{l.send(a)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}}}},l.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},l.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},l.prototype._write=function(e,t,r){this._body.push(e),r()},l.prototype._resetTimers=function(e){var t=this;r.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(r.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=r.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},l.prototype.abort=l.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},l.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},l.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},l.prototype.flushHeaders=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},5676:(e,t,r)=>{var n=r(4155),o=r(8764).Buffer,i=r(8725),a=r(1183),s=r(925),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(e,t,r,a){var u=this;if(s.Readable.call(u),u._mode=r,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){n.nextTick((function(){u.emit("close")}))})),"fetch"===r){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),i.writableStream){var c=new WritableStream({write:function(e){return a(!1),new Promise((function(t,r){u._destroyed?r():u.push(o.from(e))?t():u._resumeFetch=t}))},close:function(){a(!0),u._destroyed||u.push(null)},abort:function(e){a(!0),u._destroyed||u.emit("error",e)}});try{return void t.body.pipeTo(c).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var h=t.body.getReader();!function e(){h.read().then((function(t){u._destroyed||(a(t.done),t.done?u.push(null):(u.push(o.from(t.value)),e()))})).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}()}else{if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!i.overrideMimeType){var l=u.rawHeaders["mime-type"];if(l){var f=l.match(/;\s*charset=([^;])(;|$)/);f&&(u._charset=f[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(e){var t=this,n=t._xhr,i=null;switch(t._mode){case"text":if((i=n.responseText).length>t._pos){var a=i.substr(t._pos);if("x-user-defined"===t._charset){for(var s=o.alloc(a.length),c=0;ct._pos&&(t.push(o.from(new Uint8Array(h.result.slice(t._pos)))),t._pos=h.result.byteLength)},h.onload=function(){e(!0),t.push(null)},h.readAsArrayBuffer(i)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},1183:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},7303:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var o=function(e){var t,n;function o(t,n,o){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,o))||this}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,o}(n);o.prototype.name=n.name,o.prototype.code=e,t[e]=o}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var o,i,a,s;if("string"==typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(o," ").concat(n(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(n(t,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},9560:(e,t,r)=>{"use strict";var n=r(4155),o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var i=r(4002),a=r(3313);r(1183)(h,i);for(var s=o(a.prototype),u=0;u{"use strict";e.exports=o;var n=r(1846);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}r(1183)(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},4002:(e,t,r)=>{"use strict";var n,o=r(4155);e.exports=A,A.ReadableState=E;r(7187).EventEmitter;var i=function(e,t){return e.listeners(t).length},a=r(1463),s=r(8764).Buffer,u=r.g.Uint8Array||function(){};var c,h=r(3646);c=h&&h.debuglog?h.debuglog("stream"):function(){};var l,f,d,p=r(6641),y=r(3369),g=r(624).getHighWaterMark,m=r(7303).q,v=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1183)(A,a);var x=y.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(e,t,o){n=n||r(9560),e=e||{},"boolean"!=typeof o&&(o=t instanceof n),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",o),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(636).s),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function A(e){if(n=n||r(9560),!(this instanceof A))return new A(e);var t=this instanceof n;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function T(e,t,r,n,o){c("readableAddChunk",t);var i,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?I(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}(e,a);else if(o||(i=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(a,t)),i)x(e,i);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?x(e,new _):R(e,a,t,!0);else if(a.ended)x(e,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?R(e,a,t,!1):j(e,a)):R(e,a,t,!1)}else n||(a.reading=!1,j(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(P,e))}function P(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function j(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){c("readable nexttick read 0"),e.read(0)}function B(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function U(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function $(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick(D,t,e))}function D(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function q(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?$(this):I(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&$(this),null;var n,o=t.needReadable;return c("need readable",o),(0===t.length||t.length-e0?U(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&$(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){x(this,new w("_read()"))},A.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,c("pipe count=%d opts=%j",n.pipesCount,t);var a=(!t||!1!==t.end)&&e!==o.stdout&&e!==o.stderr?u:g;function s(t,o){c("onunpipe"),t===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",d),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",f),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){c("onend"),e.end()}n.endEmitted?o.nextTick(a):r.once("end",a),e.on("unpipe",s);var h=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,N(e))}}(r);e.on("drain",h);var l=!1;function f(t){c("ondata");var o=e.write(t);c("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==q(n.pipes,e))&&!l&&(c("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){c("onerror",t),g(),e.removeListener("error",d),0===i(e,"error")&&x(e,t)}function p(){e.removeListener("finish",y),g()}function y(){c("onfinish"),e.removeListener("close",p),g()}function g(){c("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",p),e.once("finish",y),e.emit("pipe",r),n.flowing||(c("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c("on readable",n.length,n.reading),n.length?I(this):n.reading||o.nextTick(M,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick(C,this),r},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||o.nextTick(C,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(B,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(c("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o)||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i{"use strict";e.exports=h;var n=r(7303).q,o=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(9560);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length{"use strict";var n,o=r(4155);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=A,A.WritableState=E;var a={deprecate:r(4927)},s=r(1463),u=r(8764).Buffer,c=r.g.Uint8Array||function(){};var h,l=r(3369),f=r(624).getHighWaterMark,d=r(7303).q,p=d.ERR_INVALID_ARG_TYPE,y=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,v=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,x=l.errorOrDestroy;function S(){}function E(e,t,a){n=n||r(9560),e=e||{},"boolean"!=typeof a&&(a=t instanceof n),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(P,e,t),e._writableState.errorEmitted=!0,x(e,n)):(i(n),e._writableState.errorEmitted=!0,x(e,n),P(e,t))}(e,r,n,t,i);else{var a=k(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||O(e,r),n?o.nextTick(R,e,r,a,i):R(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function A(e){var t=this instanceof(n=n||r(9560));if(!t&&!h.call(A,this))return new A(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function T(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function R(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),P(e,t)}function O(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,T(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,h=r.encoding,l=r.callback;if(T(e,t,!1,t.objectMode?1:c.length,c,h,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),P(e,t)}))}function P(e,t){var r=k(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(I,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(1183)(A,s),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===A&&(e&&e._writableState instanceof E)}})):h=function(e){return e instanceof this},A.prototype.pipe=function(){x(this,new m)},A.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=e,u.isBuffer(n)||n instanceof c);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=S),i.ending?function(e,t){var r=new w;x(e,r),o.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i;return null===r?i=new b:"string"==typeof r||t.objectMode||(i=new p("chunk",["string","Buffer"],r)),!i||(x(e,i),o.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,o,i){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,o);n!==a&&(r=!0,o="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new y("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(e,t){t(e)}},6819:(e,t,r)=>{"use strict";var n,o=r(4155);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(5467),s=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),h=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function y(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[l]=null,e[s]=null,e[u]=null,t(p(r,!1)))}}function g(e){o.nextTick(y,e)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[d]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[h])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){o.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[h]?r(p(void 0,!0)):t[f](r,n)}),n)}}(n,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(p(i,!1));r=new Promise(this[f])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),m);e.exports=function(e){var t,r=Object.create(v,(i(t={},d,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,h,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var n=r[d].read();n?(r[l]=null,r[s]=null,r[u]=null,e(p(n,!1))):(r[s]=e,r[u]=t)},writable:!0}),t));return r[l]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[l]=null,r[s]=null,r[u]=null,t(e)),void(r[c]=e)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[h]=!0})),e.on("readable",g.bind(null,r)),r}},6641:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){for(var r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,o=a.allocUnsafe(e>>>0),i=this.head,s=0;i;)t=i.data,r=o,n=s,a.prototype.copy.call(t,r,n),s+=i.data.length,i=i.next;return o}},{key:"consume",value:function(e,t){var r;return eo.length?o.length:e;if(i===o.length?n+=o:n+=o.slice(0,e),0==(e-=i)){i===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0==(e-=i)){i===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(i));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t{"use strict";var n=r(4155);function o(e,t){a(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(i,r):(r._writableState.errorEmitted=!0,n.nextTick(o,r,e)):n.nextTick(o,r,e):t?(n.nextTick(i,r),t(e)):n.nextTick(i,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},5467:(e,t,r)=>{"use strict";var n=r(7303).q.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9689:(e,t,r)=>{"use strict";var n;var o=r(7303).q,i=o.ERR_MISSING_ARGS,a=o.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),o=0;o0,(function(e){h||(h=e),e&&f.forEach(u),i||(f.forEach(u),l(h))}))}));return t.reduce(c)}},624:(e,t,r)=>{"use strict";var n=r(7303).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(o?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},1463:(e,t,r)=>{e.exports=r(7187).EventEmitter},925:(e,t,r)=>{(t=e.exports=r(4002)).Stream=t,t.Readable=t,t.Writable=r(3313),t.Duplex=r(9560),t.Transform=r(1846),t.PassThrough=r(4842),t.finished=r(5467),t.pipeline=r(9689)},3738:(e,t,r)=>{var n=r(8764),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},636:(e,t,r)=>{"use strict";var n=r(3738).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=h,this.end=l,t=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function h(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return o>0&&(e.lastNeed=o-1),o;if(--n=0)return o>0&&(e.lastNeed=o-2),o;if(--n=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8234:e=>{e.exports=function(){for(var e={},r=0;r{"use strict";var n=r(4971);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var i=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),h=["%","/","?",";","#"].concat(c),l=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(129);function v(e,t,r){if(e&&"object"==typeof e&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o127?j+="x":j+=P[L];if(!j.match(f)){var M=k.slice(0,T),B=k.slice(T+1),N=P.match(d);N&&(M.push(N[1]),B.unshift(N[2])),B.length&&(v="/"+B.join(".")+v),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var U=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+U,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!p[_])for(T=0,I=c.length;T0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=x.slice(-1)[0],A=(r.host||e.host||x.length>1)&&("."===E||".."===E)||""===E,T=0,R=x.length;R>=0;R--)"."===(E=x[R])?x.splice(R,1):".."===E?(x.splice(R,1),T++):T&&(x.splice(R,1),T--);if(!w&&!_)for(;T--;T)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),A&&"/"!==x.join("/").substr(-1)&&x.push("");var O,k=""===x[0]||x[0]&&"/"===x[0].charAt(0);S&&(r.hostname=k?"":x.length?x.shift():"",r.host=r.hostname,(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname));return(w=w||r.host&&x.length)&&!k&&x.unshift(""),x.length>0?r.pathname=x.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return"string"==typeof e&&(e=v(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},7731:(e,t,r)=>{var n=r(8764).Buffer;const o=r(3300),i=r(6230),a=r(129),s=r(5014),u=r(4147);e.exports=class{constructor(e){this.setBaseUrl(e)}setBaseUrl(e){this.baseUrl=e}get({uri:e,auth:t,headers:r,query:n,context:o}){return this.request({uri:e,method:"get",auth:t,headers:r,query:n,context:o})}head({uri:e,auth:t,headers:r,query:n,context:o}){return this.request({uri:e,method:"head",auth:t,headers:r,query:n,context:o})}post({uri:e,headers:t,data:r,auth:n,context:o}){return this.request({uri:e,method:"post",auth:n,headers:t,data:r,context:o})}put({uri:e,auth:t,headers:r,data:n,context:o}){return this.request({uri:e,method:"put",auth:t,headers:r,data:n,context:o})}delete({uri:e,auth:t,headers:r,data:n,context:o}){return this.request({uri:e,method:"delete",auth:t,headers:r,data:n,context:o})}request({uri:e,method:t,headers:r,data:n,auth:o,query:i,form:a,files:s,context:u,isBuffer:c=!1}){const h=this._sanitizeFiles(s),l=this._buildRequest({uri:e,method:t,headers:r,data:n,auth:o,query:i,form:a,context:u,files:h});return this._promiseResponse(l,c)}_promiseResponse(e,t,r=o){let i;return r(...e).then((e=>(i=e.status,e.ok?204===i?"":t?e.blob():e.json():e.text().then((t=>{const r=JSON.parse(t),n=Object.assign(e,{text:t});throw Object.assign(r,{response:n})}))))).then((e=>t?e.arrayBuffer().then((e=>this.isForBrowser()?e:n.from(e))):{body:e,statusCode:i})).catch((t=>{let r,n=`${i?`HTTP error ${i}`:"Network error"} from ${e[0]}`;t.error_description&&(n=`${n} - ${t.error_description}`,r=t.error_description);const o=new Error(n);throw Object.assign(o,{statusCode:i,errorDescription:n,shortErrorDescription:r,error:t,body:t}),o}))}_buildRequest({uri:e,method:t,headers:r,data:n,auth:o,query:i,form:s,files:c,context:h}){let l=e;if(this.baseUrl&&"/"===e[0]&&(l=`${this.baseUrl}${e}`),i){const e=a.stringify(i),t=l.includes("?");l=`${l}${t?"&":"?"}${e}`}const f={"User-Agent":`${u.name}/${u.version} (${u.repository.url})`};let d,p;c?(p={},d=this._getFromData(c,s)):s?(p={"Content-Type":"application/x-www-form-urlencoded"},d=a.stringify(s)):n&&(p={"Content-Type":"application/json"},d=JSON.stringify(n));return[l,{method:t,body:d,headers:Object.assign({},f,p,this._getAuthorizationHeader(o),this._getContextHeaders(h),r)}]}isForBrowser(){return"undefined"!=typeof window}_getFromData(e,t){const r=new i;for(let[t,n]of Object.entries(e)){let e=n.path,o=n.data;if(!this.isForBrowser()){const t=this._getNodeFormData(n);e=t.path,o=t.file}r.append(t,o,e)}if(t)for(let[e,n]of Object.entries(t))r.append(e,n);return r}_getNodeFormData(e){let t=e.data;return"string"==typeof e.data&&(t=s.createReadStream(e.data)),{file:t,path:{filepath:e.path}}}_getContextHeaders(e={}){return Object.assign({},this._getToolContext(e.tool),this._getProjectContext(e.project))}_getToolContext(e={}){let t="";if(e.name&&(t+=this._toolIdent(e),e.components))for(let r of e.components)t+=", "+this._toolIdent(r);return t?{"X-Particle-Tool":t}:{}}_toolIdent(e){return this._nameAtVersion(e.name,e.version)}_nameAtVersion(e,t){let r="";return e&&(r+=e,t&&(r+="@"+t)),r}_getProjectContext(e={}){let t=this._buildSemicolonSeparatedProperties(e,"name");return t?{"X-Particle-Project":t}:{}}_buildSemicolonSeparatedProperties(e,t){let r="";if(e[t]){r+=e[t];for(let n in e)n!==t&&e.hasOwnProperty(n)&&(r+="; "+n+"="+e[n])}return r}_getAuthorizationHeader(e){if(!e)return{};if("string"==typeof e)return{Authorization:`Bearer ${e}`};let t;return t=this.isForBrowser()?btoa(`${e.username}:${e.password}`):n.from(`${e.username}:${e.password}`).toString("base64"),{Authorization:`Basic ${t}`}}_sanitizeFiles(e){let t;return e&&(t={},Object.keys(e).forEach(((r,n)=>{t[n?`file${n+1}`:"file"]={data:e[r],path:r}}))),t}}},5318:(e,t,r)=>{const n=r(101);let o;e.exports=class{constructor({auth:e,api:t=new o}){this.auth=e,this.api=t}ready(){return Boolean(this.auth)}libraries(e={}){return this.api.listLibraries(Object.assign({},e,{auth:this.auth})).then((e=>(e.body.data||[]).map((e=>new n(this,e)))))}library(e,t={}){return this.api.getLibrary(Object.assign({},t,{name:e,auth:this.auth})).then((e=>{const t=e.body.data||{};return new n(this,t)}))}libraryVersions(e,t={}){return this.api.getLibraryVersions(Object.assign({},t,{name:e,auth:this.auth})).then((e=>(e.body.data||[]).map((e=>new n(this,e)))))}contributeLibrary(e){return this.api.contributeLibrary({archive:e,auth:this.auth}).then((e=>{const t=e.body.data||{};return new n(this,t)}),(e=>{this._throwError(e)}))}publishLibrary(e){return this.api.publishLibrary({name:e,auth:this.auth}).then((e=>{const t=e.body.data||{};return new n(this,t)}),(e=>{this._throwError(e)}))}deleteLibrary({name:e,force:t}){return this.api.deleteLibrary({name:e,force:t,auth:this.auth}).then((()=>!0),(e=>this._throwError(e)))}_throwError(e){if(e.body&&e.body.errors){const t=e.body.errors.map((e=>e.message)).join("\n");throw new Error(t)}throw e}downloadFile(e){return this.api.downloadFile({uri:e})}compileCode(e,t,r){return this.api.compileCode({files:e,platformId:t,targetVersion:r,auth:this.auth})}signalDevice({signal:e,deviceId:t}){return this.api.signalDevice({signal:e,deviceId:t,auth:this.auth})}listDevices(){return this.api.listDevices({auth:this.auth})}listBuildTargets(){return this.api.listBuildTargets({onlyFeatured:!0,auth:this.auth}).then((e=>{let t=[];for(let r of e.body.targets)for(let e of r.platforms)t.push({version:r.version,platform:e,prerelease:r.prereleases.indexOf(e)>-1,firmware_vendor:r.firmware_vendor});return t}),(()=>{}))}trackingIdentity({full:e=!1,context:t}={}){return this.api.trackingIdentity({full:e,context:t,auth:this.auth}).then((e=>e.body))}},o=r(7845)},3822:e=>{e.exports={baseUrl:"https://api.particle.io",clientSecret:"particle-api",clientId:"particle-api",tokenDuration:7776e3,auth:void 0}},705:(e,t,r)=>{const n=r(8501),o=r(8501),i=r(8575),{EventEmitter:a}=r(7187);e.exports=class extends a{constructor(e,t){super(),this.uri=e,this.token=t,this.reconnectInterval=2e3,this.timeout=13e3,this.data="",this.buf="",this.parse=this.parse.bind(this),this.end=this.end.bind(this),this.idleTimeoutExpired=this.idleTimeoutExpired.bind(this)}connect(){return new Promise(((e,t)=>{const{hostname:r,protocol:a,port:s,path:u}=i.parse(this.uri);this.origin=`${a}//${r}${s?":"+s:""}`;const c="https:"===a,h=(c?o:n).request({hostname:r,protocol:a,path:`${u}?access_token=${this.token}`,method:"get",port:parseInt(s,10)||(c?443:80),mode:"prefer-streaming"});this.req=h;let l=!1,f=setTimeout((()=>{this.req&&this.req.abort(),t({error:new Error("Timeout"),errorDescription:`Timeout connecting to ${this.uri}`})}),this.timeout);h.on("error",(e=>{clearTimeout(f),l?this.end():t({error:e,errorDescription:`Network error from ${this.uri}`})})),h.on("response",(r=>{clearTimeout(f);const n=r.statusCode;if(200!==n){let e="";return r.on("data",(t=>e+=t)),void r.on("end",(()=>{try{e=JSON.parse(e)}catch(e){}finally{let r=`HTTP error ${n} from ${this.uri}`;e&&e.error_description&&(r+=" - "+e.error_description),t({statusCode:n,errorDescription:r,body:e}),this.req=void 0}}))}this.data="",this.buf="",l=!0,r.on("data",this.parse),r.once("end",this.end),this.startIdleTimeout(),e(this)})),h.end()}))}abort(){this.req&&(this.req.abort(),this.req=void 0),this.removeAllListeners()}emitSafe(e,t){try{this.emit(e,t)}catch(t){"error"!==e&&this.emitSafe("error",t)}}end(){this.stopIdleTimeout(),this.req&&(this.req=void 0,this.emitSafe("disconnect"),this.reconnect())}reconnect(){setTimeout((()=>{this.isOffline()?this.reconnect():(this.emitSafe("reconnect"),this.connect().then((()=>{this.emitSafe("reconnect-success")})).catch((e=>{this.emitSafe("reconnect-error",e),this.reconnect()})))}),this.reconnectInterval)}isOffline(){return"undefined"!=typeof navigator&&!navigator.hasOwnProperty("onLine")&&!navigator.onLine}startIdleTimeout(){this.stopIdleTimeout(),this.idleTimeout=setTimeout(this.idleTimeoutExpired,this.timeout)}stopIdleTimeout(){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null)}idleTimeoutExpired(){this.req&&(this.req.abort(),this.end())}parse(e){this.startIdleTimeout(),this.buf+=e;let t=0,r=this.buf.length,n=!1;for(;t0&&(this.buf=this.buf.slice(t))}parseEventStreamLine(e,t,r){if(0===r)try{if(this.data.length>0&&this.event){const e=JSON.parse(this.data);e.name=this.eventName||"",this.emitSafe("event",e)}}catch(e){}finally{this.data="",this.eventName=void 0,this.event=!1}else if(t>0){const n=this.buf.slice(e,e+t);let o=0;o=" "!==this.buf[e+t+1]?t+1:t+2,e+=o;const i=r-o,a=this.buf.slice(e,e+i);"data"===n?this.data+=a+"\n":"event"===n&&(this.eventName=a,this.event=!0)}}}},101:e=>{e.exports=class{constructor(e,t){Object.defineProperty(this,"client",{value:e}),this._assignAttributes(t),this.downloadUrl=t.links&&t.links.download}_assignAttributes(e){Object.assign(this,e.attributes)}download(){return this.downloadUrl?this.client.downloadFile(this.downloadUrl):Promise.reject(new Error("No download URL for this library"))}}},7845:(e,t,r)=>{const n=r(3822),o=r(705),i=r(7731),a=r(5318);class s{constructor(e={}){e.auth&&this.setDefaultAuth(e.auth),Object.assign(this,n,e),this.context={},this.agent=new i(this.baseUrl)}_isValidContext(e,t){return("tool"===e||"project"===e)&&void 0!==t}setContext(e,t){if(void 0!==t){if(!this._isValidContext(e,t))throw Error("unknown context name or undefined context: "+e);this.context[e]=t}}_buildContext(e){return Object.assign(this.context,e)}login({username:e,password:t,tokenDuration:r=this.tokenDuration,headers:n,context:o}){return this.request({uri:"/oauth/token",method:"post",headers:n,form:{username:e,password:t,grant_type:"password",client_id:this.clientId,client_secret:this.clientSecret,expires_in:r},context:o})}sendOtp({mfaToken:e,otp:t,headers:r,context:n}){return this.request({uri:"/oauth/token",method:"post",headers:r,form:{grant_type:"urn:custom:mfa-otp",mfa_token:e,otp:t,client_id:this.clientId,client_secret:this.clientSecret},context:n})}enableMfa({auth:e,headers:t,context:r}){return this.get({uri:"/v1/user/mfa-enable",auth:e,headers:t,context:r})}confirmMfa({mfaToken:e,otp:t,invalidateTokens:r=!1,auth:n,headers:o,context:i}){let a={mfa_token:e,otp:t};return r&&(a.invalidate_tokens=!0),this.post({uri:"/v1/user/mfa-enable",auth:n,headers:o,data:a,context:i})}disableMfa({currentPassword:e,auth:t,headers:r,context:n}){return this.put({uri:"/v1/user/mfa-disable",auth:t,headers:r,data:{current_password:e},context:n})}createCustomer({email:e,password:t,product:r,headers:n,context:o}){return this.request({uri:`/v1/products/${r}/customers`,method:"post",headers:n,form:{email:e,password:t,grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:o})}loginAsClientOwner({headers:e,context:t}){return this.request({uri:"/oauth/token",method:"post",headers:e,form:{grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:t})}createUser({username:e,password:t,accountInfo:r,headers:n,context:o}){return this.post({uri:"/v1/users",headers:n,data:{username:e,password:t,account_info:r},context:o})}verifyUser({token:e,headers:t,context:r}){return this.post({uri:"/v1/user/verify",headers:t,data:{token:e},context:r})}resetPassword({username:e,headers:t,context:r}){return this.post({uri:"/v1/user/password-reset",headers:t,data:{username:e},context:r})}deleteAccessToken({username:e,password:t,token:r,headers:n,context:o}){return this.delete({uri:`/v1/access_tokens/${r}`,auth:{username:e,password:t},headers:n,data:{access_token:r},context:o})}deleteCurrentAccessToken({auth:e,headers:t,context:r}){return this.delete({uri:"/v1/access_tokens/current",auth:e,headers:t,context:r})}deleteActiveAccessTokens({auth:e,headers:t,context:r}){return this.delete({uri:"/v1/access_tokens",auth:e,headers:t,context:r})}deleteUser({auth:e,password:t,headers:r,context:n}){return this.delete({uri:"/v1/user",data:{password:t},auth:e,headers:r,context:n})}listAccessTokens({username:e,password:t,otp:r,headers:n,context:o}){return this.get({uri:"/v1/access_tokens",auth:{username:e,password:t},query:r?{otp:r}:void 0,headers:n,context:o})}trackingIdentity({full:e=!1,auth:t,headers:r,context:n}={}){return this.get({uri:"/v1/user/identify",auth:t,headers:r,query:e?void 0:{tracking:1},context:n})}listDevices({deviceId:e,deviceName:t,groups:r,sortAttr:n,sortDir:o,page:i,perPage:a,product:s,auth:u,headers:c,context:h}){let l,f;return s?(l=`/v1/products/${s}/devices`,f={deviceId:e,deviceName:t,groups:Array.isArray(r)?r.join(","):void 0,sortAttr:n,sortDir:o,page:i,per_page:a}):l="/v1/devices",this.get({uri:l,auth:u,headers:c,query:f,context:h})}getDevice({deviceId:e,product:t,auth:r,headers:n,context:o}){const i=this.deviceUri({deviceId:e,product:t});return this.get({uri:i,auth:r,headers:n,context:o})}claimDevice({deviceId:e,requestTransfer:t,auth:r,headers:n,context:o}){return this.post({uri:"/v1/devices",auth:r,headers:n,data:{id:e,request_transfer:!!t},context:o})}addDeviceToProduct({deviceId:e,product:t,file:r,auth:n,headers:o,context:i}){let a,s;return r?a={file:r}:e&&(s={id:e}),this.request({uri:`/v1/products/${t}/devices`,method:"post",headers:o,data:s,files:a,auth:n,context:i})}removeDevice({deviceId:e,deny:t,product:r,auth:n,headers:o,context:i}){const a=this.deviceUri({deviceId:e,product:r}),s=r?{deny:t}:void 0;return this.delete({uri:a,data:s,auth:n,headers:o,context:i})}removeDeviceOwner({deviceId:e,product:t,auth:r,headers:n,context:o}){const i=`/v1/products/${t}/devices/${e}/owner`;return this.delete({uri:i,auth:r,headers:n,context:o})}renameDevice({deviceId:e,name:t,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,name:t,product:r,auth:n,headers:o,context:i})}signalDevice({deviceId:e,signal:t,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,signal:t,product:r,auth:n,headers:o,context:i})}setDeviceNotes({deviceId:e,notes:t,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,notes:t,product:r,auth:n,headers:o,context:i})}markAsDevelopmentDevice({deviceId:e,development:t=!0,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,development:t,product:r,auth:n,headers:o,context:i})}lockDeviceProductFirmware({deviceId:e,desiredFirmwareVersion:t,flash:r,product:n,auth:o,headers:i,context:a}){return this.updateDevice({deviceId:e,desiredFirmwareVersion:t,flash:r,product:n,auth:o,headers:i,context:a})}unlockDeviceProductFirmware({deviceId:e,product:t,auth:r,headers:n,context:o}){return this.updateDevice({deviceId:e,desiredFirmwareVersion:null,product:t,auth:r,headers:n,context:o})}updateDevice({deviceId:e,name:t,signal:r,notes:n,development:o,desiredFirmwareVersion:i,flash:a,product:s,auth:u,headers:c,context:h}){let l;void 0!==r&&(l=r?"1":"0");const f=this.deviceUri({deviceId:e,product:s}),d=s?{name:t,signal:l,notes:n,development:o,desired_firmware_version:i,flash:a}:{name:t,signal:l,notes:n};return this.put({uri:f,auth:u,headers:c,data:d,context:h})}provisionDevice({productId:e,auth:t,headers:r,context:n}){return this.post({uri:"/v1/devices",auth:t,headers:r,data:{product_id:e},context:n})}getClaimCode({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/device_claims`:"/v1/device_claims";return this.post({uri:i,auth:r,headers:n,data:{iccid:e},context:o})}validatePromoCode({promoCode:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/promo_code/${e}`,auth:t,headers:r,context:n})}changeProduct({deviceId:e,productId:t,auth:r,headers:n,context:o}){return this.put({uri:`/v1/devices/${e}`,auth:r,headers:n,data:{product_id:t},context:o})}getVariable({deviceId:e,name:t,product:r,auth:n,headers:o,context:i}){const a=r?`/v1/products/${r}/devices/${e}/${t}`:`/v1/devices/${e}/${t}`;return this.get({uri:a,auth:n,headers:o,context:i})}flashDevice({deviceId:e,product:t,files:r,targetVersion:n,auth:o,headers:i,context:a}){const s=this.deviceUri({deviceId:e,product:t}),u={};return n?u.build_target_version=n:u.latest="true",this.request({uri:s,method:"put",auth:o,headers:i,files:r,form:u,context:a})}flashTinker({deviceId:e,auth:t,headers:r,context:n}){return console&&console.warning&&console.warning("Particle.flashTinker is deprecated"),this.put({uri:`/v1/devices/${e}`,headers:r,data:{app:"tinker"},auth:t,context:n})}compileCode({files:e,platformId:t,targetVersion:r,auth:n,headers:o,context:i}){const a={platform_id:t};return r?a.build_target_version=r:a.latest="true",this.request({uri:"/v1/binaries",method:"post",auth:n,headers:o,files:e,form:a,context:i})}downloadFirmwareBinary({binaryId:e,auth:t,headers:r,context:n}){return this.request({uri:`/v1/binaries/${e}`,method:"get",auth:t,headers:r,context:n,isBuffer:!0})}sendPublicKey({deviceId:e,key:t,algorithm:r,auth:n,headers:o,context:i}){return this.post({uri:`/v1/provisioning/${e}`,auth:n,headers:o,data:{deviceID:e,publicKey:"string"==typeof t?t:t.toString(),filename:"particle-api",order:`manual_${Date.now()}`,algorithm:r||"rsa"},context:i})}callFunction({deviceId:e,name:t,argument:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/devices/${e}/${t}`:`/v1/devices/${e}/${t}`;return this.post({uri:s,auth:o,headers:i,data:{args:r},context:a})}getEventStream({deviceId:e,name:t,org:r,product:n,auth:i}){let a="/v1/";return r&&(a+=`orgs/${r}/`),n&&(a+=`products/${n}/`),e&&(a+="devices/","mine"!==e.toLowerCase()&&(a+=`${e}/`)),a+="events",t&&(a+=`/${encodeURIComponent(t)}`),i=this._getActiveAuthToken(i),new o(`${this.baseUrl}${a}`,i).connect()}publishEvent({name:e,data:t,isPrivate:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/events`:"/v1/devices/events",u={name:e,data:t,private:r};return this.post({uri:s,auth:o,headers:i,data:u,context:a})}createWebhook({event:e,url:t,device:r,rejectUnauthorized:n,noDefaults:o,hook:i,product:a,auth:s,headers:u,context:c}){const h=a?`/v1/products/${a}/webhooks`:"/v1/webhooks",l={event:e,url:t,deviceId:r,rejectUnauthorized:n,noDefaults:o};return i&&(l.requestType=i.method,l.auth=i.auth,l.headers=i.headers,l.query=i.query,l.json=i.json,l.form=i.form,l.body=i.body,l.responseTemplate=i.responseTemplate,l.responseTopic=i.responseEvent,l.errorResponseTopic=i.errorResponseEvent),l.requestType||(l.requestType="POST"),this.post({uri:h,auth:s,headers:u,data:l,context:c})}deleteWebhook({hookId:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/webhooks/${e}`:`/v1/webhooks/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listWebhooks({product:e,auth:t,headers:r,context:n}){const o=e?`/v1/products/${e}/webhooks`:"/v1/webhooks";return this.get({uri:o,auth:t,headers:r,context:n})}createIntegration({event:e,settings:t,deviceId:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/integrations`:"/v1/integrations",u=Object.assign({event:e,deviceid:r},t);return this.post({uri:s,data:u,auth:o,headers:i,context:a})}editIntegration({integrationId:e,event:t,settings:r,deviceId:n,product:o,auth:i,headers:a,context:s}){const u=o?`/v1/products/${o}/integrations/${e}`:`/v1/integrations/${e}`,c=Object.assign({event:t,deviceid:n},r);return this.put({uri:u,auth:i,headers:a,data:c,context:s})}deleteIntegration({integrationId:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/integrations/${e}`:`/v1/integrations/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listIntegrations({product:e,auth:t,headers:r,context:n}){const o=e?`/v1/products/${e}/integrations`:"/v1/integrations";return this.get({uri:o,auth:t,headers:r,context:n})}getUserInfo({auth:e,headers:t,context:r}){return this.get({uri:"/v1/user",auth:e,headers:t,context:r})}setUserInfo({accountInfo:e,auth:t,headers:r,context:n}){const o={account_info:e};return this.put({uri:"/v1/user",auth:t,headers:r,data:o,context:n})}changeUsername({currentPassword:e,username:t,invalidateTokens:r=!1,auth:n,headers:o,context:i}){const a={username:t,current_password:e};return r&&(a.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:o,data:a,context:i})}changeUserPassword({currentPassword:e,password:t,invalidateTokens:r=!1,auth:n,headers:o,context:i}){const a={password:t,current_password:e};return r&&(a.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:o,data:a,context:i})}listSIMs({iccid:e,deviceId:t,deviceName:r,page:n,perPage:o,product:i,auth:a,headers:s,context:u}){const c=i?`/v1/products/${i}/sims`:"/v1/sims",h=i?{iccid:e,deviceId:t,deviceName:r,page:n,per_page:o}:void 0;return this.get({uri:c,auth:a,headers:s,query:h,context:u})}getSIMDataUsage({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/sims/${e}/data_usage`:`/v1/sims/${e}/data_usage`;return this.get({uri:i,auth:r,headers:n,context:o})}getFleetDataUsage({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}/sims/data_usage`,auth:t,headers:r,context:n})}checkSIM({iccid:e,auth:t,headers:r,context:n}){return this.head({uri:`/v1/sims/${e}`,auth:t,headers:r,context:n})}activateSIM({iccid:e,iccids:t,country:r,promoCode:n,product:o,auth:i,headers:a,context:s}){t=t||[e];const u=o?`/v1/products/${o}/sims`:`/v1/sims/${e}`,c=o?{sims:t,country:r}:{country:r,promoCode:n,action:"activate"},h=o?"post":"put";return this.request({uri:u,method:h,headers:a,data:c,auth:i,context:s})}deactivateSIM({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/sims/${e}`:`/v1/sims/${e}`;return this.put({uri:i,auth:r,headers:n,data:{action:"deactivate"},context:o})}reactivateSIM({iccid:e,mbLimit:t,product:r,auth:n,headers:o,context:i}){const a=r?`/v1/products/${r}/sims/${e}`:`/v1/sims/${e}`,s={mb_limit:t,action:"reactivate"};return this.put({uri:a,auth:n,headers:o,data:s,context:i})}updateSIM({iccid:e,mbLimit:t,product:r,auth:n,headers:o,context:i}){const a=r?`/v1/products/${r}/sims/${e}`:`/v1/sims/${e}`,s={mb_limit:t};return this.put({uri:a,auth:n,headers:o,data:s,context:i})}removeSIM({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/sims/${e}`:`/v1/sims/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listBuildTargets({onlyFeatured:e,auth:t,headers:r,context:n}){const o=e?{featured:!!e}:void 0;return this.get({uri:"/v1/build_targets",auth:t,headers:r,query:o,context:n})}listLibraries({page:e,limit:t,filter:r,sort:n,architectures:o,category:i,scope:a,excludeScopes:s,auth:u,headers:c,context:h}){return this.get({uri:"/v1/libraries",auth:u,headers:c,query:{page:e,filter:r,limit:t,sort:n,architectures:this._asList(o),category:i,scope:a,excludeScopes:this._asList(s)},context:h})}_asList(e){return Array.isArray(e)?e.join(","):e}getLibrary({name:e,version:t,auth:r,headers:n,context:o}){return this.get({uri:`/v1/libraries/${e}`,auth:r,headers:n,query:{version:t},context:o})}getLibraryVersions({name:e,page:t,limit:r,auth:n,headers:o,context:i}){return this.get({uri:`/v1/libraries/${e}/versions`,auth:n,headers:o,query:{page:t,limit:r},context:i})}contributeLibrary({archive:e,auth:t,headers:r,context:n}){const o={"archive.tar.gz":e};return this.request({uri:"/v1/libraries",method:"post",auth:t,headers:r,files:o,context:n})}publishLibrary({name:e,auth:t,headers:r,context:n}){return this.request({uri:`/v1/libraries/${e}`,method:"patch",auth:t,headers:r,data:{visibility:"public"},context:n})}deleteLibrary({name:e,force:t,auth:r,headers:n,context:o}){return this.delete({uri:`/v1/libraries/${e}`,auth:r,headers:n,data:{force:t},context:o})}downloadFile({uri:e,headers:t,context:r}){return this.request({uri:e,method:"get",headers:t,context:r,isBuffer:!0})}listOAuthClients({product:e,auth:t,headers:r,context:n}){const o=e?`/v1/products/${e}/clients`:"/v1/clients";return this.get({uri:o,auth:t,headers:r,context:n})}createOAuthClient({name:e,type:t,redirect_uri:r,scope:n,product:o,auth:i,headers:a,context:s}){const u=o?`/v1/products/${o}/clients`:"/v1/clients",c={name:e,type:t,redirect_uri:r,scope:n};return this.post({uri:u,auth:i,headers:a,data:c,context:s})}updateOAuthClient({clientId:e,name:t,scope:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/clients/${e}`:`/v1/clients/${e}`,u={name:t,scope:r};return this.put({uri:s,data:u,auth:o,headers:i,context:a})}deleteOAuthClient({clientId:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/clients/${e}`:`/v1/clients/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listProducts({auth:e,headers:t,context:r}){return this.get({uri:"/v1/products",auth:e,headers:t,context:r})}getProduct({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}`,auth:t,headers:r,context:n})}listProductFirmware({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}/firmware`,auth:t,headers:r,context:n})}uploadProductFirmware({file:e,version:t,title:r,description:n,product:o,auth:i,headers:a,context:s}){return this.request({uri:`/v1/products/${o}/firmware`,method:"post",auth:i,headers:a,form:{version:t,title:r,description:n},files:{"firmware.bin":e},context:s})}getProductFirmware({version:e,product:t,auth:r,headers:n,context:o}){return this.get({uri:`/v1/products/${t}/firmware/${e}`,auth:r,headers:n,context:o})}updateProductFirmware({version:e,title:t,description:r,product:n,auth:o,headers:i,context:a}){const s=`/v1/products/${n}/firmware/${e}`;return this.put({uri:s,auth:o,headers:i,data:{title:t,description:r},context:a})}downloadProductFirmware({version:e,product:t,auth:r,headers:n,context:o}){return this.request({uri:`/v1/products/${t}/firmware/${e}/binary`,method:"get",auth:r,headers:n,context:o,isBuffer:!0})}releaseProductFirmware({version:e,product:t,auth:r,headers:n,context:o}){const i=`/v1/products/${t}/firmware/release`;return this.put({uri:i,auth:r,headers:n,data:{version:e},context:o})}listTeamMembers({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}/team`,auth:t,headers:r,context:n})}inviteTeamMember({username:e,product:t,auth:r,headers:n,context:o}){return this.post({uri:`/v1/products/${t}/team`,auth:r,headers:n,data:{username:e},context:o})}removeTeamMember({username:e,product:t,auth:r,headers:n,context:o}){return this.delete({uri:`/v1/products/${t}/team/${e}`,auth:r,headers:n,context:o})}lookupSerialNumber({serialNumber:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/serial_numbers/${e}`,auth:t,headers:r,context:n})}createMeshNetwork({name:e,deviceId:t,iccid:r,auth:n,headers:o,context:i}){return this.post({uri:"/v1/networks",auth:n,headers:o,data:{name:e,device_id:t,iccid:r},context:i})}removeMeshNetwork({networkId:e,auth:t,headers:r,context:n}){return this.delete({uri:`/v1/networks/${e}`,auth:t,headers:r,context:n})}listMeshNetworks({page:e,perPage:t,auth:r,headers:n,context:o}){const i=e?{page:e,per_page:t}:void 0;return this.get({uri:"/v1/networks",auth:r,headers:n,query:i,context:o})}getMeshNetwork({networkId:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/networks/${e}`,auth:t,headers:r,context:n})}updateMeshNetwork({networkId:e,action:t,deviceId:r,auth:n,headers:o,context:i}){return this.put({uri:`/v1/networks/${e}`,auth:n,headers:o,data:{action:t,device_id:r},context:i})}addMeshNetworkDevice({networkId:e,deviceId:t,auth:r,headers:n,context:o}){return this.updateMeshNetwork({action:"add-device",networkId:e,deviceId:t,auth:r,headers:n,context:o})}removeMeshNetworkDevice({networkId:e,deviceId:t,auth:r,headers:n,context:o}){return e?this.updateMeshNetwork({action:"remove-device",networkId:e,deviceId:t,auth:r,headers:n,context:o}):this.delete({uri:`/v1/devices/${t}/network`,auth:r,headers:n,context:o})}listMeshNetworkDevices({networkId:e,role:t,page:r,perPage:n,auth:o,headers:i,context:a}){const s=t||r?{role:t,page:r,per_page:n}:void 0;return this.get({uri:`/v1/networks/${e}/devices`,auth:o,headers:i,query:s,context:a})}getProductConfiguration({auth:e,product:t,headers:r,context:n}){return this.get({uri:`/v1/products/${t}/config`,auth:e,headers:r,context:n})}getProductConfigurationSchema({auth:e,product:t,headers:r={},context:n}){return r.accept="application/schema+json",this.get({uri:`/v1/products/${t}/config`,auth:e,headers:r,context:n})}getProductDeviceConfiguration({auth:e,product:t,deviceId:r,headers:n,context:o}){return this.get({uri:`/v1/products/${t}/config/${r}`,auth:e,headers:n,context:o})}getProductDeviceConfigurationSchema({auth:e,product:t,deviceId:r,headers:n,context:o}){return n.accept="application/schema+json",this.get({uri:`/v1/products/${t}/config/${r}`,auth:e,headers:n,context:o})}setProductConfiguration({auth:e,product:t,config:r,headers:n,context:o}){return this.put({uri:`/v1/products/${t}/config`,auth:e,data:r,headers:n,context:o})}setProductDeviceConfiguration({auth:e,product:t,deviceId:r,config:n,headers:o,context:i}){return this.put({uri:`/v1/products/${t}/config/${r}`,data:n,auth:e,headers:o,context:i})}getProductLocations({auth:e,product:t,dateRange:r,rectBl:n,rectTr:o,deviceId:i,deviceName:a,groups:s,page:u,perPage:c,headers:h,context:l}){return this.get({uri:`/v1/products/${t}/locations`,query:{date_range:r,rect_bl:n,rect_tr:o,device_id:i,device_name:a,groups:s,page:u,per_page:c},auth:e,headers:h,context:l})}getProductDeviceLocations({auth:e,product:t,dateRange:r,rectBl:n,rectTr:o,deviceId:i,headers:a,context:s}){return this.get({uri:`/v1/products/${t}/locations/${i}`,query:{date_range:r,rect_bl:n,rect_tr:o},auth:e,headers:a,context:s})}executeLogic({auth:e,org:t,logic:r,headers:n,context:o}){return this.post({uri:this._namespacedPath(t,"logic/execute"),auth:e,data:r,headers:n,context:o})}createLogicFunction({auth:e,org:t,logicFunction:r,headers:n,context:o}){return this.post({uri:this._namespacedPath(t,"logic/functions"),auth:e,data:{logic_function:r},headers:n,context:o})}getLogicFunction({auth:e,org:t,logicFunctionId:r,headers:n,context:o}){return this.get({uri:this._namespacedPath(t,`logic/functions/${r}`),auth:e,headers:n,context:o})}updateLogicFunction({auth:e,org:t,logicFunctionId:r,logicFunction:n,headers:o,context:i}){return this.put({uri:this._namespacedPath(t,`logic/functions/${r}`),auth:e,data:{logic_function:n},headers:o,context:i})}deleteLogicFunction({auth:e,org:t,logicFunctionId:r,headers:n,context:o}){return this.delete({uri:this._namespacedPath(t,`logic/functions/${r}`),auth:e,headers:n,context:o})}listLogicFunctions({auth:e,org:t,todayStats:r,headers:n,context:o}){return this.get({uri:this._namespacedPath(t,"logic/functions"),query:{today_stats:r},auth:e,headers:n,context:o})}listLogicRuns({auth:e,org:t,logicFunctionId:r,headers:n,context:o}){return this.get({uri:this._namespacedPath(t,`logic/functions/${r}/runs`),auth:e,headers:n,context:o})}getLogicRun({auth:e,org:t,logicFunctionId:r,logicRunId:n,headers:o,context:i}){return this.get({uri:this._namespacedPath(t,`logic/functions/${r}/runs/${n}`),auth:e,headers:o,context:i})}getLogicRunLogs({auth:e,org:t,logicFunctionId:r,logicRunId:n,headers:o,context:i}){return this.get({uri:this._namespacedPath(t,`logic/functions/${r}/runs/${n}/logs`),auth:e,headers:o,context:i})}createLedger({auth:e,org:t,ledger:r,headers:n,context:o}){return this.post({uri:this._namespacedPath(t,"ledgers"),auth:e,data:{ledger:r},headers:n,context:o})}getLedger({auth:e,org:t,ledgerName:r,headers:n,context:o}){return this.get({uri:this._namespacedPath(t,`ledgers/${r}`),auth:e,headers:n,context:o})}updateLedger({auth:e,org:t,ledgerName:r,ledger:n,headers:o,context:i}){return this.put({uri:this._namespacedPath(t,`ledgers/${r}`),auth:e,data:{ledger:n},headers:o,context:i})}archiveLedger({auth:e,org:t,ledgerName:r,headers:n,context:o}){return this.delete({uri:this._namespacedPath(t,`ledgers/${r}`),auth:e,headers:n,context:o})}listLedgers({auth:e,org:t,scope:r,page:n,perPage:o,archived:i,headers:a,context:s}){return this.get({uri:this._namespacedPath(t,"ledgers"),query:{scope:r,page:n,per_page:o,archived:i},auth:e,headers:a,context:s})}getLedgerInstance({auth:e,org:t,ledgerName:r,scopeValue:n,headers:o,context:i}){return this.get({uri:this._namespacedPath(t,`ledgers/${r}/instances/${n}`),auth:e,headers:o,context:i})}setLedgerInstance({auth:e,org:t,ledgerName:r,scopeValue:n,data:o,headers:i,context:a}){return this.put({uri:this._namespacedPath(t,`ledgers/${r}/instances/${n}`),auth:e,data:{data:o},headers:i,context:a})}deleteLedgerInstance({auth:e,org:t,ledgerName:r,scopeValue:n,headers:o,context:i}){return this.delete({uri:this._namespacedPath(t,`ledgers/${r}/instances/${n}`),auth:e,headers:o,context:i})}listLedgerInstances({auth:e,org:t,ledgerName:r,page:n,perPage:o,headers:i,context:a}){return this.get({uri:this._namespacedPath(t,`ledgers/${r}/instances`),query:{page:n,per_page:o},auth:e,headers:i,context:a})}setDefaultAuth(e){if("string"==typeof e&&0!==e.length)this._defaultAuth=e;else{if("object"!=typeof e||!("username"in e)||!("password"in e))throw new Error("Must pass a non-empty string or object with username and password for basic auth!");this._defaultAuth=e}}_getActiveAuthToken(e){return e||this._defaultAuth}deviceUri({deviceId:e,product:t}){return t?`/v1/products/${t}/devices/${e}`:`/v1/devices/${e}`}_namespacedPath(e,t){return e?`/v1/orgs/${e}/${t}`:`/v1/${t}`}get({uri:e,auth:t,headers:r,query:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.get({uri:e,auth:t,headers:r,query:n,context:o})}head({uri:e,auth:t,headers:r,query:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.head({uri:e,auth:t,headers:r,query:n,context:o})}post({uri:e,auth:t,headers:r,data:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.post({uri:e,auth:t,headers:r,data:n,context:o})}put({uri:e,auth:t,headers:r,data:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.put({uri:e,auth:t,headers:r,data:n,context:o})}delete({uri:e,auth:t,headers:r,data:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.delete({uri:e,auth:t,headers:r,data:n,context:o})}request(e){return e.context=this._buildContext(e.context),e.auth=this._getActiveAuthToken(e.auth),this.agent.request(e)}client(e={}){return new a(Object.assign({api:this},e))}setBaseUrl(e){this.baseUrl=e,this.agent.setBaseUrl(e)}}s.prototype.removeAccessToken=s.prototype.deleteAccessToken,e.exports=s},7165:()=>{},1408:()=>{},3646:()=>{},5014:()=>{},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"particle-api-js","version":"10.3.1","description":"Particle API Client","main":"src/Particle.js","scripts":{"prepublish":"npm run lint && npm run build","test":"npm run lint && npm run typecheck && npm run test:unit","test:ci":"npm run lint && npm run test:unit -- --forbid-only && npm run coverage","test:unit":"mocha test/ -R spec","test:unit:silent":"npm run test:unit > tmp/test-unit-log.txt 2>&1","test:browser":"karma start --single-run","test:watch":"npm run test:unit -- --watch","typecheck":"tsc --noEmit","coverage":"nyc --reporter=text --include=\'src/**/*.js\' --temp-dir=./tmp/ --check-coverage --lines 91 npm run test:unit:silent","lint":"eslint . --ext .js --format unix --ignore-path .gitignore --ignore-pattern \\"dist/*\\"","lint:fix":"npm run lint -- --fix","docs":"documentation build src/Particle.js --shallow -g -f md -o docs/api.md","build":"webpack --env mode=production","build-nomin":"webpack --env mode=development","preversion":"npm run test && npm run prepublish","reinstall":"rm -rf ./node_modules && npm i","version":"npm run build && npm run docs && npm run update-changelog && git add dist/* docs/*","update-changelog":"VERSION=`node -p -e \\"require(\'./package.json\').version\\"` bash -c \'read -p \\"Update CHANGELOG.md for version $VERSION and press ENTER when done.\\"\' && git add CHANGELOG.md"},"repository":{"type":"git","url":"https://github.com/particle-iot/particle-api-js"},"author":"Julien Vanier ","contributors":["Ido Kleinman","Bryce Kahle","Justin Debbink","Matthew McGowan","Julien Vanier","Wojtek Siudzinski","Emily Rose"],"keywords":["particle","library","spark","api"],"license":"Apache-2.0","devDependencies":{"@types/node":"^20.5.9","buffer":"^6.0.3","chai":"^4.3.6","chai-as-promised":"^7.1.1","documentation":"^4.0.0-rc.1","eslint":"^8.17.0","eslint-config-particle":"^2.2.1","events":"^3.3.0","karma":"^1.1.1","karma-chai":"^0.1.0","karma-cli":"^1.0.1","karma-coverage":"^1.1.0","karma-firefox-launcher":"^1.0.0","karma-mocha":"^1.1.1","karma-webpack":"^5.0.0","mocha":"^2.5.1","nyc":"^15.1.0","process":"^0.11.10","should":"^9.0.0","sinon":"^7.2.5","sinon-chai":"^3.7.0","terser-webpack-plugin":"^5.3.9","typescript":"^5.2.2","url":"^0.11.3","webpack":"^5.88.2","webpack-cli":"^5.1.4"},"dependencies":{"form-data":"^4.0.0","node-fetch":"^2.7.0","qs":"^6.11.2","stream-http":"^3.2.0"},"browser":{"./fs":false,"http":"stream-http","https":"stream-http"},"engines":{"node":">=12.x","npm":"8.x"}}')}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n=r(7845);Particle=n})(); +var Particle;(()=>{var e={9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),h=0,l=u>0?a-4:a;for(r=0;r>16&255,c[h++]=t>>8&255,c[h++]=255&t;2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[h++]=255&t);1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[h++]=t>>8&255,c[h++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,c=n-o;sc?c:s+a));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),o=r(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const o=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||J(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return h(e),s(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(o)return n?-1:G(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){let i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;is&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;no&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),c=this.slice(n,o),h=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function O(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;on)&&(r=n);let o="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function C(e,t,r,n,o){F(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function M(e,t,r,n,o){F(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function N(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,0,r,8),o.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],o=1,i=0;for(;++i=o&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||j(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Q((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Q((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Q((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Q((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function F(e,t,r,n,o,i){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new $.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||W(t,e.length-(r+1))}(n,o,i)}function H(e,t){if("number"!=typeof e)throw new $.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new $.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},584:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},1924:(e,t,r)=>{"use strict";var n=r(210),o=r(5559),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),o=r(210),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),h=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,a,arguments);u&&c&&(u(t,"length").configurable&&c(t,"length",{value:1+h(0,e.length-(arguments.length-1))}));return t};var l=function(){return s(n,i,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}y(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,r)}(e,o,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var o,i,a,c;if(s(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),void 0===a)a=i[t]=r,++e._eventsCount;else if("function"==typeof a?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=u(e))>0&&a.length>o&&!a.warned){a.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=a.length,c=h,console&&console.warn&&console.warn(c)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=h.bind(n);return o.listener=r,n.wrapFn=o,o}function f(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,h=p(u,c);for(r=0;r=0;i--)if(r[i]===t||r[i].listener===t){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},6230:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},7648:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,i=t.call(arguments,1),a=Math.max(0,n.length-i.length),s=[],u=0;u{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},210:(e,t,r)=>{"use strict";var n,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new a},h=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,l=r(1405)(),f=r(8185)(),d=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),p={},y="undefined"!=typeof Uint8Array&&d?d(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":l&&d?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l&&d?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l&&d?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l&&d?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l&&d?d(""[Symbol.iterator]()):n,"%Symbol%":l?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":h,"%TypedArray%":y,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(d)try{null.error}catch(e){var m=d(d(e));g["%Error.prototype%"]=m}var v=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&d&&(r=d(o.prototype))}return g[t]=r,r},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=r(8612),_=r(7642),x=w.call(Function.call,Array.prototype.concat),S=w.call(Function.apply,Array.prototype.splice),E=w.call(Function.call,String.prototype.replace),A=w.call(Function.call,String.prototype.slice),T=w.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g,k=function(e,t){var r,n=e;if(_(b,n)&&(n="%"+(r=b[n])[0]+"%"),_(g,n)){var i=g[n];if(i===p&&(i=v(n)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=A(e,0,1),r=A(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return E(e,R,(function(e,t,r,o){n[n.length]=r?E(o,O,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=k("%"+n+"%",t),s=i.name,c=i.value,h=!1,l=i.alias;l&&(n=l[0],S(r,x([0,1],l)));for(var f=1,d=!0;f=r.length){var v=u(c,p);c=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[p]}else d=_(c,p),c=c[p];d&&!h&&(g[s]=c)}}return c}},8185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},1405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(5419);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7642:(e,t,r)=>{"use strict";var n=r(8612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},645:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<>1,h=-7,l=r?o-1:0,f=r?-1:1,d=e[t+l];for(l+=f,i=d&(1<<-h)-1,d>>=-h,h+=s;h>0;i=256*i+e[t+l],l+=f,h-=8);for(a=i&(1<<-h)-1,i>>=-h,h+=n;h>0;a=256*a+e[t+l],l+=f,h-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=c}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,h=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?f/u:f*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=h?(s=0,a=h):a+l>=1?(s=(t*u-1)*Math.pow(2,o),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=p,s/=256,o-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*y}},3300:(e,t,r)=>{"use strict";var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},4155:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,u=[],c=!1,h=-1;function l(){c&&s&&(c=!1,s.length?u=s.concat(u):h=-1,u.length&&f())}function f(){if(!c){var e=a(l);c=!0;for(var t=u.length;t;){for(s=u,u=[];++h1)for(var r=1;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=u-c,_=Math.floor,x=String.fromCharCode;function S(e){throw new RangeError(b[e])}function E(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function A(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+E((e=e.replace(v,".")).split("."),t).join(".")}function T(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=x(e)})).join("")}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,r){var n=0;for(e=r?_(e/f):e>>1,e+=_(e/t);e>w*h>>1;n+=u)e=_(e/w);return _(n+(w+1)*e/(e+l))}function I(e){var t,r,n,o,i,a,l,f,g,m,v,b=[],w=e.length,x=0,E=p,A=d;for((r=e.lastIndexOf(y))<0&&(r=0),n=0;n=128&&S("not-basic"),b.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=w&&S("invalid-input"),((f=(v=e.charCodeAt(o++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:u)>=u||f>_((s-x)/a))&&S("overflow"),x+=f*a,!(f<(g=l<=A?c:l>=A+h?h:l-A));l+=u)a>_(s/(m=u-g))&&S("overflow"),a*=m;A=k(x-i,t=b.length+1,0==i),_(x/t)>s-E&&S("overflow"),E+=_(x/t),x%=t,b.splice(x++,0,E)}return R(b)}function P(e){var t,r,n,o,i,a,l,f,g,m,v,b,w,E,A,R=[];for(b=(e=T(e)).length,t=p,r=0,i=d,a=0;a=t&&v_((s-r)/(w=n+1))&&S("overflow"),r+=(l-t)*w,t=l,a=0;as&&S("overflow"),v==t){for(f=r,g=u;!(f<(m=g<=i?c:g>=i+h?h:g-i));g+=u)A=f-m,E=u-m,R.push(x(O(m+A%E,0))),f=_(A/E);R.push(x(O(f,0))),i=k(r,w,n==o),r=0,++n}++r,++t}return R.join("")}a={version:"1.4.1",ucs2:{decode:T,encode:R},decode:I,encode:P,toASCII:function(e){return A(e,(function(e){return m.test(e)?"xn--"+P(e):e}))},toUnicode:function(e){return A(e,(function(e){return g.test(e)?I(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},5798:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:o}},129:(e,t,r)=>{"use strict";var n=r(8261),o=r(5235),i=r(5798);e.exports={formats:i,parse:o,stringify:n}},5235:(e,t,r)=>{"use strict";var n=r(2769),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,h=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;h.push(c)}for(var l=0;r.depth>0&&null!==(s=a.exec(i))&&l=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,h=parseInt(c,10);r.parseArrays||""!==c?!isNaN(h)&&s!==c&&String(h)===c&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(a=[])[h]=o:"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o}(h,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var h="string"==typeof e?function(e,t){var r,c={__proto__:null},h=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,f=h.split(t.delimiter,l),d=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(g=i(g)?[g]:g),o.call(c,y)?c[y]=n.combine(c[y],g):c[y]=g}return c}(e,r):e,l=r.plainObjects?Object.create(null):{},f=Object.keys(h),d=0;d{"use strict";var n=r(7478),o=r(2769),i=r(5798),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,h=function(e,t){c.apply(e,u(t)?t:[t])},l=Date.prototype.toISOString,f=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:f,formatter:i.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},p={},y=function e(t,r,i,a,s,c,l,f,y,g,m,v,b,w,_,x){for(var S,E=t,A=x,T=0,R=!1;void 0!==(A=A.get(p))&&!R;){var O=A.get(t);if(T+=1,void 0!==O){if(O===T)throw new RangeError("Cyclic object value");R=!0}void 0===A.get(p)&&(T=0)}if("function"==typeof f?E=f(r,E):E instanceof Date?E=m(E):"comma"===i&&u(E)&&(E=o.maybeMap(E,(function(e){return e instanceof Date?m(e):e}))),null===E){if(s)return l&&!w?l(r,d.encoder,_,"key",v):r;E=""}if("string"==typeof(S=E)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||o.isBuffer(E))return l?[b(w?r:l(r,d.encoder,_,"key",v))+"="+b(l(E,d.encoder,_,"value",v))]:[b(r)+"="+b(String(E))];var k,I=[];if(void 0===E)return I;if("comma"===i&&u(E))w&&l&&(E=o.maybeMap(E,l)),k=[{value:E.length>0?E.join(",")||null:void 0}];else if(u(f))k=f;else{var P=Object.keys(E);k=y?P.sort(y):P}for(var j=a&&u(E)&&1===E.length?r+"[]":r,L=0;L0?_+w:""}},2769:(e,t,r)=>{"use strict";var n=r(5798),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===n.RFC1738&&(40===h||41===h)?u+=s.charAt(c):h<128?u+=a[h]:h<2048?u+=a[192|h>>6]+a[128|63&h]:h<55296||h>=57344?u+=a[224|h>>12]+a[128|h>>6&63]+a[128|63&h]:(c+=1,h=65536+((1023&h)<<10|1023&s.charCodeAt(c)),u+=a[240|h>>18]+a[128|h>>12&63]+a[128|h>>6&63]+a[128|63&h])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n{"use strict";var n=r(210),o=r(1924),i=r(7470),a=n("%TypeError%"),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),h=o("WeakMap.prototype.set",!0),l=o("WeakMap.prototype.has",!0),f=o("Map.prototype.get",!0),d=o("Map.prototype.set",!0),p=o("Map.prototype.has",!0),y=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+i(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(u){if(t)return f(t,n)}else if(r)return function(e,t){var r=y(e,t);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return l(e,n)}else if(u){if(t)return p(t,n)}else if(r)return function(e,t){return!!y(e,t)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),h(e,n,o)):u?(t||(t=new u),d(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=y(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n}},7470:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,h=s&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,_=String.prototype.toLowerCase,x=RegExp.prototype.test,S=Array.prototype.concat,E=Array.prototype.join,A=Array.prototype.slice,T=Math.floor,R="function"==typeof BigInt?BigInt.prototype.valueOf:null,O=Object.getOwnPropertySymbols,k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||"symbol")?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,L=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function C(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-T(-e):T(e);if(n!==e){var o=String(n),i=v.call(t,o.length+1);return b.call(o,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var M=r(7165),N=M.custom,B=F(N)?N:null;function U(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function $(e){return b.call(String(e),/"/g,""")}function D(e){return!("[object Array]"!==V(e)||P&&"object"==typeof e&&P in e)}function q(e){return!("[object RegExp]"!==V(e)||P&&"object"==typeof e&&P in e)}function F(e){if(I)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,o){var s=r||{};if(W(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!W(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return z(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return y?C(t,w):w}if("bigint"==typeof t){var x=String(t)+"n";return y?C(t,x):x}var T=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=T&&T>0&&"object"==typeof t)return D(t)?"[Array]":"[Object]";var O=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=E.call(Array(e.indent+1)," ")}return{base:r,prev:E.call(Array(t+1),r)}}(s,n);if(void 0===o)o=[];else if(G(o,t)>=0)return"[Circular]";function N(t,r,i){if(r&&(o=A.call(o)).push(r),i){var a={depth:s.depth};return W(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,n+1,o)}return e(t,s,n+1,o)}if("function"==typeof t&&!q(t)){var H=function(e){if(e.name)return e.name;var t=m.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),K=Z(t,N);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(K.length>0?" { "+E.call(K,", ")+" }":"")}if(F(t)){var ee=I?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):k.call(t);return"object"!=typeof t||I?ee:Y(ee)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var te="<"+_.call(String(t.nodeName)),re=t.attributes||[],ne=0;ne"}if(D(t)){if(0===t.length)return"[]";var oe=Z(t,N);return O&&!function(e){for(var t=0;t=0)return!1;return!0}(oe)?"["+Q(oe,O)+"]":"[ "+E.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||P&&"object"==typeof e&&P in e)}(t)){var ie=Z(t,N);return"cause"in Error.prototype||!("cause"in t)||j.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+E.call(ie,", ")+" }":"{ ["+String(t)+"] "+E.call(S.call("[cause]: "+N(t.cause),ie),", ")+" }"}if("object"==typeof t&&u){if(B&&"function"==typeof t[B]&&M)return M(t,{depth:T-n});if("symbol"!==u&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return a&&a.call(t,(function(e,r){ae.push(N(r,t,!0)+" => "+N(e,t))})),X("Map",i.call(t),ae,O)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var se=[];return h&&h.call(t,(function(e){se.push(N(e,t))})),X("Set",c.call(t),se,O)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e,l);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{l.call(e,l)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return!("[object Number]"!==V(e)||P&&"object"==typeof e&&P in e)}(t))return Y(N(Number(t)));if(function(e){if(!e||"object"!=typeof e||!R)return!1;try{return R.call(e),!0}catch(e){}return!1}(t))return Y(N(R.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||P&&"object"==typeof e&&P in e)}(t))return Y(p.call(t));if(function(e){return!("[object String]"!==V(e)||P&&"object"==typeof e&&P in e)}(t))return Y(N(String(t)));if(!function(e){return!("[object Date]"!==V(e)||P&&"object"==typeof e&&P in e)}(t)&&!q(t)){var ue=Z(t,N),ce=L?L(t)===Object.prototype:t instanceof Object||t.constructor===Object,he=t instanceof Object?"":"null prototype",le=!ce&&P&&Object(t)===t&&P in t?v.call(V(t),8,-1):he?"Object":"",fe=(ce||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(le||he?"["+E.call(S.call([],le||[],he||[]),": ")+"] ":"");return 0===ue.length?fe+"{}":O?fe+"{"+Q(ue,O)+"}":fe+"{ "+E.call(ue,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return H.call(e,t)}function V(e){return y.call(e)}function G(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return z(v.call(e,0,t.maxStringLength),t)+n}return U(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Y(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function X(e,t,r,n){return e+" ("+t+") {"+(n?Q(r,n):E.call(r,", "))+"}"}function Q(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+E.call(e,","+r)+"\n"+t.prev}function Z(e,t){var r=D(e),n=[];if(r){n.length=e.length;for(var o=0;o{var n=r(1989),o=r(5676),i=r(8234),a=r(584),s=r(8575),u=t;u.request=function(e,t){e="string"==typeof e?s.parse(e):i(e);var o=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||o,u=e.hostname||e.host,c=e.port,h=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+h,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var l=new n(e);return t&&l.on("response",t),l},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=o.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(e,t,r)=>{var n;function o(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function i(e){var t=o();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),t.writableStream=a(r.g.WritableStream),t.abortController=a(r.g.AbortController),t.arraybuffer=t.fetch||i("arraybuffer"),t.msstream=!t.fetch&&i("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!o()&&a(o().overrideMimeType),n=null},1989:(e,t,r)=>{var n=r(8764).Buffer,o=r(4155),i=r(8725),a=r(1183),s=r(5676),u=r(925),c=s.IncomingMessage,h=s.readyStates;var l=e.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+n.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var o=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)o=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":"text"}(t,o),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};a(l,u.Writable),l.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===f.indexOf(r)&&(this._headers[r]={name:e,value:t})},l.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},l.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},l.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach((function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach((function(e){s.push([t,e])})):s.push([t,r])})),"fetch"===e._mode){var u=null;if(i.abortController){var c=new AbortController;u=c.signal,e._fetchAbortController=c,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var l=e._xhr=new r.g.XMLHttpRequest;try{l.open(e._opts.method,e._opts.url,!0)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}"responseType"in l&&(l.responseType=e._mode),"withCredentials"in l&&(l.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in l&&l.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(l.timeout=t.requestTimeout,l.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){l.setRequestHeader(e[0],e[1])})),e._response=null,l.onreadystatechange=function(){switch(l.readyState){case h.LOADING:case h.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(l.onprogress=function(){e._onXHRProgress()}),l.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{l.send(a)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}}}},l.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},l.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},l.prototype._write=function(e,t,r){this._body.push(e),r()},l.prototype._resetTimers=function(e){var t=this;r.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(r.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=r.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},l.prototype.abort=l.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},l.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},l.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},l.prototype.flushHeaders=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},5676:(e,t,r)=>{var n=r(4155),o=r(8764).Buffer,i=r(8725),a=r(1183),s=r(925),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(e,t,r,a){var u=this;if(s.Readable.call(u),u._mode=r,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){n.nextTick((function(){u.emit("close")}))})),"fetch"===r){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),i.writableStream){var c=new WritableStream({write:function(e){return a(!1),new Promise((function(t,r){u._destroyed?r():u.push(o.from(e))?t():u._resumeFetch=t}))},close:function(){a(!0),u._destroyed||u.push(null)},abort:function(e){a(!0),u._destroyed||u.emit("error",e)}});try{return void t.body.pipeTo(c).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var h=t.body.getReader();!function e(){h.read().then((function(t){u._destroyed||(a(t.done),t.done?u.push(null):(u.push(o.from(t.value)),e()))})).catch((function(e){a(!0),u._destroyed||u.emit("error",e)}))}()}else{if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!i.overrideMimeType){var l=u.rawHeaders["mime-type"];if(l){var f=l.match(/;\s*charset=([^;])(;|$)/);f&&(u._charset=f[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(e){var t=this,n=t._xhr,i=null;switch(t._mode){case"text":if((i=n.responseText).length>t._pos){var a=i.substr(t._pos);if("x-user-defined"===t._charset){for(var s=o.alloc(a.length),c=0;ct._pos&&(t.push(o.from(new Uint8Array(h.result.slice(t._pos)))),t._pos=h.result.byteLength)},h.onload=function(){e(!0),t.push(null)},h.readAsArrayBuffer(i)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},1183:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},7303:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var o=function(e){var t,n;function o(t,n,o){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,o))||this}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,o}(n);o.prototype.name=n.name,o.prototype.code=e,t[e]=o}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var o,i,a,s;if("string"==typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(o," ").concat(n(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(n(t,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},9560:(e,t,r)=>{"use strict";var n=r(4155),o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var i=r(4002),a=r(3313);r(1183)(h,i);for(var s=o(a.prototype),u=0;u{"use strict";e.exports=o;var n=r(1846);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}r(1183)(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},4002:(e,t,r)=>{"use strict";var n,o=r(4155);e.exports=A,A.ReadableState=E;r(7187).EventEmitter;var i=function(e,t){return e.listeners(t).length},a=r(1463),s=r(8764).Buffer,u=r.g.Uint8Array||function(){};var c,h=r(3646);c=h&&h.debuglog?h.debuglog("stream"):function(){};var l,f,d,p=r(6641),y=r(3369),g=r(624).getHighWaterMark,m=r(7303).q,v=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1183)(A,a);var x=y.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(e,t,o){n=n||r(9560),e=e||{},"boolean"!=typeof o&&(o=t instanceof n),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",o),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(636).s),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function A(e){if(n=n||r(9560),!(this instanceof A))return new A(e);var t=this instanceof n;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function T(e,t,r,n,o){c("readableAddChunk",t);var i,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?I(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}(e,a);else if(o||(i=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(a,t)),i)x(e,i);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?x(e,new _):R(e,a,t,!0);else if(a.ended)x(e,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?R(e,a,t,!1):j(e,a)):R(e,a,t,!1)}else n||(a.reading=!1,j(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(P,e))}function P(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,B(e)}function j(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){c("readable nexttick read 0"),e.read(0)}function N(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),B(e),t.flowing&&!t.reading&&e.read(0)}function B(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function U(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function $(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick(D,t,e))}function D(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function q(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?$(this):I(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&$(this),null;var n,o=t.needReadable;return c("need readable",o),(0===t.length||t.length-e0?U(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&$(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){x(this,new w("_read()"))},A.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,c("pipe count=%d opts=%j",n.pipesCount,t);var a=(!t||!1!==t.end)&&e!==o.stdout&&e!==o.stderr?u:g;function s(t,o){c("onunpipe"),t===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",d),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",f),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){c("onend"),e.end()}n.endEmitted?o.nextTick(a):r.once("end",a),e.on("unpipe",s);var h=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,B(e))}}(r);e.on("drain",h);var l=!1;function f(t){c("ondata");var o=e.write(t);c("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==q(n.pipes,e))&&!l&&(c("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){c("onerror",t),g(),e.removeListener("error",d),0===i(e,"error")&&x(e,t)}function p(){e.removeListener("finish",y),g()}function y(){c("onfinish"),e.removeListener("close",p),g()}function g(){c("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",p),e.once("finish",y),e.emit("pipe",r),n.flowing||(c("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c("on readable",n.length,n.reading),n.length?I(this):n.reading||o.nextTick(M,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick(C,this),r},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||o.nextTick(C,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(N,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(c("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o)||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i{"use strict";e.exports=h;var n=r(7303).q,o=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(9560);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length{"use strict";var n,o=r(4155);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=A,A.WritableState=E;var a={deprecate:r(4927)},s=r(1463),u=r(8764).Buffer,c=r.g.Uint8Array||function(){};var h,l=r(3369),f=r(624).getHighWaterMark,d=r(7303).q,p=d.ERR_INVALID_ARG_TYPE,y=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,v=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,x=l.errorOrDestroy;function S(){}function E(e,t,a){n=n||r(9560),e=e||{},"boolean"!=typeof a&&(a=t instanceof n),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(P,e,t),e._writableState.errorEmitted=!0,x(e,n)):(i(n),e._writableState.errorEmitted=!0,x(e,n),P(e,t))}(e,r,n,t,i);else{var a=k(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||O(e,r),n?o.nextTick(R,e,r,a,i):R(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function A(e){var t=this instanceof(n=n||r(9560));if(!t&&!h.call(A,this))return new A(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function T(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function R(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),P(e,t)}function O(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,T(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,h=r.encoding,l=r.callback;if(T(e,t,!1,t.objectMode?1:c.length,c,h,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),P(e,t)}))}function P(e,t){var r=k(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(I,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(1183)(A,s),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===A&&(e&&e._writableState instanceof E)}})):h=function(e){return e instanceof this},A.prototype.pipe=function(){x(this,new m)},A.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=e,u.isBuffer(n)||n instanceof c);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=S),i.ending?function(e,t){var r=new w;x(e,r),o.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i;return null===r?i=new b:"string"==typeof r||t.objectMode||(i=new p("chunk",["string","Buffer"],r)),!i||(x(e,i),o.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,o,i){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,o);n!==a&&(r=!0,o="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new y("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(e,t){t(e)}},6819:(e,t,r)=>{"use strict";var n,o=r(4155);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(5467),s=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),h=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function y(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[l]=null,e[s]=null,e[u]=null,t(p(r,!1)))}}function g(e){o.nextTick(y,e)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[d]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[h])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){o.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[h]?r(p(void 0,!0)):t[f](r,n)}),n)}}(n,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(p(i,!1));r=new Promise(this[f])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),m);e.exports=function(e){var t,r=Object.create(v,(i(t={},d,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,h,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var n=r[d].read();n?(r[l]=null,r[s]=null,r[u]=null,e(p(n,!1))):(r[s]=e,r[u]=t)},writable:!0}),t));return r[l]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[l]=null,r[s]=null,r[u]=null,t(e)),void(r[c]=e)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[h]=!0})),e.on("readable",g.bind(null,r)),r}},6641:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){for(var r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,o=a.allocUnsafe(e>>>0),i=this.head,s=0;i;)t=i.data,r=o,n=s,a.prototype.copy.call(t,r,n),s+=i.data.length,i=i.next;return o}},{key:"consume",value:function(e,t){var r;return eo.length?o.length:e;if(i===o.length?n+=o:n+=o.slice(0,e),0==(e-=i)){i===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0==(e-=i)){i===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(i));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t{"use strict";var n=r(4155);function o(e,t){a(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(i,r):(r._writableState.errorEmitted=!0,n.nextTick(o,r,e)):n.nextTick(o,r,e):t?(n.nextTick(i,r),t(e)):n.nextTick(i,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},5467:(e,t,r)=>{"use strict";var n=r(7303).q.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9689:(e,t,r)=>{"use strict";var n;var o=r(7303).q,i=o.ERR_MISSING_ARGS,a=o.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),o=0;o0,(function(e){h||(h=e),e&&f.forEach(u),i||(f.forEach(u),l(h))}))}));return t.reduce(c)}},624:(e,t,r)=>{"use strict";var n=r(7303).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(o?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},1463:(e,t,r)=>{e.exports=r(7187).EventEmitter},925:(e,t,r)=>{(t=e.exports=r(4002)).Stream=t,t.Readable=t,t.Writable=r(3313),t.Duplex=r(9560),t.Transform=r(1846),t.PassThrough=r(4842),t.finished=r(5467),t.pipeline=r(9689)},3738:(e,t,r)=>{var n=r(8764),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},636:(e,t,r)=>{"use strict";var n=r(3738).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=h,this.end=l,t=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function h(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return o>0&&(e.lastNeed=o-1),o;if(--n=0)return o>0&&(e.lastNeed=o-2),o;if(--n=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8234:e=>{e.exports=function(){for(var e={},r=0;r{"use strict";var n=r(4971);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var i=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),h=["%","/","?",";","#"].concat(c),l=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(129);function v(e,t,r){if(e&&"object"==typeof e&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o127?j+="x":j+=P[L];if(!j.match(f)){var M=k.slice(0,T),N=k.slice(T+1),B=P.match(d);B&&(M.push(B[1]),N.unshift(B[2])),N.length&&(v="/"+N.join(".")+v),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var U=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+U,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!p[_])for(T=0,I=c.length;T0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=x.slice(-1)[0],A=(r.host||e.host||x.length>1)&&("."===E||".."===E)||""===E,T=0,R=x.length;R>=0;R--)"."===(E=x[R])?x.splice(R,1):".."===E?(x.splice(R,1),T++):T&&(x.splice(R,1),T--);if(!w&&!_)for(;T--;T)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),A&&"/"!==x.join("/").substr(-1)&&x.push("");var O,k=""===x[0]||x[0]&&"/"===x[0].charAt(0);S&&(r.hostname=k?"":x.length?x.shift():"",r.host=r.hostname,(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname));return(w=w||r.host&&x.length)&&!k&&x.unshift(""),x.length>0?r.pathname=x.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return"string"==typeof e&&(e=v(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},7731:(e,t,r)=>{var n=r(8764).Buffer;const o=r(3300),i=r(6230),a=r(129),s=r(5014),u=r(4147);e.exports=class{constructor(e){this.setBaseUrl(e)}setBaseUrl(e){this.baseUrl=e}get({uri:e,auth:t,headers:r,query:n,context:o}){return this.request({uri:e,method:"get",auth:t,headers:r,query:n,context:o})}head({uri:e,auth:t,headers:r,query:n,context:o}){return this.request({uri:e,method:"head",auth:t,headers:r,query:n,context:o})}post({uri:e,headers:t,data:r,auth:n,context:o}){return this.request({uri:e,method:"post",auth:n,headers:t,data:r,context:o})}put({uri:e,auth:t,headers:r,data:n,context:o}){return this.request({uri:e,method:"put",auth:t,headers:r,data:n,context:o})}delete({uri:e,auth:t,headers:r,data:n,context:o}){return this.request({uri:e,method:"delete",auth:t,headers:r,data:n,context:o})}request({uri:e,method:t,headers:r,data:n,auth:o,query:i,form:a,files:s,context:u,isBuffer:c=!1}){const h=this._sanitizeFiles(s),l=this._buildRequest({uri:e,method:t,headers:r,data:n,auth:o,query:i,form:a,context:u,files:h});return this._promiseResponse(l,c)}_promiseResponse(e,t,r=o){let i;return r(...e).then((e=>(i=e.status,e.ok?204===i?"":t?e.blob():e.json():e.text().then((t=>{const r=JSON.parse(t),n=Object.assign(e,{text:t});throw Object.assign(r,{response:n})}))))).then((e=>t?e.arrayBuffer().then((e=>this.isForBrowser()?e:n.from(e))):{body:e,statusCode:i})).catch((t=>{let r,n=`${i?`HTTP error ${i}`:"Network error"} from ${e[0]}`;t.error_description&&(n=`${n} - ${t.error_description}`,r=t.error_description);const o=new Error(n);throw Object.assign(o,{statusCode:i,errorDescription:n,shortErrorDescription:r,error:t,body:t}),o}))}_buildRequest({uri:e,method:t,headers:r,data:n,auth:o,query:i,form:s,files:c,context:h}){let l=e;if(this.baseUrl&&"/"===e[0]&&(l=`${this.baseUrl}${e}`),i){const e=a.stringify(i),t=l.includes("?");l=`${l}${t?"&":"?"}${e}`}const f={"User-Agent":`${u.name}/${u.version} (${u.repository.url})`};let d,p;c?(p={},d=this._getFromData(c,s)):s?(p={"Content-Type":"application/x-www-form-urlencoded"},d=a.stringify(s)):n&&(p={"Content-Type":"application/json"},d=JSON.stringify(n));return[l,{method:t,body:d,headers:Object.assign({},f,p,this._getAuthorizationHeader(o),this._getContextHeaders(h),r)}]}isForBrowser(){return"undefined"!=typeof window}_getFromData(e,t){const r=new i;for(let[t,n]of Object.entries(e)){let e=n.path,o=n.data;if(!this.isForBrowser()){const t=this._getNodeFormData(n);e=t.path,o=t.file}r.append(t,o,e)}if(t)for(let[e,n]of Object.entries(t))r.append(e,n);return r}_getNodeFormData(e){let t=e.data;return"string"==typeof e.data&&(t=s.createReadStream(e.data)),{file:t,path:{filepath:e.path}}}_getContextHeaders(e={}){return Object.assign({},this._getToolContext(e.tool),this._getProjectContext(e.project))}_getToolContext(e={}){let t="";if(e.name&&(t+=this._toolIdent(e),e.components))for(let r of e.components)t+=", "+this._toolIdent(r);return t?{"X-Particle-Tool":t}:{}}_toolIdent(e){return this._nameAtVersion(e.name,e.version)}_nameAtVersion(e,t){let r="";return e&&(r+=e,t&&(r+="@"+t)),r}_getProjectContext(e={}){let t=this._buildSemicolonSeparatedProperties(e,"name");return t?{"X-Particle-Project":t}:{}}_buildSemicolonSeparatedProperties(e,t){let r="";if(e[t]){r+=e[t];for(let n in e)n!==t&&e.hasOwnProperty(n)&&(r+="; "+n+"="+e[n])}return r}_getAuthorizationHeader(e){if(!e)return{};if("string"==typeof e)return{Authorization:`Bearer ${e}`};let t;return t=this.isForBrowser()?btoa(`${e.username}:${e.password}`):n.from(`${e.username}:${e.password}`).toString("base64"),{Authorization:`Basic ${t}`}}_sanitizeFiles(e){let t;return e&&(t={},Object.keys(e).forEach(((r,n)=>{t[n?`file${n+1}`:"file"]={data:e[r],path:r}}))),t}}},5318:(e,t,r)=>{const n=r(101);let o;e.exports=class{constructor({auth:e,api:t=new o}){this.auth=e,this.api=t}ready(){return Boolean(this.auth)}libraries(e={}){return this.api.listLibraries(Object.assign({},e,{auth:this.auth})).then((e=>(e.body.data||[]).map((e=>new n(this,e)))))}library(e,t={}){return this.api.getLibrary(Object.assign({},t,{name:e,auth:this.auth})).then((e=>{const t=e.body.data||{};return new n(this,t)}))}libraryVersions(e,t={}){return this.api.getLibraryVersions(Object.assign({},t,{name:e,auth:this.auth})).then((e=>(e.body.data||[]).map((e=>new n(this,e)))))}contributeLibrary(e){return this.api.contributeLibrary({archive:e,auth:this.auth}).then((e=>{const t=e.body.data||{};return new n(this,t)}),(e=>{this._throwError(e)}))}publishLibrary(e){return this.api.publishLibrary({name:e,auth:this.auth}).then((e=>{const t=e.body.data||{};return new n(this,t)}),(e=>{this._throwError(e)}))}deleteLibrary({name:e,force:t}){return this.api.deleteLibrary({name:e,force:t,auth:this.auth}).then((()=>!0),(e=>this._throwError(e)))}_throwError(e){if(e.body&&e.body.errors){const t=e.body.errors.map((e=>e.message)).join("\n");throw new Error(t)}throw e}downloadFile(e){return this.api.downloadFile({uri:e})}compileCode(e,t,r){return this.api.compileCode({files:e,platformId:t,targetVersion:r,auth:this.auth})}signalDevice({signal:e,deviceId:t}){return this.api.signalDevice({signal:e,deviceId:t,auth:this.auth})}listDevices(){return this.api.listDevices({auth:this.auth})}listBuildTargets(){return this.api.listBuildTargets({onlyFeatured:!0,auth:this.auth}).then((e=>{let t=[];for(let r of e.body.targets)for(let e of r.platforms)t.push({version:r.version,platform:e,prerelease:r.prereleases.indexOf(e)>-1,firmware_vendor:r.firmware_vendor});return t}),(()=>{}))}trackingIdentity({full:e=!1,context:t}={}){return this.api.trackingIdentity({full:e,context:t,auth:this.auth}).then((e=>e.body))}},o=r(7845)},3822:e=>{e.exports={baseUrl:"https://api.particle.io",clientSecret:"particle-api",clientId:"particle-api",tokenDuration:7776e3,auth:void 0}},705:(e,t,r)=>{const n=r(8501),o=r(8501),i=r(8575),{EventEmitter:a}=r(7187);e.exports=class extends a{constructor(e,t){super(),this.uri=e,this.token=t,this.reconnectInterval=2e3,this.timeout=13e3,this.data="",this.buf="",this.parse=this.parse.bind(this),this.end=this.end.bind(this),this.idleTimeoutExpired=this.idleTimeoutExpired.bind(this)}connect(){return new Promise(((e,t)=>{const{hostname:r,protocol:a,port:s,path:u}=i.parse(this.uri);this.origin=`${a}//${r}${s?":"+s:""}`;const c="https:"===a,h=(c?o:n).request({hostname:r,protocol:a,path:`${u}?access_token=${this.token}`,method:"get",port:parseInt(s,10)||(c?443:80),mode:"prefer-streaming"});this.req=h;let l=!1,f=setTimeout((()=>{this.req&&this.req.abort(),t({error:new Error("Timeout"),errorDescription:`Timeout connecting to ${this.uri}`})}),this.timeout);h.on("error",(e=>{clearTimeout(f),l?this.end():t({error:e,errorDescription:`Network error from ${this.uri}`})})),h.on("response",(r=>{clearTimeout(f);const n=r.statusCode;if(200!==n){let e="";return r.on("data",(t=>e+=t)),void r.on("end",(()=>{try{e=JSON.parse(e)}catch(e){}finally{let r=`HTTP error ${n} from ${this.uri}`;e&&e.error_description&&(r+=" - "+e.error_description),t({statusCode:n,errorDescription:r,body:e}),this.req=void 0}}))}this.data="",this.buf="",l=!0,r.on("data",this.parse),r.once("end",this.end),this.startIdleTimeout(),e(this)})),h.end()}))}abort(){this.req&&(this.req.abort(),this.req=void 0),this.removeAllListeners()}emitSafe(e,t){try{this.emit(e,t)}catch(t){"error"!==e&&this.emitSafe("error",t)}}end(){this.stopIdleTimeout(),this.req&&(this.req=void 0,this.emitSafe("disconnect"),this.reconnect())}reconnect(){setTimeout((()=>{this.isOffline()?this.reconnect():(this.emitSafe("reconnect"),this.connect().then((()=>{this.emitSafe("reconnect-success")})).catch((e=>{this.emitSafe("reconnect-error",e),this.reconnect()})))}),this.reconnectInterval)}isOffline(){return"undefined"!=typeof navigator&&!navigator.hasOwnProperty("onLine")&&!navigator.onLine}startIdleTimeout(){this.stopIdleTimeout(),this.idleTimeout=setTimeout(this.idleTimeoutExpired,this.timeout)}stopIdleTimeout(){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null)}idleTimeoutExpired(){this.req&&(this.req.abort(),this.end())}parse(e){this.startIdleTimeout(),this.buf+=e;let t=0,r=this.buf.length,n=!1;for(;t0&&(this.buf=this.buf.slice(t))}parseEventStreamLine(e,t,r){if(0===r)try{if(this.data.length>0&&this.event){const e=JSON.parse(this.data);e.name=this.eventName||"",this.emitSafe("event",e)}}catch(e){}finally{this.data="",this.eventName=void 0,this.event=!1}else if(t>0){const n=this.buf.slice(e,e+t);let o=0;o=" "!==this.buf[e+t+1]?t+1:t+2,e+=o;const i=r-o,a=this.buf.slice(e,e+i);"data"===n?this.data+=a+"\n":"event"===n&&(this.eventName=a,this.event=!0)}}}},101:e=>{e.exports=class{constructor(e,t){Object.defineProperty(this,"client",{value:e}),this._assignAttributes(t),this.downloadUrl=t.links&&t.links.download}_assignAttributes(e){Object.assign(this,e.attributes)}download(){return this.downloadUrl?this.client.downloadFile(this.downloadUrl):Promise.reject(new Error("No download URL for this library"))}}},7845:(e,t,r)=>{const n=r(3822),o=r(705),i=r(7731),a=r(5318);class s{constructor(e={}){e.auth&&this.setDefaultAuth(e.auth),Object.assign(this,n,e),this.context={},this.agent=new i(this.baseUrl)}_isValidContext(e,t){return("tool"===e||"project"===e)&&void 0!==t}setContext(e,t){if(void 0!==t){if(!this._isValidContext(e,t))throw Error("unknown context name or undefined context: "+e);this.context[e]=t}}_buildContext(e){return Object.assign(this.context,e)}login({username:e,password:t,tokenDuration:r=this.tokenDuration,headers:n,context:o}){return this.request({uri:"/oauth/token",method:"post",headers:n,form:{username:e,password:t,grant_type:"password",client_id:this.clientId,client_secret:this.clientSecret,expires_in:r},context:o})}sendOtp({mfaToken:e,otp:t,headers:r,context:n}){return this.request({uri:"/oauth/token",method:"post",headers:r,form:{grant_type:"urn:custom:mfa-otp",mfa_token:e,otp:t,client_id:this.clientId,client_secret:this.clientSecret},context:n})}enableMfa({auth:e,headers:t,context:r}){return this.get({uri:"/v1/user/mfa-enable",auth:e,headers:t,context:r})}confirmMfa({mfaToken:e,otp:t,invalidateTokens:r=!1,auth:n,headers:o,context:i}){let a={mfa_token:e,otp:t};return r&&(a.invalidate_tokens=!0),this.post({uri:"/v1/user/mfa-enable",auth:n,headers:o,data:a,context:i})}disableMfa({currentPassword:e,auth:t,headers:r,context:n}){return this.put({uri:"/v1/user/mfa-disable",auth:t,headers:r,data:{current_password:e},context:n})}createCustomer({email:e,password:t,product:r,headers:n,context:o}){return this.request({uri:`/v1/products/${r}/customers`,method:"post",headers:n,form:{email:e,password:t,grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:o})}loginAsClientOwner({headers:e,context:t}){return this.request({uri:"/oauth/token",method:"post",headers:e,form:{grant_type:"client_credentials",client_id:this.clientId,client_secret:this.clientSecret},context:t})}createUser({username:e,password:t,accountInfo:r,headers:n,context:o}){return this.post({uri:"/v1/users",headers:n,data:{username:e,password:t,account_info:r},context:o})}verifyUser({token:e,headers:t,context:r}){return this.post({uri:"/v1/user/verify",headers:t,data:{token:e},context:r})}resetPassword({username:e,headers:t,context:r}){return this.post({uri:"/v1/user/password-reset",headers:t,data:{username:e},context:r})}deleteAccessToken({username:e,password:t,token:r,headers:n,context:o}){return this.delete({uri:`/v1/access_tokens/${r}`,auth:{username:e,password:t},headers:n,data:{access_token:r},context:o})}deleteCurrentAccessToken({auth:e,headers:t,context:r}){return this.delete({uri:"/v1/access_tokens/current",auth:e,headers:t,context:r})}deleteActiveAccessTokens({auth:e,headers:t,context:r}){return this.delete({uri:"/v1/access_tokens",auth:e,headers:t,context:r})}deleteUser({auth:e,password:t,headers:r,context:n}){return this.delete({uri:"/v1/user",data:{password:t},auth:e,headers:r,context:n})}listAccessTokens({username:e,password:t,otp:r,headers:n,context:o}){return this.get({uri:"/v1/access_tokens",auth:{username:e,password:t},query:r?{otp:r}:void 0,headers:n,context:o})}trackingIdentity({full:e=!1,auth:t,headers:r,context:n}={}){return this.get({uri:"/v1/user/identify",auth:t,headers:r,query:e?void 0:{tracking:1},context:n})}listDevices({deviceId:e,deviceName:t,groups:r,sortAttr:n,sortDir:o,page:i,perPage:a,product:s,auth:u,headers:c,context:h}){let l,f;return s?(l=`/v1/products/${s}/devices`,f={deviceId:e,deviceName:t,groups:Array.isArray(r)?r.join(","):void 0,sortAttr:n,sortDir:o,page:i,per_page:a}):l="/v1/devices",this.get({uri:l,auth:u,headers:c,query:f,context:h})}getDevice({deviceId:e,product:t,auth:r,headers:n,context:o}){const i=this.deviceUri({deviceId:e,product:t});return this.get({uri:i,auth:r,headers:n,context:o})}claimDevice({deviceId:e,requestTransfer:t,auth:r,headers:n,context:o}){return this.post({uri:"/v1/devices",auth:r,headers:n,data:{id:e,request_transfer:!!t},context:o})}addDeviceToProduct({deviceId:e,product:t,file:r,auth:n,headers:o,context:i}){let a,s;return r?a={file:r}:e&&(s={id:e}),this.request({uri:`/v1/products/${t}/devices`,method:"post",headers:o,data:s,files:a,auth:n,context:i})}removeDevice({deviceId:e,deny:t,product:r,auth:n,headers:o,context:i}){const a=this.deviceUri({deviceId:e,product:r}),s=r?{deny:t}:void 0;return this.delete({uri:a,data:s,auth:n,headers:o,context:i})}removeDeviceOwner({deviceId:e,product:t,auth:r,headers:n,context:o}){const i=`/v1/products/${t}/devices/${e}/owner`;return this.delete({uri:i,auth:r,headers:n,context:o})}renameDevice({deviceId:e,name:t,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,name:t,product:r,auth:n,headers:o,context:i})}signalDevice({deviceId:e,signal:t,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,signal:t,product:r,auth:n,headers:o,context:i})}setDeviceNotes({deviceId:e,notes:t,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,notes:t,product:r,auth:n,headers:o,context:i})}markAsDevelopmentDevice({deviceId:e,development:t=!0,product:r,auth:n,headers:o,context:i}){return this.updateDevice({deviceId:e,development:t,product:r,auth:n,headers:o,context:i})}lockDeviceProductFirmware({deviceId:e,desiredFirmwareVersion:t,flash:r,product:n,auth:o,headers:i,context:a}){return this.updateDevice({deviceId:e,desiredFirmwareVersion:t,flash:r,product:n,auth:o,headers:i,context:a})}unlockDeviceProductFirmware({deviceId:e,product:t,auth:r,headers:n,context:o}){return this.updateDevice({deviceId:e,desiredFirmwareVersion:null,product:t,auth:r,headers:n,context:o})}updateDevice({deviceId:e,name:t,signal:r,notes:n,development:o,desiredFirmwareVersion:i,flash:a,product:s,auth:u,headers:c,context:h}){let l;void 0!==r&&(l=r?"1":"0");const f=this.deviceUri({deviceId:e,product:s}),d=s?{name:t,signal:l,notes:n,development:o,desired_firmware_version:i,flash:a}:{name:t,signal:l,notes:n};return this.put({uri:f,auth:u,headers:c,data:d,context:h})}provisionDevice({productId:e,auth:t,headers:r,context:n}){return this.post({uri:"/v1/devices",auth:t,headers:r,data:{product_id:e},context:n})}getClaimCode({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/device_claims`:"/v1/device_claims";return this.post({uri:i,auth:r,headers:n,data:{iccid:e},context:o})}validatePromoCode({promoCode:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/promo_code/${e}`,auth:t,headers:r,context:n})}changeProduct({deviceId:e,productId:t,auth:r,headers:n,context:o}){return this.put({uri:`/v1/devices/${e}`,auth:r,headers:n,data:{product_id:t},context:o})}getVariable({deviceId:e,name:t,product:r,auth:n,headers:o,context:i}){const a=r?`/v1/products/${r}/devices/${e}/${t}`:`/v1/devices/${e}/${t}`;return this.get({uri:a,auth:n,headers:o,context:i})}flashDevice({deviceId:e,product:t,files:r,targetVersion:n,auth:o,headers:i,context:a}){const s=this.deviceUri({deviceId:e,product:t}),u={};return n?u.build_target_version=n:u.latest="true",this.request({uri:s,method:"put",auth:o,headers:i,files:r,form:u,context:a})}flashTinker({deviceId:e,auth:t,headers:r,context:n}){return console&&console.warning&&console.warning("Particle.flashTinker is deprecated"),this.put({uri:`/v1/devices/${e}`,headers:r,data:{app:"tinker"},auth:t,context:n})}compileCode({files:e,platformId:t,targetVersion:r,auth:n,headers:o,context:i}){const a={platform_id:t};return r?a.build_target_version=r:a.latest="true",this.request({uri:"/v1/binaries",method:"post",auth:n,headers:o,files:e,form:a,context:i})}downloadFirmwareBinary({binaryId:e,auth:t,headers:r,context:n}){return this.request({uri:`/v1/binaries/${e}`,method:"get",auth:t,headers:r,context:n,isBuffer:!0})}sendPublicKey({deviceId:e,key:t,algorithm:r,auth:n,headers:o,context:i}){return this.post({uri:`/v1/provisioning/${e}`,auth:n,headers:o,data:{deviceID:e,publicKey:"string"==typeof t?t:t.toString(),filename:"particle-api",order:`manual_${Date.now()}`,algorithm:r||"rsa"},context:i})}callFunction({deviceId:e,name:t,argument:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/devices/${e}/${t}`:`/v1/devices/${e}/${t}`;return this.post({uri:s,auth:o,headers:i,data:{args:r},context:a})}getEventStream({deviceId:e,name:t,org:r,product:n,auth:i}){let a="/v1/";return r&&(a+=`orgs/${r}/`),n&&(a+=`products/${n}/`),e&&(a+="devices/","mine"!==e.toLowerCase()&&(a+=`${e}/`)),a+="events",t&&(a+=`/${encodeURIComponent(t)}`),i=this._getActiveAuthToken(i),new o(`${this.baseUrl}${a}`,i).connect()}publishEvent({name:e,data:t,isPrivate:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/events`:"/v1/devices/events",u={name:e,data:t,private:r};return this.post({uri:s,auth:o,headers:i,data:u,context:a})}createWebhook({event:e,url:t,device:r,rejectUnauthorized:n,noDefaults:o,hook:i,product:a,auth:s,headers:u,context:c}){const h=a?`/v1/products/${a}/webhooks`:"/v1/webhooks",l={event:e,url:t,deviceId:r,rejectUnauthorized:n,noDefaults:o};return i&&(l.requestType=i.method,l.auth=i.auth,l.headers=i.headers,l.query=i.query,l.json=i.json,l.form=i.form,l.body=i.body,l.responseTemplate=i.responseTemplate,l.responseTopic=i.responseEvent,l.errorResponseTopic=i.errorResponseEvent),l.requestType||(l.requestType="POST"),this.post({uri:h,auth:s,headers:u,data:l,context:c})}deleteWebhook({hookId:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/webhooks/${e}`:`/v1/webhooks/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listWebhooks({product:e,auth:t,headers:r,context:n}){const o=e?`/v1/products/${e}/webhooks`:"/v1/webhooks";return this.get({uri:o,auth:t,headers:r,context:n})}createIntegration({event:e,settings:t,deviceId:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/integrations`:"/v1/integrations",u=Object.assign({event:e,deviceid:r},t);return this.post({uri:s,data:u,auth:o,headers:i,context:a})}editIntegration({integrationId:e,event:t,settings:r,deviceId:n,product:o,auth:i,headers:a,context:s}){const u=o?`/v1/products/${o}/integrations/${e}`:`/v1/integrations/${e}`,c=Object.assign({event:t,deviceid:n},r);return this.put({uri:u,auth:i,headers:a,data:c,context:s})}deleteIntegration({integrationId:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/integrations/${e}`:`/v1/integrations/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listIntegrations({product:e,auth:t,headers:r,context:n}){const o=e?`/v1/products/${e}/integrations`:"/v1/integrations";return this.get({uri:o,auth:t,headers:r,context:n})}getUserInfo({auth:e,headers:t,context:r}){return this.get({uri:"/v1/user",auth:e,headers:t,context:r})}setUserInfo({accountInfo:e,auth:t,headers:r,context:n}){const o={account_info:e};return this.put({uri:"/v1/user",auth:t,headers:r,data:o,context:n})}changeUsername({currentPassword:e,username:t,invalidateTokens:r=!1,auth:n,headers:o,context:i}){const a={username:t,current_password:e};return r&&(a.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:o,data:a,context:i})}changeUserPassword({currentPassword:e,password:t,invalidateTokens:r=!1,auth:n,headers:o,context:i}){const a={password:t,current_password:e};return r&&(a.invalidate_tokens=!0),this.put({uri:"/v1/user",auth:n,headers:o,data:a,context:i})}listSIMs({iccid:e,deviceId:t,deviceName:r,page:n,perPage:o,product:i,auth:a,headers:s,context:u}){const c=i?`/v1/products/${i}/sims`:"/v1/sims",h=i?{iccid:e,deviceId:t,deviceName:r,page:n,per_page:o}:void 0;return this.get({uri:c,auth:a,headers:s,query:h,context:u})}getSIMDataUsage({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/sims/${e}/data_usage`:`/v1/sims/${e}/data_usage`;return this.get({uri:i,auth:r,headers:n,context:o})}getFleetDataUsage({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}/sims/data_usage`,auth:t,headers:r,context:n})}checkSIM({iccid:e,auth:t,headers:r,context:n}){return this.head({uri:`/v1/sims/${e}`,auth:t,headers:r,context:n})}activateSIM({iccid:e,iccids:t,country:r,promoCode:n,product:o,auth:i,headers:a,context:s}){t=t||[e];const u=o?`/v1/products/${o}/sims`:`/v1/sims/${e}`,c=o?{sims:t,country:r}:{country:r,promoCode:n,action:"activate"},h=o?"post":"put";return this.request({uri:u,method:h,headers:a,data:c,auth:i,context:s})}deactivateSIM({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/sims/${e}`:`/v1/sims/${e}`;return this.put({uri:i,auth:r,headers:n,data:{action:"deactivate"},context:o})}reactivateSIM({iccid:e,mbLimit:t,product:r,auth:n,headers:o,context:i}){const a=r?`/v1/products/${r}/sims/${e}`:`/v1/sims/${e}`,s={mb_limit:t,action:"reactivate"};return this.put({uri:a,auth:n,headers:o,data:s,context:i})}updateSIM({iccid:e,mbLimit:t,product:r,auth:n,headers:o,context:i}){const a=r?`/v1/products/${r}/sims/${e}`:`/v1/sims/${e}`,s={mb_limit:t};return this.put({uri:a,auth:n,headers:o,data:s,context:i})}removeSIM({iccid:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/sims/${e}`:`/v1/sims/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listBuildTargets({onlyFeatured:e,auth:t,headers:r,context:n}){const o=e?{featured:!!e}:void 0;return this.get({uri:"/v1/build_targets",auth:t,headers:r,query:o,context:n})}listLibraries({page:e,limit:t,filter:r,sort:n,architectures:o,category:i,scope:a,excludeScopes:s,auth:u,headers:c,context:h}){return this.get({uri:"/v1/libraries",auth:u,headers:c,query:{page:e,filter:r,limit:t,sort:n,architectures:this._asList(o),category:i,scope:a,excludeScopes:this._asList(s)},context:h})}_asList(e){return Array.isArray(e)?e.join(","):e}getLibrary({name:e,version:t,auth:r,headers:n,context:o}){return this.get({uri:`/v1/libraries/${e}`,auth:r,headers:n,query:{version:t},context:o})}getLibraryVersions({name:e,page:t,limit:r,auth:n,headers:o,context:i}){return this.get({uri:`/v1/libraries/${e}/versions`,auth:n,headers:o,query:{page:t,limit:r},context:i})}contributeLibrary({archive:e,auth:t,headers:r,context:n}){const o={"archive.tar.gz":e};return this.request({uri:"/v1/libraries",method:"post",auth:t,headers:r,files:o,context:n})}publishLibrary({name:e,auth:t,headers:r,context:n}){return this.request({uri:`/v1/libraries/${e}`,method:"patch",auth:t,headers:r,data:{visibility:"public"},context:n})}deleteLibrary({name:e,force:t,auth:r,headers:n,context:o}){return this.delete({uri:`/v1/libraries/${e}`,auth:r,headers:n,data:{force:t},context:o})}downloadFile({uri:e,headers:t,context:r}){return this.request({uri:e,method:"get",headers:t,context:r,isBuffer:!0})}listOAuthClients({product:e,auth:t,headers:r,context:n}){const o=e?`/v1/products/${e}/clients`:"/v1/clients";return this.get({uri:o,auth:t,headers:r,context:n})}createOAuthClient({name:e,type:t,redirect_uri:r,scope:n,product:o,auth:i,headers:a,context:s}){const u=o?`/v1/products/${o}/clients`:"/v1/clients",c={name:e,type:t,redirect_uri:r,scope:n};return this.post({uri:u,auth:i,headers:a,data:c,context:s})}updateOAuthClient({clientId:e,name:t,scope:r,product:n,auth:o,headers:i,context:a}){const s=n?`/v1/products/${n}/clients/${e}`:`/v1/clients/${e}`,u={name:t,scope:r};return this.put({uri:s,data:u,auth:o,headers:i,context:a})}deleteOAuthClient({clientId:e,product:t,auth:r,headers:n,context:o}){const i=t?`/v1/products/${t}/clients/${e}`:`/v1/clients/${e}`;return this.delete({uri:i,auth:r,headers:n,context:o})}listProducts({auth:e,headers:t,context:r}){return this.get({uri:"/v1/products",auth:e,headers:t,context:r})}getProduct({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}`,auth:t,headers:r,context:n})}listProductFirmware({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}/firmware`,auth:t,headers:r,context:n})}uploadProductFirmware({file:e,version:t,title:r,description:n,product:o,auth:i,headers:a,context:s}){return this.request({uri:`/v1/products/${o}/firmware`,method:"post",auth:i,headers:a,form:{version:t,title:r,description:n},files:{"firmware.bin":e},context:s})}getProductFirmware({version:e,product:t,auth:r,headers:n,context:o}){return this.get({uri:`/v1/products/${t}/firmware/${e}`,auth:r,headers:n,context:o})}updateProductFirmware({version:e,title:t,description:r,product:n,auth:o,headers:i,context:a}){const s=`/v1/products/${n}/firmware/${e}`;return this.put({uri:s,auth:o,headers:i,data:{title:t,description:r},context:a})}downloadProductFirmware({version:e,product:t,auth:r,headers:n,context:o}){return this.request({uri:`/v1/products/${t}/firmware/${e}/binary`,method:"get",auth:r,headers:n,context:o,isBuffer:!0})}releaseProductFirmware({version:e,product:t,auth:r,headers:n,context:o}){const i=`/v1/products/${t}/firmware/release`;return this.put({uri:i,auth:r,headers:n,data:{version:e},context:o})}listTeamMembers({product:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/products/${e}/team`,auth:t,headers:r,context:n})}inviteTeamMember({username:e,product:t,auth:r,headers:n,context:o}){return this.post({uri:`/v1/products/${t}/team`,auth:r,headers:n,data:{username:e},context:o})}removeTeamMember({username:e,product:t,auth:r,headers:n,context:o}){return this.delete({uri:`/v1/products/${t}/team/${e}`,auth:r,headers:n,context:o})}lookupSerialNumber({serialNumber:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/serial_numbers/${e}`,auth:t,headers:r,context:n})}createMeshNetwork({name:e,deviceId:t,iccid:r,auth:n,headers:o,context:i}){return this.post({uri:"/v1/networks",auth:n,headers:o,data:{name:e,device_id:t,iccid:r},context:i})}removeMeshNetwork({networkId:e,auth:t,headers:r,context:n}){return this.delete({uri:`/v1/networks/${e}`,auth:t,headers:r,context:n})}listMeshNetworks({page:e,perPage:t,auth:r,headers:n,context:o}){const i=e?{page:e,per_page:t}:void 0;return this.get({uri:"/v1/networks",auth:r,headers:n,query:i,context:o})}getMeshNetwork({networkId:e,auth:t,headers:r,context:n}){return this.get({uri:`/v1/networks/${e}`,auth:t,headers:r,context:n})}updateMeshNetwork({networkId:e,action:t,deviceId:r,auth:n,headers:o,context:i}){return this.put({uri:`/v1/networks/${e}`,auth:n,headers:o,data:{action:t,device_id:r},context:i})}addMeshNetworkDevice({networkId:e,deviceId:t,auth:r,headers:n,context:o}){return this.updateMeshNetwork({action:"add-device",networkId:e,deviceId:t,auth:r,headers:n,context:o})}removeMeshNetworkDevice({networkId:e,deviceId:t,auth:r,headers:n,context:o}){return e?this.updateMeshNetwork({action:"remove-device",networkId:e,deviceId:t,auth:r,headers:n,context:o}):this.delete({uri:`/v1/devices/${t}/network`,auth:r,headers:n,context:o})}listMeshNetworkDevices({networkId:e,role:t,page:r,perPage:n,auth:o,headers:i,context:a}){const s=t||r?{role:t,page:r,per_page:n}:void 0;return this.get({uri:`/v1/networks/${e}/devices`,auth:o,headers:i,query:s,context:a})}getProductConfiguration({auth:e,product:t,headers:r,context:n}){return this.get({uri:`/v1/products/${t}/config`,auth:e,headers:r,context:n})}getProductConfigurationSchema({auth:e,product:t,headers:r={},context:n}){return r.accept="application/schema+json",this.get({uri:`/v1/products/${t}/config`,auth:e,headers:r,context:n})}getProductDeviceConfiguration({auth:e,product:t,deviceId:r,headers:n,context:o}){return this.get({uri:`/v1/products/${t}/config/${r}`,auth:e,headers:n,context:o})}getProductDeviceConfigurationSchema({auth:e,product:t,deviceId:r,headers:n,context:o}){return n.accept="application/schema+json",this.get({uri:`/v1/products/${t}/config/${r}`,auth:e,headers:n,context:o})}setProductConfiguration({auth:e,product:t,config:r,headers:n,context:o}){return this.put({uri:`/v1/products/${t}/config`,auth:e,data:r,headers:n,context:o})}setProductDeviceConfiguration({auth:e,product:t,deviceId:r,config:n,headers:o,context:i}){return this.put({uri:`/v1/products/${t}/config/${r}`,data:n,auth:e,headers:o,context:i})}getProductLocations({auth:e,product:t,dateRange:r,rectBl:n,rectTr:o,deviceId:i,deviceName:a,groups:s,page:u,perPage:c,headers:h,context:l}){return this.get({uri:`/v1/products/${t}/locations`,query:{date_range:r,rect_bl:n,rect_tr:o,device_id:i,device_name:a,groups:s,page:u,per_page:c},auth:e,headers:h,context:l})}getProductDeviceLocations({auth:e,product:t,dateRange:r,rectBl:n,rectTr:o,deviceId:i,headers:a,context:s}){return this.get({uri:`/v1/products/${t}/locations/${i}`,query:{date_range:r,rect_bl:n,rect_tr:o},auth:e,headers:a,context:s})}executeLogic({auth:e,org:t,logic:r,headers:n,context:o}){return this.post({uri:this._namespacedPath(t,"logic/execute"),auth:e,data:r,headers:n,context:o})}createLogicFunction({auth:e,org:t,logicFunction:r,headers:n,context:o}){return this.post({uri:this._namespacedPath(t,"logic/functions"),auth:e,data:{logic_function:r},headers:n,context:o})}getLogicFunction({auth:e,org:t,logicFunctionId:r,headers:n,context:o}){return this.get({uri:this._namespacedPath(t,`logic/functions/${r}`),auth:e,headers:n,context:o})}updateLogicFunction({auth:e,org:t,logicFunctionId:r,logicFunction:n,headers:o,context:i}){return this.put({uri:this._namespacedPath(t,`logic/functions/${r}`),auth:e,data:{logic_function:n},headers:o,context:i})}deleteLogicFunction({auth:e,org:t,logicFunctionId:r,headers:n,context:o}){return this.delete({uri:this._namespacedPath(t,`logic/functions/${r}`),auth:e,headers:n,context:o})}listLogicFunctions({auth:e,org:t,todayStats:r,headers:n,context:o}){return this.get({uri:this._namespacedPath(t,"logic/functions"),query:{today_stats:r},auth:e,headers:n,context:o})}listLogicRuns({auth:e,org:t,logicFunctionId:r,headers:n,context:o}){return this.get({uri:this._namespacedPath(t,`logic/functions/${r}/runs`),auth:e,headers:n,context:o})}getLogicRun({auth:e,org:t,logicFunctionId:r,logicRunId:n,headers:o,context:i}){return this.get({uri:this._namespacedPath(t,`logic/functions/${r}/runs/${n}`),auth:e,headers:o,context:i})}getLogicRunLogs({auth:e,org:t,logicFunctionId:r,logicRunId:n,headers:o,context:i}){return this.get({uri:this._namespacedPath(t,`logic/functions/${r}/runs/${n}/logs`),auth:e,headers:o,context:i})}createLedger({auth:e,org:t,ledger:r,headers:n,context:o}){return this.post({uri:this._namespacedPath(t,"ledgers"),auth:e,data:{ledger:r},headers:n,context:o})}getLedger({auth:e,org:t,ledgerName:r,headers:n,context:o}){return this.get({uri:this._namespacedPath(t,`ledgers/${r}`),auth:e,headers:n,context:o})}updateLedger({auth:e,org:t,ledgerName:r,ledger:n,headers:o,context:i}){return this.put({uri:this._namespacedPath(t,`ledgers/${r}`),auth:e,data:{ledger:n},headers:o,context:i})}archiveLedger({auth:e,org:t,ledgerName:r,headers:n,context:o}){return this.delete({uri:this._namespacedPath(t,`ledgers/${r}`),auth:e,headers:n,context:o})}listLedgers({auth:e,org:t,scope:r,page:n,perPage:o,archived:i,headers:a,context:s}){return this.get({uri:this._namespacedPath(t,"ledgers"),query:{scope:r,page:n,per_page:o,archived:i},auth:e,headers:a,context:s})}getLedgerInstance({auth:e,org:t,ledgerName:r,scopeValue:n,headers:o,context:i}){return this.get({uri:this._namespacedPath(t,`ledgers/${r}/instances/${n}`),auth:e,headers:o,context:i})}setLedgerInstance({auth:e,org:t,ledgerName:r,scopeValue:n,data:o,headers:i,context:a}){return this.put({uri:this._namespacedPath(t,`ledgers/${r}/instances/${n}`),auth:e,data:{data:o},headers:i,context:a})}deleteLedgerInstance({auth:e,org:t,ledgerName:r,scopeValue:n,headers:o,context:i}){return this.delete({uri:this._namespacedPath(t,`ledgers/${r}/instances/${n}`),auth:e,headers:o,context:i})}listLedgerInstances({auth:e,org:t,ledgerName:r,page:n,perPage:o,headers:i,context:a}){return this.get({uri:this._namespacedPath(t,`ledgers/${r}/instances`),query:{page:n,per_page:o},auth:e,headers:i,context:a})}listLedgerInstanceVersions({auth:e,org:t,ledgerName:r,scopeValue:n,replacedBefore:o,replacedAfter:i,headers:a,context:s}){return this.get({uri:this._namespacedPath(t,`ledgers/${r}/instances/${n}/versions`),query:{replaced_before:o,replaced_after:i},auth:e,headers:a,context:s})}getLedgerInstanceVersion({auth:e,org:t,ledgerName:r,scopeValue:n,version:o,headers:i,context:a}){return this.get({uri:this._namespacedPath(t,`ledgers/${r}/instances/${n}/versions/${o}`),auth:e,headers:i,context:a})}setDefaultAuth(e){if("string"==typeof e&&0!==e.length)this._defaultAuth=e;else{if("object"!=typeof e||!("username"in e)||!("password"in e))throw new Error("Must pass a non-empty string or object with username and password for basic auth!");this._defaultAuth=e}}_getActiveAuthToken(e){return e||this._defaultAuth}deviceUri({deviceId:e,product:t}){return t?`/v1/products/${t}/devices/${e}`:`/v1/devices/${e}`}_namespacedPath(e,t){return e?`/v1/orgs/${e}/${t}`:`/v1/${t}`}get({uri:e,auth:t,headers:r,query:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.get({uri:e,auth:t,headers:r,query:n,context:o})}head({uri:e,auth:t,headers:r,query:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.head({uri:e,auth:t,headers:r,query:n,context:o})}post({uri:e,auth:t,headers:r,data:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.post({uri:e,auth:t,headers:r,data:n,context:o})}put({uri:e,auth:t,headers:r,data:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.put({uri:e,auth:t,headers:r,data:n,context:o})}delete({uri:e,auth:t,headers:r,data:n,context:o}){return o=this._buildContext(o),t=this._getActiveAuthToken(t),this.agent.delete({uri:e,auth:t,headers:r,data:n,context:o})}request(e){return e.context=this._buildContext(e.context),e.auth=this._getActiveAuthToken(e.auth),this.agent.request(e)}client(e={}){return new a(Object.assign({api:this},e))}setBaseUrl(e){this.baseUrl=e,this.agent.setBaseUrl(e)}}s.prototype.removeAccessToken=s.prototype.deleteAccessToken,e.exports=s},7165:()=>{},1408:()=>{},3646:()=>{},5014:()=>{},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"particle-api-js","version":"10.4.0","description":"Particle API Client","main":"src/Particle.js","scripts":{"prepublish":"npm run lint && npm run build","test":"npm run lint && npm run typecheck && npm run test:unit","test:ci":"npm run lint && npm run test:unit -- --forbid-only && npm run coverage","test:unit":"mocha test/ -R spec","test:unit:silent":"npm run test:unit > tmp/test-unit-log.txt 2>&1","test:browser":"karma start --single-run","test:watch":"npm run test:unit -- --watch","typecheck":"tsc --noEmit","coverage":"nyc --reporter=text --include=\'src/**/*.js\' --temp-dir=./tmp/ --check-coverage --lines 91 npm run test:unit:silent","lint":"eslint . --ext .js --format unix --ignore-path .gitignore --ignore-pattern \\"dist/*\\"","lint:fix":"npm run lint -- --fix","docs":"documentation build src/Particle.js --shallow -g -f md -o docs/api.md","build":"webpack --env mode=production","build-nomin":"webpack --env mode=development","preversion":"npm run test && npm run prepublish","reinstall":"rm -rf ./node_modules && npm i","version":"npm run build && npm run docs && npm run update-changelog && git add dist/* docs/*","update-changelog":"VERSION=`node -p -e \\"require(\'./package.json\').version\\"` bash -c \'read -p \\"Update CHANGELOG.md for version $VERSION and press ENTER when done.\\"\' && git add CHANGELOG.md"},"repository":{"type":"git","url":"https://github.com/particle-iot/particle-api-js"},"author":"Julien Vanier ","contributors":["Ido Kleinman","Bryce Kahle","Justin Debbink","Matthew McGowan","Julien Vanier","Wojtek Siudzinski","Emily Rose"],"keywords":["particle","library","spark","api"],"license":"Apache-2.0","devDependencies":{"@types/node":"^20.5.9","buffer":"^6.0.3","chai":"^4.3.6","chai-as-promised":"^7.1.1","documentation":"^4.0.0-rc.1","eslint":"^8.17.0","eslint-config-particle":"^2.2.1","events":"^3.3.0","karma":"^1.1.1","karma-chai":"^0.1.0","karma-cli":"^1.0.1","karma-coverage":"^1.1.0","karma-firefox-launcher":"^1.0.0","karma-mocha":"^1.1.1","karma-webpack":"^5.0.0","mocha":"^2.5.1","nyc":"^15.1.0","process":"^0.11.10","should":"^9.0.0","sinon":"^7.2.5","sinon-chai":"^3.7.0","terser-webpack-plugin":"^5.3.9","typescript":"^5.2.2","url":"^0.11.3","webpack":"^5.88.2","webpack-cli":"^5.1.4"},"dependencies":{"form-data":"^4.0.0","node-fetch":"^2.7.0","qs":"^6.11.2","stream-http":"^3.2.0"},"browser":{"./fs":false,"http":"stream-http","https":"stream-http"},"engines":{"node":">=12.x","npm":"8.x"}}')}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n=r(7845);Particle=n})(); //# sourceMappingURL=particle.min.js.map \ No newline at end of file diff --git a/dist/particle.min.js.map b/dist/particle.min.js.map index 53c09ac..24b6ac0 100644 --- a/dist/particle.min.js.map +++ b/dist/particle.min.js.map @@ -1 +1 @@ -{"version":3,"file":"particle.min.js","mappings":"oDAEAA,EAAQC,WAuCR,SAAqBC,GACnB,IAAIC,EAAOC,EAAQF,GACfG,EAAWF,EAAK,GAChBG,EAAkBH,EAAK,GAC3B,OAAuC,GAA9BE,EAAWC,GAAuB,EAAKA,CAClD,EA3CAN,EAAQO,YAiDR,SAAsBL,GACpB,IAAIM,EAcAC,EAbAN,EAAOC,EAAQF,GACfG,EAAWF,EAAK,GAChBG,EAAkBH,EAAK,GAEvBO,EAAM,IAAIC,EAVhB,SAAsBT,EAAKG,EAAUC,GACnC,OAAuC,GAA9BD,EAAWC,GAAuB,EAAKA,CAClD,CAQoBM,CAAYV,EAAKG,EAAUC,IAEzCO,EAAU,EAGVC,EAAMR,EAAkB,EACxBD,EAAW,EACXA,EAGJ,IAAKI,EAAI,EAAGA,EAAIK,EAAKL,GAAK,EACxBD,EACGO,EAAUb,EAAIc,WAAWP,KAAO,GAChCM,EAAUb,EAAIc,WAAWP,EAAI,KAAO,GACpCM,EAAUb,EAAIc,WAAWP,EAAI,KAAO,EACrCM,EAAUb,EAAIc,WAAWP,EAAI,IAC/BC,EAAIG,KAAcL,GAAO,GAAM,IAC/BE,EAAIG,KAAcL,GAAO,EAAK,IAC9BE,EAAIG,KAAmB,IAANL,EAGK,IAApBF,IACFE,EACGO,EAAUb,EAAIc,WAAWP,KAAO,EAChCM,EAAUb,EAAIc,WAAWP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f,CCzBA8rD,EAAoBpqC,EAAI,WACvB,GAA0B,iBAAfyqC,WAAyB,OAAOA,WAC3C,IACC,OAAOhmD,MAAQ,IAAIsP,SAAS,cAAb,EAChB,CAAE,MAAOrL,GACR,GAAsB,iBAAXuQ,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCAxBmxC,EAAoBM,IAAOj4C,IAC1BA,EAAOk4C,MAAQ,GACVl4C,EAAOm4C,WAAUn4C,EAAOm4C,SAAW,IACjCn4C,GCAR,IAAIo4C,EAAsBT,EAAoB,M","sources":["webpack://Particle/./node_modules/base64-js/index.js","webpack://Particle/./node_modules/buffer/index.js","webpack://Particle/./node_modules/builtin-status-codes/browser.js","webpack://Particle/./node_modules/call-bind/callBound.js","webpack://Particle/./node_modules/call-bind/index.js","webpack://Particle/./node_modules/events/events.js","webpack://Particle/./node_modules/form-data/lib/browser.js","webpack://Particle/./node_modules/function-bind/implementation.js","webpack://Particle/./node_modules/function-bind/index.js","webpack://Particle/./node_modules/get-intrinsic/index.js","webpack://Particle/./node_modules/has-proto/index.js","webpack://Particle/./node_modules/has-symbols/index.js","webpack://Particle/./node_modules/has-symbols/shams.js","webpack://Particle/./node_modules/has/src/index.js","webpack://Particle/./node_modules/ieee754/index.js","webpack://Particle/./node_modules/node-fetch/browser.js","webpack://Particle/./node_modules/process/browser.js","webpack://Particle/./node_modules/punycode/punycode.js","webpack://Particle/./node_modules/qs/lib/formats.js","webpack://Particle/./node_modules/qs/lib/index.js","webpack://Particle/./node_modules/qs/lib/parse.js","webpack://Particle/./node_modules/qs/lib/stringify.js","webpack://Particle/./node_modules/qs/lib/utils.js","webpack://Particle/./node_modules/side-channel/index.js","webpack://Particle/./node_modules/side-channel/node_modules/object-inspect/index.js","webpack://Particle/./node_modules/stream-http/index.js","webpack://Particle/./node_modules/stream-http/lib/capability.js","webpack://Particle/./node_modules/stream-http/lib/request.js","webpack://Particle/./node_modules/stream-http/lib/response.js","webpack://Particle/./node_modules/stream-http/node_modules/inherits/inherits_browser.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/errors-browser.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/_stream_duplex.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/_stream_passthrough.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/_stream_readable.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/_stream_transform.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/_stream_writable.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/async_iterator.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/buffer_list.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/destroy.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/from-browser.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/pipeline.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/state.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/stream-browser.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/readable-browser.js","webpack://Particle/./node_modules/stream-http/node_modules/safe-buffer/index.js","webpack://Particle/./node_modules/stream-http/node_modules/string_decoder/lib/string_decoder.js","webpack://Particle/./node_modules/stream-http/node_modules/xtend/immutable.js","webpack://Particle/./node_modules/url/url.js","webpack://Particle/./node_modules/util-deprecate/browser.js","webpack://Particle/./src/Agent.js","webpack://Particle/./src/Client.js","webpack://Particle/./src/Defaults.js","webpack://Particle/./src/EventStream.js","webpack://Particle/./src/Library.js","webpack://Particle/./src/Particle.js","webpack://Particle/webpack/bootstrap","webpack://Particle/webpack/runtime/global","webpack://Particle/webpack/runtime/node module decorator","webpack://Particle/webpack/startup"],"sourcesContent":["'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\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n 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 =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\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 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 parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\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\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * 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 * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\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 // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\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(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(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 interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(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(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\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(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(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.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 buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.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 === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let 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 (!Array.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 let 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 const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\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 (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let 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 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) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let 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 coercion 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// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let 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 const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let 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 const length = this.length\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.toLocaleString = Buffer.prototype.toString\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 let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\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 let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let 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 (numberIsNaN(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 (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 let indexSize = 1\n let arrLength = arr.length\n let 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 let i\n if (dir) {\n let 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 let found = true\n for (let 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 const 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 const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(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 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 } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const 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 let 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 case 'latin1':\n case 'binary':\n return asciiWrite(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 const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let 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\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const 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 let res = ''\n let 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 let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; 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 const 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 const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\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 =\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 let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\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 let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\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 =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\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.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\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 let val = this[offset]\n let mul = 1\n let 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 let i = byteLength\n let mul = 1\n let 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 offset = offset >>> 0\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 offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\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 offset = offset >>> 0\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.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\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 offset = offset >>> 0\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 offset = offset >>> 0\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 offset = offset >>> 0\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 =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let 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 =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let 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 =\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 this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\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 this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\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 this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\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 this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\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 this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let 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 const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let 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 (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 this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\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 this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\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 this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\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 this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\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 value = +value\n offset = offset >>> 0\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 value = +value\n offset = offset >>> 0\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 (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\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('Index out of range')\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 const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\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 (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 if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\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 let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().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 utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let 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 const byteArray = []\n for (let 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 let c, hi, lo\n const byteArray = []\n for (let 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 let i\n for (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\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\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","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\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 R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\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.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\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 setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/* eslint-env browser */\nmodule.exports = typeof self == 'object' ? self.FormData : window.FormData;\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.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","\"use strict\";\n\n// ref: https://github.com/tc39/proposal-global\nvar getGlobal = function () {\n\t// the only reliable means to get the global object is\n\t// `Function('return this')()`\n\t// However, this causes CSP violations in Chrome apps.\n\tif (typeof self !== 'undefined') { return self; }\n\tif (typeof window !== 'undefined') { return window; }\n\tif (typeof global !== 'undefined') { return global; }\n\tthrow new Error('unable to locate global object');\n}\n\nvar globalObject = getGlobal();\n\nmodule.exports = exports = globalObject.fetch;\n\n// Needed for TypeScript and Webpack.\nif (globalObject.fetch) {\n\texports.default = globalObject.fetch.bind(globalObject);\n}\n\nexports.Headers = globalObject.Headers;\nexports.Request = globalObject.Request;\nexports.Response = globalObject.Response;\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","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\nmodule.exports = {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return String(value);\n }\n },\n RFC1738: Format.RFC1738,\n RFC3986: Format.RFC3986\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictNullHandling: false\n};\n\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\n\nvar parseArrayValue = function (val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = { __proto__: null };\n\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(\n parseArrayValue(part.slice(pos + 1), options),\n function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n }\n );\n }\n\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(val);\n }\n\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n\n if (has.call(obj, key)) {\n obj[key] = utils.combine(obj[key], val);\n } else {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]' && options.parseArrays) {\n obj = [].concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (!options.parseArrays && cleanRoot === '') {\n obj = { 0: leaf };\n } else if (\n !isNaN(index)\n && root !== cleanRoot\n && String(index) === cleanRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else if (cleanRoot !== '__proto__') {\n obj[cleanRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n return {\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n\n if (options.allowSparse === true) {\n return obj;\n }\n\n return utils.compact(obj);\n};\n","'use strict';\n\nvar getSideChannel = require('side-channel');\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n charset: 'utf-8',\n charsetSentinel: false,\n delimiter: '&',\n encode: true,\n encoder: utils.encode,\n encodeValuesOnly: false,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string'\n || typeof v === 'number'\n || typeof v === 'boolean'\n || typeof v === 'symbol'\n || typeof v === 'bigint';\n};\n\nvar sentinel = {};\n\nvar stringify = function stringify(\n object,\n prefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n sideChannel\n) {\n var obj = object;\n\n var tmpSc = sideChannel;\n var step = 0;\n var findFlag = false;\n while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {\n // Where object last appeared in the ref tree\n var pos = tmpSc.get(object);\n step += 1;\n if (typeof pos !== 'undefined') {\n if (pos === step) {\n throw new RangeError('Cyclic object value');\n } else {\n findFlag = true; // Break while\n }\n }\n if (typeof tmpSc.get(sentinel) === 'undefined') {\n step = 0;\n }\n }\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n });\n }\n\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;\n }\n\n obj = '';\n }\n\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n if (encodeValuesOnly && encoder) {\n obj = utils.maybeMap(obj, encoder);\n }\n objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];\n } else if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;\n\n for (var j = 0; j < objKeys.length; ++j) {\n var key = objKeys[j];\n var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];\n\n if (skipNulls && value === null) {\n continue;\n }\n\n var keyPrefix = isArray(obj)\n ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix\n : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');\n\n sideChannel.set(object, step);\n var valueSideChannel = getSideChannel();\n valueSideChannel.set(sentinel, sideChannel);\n pushToArray(values, stringify(\n value,\n keyPrefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n valueSideChannel\n ));\n }\n\n return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (opts && opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if (opts && 'indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {\n throw new TypeError('`commaRoundTrip` must be a boolean, or absent');\n }\n var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n\n var sideChannel = getSideChannel();\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (options.skipNulls && obj[key] === null) {\n continue;\n }\n pushToArray(keys, stringify(\n obj[key],\n key,\n generateArrayPrefix,\n commaRoundTrip,\n options.strictNullHandling,\n options.skipNulls,\n options.encode ? options.encoder : null,\n options.filter,\n options.sort,\n options.allowDots,\n options.serializeDate,\n options.format,\n options.formatter,\n options.encodeValuesOnly,\n options.charset,\n sideChannel\n ));\n }\n\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar formats = require('./formats');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str, decoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\n\nvar encode = function encode(str, defaultEncoder, charset, kind, format) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n var out = '';\n for (var i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n out += string.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n out = out + hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n /* eslint operator-linebreak: [2, \"before\"] */\n out += hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compactQueue(queue);\n\n return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\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","/*\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\n'use strict';\n\nvar punycode = require('punycode');\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/*\n * define these here so at least they only have to be\n * compiled once on the first module load.\n */\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 /*\n * RFC 2396: characters reserved for delimiting URLs.\n * We actually just auto-escape these.\n */\n delims = [\n '<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'\n ],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = [\n '{', '}', '|', '\\\\', '^', '`'\n ].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n /*\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 */\n nonHostChars = [\n '%', '/', '?', ';', '#'\n ].concat(autoEscape),\n hostEndingChars = [\n '/', '?', '#'\n ],\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('qs');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && typeof url === 'object' && 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 (typeof url !== 'string') {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\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 */\n var queryIndex = url.indexOf('?'),\n splitter = 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 /*\n * trim before proceeding.\n * This is to support parse stuff like \" http://foo.com \\n\"\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 /*\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 */\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] && (slashes || (proto && !slashedProtocol[proto]))) {\n\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\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\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)) { hostEnd = hec; }\n }\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 */\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n /*\n * atSign must be in auth portion.\n * http://a@b/c@d => host:b auth:a path:/c@d\n */\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n /*\n * Now we have a portion which is definitely the auth.\n * Pull that off.\n */\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)) { hostEnd = hec; }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) { 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 /*\n * we've indicated that there is a hostname,\n * so even if it's empty, it has to be present.\n */\n this.hostname = this.hostname || '';\n\n /*\n * if hostname begins with [ and ends with ]\n * assume that it's an IPv6 address.\n */\n var ipv6Hostname = this.hostname[0] === '[' && 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 /*\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 */\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 /*\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 */\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 /*\n * strip [ and ] from the hostname\n * the host field still retains them, though\n */\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 /*\n * now rest is set to the post-host stuff.\n * chop off any delim chars.\n */\n if (!unsafeProtocol[lowerProto]) {\n\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 */\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1) { 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 // 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] && 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 /*\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 */\n if (typeof obj === 'string') { 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 ? this.hostname : '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query && typeof this.query === 'object' && Object.keys(this.query).length) {\n query = querystring.stringify(this.query, {\n arrayFormat: 'repeat',\n addQueryPrefix: false\n });\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') { protocol += ':'; }\n\n /*\n * only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n * unless they had them to begin with.\n */\n if (this.slashes || (!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 (typeof relative === 'string') {\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 /*\n * hash is always overridden, no matter what.\n * even href=\"\" will remove it.\n */\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') { result[rkey] = relative[rkey]; }\n }\n\n // urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {\n 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 /*\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 */\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 = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\n mustEndAbs = isRelAbs || isSourceAbs || (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 /*\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 */\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') { srcPath[0] = result.host; } 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; } 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 === '' ? relative.host : result.host;\n result.hostname = relative.hostname || relative.hostname === '' ? 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 /*\n * it's relative\n * throw away the existing file, and take the new path instead.\n */\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 (relative.search != null) {\n /*\n * just pull out the search.\n * like href='?foo'.\n * Put this after the other two cases because it simplifies the booleans\n */\n if (psychotic) {\n result.host = srcPath.shift();\n result.hostname = result.host;\n /*\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 */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n // to support http.request\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n /*\n * no path at all. easy.\n * we've already handled the other stuff above.\n */\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 /*\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 */\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === '';\n\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 */\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] !== '' && (!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] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';\n result.host = result.hostname;\n /*\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 */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (srcPath.length > 0) {\n result.pathname = srcPath.join('/');\n } else {\n result.pathname = null;\n result.path = null;\n }\n\n // to support request.http\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (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\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\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","/*\n ******************************************************************************\n Copyright (c) 2016 Particle Industries, Inc. All rights reserved.\n\n This program is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation, either\n version 3 of the License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this program; if not, see .\n ******************************************************************************\n */\n\nconst fetch = require('node-fetch');\nconst FormData = require('form-data');\nconst qs = require('qs');\nconst fs = require('../fs');\nconst packageJson = require('../package.json');\n\n/**\n * @typedef {string} AccessToken\n */\n\n/**\n * @typedef {object} BasicAuth\n * @property {string} username\n * @property {string} password\n */\n\n/**\n * @typedef {AccessToken | BasicAuth} Auth Prefer using an access token over basic auth for better security\n */\n\n/**\n * The object returned for a basic request\n * @typedef {object} JSONResponse\n * @property {number} statusCode The HTTP response status\n * @property {object} body The endpoint's response parsed as a JSON\n */\n\n/**\n * The possible response from an API request\n * @typedef {JSONResponse | Buffer | ArrayBuffer} RequestResponse\tThe type is based on\n * the request config and whether is on browser or node\n */\n\n/**\n * The error object generated in case of a failed request\n * @typedef {object} RequestError\n * @property {number} statusCode The HTTP response status\n * @property {string} errorDescription Details on what caused the failed request\n * @property {string} shortErrorDescription Summarized version of the fail reason\n * @property {object} body The response object from the request\n * @property {object} error The error object from the request\n */\n\nclass Agent {\n constructor(baseUrl){\n this.setBaseUrl(baseUrl);\n }\n\n setBaseUrl(baseUrl) {\n this.baseUrl = baseUrl;\n }\n\n /**\n * Make a GET request\n * @param {object} params Configurations to customize the request\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.query] Key/Value pairs of query params\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n get({ uri, auth, headers, query, context }) {\n return this.request({ uri, method: 'get', auth, headers, query, context });\n }\n\n /**\n * Make a HEAD request\n * @param {object} params Configurations to customize the request\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.query] Key/Value pairs of query params\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n head({ uri, auth, headers, query, context }) {\n return this.request({ uri, method: 'head', auth, headers, query, context });\n }\n\n /**\n * Make a POST request\n * @param {object} params Configurations to customize the request\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.data] Key/Value pairs of query params\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n post({ uri, headers, data, auth, context }) {\n return this.request({ uri, method: 'post', auth, headers, data, context });\n }\n\n /**\n * Make a PUT request\n * @param {object} params Configurations to customize the request\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.data] Key/VAlue pairs of query params\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n put({ uri, auth, headers, data, context }) {\n return this.request({ uri, method: 'put', auth, headers, data, context });\n }\n\n /**\n * Make a DELETE request\n * @param {object} params Configurations to customize the request\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.data] Key/Value pairs of query params\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n delete({ uri, auth, headers, data, context }) {\n return this.request({ uri, method: 'delete', auth, headers, data, context });\n }\n\n /**\n *\n * @param {object} config An obj with all the possible request configurations\n * @param {string} config.uri The URI to request\n * @param {string} config.method The method used to request the URI, should be in uppercase.\n * @param {object} [config.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [config.data] Arbitrary data to send as the body.\n * @param {Auth} [config.auth] Authorization\n * @param {object} [config.query] Query parameters\n * @param {object} [config.form] Form fields\n * @param {object} [config.files] Array of file names and file content\n * @param {object} [config.context] The invocation context, describing the tool and project.\n * @param {boolean} [config.isBuffer=false] Indicate if the response should be treated as Buffer instead of JSON\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n request({\n uri,\n method,\n headers = undefined,\n data = undefined,\n auth,\n query = undefined,\n form = undefined,\n files = undefined,\n context = undefined,\n isBuffer = false\n }){\n const requestFiles = this._sanitizeFiles(files);\n const requestParams = this._buildRequest({ uri, method, headers, data, auth, query, form, context, files: requestFiles });\n return this._promiseResponse(requestParams, isBuffer);\n }\n\n /**\n * Promises to send the request and retrieve the response.\n * @param {[string, object]} requestParams First argument is the URI to request, the second one are the options.\n * @param {boolean} isBuffer Indicate if the response body should be returned as a Buffer (Node) / ArrayBuffer (browser) instead of JSON\n * @param {function} [makerequest=fetch] The fetch function to use. Override for testing.\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n * @private\n */\n _promiseResponse(requestParams, isBuffer, makerequest = fetch) {\n let status;\n return makerequest(...requestParams)\n .then((resp) => {\n status = resp.status;\n if (!resp.ok) {\n return resp.text().then((err) => {\n const objError = JSON.parse(err);\n // particle-commnds/src/cmd/api expects response.text. to be a string\n const response = Object.assign(resp, { text: err });\n throw Object.assign(objError, { response });\n });\n }\n if (status === 204) { // Can't do resp.json() since there is no body to parse\n return '';\n }\n if (isBuffer) {\n return resp.blob();\n }\n return resp.json();\n }).then((body) => {\n if (isBuffer) {\n return body.arrayBuffer().then((arrayBuffer) => {\n if (!this.isForBrowser()) {\n return Buffer.from(arrayBuffer);\n }\n return arrayBuffer;\n });\n }\n return {\n body,\n statusCode: status\n };\n }).catch((error) => {\n const errorType = status ? `HTTP error ${status}` : 'Network error';\n let errorDescription = `${errorType} from ${requestParams[0]}`;\n let shortErrorDescription;\n if (error.error_description) { // Fetch responded with ok false\n errorDescription = `${errorDescription} - ${error.error_description}`;\n shortErrorDescription = error.error_description;\n }\n const reason = new Error(errorDescription);\n Object.assign(reason, {\n statusCode: status,\n errorDescription,\n shortErrorDescription,\n error,\n body: error\n });\n throw reason;\n });\n }\n\n /**\n * Generate the params in a format valid for 'fetch'\n * @param {object} config Configurations to customize the request\n * @param {string} config.uri The URI to request\n * @param {string} config.method The method used to request the URI, should be in uppercase.\n * @param {object} [config.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [config.data] Arbitrary data to send as the body.\n * @param {Auth} [config.auth] Authorization\n * @param {object} [config.query] Query parameters\n * @param {object} [config.form] Form fields\n * @param {object} [config.files] Array of file names and file content\n * @param {object} [config.context] The invocation context, describing the tool and project.\n * @returns {[string, object]} The uri to make the request too, and extra configs\n * @private\n */\n _buildRequest({ uri, method, headers, data, auth, query, form, files, context }){\n let actualUri = uri;\n if (this.baseUrl && uri[0] === '/') {\n actualUri = `${this.baseUrl}${uri}`;\n }\n if (query) {\n const queryParams = qs.stringify(query);\n const hasParams = actualUri.includes('?');\n actualUri = `${actualUri}${hasParams ? '&' : '?'}${queryParams}`;\n }\n\n const userAgentHeader = { 'User-Agent': `${packageJson.name}/${packageJson.version} (${packageJson.repository.url})` };\n let body;\n let contentTypeHeader;\n if (files){\n // @ts-ignore\n contentTypeHeader = {}; // Needed to allow fetch create its own\n body = this._getFromData(files, form);\n } else if (form){\n contentTypeHeader = { 'Content-Type': 'application/x-www-form-urlencoded' };\n body = qs.stringify(form);\n } else if (data){\n contentTypeHeader = { 'Content-Type': 'application/json' };\n body = JSON.stringify(data);\n }\n const finalHeaders = Object.assign({},\n userAgentHeader,\n contentTypeHeader,\n this._getAuthorizationHeader(auth),\n this._getContextHeaders(context),\n headers\n );\n\n return [actualUri, { method, body, headers: finalHeaders }];\n }\n\n isForBrowser() {\n return typeof window !== 'undefined';\n }\n\n _getFromData(files, form) {\n const formData = new FormData();\n for (let [name, file] of Object.entries(files)){\n let path = file.path;\n let fileData = file.data;\n if (!this.isForBrowser()) {\n const nodeFormData = this._getNodeFormData(file);\n path = nodeFormData.path;\n fileData = nodeFormData.file;\n }\n formData.append(name, fileData, path);\n }\n if (form){\n for (let [name, value] of Object.entries(form)){\n formData.append(name, value);\n }\n }\n return formData;\n }\n\n _getNodeFormData(file) {\n let fileData = file.data;\n if (typeof file.data === 'string') {\n fileData = fs.createReadStream(file.data);\n }\n return {\n file: fileData,\n path: { filepath: file.path } // Different API for nodejs\n };\n }\n\n _getContextHeaders(context = {}) {\n return Object.assign({},\n this._getToolContext(context.tool),\n this._getProjectContext(context.project)\n );\n }\n\n _getToolContext(tool = {}){\n let value = '';\n if (tool.name){\n value += this._toolIdent(tool);\n if (tool.components){\n for (let component of tool.components){\n value += ', '+this._toolIdent(component);\n }\n }\n }\n if (value){\n return { 'X-Particle-Tool': value };\n }\n return {};\n }\n\n _toolIdent(tool){\n return this._nameAtVersion(tool.name, tool.version);\n }\n\n _nameAtVersion(name, version){\n let value = '';\n if (name){\n value += name;\n if (version){\n value += '@'+version;\n }\n }\n return value;\n }\n\n _getProjectContext(project = {}){\n let value = this._buildSemicolonSeparatedProperties(project, 'name');\n if (value){\n return { 'X-Particle-Project': value };\n }\n return {};\n }\n\n /**\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 _buildSemicolonSeparatedProperties(obj, primaryProperty){\n let value = '';\n if (obj[primaryProperty]){\n value += obj[primaryProperty];\n for (let prop in obj){\n if (prop!==primaryProperty && obj.hasOwnProperty(prop)){\n value += '; '+prop+'='+obj[prop];\n }\n }\n }\n return value;\n }\n\n /**\n * Adds an authorization header.\n * @param {Auth} [auth] The authorization bearer token.\n * @returns {object} The original request.\n */\n _getAuthorizationHeader(auth){\n if (!auth) {\n return {};\n }\n if (typeof auth === 'string') {\n return { Authorization: `Bearer ${auth}` };\n }\n let encoded;\n if (this.isForBrowser()) {\n encoded = btoa(`${auth.username}:${auth.password}`);\n } else {\n encoded = Buffer.from(`${auth.username}:${auth.password}`)\n .toString('base64');\n }\n return { Authorization: `Basic ${encoded}` };\n }\n\n /**\n *\n * @param {Object} files converts the file names to file, file1, file2.\n * @returns {object} the renamed files.\n */\n _sanitizeFiles(files){\n let requestFiles;\n if (files){\n requestFiles = {};\n Object.keys(files).forEach((k, i) => {\n const name = i ? `file${i + 1}` : 'file';\n requestFiles[name] = {\n data: files[k],\n path: k\n };\n });\n }\n return requestFiles;\n }\n}\n\nmodule.exports = Agent;\n","const Library = require('./Library');\nlet Particle;\n\nclass Client {\n constructor({ auth, api = new Particle() }){\n this.auth = auth;\n this.api = api;\n }\n\n ready(){\n return Boolean(this.auth);\n }\n\n /**\n * Get firmware library objects\n * @param {Object} query The query parameters for libraries. See Particle.listLibraries\n * @returns {Promise} A promise\n */\n libraries(query = {}){\n return this.api.listLibraries(Object.assign({}, query, { auth: this.auth }))\n .then(payload => {\n const libraries = payload.body.data || [];\n return libraries.map(l => new Library(this, l));\n });\n }\n\n /**\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 library(name, query = {}){\n return this.api.getLibrary(Object.assign({}, query, { name, auth: this.auth }))\n .then(payload => {\n const library = payload.body.data || {};\n return new Library(this, library);\n });\n }\n\n /**\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 libraryVersions(name, query = {}){\n return this.api.getLibraryVersions(Object.assign({}, query, { name, auth: this.auth }))\n .then(payload => {\n const libraries = payload.body.data || [];\n return libraries.map(l => new Library(this, l));\n });\n }\n\n /**\n * Contribute a new library version\n * @param {Buffer} archive The compressed archive with the library source\n * @returns {Promise} A promise\n */\n contributeLibrary(archive){\n return this.api.contributeLibrary({ archive, auth: this.auth })\n .then(payload => {\n const library = payload.body.data || {};\n return new Library(this, library);\n }, error => {\n this._throwError(error);\n });\n }\n\n /**\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 publishLibrary(name){\n return this.api.publishLibrary({ name, auth: this.auth })\n .then(payload => {\n const library = payload.body.data || {};\n return new Library(this, library);\n }, error => {\n this._throwError(error);\n });\n }\n\n /**\n * Delete an entire published library\n * @param {object} params\tSpecific params of the library to delete\n * @param {string} params.name\tName of the library to delete\n * @param {string} params.force\tKey to force deleting a public library\n * @returns {Promise} A promise\n */\n deleteLibrary({ name, force }){\n return this.api.deleteLibrary({ name, force, auth: this.auth })\n .then(() => true, error => this._throwError(error));\n }\n\n _throwError(error){\n if (error.body && error.body.errors){\n const errorMessages = error.body.errors.map((e) => e.message).join('\\n');\n throw new Error(errorMessages);\n }\n throw error;\n }\n\n downloadFile(uri){\n return this.api.downloadFile({ uri });\n }\n\n /**\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 compileCode(files, platformId, targetVersion){\n return this.api.compileCode({ files, platformId, targetVersion, auth: this.auth });\n }\n\n /**\n * @param {object} params\n * @param {string} params.deviceId\tDevice ID or Name\n * @param {boolean} params.signal\tSignal on or off\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n signalDevice({ signal, deviceId }){\n return this.api.signalDevice({ signal, deviceId, auth: this.auth });\n }\n\n /**\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n listDevices(){\n return this.api.listDevices({ auth: this.auth });\n }\n\n /**\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n listBuildTargets(){\n return this.api.listBuildTargets({ onlyFeatured: true, auth: this.auth })\n .then(payload => {\n let targets = [];\n for (let target of payload.body.targets){\n for (let platform of target.platforms){\n targets.push({\n version: target.version,\n platform: platform,\n prerelease: target.prereleases.indexOf(platform) > -1,\n firmware_vendor: target.firmware_vendor\n });\n }\n }\n return targets;\n }, () => {});\n }\n\n trackingIdentity({ full = false, context = undefined }={}){\n return this.api.trackingIdentity({ full, context, auth: this.auth })\n .then(payload => {\n return payload.body;\n });\n }\n}\n\nmodule.exports = Client;\nParticle = require('./Particle'); // Move it to after the export to avoid issue with circular reference\n","module.exports = {\n baseUrl: 'https://api.particle.io',\n clientSecret: 'particle-api',\n clientId: 'particle-api',\n tokenDuration: 7776000, // 90 days\n auth: undefined\n};\n","/* eslint max-depth: 0 */\nconst http = require('http');\nconst https = require('https');\nconst url = require('url');\nconst { EventEmitter } = require('events');\n\nclass EventStream extends EventEmitter {\n constructor(uri, token) {\n super();\n this.uri = uri;\n this.token = token;\n this.reconnectInterval = 2000;\n this.timeout = 13000; // keep alive can be sent up to 12 seconds after last event\n this.data = '';\n this.buf = '';\n\n this.parse = this.parse.bind(this);\n this.end = this.end.bind(this);\n this.idleTimeoutExpired = this.idleTimeoutExpired.bind(this);\n }\n\n connect() {\n return new Promise((resolve, reject) => {\n const { hostname, protocol, port, path } = url.parse(this.uri);\n this.origin = `${protocol}//${hostname}${port ? (':' + port) : ''}`;\n\n const isSecure = protocol === 'https:';\n const requestor = isSecure ? https : http;\n const req = requestor.request({\n hostname,\n protocol,\n path: `${path}?access_token=${this.token}`,\n method: 'get',\n // @ts-ignore\n port: parseInt(port, 10) || (isSecure ? 443 : 80),\n // @ts-ignore\n mode: 'prefer-streaming'\n });\n\n this.req = req;\n\n let connected = false;\n let connectionTimeout = setTimeout(() => {\n if (this.req) {\n this.req.abort();\n }\n reject({ error: new Error('Timeout'), errorDescription: `Timeout connecting to ${this.uri}` });\n }, this.timeout);\n\n req.on('error', e => {\n clearTimeout(connectionTimeout);\n\n if (connected) {\n this.end();\n } else {\n reject({ error: e, errorDescription: `Network error from ${this.uri}` });\n }\n });\n\n req.on('response', res => {\n clearTimeout(connectionTimeout);\n\n const statusCode = res.statusCode;\n if (statusCode !== 200) {\n let body = '';\n res.on('data', chunk => body += chunk);\n res.on('end', () => {\n try {\n body = JSON.parse(body);\n } catch (e) {\n // don't bother doing anything special if the JSON.parse fails\n // since we are already about to reject the promise anyway\n } finally {\n let errorDescription = `HTTP error ${statusCode} from ${this.uri}`;\n // @ts-ignore\n if (body && body.error_description) {\n // @ts-ignore\n errorDescription += ' - ' + body.error_description;\n }\n reject({ statusCode, errorDescription, body });\n this.req = undefined;\n }\n });\n return;\n }\n\n this.data = '';\n this.buf = '';\n\n connected = true;\n res.on('data', this.parse);\n res.once('end', this.end);\n this.startIdleTimeout();\n resolve(this);\n });\n req.end();\n });\n }\n\n abort() {\n if (this.req) {\n this.req.abort();\n this.req = undefined;\n }\n this.removeAllListeners();\n }\n\n /* Private methods */\n\n emitSafe(event, param) {\n try {\n this.emit(event, param);\n } catch (error) {\n if (event !== 'error') {\n this.emitSafe('error', error);\n }\n }\n }\n\n end() {\n this.stopIdleTimeout();\n\n if (!this.req) {\n // request was ended intentionally by abort\n // do not auto reconnect.\n return;\n }\n\n this.req = undefined;\n this.emitSafe('disconnect');\n this.reconnect();\n }\n\n reconnect() {\n setTimeout(() => {\n if (this.isOffline()) {\n this.reconnect();\n return;\n }\n\n this.emitSafe('reconnect');\n this.connect().then(() => {\n this.emitSafe('reconnect-success');\n }).catch(err => {\n this.emitSafe('reconnect-error', err);\n this.reconnect();\n });\n }, this.reconnectInterval);\n }\n\n isOffline() {\n if (typeof navigator === 'undefined' || navigator.hasOwnProperty('onLine')) {\n return false;\n }\n return !navigator.onLine;\n }\n\n startIdleTimeout() {\n this.stopIdleTimeout();\n this.idleTimeout = setTimeout(this.idleTimeoutExpired, this.timeout);\n }\n\n stopIdleTimeout() {\n if (this.idleTimeout) {\n clearTimeout(this.idleTimeout);\n this.idleTimeout = null;\n }\n }\n\n idleTimeoutExpired() {\n if (this.req) {\n this.req.abort();\n this.end();\n }\n }\n\n parse(chunk) {\n this.startIdleTimeout();\n\n this.buf += chunk;\n let pos = 0;\n let length = this.buf.length;\n let discardTrailingNewline = false;\n\n while (pos < length) {\n if (discardTrailingNewline) {\n if (this.buf[pos] === '\\n') {\n ++pos;\n }\n discardTrailingNewline = false;\n }\n\n let lineLength = -1;\n let fieldLength = -1;\n\n for (let i = pos; lineLength < 0 && i < length; ++i) {\n const c = this.buf[i];\n if (c === ':') {\n if (fieldLength < 0) {\n fieldLength = i - pos;\n }\n } else if (c === '\\r') {\n discardTrailingNewline = true;\n lineLength = i - pos;\n } else if (c === '\\n') {\n lineLength = i - pos;\n }\n }\n\n if (lineLength < 0) {\n break;\n }\n\n this.parseEventStreamLine(pos, fieldLength, lineLength);\n\n pos += lineLength + 1;\n }\n\n if (pos === length) {\n this.buf = '';\n } else if (pos > 0) {\n this.buf = this.buf.slice(pos);\n }\n }\n\n parseEventStreamLine(pos, fieldLength, lineLength) {\n if (lineLength === 0) {\n try {\n if (this.data.length > 0 && this.event) {\n const event = JSON.parse(this.data);\n event.name = this.eventName || '';\n this.emitSafe('event', event);\n }\n } catch (e) {\n // do nothing if JSON.parse fails\n } finally {\n this.data = '';\n this.eventName = undefined;\n this.event = false;\n }\n } else if (fieldLength > 0) {\n const field = this.buf.slice(pos, pos + fieldLength);\n let step = 0;\n\n if (this.buf[pos + fieldLength + 1] !== ' ') {\n step = fieldLength + 1;\n } else {\n step = fieldLength + 2;\n }\n pos += step;\n const valueLength = lineLength - step;\n const value = this.buf.slice(pos, pos + valueLength);\n\n if (field === 'data') {\n this.data += value + '\\n';\n } else if (field === 'event') {\n this.eventName = value;\n this.event = true;\n }\n }\n }\n}\n\nmodule.exports = EventStream;\n","/* Library\n * Represents a version of a library contributed in the cloud.\n */\n\nclass Library {\n constructor(client, data) {\n // Make client non-enumerable so it doesn't show up in Object.keys, JSON.stringify, etc\n Object.defineProperty(this, 'client', { value: client });\n this._assignAttributes(data);\n this.downloadUrl = data.links && data.links.download;\n }\n\n _assignAttributes(data) {\n Object.assign(this, data.attributes);\n }\n\n\n /**\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 download() {\n if (!this.downloadUrl) {\n return Promise.reject(new Error('No download URL for this library'));\n }\n // @ts-ignore\n return this.client.downloadFile(this.downloadUrl);\n }\n\n /* TODO: add a versions() method to fetch an array of library objects */\n}\n\nmodule.exports = Library;\n","const Defaults = require('./Defaults');\nconst EventStream = require('./EventStream');\nconst Agent = require('./Agent');\nconst Client = require('./Client');\n\n// Hack to avoid importing the type on every @return statement\n/**\n * @typedef {import('./Agent').RequestResponse} RequestResponse\n */\n/**\n * @typedef {import('./Agent').RequestError} RequestError\n */\n/**\n * @typedef {import('./Agent').Auth} Auth\n */\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 */\nclass Particle {\n /**\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 * @param {string} [options.baseUrl]\n * @param {string} [options.clientSecret]\n * @param {string} [options.clientId]\n * @param {number} [options.tokenDuration]\n * @param {Auth} [options.auth] The access token or basic auth object. If not specified here, will have to be added to every request\n */\n constructor(options = {}){\n if (options.auth) {\n this.setDefaultAuth(options.auth);\n }\n\n // todo - this seems a bit dangerous - would be better to put all options/context in a contained object\n Object.assign(this, Defaults, options);\n this.context = {};\n this.agent = new Agent(this.baseUrl);\n }\n\n _isValidContext(name, context){\n return (name === 'tool' || name === 'project') && context !== undefined;\n }\n\n setContext(name, context){\n if (context !== undefined){\n if (this._isValidContext(name, context)){\n this.context[name] = context;\n } else {\n throw Error('unknown context name or undefined context: ' + name);\n }\n }\n }\n\n /**\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 _buildContext(context){\n return Object.assign(this.context, context);\n }\n\n /**\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 // @ts-ignore\n login({ username, password, tokenDuration = this.tokenDuration, headers, context }){\n return this.request({\n uri: '/oauth/token',\n method: 'post',\n headers,\n form: {\n username,\n password,\n grant_type: 'password',\n // @ts-ignore\n client_id: this.clientId,\n // @ts-ignore\n client_secret: this.clientSecret,\n expires_in: tokenDuration\n },\n context\n });\n }\n\n /**\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 sendOtp({ mfaToken, otp, headers, context }){\n return this.request({\n uri: '/oauth/token',\n method: 'post',\n headers,\n form: {\n grant_type: 'urn:custom:mfa-otp',\n mfa_token: mfaToken,\n otp,\n // @ts-ignore\n client_id: this.clientId,\n // @ts-ignore\n client_secret: this.clientSecret\n },\n context\n });\n }\n\n /**\n * Enable MFA on the currently logged in user\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 enableMfa({ auth, headers, context }){\n return this.get({ uri: '/v1/user/mfa-enable', auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 confirmMfa({ mfaToken, otp, invalidateTokens = false, auth, headers, context }){\n let data = { mfa_token: mfaToken, otp };\n\n if (invalidateTokens) {\n data.invalidate_tokens = true;\n }\n\n return this.post({\n uri: '/v1/user/mfa-enable',\n auth,\n headers,\n data,\n context\n });\n }\n\n /**\n * Disable MFA for the user.\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 disableMfa({ currentPassword, auth, headers, context }){\n return this.put({\n uri: '/v1/user/mfa-disable',\n auth,\n headers,\n data: { current_password: currentPassword },\n context\n });\n }\n\n /**\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 createCustomer({ email, password, product, headers, context }){\n return this.request({\n uri: `/v1/products/${product}/customers`,\n method: 'post',\n headers,\n form: {\n email,\n password,\n grant_type: 'client_credentials',\n // @ts-ignore\n client_id: this.clientId,\n // @ts-ignore\n client_secret: this.clientSecret\n },\n context\n });\n }\n\n /**\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 loginAsClientOwner({ headers, context }){\n return this.request({\n uri: '/oauth/token',\n method: 'post',\n headers,\n form: {\n grant_type: 'client_credentials',\n // @ts-ignore\n client_id: this.clientId,\n // @ts-ignore\n client_secret: this.clientSecret\n },\n context\n });\n }\n\n /**\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 createUser({ username, password, accountInfo, headers, context }){\n return this.post({\n uri: '/v1/users',\n headers,\n data: {\n username,\n password,\n account_info : accountInfo\n },\n context\n });\n }\n\n /**\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 verifyUser({ token, headers, context }){\n return this.post({\n uri: '/v1/user/verify',\n headers,\n data: { token },\n context\n });\n }\n\n /**\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 resetPassword({ username, headers, context }){\n return this.post({\n uri: '/v1/user/password-reset',\n headers,\n data: { username },\n context\n });\n }\n\n /**\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 deleteAccessToken({ username, password, token, headers, context }){\n return this.delete({\n uri: `/v1/access_tokens/${token}`,\n auth: { username, password },\n headers,\n data: { access_token: token },\n context\n });\n }\n\n /**\n * Revoke the current session access token\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteCurrentAccessToken({ auth, headers, context }){\n return this.delete({\n uri: '/v1/access_tokens/current',\n auth,\n headers,\n context\n });\n }\n\n /**\n * Revoke all active access tokens\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteActiveAccessTokens({ auth, headers, context }){\n return this.delete({\n uri: '/v1/access_tokens',\n auth,\n headers,\n context\n });\n }\n\n /**\n * Delete the current user\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteUser({ auth, password, headers, context }){\n return this.delete({\n uri: '/v1/user',\n data: { password },\n auth,\n headers,\n context\n });\n }\n\n /**\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 listAccessTokens({ username, password, otp, headers, context }){\n return this.get({\n uri: '/v1/access_tokens',\n auth: { username, password },\n query: otp ? { otp } : undefined,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 trackingIdentity({ full = false, auth, headers, context } = {}){\n return this.get({\n uri: '/v1/user/identify',\n auth,\n headers,\n query: (full ? undefined : { tracking: 1 }),\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listDevices({ deviceId, deviceName, groups, sortAttr, sortDir, page, perPage, product, auth, headers, context }){\n let uri, query;\n\n if (product){\n uri = `/v1/products/${product}/devices`;\n query = {\n deviceId,\n deviceName,\n groups: Array.isArray(groups) ? groups.join(',') : undefined,\n sortAttr,\n sortDir,\n page,\n per_page: perPage\n };\n } else {\n uri = '/v1/devices';\n }\n\n return this.get({ uri, auth, headers, query, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getDevice({ deviceId, product, auth, headers, context }){\n const uri = this.deviceUri({ deviceId, product });\n return this.get({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {boolean} options.requestTransfer True to request the device be transfered from another 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 claimDevice({ deviceId, requestTransfer, auth, headers, context }){\n return this.post({\n uri: '/v1/devices',\n auth,\n headers,\n data: {\n id: deviceId,\n request_transfer: !!requestTransfer\n },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 addDeviceToProduct({ deviceId, product, file, auth, headers, context }){\n let files, data;\n\n if (file){\n files = { file };\n } else if (deviceId){\n data = { id: deviceId };\n }\n\n return this.request({\n uri: `/v1/products/${product}/devices`,\n method: 'post',\n headers,\n data,\n files,\n auth,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeDevice({ deviceId, deny, product, auth, headers, context }){\n const uri = this.deviceUri({ deviceId, product });\n const data = product ? { deny } : undefined;\n return this.delete({ uri, data, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeDeviceOwner({ deviceId, product, auth, headers, context }){\n const uri = `/v1/products/${product}/devices/${deviceId}/owner`;\n return this.delete({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 renameDevice({ deviceId, name, product, auth, headers, context }){\n return this.updateDevice({ deviceId, name, product, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 signalDevice({ deviceId, signal, product, auth, headers, context }){\n return this.updateDevice({ deviceId, signal, product, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 setDeviceNotes({ deviceId, notes, product, auth, headers, context }){\n return this.updateDevice({ deviceId, notes, product, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 markAsDevelopmentDevice({ deviceId, development = true, product, auth, headers, context }){\n return this.updateDevice({ deviceId, development, product, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 lockDeviceProductFirmware({ deviceId, desiredFirmwareVersion, flash, product, auth, headers, context }){\n return this.updateDevice({ deviceId, desiredFirmwareVersion, flash, product, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 unlockDeviceProductFirmware({ deviceId, product, auth, headers, context }){\n return this.updateDevice({ deviceId, desiredFirmwareVersion: null, product, auth, headers, context });\n }\n\n /**\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 | null} [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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 updateDevice({ deviceId, name, signal, notes, development, desiredFirmwareVersion, flash, product, auth, headers, context }){\n let signalValue;\n if (signal !== undefined){\n signalValue = signal ? '1' : '0';\n }\n\n const uri = this.deviceUri({ deviceId, product });\n const data = product ?\n { name, signal: signalValue, notes, development, desired_firmware_version: desiredFirmwareVersion, flash } :\n { name, signal: signalValue, notes };\n\n return this.put({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 provisionDevice({ productId, auth, headers, context }){\n return this.post({\n uri: '/v1/devices',\n auth,\n headers,\n data: { product_id: productId },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getClaimCode({ iccid, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/device_claims` : '/v1/device_claims';\n return this.post({ uri, auth, headers, data: { iccid }, context });\n }\n\n validatePromoCode({ promoCode, auth, headers, context }){\n return this.get({\n uri: `/v1/promo_code/${promoCode}`,\n auth,\n headers,\n context\n });\n }\n\n changeProduct({ deviceId, productId, auth, headers, context }){\n return this.put({\n uri: `/v1/devices/${deviceId}`,\n auth,\n headers,\n data: { product_id: productId },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getVariable({ deviceId, name, product, auth, headers, context }){\n const uri = product ?\n `/v1/products/${product}/devices/${deviceId}/${name}` :\n `/v1/devices/${deviceId}/${name}`;\n\n return this.get({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 flashDevice({ deviceId, product, files, targetVersion, auth, headers, context }){\n const uri = this.deviceUri({ deviceId, product });\n const form = {};\n\n if (targetVersion){\n form.build_target_version = targetVersion;\n } else {\n form.latest = 'true';\n }\n\n return this.request({ uri, method: 'put', auth, headers, files, form, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 flashTinker({ deviceId, auth, headers, context }){\n /* eslint-disable no-console */\n /* @ts-ignore */\n if (console && console.warning){\n // @ts-ignore\n console.warning('Particle.flashTinker is deprecated');\n }\n /* eslint-enable no-console */\n return this.put({\n uri: `/v1/devices/${deviceId}`,\n headers,\n data: { app: 'tinker' },\n auth,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 compileCode({ files, platformId, targetVersion, auth, headers, context }){\n const form = { platform_id: platformId };\n\n if (targetVersion){\n form.build_target_version = targetVersion;\n } else {\n form.latest = 'true';\n }\n\n return this.request({\n uri: '/v1/binaries',\n method: 'post',\n auth,\n headers,\n files,\n form,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 downloadFirmwareBinary({ binaryId, auth, headers, context }){\n return this.request({\n uri: `/v1/binaries/${binaryId}`,\n method: 'get',\n auth,\n headers,\n context,\n isBuffer: true\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 sendPublicKey({ deviceId, key, algorithm, auth, headers, context }){\n return this.post({\n uri: `/v1/provisioning/${deviceId}`,\n auth,\n headers,\n data: {\n deviceID: deviceId,\n publicKey: ( typeof key === 'string' ? key : key.toString() ),\n filename: 'particle-api',\n order: `manual_${ Date.now() }`,\n algorithm: algorithm || 'rsa'\n },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 callFunction({ deviceId, name, argument, product, auth, headers, context }){\n const uri = product ?\n `/v1/products/${product}/devices/${deviceId}/${name}` :\n `/v1/devices/${deviceId}/${name}`;\n return this.post({ uri, auth, headers, data: { args: argument }, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @returns {Promise} If the promise resolves, the resolution value will be an EventStream object that will\n * emit 'event' events.\n */\n getEventStream({ deviceId, name, org, product, auth }){\n let uri = '/v1/';\n if (org){\n uri += `orgs/${org}/`;\n }\n\n if (product){\n uri += `products/${product}/`;\n }\n\n if (deviceId){\n uri += 'devices/';\n if (!(deviceId.toLowerCase() === 'mine')){\n uri += `${deviceId}/`;\n }\n }\n\n uri += 'events';\n\n if (name){\n uri += `/${encodeURIComponent(name)}`;\n }\n\n auth = this._getActiveAuthToken(auth);\n return new EventStream(`${this.baseUrl}${uri}`, auth).connect();\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 publishEvent({ name, data, isPrivate, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/events` : '/v1/devices/events';\n const postData = { name, data, private: isPrivate };\n return this.post({ uri, auth, headers, data: postData, context });\n }\n\n /**\n * @typedef {Object} Hook\n * @property {String} [method=POST] Type of web request triggered by the Webhook (GET, POST, PUT, or DELETE)\n * @property {Object} [auth] Auth data like `{ username: 'me', password: '1234' }` to send via basic auth header with the Webhook request\n * @property {Object} [headers] Additional headers to add to the Webhook like `{ 'X-ONE': '1', X-TWO: '2' }`\n * @property {Object} [query] Query params to add to the Webhook request like `{ foo: 'foo', bar: 'bar' }`\n * @property {Object} [json] JSON data to send with the Webhook request - sets `Content-Type` to `application/json`\n * @property {Object} [form] Form data to send with the Webhook request - sets `Content-Type` to `application/x-www-form-urlencoded`\n * @property {String} [body] Custom body to send with the Webhook request\n * @property {Object} [responseTemplate] Template to use to customize the Webhook response body\n * @property {Object} [responseEvent] The Webhook response event name that your devices can subscribe to\n * @property {Object} [errorResponseEvent] The Webhook error response event name that your devices can subscribe to\n */\n\n /**\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 {Hook} [options.hook] Webhook configuration settings\n * @param {String} [options.product] Webhook for this product ID or slug\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 createWebhook({ event, url, device, rejectUnauthorized, noDefaults, hook, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/webhooks` : '/v1/webhooks';\n const data = { event, url, deviceId: device, rejectUnauthorized, noDefaults };\n\n if (hook){\n data.requestType = hook.method;\n data.auth = hook.auth;\n data.headers = hook.headers;\n data.query = hook.query;\n data.json = hook.json;\n data.form = hook.form;\n data.body = hook.body;\n data.responseTemplate = hook.responseTemplate;\n data.responseTopic = hook.responseEvent;\n data.errorResponseTopic = hook.errorResponseEvent;\n }\n\n if (!data.requestType){\n data.requestType = 'POST';\n }\n\n return this.post({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteWebhook({ hookId, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/webhooks/${hookId}` : `/v1/webhooks/${hookId}`;\n return this.delete({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listWebhooks({ product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/webhooks` : '/v1/webhooks';\n return this.get({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 createIntegration({ event, settings, deviceId, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/integrations` : '/v1/integrations';\n const data = Object.assign({ event, deviceid: deviceId }, settings);\n return this.post({ uri, data, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 editIntegration({ integrationId, event, settings, deviceId, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/integrations/${integrationId}` : `/v1/integrations/${integrationId}`;\n const data = Object.assign({ event, deviceid: deviceId }, settings);\n return this.put({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteIntegration({ integrationId, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/integrations/${integrationId}` : `/v1/integrations/${integrationId}`;\n return this.delete({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listIntegrations({ product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/integrations` : '/v1/integrations';\n return this.get({ uri, auth, headers, context });\n }\n\n /**\n * Get details about the current user\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getUserInfo({ auth, headers, context }){\n return this.get({ uri: '/v1/user', auth, headers, context });\n }\n\n /**\n * Set details on the current user\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 setUserInfo({ accountInfo, auth, headers, context }){\n const data = { account_info: accountInfo };\n return this.put({ uri: '/v1/user', auth, headers, data, context });\n }\n\n /**\n * Change username (i.e, email)\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 changeUsername({ currentPassword, username, invalidateTokens = false, auth, headers, context }){\n const data = { username, current_password: currentPassword };\n\n if (invalidateTokens) {\n data.invalidate_tokens = true;\n }\n\n return this.put({ uri: '/v1/user', auth, headers, data, context });\n }\n\n /**\n * Change user's password\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 changeUserPassword({ currentPassword, password, invalidateTokens = false, auth, headers, context }){\n const data = { password, current_password: currentPassword };\n\n if (invalidateTokens) {\n data.invalidate_tokens = true;\n }\n\n return this.put({ uri: '/v1/user', auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listSIMs({ iccid, deviceId, deviceName, page, perPage, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/sims` : '/v1/sims';\n const query = product ? { iccid, deviceId, deviceName, page, per_page: perPage } : undefined;\n return this.get({ uri, auth, headers, query, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getSIMDataUsage({ iccid, product, auth, headers, context }){\n const uri = product ?\n `/v1/products/${product}/sims/${iccid}/data_usage` :\n `/v1/sims/${iccid}/data_usage`;\n\n return this.get({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getFleetDataUsage({ product, auth, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/sims/data_usage`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 checkSIM({ iccid, auth, headers, context }){\n return this.head({ uri: `/v1/sims/${iccid}`, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 {any} [options.promoCode]\n * @returns {Promise} A promise\n */\n activateSIM({ iccid, iccids, country, promoCode, product, auth, headers, context }){\n // promoCode is deprecated\n iccids = iccids || [iccid];\n const uri = product ? `/v1/products/${product}/sims` : `/v1/sims/${iccid}`;\n const data = product ?\n { sims: iccids, country } :\n { country, promoCode, action: 'activate' };\n const method = product ? 'post' : 'put';\n\n return this.request({ uri, method, headers, data, auth, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deactivateSIM({ iccid, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/sims/${iccid}` : `/v1/sims/${iccid}`;\n const data = { action: 'deactivate' };\n return this.put({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 reactivateSIM({ iccid, mbLimit, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/sims/${iccid}` : `/v1/sims/${iccid}`;\n const data = { mb_limit: mbLimit, action: 'reactivate' };\n return this.put({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 updateSIM({ iccid, mbLimit, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/sims/${iccid}` : `/v1/sims/${iccid}`;\n const data = { mb_limit: mbLimit };\n return this.put({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeSIM({ iccid, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/sims/${iccid}` : `/v1/sims/${iccid}`;\n return this.delete({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listBuildTargets({ onlyFeatured, auth, headers, context }){\n const query = onlyFeatured ? { featured: !!onlyFeatured } : undefined;\n return this.get({ uri: '/v1/build_targets', auth, headers, query, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listLibraries({ page, limit, filter, sort, architectures, category, scope, excludeScopes, auth, headers, context }){\n return this.get({\n uri: '/v1/libraries',\n auth,\n headers,\n query: {\n page,\n filter,\n limit,\n sort,\n architectures: this._asList(architectures),\n category,\n scope,\n excludeScopes: this._asList(excludeScopes)\n },\n context\n });\n }\n\n _asList(value){\n return (Array.isArray(value) ? value.join(',') : value);\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getLibrary({ name, version, auth, headers, context }){\n return this.get({\n uri: `/v1/libraries/${name}`,\n auth,\n headers,\n query: { version },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getLibraryVersions({ name, page, limit, auth, headers, context }){\n return this.get({\n uri: `/v1/libraries/${name}/versions`,\n auth,\n headers,\n query: { page, limit },\n context\n });\n }\n\n /**\n * Contribute a new library version from a compressed archive\n * @param {Object} options Options for this API call\n * @param {String | Buffer} 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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 contributeLibrary({ archive, auth, headers, context }){\n const files = {\n 'archive.tar.gz': archive\n };\n\n return this.request({\n uri: '/v1/libraries',\n method: 'post',\n auth,\n headers,\n files,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 publishLibrary({ name, auth, headers, context }){\n return this.request({\n uri: `/v1/libraries/${name}`,\n method: 'patch',\n auth,\n headers,\n data: { visibility: 'public' },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteLibrary({ name, force, auth, headers, context }){\n return this.delete({\n uri: `/v1/libraries/${name}`,\n auth,\n headers,\n data: { force },\n context\n });\n }\n\n /**\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 downloadFile({ uri, headers, context }){\n return this.request({ uri, method: 'get', headers, context, isBuffer: true });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listOAuthClients({ product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/clients` : '/v1/clients';\n return this.get({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 createOAuthClient({ name, type, redirect_uri, scope, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/clients` : '/v1/clients';\n const data = { name, type, redirect_uri, scope };\n return this.post({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 updateOAuthClient({ clientId, name, scope, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/clients/${clientId}` : `/v1/clients/${clientId}`;\n const data = { name, scope };\n return this.put({ uri, data, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteOAuthClient({ clientId, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/clients/${clientId}` : `/v1/clients/${clientId}`;\n return this.delete({ uri, auth, headers, context });\n }\n\n /**\n * List products the account has access to\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listProducts({ auth, headers, context }){\n return this.get({ uri: '/v1/products', auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProduct({ product, auth, headers, context }){\n return this.get({ uri: `/v1/products/${product}`, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listProductFirmware({ product, auth, headers, context }){\n return this.get({ uri: `/v1/products/${product}/firmware`, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 uploadProductFirmware({ file, version, title, description, product, auth, headers, context }){\n return this.request({\n uri: `/v1/products/${product}/firmware`,\n method: 'post',\n auth,\n headers,\n form: {\n version,\n title,\n description\n },\n files: {\n 'firmware.bin': file\n },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductFirmware({ version, product, auth, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/firmware/${version}`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 updateProductFirmware({ version, title, description, product, auth, headers, context }){\n const uri = `/v1/products/${product}/firmware/${version}`;\n return this.put({ uri, auth, headers, data: { title, description }, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 that resolves with either the requested data or an error object\n */\n downloadProductFirmware({ version, product, auth, headers, context }){\n return this.request({\n uri: `/v1/products/${product}/firmware/${version}/binary`,\n method: 'get',\n auth,\n headers,\n context,\n isBuffer: true\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 releaseProductFirmware({ version, product, auth, headers, context }){\n const uri = `/v1/products/${product}/firmware/release`;\n return this.put({ uri, auth, headers, data: { version }, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listTeamMembers({ product, auth, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/team`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 inviteTeamMember({ username, product, auth, headers, context }){\n return this.post({\n uri: `/v1/products/${product}/team`,\n auth,\n headers,\n data: { username },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeTeamMember({ username, product, auth, headers, context }){\n return this.delete({\n uri: `/v1/products/${product}/team/${username}`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 lookupSerialNumber({ serialNumber, auth, headers, context }){\n return this.get({\n uri: `/v1/serial_numbers/${serialNumber}`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 createMeshNetwork({ name, deviceId, iccid, auth, headers, context }){\n return this.post({\n uri: '/v1/networks',\n auth,\n headers,\n data: { name, device_id: deviceId, iccid },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeMeshNetwork({ networkId, auth, headers, context }){\n return this.delete({ uri: `/v1/networks/${networkId}`, auth, headers, context });\n }\n\n /**\n * List all mesh networks\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listMeshNetworks({ page, perPage, auth, headers, context }){\n const query = page ? { page, per_page: perPage } : undefined;\n return this.get({ uri: '/v1/networks', auth, headers, query, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getMeshNetwork({ networkId, auth, headers, context }){\n return this.get({ uri: `/v1/networks/${networkId}`, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 updateMeshNetwork({ networkId, action, deviceId, auth, headers, context }){\n return this.put({\n uri: `/v1/networks/${networkId}`,\n auth,\n headers,\n data: { action, device_id: deviceId },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 addMeshNetworkDevice({ networkId, deviceId, auth, headers, context }){\n return this.updateMeshNetwork({\n action: 'add-device',\n networkId,\n deviceId,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeMeshNetworkDevice({ networkId, deviceId, auth, headers, context }){\n if (!networkId){\n return this.delete({\n uri: `/v1/devices/${deviceId}/network`,\n auth,\n headers, context\n });\n }\n return this.updateMeshNetwork({\n action: 'remove-device',\n networkId,\n deviceId,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listMeshNetworkDevices({ networkId, role, page, perPage, auth, headers, context }){\n const query = (role || page) ? { role, page, per_page: perPage } : undefined;\n return this.get({\n uri: `/v1/networks/${networkId}/devices`,\n auth,\n headers,\n query,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductConfiguration({ auth, product, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/config`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductConfigurationSchema({ auth, product, headers = {}, context }){\n headers.accept = 'application/schema+json';\n return this.get({\n uri: `/v1/products/${product}/config`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductDeviceConfiguration({ auth, product, deviceId, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/config/${deviceId}`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductDeviceConfigurationSchema({ auth, product, deviceId, headers, context }){\n headers.accept = 'application/schema+json';\n return this.get({\n uri: `/v1/products/${product}/config/${deviceId}`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {Object} options.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 setProductConfiguration({ auth, product, config, headers, context }){\n return this.put({\n uri: `/v1/products/${product}/config`,\n auth,\n data: config,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {Object} options.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 setProductDeviceConfiguration({ auth, product, deviceId, config, headers, context }){\n return this.put({\n uri: `/v1/products/${product}/config/${deviceId}`,\n data: config,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductLocations({ auth, product, dateRange, rectBl, rectTr, deviceId, deviceName, groups, page, perPage, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/locations`,\n query: {\n date_range: dateRange,\n rect_bl: rectBl,\n rect_tr: rectTr,\n device_id: deviceId,\n device_name: deviceName,\n groups,\n page,\n per_page: perPage\n },\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductDeviceLocations({ auth, product, dateRange, rectBl, rectTr, deviceId, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/locations/${deviceId}`,\n query: {\n date_range: dateRange,\n rect_bl: rectBl,\n rect_tr: rectTr\n },\n auth,\n headers,\n context\n });\n }\n\n /**\n * Executes the provided logic function once and returns the result. No logs, runs, etc are saved\n *\n * NOTE: Any external interactions such as Particle.publish will actually occur when the logic is executed.\n *\n * @param {Object} options The options for creating the logic function.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {Object} options.logic The logic \"function\" which will be executed once\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} A promise that resolves to the created logic function data.\n */\n executeLogic({ auth, org, logic, headers, context }) {\n return this.post({\n uri: this._namespacedPath(org, 'logic/execute'),\n auth,\n data: logic,\n headers,\n context\n });\n }\n\n /**\n * Creates a new logic function in the specified organization or sandbox using the provided function data.\n *\n * When you create a logic function with Event logic triggers, events will immediately\n * start being handled by the function code.\n *\n * When you create a Scheduled logic trigger, 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 function.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.logicFunction The logic function object containing the function 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} A promise that resolves to the created logic function data.\n */\n createLogicFunction({ auth, org, logicFunction, headers, context }) {\n return this.post({\n uri: this._namespacedPath(org, 'logic/functions'),\n auth,\n data: { logic_function: logicFunction },\n headers,\n context\n });\n }\n\n /**\n * Get a logic function in the specified organization or sandbox by logic function ID.\n *\n * @param {Object} options The options for the logic function.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.logicFunctionId The ID of the logic function 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} A promise that resolves to the specified logic function data.\n */\n getLogicFunction({ auth, org, logicFunctionId, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Updates an existing logic function in the specified organization or sandbox using the provided function data.\n *\n * If you include an id on a logic trigger, it will update the logic trigger in place.\n *\n * @param {Object} options The options for updating the logic function.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.logicFunctionId The ID of the logic function to update.\n * @param {string} options.logicFunction The logic function object containing the logic function 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} A promise that resolves to the updated logic function data.\n */\n updateLogicFunction({ auth, org, logicFunctionId, logicFunction, headers, context }) {\n return this.put({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}`),\n auth,\n data: { logic_function: logicFunction },\n headers,\n context\n });\n }\n\n /**\n * Deletes a logic function in the specified organization or sandbox by logic function ID.\n *\n * @param {Object} options The options for deleting the logic function.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.logicFunctionId The ID of the logic function 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} A promise that resolves to an object containing the deleted logic function ID.\n */\n deleteLogicFunction({ auth, org, logicFunctionId, headers, context }) {\n return this.delete({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Lists all logic functions in the specified organization or sandbox.\n *\n * @param {Object} options The options for listing logic functions.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {boolean} [options.todayStats] Whether to include today's stats in the response\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} A promise that resolves to an array of logic functions data.\n */\n listLogicFunctions({ auth, org, todayStats, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, 'logic/functions'),\n query: {\n today_stats: todayStats\n },\n auth,\n headers,\n context\n });\n }\n\n /**\n * Lists all logic runs for the specified logic function in the specified organization or sandbox.\n *\n * @param {Object} options The options for the request.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {number} options.logicFunctionId The ID of the logic function for which to retrieve the logic 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} A promise that resolves to an array of logic run data.\n */\n listLogicRuns({ auth, org, logicFunctionId, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}/runs`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Retrieves a logic run by its ID for the specified logic function in the specified organization or sandbox.\n *\n * @param {Object} options The options for the request.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {number} options.logicFunctionId The ID of the logic function for which to retrieve the logic run.\n * @param {number} options.logicRunId The ID of the logic 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} A promise that resolves to an array of logic run data for the specified logic run ID.\n */\n getLogicRun({ auth, org, logicFunctionId, logicRunId, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}/runs/${logicRunId}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Retrieves the logs for a logic run by its ID for the specified logic function in the specified organization or sandbox.\n *\n * @param {Object} options The options for the request.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The unique identifier of the organization.\n * @param {number} options.logicFunctionId The ID of the logic function for which to retrieve the logic run logs.\n * @param {number} options.logicRunId The ID of the logic 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} A promise that resolves to the logs for the specified logic run ID.\n */\n getLogicRunLogs({ auth, org, logicFunctionId, logicRunId, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}/runs/${logicRunId}/logs`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Creates a new ledger definition in the specified organization or sandbox.\n *\n * @param {Object} options The options for creating the ledger definition.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {object} options.ledger The ledger definition object.\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} A promise that resolves to the created ledger definition data.\n */\n createLedger({ auth, org, ledger, headers, context }) {\n return this.post({\n uri: this._namespacedPath(org, 'ledgers'),\n auth,\n data: { ledger },\n headers,\n context\n });\n }\n\n /**\n * Get a ledger definition in the specified organization or sandbox by ledger name.\n *\n * @param {Object} options The options for the ledger definition.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName The ID of the ledger definition 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} A promise that resolves to the specified ledger definition data.\n */\n getLedger({ auth, org, ledgerName, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Updates an existing ledger definition in the specified organization or sandbox.\n *\n * @param {Object} options The options for updating the ledger definition.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Name of the ledger definition to update.\n * @param {object} options.ledger The ledger definition object.\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} A promise that resolves to the updated ledger definition data.\n */\n updateLedger({ auth, org, ledgerName, ledger, headers, context }) {\n return this.put({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}`),\n auth,\n data: { ledger },\n headers,\n context\n });\n }\n\n /**\n * Archives a ledger definition in the specified organization or sandbox by ledger name.\n *\n * @param {Object} options The options for archiving the ledger definition.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Name of the ledger definition to archive.\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} A promise that resolves to an object confirming the ledger definition was archived.\n */\n archiveLedger({ auth, org, ledgerName, headers, context }) {\n return this.delete({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * @typedef {\"Owner\" | \"Product\" | \"Device\"} Scope\n */\n\n /**\n * Lists all ledger definitions in the specified organization or sandbox.\n *\n * @param {Object} options The options for listing ledger definitions.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {Scope} [options.scope] Filter to show only ledgers of the specified scope\n * @param {boolean} [options.archived] Filter to show only archived ledger or non-archived ledgers. If not provided, all ledgers are returned.\n * @param {number} [options.page] Page of results to display\n * @param {number} [options.perPage] Number of results per page. Default is 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 *\n * @returns {Promise} A promise that resolves to an array of ledger definition data.\n */\n listLedgers({ auth, org, scope, page, perPage, archived, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, 'ledgers'),\n query: {\n scope,\n page,\n per_page: perPage,\n archived\n },\n auth,\n headers,\n context\n });\n }\n\n /**\n * Get ledger instance data.\n *\n * @param {Object} options The options for the ledger instance.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Ledger name.\n * @param {string} options.scopeValue Scope value.\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} A promise that resolves to the specified ledger instance data.\n */\n getLedgerInstance({ auth, org, ledgerName, scopeValue, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances/${scopeValue}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Set ledger instance data.\n *\n * @param {Object} options The options for updating the ledger instance.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Ledger name.\n * @param {string} options.scopeValue Scope value.\n * @param {object} options.data The data to set to the instance\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} A promise that resolves to the updated ledger instance data.\n */\n setLedgerInstance({ auth, org, ledgerName, scopeValue, data, headers, context }) {\n return this.put({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances/${scopeValue}`),\n auth,\n data: { data },\n headers,\n context\n });\n }\n\n /**\n * Delete a ledger instance in the specified organization or sandbox by ledger name.\n *\n * @param {Object} options The options for archiving the ledger instance.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Name of the ledger instance to archive.\n * @param {string} options.scopeValue Scope value.\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} A promise that resolves to an object confirming the ledger instance was deleted.\n */\n deleteLedgerInstance({ auth, org, ledgerName, scopeValue, headers, context }) {\n return this.delete({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances/${scopeValue}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Lists ledger instances in the specified organization or sandbox.\n *\n * @param {Object} options The options for listing ledger instances.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The unique identifier of the organization.\n * @param {string} options.ledgerName Name of the ledger instance to archive.\n * @param {number} [options.page] Page of results to display\n * @param {number} [options.perPage] Number of results per page. Default is 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 *\n * @returns {Promise} A promise that resolves to an array of ledger instance data.\n */\n listLedgerInstances({ auth, org, ledgerName, page, perPage, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances`),\n query: {\n page,\n per_page: perPage\n },\n auth,\n headers,\n context\n });\n }\n\n /**\n * Set default auth token that will be used in each method if `auth` is not provided\n * @param {Auth} auth The access token or basic auth object\n * @throws {Error} When not auth string is provided\n */\n setDefaultAuth(auth){\n if (typeof auth === 'string' && auth.length !== 0) {\n this._defaultAuth = auth;\n } else if (typeof auth === 'object' && 'username' in auth && 'password' in auth) {\n this._defaultAuth = auth;\n } else {\n throw new Error('Must pass a non-empty string or object with username and password for basic auth!');\n }\n }\n /**\n * Return provided token if truthy else use default auth if truthy else undefined\n * @param {any} auth Optional auth token or undefined\n * @private\n * @returns {String|undefined} a Particle auth token or undefined\n */\n _getActiveAuthToken(auth) {\n return auth || this._defaultAuth;\n }\n /**\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 deviceUri({ deviceId, product }){\n return product ? `/v1/products/${product}/devices/${deviceId}` : `/v1/devices/${deviceId}`;\n }\n\n /**\n * Helper for building API paths that support sandbox and org prefixes based on org presence\n * @param {string | undefined} org slug or ID\n * @param {string} path will be appended to the end of the org/sandbox prefix\n * @returns {string} the full combined path\n * @private\n */\n _namespacedPath(org, path) {\n return org ? `/v1/orgs/${org}/${path}` : `/v1/${path}`;\n }\n\n /**\n * Make a GET request\n * @param {object} params\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.query] Key/Value pairs of query params or a correctly formatted string\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n get({ uri, auth, headers, query, context }){\n context = this._buildContext(context);\n auth = this._getActiveAuthToken(auth);\n return this.agent.get({ uri, auth, headers, query, context });\n }\n\n /**\n * Make a HEAD request\n * @param {object} params\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.query] Key/Value pairs of query params or a correctly formatted string\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n head({ uri, auth, headers, query, context }){\n context = this._buildContext(context);\n auth = this._getActiveAuthToken(auth);\n return this.agent.head({ uri, auth, headers, query, context });\n }\n\n /**\n * Make a POST request\n * @param {object} params\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {string | object} [params.data] Key/Value pairs of query params or a correctly formatted string\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n post({ uri, auth, headers, data, context }){\n context = this._buildContext(context);\n auth = this._getActiveAuthToken(auth);\n return this.agent.post({ uri, auth, headers, data, context });\n }\n\n /**\n * Make a PUT request\n * @param {object} params\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {string | object} [params.data] Key/Value pairs of query params or a correctly formatted string\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n put({ uri, auth, headers, data, context }){\n context = this._buildContext(context);\n auth = this._getActiveAuthToken(auth);\n return this.agent.put({ uri, auth, headers, data, context });\n }\n\n /**\n * Make a DELETE request\n * @param {object} params\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {string | object} [params.data] Key/Value pairs of query params or a correctly formatted string\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n delete({ uri, auth, headers, data, context }){\n context = this._buildContext(context);\n auth = this._getActiveAuthToken(auth);\n return this.agent.delete({ uri, auth, headers, data, context });\n }\n\n /**\n *\n * @param {Object} args An obj with all the possible request configurations\n * @param {String} args.uri The URI to request\n * @param {String} args.method The method used to request the URI, should be in uppercase.\n * @param {Object} [args.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [args.data] Arbitrary data to send as the body.\n * @param {Auth} [args.auth] Authorization\n * @param {Object} [args.query] Query parameters\n * @param {Object} [args.form] Form fields\n * @param {Object} [args.files] Array of file names and file content\n * @param {Object} [args.context] The invocation context, describing the tool and project.\n * @param {boolean} [args.isBuffer] Indicate if the response should be treated as Buffer instead of JSON\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n request(args){\n args.context = this._buildContext(args.context);\n args.auth = this._getActiveAuthToken(args.auth);\n return this.agent.request(args);\n }\n\n client(options = {}){\n // @ts-ignore\n return new Client(Object.assign({ api: this }, options));\n }\n\n // Internal method used to target Particle's APIs other than the default\n setBaseUrl(baseUrl){\n this.baseUrl = baseUrl;\n this.agent.setBaseUrl(baseUrl);\n }\n}\n\n// Aliases for backwards compatibility\nParticle.prototype.removeAccessToken = Particle.prototype.deleteAccessToken;\n\nmodule.exports = Particle;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(7845);\n"],"names":["exports","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","i","arr","Arr","_byteLength","curByte","len","revLookup","charCodeAt","fromByteArray","uint8","length","extraBytes","parts","maxChunkLength","len2","push","encodeChunk","lookup","join","Uint8Array","Array","code","Error","indexOf","start","end","num","output","base64","ieee754","customInspectSymbol","Symbol","Buffer","SlowBuffer","alloc","INSPECT_MAX_BYTES","K_MAX_LENGTH","createBuffer","RangeError","buf","Object","setPrototypeOf","prototype","arg","encodingOrOffset","TypeError","allocUnsafe","from","value","string","encoding","isEncoding","actual","write","slice","fromString","ArrayBuffer","isView","arrayView","isInstance","copy","fromArrayBuffer","buffer","byteOffset","fromArrayLike","fromArrayView","SharedArrayBuffer","valueOf","b","obj","isBuffer","checked","undefined","numberIsNaN","type","isArray","data","fromObject","toPrimitive","assertSize","size","array","toString","mustMatch","arguments","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","this","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","n","m","bidirectionalIndexOf","val","dir","arrayIndexOf","call","lastIndexOf","indexSize","arrLength","valLength","String","read","readUInt16BE","foundIndex","found","j","hexWrite","offset","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","str","byteArray","asciiToBytes","base64Write","ucs2Write","units","c","hi","lo","utf16leToBytes","Math","min","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","apply","decodeCodePointsArray","kMaxLength","TYPED_ARRAY_SUPPORT","proto","foo","e","typedArraySupport","console","error","defineProperty","enumerable","get","poolSize","fill","allocUnsafeSlow","_isBuffer","compare","a","x","y","concat","list","pos","set","swap16","swap32","swap64","toLocaleString","equals","inspect","max","replace","trim","target","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","_arr","ret","out","hexSliceLookupTable","bytes","checkOffset","ext","checkInt","wrtBigUInt64LE","checkIntBI","BigInt","wrtBigUInt64BE","checkIEEE754","writeFloat","littleEndian","noAssert","writeDouble","newBuf","subarray","readUintLE","readUIntLE","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","defineBigIntMethod","validateNumber","first","last","boundsError","readBigUInt64BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUintLE","writeUIntLE","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeUInt32BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeBigInt64LE","writeBigInt64BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","errors","E","sym","getMessage","Base","constructor","super","writable","configurable","name","stack","message","addNumericalSeparator","range","ERR_OUT_OF_RANGE","checkBounds","ERR_INVALID_ARG_TYPE","floor","ERR_BUFFER_OUT_OF_BOUNDS","input","msg","received","isInteger","abs","INVALID_BASE64_RE","Infinity","leadSurrogate","split","base64clean","src","dst","alphabet","table","i16","fn","BufferBigIntNotDefined","module","GetIntrinsic","callBind","$indexOf","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","$gOPD","$defineProperty","$max","originalFunction","func","applyBind","ReflectOwnKeys","R","Reflect","ReflectApply","receiver","args","Function","ownKeys","getOwnPropertySymbols","getOwnPropertyNames","NumberIsNaN","isNaN","EventEmitter","init","once","emitter","Promise","resolve","reject","errorListener","err","removeListener","resolver","eventTargetAgnosticAddListener","handler","flags","on","addErrorHandlerIfEventEmitter","_events","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","listener","_getMaxListeners","that","_addListener","prepend","events","existing","warning","create","newListener","emit","unshift","warned","w","count","warn","onceWrapper","fired","wrapFn","_onceWrap","state","wrapped","_listeners","unwrap","evlistener","unwrapListeners","arrayClone","listenerCount","addEventListener","wrapListener","removeEventListener","getPrototypeOf","setMaxListeners","getMaxListeners","doError","er","context","listeners","addListener","prependListener","prependOnceListener","position","originalListener","shift","index","pop","spliceOne","off","removeAllListeners","key","keys","rawListeners","eventNames","self","FormData","window","toStr","bound","boundLength","boundArgs","result","Empty","implementation","$SyntaxError","SyntaxError","$Function","$TypeError","getEvalledConstructor","expressionSyntax","getOwnPropertyDescriptor","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasSymbols","hasProto","getProto","__proto__","needsEval","TypedArray","INTRINSICS","AggregateError","iterator","Atomics","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","JSON","Map","parseFloat","Proxy","ReferenceError","RegExp","Set","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","desc","test","$Object","origSymbol","hasSymbolSham","symObj","syms","propertyIsEnumerable","descriptor","hasOwnProperty","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","s","NaN","rt","log","LN2","globalObject","g","getGlobal","fetch","Headers","Request","Response","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","run","marker","runClearTimeout","Item","noop","nextTick","title","browser","env","argv","version","versions","binding","cwd","chdir","umask","root","nodeType","freeGlobal","global","punycode","maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexPunycode","regexNonASCII","regexSeparators","baseMinusTMin","stringFromCharCode","map","mapDomain","ucs2decode","extra","counter","ucs2encode","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","decode","basic","oldi","t","baseMinusT","inputLength","bias","encode","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","percentTwenties","Format","formatters","RFC1738","RFC3986","stringify","parse","formats","utils","has","defaults","allowDots","allowPrototypes","allowSparse","arrayLimit","charset","charsetSentinel","comma","decoder","depth","ignoreQueryPrefix","interpretNumericEntities","parameterLimit","parseArrays","plainObjects","strictNullHandling","$0","numberStr","parseArrayValue","options","parseKeys","givenKey","valuesParsed","child","segment","parent","chain","leaf","cleanRoot","charAt","parseObject","opts","isRegExp","normalizeParseOptions","tempObj","cleanStr","skipIndex","bracketEqualsPos","maybeMap","encodedVal","combine","parseValues","newObj","merge","compact","getSideChannel","arrayPrefixGenerators","brackets","prefix","indices","repeat","pushToArray","valueOrArray","toISO","toISOString","defaultFormat","addQueryPrefix","encoder","encodeValuesOnly","format","formatter","serializeDate","date","skipNulls","sentinel","object","generateArrayPrefix","commaRoundTrip","filter","sort","sideChannel","v","tmpSc","step","findFlag","objKeys","values","adjustedPrefix","keyPrefix","valueSideChannel","normalizeStringifyOptions","arrayFormat","joined","hexTable","toUpperCase","arrayToObject","source","assign","reduce","acc","o","prop","refs","item","compacted","compactQueue","strWithoutPlus","unescape","defaultEncoder","kind","escape","mapped","mergeTarget","forEach","targetItem","callBound","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","curr","prev","next","$wm","$m","$o","channel","assert","objects","node","listGet","listHas","listSet","hasMap","mapSizeDescriptor","mapSize","mapForEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","$toLowerCase","$test","$join","$arrSlice","$floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","toStringTag","isEnumerable","gPO","O","addNumericSeparator","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","isSymbol","wrapQuotes","defaultStyle","quoteChar","quoteStyle","inspect_","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","getIndent","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","isElement","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","isDate","ys","isPlainObject","protoTag","stringTag","tag","l","trailer","lowbyte","entries","lineJoiner","isArr","symMap","ClientRequest","response","extend","statusCodes","url","http","request","cb","defaultProtocol","location","protocol","search","host","hostname","port","path","method","headers","req","IncomingMessage","Agent","defaultMaxSockets","globalAgent","STATUS_CODES","METHODS","xhr","getXHR","XMLHttpRequest","open","XDomainRequest","checkTypeSupport","responseType","isFunction","ReadableStream","writableStream","WritableStream","abortController","AbortController","arraybuffer","msstream","mozchunkedarraybuffer","overrideMimeType","capability","inherits","stream","rStates","readyStates","preferBinary","Writable","_opts","_body","_headers","auth","setHeader","useFetch","mode","_mode","decideMode","_fetchTimer","_socketTimeout","_socketTimer","_onFinish","lowerName","unsafeHeaders","getHeader","header","removeHeader","_destroyed","headersObj","body","Blob","headersList","keyName","signal","controller","_fetchAbortController","requestTimeout","abort","credentials","withCredentials","then","_fetchResponse","_resetTimers","_connect","reason","_xhr","ontimeout","setRequestHeader","_response","onreadystatechange","readyState","LOADING","DONE","_onXHRProgress","onprogress","onerror","send","status","statusValid","_write","chunk","done","destroy","flushHeaders","setNoDelay","setSocketKeepAlive","UNSENT","OPENED","HEADERS_RECEIVED","resetTimers","Readable","rawHeaders","trailers","rawTrailers","statusCode","statusMessage","statusText","_resumeFetch","close","pipeTo","catch","reader","getReader","_pos","responseURL","getAllResponseHeaders","matches","_charset","mimeType","charsetMatch","_read","responseText","newData","MSStreamReader","onload","readAsArrayBuffer","ctor","superCtor","super_","TempCtor","codes","createErrorType","NodeError","_Base","subClass","superClass","arg1","arg2","arg3","oneOf","expected","thing","determiner","this_len","substring","endsWith","objectKeys","Duplex","allowHalfOpen","readable","onend","_writableState","ended","onEndNT","highWaterMark","getBuffer","_readableState","destroyed","PassThrough","Transform","_transform","ReadableState","EElistenerCount","Stream","OurUint8Array","debug","debugUtil","debuglog","StringDecoder","createReadableStreamAsyncIterator","BufferList","destroyImpl","getHighWaterMark","_require$codes","ERR_STREAM_PUSH_AFTER_EOF","ERR_METHOD_NOT_IMPLEMENTED","ERR_STREAM_UNSHIFT_AFTER_END_EVENT","errorOrDestroy","kProxyEvents","isDuplex","objectMode","readableObjectMode","pipes","pipesCount","flowing","endEmitted","reading","sync","needReadable","emittedReadable","readableListening","resumeScheduled","paused","emitClose","autoDestroy","defaultEncoding","awaitDrain","readingMore","_destroy","readableAddChunk","addToFront","skipChunkCheck","emitReadable","emitReadable_","onEofChunk","chunkInvalid","_uint8ArrayToBuffer","addChunk","maybeReadMore","_undestroy","undestroy","isPaused","setEncoding","enc","p","head","content","clear","MAX_HWM","howMuchToRead","computeNewHighWaterMark","flow","maybeReadMore_","updateReadableListening","resume","nReadingNextTick","resume_","fromList","consume","endReadable","endReadableNT","wState","finished","nOrig","doRead","pipe","dest","pipeOpts","endFn","stdout","stderr","unpipe","onunpipe","unpipeInfo","hasUnpiped","onclose","onfinish","ondrain","ondata","cleanedUp","needDrain","pipeOnDrain","pause","event","dests","ev","wrap","_this","asyncIterator","_fromList","iterable","ERR_MULTIPLE_CALLBACK","ERR_TRANSFORM_ALREADY_TRANSFORMING","ERR_TRANSFORM_WITH_LENGTH_0","afterTransform","ts","_transformState","transforming","writecb","writechunk","rs","needTransform","writeencoding","transform","flush","_flush","prefinish","err2","CorkedRequest","entry","finish","corkReq","callback","pendingcb","corkedRequestsFree","onCorkedFinish","WritableState","internalUtil","deprecate","realHasInstance","ERR_STREAM_CANNOT_PIPE","ERR_STREAM_DESTROYED","ERR_STREAM_NULL_VALUES","ERR_STREAM_WRITE_AFTER_END","ERR_UNKNOWN_ENCODING","nop","writableObjectMode","finalCalled","ending","noDecode","decodeStrings","writing","corked","bufferProcessing","onwrite","writelen","onwriteStateUpdate","finishMaybe","errorEmitted","onwriteError","needFinish","bufferedRequest","clearBuffer","afterWrite","lastBufferedRequest","prefinished","bufferedRequestCount","writev","_writev","final","_final","doWrite","onwriteDrain","holder","allBuffers","isBuf","callFinal","need","rState","current","_","hasInstance","writeAfterEnd","validChunk","newChunk","decodeChunk","writeOrBuffer","cork","uncork","setDefaultEncoding","endWritable","_Object$setPrototypeO","_defineProperty","kLastResolve","kLastReject","kError","kEnded","kLastPromise","kHandlePromise","kStream","createIterResult","readAndResolve","iter","onReadable","AsyncIteratorPrototype","ReadableStreamAsyncIteratorPrototype","promise","lastPromise","wrapForNext","_this2","_Object$create","enumerableOnly","symbols","_defineProperties","props","instance","Constructor","_classCallCheck","tail","protoProps","staticProps","hasStrings","_getString","_getBuffer","nb","getOwnPropertyDescriptors","defineProperties","_objectSpread","emitErrorAndCloseNT","emitErrorNT","emitCloseNT","readableDestroyed","writableDestroyed","ERR_STREAM_PREMATURE_CLOSE","eos","called","_len","_key","onlegacyfinish","writableEnded","readableEnded","onrequest","isRequest","ERR_MISSING_ARGS","to","streams","popCallback","destroys","closed","destroyer","ERR_INVALID_OPT_VALUE","duplexKey","hwm","highWaterMarkFrom","pipeline","copyProps","SafeBuffer","nenc","retried","_normalizeEncoding","normalizeEncoding","text","utf16Text","utf16End","fillLast","utf8FillLast","base64Text","base64End","simpleWrite","simpleEnd","lastNeed","lastTotal","lastChar","utf8CheckByte","byte","r","utf8CheckExtraBytes","total","utf8CheckIncomplete","Url","slashes","hash","query","pathname","href","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","hostlessProtocol","slashedProtocol","https","ftp","gopher","file","querystring","urlParse","parseQueryString","slashesDenoteHost","u","queryIndex","splitter","uSplit","rest","simplePath","lowerProto","atSign","hostEnd","hec","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","toASCII","h","ae","esc","qm","relative","resolveObject","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","authInHost","hasTrailingSlash","up","isAbsolute","config","localStorage","trace","qs","fs","packageJson","baseUrl","setBaseUrl","uri","post","put","form","files","requestFiles","_sanitizeFiles","requestParams","_buildRequest","_promiseResponse","makerequest","resp","ok","blob","json","objError","arrayBuffer","isForBrowser","shortErrorDescription","errorDescription","error_description","actualUri","queryParams","hasParams","userAgentHeader","repository","contentTypeHeader","_getFromData","_getAuthorizationHeader","_getContextHeaders","formData","fileData","nodeFormData","_getNodeFormData","append","createReadStream","filepath","_getToolContext","tool","_getProjectContext","project","_toolIdent","components","component","_nameAtVersion","_buildSemicolonSeparatedProperties","primaryProperty","Authorization","encoded","btoa","username","password","Library","Particle","api","ready","libraries","listLibraries","payload","library","getLibrary","libraryVersions","getLibraryVersions","contributeLibrary","archive","_throwError","publishLibrary","deleteLibrary","force","errorMessages","downloadFile","compileCode","platformId","targetVersion","signalDevice","deviceId","listDevices","listBuildTargets","onlyFeatured","targets","platform","platforms","prerelease","prereleases","firmware_vendor","trackingIdentity","full","clientSecret","clientId","tokenDuration","token","reconnectInterval","idleTimeoutExpired","connect","origin","isSecure","connected","connectionTimeout","startIdleTimeout","emitSafe","param","stopIdleTimeout","reconnect","isOffline","navigator","onLine","idleTimeout","discardTrailingNewline","lineLength","fieldLength","parseEventStreamLine","eventName","field","valueLength","client","_assignAttributes","downloadUrl","links","download","Defaults","EventStream","Client","setDefaultAuth","agent","_isValidContext","setContext","_buildContext","login","grant_type","client_id","client_secret","expires_in","sendOtp","mfaToken","otp","mfa_token","enableMfa","confirmMfa","invalidateTokens","invalidate_tokens","disableMfa","currentPassword","current_password","createCustomer","email","product","loginAsClientOwner","createUser","accountInfo","account_info","verifyUser","resetPassword","deleteAccessToken","delete","access_token","deleteCurrentAccessToken","deleteActiveAccessTokens","deleteUser","listAccessTokens","tracking","deviceName","groups","sortAttr","sortDir","page","perPage","per_page","getDevice","deviceUri","claimDevice","requestTransfer","id","request_transfer","addDeviceToProduct","removeDevice","deny","removeDeviceOwner","renameDevice","updateDevice","setDeviceNotes","notes","markAsDevelopmentDevice","development","lockDeviceProductFirmware","desiredFirmwareVersion","flash","unlockDeviceProductFirmware","signalValue","desired_firmware_version","provisionDevice","productId","product_id","getClaimCode","iccid","validatePromoCode","promoCode","changeProduct","getVariable","flashDevice","build_target_version","latest","flashTinker","app","platform_id","downloadFirmwareBinary","binaryId","sendPublicKey","algorithm","deviceID","publicKey","filename","order","now","callFunction","argument","getEventStream","org","_getActiveAuthToken","publishEvent","isPrivate","postData","private","createWebhook","device","rejectUnauthorized","noDefaults","hook","requestType","responseTemplate","responseTopic","responseEvent","errorResponseTopic","errorResponseEvent","deleteWebhook","hookId","listWebhooks","createIntegration","settings","deviceid","editIntegration","integrationId","deleteIntegration","listIntegrations","getUserInfo","setUserInfo","changeUsername","changeUserPassword","listSIMs","getSIMDataUsage","getFleetDataUsage","checkSIM","activateSIM","iccids","country","sims","action","deactivateSIM","reactivateSIM","mbLimit","mb_limit","updateSIM","removeSIM","featured","architectures","category","scope","excludeScopes","_asList","visibility","listOAuthClients","createOAuthClient","redirect_uri","updateOAuthClient","deleteOAuthClient","listProducts","getProduct","listProductFirmware","uploadProductFirmware","description","getProductFirmware","updateProductFirmware","downloadProductFirmware","releaseProductFirmware","listTeamMembers","inviteTeamMember","removeTeamMember","lookupSerialNumber","serialNumber","createMeshNetwork","device_id","removeMeshNetwork","networkId","listMeshNetworks","getMeshNetwork","updateMeshNetwork","addMeshNetworkDevice","removeMeshNetworkDevice","listMeshNetworkDevices","role","getProductConfiguration","getProductConfigurationSchema","accept","getProductDeviceConfiguration","getProductDeviceConfigurationSchema","setProductConfiguration","setProductDeviceConfiguration","getProductLocations","dateRange","rectBl","rectTr","date_range","rect_bl","rect_tr","device_name","getProductDeviceLocations","executeLogic","logic","_namespacedPath","createLogicFunction","logicFunction","logic_function","getLogicFunction","logicFunctionId","updateLogicFunction","deleteLogicFunction","listLogicFunctions","todayStats","today_stats","listLogicRuns","getLogicRun","logicRunId","getLogicRunLogs","createLedger","ledger","getLedger","ledgerName","updateLedger","archiveLedger","listLedgers","archived","getLedgerInstance","scopeValue","setLedgerInstance","deleteLedgerInstance","listLedgerInstances","_defaultAuth","removeAccessToken","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","globalThis","nmd","paths","children","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"particle.min.js","mappings":"oDAEAA,EAAQC,WAuCR,SAAqBC,GACnB,IAAIC,EAAOC,EAAQF,GACfG,EAAWF,EAAK,GAChBG,EAAkBH,EAAK,GAC3B,OAAuC,GAA9BE,EAAWC,GAAuB,EAAKA,CAClD,EA3CAN,EAAQO,YAiDR,SAAsBL,GACpB,IAAIM,EAcAC,EAbAN,EAAOC,EAAQF,GACfG,EAAWF,EAAK,GAChBG,EAAkBH,EAAK,GAEvBO,EAAM,IAAIC,EAVhB,SAAsBT,EAAKG,EAAUC,GACnC,OAAuC,GAA9BD,EAAWC,GAAuB,EAAKA,CAClD,CAQoBM,CAAYV,EAAKG,EAAUC,IAEzCO,EAAU,EAGVC,EAAMR,EAAkB,EACxBD,EAAW,EACXA,EAGJ,IAAKI,EAAI,EAAGA,EAAIK,EAAKL,GAAK,EACxBD,EACGO,EAAUb,EAAIc,WAAWP,KAAO,GAChCM,EAAUb,EAAIc,WAAWP,EAAI,KAAO,GACpCM,EAAUb,EAAIc,WAAWP,EAAI,KAAO,EACrCM,EAAUb,EAAIc,WAAWP,EAAI,IAC/BC,EAAIG,KAAcL,GAAO,GAAM,IAC/BE,EAAIG,KAAcL,GAAO,EAAK,IAC9BE,EAAIG,KAAmB,IAANL,EAGK,IAApBF,IACFE,EACGO,EAAUb,EAAIc,WAAWP,KAAO,EAChCM,EAAUb,EAAIc,WAAWP,EAAI,KAAO,EACvCC,EAAIG,KAAmB,IAANL,GAGK,IAApBF,IACFE,EACGO,EAAUb,EAAIc,WAAWP,KAAO,GAChCM,EAAUb,EAAIc,WAAWP,EAAI,KAAO,EACpCM,EAAUb,EAAIc,WAAWP,EAAI,KAAO,EACvCC,EAAIG,KAAcL,GAAO,EAAK,IAC9BE,EAAIG,KAAmB,IAANL,GAGnB,OAAOE,CACT,EA5FAV,EAAQiB,cAkHR,SAAwBC,GAQtB,IAPA,IAAIV,EACAM,EAAMI,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,EACH,OAAOA,EAAatsD,QAGrB,IAAImU,EAASg4C,EAAyBE,GAAY,CACjDxL,GAAIwL,EACJE,QAAQ,EACRvsD,QAAS,CAAC,GAUX,OANAwsD,EAAoBH,GAAUplD,KAAKkN,EAAOnU,QAASmU,EAAQA,EAAOnU,QAASosD,GAG3Ej4C,EAAOo4C,QAAS,EAGTp4C,EAAOnU,OACf,CCzBAosD,EAAoB1qC,EAAI,WACvB,GAA0B,iBAAf+qC,WAAyB,OAAOA,WAC3C,IACC,OAAOtmD,MAAQ,IAAIsP,SAAS,cAAb,EAChB,CAAE,MAAOrL,GACR,GAAsB,iBAAXuQ,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCAxByxC,EAAoBM,IAAOv4C,IAC1BA,EAAOw4C,MAAQ,GACVx4C,EAAOy4C,WAAUz4C,EAAOy4C,SAAW,IACjCz4C,GCAR,IAAI04C,EAAsBT,EAAoB,M","sources":["webpack://Particle/./node_modules/base64-js/index.js","webpack://Particle/./node_modules/buffer/index.js","webpack://Particle/./node_modules/builtin-status-codes/browser.js","webpack://Particle/./node_modules/call-bind/callBound.js","webpack://Particle/./node_modules/call-bind/index.js","webpack://Particle/./node_modules/events/events.js","webpack://Particle/./node_modules/form-data/lib/browser.js","webpack://Particle/./node_modules/function-bind/implementation.js","webpack://Particle/./node_modules/function-bind/index.js","webpack://Particle/./node_modules/get-intrinsic/index.js","webpack://Particle/./node_modules/has-proto/index.js","webpack://Particle/./node_modules/has-symbols/index.js","webpack://Particle/./node_modules/has-symbols/shams.js","webpack://Particle/./node_modules/has/src/index.js","webpack://Particle/./node_modules/ieee754/index.js","webpack://Particle/./node_modules/node-fetch/browser.js","webpack://Particle/./node_modules/process/browser.js","webpack://Particle/./node_modules/punycode/punycode.js","webpack://Particle/./node_modules/qs/lib/formats.js","webpack://Particle/./node_modules/qs/lib/index.js","webpack://Particle/./node_modules/qs/lib/parse.js","webpack://Particle/./node_modules/qs/lib/stringify.js","webpack://Particle/./node_modules/qs/lib/utils.js","webpack://Particle/./node_modules/side-channel/index.js","webpack://Particle/./node_modules/side-channel/node_modules/object-inspect/index.js","webpack://Particle/./node_modules/stream-http/index.js","webpack://Particle/./node_modules/stream-http/lib/capability.js","webpack://Particle/./node_modules/stream-http/lib/request.js","webpack://Particle/./node_modules/stream-http/lib/response.js","webpack://Particle/./node_modules/stream-http/node_modules/inherits/inherits_browser.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/errors-browser.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/_stream_duplex.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/_stream_passthrough.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/_stream_readable.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/_stream_transform.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/_stream_writable.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/async_iterator.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/buffer_list.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/destroy.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/end-of-stream.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/from-browser.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/pipeline.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/state.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/stream-browser.js","webpack://Particle/./node_modules/stream-http/node_modules/readable-stream/readable-browser.js","webpack://Particle/./node_modules/stream-http/node_modules/safe-buffer/index.js","webpack://Particle/./node_modules/stream-http/node_modules/string_decoder/lib/string_decoder.js","webpack://Particle/./node_modules/stream-http/node_modules/xtend/immutable.js","webpack://Particle/./node_modules/url/url.js","webpack://Particle/./node_modules/util-deprecate/browser.js","webpack://Particle/./src/Agent.js","webpack://Particle/./src/Client.js","webpack://Particle/./src/Defaults.js","webpack://Particle/./src/EventStream.js","webpack://Particle/./src/Library.js","webpack://Particle/./src/Particle.js","webpack://Particle/webpack/bootstrap","webpack://Particle/webpack/runtime/global","webpack://Particle/webpack/runtime/node module decorator","webpack://Particle/webpack/startup"],"sourcesContent":["'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\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n 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 =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\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 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 parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\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\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * 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 * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\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 // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\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(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(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 interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(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(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\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(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(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.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 buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.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 === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let 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 (!Array.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 let 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 const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\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 (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let 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 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) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let 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 coercion 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// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let 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 const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let 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 const length = this.length\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.toLocaleString = Buffer.prototype.toString\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 let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\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 let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let 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 (numberIsNaN(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 (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 let indexSize = 1\n let arrLength = arr.length\n let 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 let i\n if (dir) {\n let 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 let found = true\n for (let 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 const 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 const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(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 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 } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const 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 let 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 case 'latin1':\n case 'binary':\n return asciiWrite(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 const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let 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\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const 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 let res = ''\n let 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 let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; 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 const 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 const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\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 =\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 let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\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 let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\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 =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\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.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\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 let val = this[offset]\n let mul = 1\n let 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 let i = byteLength\n let mul = 1\n let 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 offset = offset >>> 0\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 offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\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 offset = offset >>> 0\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.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\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 offset = offset >>> 0\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 offset = offset >>> 0\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 offset = offset >>> 0\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 =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let 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 =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let 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 =\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 this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\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 this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\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 this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\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 this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\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 this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let 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 const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let 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 (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 this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\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 this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\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 this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\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 this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\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 value = +value\n offset = offset >>> 0\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 value = +value\n offset = offset >>> 0\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 (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\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('Index out of range')\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 const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\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 (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 if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\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 let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().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 utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let 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 const byteArray = []\n for (let 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 let c, hi, lo\n const byteArray = []\n for (let 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 let i\n for (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\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\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","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\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 R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\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.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\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 setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","/* eslint-env browser */\nmodule.exports = typeof self == 'object' ? self.FormData : window.FormData;\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.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","\"use strict\";\n\n// ref: https://github.com/tc39/proposal-global\nvar getGlobal = function () {\n\t// the only reliable means to get the global object is\n\t// `Function('return this')()`\n\t// However, this causes CSP violations in Chrome apps.\n\tif (typeof self !== 'undefined') { return self; }\n\tif (typeof window !== 'undefined') { return window; }\n\tif (typeof global !== 'undefined') { return global; }\n\tthrow new Error('unable to locate global object');\n}\n\nvar globalObject = getGlobal();\n\nmodule.exports = exports = globalObject.fetch;\n\n// Needed for TypeScript and Webpack.\nif (globalObject.fetch) {\n\texports.default = globalObject.fetch.bind(globalObject);\n}\n\nexports.Headers = globalObject.Headers;\nexports.Request = globalObject.Request;\nexports.Response = globalObject.Response;\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","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\nmodule.exports = {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return String(value);\n }\n },\n RFC1738: Format.RFC1738,\n RFC3986: Format.RFC3986\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictNullHandling: false\n};\n\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\n\nvar parseArrayValue = function (val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = { __proto__: null };\n\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(\n parseArrayValue(part.slice(pos + 1), options),\n function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n }\n );\n }\n\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(val);\n }\n\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n\n if (has.call(obj, key)) {\n obj[key] = utils.combine(obj[key], val);\n } else {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]' && options.parseArrays) {\n obj = [].concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (!options.parseArrays && cleanRoot === '') {\n obj = { 0: leaf };\n } else if (\n !isNaN(index)\n && root !== cleanRoot\n && String(index) === cleanRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else if (cleanRoot !== '__proto__') {\n obj[cleanRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n return {\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n\n if (options.allowSparse === true) {\n return obj;\n }\n\n return utils.compact(obj);\n};\n","'use strict';\n\nvar getSideChannel = require('side-channel');\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n charset: 'utf-8',\n charsetSentinel: false,\n delimiter: '&',\n encode: true,\n encoder: utils.encode,\n encodeValuesOnly: false,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string'\n || typeof v === 'number'\n || typeof v === 'boolean'\n || typeof v === 'symbol'\n || typeof v === 'bigint';\n};\n\nvar sentinel = {};\n\nvar stringify = function stringify(\n object,\n prefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n sideChannel\n) {\n var obj = object;\n\n var tmpSc = sideChannel;\n var step = 0;\n var findFlag = false;\n while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {\n // Where object last appeared in the ref tree\n var pos = tmpSc.get(object);\n step += 1;\n if (typeof pos !== 'undefined') {\n if (pos === step) {\n throw new RangeError('Cyclic object value');\n } else {\n findFlag = true; // Break while\n }\n }\n if (typeof tmpSc.get(sentinel) === 'undefined') {\n step = 0;\n }\n }\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n });\n }\n\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;\n }\n\n obj = '';\n }\n\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n if (encodeValuesOnly && encoder) {\n obj = utils.maybeMap(obj, encoder);\n }\n objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];\n } else if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;\n\n for (var j = 0; j < objKeys.length; ++j) {\n var key = objKeys[j];\n var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];\n\n if (skipNulls && value === null) {\n continue;\n }\n\n var keyPrefix = isArray(obj)\n ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix\n : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');\n\n sideChannel.set(object, step);\n var valueSideChannel = getSideChannel();\n valueSideChannel.set(sentinel, sideChannel);\n pushToArray(values, stringify(\n value,\n keyPrefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n valueSideChannel\n ));\n }\n\n return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (opts && opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if (opts && 'indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {\n throw new TypeError('`commaRoundTrip` must be a boolean, or absent');\n }\n var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n\n var sideChannel = getSideChannel();\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (options.skipNulls && obj[key] === null) {\n continue;\n }\n pushToArray(keys, stringify(\n obj[key],\n key,\n generateArrayPrefix,\n commaRoundTrip,\n options.strictNullHandling,\n options.skipNulls,\n options.encode ? options.encoder : null,\n options.filter,\n options.sort,\n options.allowDots,\n options.serializeDate,\n options.format,\n options.formatter,\n options.encodeValuesOnly,\n options.charset,\n sideChannel\n ));\n }\n\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar formats = require('./formats');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str, decoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\n\nvar encode = function encode(str, defaultEncoder, charset, kind, format) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n var out = '';\n for (var i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n out += string.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n out = out + hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n /* eslint operator-linebreak: [2, \"before\"] */\n out += hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compactQueue(queue);\n\n return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\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","/*\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\n'use strict';\n\nvar punycode = require('punycode');\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/*\n * define these here so at least they only have to be\n * compiled once on the first module load.\n */\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 /*\n * RFC 2396: characters reserved for delimiting URLs.\n * We actually just auto-escape these.\n */\n delims = [\n '<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'\n ],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = [\n '{', '}', '|', '\\\\', '^', '`'\n ].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n /*\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 */\n nonHostChars = [\n '%', '/', '?', ';', '#'\n ].concat(autoEscape),\n hostEndingChars = [\n '/', '?', '#'\n ],\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('qs');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && typeof url === 'object' && 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 (typeof url !== 'string') {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\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 */\n var queryIndex = url.indexOf('?'),\n splitter = 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 /*\n * trim before proceeding.\n * This is to support parse stuff like \" http://foo.com \\n\"\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 /*\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 */\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] && (slashes || (proto && !slashedProtocol[proto]))) {\n\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\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\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)) { hostEnd = hec; }\n }\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 */\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n /*\n * atSign must be in auth portion.\n * http://a@b/c@d => host:b auth:a path:/c@d\n */\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n /*\n * Now we have a portion which is definitely the auth.\n * Pull that off.\n */\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)) { hostEnd = hec; }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) { 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 /*\n * we've indicated that there is a hostname,\n * so even if it's empty, it has to be present.\n */\n this.hostname = this.hostname || '';\n\n /*\n * if hostname begins with [ and ends with ]\n * assume that it's an IPv6 address.\n */\n var ipv6Hostname = this.hostname[0] === '[' && 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 /*\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 */\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 /*\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 */\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 /*\n * strip [ and ] from the hostname\n * the host field still retains them, though\n */\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 /*\n * now rest is set to the post-host stuff.\n * chop off any delim chars.\n */\n if (!unsafeProtocol[lowerProto]) {\n\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 */\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1) { 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 // 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] && 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 /*\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 */\n if (typeof obj === 'string') { 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 ? this.hostname : '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query && typeof this.query === 'object' && Object.keys(this.query).length) {\n query = querystring.stringify(this.query, {\n arrayFormat: 'repeat',\n addQueryPrefix: false\n });\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') { protocol += ':'; }\n\n /*\n * only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n * unless they had them to begin with.\n */\n if (this.slashes || (!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 (typeof relative === 'string') {\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 /*\n * hash is always overridden, no matter what.\n * even href=\"\" will remove it.\n */\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') { result[rkey] = relative[rkey]; }\n }\n\n // urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {\n 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 /*\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 */\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 = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\n mustEndAbs = isRelAbs || isSourceAbs || (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 /*\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 */\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') { srcPath[0] = result.host; } 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; } 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 === '' ? relative.host : result.host;\n result.hostname = relative.hostname || relative.hostname === '' ? 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 /*\n * it's relative\n * throw away the existing file, and take the new path instead.\n */\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 (relative.search != null) {\n /*\n * just pull out the search.\n * like href='?foo'.\n * Put this after the other two cases because it simplifies the booleans\n */\n if (psychotic) {\n result.host = srcPath.shift();\n result.hostname = result.host;\n /*\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 */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n // to support http.request\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n /*\n * no path at all. easy.\n * we've already handled the other stuff above.\n */\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 /*\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 */\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === '';\n\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 */\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] !== '' && (!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] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = isAbsolute ? '' : srcPath.length ? srcPath.shift() : '';\n result.host = result.hostname;\n /*\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 */\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.hostname = authInHost.shift();\n result.host = result.hostname;\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (srcPath.length > 0) {\n result.pathname = srcPath.join('/');\n } else {\n result.pathname = null;\n result.path = null;\n }\n\n // to support request.http\n if (result.pathname !== null || result.search !== null) {\n result.path = (result.pathname ? result.pathname : '') + (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\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\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","/*\n ******************************************************************************\n Copyright (c) 2016 Particle Industries, Inc. All rights reserved.\n\n This program is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation, either\n version 3 of the License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this program; if not, see .\n ******************************************************************************\n */\n\nconst fetch = require('node-fetch');\nconst FormData = require('form-data');\nconst qs = require('qs');\nconst fs = require('../fs');\nconst packageJson = require('../package.json');\n\n/**\n * @typedef {string} AccessToken\n */\n\n/**\n * @typedef {object} BasicAuth\n * @property {string} username\n * @property {string} password\n */\n\n/**\n * @typedef {AccessToken | BasicAuth} Auth Prefer using an access token over basic auth for better security\n */\n\n/**\n * The object returned for a basic request\n * @typedef {object} JSONResponse\n * @property {number} statusCode The HTTP response status\n * @property {object} body The endpoint's response parsed as a JSON\n */\n\n/**\n * The possible response from an API request\n * @typedef {JSONResponse | Buffer | ArrayBuffer} RequestResponse\tThe type is based on\n * the request config and whether is on browser or node\n */\n\n/**\n * The error object generated in case of a failed request\n * @typedef {object} RequestError\n * @property {number} statusCode The HTTP response status\n * @property {string} errorDescription Details on what caused the failed request\n * @property {string} shortErrorDescription Summarized version of the fail reason\n * @property {object} body The response object from the request\n * @property {object} error The error object from the request\n */\n\nclass Agent {\n constructor(baseUrl){\n this.setBaseUrl(baseUrl);\n }\n\n setBaseUrl(baseUrl) {\n this.baseUrl = baseUrl;\n }\n\n /**\n * Make a GET request\n * @param {object} params Configurations to customize the request\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.query] Key/Value pairs of query params\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n get({ uri, auth, headers, query, context }) {\n return this.request({ uri, method: 'get', auth, headers, query, context });\n }\n\n /**\n * Make a HEAD request\n * @param {object} params Configurations to customize the request\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.query] Key/Value pairs of query params\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n head({ uri, auth, headers, query, context }) {\n return this.request({ uri, method: 'head', auth, headers, query, context });\n }\n\n /**\n * Make a POST request\n * @param {object} params Configurations to customize the request\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.data] Key/Value pairs of query params\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n post({ uri, headers, data, auth, context }) {\n return this.request({ uri, method: 'post', auth, headers, data, context });\n }\n\n /**\n * Make a PUT request\n * @param {object} params Configurations to customize the request\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.data] Key/VAlue pairs of query params\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n put({ uri, auth, headers, data, context }) {\n return this.request({ uri, method: 'put', auth, headers, data, context });\n }\n\n /**\n * Make a DELETE request\n * @param {object} params Configurations to customize the request\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.data] Key/Value pairs of query params\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n delete({ uri, auth, headers, data, context }) {\n return this.request({ uri, method: 'delete', auth, headers, data, context });\n }\n\n /**\n *\n * @param {object} config An obj with all the possible request configurations\n * @param {string} config.uri The URI to request\n * @param {string} config.method The method used to request the URI, should be in uppercase.\n * @param {object} [config.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [config.data] Arbitrary data to send as the body.\n * @param {Auth} [config.auth] Authorization\n * @param {object} [config.query] Query parameters\n * @param {object} [config.form] Form fields\n * @param {object} [config.files] Array of file names and file content\n * @param {object} [config.context] The invocation context, describing the tool and project.\n * @param {boolean} [config.isBuffer=false] Indicate if the response should be treated as Buffer instead of JSON\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n request({\n uri,\n method,\n headers = undefined,\n data = undefined,\n auth,\n query = undefined,\n form = undefined,\n files = undefined,\n context = undefined,\n isBuffer = false\n }){\n const requestFiles = this._sanitizeFiles(files);\n const requestParams = this._buildRequest({ uri, method, headers, data, auth, query, form, context, files: requestFiles });\n return this._promiseResponse(requestParams, isBuffer);\n }\n\n /**\n * Promises to send the request and retrieve the response.\n * @param {[string, object]} requestParams First argument is the URI to request, the second one are the options.\n * @param {boolean} isBuffer Indicate if the response body should be returned as a Buffer (Node) / ArrayBuffer (browser) instead of JSON\n * @param {function} [makerequest=fetch] The fetch function to use. Override for testing.\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n * @private\n */\n _promiseResponse(requestParams, isBuffer, makerequest = fetch) {\n let status;\n return makerequest(...requestParams)\n .then((resp) => {\n status = resp.status;\n if (!resp.ok) {\n return resp.text().then((err) => {\n const objError = JSON.parse(err);\n // particle-commnds/src/cmd/api expects response.text. to be a string\n const response = Object.assign(resp, { text: err });\n throw Object.assign(objError, { response });\n });\n }\n if (status === 204) { // Can't do resp.json() since there is no body to parse\n return '';\n }\n if (isBuffer) {\n return resp.blob();\n }\n return resp.json();\n }).then((body) => {\n if (isBuffer) {\n return body.arrayBuffer().then((arrayBuffer) => {\n if (!this.isForBrowser()) {\n return Buffer.from(arrayBuffer);\n }\n return arrayBuffer;\n });\n }\n return {\n body,\n statusCode: status\n };\n }).catch((error) => {\n const errorType = status ? `HTTP error ${status}` : 'Network error';\n let errorDescription = `${errorType} from ${requestParams[0]}`;\n let shortErrorDescription;\n if (error.error_description) { // Fetch responded with ok false\n errorDescription = `${errorDescription} - ${error.error_description}`;\n shortErrorDescription = error.error_description;\n }\n const reason = new Error(errorDescription);\n Object.assign(reason, {\n statusCode: status,\n errorDescription,\n shortErrorDescription,\n error,\n body: error\n });\n throw reason;\n });\n }\n\n /**\n * Generate the params in a format valid for 'fetch'\n * @param {object} config Configurations to customize the request\n * @param {string} config.uri The URI to request\n * @param {string} config.method The method used to request the URI, should be in uppercase.\n * @param {object} [config.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [config.data] Arbitrary data to send as the body.\n * @param {Auth} [config.auth] Authorization\n * @param {object} [config.query] Query parameters\n * @param {object} [config.form] Form fields\n * @param {object} [config.files] Array of file names and file content\n * @param {object} [config.context] The invocation context, describing the tool and project.\n * @returns {[string, object]} The uri to make the request too, and extra configs\n * @private\n */\n _buildRequest({ uri, method, headers, data, auth, query, form, files, context }){\n let actualUri = uri;\n if (this.baseUrl && uri[0] === '/') {\n actualUri = `${this.baseUrl}${uri}`;\n }\n if (query) {\n const queryParams = qs.stringify(query);\n const hasParams = actualUri.includes('?');\n actualUri = `${actualUri}${hasParams ? '&' : '?'}${queryParams}`;\n }\n\n const userAgentHeader = { 'User-Agent': `${packageJson.name}/${packageJson.version} (${packageJson.repository.url})` };\n let body;\n let contentTypeHeader;\n if (files){\n // @ts-ignore\n contentTypeHeader = {}; // Needed to allow fetch create its own\n body = this._getFromData(files, form);\n } else if (form){\n contentTypeHeader = { 'Content-Type': 'application/x-www-form-urlencoded' };\n body = qs.stringify(form);\n } else if (data){\n contentTypeHeader = { 'Content-Type': 'application/json' };\n body = JSON.stringify(data);\n }\n const finalHeaders = Object.assign({},\n userAgentHeader,\n contentTypeHeader,\n this._getAuthorizationHeader(auth),\n this._getContextHeaders(context),\n headers\n );\n\n return [actualUri, { method, body, headers: finalHeaders }];\n }\n\n isForBrowser() {\n return typeof window !== 'undefined';\n }\n\n _getFromData(files, form) {\n const formData = new FormData();\n for (let [name, file] of Object.entries(files)){\n let path = file.path;\n let fileData = file.data;\n if (!this.isForBrowser()) {\n const nodeFormData = this._getNodeFormData(file);\n path = nodeFormData.path;\n fileData = nodeFormData.file;\n }\n formData.append(name, fileData, path);\n }\n if (form){\n for (let [name, value] of Object.entries(form)){\n formData.append(name, value);\n }\n }\n return formData;\n }\n\n _getNodeFormData(file) {\n let fileData = file.data;\n if (typeof file.data === 'string') {\n fileData = fs.createReadStream(file.data);\n }\n return {\n file: fileData,\n path: { filepath: file.path } // Different API for nodejs\n };\n }\n\n _getContextHeaders(context = {}) {\n return Object.assign({},\n this._getToolContext(context.tool),\n this._getProjectContext(context.project)\n );\n }\n\n _getToolContext(tool = {}){\n let value = '';\n if (tool.name){\n value += this._toolIdent(tool);\n if (tool.components){\n for (let component of tool.components){\n value += ', '+this._toolIdent(component);\n }\n }\n }\n if (value){\n return { 'X-Particle-Tool': value };\n }\n return {};\n }\n\n _toolIdent(tool){\n return this._nameAtVersion(tool.name, tool.version);\n }\n\n _nameAtVersion(name, version){\n let value = '';\n if (name){\n value += name;\n if (version){\n value += '@'+version;\n }\n }\n return value;\n }\n\n _getProjectContext(project = {}){\n let value = this._buildSemicolonSeparatedProperties(project, 'name');\n if (value){\n return { 'X-Particle-Project': value };\n }\n return {};\n }\n\n /**\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 _buildSemicolonSeparatedProperties(obj, primaryProperty){\n let value = '';\n if (obj[primaryProperty]){\n value += obj[primaryProperty];\n for (let prop in obj){\n if (prop!==primaryProperty && obj.hasOwnProperty(prop)){\n value += '; '+prop+'='+obj[prop];\n }\n }\n }\n return value;\n }\n\n /**\n * Adds an authorization header.\n * @param {Auth} [auth] The authorization bearer token.\n * @returns {object} The original request.\n */\n _getAuthorizationHeader(auth){\n if (!auth) {\n return {};\n }\n if (typeof auth === 'string') {\n return { Authorization: `Bearer ${auth}` };\n }\n let encoded;\n if (this.isForBrowser()) {\n encoded = btoa(`${auth.username}:${auth.password}`);\n } else {\n encoded = Buffer.from(`${auth.username}:${auth.password}`)\n .toString('base64');\n }\n return { Authorization: `Basic ${encoded}` };\n }\n\n /**\n *\n * @param {Object} files converts the file names to file, file1, file2.\n * @returns {object} the renamed files.\n */\n _sanitizeFiles(files){\n let requestFiles;\n if (files){\n requestFiles = {};\n Object.keys(files).forEach((k, i) => {\n const name = i ? `file${i + 1}` : 'file';\n requestFiles[name] = {\n data: files[k],\n path: k\n };\n });\n }\n return requestFiles;\n }\n}\n\nmodule.exports = Agent;\n","const Library = require('./Library');\nlet Particle;\n\nclass Client {\n constructor({ auth, api = new Particle() }){\n this.auth = auth;\n this.api = api;\n }\n\n ready(){\n return Boolean(this.auth);\n }\n\n /**\n * Get firmware library objects\n * @param {Object} query The query parameters for libraries. See Particle.listLibraries\n * @returns {Promise} A promise\n */\n libraries(query = {}){\n return this.api.listLibraries(Object.assign({}, query, { auth: this.auth }))\n .then(payload => {\n const libraries = payload.body.data || [];\n return libraries.map(l => new Library(this, l));\n });\n }\n\n /**\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 library(name, query = {}){\n return this.api.getLibrary(Object.assign({}, query, { name, auth: this.auth }))\n .then(payload => {\n const library = payload.body.data || {};\n return new Library(this, library);\n });\n }\n\n /**\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 libraryVersions(name, query = {}){\n return this.api.getLibraryVersions(Object.assign({}, query, { name, auth: this.auth }))\n .then(payload => {\n const libraries = payload.body.data || [];\n return libraries.map(l => new Library(this, l));\n });\n }\n\n /**\n * Contribute a new library version\n * @param {Buffer} archive The compressed archive with the library source\n * @returns {Promise} A promise\n */\n contributeLibrary(archive){\n return this.api.contributeLibrary({ archive, auth: this.auth })\n .then(payload => {\n const library = payload.body.data || {};\n return new Library(this, library);\n }, error => {\n this._throwError(error);\n });\n }\n\n /**\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 publishLibrary(name){\n return this.api.publishLibrary({ name, auth: this.auth })\n .then(payload => {\n const library = payload.body.data || {};\n return new Library(this, library);\n }, error => {\n this._throwError(error);\n });\n }\n\n /**\n * Delete an entire published library\n * @param {object} params\tSpecific params of the library to delete\n * @param {string} params.name\tName of the library to delete\n * @param {string} params.force\tKey to force deleting a public library\n * @returns {Promise} A promise\n */\n deleteLibrary({ name, force }){\n return this.api.deleteLibrary({ name, force, auth: this.auth })\n .then(() => true, error => this._throwError(error));\n }\n\n _throwError(error){\n if (error.body && error.body.errors){\n const errorMessages = error.body.errors.map((e) => e.message).join('\\n');\n throw new Error(errorMessages);\n }\n throw error;\n }\n\n downloadFile(uri){\n return this.api.downloadFile({ uri });\n }\n\n /**\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 compileCode(files, platformId, targetVersion){\n return this.api.compileCode({ files, platformId, targetVersion, auth: this.auth });\n }\n\n /**\n * @param {object} params\n * @param {string} params.deviceId\tDevice ID or Name\n * @param {boolean} params.signal\tSignal on or off\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n signalDevice({ signal, deviceId }){\n return this.api.signalDevice({ signal, deviceId, auth: this.auth });\n }\n\n /**\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n listDevices(){\n return this.api.listDevices({ auth: this.auth });\n }\n\n /**\n * @returns {Promise} A promise\n * @deprecated Will be removed in 6.5\n */\n listBuildTargets(){\n return this.api.listBuildTargets({ onlyFeatured: true, auth: this.auth })\n .then(payload => {\n let targets = [];\n for (let target of payload.body.targets){\n for (let platform of target.platforms){\n targets.push({\n version: target.version,\n platform: platform,\n prerelease: target.prereleases.indexOf(platform) > -1,\n firmware_vendor: target.firmware_vendor\n });\n }\n }\n return targets;\n }, () => {});\n }\n\n trackingIdentity({ full = false, context = undefined }={}){\n return this.api.trackingIdentity({ full, context, auth: this.auth })\n .then(payload => {\n return payload.body;\n });\n }\n}\n\nmodule.exports = Client;\nParticle = require('./Particle'); // Move it to after the export to avoid issue with circular reference\n","module.exports = {\n baseUrl: 'https://api.particle.io',\n clientSecret: 'particle-api',\n clientId: 'particle-api',\n tokenDuration: 7776000, // 90 days\n auth: undefined\n};\n","/* eslint max-depth: 0 */\nconst http = require('http');\nconst https = require('https');\nconst url = require('url');\nconst { EventEmitter } = require('events');\n\nclass EventStream extends EventEmitter {\n constructor(uri, token) {\n super();\n this.uri = uri;\n this.token = token;\n this.reconnectInterval = 2000;\n this.timeout = 13000; // keep alive can be sent up to 12 seconds after last event\n this.data = '';\n this.buf = '';\n\n this.parse = this.parse.bind(this);\n this.end = this.end.bind(this);\n this.idleTimeoutExpired = this.idleTimeoutExpired.bind(this);\n }\n\n connect() {\n return new Promise((resolve, reject) => {\n const { hostname, protocol, port, path } = url.parse(this.uri);\n this.origin = `${protocol}//${hostname}${port ? (':' + port) : ''}`;\n\n const isSecure = protocol === 'https:';\n const requestor = isSecure ? https : http;\n const req = requestor.request({\n hostname,\n protocol,\n path: `${path}?access_token=${this.token}`,\n method: 'get',\n // @ts-ignore\n port: parseInt(port, 10) || (isSecure ? 443 : 80),\n // @ts-ignore\n mode: 'prefer-streaming'\n });\n\n this.req = req;\n\n let connected = false;\n let connectionTimeout = setTimeout(() => {\n if (this.req) {\n this.req.abort();\n }\n reject({ error: new Error('Timeout'), errorDescription: `Timeout connecting to ${this.uri}` });\n }, this.timeout);\n\n req.on('error', e => {\n clearTimeout(connectionTimeout);\n\n if (connected) {\n this.end();\n } else {\n reject({ error: e, errorDescription: `Network error from ${this.uri}` });\n }\n });\n\n req.on('response', res => {\n clearTimeout(connectionTimeout);\n\n const statusCode = res.statusCode;\n if (statusCode !== 200) {\n let body = '';\n res.on('data', chunk => body += chunk);\n res.on('end', () => {\n try {\n body = JSON.parse(body);\n } catch (e) {\n // don't bother doing anything special if the JSON.parse fails\n // since we are already about to reject the promise anyway\n } finally {\n let errorDescription = `HTTP error ${statusCode} from ${this.uri}`;\n // @ts-ignore\n if (body && body.error_description) {\n // @ts-ignore\n errorDescription += ' - ' + body.error_description;\n }\n reject({ statusCode, errorDescription, body });\n this.req = undefined;\n }\n });\n return;\n }\n\n this.data = '';\n this.buf = '';\n\n connected = true;\n res.on('data', this.parse);\n res.once('end', this.end);\n this.startIdleTimeout();\n resolve(this);\n });\n req.end();\n });\n }\n\n abort() {\n if (this.req) {\n this.req.abort();\n this.req = undefined;\n }\n this.removeAllListeners();\n }\n\n /* Private methods */\n\n emitSafe(event, param) {\n try {\n this.emit(event, param);\n } catch (error) {\n if (event !== 'error') {\n this.emitSafe('error', error);\n }\n }\n }\n\n end() {\n this.stopIdleTimeout();\n\n if (!this.req) {\n // request was ended intentionally by abort\n // do not auto reconnect.\n return;\n }\n\n this.req = undefined;\n this.emitSafe('disconnect');\n this.reconnect();\n }\n\n reconnect() {\n setTimeout(() => {\n if (this.isOffline()) {\n this.reconnect();\n return;\n }\n\n this.emitSafe('reconnect');\n this.connect().then(() => {\n this.emitSafe('reconnect-success');\n }).catch(err => {\n this.emitSafe('reconnect-error', err);\n this.reconnect();\n });\n }, this.reconnectInterval);\n }\n\n isOffline() {\n if (typeof navigator === 'undefined' || navigator.hasOwnProperty('onLine')) {\n return false;\n }\n return !navigator.onLine;\n }\n\n startIdleTimeout() {\n this.stopIdleTimeout();\n this.idleTimeout = setTimeout(this.idleTimeoutExpired, this.timeout);\n }\n\n stopIdleTimeout() {\n if (this.idleTimeout) {\n clearTimeout(this.idleTimeout);\n this.idleTimeout = null;\n }\n }\n\n idleTimeoutExpired() {\n if (this.req) {\n this.req.abort();\n this.end();\n }\n }\n\n parse(chunk) {\n this.startIdleTimeout();\n\n this.buf += chunk;\n let pos = 0;\n let length = this.buf.length;\n let discardTrailingNewline = false;\n\n while (pos < length) {\n if (discardTrailingNewline) {\n if (this.buf[pos] === '\\n') {\n ++pos;\n }\n discardTrailingNewline = false;\n }\n\n let lineLength = -1;\n let fieldLength = -1;\n\n for (let i = pos; lineLength < 0 && i < length; ++i) {\n const c = this.buf[i];\n if (c === ':') {\n if (fieldLength < 0) {\n fieldLength = i - pos;\n }\n } else if (c === '\\r') {\n discardTrailingNewline = true;\n lineLength = i - pos;\n } else if (c === '\\n') {\n lineLength = i - pos;\n }\n }\n\n if (lineLength < 0) {\n break;\n }\n\n this.parseEventStreamLine(pos, fieldLength, lineLength);\n\n pos += lineLength + 1;\n }\n\n if (pos === length) {\n this.buf = '';\n } else if (pos > 0) {\n this.buf = this.buf.slice(pos);\n }\n }\n\n parseEventStreamLine(pos, fieldLength, lineLength) {\n if (lineLength === 0) {\n try {\n if (this.data.length > 0 && this.event) {\n const event = JSON.parse(this.data);\n event.name = this.eventName || '';\n this.emitSafe('event', event);\n }\n } catch (e) {\n // do nothing if JSON.parse fails\n } finally {\n this.data = '';\n this.eventName = undefined;\n this.event = false;\n }\n } else if (fieldLength > 0) {\n const field = this.buf.slice(pos, pos + fieldLength);\n let step = 0;\n\n if (this.buf[pos + fieldLength + 1] !== ' ') {\n step = fieldLength + 1;\n } else {\n step = fieldLength + 2;\n }\n pos += step;\n const valueLength = lineLength - step;\n const value = this.buf.slice(pos, pos + valueLength);\n\n if (field === 'data') {\n this.data += value + '\\n';\n } else if (field === 'event') {\n this.eventName = value;\n this.event = true;\n }\n }\n }\n}\n\nmodule.exports = EventStream;\n","/* Library\n * Represents a version of a library contributed in the cloud.\n */\n\nclass Library {\n constructor(client, data) {\n // Make client non-enumerable so it doesn't show up in Object.keys, JSON.stringify, etc\n Object.defineProperty(this, 'client', { value: client });\n this._assignAttributes(data);\n this.downloadUrl = data.links && data.links.download;\n }\n\n _assignAttributes(data) {\n Object.assign(this, data.attributes);\n }\n\n\n /**\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 download() {\n if (!this.downloadUrl) {\n return Promise.reject(new Error('No download URL for this library'));\n }\n // @ts-ignore\n return this.client.downloadFile(this.downloadUrl);\n }\n\n /* TODO: add a versions() method to fetch an array of library objects */\n}\n\nmodule.exports = Library;\n","const Defaults = require('./Defaults');\nconst EventStream = require('./EventStream');\nconst Agent = require('./Agent');\nconst Client = require('./Client');\n\n// Hack to avoid importing the type on every @return statement\n/**\n * @typedef {import('./Agent').RequestResponse} RequestResponse\n */\n/**\n * @typedef {import('./Agent').RequestError} RequestError\n */\n/**\n * @typedef {import('./Agent').Auth} Auth\n */\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 */\nclass Particle {\n /**\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 * @param {string} [options.baseUrl]\n * @param {string} [options.clientSecret]\n * @param {string} [options.clientId]\n * @param {number} [options.tokenDuration]\n * @param {Auth} [options.auth] The access token or basic auth object. If not specified here, will have to be added to every request\n */\n constructor(options = {}){\n if (options.auth) {\n this.setDefaultAuth(options.auth);\n }\n\n // todo - this seems a bit dangerous - would be better to put all options/context in a contained object\n Object.assign(this, Defaults, options);\n this.context = {};\n this.agent = new Agent(this.baseUrl);\n }\n\n _isValidContext(name, context){\n return (name === 'tool' || name === 'project') && context !== undefined;\n }\n\n setContext(name, context){\n if (context !== undefined){\n if (this._isValidContext(name, context)){\n this.context[name] = context;\n } else {\n throw Error('unknown context name or undefined context: ' + name);\n }\n }\n }\n\n /**\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 _buildContext(context){\n return Object.assign(this.context, context);\n }\n\n /**\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 // @ts-ignore\n login({ username, password, tokenDuration = this.tokenDuration, headers, context }){\n return this.request({\n uri: '/oauth/token',\n method: 'post',\n headers,\n form: {\n username,\n password,\n grant_type: 'password',\n // @ts-ignore\n client_id: this.clientId,\n // @ts-ignore\n client_secret: this.clientSecret,\n expires_in: tokenDuration\n },\n context\n });\n }\n\n /**\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 sendOtp({ mfaToken, otp, headers, context }){\n return this.request({\n uri: '/oauth/token',\n method: 'post',\n headers,\n form: {\n grant_type: 'urn:custom:mfa-otp',\n mfa_token: mfaToken,\n otp,\n // @ts-ignore\n client_id: this.clientId,\n // @ts-ignore\n client_secret: this.clientSecret\n },\n context\n });\n }\n\n /**\n * Enable MFA on the currently logged in user\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 enableMfa({ auth, headers, context }){\n return this.get({ uri: '/v1/user/mfa-enable', auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 confirmMfa({ mfaToken, otp, invalidateTokens = false, auth, headers, context }){\n let data = { mfa_token: mfaToken, otp };\n\n if (invalidateTokens) {\n data.invalidate_tokens = true;\n }\n\n return this.post({\n uri: '/v1/user/mfa-enable',\n auth,\n headers,\n data,\n context\n });\n }\n\n /**\n * Disable MFA for the user.\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 disableMfa({ currentPassword, auth, headers, context }){\n return this.put({\n uri: '/v1/user/mfa-disable',\n auth,\n headers,\n data: { current_password: currentPassword },\n context\n });\n }\n\n /**\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 createCustomer({ email, password, product, headers, context }){\n return this.request({\n uri: `/v1/products/${product}/customers`,\n method: 'post',\n headers,\n form: {\n email,\n password,\n grant_type: 'client_credentials',\n // @ts-ignore\n client_id: this.clientId,\n // @ts-ignore\n client_secret: this.clientSecret\n },\n context\n });\n }\n\n /**\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 loginAsClientOwner({ headers, context }){\n return this.request({\n uri: '/oauth/token',\n method: 'post',\n headers,\n form: {\n grant_type: 'client_credentials',\n // @ts-ignore\n client_id: this.clientId,\n // @ts-ignore\n client_secret: this.clientSecret\n },\n context\n });\n }\n\n /**\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 createUser({ username, password, accountInfo, headers, context }){\n return this.post({\n uri: '/v1/users',\n headers,\n data: {\n username,\n password,\n account_info : accountInfo\n },\n context\n });\n }\n\n /**\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 verifyUser({ token, headers, context }){\n return this.post({\n uri: '/v1/user/verify',\n headers,\n data: { token },\n context\n });\n }\n\n /**\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 resetPassword({ username, headers, context }){\n return this.post({\n uri: '/v1/user/password-reset',\n headers,\n data: { username },\n context\n });\n }\n\n /**\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 deleteAccessToken({ username, password, token, headers, context }){\n return this.delete({\n uri: `/v1/access_tokens/${token}`,\n auth: { username, password },\n headers,\n data: { access_token: token },\n context\n });\n }\n\n /**\n * Revoke the current session access token\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteCurrentAccessToken({ auth, headers, context }){\n return this.delete({\n uri: '/v1/access_tokens/current',\n auth,\n headers,\n context\n });\n }\n\n /**\n * Revoke all active access tokens\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteActiveAccessTokens({ auth, headers, context }){\n return this.delete({\n uri: '/v1/access_tokens',\n auth,\n headers,\n context\n });\n }\n\n /**\n * Delete the current user\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteUser({ auth, password, headers, context }){\n return this.delete({\n uri: '/v1/user',\n data: { password },\n auth,\n headers,\n context\n });\n }\n\n /**\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 listAccessTokens({ username, password, otp, headers, context }){\n return this.get({\n uri: '/v1/access_tokens',\n auth: { username, password },\n query: otp ? { otp } : undefined,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 trackingIdentity({ full = false, auth, headers, context } = {}){\n return this.get({\n uri: '/v1/user/identify',\n auth,\n headers,\n query: (full ? undefined : { tracking: 1 }),\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listDevices({ deviceId, deviceName, groups, sortAttr, sortDir, page, perPage, product, auth, headers, context }){\n let uri, query;\n\n if (product){\n uri = `/v1/products/${product}/devices`;\n query = {\n deviceId,\n deviceName,\n groups: Array.isArray(groups) ? groups.join(',') : undefined,\n sortAttr,\n sortDir,\n page,\n per_page: perPage\n };\n } else {\n uri = '/v1/devices';\n }\n\n return this.get({ uri, auth, headers, query, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getDevice({ deviceId, product, auth, headers, context }){\n const uri = this.deviceUri({ deviceId, product });\n return this.get({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {boolean} options.requestTransfer True to request the device be transfered from another 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 claimDevice({ deviceId, requestTransfer, auth, headers, context }){\n return this.post({\n uri: '/v1/devices',\n auth,\n headers,\n data: {\n id: deviceId,\n request_transfer: !!requestTransfer\n },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 addDeviceToProduct({ deviceId, product, file, auth, headers, context }){\n let files, data;\n\n if (file){\n files = { file };\n } else if (deviceId){\n data = { id: deviceId };\n }\n\n return this.request({\n uri: `/v1/products/${product}/devices`,\n method: 'post',\n headers,\n data,\n files,\n auth,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeDevice({ deviceId, deny, product, auth, headers, context }){\n const uri = this.deviceUri({ deviceId, product });\n const data = product ? { deny } : undefined;\n return this.delete({ uri, data, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeDeviceOwner({ deviceId, product, auth, headers, context }){\n const uri = `/v1/products/${product}/devices/${deviceId}/owner`;\n return this.delete({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 renameDevice({ deviceId, name, product, auth, headers, context }){\n return this.updateDevice({ deviceId, name, product, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 signalDevice({ deviceId, signal, product, auth, headers, context }){\n return this.updateDevice({ deviceId, signal, product, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 setDeviceNotes({ deviceId, notes, product, auth, headers, context }){\n return this.updateDevice({ deviceId, notes, product, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 markAsDevelopmentDevice({ deviceId, development = true, product, auth, headers, context }){\n return this.updateDevice({ deviceId, development, product, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 lockDeviceProductFirmware({ deviceId, desiredFirmwareVersion, flash, product, auth, headers, context }){\n return this.updateDevice({ deviceId, desiredFirmwareVersion, flash, product, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 unlockDeviceProductFirmware({ deviceId, product, auth, headers, context }){\n return this.updateDevice({ deviceId, desiredFirmwareVersion: null, product, auth, headers, context });\n }\n\n /**\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 | null} [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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 updateDevice({ deviceId, name, signal, notes, development, desiredFirmwareVersion, flash, product, auth, headers, context }){\n let signalValue;\n if (signal !== undefined){\n signalValue = signal ? '1' : '0';\n }\n\n const uri = this.deviceUri({ deviceId, product });\n const data = product ?\n { name, signal: signalValue, notes, development, desired_firmware_version: desiredFirmwareVersion, flash } :\n { name, signal: signalValue, notes };\n\n return this.put({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 provisionDevice({ productId, auth, headers, context }){\n return this.post({\n uri: '/v1/devices',\n auth,\n headers,\n data: { product_id: productId },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getClaimCode({ iccid, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/device_claims` : '/v1/device_claims';\n return this.post({ uri, auth, headers, data: { iccid }, context });\n }\n\n validatePromoCode({ promoCode, auth, headers, context }){\n return this.get({\n uri: `/v1/promo_code/${promoCode}`,\n auth,\n headers,\n context\n });\n }\n\n changeProduct({ deviceId, productId, auth, headers, context }){\n return this.put({\n uri: `/v1/devices/${deviceId}`,\n auth,\n headers,\n data: { product_id: productId },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getVariable({ deviceId, name, product, auth, headers, context }){\n const uri = product ?\n `/v1/products/${product}/devices/${deviceId}/${name}` :\n `/v1/devices/${deviceId}/${name}`;\n\n return this.get({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 flashDevice({ deviceId, product, files, targetVersion, auth, headers, context }){\n const uri = this.deviceUri({ deviceId, product });\n const form = {};\n\n if (targetVersion){\n form.build_target_version = targetVersion;\n } else {\n form.latest = 'true';\n }\n\n return this.request({ uri, method: 'put', auth, headers, files, form, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 flashTinker({ deviceId, auth, headers, context }){\n /* eslint-disable no-console */\n /* @ts-ignore */\n if (console && console.warning){\n // @ts-ignore\n console.warning('Particle.flashTinker is deprecated');\n }\n /* eslint-enable no-console */\n return this.put({\n uri: `/v1/devices/${deviceId}`,\n headers,\n data: { app: 'tinker' },\n auth,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 compileCode({ files, platformId, targetVersion, auth, headers, context }){\n const form = { platform_id: platformId };\n\n if (targetVersion){\n form.build_target_version = targetVersion;\n } else {\n form.latest = 'true';\n }\n\n return this.request({\n uri: '/v1/binaries',\n method: 'post',\n auth,\n headers,\n files,\n form,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 downloadFirmwareBinary({ binaryId, auth, headers, context }){\n return this.request({\n uri: `/v1/binaries/${binaryId}`,\n method: 'get',\n auth,\n headers,\n context,\n isBuffer: true\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 sendPublicKey({ deviceId, key, algorithm, auth, headers, context }){\n return this.post({\n uri: `/v1/provisioning/${deviceId}`,\n auth,\n headers,\n data: {\n deviceID: deviceId,\n publicKey: ( typeof key === 'string' ? key : key.toString() ),\n filename: 'particle-api',\n order: `manual_${ Date.now() }`,\n algorithm: algorithm || 'rsa'\n },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 callFunction({ deviceId, name, argument, product, auth, headers, context }){\n const uri = product ?\n `/v1/products/${product}/devices/${deviceId}/${name}` :\n `/v1/devices/${deviceId}/${name}`;\n return this.post({ uri, auth, headers, data: { args: argument }, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @returns {Promise} If the promise resolves, the resolution value will be an EventStream object that will\n * emit 'event' events.\n */\n getEventStream({ deviceId, name, org, product, auth }){\n let uri = '/v1/';\n if (org){\n uri += `orgs/${org}/`;\n }\n\n if (product){\n uri += `products/${product}/`;\n }\n\n if (deviceId){\n uri += 'devices/';\n if (!(deviceId.toLowerCase() === 'mine')){\n uri += `${deviceId}/`;\n }\n }\n\n uri += 'events';\n\n if (name){\n uri += `/${encodeURIComponent(name)}`;\n }\n\n auth = this._getActiveAuthToken(auth);\n return new EventStream(`${this.baseUrl}${uri}`, auth).connect();\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 publishEvent({ name, data, isPrivate, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/events` : '/v1/devices/events';\n const postData = { name, data, private: isPrivate };\n return this.post({ uri, auth, headers, data: postData, context });\n }\n\n /**\n * @typedef {Object} Hook\n * @property {String} [method=POST] Type of web request triggered by the Webhook (GET, POST, PUT, or DELETE)\n * @property {Object} [auth] Auth data like `{ username: 'me', password: '1234' }` to send via basic auth header with the Webhook request\n * @property {Object} [headers] Additional headers to add to the Webhook like `{ 'X-ONE': '1', X-TWO: '2' }`\n * @property {Object} [query] Query params to add to the Webhook request like `{ foo: 'foo', bar: 'bar' }`\n * @property {Object} [json] JSON data to send with the Webhook request - sets `Content-Type` to `application/json`\n * @property {Object} [form] Form data to send with the Webhook request - sets `Content-Type` to `application/x-www-form-urlencoded`\n * @property {String} [body] Custom body to send with the Webhook request\n * @property {Object} [responseTemplate] Template to use to customize the Webhook response body\n * @property {Object} [responseEvent] The Webhook response event name that your devices can subscribe to\n * @property {Object} [errorResponseEvent] The Webhook error response event name that your devices can subscribe to\n */\n\n /**\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 {Hook} [options.hook] Webhook configuration settings\n * @param {String} [options.product] Webhook for this product ID or slug\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 createWebhook({ event, url, device, rejectUnauthorized, noDefaults, hook, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/webhooks` : '/v1/webhooks';\n const data = { event, url, deviceId: device, rejectUnauthorized, noDefaults };\n\n if (hook){\n data.requestType = hook.method;\n data.auth = hook.auth;\n data.headers = hook.headers;\n data.query = hook.query;\n data.json = hook.json;\n data.form = hook.form;\n data.body = hook.body;\n data.responseTemplate = hook.responseTemplate;\n data.responseTopic = hook.responseEvent;\n data.errorResponseTopic = hook.errorResponseEvent;\n }\n\n if (!data.requestType){\n data.requestType = 'POST';\n }\n\n return this.post({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteWebhook({ hookId, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/webhooks/${hookId}` : `/v1/webhooks/${hookId}`;\n return this.delete({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listWebhooks({ product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/webhooks` : '/v1/webhooks';\n return this.get({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 createIntegration({ event, settings, deviceId, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/integrations` : '/v1/integrations';\n const data = Object.assign({ event, deviceid: deviceId }, settings);\n return this.post({ uri, data, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 editIntegration({ integrationId, event, settings, deviceId, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/integrations/${integrationId}` : `/v1/integrations/${integrationId}`;\n const data = Object.assign({ event, deviceid: deviceId }, settings);\n return this.put({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteIntegration({ integrationId, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/integrations/${integrationId}` : `/v1/integrations/${integrationId}`;\n return this.delete({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listIntegrations({ product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/integrations` : '/v1/integrations';\n return this.get({ uri, auth, headers, context });\n }\n\n /**\n * Get details about the current user\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getUserInfo({ auth, headers, context }){\n return this.get({ uri: '/v1/user', auth, headers, context });\n }\n\n /**\n * Set details on the current user\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 setUserInfo({ accountInfo, auth, headers, context }){\n const data = { account_info: accountInfo };\n return this.put({ uri: '/v1/user', auth, headers, data, context });\n }\n\n /**\n * Change username (i.e, email)\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 changeUsername({ currentPassword, username, invalidateTokens = false, auth, headers, context }){\n const data = { username, current_password: currentPassword };\n\n if (invalidateTokens) {\n data.invalidate_tokens = true;\n }\n\n return this.put({ uri: '/v1/user', auth, headers, data, context });\n }\n\n /**\n * Change user's password\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 changeUserPassword({ currentPassword, password, invalidateTokens = false, auth, headers, context }){\n const data = { password, current_password: currentPassword };\n\n if (invalidateTokens) {\n data.invalidate_tokens = true;\n }\n\n return this.put({ uri: '/v1/user', auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listSIMs({ iccid, deviceId, deviceName, page, perPage, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/sims` : '/v1/sims';\n const query = product ? { iccid, deviceId, deviceName, page, per_page: perPage } : undefined;\n return this.get({ uri, auth, headers, query, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getSIMDataUsage({ iccid, product, auth, headers, context }){\n const uri = product ?\n `/v1/products/${product}/sims/${iccid}/data_usage` :\n `/v1/sims/${iccid}/data_usage`;\n\n return this.get({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getFleetDataUsage({ product, auth, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/sims/data_usage`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 checkSIM({ iccid, auth, headers, context }){\n return this.head({ uri: `/v1/sims/${iccid}`, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 {any} [options.promoCode]\n * @returns {Promise} A promise\n */\n activateSIM({ iccid, iccids, country, promoCode, product, auth, headers, context }){\n // promoCode is deprecated\n iccids = iccids || [iccid];\n const uri = product ? `/v1/products/${product}/sims` : `/v1/sims/${iccid}`;\n const data = product ?\n { sims: iccids, country } :\n { country, promoCode, action: 'activate' };\n const method = product ? 'post' : 'put';\n\n return this.request({ uri, method, headers, data, auth, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deactivateSIM({ iccid, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/sims/${iccid}` : `/v1/sims/${iccid}`;\n const data = { action: 'deactivate' };\n return this.put({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 reactivateSIM({ iccid, mbLimit, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/sims/${iccid}` : `/v1/sims/${iccid}`;\n const data = { mb_limit: mbLimit, action: 'reactivate' };\n return this.put({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 updateSIM({ iccid, mbLimit, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/sims/${iccid}` : `/v1/sims/${iccid}`;\n const data = { mb_limit: mbLimit };\n return this.put({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeSIM({ iccid, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/sims/${iccid}` : `/v1/sims/${iccid}`;\n return this.delete({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listBuildTargets({ onlyFeatured, auth, headers, context }){\n const query = onlyFeatured ? { featured: !!onlyFeatured } : undefined;\n return this.get({ uri: '/v1/build_targets', auth, headers, query, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listLibraries({ page, limit, filter, sort, architectures, category, scope, excludeScopes, auth, headers, context }){\n return this.get({\n uri: '/v1/libraries',\n auth,\n headers,\n query: {\n page,\n filter,\n limit,\n sort,\n architectures: this._asList(architectures),\n category,\n scope,\n excludeScopes: this._asList(excludeScopes)\n },\n context\n });\n }\n\n _asList(value){\n return (Array.isArray(value) ? value.join(',') : value);\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getLibrary({ name, version, auth, headers, context }){\n return this.get({\n uri: `/v1/libraries/${name}`,\n auth,\n headers,\n query: { version },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getLibraryVersions({ name, page, limit, auth, headers, context }){\n return this.get({\n uri: `/v1/libraries/${name}/versions`,\n auth,\n headers,\n query: { page, limit },\n context\n });\n }\n\n /**\n * Contribute a new library version from a compressed archive\n * @param {Object} options Options for this API call\n * @param {String | Buffer} 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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 contributeLibrary({ archive, auth, headers, context }){\n const files = {\n 'archive.tar.gz': archive\n };\n\n return this.request({\n uri: '/v1/libraries',\n method: 'post',\n auth,\n headers,\n files,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 publishLibrary({ name, auth, headers, context }){\n return this.request({\n uri: `/v1/libraries/${name}`,\n method: 'patch',\n auth,\n headers,\n data: { visibility: 'public' },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteLibrary({ name, force, auth, headers, context }){\n return this.delete({\n uri: `/v1/libraries/${name}`,\n auth,\n headers,\n data: { force },\n context\n });\n }\n\n /**\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 downloadFile({ uri, headers, context }){\n return this.request({ uri, method: 'get', headers, context, isBuffer: true });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listOAuthClients({ product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/clients` : '/v1/clients';\n return this.get({ uri, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 createOAuthClient({ name, type, redirect_uri, scope, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/clients` : '/v1/clients';\n const data = { name, type, redirect_uri, scope };\n return this.post({ uri, auth, headers, data, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 updateOAuthClient({ clientId, name, scope, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/clients/${clientId}` : `/v1/clients/${clientId}`;\n const data = { name, scope };\n return this.put({ uri, data, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 deleteOAuthClient({ clientId, product, auth, headers, context }){\n const uri = product ? `/v1/products/${product}/clients/${clientId}` : `/v1/clients/${clientId}`;\n return this.delete({ uri, auth, headers, context });\n }\n\n /**\n * List products the account has access to\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listProducts({ auth, headers, context }){\n return this.get({ uri: '/v1/products', auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProduct({ product, auth, headers, context }){\n return this.get({ uri: `/v1/products/${product}`, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listProductFirmware({ product, auth, headers, context }){\n return this.get({ uri: `/v1/products/${product}/firmware`, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 uploadProductFirmware({ file, version, title, description, product, auth, headers, context }){\n return this.request({\n uri: `/v1/products/${product}/firmware`,\n method: 'post',\n auth,\n headers,\n form: {\n version,\n title,\n description\n },\n files: {\n 'firmware.bin': file\n },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductFirmware({ version, product, auth, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/firmware/${version}`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 updateProductFirmware({ version, title, description, product, auth, headers, context }){\n const uri = `/v1/products/${product}/firmware/${version}`;\n return this.put({ uri, auth, headers, data: { title, description }, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 that resolves with either the requested data or an error object\n */\n downloadProductFirmware({ version, product, auth, headers, context }){\n return this.request({\n uri: `/v1/products/${product}/firmware/${version}/binary`,\n method: 'get',\n auth,\n headers,\n context,\n isBuffer: true\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 releaseProductFirmware({ version, product, auth, headers, context }){\n const uri = `/v1/products/${product}/firmware/release`;\n return this.put({ uri, auth, headers, data: { version }, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listTeamMembers({ product, auth, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/team`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 inviteTeamMember({ username, product, auth, headers, context }){\n return this.post({\n uri: `/v1/products/${product}/team`,\n auth,\n headers,\n data: { username },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeTeamMember({ username, product, auth, headers, context }){\n return this.delete({\n uri: `/v1/products/${product}/team/${username}`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 lookupSerialNumber({ serialNumber, auth, headers, context }){\n return this.get({\n uri: `/v1/serial_numbers/${serialNumber}`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 createMeshNetwork({ name, deviceId, iccid, auth, headers, context }){\n return this.post({\n uri: '/v1/networks',\n auth,\n headers,\n data: { name, device_id: deviceId, iccid },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeMeshNetwork({ networkId, auth, headers, context }){\n return this.delete({ uri: `/v1/networks/${networkId}`, auth, headers, context });\n }\n\n /**\n * List all mesh networks\n * @param {Object} options Options for this API call\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listMeshNetworks({ page, perPage, auth, headers, context }){\n const query = page ? { page, per_page: perPage } : undefined;\n return this.get({ uri: '/v1/networks', auth, headers, query, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getMeshNetwork({ networkId, auth, headers, context }){\n return this.get({ uri: `/v1/networks/${networkId}`, auth, headers, context });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 updateMeshNetwork({ networkId, action, deviceId, auth, headers, context }){\n return this.put({\n uri: `/v1/networks/${networkId}`,\n auth,\n headers,\n data: { action, device_id: deviceId },\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 addMeshNetworkDevice({ networkId, deviceId, auth, headers, context }){\n return this.updateMeshNetwork({\n action: 'add-device',\n networkId,\n deviceId,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 removeMeshNetworkDevice({ networkId, deviceId, auth, headers, context }){\n if (!networkId){\n return this.delete({\n uri: `/v1/devices/${deviceId}/network`,\n auth,\n headers, context\n });\n }\n return this.updateMeshNetwork({\n action: 'remove-device',\n networkId,\n deviceId,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 listMeshNetworkDevices({ networkId, role, page, perPage, auth, headers, context }){\n const query = (role || page) ? { role, page, per_page: perPage } : undefined;\n return this.get({\n uri: `/v1/networks/${networkId}/devices`,\n auth,\n headers,\n query,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductConfiguration({ auth, product, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/config`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductConfigurationSchema({ auth, product, headers = {}, context }){\n headers.accept = 'application/schema+json';\n return this.get({\n uri: `/v1/products/${product}/config`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductDeviceConfiguration({ auth, product, deviceId, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/config/${deviceId}`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductDeviceConfigurationSchema({ auth, product, deviceId, headers, context }){\n headers.accept = 'application/schema+json';\n return this.get({\n uri: `/v1/products/${product}/config/${deviceId}`,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {Object} options.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 setProductConfiguration({ auth, product, config, headers, context }){\n return this.put({\n uri: `/v1/products/${product}/config`,\n auth,\n data: config,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {Object} options.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 setProductDeviceConfiguration({ auth, product, deviceId, config, headers, context }){\n return this.put({\n uri: `/v1/products/${product}/config/${deviceId}`,\n data: config,\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductLocations({ auth, product, dateRange, rectBl, rectTr, deviceId, deviceName, groups, page, perPage, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/locations`,\n query: {\n date_range: dateRange,\n rect_bl: rectBl,\n rect_tr: rectTr,\n device_id: deviceId,\n device_name: deviceName,\n groups,\n page,\n per_page: perPage\n },\n auth,\n headers,\n context\n });\n }\n\n /**\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 {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\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 getProductDeviceLocations({ auth, product, dateRange, rectBl, rectTr, deviceId, headers, context }){\n return this.get({\n uri: `/v1/products/${product}/locations/${deviceId}`,\n query: {\n date_range: dateRange,\n rect_bl: rectBl,\n rect_tr: rectTr\n },\n auth,\n headers,\n context\n });\n }\n\n /**\n * Executes the provided logic function once and returns the result. No logs, runs, etc are saved\n *\n * NOTE: Any external interactions such as Particle.publish will actually occur when the logic is executed.\n *\n * @param {Object} options The options for creating the logic function.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {Object} options.logic The logic \"function\" which will be executed once\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} A promise that resolves to the created logic function data.\n */\n executeLogic({ auth, org, logic, headers, context }) {\n return this.post({\n uri: this._namespacedPath(org, 'logic/execute'),\n auth,\n data: logic,\n headers,\n context\n });\n }\n\n /**\n * Creates a new logic function in the specified organization or sandbox using the provided function data.\n *\n * When you create a logic function with Event logic triggers, events will immediately\n * start being handled by the function code.\n *\n * When you create a Scheduled logic trigger, 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 function.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.logicFunction The logic function object containing the function 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} A promise that resolves to the created logic function data.\n */\n createLogicFunction({ auth, org, logicFunction, headers, context }) {\n return this.post({\n uri: this._namespacedPath(org, 'logic/functions'),\n auth,\n data: { logic_function: logicFunction },\n headers,\n context\n });\n }\n\n /**\n * Get a logic function in the specified organization or sandbox by logic function ID.\n *\n * @param {Object} options The options for the logic function.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.logicFunctionId The ID of the logic function 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} A promise that resolves to the specified logic function data.\n */\n getLogicFunction({ auth, org, logicFunctionId, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Updates an existing logic function in the specified organization or sandbox using the provided function data.\n *\n * If you include an id on a logic trigger, it will update the logic trigger in place.\n *\n * @param {Object} options The options for updating the logic function.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.logicFunctionId The ID of the logic function to update.\n * @param {string} options.logicFunction The logic function object containing the logic function 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} A promise that resolves to the updated logic function data.\n */\n updateLogicFunction({ auth, org, logicFunctionId, logicFunction, headers, context }) {\n return this.put({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}`),\n auth,\n data: { logic_function: logicFunction },\n headers,\n context\n });\n }\n\n /**\n * Deletes a logic function in the specified organization or sandbox by logic function ID.\n *\n * @param {Object} options The options for deleting the logic function.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.logicFunctionId The ID of the logic function 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} A promise that resolves to an object containing the deleted logic function ID.\n */\n deleteLogicFunction({ auth, org, logicFunctionId, headers, context }) {\n return this.delete({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Lists all logic functions in the specified organization or sandbox.\n *\n * @param {Object} options The options for listing logic functions.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {boolean} [options.todayStats] Whether to include today's stats in the response\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} A promise that resolves to an array of logic functions data.\n */\n listLogicFunctions({ auth, org, todayStats, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, 'logic/functions'),\n query: {\n today_stats: todayStats\n },\n auth,\n headers,\n context\n });\n }\n\n /**\n * Lists all logic runs for the specified logic function in the specified organization or sandbox.\n *\n * @param {Object} options The options for the request.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {number} options.logicFunctionId The ID of the logic function for which to retrieve the logic 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} A promise that resolves to an array of logic run data.\n */\n listLogicRuns({ auth, org, logicFunctionId, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}/runs`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Retrieves a logic run by its ID for the specified logic function in the specified organization or sandbox.\n *\n * @param {Object} options The options for the request.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {number} options.logicFunctionId The ID of the logic function for which to retrieve the logic run.\n * @param {number} options.logicRunId The ID of the logic 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} A promise that resolves to an array of logic run data for the specified logic run ID.\n */\n getLogicRun({ auth, org, logicFunctionId, logicRunId, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}/runs/${logicRunId}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Retrieves the logs for a logic run by its ID for the specified logic function in the specified organization or sandbox.\n *\n * @param {Object} options The options for the request.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The unique identifier of the organization.\n * @param {number} options.logicFunctionId The ID of the logic function for which to retrieve the logic run logs.\n * @param {number} options.logicRunId The ID of the logic 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} A promise that resolves to the logs for the specified logic run ID.\n */\n getLogicRunLogs({ auth, org, logicFunctionId, logicRunId, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `logic/functions/${logicFunctionId}/runs/${logicRunId}/logs`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Creates a new ledger definition in the specified organization or sandbox.\n *\n * @param {Object} options The options for creating the ledger definition.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {object} options.ledger The ledger definition object.\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} A promise that resolves to the created ledger definition data.\n */\n createLedger({ auth, org, ledger, headers, context }) {\n return this.post({\n uri: this._namespacedPath(org, 'ledgers'),\n auth,\n data: { ledger },\n headers,\n context\n });\n }\n\n /**\n * Get a ledger definition in the specified organization or sandbox by ledger name.\n *\n * @param {Object} options The options for the ledger definition.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName The ID of the ledger definition 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} A promise that resolves to the specified ledger definition data.\n */\n getLedger({ auth, org, ledgerName, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Updates an existing ledger definition in the specified organization or sandbox.\n *\n * @param {Object} options The options for updating the ledger definition.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Name of the ledger definition to update.\n * @param {object} options.ledger The ledger definition object.\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} A promise that resolves to the updated ledger definition data.\n */\n updateLedger({ auth, org, ledgerName, ledger, headers, context }) {\n return this.put({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}`),\n auth,\n data: { ledger },\n headers,\n context\n });\n }\n\n /**\n * Archives a ledger definition in the specified organization or sandbox by ledger name.\n *\n * @param {Object} options The options for archiving the ledger definition.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Name of the ledger definition to archive.\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} A promise that resolves to an object confirming the ledger definition was archived.\n */\n archiveLedger({ auth, org, ledgerName, headers, context }) {\n return this.delete({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * @typedef {\"Owner\" | \"Product\" | \"Device\"} Scope\n */\n\n /**\n * Lists all ledger definitions in the specified organization or sandbox.\n *\n * @param {Object} options The options for listing ledger definitions.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {Scope} [options.scope] Filter to show only ledgers of the specified scope\n * @param {boolean} [options.archived] Filter to show only archived ledger or non-archived ledgers. If not provided, all ledgers are returned.\n * @param {number} [options.page] Page of results to display\n * @param {number} [options.perPage] Number of results per page. Default is 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 *\n * @returns {Promise} A promise that resolves to an array of ledger definition data.\n */\n listLedgers({ auth, org, scope, page, perPage, archived, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, 'ledgers'),\n query: {\n scope,\n page,\n per_page: perPage,\n archived\n },\n auth,\n headers,\n context\n });\n }\n\n /**\n * Get ledger instance data.\n *\n * @param {Object} options The options for the ledger instance.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Ledger name.\n * @param {string} options.scopeValue Scope value.\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} A promise that resolves to the specified ledger instance data.\n */\n getLedgerInstance({ auth, org, ledgerName, scopeValue, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances/${scopeValue}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Set ledger instance data.\n *\n * @param {Object} options The options for updating the ledger instance.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Ledger name.\n * @param {string} options.scopeValue Scope value.\n * @param {object} options.data The data to set to the instance\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} A promise that resolves to the updated ledger instance data.\n */\n setLedgerInstance({ auth, org, ledgerName, scopeValue, data, headers, context }) {\n return this.put({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances/${scopeValue}`),\n auth,\n data: { data },\n headers,\n context\n });\n }\n\n /**\n * Delete a ledger instance in the specified organization or sandbox by ledger name.\n *\n * @param {Object} options The options for archiving the ledger instance.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Name of the ledger instance to archive.\n * @param {string} options.scopeValue Scope value.\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} A promise that resolves to an object confirming the ledger instance was deleted.\n */\n deleteLedgerInstance({ auth, org, ledgerName, scopeValue, headers, context }) {\n return this.delete({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances/${scopeValue}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Lists ledger instances in the specified organization or sandbox.\n *\n * @param {Object} options The options for listing ledger instances.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The unique identifier of the organization.\n * @param {string} options.ledgerName Name of the ledger instance to archive.\n * @param {number} [options.page] Page of results to display\n * @param {number} [options.perPage] Number of results per page. Default is 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 *\n * @returns {Promise} A promise that resolves to an array of ledger instance data.\n */\n listLedgerInstances({ auth, org, ledgerName, page, perPage, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances`),\n query: {\n page,\n per_page: perPage\n },\n auth,\n headers,\n context\n });\n }\n\n /**\n * List ledger instance versions\n *\n * @param {Object} options The options for the ledger instance.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Ledger name.\n * @param {string} options.scopeValue Scope value.\n * @param {string} [options.replacedBefore] ISO date string to filter to instances replaced before this time\n * @param {string} [options.replacedAfter] ISO date string to filter to instances replaced after this time\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} A promise that resolves to an array of ledger instance data.\n */\n listLedgerInstanceVersions({ auth, org, ledgerName, scopeValue, replacedBefore, replacedAfter, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances/${scopeValue}/versions`),\n query: {\n replaced_before: replacedBefore,\n replaced_after: replacedAfter\n },\n auth,\n headers,\n context\n });\n }\n\n /**\n * Get specific ledger instance version\n *\n * @param {Object} options The options for the ledger instance.\n * @param {Auth} [options.auth] The access token or basic auth object. Can be ignored if provided in constructor\n * @param {string} [options.org] The Organization ID or slug. If not provided, the request will go to your sandbox account.\n * @param {string} options.ledgerName Ledger name.\n * @param {string} options.scopeValue Scope value.\n * @param {string} options.version Version of the ledger instance\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} A promise that resolves to the specified ledger instance data.\n */\n getLedgerInstanceVersion({ auth, org, ledgerName, scopeValue, version, headers, context }) {\n return this.get({\n uri: this._namespacedPath(org, `ledgers/${ledgerName}/instances/${scopeValue}/versions/${version}`),\n auth,\n headers,\n context\n });\n }\n\n /**\n * Set default auth token that will be used in each method if `auth` is not provided\n * @param {Auth} auth The access token or basic auth object\n * @throws {Error} When not auth string is provided\n */\n setDefaultAuth(auth){\n if (typeof auth === 'string' && auth.length !== 0) {\n this._defaultAuth = auth;\n } else if (typeof auth === 'object' && 'username' in auth && 'password' in auth) {\n this._defaultAuth = auth;\n } else {\n throw new Error('Must pass a non-empty string or object with username and password for basic auth!');\n }\n }\n /**\n * Return provided token if truthy else use default auth if truthy else undefined\n * @param {any} auth Optional auth token or undefined\n * @private\n * @returns {String|undefined} a Particle auth token or undefined\n */\n _getActiveAuthToken(auth) {\n return auth || this._defaultAuth;\n }\n /**\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 deviceUri({ deviceId, product }){\n return product ? `/v1/products/${product}/devices/${deviceId}` : `/v1/devices/${deviceId}`;\n }\n\n /**\n * Helper for building API paths that support sandbox and org prefixes based on org presence\n * @param {string | undefined} org slug or ID\n * @param {string} path will be appended to the end of the org/sandbox prefix\n * @returns {string} the full combined path\n * @private\n */\n _namespacedPath(org, path) {\n return org ? `/v1/orgs/${org}/${path}` : `/v1/${path}`;\n }\n\n /**\n * Make a GET request\n * @param {object} params\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.query] Key/Value pairs of query params or a correctly formatted string\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n get({ uri, auth, headers, query, context }){\n context = this._buildContext(context);\n auth = this._getActiveAuthToken(auth);\n return this.agent.get({ uri, auth, headers, query, context });\n }\n\n /**\n * Make a HEAD request\n * @param {object} params\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [params.query] Key/Value pairs of query params or a correctly formatted string\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n head({ uri, auth, headers, query, context }){\n context = this._buildContext(context);\n auth = this._getActiveAuthToken(auth);\n return this.agent.head({ uri, auth, headers, query, context });\n }\n\n /**\n * Make a POST request\n * @param {object} params\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {string | object} [params.data] Key/Value pairs of query params or a correctly formatted string\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n post({ uri, auth, headers, data, context }){\n context = this._buildContext(context);\n auth = this._getActiveAuthToken(auth);\n return this.agent.post({ uri, auth, headers, data, context });\n }\n\n /**\n * Make a PUT request\n * @param {object} params\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {string | object} [params.data] Key/Value pairs of query params or a correctly formatted string\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n put({ uri, auth, headers, data, context }){\n context = this._buildContext(context);\n auth = this._getActiveAuthToken(auth);\n return this.agent.put({ uri, auth, headers, data, context });\n }\n\n /**\n * Make a DELETE request\n * @param {object} params\n * @param {string} params.uri The URI to request\n * @param {Auth} [params.auth] Authorization token to use\n * @param {object} [params.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {string | object} [params.data] Key/Value pairs of query params or a correctly formatted string\n * @param {object} [params.context] The invocation context, describing the tool and project\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n delete({ uri, auth, headers, data, context }){\n context = this._buildContext(context);\n auth = this._getActiveAuthToken(auth);\n return this.agent.delete({ uri, auth, headers, data, context });\n }\n\n /**\n *\n * @param {Object} args An obj with all the possible request configurations\n * @param {String} args.uri The URI to request\n * @param {String} args.method The method used to request the URI, should be in uppercase.\n * @param {Object} [args.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.\n * @param {object} [args.data] Arbitrary data to send as the body.\n * @param {Auth} [args.auth] Authorization\n * @param {Object} [args.query] Query parameters\n * @param {Object} [args.form] Form fields\n * @param {Object} [args.files] Array of file names and file content\n * @param {Object} [args.context] The invocation context, describing the tool and project.\n * @param {boolean} [args.isBuffer] Indicate if the response should be treated as Buffer instead of JSON\n * @returns {Promise} A promise that resolves with either the requested data or an error object\n */\n request(args){\n args.context = this._buildContext(args.context);\n args.auth = this._getActiveAuthToken(args.auth);\n return this.agent.request(args);\n }\n\n client(options = {}){\n // @ts-ignore\n return new Client(Object.assign({ api: this }, options));\n }\n\n // Internal method used to target Particle's APIs other than the default\n setBaseUrl(baseUrl){\n this.baseUrl = baseUrl;\n this.agent.setBaseUrl(baseUrl);\n }\n}\n\n// Aliases for backwards compatibility\nParticle.prototype.removeAccessToken = Particle.prototype.deleteAccessToken;\n\nmodule.exports = Particle;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(7845);\n"],"names":["exports","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","i","arr","Arr","_byteLength","curByte","len","revLookup","charCodeAt","fromByteArray","uint8","length","extraBytes","parts","maxChunkLength","len2","push","encodeChunk","lookup","join","Uint8Array","Array","code","Error","indexOf","start","end","num","output","base64","ieee754","customInspectSymbol","Symbol","Buffer","SlowBuffer","alloc","INSPECT_MAX_BYTES","K_MAX_LENGTH","createBuffer","RangeError","buf","Object","setPrototypeOf","prototype","arg","encodingOrOffset","TypeError","allocUnsafe","from","value","string","encoding","isEncoding","actual","write","slice","fromString","ArrayBuffer","isView","arrayView","isInstance","copy","fromArrayBuffer","buffer","byteOffset","fromArrayLike","fromArrayView","SharedArrayBuffer","valueOf","b","obj","isBuffer","checked","undefined","numberIsNaN","type","isArray","data","fromObject","toPrimitive","assertSize","size","array","toString","mustMatch","arguments","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","this","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","n","m","bidirectionalIndexOf","val","dir","arrayIndexOf","call","lastIndexOf","indexSize","arrLength","valLength","String","read","readUInt16BE","foundIndex","found","j","hexWrite","offset","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","str","byteArray","asciiToBytes","base64Write","ucs2Write","units","c","hi","lo","utf16leToBytes","Math","min","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","apply","decodeCodePointsArray","kMaxLength","TYPED_ARRAY_SUPPORT","proto","foo","e","typedArraySupport","console","error","defineProperty","enumerable","get","poolSize","fill","allocUnsafeSlow","_isBuffer","compare","a","x","y","concat","list","pos","set","swap16","swap32","swap64","toLocaleString","equals","inspect","max","replace","trim","target","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","_arr","ret","out","hexSliceLookupTable","bytes","checkOffset","ext","checkInt","wrtBigUInt64LE","checkIntBI","BigInt","wrtBigUInt64BE","checkIEEE754","writeFloat","littleEndian","noAssert","writeDouble","newBuf","subarray","readUintLE","readUIntLE","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","defineBigIntMethod","validateNumber","first","last","boundsError","readBigUInt64BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUintLE","writeUIntLE","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeUInt32BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeBigInt64LE","writeBigInt64BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","errors","E","sym","getMessage","Base","constructor","super","writable","configurable","name","stack","message","addNumericalSeparator","range","ERR_OUT_OF_RANGE","checkBounds","ERR_INVALID_ARG_TYPE","floor","ERR_BUFFER_OUT_OF_BOUNDS","input","msg","received","isInteger","abs","INVALID_BASE64_RE","Infinity","leadSurrogate","split","base64clean","src","dst","alphabet","table","i16","fn","BufferBigIntNotDefined","module","GetIntrinsic","callBind","$indexOf","allowMissing","intrinsic","bind","$apply","$call","$reflectApply","$gOPD","$defineProperty","$max","originalFunction","func","applyBind","ReflectOwnKeys","R","Reflect","ReflectApply","receiver","args","Function","ownKeys","getOwnPropertySymbols","getOwnPropertyNames","NumberIsNaN","isNaN","EventEmitter","init","once","emitter","Promise","resolve","reject","errorListener","err","removeListener","resolver","eventTargetAgnosticAddListener","handler","flags","on","addErrorHandlerIfEventEmitter","_events","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","listener","_getMaxListeners","that","_addListener","prepend","events","existing","warning","create","newListener","emit","unshift","warned","w","count","warn","onceWrapper","fired","wrapFn","_onceWrap","state","wrapped","_listeners","unwrap","evlistener","unwrapListeners","arrayClone","listenerCount","addEventListener","wrapListener","removeEventListener","getPrototypeOf","setMaxListeners","getMaxListeners","doError","er","context","listeners","addListener","prependListener","prependOnceListener","position","originalListener","shift","index","pop","spliceOne","off","removeAllListeners","key","keys","rawListeners","eventNames","self","FormData","window","toStr","bound","boundLength","boundArgs","result","Empty","implementation","$SyntaxError","SyntaxError","$Function","$TypeError","getEvalledConstructor","expressionSyntax","getOwnPropertyDescriptor","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","hasSymbols","hasProto","getProto","__proto__","needsEval","TypedArray","INTRINSICS","AggregateError","iterator","Atomics","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","JSON","Map","parseFloat","Proxy","ReferenceError","RegExp","Set","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","splice","$replace","$strSlice","$exec","exec","rePropName","reEscapeChar","getBaseIntrinsic","alias","intrinsicName","match","number","quote","subString","stringToPath","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","desc","test","$Object","origSymbol","hasSymbolSham","symObj","syms","propertyIsEnumerable","descriptor","hasOwnProperty","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","s","NaN","rt","log","LN2","globalObject","g","getGlobal","fetch","Headers","Request","Response","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","run","marker","runClearTimeout","Item","noop","nextTick","title","browser","env","argv","version","versions","binding","cwd","chdir","umask","root","nodeType","freeGlobal","global","punycode","maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexPunycode","regexNonASCII","regexSeparators","baseMinusTMin","stringFromCharCode","map","mapDomain","ucs2decode","extra","counter","ucs2encode","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","decode","basic","oldi","t","baseMinusT","inputLength","bias","encode","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","percentTwenties","Format","formatters","RFC1738","RFC3986","stringify","parse","formats","utils","has","defaults","allowDots","allowPrototypes","allowSparse","arrayLimit","charset","charsetSentinel","comma","decoder","depth","ignoreQueryPrefix","interpretNumericEntities","parameterLimit","parseArrays","plainObjects","strictNullHandling","$0","numberStr","parseArrayValue","options","parseKeys","givenKey","valuesParsed","child","segment","parent","chain","leaf","cleanRoot","charAt","parseObject","opts","isRegExp","normalizeParseOptions","tempObj","cleanStr","skipIndex","bracketEqualsPos","maybeMap","encodedVal","combine","parseValues","newObj","merge","compact","getSideChannel","arrayPrefixGenerators","brackets","prefix","indices","repeat","pushToArray","valueOrArray","toISO","toISOString","defaultFormat","addQueryPrefix","encoder","encodeValuesOnly","format","formatter","serializeDate","date","skipNulls","sentinel","object","generateArrayPrefix","commaRoundTrip","filter","sort","sideChannel","v","tmpSc","step","findFlag","objKeys","values","adjustedPrefix","keyPrefix","valueSideChannel","normalizeStringifyOptions","arrayFormat","joined","hexTable","toUpperCase","arrayToObject","source","assign","reduce","acc","o","prop","refs","item","compacted","compactQueue","strWithoutPlus","unescape","defaultEncoder","kind","escape","mapped","mergeTarget","forEach","targetItem","callBound","$WeakMap","$Map","$weakMapGet","$weakMapSet","$weakMapHas","$mapGet","$mapSet","$mapHas","listGetNode","curr","prev","next","$wm","$m","$o","channel","assert","objects","node","listGet","listHas","listSet","hasMap","mapSizeDescriptor","mapSize","mapForEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","objectToString","functionToString","$match","$slice","$toUpperCase","$toLowerCase","$test","$join","$arrSlice","$floor","bigIntValueOf","gOPS","symToString","hasShammedSymbols","toStringTag","isEnumerable","gPO","O","addNumericSeparator","sepRegex","int","intStr","dec","utilInspect","inspectCustom","custom","inspectSymbol","isSymbol","wrapQuotes","defaultStyle","quoteChar","quoteStyle","inspect_","seen","maxStringLength","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","baseIndent","getIndent","noIndent","newOpts","f","nameOf","arrObjKeys","symString","markBoxed","HTMLElement","nodeName","getAttribute","isElement","attrs","attributes","childNodes","xs","singleLineValues","indentedJoin","isError","cause","isMap","mapParts","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isNumber","isBigInt","isBoolean","isString","isDate","ys","isPlainObject","protoTag","stringTag","tag","l","trailer","lowbyte","entries","lineJoiner","isArr","symMap","ClientRequest","response","extend","statusCodes","url","http","request","cb","defaultProtocol","location","protocol","search","host","hostname","port","path","method","headers","req","IncomingMessage","Agent","defaultMaxSockets","globalAgent","STATUS_CODES","METHODS","xhr","getXHR","XMLHttpRequest","open","XDomainRequest","checkTypeSupport","responseType","isFunction","ReadableStream","writableStream","WritableStream","abortController","AbortController","arraybuffer","msstream","mozchunkedarraybuffer","overrideMimeType","capability","inherits","stream","rStates","readyStates","preferBinary","Writable","_opts","_body","_headers","auth","setHeader","useFetch","mode","_mode","decideMode","_fetchTimer","_socketTimeout","_socketTimer","_onFinish","lowerName","unsafeHeaders","getHeader","header","removeHeader","_destroyed","headersObj","body","Blob","headersList","keyName","signal","controller","_fetchAbortController","requestTimeout","abort","credentials","withCredentials","then","_fetchResponse","_resetTimers","_connect","reason","_xhr","ontimeout","setRequestHeader","_response","onreadystatechange","readyState","LOADING","DONE","_onXHRProgress","onprogress","onerror","send","status","statusValid","_write","chunk","done","destroy","flushHeaders","setNoDelay","setSocketKeepAlive","UNSENT","OPENED","HEADERS_RECEIVED","resetTimers","Readable","rawHeaders","trailers","rawTrailers","statusCode","statusMessage","statusText","_resumeFetch","close","pipeTo","catch","reader","getReader","_pos","responseURL","getAllResponseHeaders","matches","_charset","mimeType","charsetMatch","_read","responseText","newData","MSStreamReader","onload","readAsArrayBuffer","ctor","superCtor","super_","TempCtor","codes","createErrorType","NodeError","_Base","subClass","superClass","arg1","arg2","arg3","oneOf","expected","thing","determiner","this_len","substring","endsWith","objectKeys","Duplex","allowHalfOpen","readable","onend","_writableState","ended","onEndNT","highWaterMark","getBuffer","_readableState","destroyed","PassThrough","Transform","_transform","ReadableState","EElistenerCount","Stream","OurUint8Array","debug","debugUtil","debuglog","StringDecoder","createReadableStreamAsyncIterator","BufferList","destroyImpl","getHighWaterMark","_require$codes","ERR_STREAM_PUSH_AFTER_EOF","ERR_METHOD_NOT_IMPLEMENTED","ERR_STREAM_UNSHIFT_AFTER_END_EVENT","errorOrDestroy","kProxyEvents","isDuplex","objectMode","readableObjectMode","pipes","pipesCount","flowing","endEmitted","reading","sync","needReadable","emittedReadable","readableListening","resumeScheduled","paused","emitClose","autoDestroy","defaultEncoding","awaitDrain","readingMore","_destroy","readableAddChunk","addToFront","skipChunkCheck","emitReadable","emitReadable_","onEofChunk","chunkInvalid","_uint8ArrayToBuffer","addChunk","maybeReadMore","_undestroy","undestroy","isPaused","setEncoding","enc","p","head","content","clear","MAX_HWM","howMuchToRead","computeNewHighWaterMark","flow","maybeReadMore_","updateReadableListening","resume","nReadingNextTick","resume_","fromList","consume","endReadable","endReadableNT","wState","finished","nOrig","doRead","pipe","dest","pipeOpts","endFn","stdout","stderr","unpipe","onunpipe","unpipeInfo","hasUnpiped","onclose","onfinish","ondrain","ondata","cleanedUp","needDrain","pipeOnDrain","pause","event","dests","ev","wrap","_this","asyncIterator","_fromList","iterable","ERR_MULTIPLE_CALLBACK","ERR_TRANSFORM_ALREADY_TRANSFORMING","ERR_TRANSFORM_WITH_LENGTH_0","afterTransform","ts","_transformState","transforming","writecb","writechunk","rs","needTransform","writeencoding","transform","flush","_flush","prefinish","err2","CorkedRequest","entry","finish","corkReq","callback","pendingcb","corkedRequestsFree","onCorkedFinish","WritableState","internalUtil","deprecate","realHasInstance","ERR_STREAM_CANNOT_PIPE","ERR_STREAM_DESTROYED","ERR_STREAM_NULL_VALUES","ERR_STREAM_WRITE_AFTER_END","ERR_UNKNOWN_ENCODING","nop","writableObjectMode","finalCalled","ending","noDecode","decodeStrings","writing","corked","bufferProcessing","onwrite","writelen","onwriteStateUpdate","finishMaybe","errorEmitted","onwriteError","needFinish","bufferedRequest","clearBuffer","afterWrite","lastBufferedRequest","prefinished","bufferedRequestCount","writev","_writev","final","_final","doWrite","onwriteDrain","holder","allBuffers","isBuf","callFinal","need","rState","current","_","hasInstance","writeAfterEnd","validChunk","newChunk","decodeChunk","writeOrBuffer","cork","uncork","setDefaultEncoding","endWritable","_Object$setPrototypeO","_defineProperty","kLastResolve","kLastReject","kError","kEnded","kLastPromise","kHandlePromise","kStream","createIterResult","readAndResolve","iter","onReadable","AsyncIteratorPrototype","ReadableStreamAsyncIteratorPrototype","promise","lastPromise","wrapForNext","_this2","_Object$create","enumerableOnly","symbols","_defineProperties","props","instance","Constructor","_classCallCheck","tail","protoProps","staticProps","hasStrings","_getString","_getBuffer","nb","getOwnPropertyDescriptors","defineProperties","_objectSpread","emitErrorAndCloseNT","emitErrorNT","emitCloseNT","readableDestroyed","writableDestroyed","ERR_STREAM_PREMATURE_CLOSE","eos","called","_len","_key","onlegacyfinish","writableEnded","readableEnded","onrequest","isRequest","ERR_MISSING_ARGS","to","streams","popCallback","destroys","closed","destroyer","ERR_INVALID_OPT_VALUE","duplexKey","hwm","highWaterMarkFrom","pipeline","copyProps","SafeBuffer","nenc","retried","_normalizeEncoding","normalizeEncoding","text","utf16Text","utf16End","fillLast","utf8FillLast","base64Text","base64End","simpleWrite","simpleEnd","lastNeed","lastTotal","lastChar","utf8CheckByte","byte","r","utf8CheckExtraBytes","total","utf8CheckIncomplete","Url","slashes","hash","query","pathname","href","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","hostlessProtocol","slashedProtocol","https","ftp","gopher","file","querystring","urlParse","parseQueryString","slashesDenoteHost","u","queryIndex","splitter","uSplit","rest","simplePath","lowerProto","atSign","hostEnd","hec","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","toASCII","h","ae","esc","qm","relative","resolveObject","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","authInHost","hasTrailingSlash","up","isAbsolute","config","localStorage","trace","qs","fs","packageJson","baseUrl","setBaseUrl","uri","post","put","form","files","requestFiles","_sanitizeFiles","requestParams","_buildRequest","_promiseResponse","makerequest","resp","ok","blob","json","objError","arrayBuffer","isForBrowser","shortErrorDescription","errorDescription","error_description","actualUri","queryParams","hasParams","userAgentHeader","repository","contentTypeHeader","_getFromData","_getAuthorizationHeader","_getContextHeaders","formData","fileData","nodeFormData","_getNodeFormData","append","createReadStream","filepath","_getToolContext","tool","_getProjectContext","project","_toolIdent","components","component","_nameAtVersion","_buildSemicolonSeparatedProperties","primaryProperty","Authorization","encoded","btoa","username","password","Library","Particle","api","ready","libraries","listLibraries","payload","library","getLibrary","libraryVersions","getLibraryVersions","contributeLibrary","archive","_throwError","publishLibrary","deleteLibrary","force","errorMessages","downloadFile","compileCode","platformId","targetVersion","signalDevice","deviceId","listDevices","listBuildTargets","onlyFeatured","targets","platform","platforms","prerelease","prereleases","firmware_vendor","trackingIdentity","full","clientSecret","clientId","tokenDuration","token","reconnectInterval","idleTimeoutExpired","connect","origin","isSecure","connected","connectionTimeout","startIdleTimeout","emitSafe","param","stopIdleTimeout","reconnect","isOffline","navigator","onLine","idleTimeout","discardTrailingNewline","lineLength","fieldLength","parseEventStreamLine","eventName","field","valueLength","client","_assignAttributes","downloadUrl","links","download","Defaults","EventStream","Client","setDefaultAuth","agent","_isValidContext","setContext","_buildContext","login","grant_type","client_id","client_secret","expires_in","sendOtp","mfaToken","otp","mfa_token","enableMfa","confirmMfa","invalidateTokens","invalidate_tokens","disableMfa","currentPassword","current_password","createCustomer","email","product","loginAsClientOwner","createUser","accountInfo","account_info","verifyUser","resetPassword","deleteAccessToken","delete","access_token","deleteCurrentAccessToken","deleteActiveAccessTokens","deleteUser","listAccessTokens","tracking","deviceName","groups","sortAttr","sortDir","page","perPage","per_page","getDevice","deviceUri","claimDevice","requestTransfer","id","request_transfer","addDeviceToProduct","removeDevice","deny","removeDeviceOwner","renameDevice","updateDevice","setDeviceNotes","notes","markAsDevelopmentDevice","development","lockDeviceProductFirmware","desiredFirmwareVersion","flash","unlockDeviceProductFirmware","signalValue","desired_firmware_version","provisionDevice","productId","product_id","getClaimCode","iccid","validatePromoCode","promoCode","changeProduct","getVariable","flashDevice","build_target_version","latest","flashTinker","app","platform_id","downloadFirmwareBinary","binaryId","sendPublicKey","algorithm","deviceID","publicKey","filename","order","now","callFunction","argument","getEventStream","org","_getActiveAuthToken","publishEvent","isPrivate","postData","private","createWebhook","device","rejectUnauthorized","noDefaults","hook","requestType","responseTemplate","responseTopic","responseEvent","errorResponseTopic","errorResponseEvent","deleteWebhook","hookId","listWebhooks","createIntegration","settings","deviceid","editIntegration","integrationId","deleteIntegration","listIntegrations","getUserInfo","setUserInfo","changeUsername","changeUserPassword","listSIMs","getSIMDataUsage","getFleetDataUsage","checkSIM","activateSIM","iccids","country","sims","action","deactivateSIM","reactivateSIM","mbLimit","mb_limit","updateSIM","removeSIM","featured","architectures","category","scope","excludeScopes","_asList","visibility","listOAuthClients","createOAuthClient","redirect_uri","updateOAuthClient","deleteOAuthClient","listProducts","getProduct","listProductFirmware","uploadProductFirmware","description","getProductFirmware","updateProductFirmware","downloadProductFirmware","releaseProductFirmware","listTeamMembers","inviteTeamMember","removeTeamMember","lookupSerialNumber","serialNumber","createMeshNetwork","device_id","removeMeshNetwork","networkId","listMeshNetworks","getMeshNetwork","updateMeshNetwork","addMeshNetworkDevice","removeMeshNetworkDevice","listMeshNetworkDevices","role","getProductConfiguration","getProductConfigurationSchema","accept","getProductDeviceConfiguration","getProductDeviceConfigurationSchema","setProductConfiguration","setProductDeviceConfiguration","getProductLocations","dateRange","rectBl","rectTr","date_range","rect_bl","rect_tr","device_name","getProductDeviceLocations","executeLogic","logic","_namespacedPath","createLogicFunction","logicFunction","logic_function","getLogicFunction","logicFunctionId","updateLogicFunction","deleteLogicFunction","listLogicFunctions","todayStats","today_stats","listLogicRuns","getLogicRun","logicRunId","getLogicRunLogs","createLedger","ledger","getLedger","ledgerName","updateLedger","archiveLedger","listLedgers","archived","getLedgerInstance","scopeValue","setLedgerInstance","deleteLedgerInstance","listLedgerInstances","listLedgerInstanceVersions","replacedBefore","replacedAfter","replaced_before","replaced_after","getLedgerInstanceVersion","_defaultAuth","removeAccessToken","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","globalThis","nmd","paths","children","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/api.md b/docs/api.md index 7a3192a..4b68fe4 100644 --- a/docs/api.md +++ b/docs/api.md @@ -124,6 +124,8 @@ - [setLedgerInstance](#setledgerinstance) - [deleteLedgerInstance](#deleteledgerinstance) - [listLedgerInstances](#listledgerinstances) + - [listLedgerInstanceVersions](#listledgerinstanceversions) + - [getLedgerInstanceVersion](#getledgerinstanceversion) - [setDefaultAuth](#setdefaultauth) - [get](#get) - [head](#head) @@ -253,6 +255,8 @@ - [setLedgerInstance](#setledgerinstance-1) - [deleteLedgerInstance](#deleteledgerinstance-1) - [listLedgerInstances](#listledgerinstances-1) + - [listLedgerInstanceVersions](#listledgerinstanceversions-1) + - [getLedgerInstanceVersion](#getledgerinstanceversion-1) - [setDefaultAuth](#setdefaultauth-1) - [get](#get-1) - [head](#head-1) @@ -382,6 +386,8 @@ - [setLedgerInstance](#setledgerinstance-2) - [deleteLedgerInstance](#deleteledgerinstance-2) - [listLedgerInstances](#listledgerinstances-2) + - [listLedgerInstanceVersions](#listledgerinstanceversions-2) + - [getLedgerInstanceVersion](#getledgerinstanceversion-2) - [setDefaultAuth](#setdefaultauth-2) - [get](#get-2) - [head](#head-2) @@ -511,6 +517,8 @@ - [setLedgerInstance](#setledgerinstance-3) - [deleteLedgerInstance](#deleteledgerinstance-3) - [listLedgerInstances](#listledgerinstances-3) + - [listLedgerInstanceVersions](#listledgerinstanceversions-3) + - [getLedgerInstanceVersion](#getledgerinstanceversion-3) - [setDefaultAuth](#setdefaultauth-3) - [get](#get-3) - [head](#head-3) @@ -521,7 +529,7 @@ ## Particle -[src/Particle.js:26-2710](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L26-L2710 "Source code on GitHub") +[src/Particle.js:26-2761](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L26-L2761 "Source code on GitHub") **Parameters** @@ -529,7 +537,7 @@ ### constructor -[src/Particle.js:39-48](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L39-L48 "Source code on GitHub") +[src/Particle.js:39-48](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L39-L48 "Source code on GitHub") Contructor for the Cloud API wrapper. @@ -546,7 +554,7 @@ Create a new Particle object and call methods below on it. ### login -[src/Particle.js:85-102](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L85-L102 "Source code on GitHub") +[src/Particle.js:85-102](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L85-L102 "Source code on GitHub") Login to Particle Cloud using an existing Particle acccount. @@ -563,7 +571,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### sendOtp -[src/Particle.js:113-129](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L113-L129 "Source code on GitHub") +[src/Particle.js:113-129](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L113-L129 "Source code on GitHub") If login failed with an 'mfa_required' error, this must be called with a valid OTP code to login @@ -579,7 +587,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### enableMfa -[src/Particle.js:139-141](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L139-L141 "Source code on GitHub") +[src/Particle.js:139-141](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L139-L141 "Source code on GitHub") Enable MFA on the currently logged in user @@ -594,7 +602,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### confirmMfa -[src/Particle.js:154-168](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L154-L168 "Source code on GitHub") +[src/Particle.js:154-168](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L154-L168 "Source code on GitHub") 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. @@ -612,7 +620,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### disableMfa -[src/Particle.js:179-187](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L179-L187 "Source code on GitHub") +[src/Particle.js:179-187](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L179-L187 "Source code on GitHub") Disable MFA for the user. @@ -628,7 +636,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createCustomer -[src/Particle.js:199-215](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L199-L215 "Source code on GitHub") +[src/Particle.js:199-215](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L199-L215 "Source code on GitHub") Create Customer for Product. @@ -645,7 +653,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### loginAsClientOwner -[src/Particle.js:224-238](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L224-L238 "Source code on GitHub") +[src/Particle.js:224-238](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L224-L238 "Source code on GitHub") Login to Particle Cloud using an OAuth client. @@ -659,7 +667,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createUser -[src/Particle.js:250-261](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L250-L261 "Source code on GitHub") +[src/Particle.js:250-261](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L250-L261 "Source code on GitHub") Create a user account for the Particle Cloud @@ -676,7 +684,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### verifyUser -[src/Particle.js:271-278](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L271-L278 "Source code on GitHub") +[src/Particle.js:271-278](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L271-L278 "Source code on GitHub") Verify new user account via verification email @@ -691,7 +699,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### resetPassword -[src/Particle.js:288-295](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L288-L295 "Source code on GitHub") +[src/Particle.js:288-295](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L288-L295 "Source code on GitHub") Send reset password email for a Particle Cloud user account @@ -706,7 +714,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteAccessToken -[src/Particle.js:307-315](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L307-L315 "Source code on GitHub") +[src/Particle.js:307-315](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L307-L315 "Source code on GitHub") Revoke an access token @@ -723,7 +731,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteCurrentAccessToken -[src/Particle.js:325-332](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L325-L332 "Source code on GitHub") +[src/Particle.js:325-332](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L325-L332 "Source code on GitHub") Revoke the current session access token @@ -738,7 +746,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteActiveAccessTokens -[src/Particle.js:342-349](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L342-L349 "Source code on GitHub") +[src/Particle.js:342-349](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L342-L349 "Source code on GitHub") Revoke all active access tokens @@ -753,7 +761,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteUser -[src/Particle.js:360-368](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L360-L368 "Source code on GitHub") +[src/Particle.js:360-368](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L360-L368 "Source code on GitHub") Delete the current user @@ -769,7 +777,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listAccessTokens -[src/Particle.js:380-388](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L380-L388 "Source code on GitHub") +[src/Particle.js:380-388](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L380-L388 "Source code on GitHub") List all valid access tokens for a Particle Cloud account @@ -786,7 +794,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### trackingIdentity -[src/Particle.js:400-408](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L400-L408 "Source code on GitHub") +[src/Particle.js:400-408](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L400-L408 "Source code on GitHub") Retrieves the information that is used to identify the current login for tracking. @@ -803,7 +811,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listDevices -[src/Particle.js:426-445](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L426-L445 "Source code on GitHub") +[src/Particle.js:426-445](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L426-L445 "Source code on GitHub") List devices claimed to the account or product @@ -826,7 +834,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getDevice -[src/Particle.js:457-460](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L457-L460 "Source code on GitHub") +[src/Particle.js:457-460](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L457-L460 "Source code on GitHub") Get detailed informationa about a device @@ -843,7 +851,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### claimDevice -[src/Particle.js:472-483](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L472-L483 "Source code on GitHub") +[src/Particle.js:472-483](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L472-L483 "Source code on GitHub") Claim a device to the account. The device must be online and unclaimed. @@ -860,7 +868,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### addDeviceToProduct -[src/Particle.js:497-515](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L497-L515 "Source code on GitHub") +[src/Particle.js:497-515](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L497-L515 "Source code on GitHub") Add a device to a product or move device out of quarantine. @@ -879,7 +887,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeDevice -[src/Particle.js:528-532](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L528-L532 "Source code on GitHub") +[src/Particle.js:528-532](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L528-L532 "Source code on GitHub") Unclaim / Remove a device from your account or product, or deny quarantine @@ -897,7 +905,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeDeviceOwner -[src/Particle.js:544-547](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L544-L547 "Source code on GitHub") +[src/Particle.js:544-547](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L544-L547 "Source code on GitHub") Unclaim a product device its the owner, but keep it in the product @@ -914,7 +922,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### renameDevice -[src/Particle.js:560-562](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L560-L562 "Source code on GitHub") +[src/Particle.js:560-562](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L560-L562 "Source code on GitHub") Rename a device @@ -932,7 +940,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### signalDevice -[src/Particle.js:575-577](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L575-L577 "Source code on GitHub") +[src/Particle.js:575-577](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L575-L577 "Source code on GitHub") Instruct the device to turn on/off the LED in a rainbow pattern @@ -950,7 +958,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setDeviceNotes -[src/Particle.js:590-592](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L590-L592 "Source code on GitHub") +[src/Particle.js:590-592](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L590-L592 "Source code on GitHub") Store some notes about device @@ -968,7 +976,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### markAsDevelopmentDevice -[src/Particle.js:605-607](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L605-L607 "Source code on GitHub") +[src/Particle.js:605-607](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L605-L607 "Source code on GitHub") Mark device as being used in development of a product so it opts out of automatic firmware updates @@ -986,7 +994,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### lockDeviceProductFirmware -[src/Particle.js:621-623](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L621-L623 "Source code on GitHub") +[src/Particle.js:621-623](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L621-L623 "Source code on GitHub") Mark device as being used in development of a product, so it opts out of automatic firmware updates @@ -1005,7 +1013,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### unlockDeviceProductFirmware -[src/Particle.js:635-637](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L635-L637 "Source code on GitHub") +[src/Particle.js:635-637](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L635-L637 "Source code on GitHub") Mark device as receiving automatic firmware updates @@ -1022,7 +1030,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateDevice -[src/Particle.js:656-668](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L656-L668 "Source code on GitHub") +[src/Particle.js:656-668](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L656-L668 "Source code on GitHub") Update multiple device attributes at the same time @@ -1046,7 +1054,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### provisionDevice -[src/Particle.js:679-687](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L679-L687 "Source code on GitHub") +[src/Particle.js:679-687](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L679-L687 "Source code on GitHub") Provision a new device for products that allow self-provisioning @@ -1062,7 +1070,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getClaimCode -[src/Particle.js:701-704](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L701-L704 "Source code on GitHub") +[src/Particle.js:701-704](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L701-L704 "Source code on GitHub") Generate a claim code to use in the device claiming process. To generate a claim code for a product, the access token MUST belong to a @@ -1081,7 +1089,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getVariable -[src/Particle.js:736-742](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L736-L742 "Source code on GitHub") +[src/Particle.js:736-742](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L736-L742 "Source code on GitHub") Get the value of a device variable @@ -1099,7 +1107,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### flashDevice -[src/Particle.js:756-767](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L756-L767 "Source code on GitHub") +[src/Particle.js:756-767](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L756-L767 "Source code on GitHub") Compile and flash application firmware to a device. Pass a pre-compiled binary to flash it directly to the device. @@ -1118,7 +1126,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### flashTinker -[src/Particle.js:778-793](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L778-L793 "Source code on GitHub") +[src/Particle.js:778-793](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L778-L793 "Source code on GitHub") DEPRECATED: Flash the Tinker application to a device. Instead compile and flash the Tinker source code. @@ -1134,7 +1142,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### compileCode -[src/Particle.js:806-824](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L806-L824 "Source code on GitHub") +[src/Particle.js:806-824](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L806-L824 "Source code on GitHub") Compile firmware using the Particle Cloud @@ -1152,7 +1160,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadFirmwareBinary -[src/Particle.js:835-844](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L835-L844 "Source code on GitHub") +[src/Particle.js:835-844](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L835-L844 "Source code on GitHub") Download a firmware binary @@ -1168,7 +1176,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### sendPublicKey -[src/Particle.js:857-871](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L857-L871 "Source code on GitHub") +[src/Particle.js:857-871](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L857-L871 "Source code on GitHub") Send a new device public key to the Particle Cloud @@ -1186,7 +1194,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### callFunction -[src/Particle.js:885-890](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L885-L890 "Source code on GitHub") +[src/Particle.js:885-890](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L885-L890 "Source code on GitHub") Call a device function @@ -1205,7 +1213,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getEventStream -[src/Particle.js:903-928](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L903-L928 "Source code on GitHub") +[src/Particle.js:903-928](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L903-L928 "Source code on GitHub") Get a stream of events @@ -1223,7 +1231,7 @@ emit 'event' events. ### publishEvent -[src/Particle.js:942-946](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L942-L946 "Source code on GitHub") +[src/Particle.js:942-946](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L942-L946 "Source code on GitHub") Publish a event to the Particle Cloud @@ -1242,7 +1250,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### Hook -[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L977-L999 "Source code on GitHub") +[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L977-L999 "Source code on GitHub") Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) @@ -1275,7 +1283,7 @@ Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference ### createWebhook -[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L977-L999 "Source code on GitHub") +[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L977-L999 "Source code on GitHub") Create a webhook @@ -1297,7 +1305,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteWebhook -[src/Particle.js:1011-1014](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1011-L1014 "Source code on GitHub") +[src/Particle.js:1011-1014](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1011-L1014 "Source code on GitHub") Delete a webhook @@ -1314,7 +1322,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listWebhooks -[src/Particle.js:1025-1028](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1025-L1028 "Source code on GitHub") +[src/Particle.js:1025-1028](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1025-L1028 "Source code on GitHub") List all webhooks owned by the account or product @@ -1330,7 +1338,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createIntegration -[src/Particle.js:1045-1049](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1045-L1049 "Source code on GitHub") +[src/Particle.js:1045-1049](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1045-L1049 "Source code on GitHub") Create an integration to send events to an external service @@ -1351,7 +1359,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### editIntegration -[src/Particle.js:1067-1071](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1067-L1071 "Source code on GitHub") +[src/Particle.js:1067-1071](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1067-L1071 "Source code on GitHub") Edit an integration to send events to an external service @@ -1373,7 +1381,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteIntegration -[src/Particle.js:1084-1087](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1084-L1087 "Source code on GitHub") +[src/Particle.js:1084-1087](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1084-L1087 "Source code on GitHub") Delete an integration to send events to an external service @@ -1390,7 +1398,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listIntegrations -[src/Particle.js:1098-1101](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1098-L1101 "Source code on GitHub") +[src/Particle.js:1098-1101](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1098-L1101 "Source code on GitHub") List all integrations owned by the account or product @@ -1406,7 +1414,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getUserInfo -[src/Particle.js:1111-1113](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1111-L1113 "Source code on GitHub") +[src/Particle.js:1111-1113](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1111-L1113 "Source code on GitHub") Get details about the current user @@ -1421,7 +1429,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setUserInfo -[src/Particle.js:1124-1127](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1124-L1127 "Source code on GitHub") +[src/Particle.js:1124-1127](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1124-L1127 "Source code on GitHub") Set details on the current user @@ -1437,7 +1445,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### changeUsername -[src/Particle.js:1140-1148](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1140-L1148 "Source code on GitHub") +[src/Particle.js:1140-1148](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1140-L1148 "Source code on GitHub") Change username (i.e, email) @@ -1455,7 +1463,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### changeUserPassword -[src/Particle.js:1161-1169](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1161-L1169 "Source code on GitHub") +[src/Particle.js:1161-1169](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1161-L1169 "Source code on GitHub") Change user's password @@ -1473,7 +1481,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listSIMs -[src/Particle.js:1185-1189](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1185-L1189 "Source code on GitHub") +[src/Particle.js:1185-1189](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1185-L1189 "Source code on GitHub") List SIM cards owned by a user or product @@ -1494,7 +1502,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getSIMDataUsage -[src/Particle.js:1201-1207](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1201-L1207 "Source code on GitHub") +[src/Particle.js:1201-1207](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1201-L1207 "Source code on GitHub") Get data usage for one SIM card for the current billing period @@ -1511,7 +1519,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getFleetDataUsage -[src/Particle.js:1218-1225](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1218-L1225 "Source code on GitHub") +[src/Particle.js:1218-1225](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1218-L1225 "Source code on GitHub") Get data usage for all SIM cards in a product the current billing period @@ -1527,7 +1535,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### checkSIM -[src/Particle.js:1236-1238](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1236-L1238 "Source code on GitHub") +[src/Particle.js:1236-1238](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1236-L1238 "Source code on GitHub") Check SIM status @@ -1543,7 +1551,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### activateSIM -[src/Particle.js:1253-1263](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1253-L1263 "Source code on GitHub") +[src/Particle.js:1253-1263](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1253-L1263 "Source code on GitHub") Activate and add SIM cards to an account or product @@ -1563,7 +1571,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deactivateSIM -[src/Particle.js:1275-1279](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1275-L1279 "Source code on GitHub") +[src/Particle.js:1275-1279](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1275-L1279 "Source code on GitHub") Deactivate a SIM card so it doesn't incur data usage in future months. @@ -1580,7 +1588,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### reactivateSIM -[src/Particle.js:1292-1296](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1292-L1296 "Source code on GitHub") +[src/Particle.js:1292-1296](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1292-L1296 "Source code on GitHub") Reactivate a SIM card the was deactivated or unpause a SIM card that was automatically paused @@ -1598,7 +1606,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateSIM -[src/Particle.js:1309-1313](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1309-L1313 "Source code on GitHub") +[src/Particle.js:1309-1313](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1309-L1313 "Source code on GitHub") Update SIM card data limit @@ -1616,7 +1624,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeSIM -[src/Particle.js:1325-1328](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1325-L1328 "Source code on GitHub") +[src/Particle.js:1325-1328](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1325-L1328 "Source code on GitHub") Remove a SIM card from an account so it can be activated by a different account @@ -1633,7 +1641,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listBuildTargets -[src/Particle.js:1339-1342](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1339-L1342 "Source code on GitHub") +[src/Particle.js:1339-1342](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1339-L1342 "Source code on GitHub") List valid build targets to be used for compiling @@ -1649,7 +1657,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLibraries -[src/Particle.js:1368-1385](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1368-L1385 "Source code on GitHub") +[src/Particle.js:1368-1385](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1368-L1385 "Source code on GitHub") List firmware libraries @@ -1679,7 +1687,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLibrary -[src/Particle.js:1401-1409](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1401-L1409 "Source code on GitHub") +[src/Particle.js:1401-1409](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1401-L1409 "Source code on GitHub") Get firmware library details @@ -1696,7 +1704,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLibraryVersions -[src/Particle.js:1422-1430](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1422-L1430 "Source code on GitHub") +[src/Particle.js:1422-1430](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1422-L1430 "Source code on GitHub") Firmware library details for each version @@ -1714,7 +1722,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### contributeLibrary -[src/Particle.js:1442-1455](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1442-L1455 "Source code on GitHub") +[src/Particle.js:1442-1455](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1442-L1455 "Source code on GitHub") Contribute a new library version from a compressed archive @@ -1731,7 +1739,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### publishLibrary -[src/Particle.js:1466-1475](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1466-L1475 "Source code on GitHub") +[src/Particle.js:1466-1475](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1466-L1475 "Source code on GitHub") Publish the latest version of a library to the public @@ -1747,7 +1755,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLibrary -[src/Particle.js:1487-1495](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1487-L1495 "Source code on GitHub") +[src/Particle.js:1487-1495](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1487-L1495 "Source code on GitHub") Delete one version of a library or an entire private library @@ -1764,7 +1772,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadFile -[src/Particle.js:1505-1507](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1505-L1507 "Source code on GitHub") +[src/Particle.js:1505-1507](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1505-L1507 "Source code on GitHub") Download an external file that may not be on the API @@ -1779,7 +1787,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listOAuthClients -[src/Particle.js:1518-1521](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1518-L1521 "Source code on GitHub") +[src/Particle.js:1518-1521](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1518-L1521 "Source code on GitHub") List OAuth client created by the account @@ -1795,7 +1803,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createOAuthClient -[src/Particle.js:1536-1540](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1536-L1540 "Source code on GitHub") +[src/Particle.js:1536-1540](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1536-L1540 "Source code on GitHub") Create an OAuth client @@ -1815,7 +1823,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateOAuthClient -[src/Particle.js:1554-1558](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1554-L1558 "Source code on GitHub") +[src/Particle.js:1554-1558](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1554-L1558 "Source code on GitHub") Update an OAuth client @@ -1834,7 +1842,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteOAuthClient -[src/Particle.js:1570-1573](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1570-L1573 "Source code on GitHub") +[src/Particle.js:1570-1573](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1570-L1573 "Source code on GitHub") Delete an OAuth client @@ -1851,7 +1859,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listProducts -[src/Particle.js:1583-1585](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1583-L1585 "Source code on GitHub") +[src/Particle.js:1583-1585](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1583-L1585 "Source code on GitHub") List products the account has access to @@ -1866,7 +1874,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProduct -[src/Particle.js:1596-1598](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1596-L1598 "Source code on GitHub") +[src/Particle.js:1596-1598](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1596-L1598 "Source code on GitHub") Get detailed information about a product @@ -1882,7 +1890,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listProductFirmware -[src/Particle.js:1609-1611](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1609-L1611 "Source code on GitHub") +[src/Particle.js:1609-1611](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1609-L1611 "Source code on GitHub") List product firmware versions @@ -1898,7 +1906,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### uploadProductFirmware -[src/Particle.js:1627-1643](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1627-L1643 "Source code on GitHub") +[src/Particle.js:1627-1643](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1627-L1643 "Source code on GitHub") List product firmware versions @@ -1919,7 +1927,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductFirmware -[src/Particle.js:1655-1662](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1655-L1662 "Source code on GitHub") +[src/Particle.js:1655-1662](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1655-L1662 "Source code on GitHub") Get information about a product firmware version @@ -1936,7 +1944,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateProductFirmware -[src/Particle.js:1676-1679](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1676-L1679 "Source code on GitHub") +[src/Particle.js:1676-1679](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1676-L1679 "Source code on GitHub") Update information for a product firmware version @@ -1955,7 +1963,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadProductFirmware -[src/Particle.js:1691-1700](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1691-L1700 "Source code on GitHub") +[src/Particle.js:1691-1700](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1691-L1700 "Source code on GitHub") Download a product firmware binary @@ -1972,7 +1980,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### releaseProductFirmware -[src/Particle.js:1712-1715](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1712-L1715 "Source code on GitHub") +[src/Particle.js:1712-1715](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1712-L1715 "Source code on GitHub") Release a product firmware version as the default version @@ -1989,7 +1997,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listTeamMembers -[src/Particle.js:1726-1733](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1726-L1733 "Source code on GitHub") +[src/Particle.js:1726-1733](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1726-L1733 "Source code on GitHub") List product team members @@ -2005,7 +2013,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### inviteTeamMember -[src/Particle.js:1745-1753](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1745-L1753 "Source code on GitHub") +[src/Particle.js:1745-1753](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1745-L1753 "Source code on GitHub") Invite Particle user to a product team @@ -2022,7 +2030,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeTeamMember -[src/Particle.js:1765-1772](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1765-L1772 "Source code on GitHub") +[src/Particle.js:1765-1772](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1765-L1772 "Source code on GitHub") Remove Particle user to a product team @@ -2039,7 +2047,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### lookupSerialNumber -[src/Particle.js:1783-1790](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1783-L1790 "Source code on GitHub") +[src/Particle.js:1783-1790](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1783-L1790 "Source code on GitHub") Fetch details about a serial number @@ -2055,7 +2063,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createMeshNetwork -[src/Particle.js:1803-1811](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1803-L1811 "Source code on GitHub") +[src/Particle.js:1803-1811](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1803-L1811 "Source code on GitHub") Create a mesh network @@ -2073,7 +2081,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeMeshNetwork -[src/Particle.js:1822-1824](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1822-L1824 "Source code on GitHub") +[src/Particle.js:1822-1824](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1822-L1824 "Source code on GitHub") Remove a mesh network. @@ -2089,7 +2097,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listMeshNetworks -[src/Particle.js:1836-1839](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1836-L1839 "Source code on GitHub") +[src/Particle.js:1836-1839](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1836-L1839 "Source code on GitHub") List all mesh networks @@ -2106,7 +2114,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getMeshNetwork -[src/Particle.js:1850-1852](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1850-L1852 "Source code on GitHub") +[src/Particle.js:1850-1852](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1850-L1852 "Source code on GitHub") Get information about a mesh network. @@ -2122,7 +2130,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateMeshNetwork -[src/Particle.js:1865-1873](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1865-L1873 "Source code on GitHub") +[src/Particle.js:1865-1873](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1865-L1873 "Source code on GitHub") Modify a mesh network. @@ -2140,7 +2148,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### addMeshNetworkDevice -[src/Particle.js:1885-1894](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1885-L1894 "Source code on GitHub") +[src/Particle.js:1885-1894](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1885-L1894 "Source code on GitHub") Add a device to a mesh network. @@ -2157,7 +2165,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeMeshNetworkDevice -[src/Particle.js:1906-1922](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1906-L1922 "Source code on GitHub") +[src/Particle.js:1906-1922](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1906-L1922 "Source code on GitHub") Remove a device from a mesh network. @@ -2174,7 +2182,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listMeshNetworkDevices -[src/Particle.js:1936-1945](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1936-L1945 "Source code on GitHub") +[src/Particle.js:1936-1945](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1936-L1945 "Source code on GitHub") List all devices of a mesh network. @@ -2193,7 +2201,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductConfiguration -[src/Particle.js:1956-1963](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1956-L1963 "Source code on GitHub") +[src/Particle.js:1956-1963](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1956-L1963 "Source code on GitHub") Get product configuration @@ -2209,7 +2217,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductConfigurationSchema -[src/Particle.js:1974-1982](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1974-L1982 "Source code on GitHub") +[src/Particle.js:1974-1982](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1974-L1982 "Source code on GitHub") Get product configuration schema @@ -2225,7 +2233,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceConfiguration -[src/Particle.js:1994-2001](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1994-L2001 "Source code on GitHub") +[src/Particle.js:1994-2001](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1994-L2001 "Source code on GitHub") Get product device's configuration @@ -2242,7 +2250,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceConfigurationSchema -[src/Particle.js:2013-2021](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2013-L2021 "Source code on GitHub") +[src/Particle.js:2013-2021](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2013-L2021 "Source code on GitHub") Get product device's configuration schema @@ -2259,7 +2267,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setProductConfiguration -[src/Particle.js:2033-2041](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2033-L2041 "Source code on GitHub") +[src/Particle.js:2033-2041](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2033-L2041 "Source code on GitHub") Set product configuration @@ -2276,7 +2284,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setProductDeviceConfiguration -[src/Particle.js:2054-2062](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2054-L2062 "Source code on GitHub") +[src/Particle.js:2054-2062](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2054-L2062 "Source code on GitHub") Set product configuration for a specific device within the product @@ -2294,7 +2302,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductLocations -[src/Particle.js:2081-2098](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2081-L2098 "Source code on GitHub") +[src/Particle.js:2081-2098](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2081-L2098 "Source code on GitHub") Query location for devices within a product @@ -2318,7 +2326,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceLocations -[src/Particle.js:2115-2127](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2115-L2127 "Source code on GitHub") +[src/Particle.js:2115-2127](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2115-L2127 "Source code on GitHub") Query location for one device within a product @@ -2338,7 +2346,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### executeLogic -[src/Particle.js:2143-2151](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2143-L2151 "Source code on GitHub") +[src/Particle.js:2143-2151](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2143-L2151 "Source code on GitHub") Executes the provided logic function once and returns the result. No logs, runs, etc are saved @@ -2357,7 +2365,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createLogicFunction -[src/Particle.js:2171-2179](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2171-L2179 "Source code on GitHub") +[src/Particle.js:2171-2179](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2171-L2179 "Source code on GitHub") Creates a new logic function in the specified organization or sandbox using the provided function data. @@ -2380,7 +2388,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicFunction -[src/Particle.js:2193-2200](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2193-L2200 "Source code on GitHub") +[src/Particle.js:2193-2200](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2193-L2200 "Source code on GitHub") Get a logic function in the specified organization or sandbox by logic function ID. @@ -2397,7 +2405,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateLogicFunction -[src/Particle.js:2217-2225](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2217-L2225 "Source code on GitHub") +[src/Particle.js:2217-2225](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2217-L2225 "Source code on GitHub") Updates an existing logic function in the specified organization or sandbox using the provided function data. @@ -2417,7 +2425,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLogicFunction -[src/Particle.js:2239-2246](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2239-L2246 "Source code on GitHub") +[src/Particle.js:2239-2246](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2239-L2246 "Source code on GitHub") Deletes a logic function in the specified organization or sandbox by logic function ID. @@ -2434,7 +2442,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLogicFunctions -[src/Particle.js:2260-2270](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2260-L2270 "Source code on GitHub") +[src/Particle.js:2260-2270](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2260-L2270 "Source code on GitHub") Lists all logic functions in the specified organization or sandbox. @@ -2451,7 +2459,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLogicRuns -[src/Particle.js:2284-2291](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2284-L2291 "Source code on GitHub") +[src/Particle.js:2284-2291](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2284-L2291 "Source code on GitHub") Lists all logic runs for the specified logic function in the specified organization or sandbox. @@ -2468,7 +2476,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicRun -[src/Particle.js:2306-2313](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2306-L2313 "Source code on GitHub") +[src/Particle.js:2306-2313](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2306-L2313 "Source code on GitHub") Retrieves a logic run by its ID for the specified logic function in the specified organization or sandbox. @@ -2486,7 +2494,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicRunLogs -[src/Particle.js:2328-2335](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2328-L2335 "Source code on GitHub") +[src/Particle.js:2328-2335](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2328-L2335 "Source code on GitHub") Retrieves the logs for a logic run by its ID for the specified logic function in the specified organization or sandbox. @@ -2504,7 +2512,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createLedger -[src/Particle.js:2349-2357](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2349-L2357 "Source code on GitHub") +[src/Particle.js:2349-2357](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2349-L2357 "Source code on GitHub") Creates a new ledger definition in the specified organization or sandbox. @@ -2521,7 +2529,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLedger -[src/Particle.js:2371-2378](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2371-L2378 "Source code on GitHub") +[src/Particle.js:2371-2378](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2371-L2378 "Source code on GitHub") Get a ledger definition in the specified organization or sandbox by ledger name. @@ -2538,7 +2546,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateLedger -[src/Particle.js:2393-2401](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2393-L2401 "Source code on GitHub") +[src/Particle.js:2393-2401](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2393-L2401 "Source code on GitHub") Updates an existing ledger definition in the specified organization or sandbox. @@ -2556,7 +2564,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### archiveLedger -[src/Particle.js:2415-2422](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2415-L2422 "Source code on GitHub") +[src/Particle.js:2415-2422](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2415-L2422 "Source code on GitHub") Archives a ledger definition in the specified organization or sandbox by ledger name. @@ -2573,7 +2581,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### Scope -[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2443-L2456 "Source code on GitHub") +[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2443-L2456 "Source code on GitHub") Type: (`"Owner"` \| `"Product"` \| `"Device"`) @@ -2591,7 +2599,7 @@ Type: (`"Owner"` \| `"Product"` \| `"Device"`) ### listLedgers -[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2443-L2456 "Source code on GitHub") +[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2443-L2456 "Source code on GitHub") Lists all ledger definitions in the specified organization or sandbox. @@ -2611,7 +2619,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLedgerInstance -[src/Particle.js:2471-2478](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2471-L2478 "Source code on GitHub") +[src/Particle.js:2471-2478](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2471-L2478 "Source code on GitHub") Get ledger instance data. @@ -2629,7 +2637,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setLedgerInstance -[src/Particle.js:2494-2502](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2494-L2502 "Source code on GitHub") +[src/Particle.js:2494-2502](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2494-L2502 "Source code on GitHub") Set ledger instance data. @@ -2648,7 +2656,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLedgerInstance -[src/Particle.js:2517-2524](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2517-L2524 "Source code on GitHub") +[src/Particle.js:2517-2524](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2517-L2524 "Source code on GitHub") Delete a ledger instance in the specified organization or sandbox by ledger name. @@ -2666,7 +2674,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLedgerInstances -[src/Particle.js:2540-2551](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2540-L2551 "Source code on GitHub") +[src/Particle.js:2540-2551](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2540-L2551 "Source code on GitHub") Lists ledger instances in the specified organization or sandbox. @@ -2683,9 +2691,48 @@ Lists ledger instances in the specified organization or sandbox. Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to an array of ledger instance data. +### listLedgerInstanceVersions + +[src/Particle.js:2568-2579](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2568-L2579 "Source code on GitHub") + +List ledger instance versions + +**Parameters** + +- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger instance. + - `options.auth` **Auth?** The access token or basic auth object. Can be ignored if provided in constructor + - `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account. + - `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name. + - `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value. + - `options.replacedBefore` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** ISO date string to filter to instances replaced before this time + - `options.replacedAfter` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** ISO date string to filter to instances replaced after this time + - `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. + - `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context + +Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to an array of ledger instance data. + +### getLedgerInstanceVersion + +[src/Particle.js:2595-2602](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2595-L2602 "Source code on GitHub") + +Get specific ledger instance version + +**Parameters** + +- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger instance. + - `options.auth` **Auth?** The access token or basic auth object. Can be ignored if provided in constructor + - `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account. + - `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name. + - `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value. + - `options.version` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Version of the ledger instance + - `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. + - `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context + +Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to the specified ledger instance data. + ### setDefaultAuth -[src/Particle.js:2558-2566](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2558-L2566 "Source code on GitHub") +[src/Particle.js:2609-2617](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2609-L2617 "Source code on GitHub") Set default auth token that will be used in each method if `auth` is not provided @@ -2698,7 +2745,7 @@ Set default auth token that will be used in each method if `auth` is not provide ### get -[src/Particle.js:2609-2613](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2609-L2613 "Source code on GitHub") +[src/Particle.js:2660-2664](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2660-L2664 "Source code on GitHub") Make a GET request @@ -2715,7 +2762,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### head -[src/Particle.js:2625-2629](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2625-L2629 "Source code on GitHub") +[src/Particle.js:2676-2680](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2676-L2680 "Source code on GitHub") Make a HEAD request @@ -2732,7 +2779,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### post -[src/Particle.js:2641-2645](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2641-L2645 "Source code on GitHub") +[src/Particle.js:2692-2696](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2692-L2696 "Source code on GitHub") Make a POST request @@ -2749,7 +2796,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### put -[src/Particle.js:2657-2661](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2657-L2661 "Source code on GitHub") +[src/Particle.js:2708-2712](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2708-L2712 "Source code on GitHub") Make a PUT request @@ -2766,7 +2813,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### delete -[src/Particle.js:2673-2677](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2673-L2677 "Source code on GitHub") +[src/Particle.js:2724-2728](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2724-L2728 "Source code on GitHub") Make a DELETE request @@ -2783,7 +2830,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### request -[src/Particle.js:2694-2698](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2694-L2698 "Source code on GitHub") +[src/Particle.js:2745-2749](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2745-L2749 "Source code on GitHub") **Parameters** @@ -2803,7 +2850,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ## Particle -[src/Particle.js:26-2710](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L26-L2710 "Source code on GitHub") +[src/Particle.js:26-2761](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L26-L2761 "Source code on GitHub") **Parameters** @@ -2811,7 +2858,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### constructor -[src/Particle.js:39-48](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L39-L48 "Source code on GitHub") +[src/Particle.js:39-48](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L39-L48 "Source code on GitHub") Contructor for the Cloud API wrapper. @@ -2828,7 +2875,7 @@ Create a new Particle object and call methods below on it. ### login -[src/Particle.js:85-102](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L85-L102 "Source code on GitHub") +[src/Particle.js:85-102](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L85-L102 "Source code on GitHub") Login to Particle Cloud using an existing Particle acccount. @@ -2845,7 +2892,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### sendOtp -[src/Particle.js:113-129](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L113-L129 "Source code on GitHub") +[src/Particle.js:113-129](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L113-L129 "Source code on GitHub") If login failed with an 'mfa_required' error, this must be called with a valid OTP code to login @@ -2861,7 +2908,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### enableMfa -[src/Particle.js:139-141](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L139-L141 "Source code on GitHub") +[src/Particle.js:139-141](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L139-L141 "Source code on GitHub") Enable MFA on the currently logged in user @@ -2876,7 +2923,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### confirmMfa -[src/Particle.js:154-168](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L154-L168 "Source code on GitHub") +[src/Particle.js:154-168](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L154-L168 "Source code on GitHub") 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. @@ -2894,7 +2941,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### disableMfa -[src/Particle.js:179-187](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L179-L187 "Source code on GitHub") +[src/Particle.js:179-187](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L179-L187 "Source code on GitHub") Disable MFA for the user. @@ -2910,7 +2957,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createCustomer -[src/Particle.js:199-215](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L199-L215 "Source code on GitHub") +[src/Particle.js:199-215](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L199-L215 "Source code on GitHub") Create Customer for Product. @@ -2927,7 +2974,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### loginAsClientOwner -[src/Particle.js:224-238](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L224-L238 "Source code on GitHub") +[src/Particle.js:224-238](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L224-L238 "Source code on GitHub") Login to Particle Cloud using an OAuth client. @@ -2941,7 +2988,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createUser -[src/Particle.js:250-261](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L250-L261 "Source code on GitHub") +[src/Particle.js:250-261](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L250-L261 "Source code on GitHub") Create a user account for the Particle Cloud @@ -2958,7 +3005,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### verifyUser -[src/Particle.js:271-278](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L271-L278 "Source code on GitHub") +[src/Particle.js:271-278](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L271-L278 "Source code on GitHub") Verify new user account via verification email @@ -2973,7 +3020,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### resetPassword -[src/Particle.js:288-295](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L288-L295 "Source code on GitHub") +[src/Particle.js:288-295](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L288-L295 "Source code on GitHub") Send reset password email for a Particle Cloud user account @@ -2988,7 +3035,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteAccessToken -[src/Particle.js:307-315](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L307-L315 "Source code on GitHub") +[src/Particle.js:307-315](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L307-L315 "Source code on GitHub") Revoke an access token @@ -3005,7 +3052,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteCurrentAccessToken -[src/Particle.js:325-332](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L325-L332 "Source code on GitHub") +[src/Particle.js:325-332](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L325-L332 "Source code on GitHub") Revoke the current session access token @@ -3020,7 +3067,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteActiveAccessTokens -[src/Particle.js:342-349](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L342-L349 "Source code on GitHub") +[src/Particle.js:342-349](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L342-L349 "Source code on GitHub") Revoke all active access tokens @@ -3035,7 +3082,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteUser -[src/Particle.js:360-368](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L360-L368 "Source code on GitHub") +[src/Particle.js:360-368](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L360-L368 "Source code on GitHub") Delete the current user @@ -3051,7 +3098,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listAccessTokens -[src/Particle.js:380-388](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L380-L388 "Source code on GitHub") +[src/Particle.js:380-388](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L380-L388 "Source code on GitHub") List all valid access tokens for a Particle Cloud account @@ -3068,7 +3115,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### trackingIdentity -[src/Particle.js:400-408](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L400-L408 "Source code on GitHub") +[src/Particle.js:400-408](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L400-L408 "Source code on GitHub") Retrieves the information that is used to identify the current login for tracking. @@ -3085,7 +3132,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listDevices -[src/Particle.js:426-445](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L426-L445 "Source code on GitHub") +[src/Particle.js:426-445](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L426-L445 "Source code on GitHub") List devices claimed to the account or product @@ -3108,7 +3155,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getDevice -[src/Particle.js:457-460](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L457-L460 "Source code on GitHub") +[src/Particle.js:457-460](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L457-L460 "Source code on GitHub") Get detailed informationa about a device @@ -3125,7 +3172,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### claimDevice -[src/Particle.js:472-483](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L472-L483 "Source code on GitHub") +[src/Particle.js:472-483](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L472-L483 "Source code on GitHub") Claim a device to the account. The device must be online and unclaimed. @@ -3142,7 +3189,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### addDeviceToProduct -[src/Particle.js:497-515](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L497-L515 "Source code on GitHub") +[src/Particle.js:497-515](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L497-L515 "Source code on GitHub") Add a device to a product or move device out of quarantine. @@ -3161,7 +3208,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeDevice -[src/Particle.js:528-532](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L528-L532 "Source code on GitHub") +[src/Particle.js:528-532](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L528-L532 "Source code on GitHub") Unclaim / Remove a device from your account or product, or deny quarantine @@ -3179,7 +3226,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeDeviceOwner -[src/Particle.js:544-547](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L544-L547 "Source code on GitHub") +[src/Particle.js:544-547](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L544-L547 "Source code on GitHub") Unclaim a product device its the owner, but keep it in the product @@ -3196,7 +3243,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### renameDevice -[src/Particle.js:560-562](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L560-L562 "Source code on GitHub") +[src/Particle.js:560-562](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L560-L562 "Source code on GitHub") Rename a device @@ -3214,7 +3261,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### signalDevice -[src/Particle.js:575-577](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L575-L577 "Source code on GitHub") +[src/Particle.js:575-577](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L575-L577 "Source code on GitHub") Instruct the device to turn on/off the LED in a rainbow pattern @@ -3232,7 +3279,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setDeviceNotes -[src/Particle.js:590-592](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L590-L592 "Source code on GitHub") +[src/Particle.js:590-592](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L590-L592 "Source code on GitHub") Store some notes about device @@ -3250,7 +3297,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### markAsDevelopmentDevice -[src/Particle.js:605-607](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L605-L607 "Source code on GitHub") +[src/Particle.js:605-607](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L605-L607 "Source code on GitHub") Mark device as being used in development of a product so it opts out of automatic firmware updates @@ -3268,7 +3315,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### lockDeviceProductFirmware -[src/Particle.js:621-623](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L621-L623 "Source code on GitHub") +[src/Particle.js:621-623](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L621-L623 "Source code on GitHub") Mark device as being used in development of a product, so it opts out of automatic firmware updates @@ -3287,7 +3334,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### unlockDeviceProductFirmware -[src/Particle.js:635-637](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L635-L637 "Source code on GitHub") +[src/Particle.js:635-637](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L635-L637 "Source code on GitHub") Mark device as receiving automatic firmware updates @@ -3304,7 +3351,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateDevice -[src/Particle.js:656-668](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L656-L668 "Source code on GitHub") +[src/Particle.js:656-668](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L656-L668 "Source code on GitHub") Update multiple device attributes at the same time @@ -3328,7 +3375,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### provisionDevice -[src/Particle.js:679-687](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L679-L687 "Source code on GitHub") +[src/Particle.js:679-687](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L679-L687 "Source code on GitHub") Provision a new device for products that allow self-provisioning @@ -3344,7 +3391,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getClaimCode -[src/Particle.js:701-704](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L701-L704 "Source code on GitHub") +[src/Particle.js:701-704](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L701-L704 "Source code on GitHub") Generate a claim code to use in the device claiming process. To generate a claim code for a product, the access token MUST belong to a @@ -3363,7 +3410,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getVariable -[src/Particle.js:736-742](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L736-L742 "Source code on GitHub") +[src/Particle.js:736-742](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L736-L742 "Source code on GitHub") Get the value of a device variable @@ -3381,7 +3428,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### flashDevice -[src/Particle.js:756-767](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L756-L767 "Source code on GitHub") +[src/Particle.js:756-767](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L756-L767 "Source code on GitHub") Compile and flash application firmware to a device. Pass a pre-compiled binary to flash it directly to the device. @@ -3400,7 +3447,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### flashTinker -[src/Particle.js:778-793](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L778-L793 "Source code on GitHub") +[src/Particle.js:778-793](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L778-L793 "Source code on GitHub") DEPRECATED: Flash the Tinker application to a device. Instead compile and flash the Tinker source code. @@ -3416,7 +3463,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### compileCode -[src/Particle.js:806-824](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L806-L824 "Source code on GitHub") +[src/Particle.js:806-824](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L806-L824 "Source code on GitHub") Compile firmware using the Particle Cloud @@ -3434,7 +3481,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadFirmwareBinary -[src/Particle.js:835-844](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L835-L844 "Source code on GitHub") +[src/Particle.js:835-844](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L835-L844 "Source code on GitHub") Download a firmware binary @@ -3450,7 +3497,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### sendPublicKey -[src/Particle.js:857-871](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L857-L871 "Source code on GitHub") +[src/Particle.js:857-871](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L857-L871 "Source code on GitHub") Send a new device public key to the Particle Cloud @@ -3468,7 +3515,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### callFunction -[src/Particle.js:885-890](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L885-L890 "Source code on GitHub") +[src/Particle.js:885-890](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L885-L890 "Source code on GitHub") Call a device function @@ -3487,7 +3534,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getEventStream -[src/Particle.js:903-928](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L903-L928 "Source code on GitHub") +[src/Particle.js:903-928](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L903-L928 "Source code on GitHub") Get a stream of events @@ -3505,7 +3552,7 @@ emit 'event' events. ### publishEvent -[src/Particle.js:942-946](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L942-L946 "Source code on GitHub") +[src/Particle.js:942-946](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L942-L946 "Source code on GitHub") Publish a event to the Particle Cloud @@ -3524,7 +3571,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### Hook -[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L977-L999 "Source code on GitHub") +[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L977-L999 "Source code on GitHub") Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) @@ -3557,7 +3604,7 @@ Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference ### createWebhook -[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L977-L999 "Source code on GitHub") +[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L977-L999 "Source code on GitHub") Create a webhook @@ -3579,7 +3626,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteWebhook -[src/Particle.js:1011-1014](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1011-L1014 "Source code on GitHub") +[src/Particle.js:1011-1014](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1011-L1014 "Source code on GitHub") Delete a webhook @@ -3596,7 +3643,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listWebhooks -[src/Particle.js:1025-1028](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1025-L1028 "Source code on GitHub") +[src/Particle.js:1025-1028](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1025-L1028 "Source code on GitHub") List all webhooks owned by the account or product @@ -3612,7 +3659,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createIntegration -[src/Particle.js:1045-1049](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1045-L1049 "Source code on GitHub") +[src/Particle.js:1045-1049](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1045-L1049 "Source code on GitHub") Create an integration to send events to an external service @@ -3633,7 +3680,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### editIntegration -[src/Particle.js:1067-1071](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1067-L1071 "Source code on GitHub") +[src/Particle.js:1067-1071](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1067-L1071 "Source code on GitHub") Edit an integration to send events to an external service @@ -3655,7 +3702,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteIntegration -[src/Particle.js:1084-1087](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1084-L1087 "Source code on GitHub") +[src/Particle.js:1084-1087](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1084-L1087 "Source code on GitHub") Delete an integration to send events to an external service @@ -3672,7 +3719,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listIntegrations -[src/Particle.js:1098-1101](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1098-L1101 "Source code on GitHub") +[src/Particle.js:1098-1101](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1098-L1101 "Source code on GitHub") List all integrations owned by the account or product @@ -3688,7 +3735,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getUserInfo -[src/Particle.js:1111-1113](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1111-L1113 "Source code on GitHub") +[src/Particle.js:1111-1113](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1111-L1113 "Source code on GitHub") Get details about the current user @@ -3703,7 +3750,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setUserInfo -[src/Particle.js:1124-1127](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1124-L1127 "Source code on GitHub") +[src/Particle.js:1124-1127](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1124-L1127 "Source code on GitHub") Set details on the current user @@ -3719,7 +3766,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### changeUsername -[src/Particle.js:1140-1148](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1140-L1148 "Source code on GitHub") +[src/Particle.js:1140-1148](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1140-L1148 "Source code on GitHub") Change username (i.e, email) @@ -3737,7 +3784,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### changeUserPassword -[src/Particle.js:1161-1169](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1161-L1169 "Source code on GitHub") +[src/Particle.js:1161-1169](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1161-L1169 "Source code on GitHub") Change user's password @@ -3755,7 +3802,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listSIMs -[src/Particle.js:1185-1189](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1185-L1189 "Source code on GitHub") +[src/Particle.js:1185-1189](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1185-L1189 "Source code on GitHub") List SIM cards owned by a user or product @@ -3776,7 +3823,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getSIMDataUsage -[src/Particle.js:1201-1207](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1201-L1207 "Source code on GitHub") +[src/Particle.js:1201-1207](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1201-L1207 "Source code on GitHub") Get data usage for one SIM card for the current billing period @@ -3793,7 +3840,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getFleetDataUsage -[src/Particle.js:1218-1225](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1218-L1225 "Source code on GitHub") +[src/Particle.js:1218-1225](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1218-L1225 "Source code on GitHub") Get data usage for all SIM cards in a product the current billing period @@ -3809,7 +3856,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### checkSIM -[src/Particle.js:1236-1238](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1236-L1238 "Source code on GitHub") +[src/Particle.js:1236-1238](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1236-L1238 "Source code on GitHub") Check SIM status @@ -3825,7 +3872,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### activateSIM -[src/Particle.js:1253-1263](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1253-L1263 "Source code on GitHub") +[src/Particle.js:1253-1263](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1253-L1263 "Source code on GitHub") Activate and add SIM cards to an account or product @@ -3845,7 +3892,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deactivateSIM -[src/Particle.js:1275-1279](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1275-L1279 "Source code on GitHub") +[src/Particle.js:1275-1279](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1275-L1279 "Source code on GitHub") Deactivate a SIM card so it doesn't incur data usage in future months. @@ -3862,7 +3909,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### reactivateSIM -[src/Particle.js:1292-1296](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1292-L1296 "Source code on GitHub") +[src/Particle.js:1292-1296](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1292-L1296 "Source code on GitHub") Reactivate a SIM card the was deactivated or unpause a SIM card that was automatically paused @@ -3880,7 +3927,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateSIM -[src/Particle.js:1309-1313](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1309-L1313 "Source code on GitHub") +[src/Particle.js:1309-1313](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1309-L1313 "Source code on GitHub") Update SIM card data limit @@ -3898,7 +3945,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeSIM -[src/Particle.js:1325-1328](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1325-L1328 "Source code on GitHub") +[src/Particle.js:1325-1328](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1325-L1328 "Source code on GitHub") Remove a SIM card from an account so it can be activated by a different account @@ -3915,7 +3962,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listBuildTargets -[src/Particle.js:1339-1342](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1339-L1342 "Source code on GitHub") +[src/Particle.js:1339-1342](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1339-L1342 "Source code on GitHub") List valid build targets to be used for compiling @@ -3931,7 +3978,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLibraries -[src/Particle.js:1368-1385](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1368-L1385 "Source code on GitHub") +[src/Particle.js:1368-1385](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1368-L1385 "Source code on GitHub") List firmware libraries @@ -3961,7 +4008,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLibrary -[src/Particle.js:1401-1409](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1401-L1409 "Source code on GitHub") +[src/Particle.js:1401-1409](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1401-L1409 "Source code on GitHub") Get firmware library details @@ -3978,7 +4025,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLibraryVersions -[src/Particle.js:1422-1430](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1422-L1430 "Source code on GitHub") +[src/Particle.js:1422-1430](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1422-L1430 "Source code on GitHub") Firmware library details for each version @@ -3996,7 +4043,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### contributeLibrary -[src/Particle.js:1442-1455](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1442-L1455 "Source code on GitHub") +[src/Particle.js:1442-1455](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1442-L1455 "Source code on GitHub") Contribute a new library version from a compressed archive @@ -4013,7 +4060,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### publishLibrary -[src/Particle.js:1466-1475](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1466-L1475 "Source code on GitHub") +[src/Particle.js:1466-1475](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1466-L1475 "Source code on GitHub") Publish the latest version of a library to the public @@ -4029,7 +4076,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLibrary -[src/Particle.js:1487-1495](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1487-L1495 "Source code on GitHub") +[src/Particle.js:1487-1495](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1487-L1495 "Source code on GitHub") Delete one version of a library or an entire private library @@ -4046,7 +4093,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadFile -[src/Particle.js:1505-1507](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1505-L1507 "Source code on GitHub") +[src/Particle.js:1505-1507](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1505-L1507 "Source code on GitHub") Download an external file that may not be on the API @@ -4061,7 +4108,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listOAuthClients -[src/Particle.js:1518-1521](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1518-L1521 "Source code on GitHub") +[src/Particle.js:1518-1521](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1518-L1521 "Source code on GitHub") List OAuth client created by the account @@ -4077,7 +4124,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createOAuthClient -[src/Particle.js:1536-1540](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1536-L1540 "Source code on GitHub") +[src/Particle.js:1536-1540](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1536-L1540 "Source code on GitHub") Create an OAuth client @@ -4097,7 +4144,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateOAuthClient -[src/Particle.js:1554-1558](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1554-L1558 "Source code on GitHub") +[src/Particle.js:1554-1558](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1554-L1558 "Source code on GitHub") Update an OAuth client @@ -4116,7 +4163,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteOAuthClient -[src/Particle.js:1570-1573](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1570-L1573 "Source code on GitHub") +[src/Particle.js:1570-1573](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1570-L1573 "Source code on GitHub") Delete an OAuth client @@ -4133,7 +4180,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listProducts -[src/Particle.js:1583-1585](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1583-L1585 "Source code on GitHub") +[src/Particle.js:1583-1585](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1583-L1585 "Source code on GitHub") List products the account has access to @@ -4148,7 +4195,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProduct -[src/Particle.js:1596-1598](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1596-L1598 "Source code on GitHub") +[src/Particle.js:1596-1598](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1596-L1598 "Source code on GitHub") Get detailed information about a product @@ -4164,7 +4211,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listProductFirmware -[src/Particle.js:1609-1611](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1609-L1611 "Source code on GitHub") +[src/Particle.js:1609-1611](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1609-L1611 "Source code on GitHub") List product firmware versions @@ -4180,7 +4227,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### uploadProductFirmware -[src/Particle.js:1627-1643](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1627-L1643 "Source code on GitHub") +[src/Particle.js:1627-1643](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1627-L1643 "Source code on GitHub") List product firmware versions @@ -4201,7 +4248,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductFirmware -[src/Particle.js:1655-1662](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1655-L1662 "Source code on GitHub") +[src/Particle.js:1655-1662](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1655-L1662 "Source code on GitHub") Get information about a product firmware version @@ -4218,7 +4265,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateProductFirmware -[src/Particle.js:1676-1679](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1676-L1679 "Source code on GitHub") +[src/Particle.js:1676-1679](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1676-L1679 "Source code on GitHub") Update information for a product firmware version @@ -4237,7 +4284,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadProductFirmware -[src/Particle.js:1691-1700](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1691-L1700 "Source code on GitHub") +[src/Particle.js:1691-1700](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1691-L1700 "Source code on GitHub") Download a product firmware binary @@ -4254,7 +4301,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### releaseProductFirmware -[src/Particle.js:1712-1715](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1712-L1715 "Source code on GitHub") +[src/Particle.js:1712-1715](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1712-L1715 "Source code on GitHub") Release a product firmware version as the default version @@ -4271,7 +4318,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listTeamMembers -[src/Particle.js:1726-1733](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1726-L1733 "Source code on GitHub") +[src/Particle.js:1726-1733](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1726-L1733 "Source code on GitHub") List product team members @@ -4287,7 +4334,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### inviteTeamMember -[src/Particle.js:1745-1753](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1745-L1753 "Source code on GitHub") +[src/Particle.js:1745-1753](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1745-L1753 "Source code on GitHub") Invite Particle user to a product team @@ -4304,7 +4351,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeTeamMember -[src/Particle.js:1765-1772](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1765-L1772 "Source code on GitHub") +[src/Particle.js:1765-1772](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1765-L1772 "Source code on GitHub") Remove Particle user to a product team @@ -4321,7 +4368,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### lookupSerialNumber -[src/Particle.js:1783-1790](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1783-L1790 "Source code on GitHub") +[src/Particle.js:1783-1790](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1783-L1790 "Source code on GitHub") Fetch details about a serial number @@ -4337,7 +4384,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createMeshNetwork -[src/Particle.js:1803-1811](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1803-L1811 "Source code on GitHub") +[src/Particle.js:1803-1811](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1803-L1811 "Source code on GitHub") Create a mesh network @@ -4355,7 +4402,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeMeshNetwork -[src/Particle.js:1822-1824](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1822-L1824 "Source code on GitHub") +[src/Particle.js:1822-1824](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1822-L1824 "Source code on GitHub") Remove a mesh network. @@ -4371,7 +4418,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listMeshNetworks -[src/Particle.js:1836-1839](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1836-L1839 "Source code on GitHub") +[src/Particle.js:1836-1839](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1836-L1839 "Source code on GitHub") List all mesh networks @@ -4388,7 +4435,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getMeshNetwork -[src/Particle.js:1850-1852](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1850-L1852 "Source code on GitHub") +[src/Particle.js:1850-1852](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1850-L1852 "Source code on GitHub") Get information about a mesh network. @@ -4404,7 +4451,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateMeshNetwork -[src/Particle.js:1865-1873](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1865-L1873 "Source code on GitHub") +[src/Particle.js:1865-1873](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1865-L1873 "Source code on GitHub") Modify a mesh network. @@ -4422,7 +4469,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### addMeshNetworkDevice -[src/Particle.js:1885-1894](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1885-L1894 "Source code on GitHub") +[src/Particle.js:1885-1894](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1885-L1894 "Source code on GitHub") Add a device to a mesh network. @@ -4439,7 +4486,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeMeshNetworkDevice -[src/Particle.js:1906-1922](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1906-L1922 "Source code on GitHub") +[src/Particle.js:1906-1922](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1906-L1922 "Source code on GitHub") Remove a device from a mesh network. @@ -4456,7 +4503,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listMeshNetworkDevices -[src/Particle.js:1936-1945](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1936-L1945 "Source code on GitHub") +[src/Particle.js:1936-1945](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1936-L1945 "Source code on GitHub") List all devices of a mesh network. @@ -4475,7 +4522,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductConfiguration -[src/Particle.js:1956-1963](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1956-L1963 "Source code on GitHub") +[src/Particle.js:1956-1963](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1956-L1963 "Source code on GitHub") Get product configuration @@ -4491,7 +4538,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductConfigurationSchema -[src/Particle.js:1974-1982](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1974-L1982 "Source code on GitHub") +[src/Particle.js:1974-1982](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1974-L1982 "Source code on GitHub") Get product configuration schema @@ -4507,7 +4554,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceConfiguration -[src/Particle.js:1994-2001](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1994-L2001 "Source code on GitHub") +[src/Particle.js:1994-2001](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1994-L2001 "Source code on GitHub") Get product device's configuration @@ -4524,7 +4571,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceConfigurationSchema -[src/Particle.js:2013-2021](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2013-L2021 "Source code on GitHub") +[src/Particle.js:2013-2021](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2013-L2021 "Source code on GitHub") Get product device's configuration schema @@ -4541,7 +4588,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setProductConfiguration -[src/Particle.js:2033-2041](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2033-L2041 "Source code on GitHub") +[src/Particle.js:2033-2041](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2033-L2041 "Source code on GitHub") Set product configuration @@ -4558,7 +4605,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setProductDeviceConfiguration -[src/Particle.js:2054-2062](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2054-L2062 "Source code on GitHub") +[src/Particle.js:2054-2062](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2054-L2062 "Source code on GitHub") Set product configuration for a specific device within the product @@ -4576,7 +4623,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductLocations -[src/Particle.js:2081-2098](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2081-L2098 "Source code on GitHub") +[src/Particle.js:2081-2098](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2081-L2098 "Source code on GitHub") Query location for devices within a product @@ -4600,7 +4647,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceLocations -[src/Particle.js:2115-2127](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2115-L2127 "Source code on GitHub") +[src/Particle.js:2115-2127](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2115-L2127 "Source code on GitHub") Query location for one device within a product @@ -4620,7 +4667,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### executeLogic -[src/Particle.js:2143-2151](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2143-L2151 "Source code on GitHub") +[src/Particle.js:2143-2151](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2143-L2151 "Source code on GitHub") Executes the provided logic function once and returns the result. No logs, runs, etc are saved @@ -4639,7 +4686,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createLogicFunction -[src/Particle.js:2171-2179](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2171-L2179 "Source code on GitHub") +[src/Particle.js:2171-2179](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2171-L2179 "Source code on GitHub") Creates a new logic function in the specified organization or sandbox using the provided function data. @@ -4662,7 +4709,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicFunction -[src/Particle.js:2193-2200](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2193-L2200 "Source code on GitHub") +[src/Particle.js:2193-2200](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2193-L2200 "Source code on GitHub") Get a logic function in the specified organization or sandbox by logic function ID. @@ -4679,7 +4726,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateLogicFunction -[src/Particle.js:2217-2225](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2217-L2225 "Source code on GitHub") +[src/Particle.js:2217-2225](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2217-L2225 "Source code on GitHub") Updates an existing logic function in the specified organization or sandbox using the provided function data. @@ -4699,7 +4746,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLogicFunction -[src/Particle.js:2239-2246](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2239-L2246 "Source code on GitHub") +[src/Particle.js:2239-2246](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2239-L2246 "Source code on GitHub") Deletes a logic function in the specified organization or sandbox by logic function ID. @@ -4716,7 +4763,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLogicFunctions -[src/Particle.js:2260-2270](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2260-L2270 "Source code on GitHub") +[src/Particle.js:2260-2270](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2260-L2270 "Source code on GitHub") Lists all logic functions in the specified organization or sandbox. @@ -4733,7 +4780,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLogicRuns -[src/Particle.js:2284-2291](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2284-L2291 "Source code on GitHub") +[src/Particle.js:2284-2291](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2284-L2291 "Source code on GitHub") Lists all logic runs for the specified logic function in the specified organization or sandbox. @@ -4750,7 +4797,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicRun -[src/Particle.js:2306-2313](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2306-L2313 "Source code on GitHub") +[src/Particle.js:2306-2313](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2306-L2313 "Source code on GitHub") Retrieves a logic run by its ID for the specified logic function in the specified organization or sandbox. @@ -4768,7 +4815,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicRunLogs -[src/Particle.js:2328-2335](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2328-L2335 "Source code on GitHub") +[src/Particle.js:2328-2335](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2328-L2335 "Source code on GitHub") Retrieves the logs for a logic run by its ID for the specified logic function in the specified organization or sandbox. @@ -4786,7 +4833,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createLedger -[src/Particle.js:2349-2357](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2349-L2357 "Source code on GitHub") +[src/Particle.js:2349-2357](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2349-L2357 "Source code on GitHub") Creates a new ledger definition in the specified organization or sandbox. @@ -4803,7 +4850,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLedger -[src/Particle.js:2371-2378](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2371-L2378 "Source code on GitHub") +[src/Particle.js:2371-2378](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2371-L2378 "Source code on GitHub") Get a ledger definition in the specified organization or sandbox by ledger name. @@ -4820,7 +4867,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateLedger -[src/Particle.js:2393-2401](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2393-L2401 "Source code on GitHub") +[src/Particle.js:2393-2401](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2393-L2401 "Source code on GitHub") Updates an existing ledger definition in the specified organization or sandbox. @@ -4838,7 +4885,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### archiveLedger -[src/Particle.js:2415-2422](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2415-L2422 "Source code on GitHub") +[src/Particle.js:2415-2422](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2415-L2422 "Source code on GitHub") Archives a ledger definition in the specified organization or sandbox by ledger name. @@ -4855,7 +4902,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### Scope -[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2443-L2456 "Source code on GitHub") +[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2443-L2456 "Source code on GitHub") Type: (`"Owner"` \| `"Product"` \| `"Device"`) @@ -4873,7 +4920,7 @@ Type: (`"Owner"` \| `"Product"` \| `"Device"`) ### listLedgers -[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2443-L2456 "Source code on GitHub") +[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2443-L2456 "Source code on GitHub") Lists all ledger definitions in the specified organization or sandbox. @@ -4893,7 +4940,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLedgerInstance -[src/Particle.js:2471-2478](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2471-L2478 "Source code on GitHub") +[src/Particle.js:2471-2478](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2471-L2478 "Source code on GitHub") Get ledger instance data. @@ -4911,7 +4958,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setLedgerInstance -[src/Particle.js:2494-2502](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2494-L2502 "Source code on GitHub") +[src/Particle.js:2494-2502](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2494-L2502 "Source code on GitHub") Set ledger instance data. @@ -4930,7 +4977,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLedgerInstance -[src/Particle.js:2517-2524](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2517-L2524 "Source code on GitHub") +[src/Particle.js:2517-2524](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2517-L2524 "Source code on GitHub") Delete a ledger instance in the specified organization or sandbox by ledger name. @@ -4948,7 +4995,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLedgerInstances -[src/Particle.js:2540-2551](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2540-L2551 "Source code on GitHub") +[src/Particle.js:2540-2551](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2540-L2551 "Source code on GitHub") Lists ledger instances in the specified organization or sandbox. @@ -4965,9 +5012,48 @@ Lists ledger instances in the specified organization or sandbox. Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to an array of ledger instance data. +### listLedgerInstanceVersions + +[src/Particle.js:2568-2579](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2568-L2579 "Source code on GitHub") + +List ledger instance versions + +**Parameters** + +- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger instance. + - `options.auth` **Auth?** The access token or basic auth object. Can be ignored if provided in constructor + - `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account. + - `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name. + - `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value. + - `options.replacedBefore` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** ISO date string to filter to instances replaced before this time + - `options.replacedAfter` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** ISO date string to filter to instances replaced after this time + - `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. + - `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context + +Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to an array of ledger instance data. + +### getLedgerInstanceVersion + +[src/Particle.js:2595-2602](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2595-L2602 "Source code on GitHub") + +Get specific ledger instance version + +**Parameters** + +- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger instance. + - `options.auth` **Auth?** The access token or basic auth object. Can be ignored if provided in constructor + - `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account. + - `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name. + - `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value. + - `options.version` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Version of the ledger instance + - `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. + - `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context + +Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to the specified ledger instance data. + ### setDefaultAuth -[src/Particle.js:2558-2566](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2558-L2566 "Source code on GitHub") +[src/Particle.js:2609-2617](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2609-L2617 "Source code on GitHub") Set default auth token that will be used in each method if `auth` is not provided @@ -4980,7 +5066,7 @@ Set default auth token that will be used in each method if `auth` is not provide ### get -[src/Particle.js:2609-2613](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2609-L2613 "Source code on GitHub") +[src/Particle.js:2660-2664](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2660-L2664 "Source code on GitHub") Make a GET request @@ -4997,7 +5083,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### head -[src/Particle.js:2625-2629](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2625-L2629 "Source code on GitHub") +[src/Particle.js:2676-2680](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2676-L2680 "Source code on GitHub") Make a HEAD request @@ -5014,7 +5100,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### post -[src/Particle.js:2641-2645](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2641-L2645 "Source code on GitHub") +[src/Particle.js:2692-2696](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2692-L2696 "Source code on GitHub") Make a POST request @@ -5031,7 +5117,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### put -[src/Particle.js:2657-2661](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2657-L2661 "Source code on GitHub") +[src/Particle.js:2708-2712](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2708-L2712 "Source code on GitHub") Make a PUT request @@ -5048,7 +5134,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### delete -[src/Particle.js:2673-2677](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2673-L2677 "Source code on GitHub") +[src/Particle.js:2724-2728](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2724-L2728 "Source code on GitHub") Make a DELETE request @@ -5065,7 +5151,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### request -[src/Particle.js:2694-2698](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2694-L2698 "Source code on GitHub") +[src/Particle.js:2745-2749](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2745-L2749 "Source code on GitHub") **Parameters** @@ -5085,7 +5171,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ## Particle -[src/Particle.js:26-2710](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L26-L2710 "Source code on GitHub") +[src/Particle.js:26-2761](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L26-L2761 "Source code on GitHub") **Parameters** @@ -5093,7 +5179,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### constructor -[src/Particle.js:39-48](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L39-L48 "Source code on GitHub") +[src/Particle.js:39-48](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L39-L48 "Source code on GitHub") Contructor for the Cloud API wrapper. @@ -5110,7 +5196,7 @@ Create a new Particle object and call methods below on it. ### login -[src/Particle.js:85-102](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L85-L102 "Source code on GitHub") +[src/Particle.js:85-102](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L85-L102 "Source code on GitHub") Login to Particle Cloud using an existing Particle acccount. @@ -5127,7 +5213,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### sendOtp -[src/Particle.js:113-129](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L113-L129 "Source code on GitHub") +[src/Particle.js:113-129](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L113-L129 "Source code on GitHub") If login failed with an 'mfa_required' error, this must be called with a valid OTP code to login @@ -5143,7 +5229,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### enableMfa -[src/Particle.js:139-141](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L139-L141 "Source code on GitHub") +[src/Particle.js:139-141](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L139-L141 "Source code on GitHub") Enable MFA on the currently logged in user @@ -5158,7 +5244,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### confirmMfa -[src/Particle.js:154-168](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L154-L168 "Source code on GitHub") +[src/Particle.js:154-168](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L154-L168 "Source code on GitHub") 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. @@ -5176,7 +5262,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### disableMfa -[src/Particle.js:179-187](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L179-L187 "Source code on GitHub") +[src/Particle.js:179-187](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L179-L187 "Source code on GitHub") Disable MFA for the user. @@ -5192,7 +5278,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createCustomer -[src/Particle.js:199-215](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L199-L215 "Source code on GitHub") +[src/Particle.js:199-215](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L199-L215 "Source code on GitHub") Create Customer for Product. @@ -5209,7 +5295,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### loginAsClientOwner -[src/Particle.js:224-238](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L224-L238 "Source code on GitHub") +[src/Particle.js:224-238](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L224-L238 "Source code on GitHub") Login to Particle Cloud using an OAuth client. @@ -5223,7 +5309,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createUser -[src/Particle.js:250-261](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L250-L261 "Source code on GitHub") +[src/Particle.js:250-261](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L250-L261 "Source code on GitHub") Create a user account for the Particle Cloud @@ -5240,7 +5326,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### verifyUser -[src/Particle.js:271-278](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L271-L278 "Source code on GitHub") +[src/Particle.js:271-278](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L271-L278 "Source code on GitHub") Verify new user account via verification email @@ -5255,7 +5341,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### resetPassword -[src/Particle.js:288-295](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L288-L295 "Source code on GitHub") +[src/Particle.js:288-295](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L288-L295 "Source code on GitHub") Send reset password email for a Particle Cloud user account @@ -5270,7 +5356,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteAccessToken -[src/Particle.js:307-315](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L307-L315 "Source code on GitHub") +[src/Particle.js:307-315](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L307-L315 "Source code on GitHub") Revoke an access token @@ -5287,7 +5373,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteCurrentAccessToken -[src/Particle.js:325-332](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L325-L332 "Source code on GitHub") +[src/Particle.js:325-332](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L325-L332 "Source code on GitHub") Revoke the current session access token @@ -5302,7 +5388,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteActiveAccessTokens -[src/Particle.js:342-349](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L342-L349 "Source code on GitHub") +[src/Particle.js:342-349](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L342-L349 "Source code on GitHub") Revoke all active access tokens @@ -5317,7 +5403,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteUser -[src/Particle.js:360-368](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L360-L368 "Source code on GitHub") +[src/Particle.js:360-368](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L360-L368 "Source code on GitHub") Delete the current user @@ -5333,7 +5419,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listAccessTokens -[src/Particle.js:380-388](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L380-L388 "Source code on GitHub") +[src/Particle.js:380-388](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L380-L388 "Source code on GitHub") List all valid access tokens for a Particle Cloud account @@ -5350,7 +5436,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### trackingIdentity -[src/Particle.js:400-408](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L400-L408 "Source code on GitHub") +[src/Particle.js:400-408](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L400-L408 "Source code on GitHub") Retrieves the information that is used to identify the current login for tracking. @@ -5367,7 +5453,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listDevices -[src/Particle.js:426-445](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L426-L445 "Source code on GitHub") +[src/Particle.js:426-445](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L426-L445 "Source code on GitHub") List devices claimed to the account or product @@ -5390,7 +5476,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getDevice -[src/Particle.js:457-460](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L457-L460 "Source code on GitHub") +[src/Particle.js:457-460](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L457-L460 "Source code on GitHub") Get detailed informationa about a device @@ -5407,7 +5493,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### claimDevice -[src/Particle.js:472-483](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L472-L483 "Source code on GitHub") +[src/Particle.js:472-483](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L472-L483 "Source code on GitHub") Claim a device to the account. The device must be online and unclaimed. @@ -5424,7 +5510,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### addDeviceToProduct -[src/Particle.js:497-515](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L497-L515 "Source code on GitHub") +[src/Particle.js:497-515](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L497-L515 "Source code on GitHub") Add a device to a product or move device out of quarantine. @@ -5443,7 +5529,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeDevice -[src/Particle.js:528-532](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L528-L532 "Source code on GitHub") +[src/Particle.js:528-532](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L528-L532 "Source code on GitHub") Unclaim / Remove a device from your account or product, or deny quarantine @@ -5461,7 +5547,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeDeviceOwner -[src/Particle.js:544-547](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L544-L547 "Source code on GitHub") +[src/Particle.js:544-547](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L544-L547 "Source code on GitHub") Unclaim a product device its the owner, but keep it in the product @@ -5478,7 +5564,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### renameDevice -[src/Particle.js:560-562](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L560-L562 "Source code on GitHub") +[src/Particle.js:560-562](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L560-L562 "Source code on GitHub") Rename a device @@ -5496,7 +5582,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### signalDevice -[src/Particle.js:575-577](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L575-L577 "Source code on GitHub") +[src/Particle.js:575-577](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L575-L577 "Source code on GitHub") Instruct the device to turn on/off the LED in a rainbow pattern @@ -5514,7 +5600,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setDeviceNotes -[src/Particle.js:590-592](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L590-L592 "Source code on GitHub") +[src/Particle.js:590-592](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L590-L592 "Source code on GitHub") Store some notes about device @@ -5532,7 +5618,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### markAsDevelopmentDevice -[src/Particle.js:605-607](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L605-L607 "Source code on GitHub") +[src/Particle.js:605-607](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L605-L607 "Source code on GitHub") Mark device as being used in development of a product so it opts out of automatic firmware updates @@ -5550,7 +5636,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### lockDeviceProductFirmware -[src/Particle.js:621-623](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L621-L623 "Source code on GitHub") +[src/Particle.js:621-623](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L621-L623 "Source code on GitHub") Mark device as being used in development of a product, so it opts out of automatic firmware updates @@ -5569,7 +5655,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### unlockDeviceProductFirmware -[src/Particle.js:635-637](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L635-L637 "Source code on GitHub") +[src/Particle.js:635-637](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L635-L637 "Source code on GitHub") Mark device as receiving automatic firmware updates @@ -5586,7 +5672,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateDevice -[src/Particle.js:656-668](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L656-L668 "Source code on GitHub") +[src/Particle.js:656-668](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L656-L668 "Source code on GitHub") Update multiple device attributes at the same time @@ -5610,7 +5696,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### provisionDevice -[src/Particle.js:679-687](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L679-L687 "Source code on GitHub") +[src/Particle.js:679-687](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L679-L687 "Source code on GitHub") Provision a new device for products that allow self-provisioning @@ -5626,7 +5712,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getClaimCode -[src/Particle.js:701-704](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L701-L704 "Source code on GitHub") +[src/Particle.js:701-704](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L701-L704 "Source code on GitHub") Generate a claim code to use in the device claiming process. To generate a claim code for a product, the access token MUST belong to a @@ -5645,7 +5731,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getVariable -[src/Particle.js:736-742](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L736-L742 "Source code on GitHub") +[src/Particle.js:736-742](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L736-L742 "Source code on GitHub") Get the value of a device variable @@ -5663,7 +5749,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### flashDevice -[src/Particle.js:756-767](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L756-L767 "Source code on GitHub") +[src/Particle.js:756-767](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L756-L767 "Source code on GitHub") Compile and flash application firmware to a device. Pass a pre-compiled binary to flash it directly to the device. @@ -5682,7 +5768,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### flashTinker -[src/Particle.js:778-793](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L778-L793 "Source code on GitHub") +[src/Particle.js:778-793](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L778-L793 "Source code on GitHub") DEPRECATED: Flash the Tinker application to a device. Instead compile and flash the Tinker source code. @@ -5698,7 +5784,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### compileCode -[src/Particle.js:806-824](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L806-L824 "Source code on GitHub") +[src/Particle.js:806-824](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L806-L824 "Source code on GitHub") Compile firmware using the Particle Cloud @@ -5716,7 +5802,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadFirmwareBinary -[src/Particle.js:835-844](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L835-L844 "Source code on GitHub") +[src/Particle.js:835-844](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L835-L844 "Source code on GitHub") Download a firmware binary @@ -5732,7 +5818,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### sendPublicKey -[src/Particle.js:857-871](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L857-L871 "Source code on GitHub") +[src/Particle.js:857-871](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L857-L871 "Source code on GitHub") Send a new device public key to the Particle Cloud @@ -5750,7 +5836,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### callFunction -[src/Particle.js:885-890](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L885-L890 "Source code on GitHub") +[src/Particle.js:885-890](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L885-L890 "Source code on GitHub") Call a device function @@ -5769,7 +5855,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getEventStream -[src/Particle.js:903-928](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L903-L928 "Source code on GitHub") +[src/Particle.js:903-928](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L903-L928 "Source code on GitHub") Get a stream of events @@ -5787,7 +5873,7 @@ emit 'event' events. ### publishEvent -[src/Particle.js:942-946](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L942-L946 "Source code on GitHub") +[src/Particle.js:942-946](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L942-L946 "Source code on GitHub") Publish a event to the Particle Cloud @@ -5806,7 +5892,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### Hook -[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L977-L999 "Source code on GitHub") +[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L977-L999 "Source code on GitHub") Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) @@ -5839,7 +5925,7 @@ Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference ### createWebhook -[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L977-L999 "Source code on GitHub") +[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L977-L999 "Source code on GitHub") Create a webhook @@ -5861,7 +5947,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteWebhook -[src/Particle.js:1011-1014](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1011-L1014 "Source code on GitHub") +[src/Particle.js:1011-1014](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1011-L1014 "Source code on GitHub") Delete a webhook @@ -5878,7 +5964,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listWebhooks -[src/Particle.js:1025-1028](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1025-L1028 "Source code on GitHub") +[src/Particle.js:1025-1028](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1025-L1028 "Source code on GitHub") List all webhooks owned by the account or product @@ -5894,7 +5980,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createIntegration -[src/Particle.js:1045-1049](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1045-L1049 "Source code on GitHub") +[src/Particle.js:1045-1049](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1045-L1049 "Source code on GitHub") Create an integration to send events to an external service @@ -5915,7 +6001,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### editIntegration -[src/Particle.js:1067-1071](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1067-L1071 "Source code on GitHub") +[src/Particle.js:1067-1071](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1067-L1071 "Source code on GitHub") Edit an integration to send events to an external service @@ -5937,7 +6023,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteIntegration -[src/Particle.js:1084-1087](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1084-L1087 "Source code on GitHub") +[src/Particle.js:1084-1087](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1084-L1087 "Source code on GitHub") Delete an integration to send events to an external service @@ -5954,7 +6040,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listIntegrations -[src/Particle.js:1098-1101](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1098-L1101 "Source code on GitHub") +[src/Particle.js:1098-1101](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1098-L1101 "Source code on GitHub") List all integrations owned by the account or product @@ -5970,7 +6056,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getUserInfo -[src/Particle.js:1111-1113](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1111-L1113 "Source code on GitHub") +[src/Particle.js:1111-1113](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1111-L1113 "Source code on GitHub") Get details about the current user @@ -5985,7 +6071,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setUserInfo -[src/Particle.js:1124-1127](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1124-L1127 "Source code on GitHub") +[src/Particle.js:1124-1127](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1124-L1127 "Source code on GitHub") Set details on the current user @@ -6001,7 +6087,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### changeUsername -[src/Particle.js:1140-1148](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1140-L1148 "Source code on GitHub") +[src/Particle.js:1140-1148](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1140-L1148 "Source code on GitHub") Change username (i.e, email) @@ -6019,7 +6105,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### changeUserPassword -[src/Particle.js:1161-1169](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1161-L1169 "Source code on GitHub") +[src/Particle.js:1161-1169](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1161-L1169 "Source code on GitHub") Change user's password @@ -6037,7 +6123,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listSIMs -[src/Particle.js:1185-1189](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1185-L1189 "Source code on GitHub") +[src/Particle.js:1185-1189](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1185-L1189 "Source code on GitHub") List SIM cards owned by a user or product @@ -6058,7 +6144,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getSIMDataUsage -[src/Particle.js:1201-1207](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1201-L1207 "Source code on GitHub") +[src/Particle.js:1201-1207](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1201-L1207 "Source code on GitHub") Get data usage for one SIM card for the current billing period @@ -6075,7 +6161,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getFleetDataUsage -[src/Particle.js:1218-1225](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1218-L1225 "Source code on GitHub") +[src/Particle.js:1218-1225](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1218-L1225 "Source code on GitHub") Get data usage for all SIM cards in a product the current billing period @@ -6091,7 +6177,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### checkSIM -[src/Particle.js:1236-1238](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1236-L1238 "Source code on GitHub") +[src/Particle.js:1236-1238](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1236-L1238 "Source code on GitHub") Check SIM status @@ -6107,7 +6193,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### activateSIM -[src/Particle.js:1253-1263](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1253-L1263 "Source code on GitHub") +[src/Particle.js:1253-1263](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1253-L1263 "Source code on GitHub") Activate and add SIM cards to an account or product @@ -6127,7 +6213,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deactivateSIM -[src/Particle.js:1275-1279](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1275-L1279 "Source code on GitHub") +[src/Particle.js:1275-1279](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1275-L1279 "Source code on GitHub") Deactivate a SIM card so it doesn't incur data usage in future months. @@ -6144,7 +6230,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### reactivateSIM -[src/Particle.js:1292-1296](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1292-L1296 "Source code on GitHub") +[src/Particle.js:1292-1296](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1292-L1296 "Source code on GitHub") Reactivate a SIM card the was deactivated or unpause a SIM card that was automatically paused @@ -6162,7 +6248,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateSIM -[src/Particle.js:1309-1313](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1309-L1313 "Source code on GitHub") +[src/Particle.js:1309-1313](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1309-L1313 "Source code on GitHub") Update SIM card data limit @@ -6180,7 +6266,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeSIM -[src/Particle.js:1325-1328](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1325-L1328 "Source code on GitHub") +[src/Particle.js:1325-1328](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1325-L1328 "Source code on GitHub") Remove a SIM card from an account so it can be activated by a different account @@ -6197,7 +6283,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listBuildTargets -[src/Particle.js:1339-1342](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1339-L1342 "Source code on GitHub") +[src/Particle.js:1339-1342](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1339-L1342 "Source code on GitHub") List valid build targets to be used for compiling @@ -6213,7 +6299,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLibraries -[src/Particle.js:1368-1385](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1368-L1385 "Source code on GitHub") +[src/Particle.js:1368-1385](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1368-L1385 "Source code on GitHub") List firmware libraries @@ -6243,7 +6329,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLibrary -[src/Particle.js:1401-1409](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1401-L1409 "Source code on GitHub") +[src/Particle.js:1401-1409](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1401-L1409 "Source code on GitHub") Get firmware library details @@ -6260,7 +6346,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLibraryVersions -[src/Particle.js:1422-1430](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1422-L1430 "Source code on GitHub") +[src/Particle.js:1422-1430](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1422-L1430 "Source code on GitHub") Firmware library details for each version @@ -6278,7 +6364,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### contributeLibrary -[src/Particle.js:1442-1455](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1442-L1455 "Source code on GitHub") +[src/Particle.js:1442-1455](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1442-L1455 "Source code on GitHub") Contribute a new library version from a compressed archive @@ -6295,7 +6381,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### publishLibrary -[src/Particle.js:1466-1475](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1466-L1475 "Source code on GitHub") +[src/Particle.js:1466-1475](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1466-L1475 "Source code on GitHub") Publish the latest version of a library to the public @@ -6311,7 +6397,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLibrary -[src/Particle.js:1487-1495](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1487-L1495 "Source code on GitHub") +[src/Particle.js:1487-1495](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1487-L1495 "Source code on GitHub") Delete one version of a library or an entire private library @@ -6328,7 +6414,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadFile -[src/Particle.js:1505-1507](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1505-L1507 "Source code on GitHub") +[src/Particle.js:1505-1507](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1505-L1507 "Source code on GitHub") Download an external file that may not be on the API @@ -6343,7 +6429,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listOAuthClients -[src/Particle.js:1518-1521](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1518-L1521 "Source code on GitHub") +[src/Particle.js:1518-1521](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1518-L1521 "Source code on GitHub") List OAuth client created by the account @@ -6359,7 +6445,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createOAuthClient -[src/Particle.js:1536-1540](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1536-L1540 "Source code on GitHub") +[src/Particle.js:1536-1540](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1536-L1540 "Source code on GitHub") Create an OAuth client @@ -6379,7 +6465,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateOAuthClient -[src/Particle.js:1554-1558](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1554-L1558 "Source code on GitHub") +[src/Particle.js:1554-1558](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1554-L1558 "Source code on GitHub") Update an OAuth client @@ -6398,7 +6484,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteOAuthClient -[src/Particle.js:1570-1573](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1570-L1573 "Source code on GitHub") +[src/Particle.js:1570-1573](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1570-L1573 "Source code on GitHub") Delete an OAuth client @@ -6415,7 +6501,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listProducts -[src/Particle.js:1583-1585](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1583-L1585 "Source code on GitHub") +[src/Particle.js:1583-1585](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1583-L1585 "Source code on GitHub") List products the account has access to @@ -6430,7 +6516,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProduct -[src/Particle.js:1596-1598](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1596-L1598 "Source code on GitHub") +[src/Particle.js:1596-1598](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1596-L1598 "Source code on GitHub") Get detailed information about a product @@ -6446,7 +6532,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listProductFirmware -[src/Particle.js:1609-1611](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1609-L1611 "Source code on GitHub") +[src/Particle.js:1609-1611](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1609-L1611 "Source code on GitHub") List product firmware versions @@ -6462,7 +6548,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### uploadProductFirmware -[src/Particle.js:1627-1643](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1627-L1643 "Source code on GitHub") +[src/Particle.js:1627-1643](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1627-L1643 "Source code on GitHub") List product firmware versions @@ -6483,7 +6569,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductFirmware -[src/Particle.js:1655-1662](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1655-L1662 "Source code on GitHub") +[src/Particle.js:1655-1662](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1655-L1662 "Source code on GitHub") Get information about a product firmware version @@ -6500,7 +6586,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateProductFirmware -[src/Particle.js:1676-1679](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1676-L1679 "Source code on GitHub") +[src/Particle.js:1676-1679](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1676-L1679 "Source code on GitHub") Update information for a product firmware version @@ -6519,7 +6605,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadProductFirmware -[src/Particle.js:1691-1700](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1691-L1700 "Source code on GitHub") +[src/Particle.js:1691-1700](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1691-L1700 "Source code on GitHub") Download a product firmware binary @@ -6536,7 +6622,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### releaseProductFirmware -[src/Particle.js:1712-1715](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1712-L1715 "Source code on GitHub") +[src/Particle.js:1712-1715](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1712-L1715 "Source code on GitHub") Release a product firmware version as the default version @@ -6553,7 +6639,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listTeamMembers -[src/Particle.js:1726-1733](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1726-L1733 "Source code on GitHub") +[src/Particle.js:1726-1733](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1726-L1733 "Source code on GitHub") List product team members @@ -6569,7 +6655,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### inviteTeamMember -[src/Particle.js:1745-1753](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1745-L1753 "Source code on GitHub") +[src/Particle.js:1745-1753](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1745-L1753 "Source code on GitHub") Invite Particle user to a product team @@ -6586,7 +6672,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeTeamMember -[src/Particle.js:1765-1772](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1765-L1772 "Source code on GitHub") +[src/Particle.js:1765-1772](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1765-L1772 "Source code on GitHub") Remove Particle user to a product team @@ -6603,7 +6689,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### lookupSerialNumber -[src/Particle.js:1783-1790](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1783-L1790 "Source code on GitHub") +[src/Particle.js:1783-1790](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1783-L1790 "Source code on GitHub") Fetch details about a serial number @@ -6619,7 +6705,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createMeshNetwork -[src/Particle.js:1803-1811](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1803-L1811 "Source code on GitHub") +[src/Particle.js:1803-1811](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1803-L1811 "Source code on GitHub") Create a mesh network @@ -6637,7 +6723,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeMeshNetwork -[src/Particle.js:1822-1824](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1822-L1824 "Source code on GitHub") +[src/Particle.js:1822-1824](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1822-L1824 "Source code on GitHub") Remove a mesh network. @@ -6653,7 +6739,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listMeshNetworks -[src/Particle.js:1836-1839](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1836-L1839 "Source code on GitHub") +[src/Particle.js:1836-1839](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1836-L1839 "Source code on GitHub") List all mesh networks @@ -6670,7 +6756,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getMeshNetwork -[src/Particle.js:1850-1852](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1850-L1852 "Source code on GitHub") +[src/Particle.js:1850-1852](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1850-L1852 "Source code on GitHub") Get information about a mesh network. @@ -6686,7 +6772,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateMeshNetwork -[src/Particle.js:1865-1873](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1865-L1873 "Source code on GitHub") +[src/Particle.js:1865-1873](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1865-L1873 "Source code on GitHub") Modify a mesh network. @@ -6704,7 +6790,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### addMeshNetworkDevice -[src/Particle.js:1885-1894](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1885-L1894 "Source code on GitHub") +[src/Particle.js:1885-1894](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1885-L1894 "Source code on GitHub") Add a device to a mesh network. @@ -6721,7 +6807,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeMeshNetworkDevice -[src/Particle.js:1906-1922](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1906-L1922 "Source code on GitHub") +[src/Particle.js:1906-1922](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1906-L1922 "Source code on GitHub") Remove a device from a mesh network. @@ -6738,7 +6824,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listMeshNetworkDevices -[src/Particle.js:1936-1945](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1936-L1945 "Source code on GitHub") +[src/Particle.js:1936-1945](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1936-L1945 "Source code on GitHub") List all devices of a mesh network. @@ -6757,7 +6843,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductConfiguration -[src/Particle.js:1956-1963](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1956-L1963 "Source code on GitHub") +[src/Particle.js:1956-1963](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1956-L1963 "Source code on GitHub") Get product configuration @@ -6773,7 +6859,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductConfigurationSchema -[src/Particle.js:1974-1982](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1974-L1982 "Source code on GitHub") +[src/Particle.js:1974-1982](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1974-L1982 "Source code on GitHub") Get product configuration schema @@ -6789,7 +6875,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceConfiguration -[src/Particle.js:1994-2001](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1994-L2001 "Source code on GitHub") +[src/Particle.js:1994-2001](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1994-L2001 "Source code on GitHub") Get product device's configuration @@ -6806,7 +6892,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceConfigurationSchema -[src/Particle.js:2013-2021](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2013-L2021 "Source code on GitHub") +[src/Particle.js:2013-2021](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2013-L2021 "Source code on GitHub") Get product device's configuration schema @@ -6823,7 +6909,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setProductConfiguration -[src/Particle.js:2033-2041](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2033-L2041 "Source code on GitHub") +[src/Particle.js:2033-2041](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2033-L2041 "Source code on GitHub") Set product configuration @@ -6840,7 +6926,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setProductDeviceConfiguration -[src/Particle.js:2054-2062](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2054-L2062 "Source code on GitHub") +[src/Particle.js:2054-2062](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2054-L2062 "Source code on GitHub") Set product configuration for a specific device within the product @@ -6858,7 +6944,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductLocations -[src/Particle.js:2081-2098](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2081-L2098 "Source code on GitHub") +[src/Particle.js:2081-2098](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2081-L2098 "Source code on GitHub") Query location for devices within a product @@ -6882,7 +6968,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceLocations -[src/Particle.js:2115-2127](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2115-L2127 "Source code on GitHub") +[src/Particle.js:2115-2127](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2115-L2127 "Source code on GitHub") Query location for one device within a product @@ -6902,7 +6988,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### executeLogic -[src/Particle.js:2143-2151](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2143-L2151 "Source code on GitHub") +[src/Particle.js:2143-2151](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2143-L2151 "Source code on GitHub") Executes the provided logic function once and returns the result. No logs, runs, etc are saved @@ -6921,7 +7007,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createLogicFunction -[src/Particle.js:2171-2179](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2171-L2179 "Source code on GitHub") +[src/Particle.js:2171-2179](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2171-L2179 "Source code on GitHub") Creates a new logic function in the specified organization or sandbox using the provided function data. @@ -6944,7 +7030,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicFunction -[src/Particle.js:2193-2200](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2193-L2200 "Source code on GitHub") +[src/Particle.js:2193-2200](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2193-L2200 "Source code on GitHub") Get a logic function in the specified organization or sandbox by logic function ID. @@ -6961,7 +7047,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateLogicFunction -[src/Particle.js:2217-2225](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2217-L2225 "Source code on GitHub") +[src/Particle.js:2217-2225](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2217-L2225 "Source code on GitHub") Updates an existing logic function in the specified organization or sandbox using the provided function data. @@ -6981,7 +7067,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLogicFunction -[src/Particle.js:2239-2246](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2239-L2246 "Source code on GitHub") +[src/Particle.js:2239-2246](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2239-L2246 "Source code on GitHub") Deletes a logic function in the specified organization or sandbox by logic function ID. @@ -6998,7 +7084,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLogicFunctions -[src/Particle.js:2260-2270](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2260-L2270 "Source code on GitHub") +[src/Particle.js:2260-2270](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2260-L2270 "Source code on GitHub") Lists all logic functions in the specified organization or sandbox. @@ -7015,7 +7101,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLogicRuns -[src/Particle.js:2284-2291](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2284-L2291 "Source code on GitHub") +[src/Particle.js:2284-2291](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2284-L2291 "Source code on GitHub") Lists all logic runs for the specified logic function in the specified organization or sandbox. @@ -7032,7 +7118,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicRun -[src/Particle.js:2306-2313](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2306-L2313 "Source code on GitHub") +[src/Particle.js:2306-2313](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2306-L2313 "Source code on GitHub") Retrieves a logic run by its ID for the specified logic function in the specified organization or sandbox. @@ -7050,7 +7136,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicRunLogs -[src/Particle.js:2328-2335](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2328-L2335 "Source code on GitHub") +[src/Particle.js:2328-2335](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2328-L2335 "Source code on GitHub") Retrieves the logs for a logic run by its ID for the specified logic function in the specified organization or sandbox. @@ -7068,7 +7154,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createLedger -[src/Particle.js:2349-2357](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2349-L2357 "Source code on GitHub") +[src/Particle.js:2349-2357](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2349-L2357 "Source code on GitHub") Creates a new ledger definition in the specified organization or sandbox. @@ -7085,7 +7171,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLedger -[src/Particle.js:2371-2378](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2371-L2378 "Source code on GitHub") +[src/Particle.js:2371-2378](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2371-L2378 "Source code on GitHub") Get a ledger definition in the specified organization or sandbox by ledger name. @@ -7102,7 +7188,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateLedger -[src/Particle.js:2393-2401](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2393-L2401 "Source code on GitHub") +[src/Particle.js:2393-2401](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2393-L2401 "Source code on GitHub") Updates an existing ledger definition in the specified organization or sandbox. @@ -7120,7 +7206,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### archiveLedger -[src/Particle.js:2415-2422](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2415-L2422 "Source code on GitHub") +[src/Particle.js:2415-2422](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2415-L2422 "Source code on GitHub") Archives a ledger definition in the specified organization or sandbox by ledger name. @@ -7137,7 +7223,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### Scope -[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2443-L2456 "Source code on GitHub") +[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2443-L2456 "Source code on GitHub") Type: (`"Owner"` \| `"Product"` \| `"Device"`) @@ -7155,7 +7241,7 @@ Type: (`"Owner"` \| `"Product"` \| `"Device"`) ### listLedgers -[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2443-L2456 "Source code on GitHub") +[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2443-L2456 "Source code on GitHub") Lists all ledger definitions in the specified organization or sandbox. @@ -7175,7 +7261,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLedgerInstance -[src/Particle.js:2471-2478](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2471-L2478 "Source code on GitHub") +[src/Particle.js:2471-2478](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2471-L2478 "Source code on GitHub") Get ledger instance data. @@ -7193,7 +7279,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setLedgerInstance -[src/Particle.js:2494-2502](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2494-L2502 "Source code on GitHub") +[src/Particle.js:2494-2502](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2494-L2502 "Source code on GitHub") Set ledger instance data. @@ -7212,7 +7298,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLedgerInstance -[src/Particle.js:2517-2524](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2517-L2524 "Source code on GitHub") +[src/Particle.js:2517-2524](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2517-L2524 "Source code on GitHub") Delete a ledger instance in the specified organization or sandbox by ledger name. @@ -7230,7 +7316,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLedgerInstances -[src/Particle.js:2540-2551](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2540-L2551 "Source code on GitHub") +[src/Particle.js:2540-2551](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2540-L2551 "Source code on GitHub") Lists ledger instances in the specified organization or sandbox. @@ -7247,9 +7333,48 @@ Lists ledger instances in the specified organization or sandbox. Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to an array of ledger instance data. +### listLedgerInstanceVersions + +[src/Particle.js:2568-2579](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2568-L2579 "Source code on GitHub") + +List ledger instance versions + +**Parameters** + +- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger instance. + - `options.auth` **Auth?** The access token or basic auth object. Can be ignored if provided in constructor + - `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account. + - `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name. + - `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value. + - `options.replacedBefore` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** ISO date string to filter to instances replaced before this time + - `options.replacedAfter` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** ISO date string to filter to instances replaced after this time + - `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. + - `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context + +Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to an array of ledger instance data. + +### getLedgerInstanceVersion + +[src/Particle.js:2595-2602](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2595-L2602 "Source code on GitHub") + +Get specific ledger instance version + +**Parameters** + +- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger instance. + - `options.auth` **Auth?** The access token or basic auth object. Can be ignored if provided in constructor + - `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account. + - `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name. + - `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value. + - `options.version` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Version of the ledger instance + - `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. + - `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context + +Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to the specified ledger instance data. + ### setDefaultAuth -[src/Particle.js:2558-2566](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2558-L2566 "Source code on GitHub") +[src/Particle.js:2609-2617](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2609-L2617 "Source code on GitHub") Set default auth token that will be used in each method if `auth` is not provided @@ -7262,7 +7387,7 @@ Set default auth token that will be used in each method if `auth` is not provide ### get -[src/Particle.js:2609-2613](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2609-L2613 "Source code on GitHub") +[src/Particle.js:2660-2664](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2660-L2664 "Source code on GitHub") Make a GET request @@ -7279,7 +7404,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### head -[src/Particle.js:2625-2629](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2625-L2629 "Source code on GitHub") +[src/Particle.js:2676-2680](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2676-L2680 "Source code on GitHub") Make a HEAD request @@ -7296,7 +7421,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### post -[src/Particle.js:2641-2645](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2641-L2645 "Source code on GitHub") +[src/Particle.js:2692-2696](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2692-L2696 "Source code on GitHub") Make a POST request @@ -7313,7 +7438,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### put -[src/Particle.js:2657-2661](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2657-L2661 "Source code on GitHub") +[src/Particle.js:2708-2712](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2708-L2712 "Source code on GitHub") Make a PUT request @@ -7330,7 +7455,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### delete -[src/Particle.js:2673-2677](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2673-L2677 "Source code on GitHub") +[src/Particle.js:2724-2728](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2724-L2728 "Source code on GitHub") Make a DELETE request @@ -7347,7 +7472,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### request -[src/Particle.js:2694-2698](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2694-L2698 "Source code on GitHub") +[src/Particle.js:2745-2749](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2745-L2749 "Source code on GitHub") **Parameters** @@ -7367,7 +7492,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ## Particle -[src/Particle.js:26-2710](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L26-L2710 "Source code on GitHub") +[src/Particle.js:26-2761](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L26-L2761 "Source code on GitHub") Particle Cloud API wrapper. @@ -7383,7 +7508,7 @@ Most Particle methods take a single unnamed argument object documented as ### constructor -[src/Particle.js:39-48](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L39-L48 "Source code on GitHub") +[src/Particle.js:39-48](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L39-L48 "Source code on GitHub") Contructor for the Cloud API wrapper. @@ -7400,7 +7525,7 @@ Create a new Particle object and call methods below on it. ### login -[src/Particle.js:85-102](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L85-L102 "Source code on GitHub") +[src/Particle.js:85-102](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L85-L102 "Source code on GitHub") Login to Particle Cloud using an existing Particle acccount. @@ -7417,7 +7542,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### sendOtp -[src/Particle.js:113-129](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L113-L129 "Source code on GitHub") +[src/Particle.js:113-129](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L113-L129 "Source code on GitHub") If login failed with an 'mfa_required' error, this must be called with a valid OTP code to login @@ -7433,7 +7558,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### enableMfa -[src/Particle.js:139-141](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L139-L141 "Source code on GitHub") +[src/Particle.js:139-141](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L139-L141 "Source code on GitHub") Enable MFA on the currently logged in user @@ -7448,7 +7573,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### confirmMfa -[src/Particle.js:154-168](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L154-L168 "Source code on GitHub") +[src/Particle.js:154-168](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L154-L168 "Source code on GitHub") 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. @@ -7466,7 +7591,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### disableMfa -[src/Particle.js:179-187](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L179-L187 "Source code on GitHub") +[src/Particle.js:179-187](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L179-L187 "Source code on GitHub") Disable MFA for the user. @@ -7482,7 +7607,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createCustomer -[src/Particle.js:199-215](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L199-L215 "Source code on GitHub") +[src/Particle.js:199-215](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L199-L215 "Source code on GitHub") Create Customer for Product. @@ -7499,7 +7624,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### loginAsClientOwner -[src/Particle.js:224-238](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L224-L238 "Source code on GitHub") +[src/Particle.js:224-238](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L224-L238 "Source code on GitHub") Login to Particle Cloud using an OAuth client. @@ -7513,7 +7638,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createUser -[src/Particle.js:250-261](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L250-L261 "Source code on GitHub") +[src/Particle.js:250-261](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L250-L261 "Source code on GitHub") Create a user account for the Particle Cloud @@ -7530,7 +7655,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### verifyUser -[src/Particle.js:271-278](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L271-L278 "Source code on GitHub") +[src/Particle.js:271-278](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L271-L278 "Source code on GitHub") Verify new user account via verification email @@ -7545,7 +7670,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### resetPassword -[src/Particle.js:288-295](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L288-L295 "Source code on GitHub") +[src/Particle.js:288-295](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L288-L295 "Source code on GitHub") Send reset password email for a Particle Cloud user account @@ -7560,7 +7685,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteAccessToken -[src/Particle.js:307-315](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L307-L315 "Source code on GitHub") +[src/Particle.js:307-315](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L307-L315 "Source code on GitHub") Revoke an access token @@ -7577,7 +7702,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteCurrentAccessToken -[src/Particle.js:325-332](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L325-L332 "Source code on GitHub") +[src/Particle.js:325-332](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L325-L332 "Source code on GitHub") Revoke the current session access token @@ -7592,7 +7717,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteActiveAccessTokens -[src/Particle.js:342-349](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L342-L349 "Source code on GitHub") +[src/Particle.js:342-349](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L342-L349 "Source code on GitHub") Revoke all active access tokens @@ -7607,7 +7732,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteUser -[src/Particle.js:360-368](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L360-L368 "Source code on GitHub") +[src/Particle.js:360-368](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L360-L368 "Source code on GitHub") Delete the current user @@ -7623,7 +7748,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listAccessTokens -[src/Particle.js:380-388](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L380-L388 "Source code on GitHub") +[src/Particle.js:380-388](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L380-L388 "Source code on GitHub") List all valid access tokens for a Particle Cloud account @@ -7640,7 +7765,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### trackingIdentity -[src/Particle.js:400-408](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L400-L408 "Source code on GitHub") +[src/Particle.js:400-408](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L400-L408 "Source code on GitHub") Retrieves the information that is used to identify the current login for tracking. @@ -7657,7 +7782,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listDevices -[src/Particle.js:426-445](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L426-L445 "Source code on GitHub") +[src/Particle.js:426-445](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L426-L445 "Source code on GitHub") List devices claimed to the account or product @@ -7680,7 +7805,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getDevice -[src/Particle.js:457-460](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L457-L460 "Source code on GitHub") +[src/Particle.js:457-460](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L457-L460 "Source code on GitHub") Get detailed informationa about a device @@ -7697,7 +7822,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### claimDevice -[src/Particle.js:472-483](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L472-L483 "Source code on GitHub") +[src/Particle.js:472-483](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L472-L483 "Source code on GitHub") Claim a device to the account. The device must be online and unclaimed. @@ -7714,7 +7839,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### addDeviceToProduct -[src/Particle.js:497-515](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L497-L515 "Source code on GitHub") +[src/Particle.js:497-515](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L497-L515 "Source code on GitHub") Add a device to a product or move device out of quarantine. @@ -7733,7 +7858,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeDevice -[src/Particle.js:528-532](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L528-L532 "Source code on GitHub") +[src/Particle.js:528-532](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L528-L532 "Source code on GitHub") Unclaim / Remove a device from your account or product, or deny quarantine @@ -7751,7 +7876,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeDeviceOwner -[src/Particle.js:544-547](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L544-L547 "Source code on GitHub") +[src/Particle.js:544-547](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L544-L547 "Source code on GitHub") Unclaim a product device its the owner, but keep it in the product @@ -7768,7 +7893,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### renameDevice -[src/Particle.js:560-562](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L560-L562 "Source code on GitHub") +[src/Particle.js:560-562](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L560-L562 "Source code on GitHub") Rename a device @@ -7786,7 +7911,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### signalDevice -[src/Particle.js:575-577](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L575-L577 "Source code on GitHub") +[src/Particle.js:575-577](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L575-L577 "Source code on GitHub") Instruct the device to turn on/off the LED in a rainbow pattern @@ -7804,7 +7929,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setDeviceNotes -[src/Particle.js:590-592](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L590-L592 "Source code on GitHub") +[src/Particle.js:590-592](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L590-L592 "Source code on GitHub") Store some notes about device @@ -7822,7 +7947,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### markAsDevelopmentDevice -[src/Particle.js:605-607](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L605-L607 "Source code on GitHub") +[src/Particle.js:605-607](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L605-L607 "Source code on GitHub") Mark device as being used in development of a product so it opts out of automatic firmware updates @@ -7840,7 +7965,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### lockDeviceProductFirmware -[src/Particle.js:621-623](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L621-L623 "Source code on GitHub") +[src/Particle.js:621-623](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L621-L623 "Source code on GitHub") Mark device as being used in development of a product, so it opts out of automatic firmware updates @@ -7859,7 +7984,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### unlockDeviceProductFirmware -[src/Particle.js:635-637](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L635-L637 "Source code on GitHub") +[src/Particle.js:635-637](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L635-L637 "Source code on GitHub") Mark device as receiving automatic firmware updates @@ -7876,7 +8001,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateDevice -[src/Particle.js:656-668](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L656-L668 "Source code on GitHub") +[src/Particle.js:656-668](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L656-L668 "Source code on GitHub") Update multiple device attributes at the same time @@ -7900,7 +8025,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### provisionDevice -[src/Particle.js:679-687](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L679-L687 "Source code on GitHub") +[src/Particle.js:679-687](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L679-L687 "Source code on GitHub") Provision a new device for products that allow self-provisioning @@ -7916,7 +8041,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getClaimCode -[src/Particle.js:701-704](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L701-L704 "Source code on GitHub") +[src/Particle.js:701-704](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L701-L704 "Source code on GitHub") Generate a claim code to use in the device claiming process. To generate a claim code for a product, the access token MUST belong to a @@ -7935,7 +8060,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getVariable -[src/Particle.js:736-742](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L736-L742 "Source code on GitHub") +[src/Particle.js:736-742](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L736-L742 "Source code on GitHub") Get the value of a device variable @@ -7953,7 +8078,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### flashDevice -[src/Particle.js:756-767](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L756-L767 "Source code on GitHub") +[src/Particle.js:756-767](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L756-L767 "Source code on GitHub") Compile and flash application firmware to a device. Pass a pre-compiled binary to flash it directly to the device. @@ -7972,7 +8097,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### flashTinker -[src/Particle.js:778-793](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L778-L793 "Source code on GitHub") +[src/Particle.js:778-793](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L778-L793 "Source code on GitHub") DEPRECATED: Flash the Tinker application to a device. Instead compile and flash the Tinker source code. @@ -7988,7 +8113,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### compileCode -[src/Particle.js:806-824](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L806-L824 "Source code on GitHub") +[src/Particle.js:806-824](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L806-L824 "Source code on GitHub") Compile firmware using the Particle Cloud @@ -8006,7 +8131,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadFirmwareBinary -[src/Particle.js:835-844](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L835-L844 "Source code on GitHub") +[src/Particle.js:835-844](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L835-L844 "Source code on GitHub") Download a firmware binary @@ -8022,7 +8147,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### sendPublicKey -[src/Particle.js:857-871](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L857-L871 "Source code on GitHub") +[src/Particle.js:857-871](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L857-L871 "Source code on GitHub") Send a new device public key to the Particle Cloud @@ -8040,7 +8165,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### callFunction -[src/Particle.js:885-890](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L885-L890 "Source code on GitHub") +[src/Particle.js:885-890](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L885-L890 "Source code on GitHub") Call a device function @@ -8059,7 +8184,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getEventStream -[src/Particle.js:903-928](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L903-L928 "Source code on GitHub") +[src/Particle.js:903-928](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L903-L928 "Source code on GitHub") Get a stream of events @@ -8077,7 +8202,7 @@ emit 'event' events. ### publishEvent -[src/Particle.js:942-946](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L942-L946 "Source code on GitHub") +[src/Particle.js:942-946](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L942-L946 "Source code on GitHub") Publish a event to the Particle Cloud @@ -8096,7 +8221,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### Hook -[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L977-L999 "Source code on GitHub") +[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L977-L999 "Source code on GitHub") Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) @@ -8129,7 +8254,7 @@ Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference ### createWebhook -[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L977-L999 "Source code on GitHub") +[src/Particle.js:977-999](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L977-L999 "Source code on GitHub") Create a webhook @@ -8151,7 +8276,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteWebhook -[src/Particle.js:1011-1014](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1011-L1014 "Source code on GitHub") +[src/Particle.js:1011-1014](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1011-L1014 "Source code on GitHub") Delete a webhook @@ -8168,7 +8293,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listWebhooks -[src/Particle.js:1025-1028](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1025-L1028 "Source code on GitHub") +[src/Particle.js:1025-1028](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1025-L1028 "Source code on GitHub") List all webhooks owned by the account or product @@ -8184,7 +8309,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createIntegration -[src/Particle.js:1045-1049](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1045-L1049 "Source code on GitHub") +[src/Particle.js:1045-1049](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1045-L1049 "Source code on GitHub") Create an integration to send events to an external service @@ -8205,7 +8330,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### editIntegration -[src/Particle.js:1067-1071](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1067-L1071 "Source code on GitHub") +[src/Particle.js:1067-1071](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1067-L1071 "Source code on GitHub") Edit an integration to send events to an external service @@ -8227,7 +8352,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteIntegration -[src/Particle.js:1084-1087](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1084-L1087 "Source code on GitHub") +[src/Particle.js:1084-1087](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1084-L1087 "Source code on GitHub") Delete an integration to send events to an external service @@ -8244,7 +8369,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listIntegrations -[src/Particle.js:1098-1101](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1098-L1101 "Source code on GitHub") +[src/Particle.js:1098-1101](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1098-L1101 "Source code on GitHub") List all integrations owned by the account or product @@ -8260,7 +8385,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getUserInfo -[src/Particle.js:1111-1113](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1111-L1113 "Source code on GitHub") +[src/Particle.js:1111-1113](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1111-L1113 "Source code on GitHub") Get details about the current user @@ -8275,7 +8400,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setUserInfo -[src/Particle.js:1124-1127](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1124-L1127 "Source code on GitHub") +[src/Particle.js:1124-1127](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1124-L1127 "Source code on GitHub") Set details on the current user @@ -8291,7 +8416,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### changeUsername -[src/Particle.js:1140-1148](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1140-L1148 "Source code on GitHub") +[src/Particle.js:1140-1148](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1140-L1148 "Source code on GitHub") Change username (i.e, email) @@ -8309,7 +8434,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### changeUserPassword -[src/Particle.js:1161-1169](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1161-L1169 "Source code on GitHub") +[src/Particle.js:1161-1169](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1161-L1169 "Source code on GitHub") Change user's password @@ -8327,7 +8452,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listSIMs -[src/Particle.js:1185-1189](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1185-L1189 "Source code on GitHub") +[src/Particle.js:1185-1189](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1185-L1189 "Source code on GitHub") List SIM cards owned by a user or product @@ -8348,7 +8473,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getSIMDataUsage -[src/Particle.js:1201-1207](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1201-L1207 "Source code on GitHub") +[src/Particle.js:1201-1207](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1201-L1207 "Source code on GitHub") Get data usage for one SIM card for the current billing period @@ -8365,7 +8490,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getFleetDataUsage -[src/Particle.js:1218-1225](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1218-L1225 "Source code on GitHub") +[src/Particle.js:1218-1225](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1218-L1225 "Source code on GitHub") Get data usage for all SIM cards in a product the current billing period @@ -8381,7 +8506,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### checkSIM -[src/Particle.js:1236-1238](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1236-L1238 "Source code on GitHub") +[src/Particle.js:1236-1238](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1236-L1238 "Source code on GitHub") Check SIM status @@ -8397,7 +8522,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### activateSIM -[src/Particle.js:1253-1263](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1253-L1263 "Source code on GitHub") +[src/Particle.js:1253-1263](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1253-L1263 "Source code on GitHub") Activate and add SIM cards to an account or product @@ -8417,7 +8542,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deactivateSIM -[src/Particle.js:1275-1279](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1275-L1279 "Source code on GitHub") +[src/Particle.js:1275-1279](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1275-L1279 "Source code on GitHub") Deactivate a SIM card so it doesn't incur data usage in future months. @@ -8434,7 +8559,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### reactivateSIM -[src/Particle.js:1292-1296](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1292-L1296 "Source code on GitHub") +[src/Particle.js:1292-1296](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1292-L1296 "Source code on GitHub") Reactivate a SIM card the was deactivated or unpause a SIM card that was automatically paused @@ -8452,7 +8577,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateSIM -[src/Particle.js:1309-1313](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1309-L1313 "Source code on GitHub") +[src/Particle.js:1309-1313](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1309-L1313 "Source code on GitHub") Update SIM card data limit @@ -8470,7 +8595,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeSIM -[src/Particle.js:1325-1328](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1325-L1328 "Source code on GitHub") +[src/Particle.js:1325-1328](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1325-L1328 "Source code on GitHub") Remove a SIM card from an account so it can be activated by a different account @@ -8487,7 +8612,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listBuildTargets -[src/Particle.js:1339-1342](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1339-L1342 "Source code on GitHub") +[src/Particle.js:1339-1342](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1339-L1342 "Source code on GitHub") List valid build targets to be used for compiling @@ -8503,7 +8628,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLibraries -[src/Particle.js:1368-1385](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1368-L1385 "Source code on GitHub") +[src/Particle.js:1368-1385](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1368-L1385 "Source code on GitHub") List firmware libraries @@ -8533,7 +8658,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLibrary -[src/Particle.js:1401-1409](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1401-L1409 "Source code on GitHub") +[src/Particle.js:1401-1409](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1401-L1409 "Source code on GitHub") Get firmware library details @@ -8550,7 +8675,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLibraryVersions -[src/Particle.js:1422-1430](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1422-L1430 "Source code on GitHub") +[src/Particle.js:1422-1430](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1422-L1430 "Source code on GitHub") Firmware library details for each version @@ -8568,7 +8693,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### contributeLibrary -[src/Particle.js:1442-1455](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1442-L1455 "Source code on GitHub") +[src/Particle.js:1442-1455](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1442-L1455 "Source code on GitHub") Contribute a new library version from a compressed archive @@ -8585,7 +8710,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### publishLibrary -[src/Particle.js:1466-1475](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1466-L1475 "Source code on GitHub") +[src/Particle.js:1466-1475](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1466-L1475 "Source code on GitHub") Publish the latest version of a library to the public @@ -8601,7 +8726,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLibrary -[src/Particle.js:1487-1495](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1487-L1495 "Source code on GitHub") +[src/Particle.js:1487-1495](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1487-L1495 "Source code on GitHub") Delete one version of a library or an entire private library @@ -8618,7 +8743,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadFile -[src/Particle.js:1505-1507](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1505-L1507 "Source code on GitHub") +[src/Particle.js:1505-1507](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1505-L1507 "Source code on GitHub") Download an external file that may not be on the API @@ -8633,7 +8758,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listOAuthClients -[src/Particle.js:1518-1521](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1518-L1521 "Source code on GitHub") +[src/Particle.js:1518-1521](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1518-L1521 "Source code on GitHub") List OAuth client created by the account @@ -8649,7 +8774,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createOAuthClient -[src/Particle.js:1536-1540](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1536-L1540 "Source code on GitHub") +[src/Particle.js:1536-1540](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1536-L1540 "Source code on GitHub") Create an OAuth client @@ -8669,7 +8794,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateOAuthClient -[src/Particle.js:1554-1558](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1554-L1558 "Source code on GitHub") +[src/Particle.js:1554-1558](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1554-L1558 "Source code on GitHub") Update an OAuth client @@ -8688,7 +8813,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteOAuthClient -[src/Particle.js:1570-1573](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1570-L1573 "Source code on GitHub") +[src/Particle.js:1570-1573](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1570-L1573 "Source code on GitHub") Delete an OAuth client @@ -8705,7 +8830,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listProducts -[src/Particle.js:1583-1585](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1583-L1585 "Source code on GitHub") +[src/Particle.js:1583-1585](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1583-L1585 "Source code on GitHub") List products the account has access to @@ -8720,7 +8845,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProduct -[src/Particle.js:1596-1598](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1596-L1598 "Source code on GitHub") +[src/Particle.js:1596-1598](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1596-L1598 "Source code on GitHub") Get detailed information about a product @@ -8736,7 +8861,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listProductFirmware -[src/Particle.js:1609-1611](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1609-L1611 "Source code on GitHub") +[src/Particle.js:1609-1611](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1609-L1611 "Source code on GitHub") List product firmware versions @@ -8752,7 +8877,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### uploadProductFirmware -[src/Particle.js:1627-1643](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1627-L1643 "Source code on GitHub") +[src/Particle.js:1627-1643](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1627-L1643 "Source code on GitHub") List product firmware versions @@ -8773,7 +8898,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductFirmware -[src/Particle.js:1655-1662](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1655-L1662 "Source code on GitHub") +[src/Particle.js:1655-1662](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1655-L1662 "Source code on GitHub") Get information about a product firmware version @@ -8790,7 +8915,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateProductFirmware -[src/Particle.js:1676-1679](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1676-L1679 "Source code on GitHub") +[src/Particle.js:1676-1679](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1676-L1679 "Source code on GitHub") Update information for a product firmware version @@ -8809,7 +8934,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### downloadProductFirmware -[src/Particle.js:1691-1700](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1691-L1700 "Source code on GitHub") +[src/Particle.js:1691-1700](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1691-L1700 "Source code on GitHub") Download a product firmware binary @@ -8826,7 +8951,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### releaseProductFirmware -[src/Particle.js:1712-1715](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1712-L1715 "Source code on GitHub") +[src/Particle.js:1712-1715](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1712-L1715 "Source code on GitHub") Release a product firmware version as the default version @@ -8843,7 +8968,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listTeamMembers -[src/Particle.js:1726-1733](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1726-L1733 "Source code on GitHub") +[src/Particle.js:1726-1733](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1726-L1733 "Source code on GitHub") List product team members @@ -8859,7 +8984,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### inviteTeamMember -[src/Particle.js:1745-1753](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1745-L1753 "Source code on GitHub") +[src/Particle.js:1745-1753](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1745-L1753 "Source code on GitHub") Invite Particle user to a product team @@ -8876,7 +9001,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeTeamMember -[src/Particle.js:1765-1772](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1765-L1772 "Source code on GitHub") +[src/Particle.js:1765-1772](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1765-L1772 "Source code on GitHub") Remove Particle user to a product team @@ -8893,7 +9018,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### lookupSerialNumber -[src/Particle.js:1783-1790](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1783-L1790 "Source code on GitHub") +[src/Particle.js:1783-1790](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1783-L1790 "Source code on GitHub") Fetch details about a serial number @@ -8909,7 +9034,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createMeshNetwork -[src/Particle.js:1803-1811](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1803-L1811 "Source code on GitHub") +[src/Particle.js:1803-1811](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1803-L1811 "Source code on GitHub") Create a mesh network @@ -8927,7 +9052,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeMeshNetwork -[src/Particle.js:1822-1824](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1822-L1824 "Source code on GitHub") +[src/Particle.js:1822-1824](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1822-L1824 "Source code on GitHub") Remove a mesh network. @@ -8943,7 +9068,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listMeshNetworks -[src/Particle.js:1836-1839](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1836-L1839 "Source code on GitHub") +[src/Particle.js:1836-1839](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1836-L1839 "Source code on GitHub") List all mesh networks @@ -8960,7 +9085,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getMeshNetwork -[src/Particle.js:1850-1852](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1850-L1852 "Source code on GitHub") +[src/Particle.js:1850-1852](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1850-L1852 "Source code on GitHub") Get information about a mesh network. @@ -8976,7 +9101,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateMeshNetwork -[src/Particle.js:1865-1873](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1865-L1873 "Source code on GitHub") +[src/Particle.js:1865-1873](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1865-L1873 "Source code on GitHub") Modify a mesh network. @@ -8994,7 +9119,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### addMeshNetworkDevice -[src/Particle.js:1885-1894](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1885-L1894 "Source code on GitHub") +[src/Particle.js:1885-1894](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1885-L1894 "Source code on GitHub") Add a device to a mesh network. @@ -9011,7 +9136,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### removeMeshNetworkDevice -[src/Particle.js:1906-1922](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1906-L1922 "Source code on GitHub") +[src/Particle.js:1906-1922](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1906-L1922 "Source code on GitHub") Remove a device from a mesh network. @@ -9028,7 +9153,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listMeshNetworkDevices -[src/Particle.js:1936-1945](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1936-L1945 "Source code on GitHub") +[src/Particle.js:1936-1945](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1936-L1945 "Source code on GitHub") List all devices of a mesh network. @@ -9047,7 +9172,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductConfiguration -[src/Particle.js:1956-1963](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1956-L1963 "Source code on GitHub") +[src/Particle.js:1956-1963](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1956-L1963 "Source code on GitHub") Get product configuration @@ -9063,7 +9188,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductConfigurationSchema -[src/Particle.js:1974-1982](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1974-L1982 "Source code on GitHub") +[src/Particle.js:1974-1982](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1974-L1982 "Source code on GitHub") Get product configuration schema @@ -9079,7 +9204,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceConfiguration -[src/Particle.js:1994-2001](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L1994-L2001 "Source code on GitHub") +[src/Particle.js:1994-2001](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L1994-L2001 "Source code on GitHub") Get product device's configuration @@ -9096,7 +9221,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceConfigurationSchema -[src/Particle.js:2013-2021](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2013-L2021 "Source code on GitHub") +[src/Particle.js:2013-2021](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2013-L2021 "Source code on GitHub") Get product device's configuration schema @@ -9113,7 +9238,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setProductConfiguration -[src/Particle.js:2033-2041](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2033-L2041 "Source code on GitHub") +[src/Particle.js:2033-2041](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2033-L2041 "Source code on GitHub") Set product configuration @@ -9130,7 +9255,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setProductDeviceConfiguration -[src/Particle.js:2054-2062](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2054-L2062 "Source code on GitHub") +[src/Particle.js:2054-2062](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2054-L2062 "Source code on GitHub") Set product configuration for a specific device within the product @@ -9148,7 +9273,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductLocations -[src/Particle.js:2081-2098](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2081-L2098 "Source code on GitHub") +[src/Particle.js:2081-2098](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2081-L2098 "Source code on GitHub") Query location for devices within a product @@ -9172,7 +9297,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getProductDeviceLocations -[src/Particle.js:2115-2127](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2115-L2127 "Source code on GitHub") +[src/Particle.js:2115-2127](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2115-L2127 "Source code on GitHub") Query location for one device within a product @@ -9192,7 +9317,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### executeLogic -[src/Particle.js:2143-2151](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2143-L2151 "Source code on GitHub") +[src/Particle.js:2143-2151](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2143-L2151 "Source code on GitHub") Executes the provided logic function once and returns the result. No logs, runs, etc are saved @@ -9211,7 +9336,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createLogicFunction -[src/Particle.js:2171-2179](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2171-L2179 "Source code on GitHub") +[src/Particle.js:2171-2179](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2171-L2179 "Source code on GitHub") Creates a new logic function in the specified organization or sandbox using the provided function data. @@ -9234,7 +9359,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicFunction -[src/Particle.js:2193-2200](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2193-L2200 "Source code on GitHub") +[src/Particle.js:2193-2200](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2193-L2200 "Source code on GitHub") Get a logic function in the specified organization or sandbox by logic function ID. @@ -9251,7 +9376,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateLogicFunction -[src/Particle.js:2217-2225](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2217-L2225 "Source code on GitHub") +[src/Particle.js:2217-2225](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2217-L2225 "Source code on GitHub") Updates an existing logic function in the specified organization or sandbox using the provided function data. @@ -9271,7 +9396,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLogicFunction -[src/Particle.js:2239-2246](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2239-L2246 "Source code on GitHub") +[src/Particle.js:2239-2246](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2239-L2246 "Source code on GitHub") Deletes a logic function in the specified organization or sandbox by logic function ID. @@ -9288,7 +9413,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLogicFunctions -[src/Particle.js:2260-2270](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2260-L2270 "Source code on GitHub") +[src/Particle.js:2260-2270](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2260-L2270 "Source code on GitHub") Lists all logic functions in the specified organization or sandbox. @@ -9305,7 +9430,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLogicRuns -[src/Particle.js:2284-2291](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2284-L2291 "Source code on GitHub") +[src/Particle.js:2284-2291](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2284-L2291 "Source code on GitHub") Lists all logic runs for the specified logic function in the specified organization or sandbox. @@ -9322,7 +9447,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicRun -[src/Particle.js:2306-2313](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2306-L2313 "Source code on GitHub") +[src/Particle.js:2306-2313](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2306-L2313 "Source code on GitHub") Retrieves a logic run by its ID for the specified logic function in the specified organization or sandbox. @@ -9340,7 +9465,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLogicRunLogs -[src/Particle.js:2328-2335](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2328-L2335 "Source code on GitHub") +[src/Particle.js:2328-2335](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2328-L2335 "Source code on GitHub") Retrieves the logs for a logic run by its ID for the specified logic function in the specified organization or sandbox. @@ -9358,7 +9483,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### createLedger -[src/Particle.js:2349-2357](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2349-L2357 "Source code on GitHub") +[src/Particle.js:2349-2357](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2349-L2357 "Source code on GitHub") Creates a new ledger definition in the specified organization or sandbox. @@ -9375,7 +9500,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLedger -[src/Particle.js:2371-2378](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2371-L2378 "Source code on GitHub") +[src/Particle.js:2371-2378](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2371-L2378 "Source code on GitHub") Get a ledger definition in the specified organization or sandbox by ledger name. @@ -9392,7 +9517,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### updateLedger -[src/Particle.js:2393-2401](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2393-L2401 "Source code on GitHub") +[src/Particle.js:2393-2401](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2393-L2401 "Source code on GitHub") Updates an existing ledger definition in the specified organization or sandbox. @@ -9410,7 +9535,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### archiveLedger -[src/Particle.js:2415-2422](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2415-L2422 "Source code on GitHub") +[src/Particle.js:2415-2422](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2415-L2422 "Source code on GitHub") Archives a ledger definition in the specified organization or sandbox by ledger name. @@ -9427,7 +9552,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### Scope -[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2443-L2456 "Source code on GitHub") +[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2443-L2456 "Source code on GitHub") Type: (`"Owner"` \| `"Product"` \| `"Device"`) @@ -9445,7 +9570,7 @@ Type: (`"Owner"` \| `"Product"` \| `"Device"`) ### listLedgers -[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2443-L2456 "Source code on GitHub") +[src/Particle.js:2443-2456](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2443-L2456 "Source code on GitHub") Lists all ledger definitions in the specified organization or sandbox. @@ -9465,7 +9590,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### getLedgerInstance -[src/Particle.js:2471-2478](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2471-L2478 "Source code on GitHub") +[src/Particle.js:2471-2478](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2471-L2478 "Source code on GitHub") Get ledger instance data. @@ -9483,7 +9608,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### setLedgerInstance -[src/Particle.js:2494-2502](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2494-L2502 "Source code on GitHub") +[src/Particle.js:2494-2502](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2494-L2502 "Source code on GitHub") Set ledger instance data. @@ -9502,7 +9627,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### deleteLedgerInstance -[src/Particle.js:2517-2524](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2517-L2524 "Source code on GitHub") +[src/Particle.js:2517-2524](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2517-L2524 "Source code on GitHub") Delete a ledger instance in the specified organization or sandbox by ledger name. @@ -9520,7 +9645,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### listLedgerInstances -[src/Particle.js:2540-2551](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2540-L2551 "Source code on GitHub") +[src/Particle.js:2540-2551](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2540-L2551 "Source code on GitHub") Lists ledger instances in the specified organization or sandbox. @@ -9537,9 +9662,48 @@ Lists ledger instances in the specified organization or sandbox. Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to an array of ledger instance data. +### listLedgerInstanceVersions + +[src/Particle.js:2568-2579](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2568-L2579 "Source code on GitHub") + +List ledger instance versions + +**Parameters** + +- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger instance. + - `options.auth` **Auth?** The access token or basic auth object. Can be ignored if provided in constructor + - `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account. + - `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name. + - `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value. + - `options.replacedBefore` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** ISO date string to filter to instances replaced before this time + - `options.replacedAfter` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** ISO date string to filter to instances replaced after this time + - `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. + - `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context + +Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to an array of ledger instance data. + +### getLedgerInstanceVersion + +[src/Particle.js:2595-2602](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2595-L2602 "Source code on GitHub") + +Get specific ledger instance version + +**Parameters** + +- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger instance. + - `options.auth` **Auth?** The access token or basic auth object. Can be ignored if provided in constructor + - `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account. + - `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name. + - `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value. + - `options.version` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Version of the ledger instance + - `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. + - `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context + +Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<RequestResponse>** A promise that resolves to the specified ledger instance data. + ### setDefaultAuth -[src/Particle.js:2558-2566](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2558-L2566 "Source code on GitHub") +[src/Particle.js:2609-2617](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2609-L2617 "Source code on GitHub") Set default auth token that will be used in each method if `auth` is not provided @@ -9552,7 +9716,7 @@ Set default auth token that will be used in each method if `auth` is not provide ### get -[src/Particle.js:2609-2613](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2609-L2613 "Source code on GitHub") +[src/Particle.js:2660-2664](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2660-L2664 "Source code on GitHub") Make a GET request @@ -9569,7 +9733,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### head -[src/Particle.js:2625-2629](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2625-L2629 "Source code on GitHub") +[src/Particle.js:2676-2680](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2676-L2680 "Source code on GitHub") Make a HEAD request @@ -9586,7 +9750,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### post -[src/Particle.js:2641-2645](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2641-L2645 "Source code on GitHub") +[src/Particle.js:2692-2696](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2692-L2696 "Source code on GitHub") Make a POST request @@ -9603,7 +9767,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### put -[src/Particle.js:2657-2661](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2657-L2661 "Source code on GitHub") +[src/Particle.js:2708-2712](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2708-L2712 "Source code on GitHub") Make a PUT request @@ -9620,7 +9784,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### delete -[src/Particle.js:2673-2677](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2673-L2677 "Source code on GitHub") +[src/Particle.js:2724-2728](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2724-L2728 "Source code on GitHub") Make a DELETE request @@ -9637,7 +9801,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe ### request -[src/Particle.js:2694-2698](https://github.com/particle-iot/particle-api-js/blob/6c0cc718a9033177763ad9f5414709f853b16646/src/Particle.js#L2694-L2698 "Source code on GitHub") +[src/Particle.js:2745-2749](https://github.com/particle-iot/particle-api-js/blob/250de2f8f69a83b3386662d669399c08b7e734a3/src/Particle.js#L2745-L2749 "Source code on GitHub") **Parameters** diff --git a/package-lock.json b/package-lock.json index 7ec67ad..80e9d7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "particle-api-js", - "version": "10.3.1", + "version": "10.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "particle-api-js", - "version": "10.3.1", + "version": "10.4.0", "license": "Apache-2.0", "dependencies": { "form-data": "^4.0.0", diff --git a/package.json b/package.json index 6a01d51..02b5040 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "particle-api-js", - "version": "10.3.1", + "version": "10.4.0", "description": "Particle API Client", "main": "src/Particle.js", "scripts": {