!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.blobStream=e()}}(function(){return function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var h=r[s]={exports:{}};t[s][0].call(h.exports,function(e){var r=t[s][1][e];return i(r||e)},h,h.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s0?e>>>0:0;else if("string"===f)"base64"===t&&(e=function(e){e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(S,"");for(;e.length%4!=0;)e+="=";return e}(e)),n=a.byteLength(e,t);else{if("object"!==f||null===e)throw new TypeError("must start with number, buffer, array or string");"Buffer"===e.type&&o(e.data)&&(e=e.data),n=+e.length>0?Math.floor(+e.length):0}if(this.length>s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");if(a.TYPED_ARRAY_SUPPORT?i=a._augment(new Uint8Array(n)):((i=this).length=n,i._isBuffer=!0),a.TYPED_ARRAY_SUPPORT&&"number"==typeof e.byteLength)i._set(e);else if(function(e){return o(e)||a.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}(e))if(a.isBuffer(e))for(u=0;un)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function b(e,t,r,n,i,o){if(!a.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>i||te.length)throw new TypeError("index out of range")}function y(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function w(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function v(e,t,r,n,i,o){if(t>i||te.length)throw new TypeError("index out of range")}function m(e,t,r,n,o){return o||v(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function _(e,t,r,n,o){return o||v(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}a.TYPED_ARRAY_SUPPORT=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(e){return!1}}(),a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i>>1;break;case"utf8":case"utf-8":r=A(e).length;break;case"base64":r=B(e).length;break;default:r=e.length}return r},a.prototype.length=void 0,a.prototype.parent=void 0,a.prototype.toString=function(e,t,r){var n=!1;if(e||(e="utf8"),(t>>>=0)<0&&(t=0),(r=void 0===r||r===1/0?this.length:r>>>0)>this.length&&(r=this.length),r<=t)return"";for(;;)switch(e){case"hex":return d(this,t,r);case"utf8":case"utf-8":return h(this,t,r);case"ascii":return c(this,t,r);case"binary":return l(this,t,r);case"base64":return f(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}},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return 0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},a.prototype.compare=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return a.compare(this,e)},a.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},a.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},a.prototype.write=function(e,t,r,n){if(isFinite(t))isFinite(r)||(n=r,r=void 0);else{var i=n;n=t,t=r,r=i}t=Number(t)||0;var o,s=this.length-t;switch(r?(r=Number(r))>s&&(r=s):r=s,n=String(n||"utf8").toLowerCase()){case"hex":o=function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,n=t%256,i.push(n),i.push(r);return i}(t),e,r,n)}(this,e,t,r);break;default:throw new TypeError("Unknown encoding: "+n)}return o},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){var r=this.length;if((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,r||b(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):y(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):y(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):w(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):w(this,e,t,!1),t+4},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):y(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):y(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):w(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||b(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):w(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,r){return m(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return m(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return _(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return _(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t||(t=0),n!==r&&0!==e.length&&0!==this.length){if(n=e.length)throw new TypeError("targetStart out of bounds");if(r<0||r>=this.length)throw new TypeError("sourceStart out of bounds");if(n<0||n>this.length)throw new TypeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=this.length)throw new TypeError("start out of bounds");if(r<0||r>this.length)throw new TypeError("end out of bounds");var n;if("number"==typeof e)for(n=t;n=55296&&n<=57343&&r++;for(var o=encodeURIComponent(e.slice(i,r+1)).substr(1).split("%"),s=0;s=t.length||i>=e.length);i++)t[i+r]=e[i];return i}function x(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}},{"base64-js":4,ieee754:5,"is-array":6}],4:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";var t="undefined"!=typeof Uint8Array?Uint8Array:Array,r="+".charCodeAt(0),i="/".charCodeAt(0),o="0".charCodeAt(0),s="a".charCodeAt(0),a="A".charCodeAt(0);function u(e){var t=e.charCodeAt(0);return t===r?62:t===i?63:t0)throw new Error("Invalid string. Length must be a multiple of 4");var f=e.length;s="="===e.charAt(f-2)?2:"="===e.charAt(f-1)?1:0,a=new t(3*e.length/4-s),i=s>0?e.length-4:e.length;var h=0;function c(e){a[h++]=e}for(r=0,n=0;r>16),c((65280&o)>>8),c(255&o);return 2===s?c(255&(o=u(e.charAt(r))<<2|u(e.charAt(r+1))>>4)):1===s&&(c((o=u(e.charAt(r))<<10|u(e.charAt(r+1))<<4|u(e.charAt(r+2))>>2)>>8&255),c(255&o)),a},e.fromByteArray=function(e){var t,r,i,o,s=e.length%3,a="";function u(e){return n.charAt(e)}for(t=0,i=e.length-s;t>18&63)+u(o>>12&63)+u(o>>6&63)+u(63&o);switch(s){case 1:a+=u((r=e[e.length-1])>>2),a+=u(r<<4&63),a+="==";break;case 2:a+=u((r=(e[e.length-2]<<8)+e[e.length-1])>>10),a+=u(r>>4&63),a+=u(r<<2&63),a+="="}return a}}(void 0===r?this.base64js={}:r)},{}],5:[function(e,t,r){r.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,h=-7,c=r?i-1:0,l=r?-1:1,d=e[t+c];for(c+=l,o=d&(1<<-h)-1,d>>=-h,h+=a;h>0;o=256*o+e[t+c],c+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+e[t+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=f}return(d?-1:1)*s*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var s,a,u,f=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(t*u-1)*Math.pow(2,i),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;e[r+d]=255&s,d+=p,s/=256,f-=8);e[r+d-p]|=128*g}},{}],6:[function(e,t,r){var n=Array.isArray,i=Object.prototype.toString;t.exports=n||function(e){return!!e&&"[object Array]"==i.call(e)}},{}],7:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,a,u,f;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(s(r=this._events[e]))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(n=arguments.length,a=new Array(n-1),u=1;u0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()));return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var r,n,s,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(r=this._events[e]).length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(a=s;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){n=a;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(r=this._events[e]))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.listenerCount=function(e,t){return e._events&&e._events[t]?i(e._events[t])?1:e._events[t].length:0}},{}],8:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],9:[function(e,t,r){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],10:[function(e,t,r){var n=t.exports={};function i(){}n.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.MutationObserver,r="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};var n=[];if(t){var i=document.createElement("div");return new MutationObserver(function(){var e=n.slice();n.length=0,e.forEach(function(e){e()})}).observe(i,{attributes:!0}),function(e){n.length||i.setAttribute("yes","no"),n.push(e)}}return r?(window.addEventListener("message",function(e){var t=e.source;t!==window&&null!==t||"process-tick"!==e.data||(e.stopPropagation(),n.length>0&&n.shift()())},!0),function(e){n.push(e),window.postMessage("process-tick","*")}):function(e){setTimeout(e,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=i,n.addListener=i,n.once=i,n.off=i,n.removeListener=i,n.removeAllListeners=i,n.emit=i,n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],11:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":12}],12:[function(e,t,r){(function(r){t.exports=a;var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},i=e("core-util-is");i.inherits=e("inherits");var o=e("./_stream_readable"),s=e("./_stream_writable");function a(e){if(!(this instanceof a))return new a(e);o.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||r.nextTick(this.end.bind(this))}i.inherits(a,o),function(e,t){for(var r=0,n=e.length;r0?p(e):m(e)}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!s){var u=new Error("stream.push() after EOF");e.emit("error",u)}else if(t.endEmitted&&s){u=new Error("stream.unshift() after end event");e.emit("error",u)}else!t.decoder||s||o||(n=t.decoder.write(n)),t.length+=t.objectMode?1:n.length,s?t.buffer.unshift(n):(t.reading=!1,t.buffer.push(n)),t.needReadable&&p(e),function(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(function(){!function(e,t){var r=t.length;for(;!t.reading&&!t.flowing&&!t.ended&&t.lengtht.highWaterMark&&(t.highWaterMark=function(e){if(e>=l)e=l;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function p(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?r.nextTick(function(){g(e)}):g(e))}function g(e){e.emit("readable")}function b(e){var t,r=e._readableState;function n(e,n,i){!1===e.write(t)&&r.awaitDrain++}for(r.awaitDrain=0;r.pipesCount&&null!==(t=e.read());)if(1===r.pipesCount?n(r.pipes):_(r.pipes,n),e.emit("data",t),r.awaitDrain>0)return;if(0===r.pipesCount)return r.flowing=!1,void(o.listenerCount(e,"data")>0&&w(e));r.ranOut=!0}function y(){this._readableState.ranOut&&(this._readableState.ranOut=!1,b(this))}function w(e,t){if(e._readableState.flowing)throw new Error("Cannot switch to old mode now.");var n=t||!1,i=!1;e.readable=!0,e.pipe=a.prototype.pipe,e.on=e.addListener=a.prototype.on,e.on("readable",function(){var t;for(i=!0;!n&&null!==(t=e.read());)e.emit("data",t);null===t&&(i=!1,e._readableState.needReadable=!0)}),e.pause=function(){n=!0,this.emit("pause")},e.resume=function(){n=!1,i?r.nextTick(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function v(e,t){var r,n=t.buffer,o=t.length,s=!!t.decoder,a=!!t.objectMode;if(0===n.length)return null;if(0===o)r=null;else if(a)r=n.shift();else if(!e||e>=o)r=s?n.join(""):i.concat(n,o),n.length=0;else{if(e0)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,r.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function _(e,t){for(var r=0,n=e.length;r0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p(this),null;if(0===(e=d(e,t))&&t.ended)return r=null,t.length>0&&t.decoder&&(r=v(e,t),t.length-=r.length),0===t.length&&m(this),r;var i=t.needReadable;return t.length-e<=t.highWaterMark&&(i=!0),(t.ended||t.reading)&&(i=!1),i&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=d(n,t)),null===(r=e>0?v(e,t):null)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&m(this),r},h.prototype._read=function(e){this.emit("error",new Error("not implemented"))},h.prototype.pipe=function(e,t){var i=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1;var a=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?f:c;function u(e){e===i&&c()}function f(){e.end()}s.endEmitted?r.nextTick(a):i.once("end",a),e.on("unpipe",u);var h=function(e){return function(){var t=e._readableState;t.awaitDrain--,0===t.awaitDrain&&b(e)}}(i);function c(){e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",h),e.removeListener("error",l),e.removeListener("unpipe",u),i.removeListener("end",f),i.removeListener("end",c),e._writableState&&!e._writableState.needDrain||h()}function l(t){g(),e.removeListener("error",l),0===o.listenerCount(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",p),g()}function p(){e.removeListener("close",d),g()}function g(){i.unpipe(e)}return e.on("drain",h),e._events&&e._events.error?n(e._events.error)?e._events.error.unshift(l):e._events.error=[l,e._events.error]:e.on("error",l),e.once("close",d),e.once("finish",p),e.emit("pipe",i),s.flowing||(this.on("readable",y),s.flowing=!0,r.nextTick(function(){b(i)})),e},h.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,this.removeListener("readable",y),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",y),t.flowing=!1;for(var i=0;i=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived);var i;n=(t+=e.toString(this.encoding,0,n)).length-1;if((i=t.charCodeAt(n))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,n)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},o.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:3}],24:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],25:[function(e,t,r){(function(t,n){var i=/%[sdj%]/g;r.format=function(e){if(!y(e)){for(var t=[],r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),h(n,e,n.depth)}function u(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function f(e,t){return e}function h(e,t,n){if(e.customInspect&&t&&S(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return y(i)||(i=h(e,i,n)),i}var o=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,t);if(o)return o;var s=Object.keys(t),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),E(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(t);if(0===s.length){if(S(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(v(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(_(t))return e.stylize(Date.prototype.toString.call(t),"date");if(E(t))return c(t)}var f,m="",L=!1,A=["{","}"];(d(t)&&(L=!0,A=["[","]"]),S(t))&&(m=" [Function"+(t.name?": "+t.name:"")+"]");return v(t)&&(m=" "+RegExp.prototype.toString.call(t)),_(t)&&(m=" "+Date.prototype.toUTCString.call(t)),E(t)&&(m=" "+c(t)),0!==s.length||L&&0!=t.length?n<0?v(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),f=L?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(f,m,A)):A[0]+m+A[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),x(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=g(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function g(e){return null===e}function b(e){return"number"==typeof e}function y(e){return"string"==typeof e}function w(e){return void 0===e}function v(e){return m(e)&&"[object RegExp]"===L(e)}function m(e){return"object"==typeof e&&null!==e}function _(e){return m(e)&&"[object Date]"===L(e)}function E(e){return m(e)&&("[object Error]"===L(e)||e instanceof Error)}function S(e){return"function"==typeof e}function L(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(w(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var n=t.pid;s[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else s[e]=function(){};return s[e]},r.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=p,r.isNull=g,r.isNullOrUndefined=function(e){return null==e},r.isNumber=b,r.isString=y,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=w,r.isRegExp=v,r.isObject=m,r.isDate=_,r.isError=E,r.isFunction=S,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),B[e.getMonth()],t].join(" ")}function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){console.log("%s - %s",R(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!m(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":24,_process:10,inherits:8}]},{},[2])(2)});