!function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=21)}([function(t,e,n){"use strict";function r(t){if(!(this instanceof r))return new r(t);c.call(this,t),l.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||o(a,this)}function a(t){t.end()}var o=n(6),s=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=r;var u=n(3);u.inherits=n(1);var c=n(16),l=n(10);u.inherits(r,c);for(var f=s(l.prototype),h=0;h=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),a.alloc(+t)}function y(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(t).length;default:if(r)return q(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,n);case"utf8":case"utf-8":return I(this,e,n);case"ascii":return F(this,e,n);case"latin1":case"binary":return R(this,e,n);case"base64":return N(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function b(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=a.from(e,r)),a.isBuffer(e))return 0===e.length?-1:E(t,e,n,r,i);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):E(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function E(t,e,n,r,i){function a(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;o=2,s/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;cs&&(n=s-u),c=n;c>=0;c--){for(var f=!0,h=0;hi&&(r=i):r=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=n){var u,c,l,f;switch(s){case 1:a<128&&(o=a);break;case 2:u=t[i+1],128==(192&u)&&(f=(31&a)<<6|63&u)>127&&(o=f);break;case 3:u=t[i+1],c=t[i+2],128==(192&u)&&128==(192&c)&&(f=(15&a)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(f=(15&a)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return C(r)}function C(t){var e=t.length;if(e<=$)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr)&&(n=r);for(var i="",a=e;an)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,r,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function k(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function B(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function M(t,e,n,r,i,a){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(t,e,n,r,i){return i||M(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,n,r,23,4),n+4}function K(t,e,n,r,i){return i||M(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,n,r,52,8),n+8}function j(t){if(t=Y(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function Y(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function V(t){return t<16?"0"+t.toString(16):t.toString(16)}function q(t,e){e=e||1/0;for(var n,r=t.length,i=null,a=[],o=0;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function G(t){for(var e=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function X(t){return z.toByteArray(j(t))}function H(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Q(t){return t!==t}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var z=n(23),J=n(24),Z=n(15);e.Buffer=a,e.SlowBuffer=g,e.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=r(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,n){return o(null,t,e,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,n){return u(null,t,e,n)},a.allocUnsafe=function(t){return c(null,t)},a.allocUnsafeSlow=function(t){return c(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},a.prototype.compare=function(t,e,n,r,i){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,s=n-e,u=Math.min(o,s),c=this.slice(r,i),l=t.slice(e,n),f=0;fi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return T(this,t,e,n);case"latin1":case"binary":return A(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;a.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)r+=this[t+--e]*i;return r},a.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,a=0;++a=i&&(r-=Math.pow(2,8*e)),r},a.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=e,i=1,a=this[t+--r];r>0&&(i*=256);)a+=this[t+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*e)),a},a.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),J.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),J.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),J.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),J.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){L(this,t,e,n,Math.pow(2,8*n)-1,0)}var i=1,a=0;for(this[e]=255&t;++a=0&&(a*=256);)this[e+i]=t/a&255;return e+n},a.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):k(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):k(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+n},a.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+n},a.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):k(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):k(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,n){return U(this,t,e,!0,n)},a.prototype.writeFloatBE=function(t,e,n){return U(this,t,e,!1,n)},a.prototype.writeDoubleLE=function(t,e,n){return K(this,t,e,!0,n)},a.prototype.writeDoubleBE=function(t,e,n){return K(this,t,e,!1,n)},a.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o1)for(var n=1;n0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,o,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=o;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){e=t.exports=n(16),e.Stream=e,e.Readable=e,e.Writable=n(10),e.Duplex=n(0),e.Transform=n(19),e.PassThrough=n(31)},function(t,e,n){"use strict";(function(e,r,i){function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){N(e,t)}}function o(t){return P.from(t)}function s(t){return P.isBuffer(t)||t instanceof L}function u(){}function c(t,e){C=C||n(0),t=t||{},this.objectMode=!!t.objectMode,e instanceof C&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){b(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function l(t){if(C=C||n(0),!(B.call(l,this)||this instanceof C))return new l(t);this._writableState=new c(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),O.call(this)}function f(t,e){var n=new Error("write after end");t.emit("error",n),I(e,n)}function h(t,e,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),I(r,a),i=!1),i}function d(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=P.from(e,n)),e}function p(t,e,n,r,i,a){if(!n){var o=d(e,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length-1?r:I;l.WritableState=c;var R=n(3);R.inherits=n(1);var D={deprecate:n(30)},O=n(17),P=n(7).Buffer,L=i.Uint8Array||function(){},k=n(18);R.inherits(l,O),c.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(c.prototype,"buffer",{get:D.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}();var B;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(l,Symbol.hasInstance,{value:function(t){return!!B.call(this,t)||t&&t._writableState instanceof c}})):B=function(t){return t instanceof this},l.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},l.prototype.write=function(t,e,n){var r=this._writableState,i=!1,a=s(t)&&!r.objectMode;return a&&!P.isBuffer(t)&&(t=o(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof n&&(n=u),r.ended?f(this,n):(a||h(this,r,t,n))&&(r.pendingcb++,i=p(this,r,a,t,e,n)),i},l.prototype.cork=function(){this._writableState.corked++},l.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},l.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},l.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},l.prototype._writev=null,l.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||S(this,r,n)},Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),l.prototype.destroy=k.destroy,l.prototype._undestroy=k.undestroy,l.prototype._destroy=function(t,e){this.end(),e(t)}}).call(e,n(5),n(28).setImmediate,n(2))},function(t,e,n){"use strict";function r(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function i(t){var e=r(t);if("string"!=typeof e&&(b.isEncoding===v||!v(t)))throw new Error("Unknown encoding: "+t);return e||t}function a(t){this.encoding=i(t);var e;switch(this.encoding){case"utf16le":this.text=h,this.end=d,e=4;break;case"utf8":this.fillLast=c,e=4;break;case"base64":this.text=p,this.end=g,e=3;break;default:return this.write=y,void(this.end=m)}this.lastNeed=0,this.lastTotal=0,this.lastChar=b.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function s(t,e,n){var r=e.length-1;if(r=0?(i>0&&(t.lastNeed=i-1),i):--r=0?(i>0&&(t.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0)}function u(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�".repeat(n);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�".repeat(n+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�".repeat(n+2)}}function c(t){var e=this.lastTotal-this.lastNeed,n=u(this,t,e);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){var n=s(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�".repeat(this.lastTotal-this.lastNeed):e}function h(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function d(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function p(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function g(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function y(t){return t.toString(this.encoding)}function m(t){return t&&t.length?this.write(t):""}var b=n(7).Buffer,v=b.isEncoding||function(t){switch((t=""+t)&&t.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}};e.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n/g,">")),a("text",t))}function l(t){g.ignoreComment||(g.trim&&(t=t.trim()),a("comment",t))}function f(t){var e=y[g.parentKey];g.addParent||delete y[g.parentKey],y=e}function h(t){g.ignoreCdata||(g.trim&&(t=t.trim()),a("cdata",t))}function d(t){g.ignoreDoctype||(t=t.replace(/^ /,""),g.trim&&(t=t.trim()),a("doctype",t))}function p(t){t.note=t}var g,y,m=n(22),b=n(12),v=n(13).isArray;t.exports=function(t,e){var n=m.parser(!0,{}),i={};if(y=i,g=r(e),n.opt={strictEntities:!0},n.onopentag=u,n.ontext=c,n.oncomment=l,n.onclosetag=f,n.onerror=p,n.oncdata=h,n.ondoctype=d,n.onprocessinginstruction=s,n.write(t).close(),i[g.elementsKey]){var a=i[g.elementsKey];delete i[g.elementsKey],i[g.elementsKey]=a,delete i.text}return i}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";(function(e,r){function i(t){return B.from(t)}function a(t){return B.isBuffer(t)||t instanceof M}function o(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?P(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}function s(t,e){O=O||n(0),t=t||{},this.objectMode=!!t.objectMode,e instanceof O&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new V,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.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Y||(Y=n(11).StringDecoder),this.decoder=new Y(t.encoding),this.encoding=t.encoding)}function u(t){if(O=O||n(0),!(this instanceof u))return new u(t);this._readableState=new s(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),k.call(this)}function c(t,e,n,r,a){var o=t._readableState;if(null===e)o.reading=!1,g(t,o);else{var s;a||(s=f(o,e)),s?t.emit("error",s):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===B.prototype||(e=i(e)),r?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):l(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(e=o.decoder.write(e),o.objectMode||0!==e.length?l(t,o,e,!1):b(t,o)):l(t,o,e,!1))):r||(o.reading=!1)}return h(o)}function l(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&y(t)),b(t,e)}function f(t,e){var n;return a(e)||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function h(t){return!t.ended&&(t.needReadable||t.length=W?t=W:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function p(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=d(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function g(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,y(t)}}function y(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(j("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?D(m,t):m(t))}function m(t){j("emit readable"),t.emit("readable"),A(t)}function b(t,e){e.readingMore||(e.readingMore=!0,D(v,t,e))}function v(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=S(t,e.buffer,e.decoder),n}function S(t,e,n){var r;return ta.length?a.length:t;if(o===a.length?i+=a:i+=a.slice(0,t),0===(t-=o)){o===a.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=a.slice(o));break}++r}return e.length-=r,i}function I(t,e){var n=B.allocUnsafe(t),r=e.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var a=r.data,o=t>a.length?a.length:t;if(a.copy(n,n.length-t,0,o),0===(t-=o)){o===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(o));break}++i}return e.length-=i,n}function C(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,D(F,e,t))}function F(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function R(t,e){for(var n=0,r=t.length;n=e.highWaterMark||e.ended))return j("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?C(this):y(this),null;if(0===(t=p(t,e))&&e.ended)return 0===e.length&&C(this),null;var r=e.needReadable;j("need readable",r),(0===e.length||e.length-t0?x(t,e):null,null===i?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&C(this)),null!==i&&this.emit("data",i),i},u.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},u.prototype.pipe=function(t,e){function n(t,e){j("onunpipe"),t===h&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,a())}function i(){j("onend"),t.end()}function a(){j("cleanup"),t.removeListener("close",c),t.removeListener("finish",l),t.removeListener("drain",y),t.removeListener("error",u),t.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",f),h.removeListener("data",s),m=!0,!d.awaitDrain||t._writableState&&!t._writableState.needDrain||y()}function s(e){j("ondata"),b=!1,!1!==t.write(e)||b||((1===d.pipesCount&&d.pipes===t||d.pipesCount>1&&-1!==R(d.pipes,t))&&!m&&(j("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,b=!0),h.pause())}function u(e){j("onerror",e),f(),t.removeListener("error",u),0===L(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",l),f()}function l(){j("onfinish"),t.removeListener("close",c),f()}function f(){j("unpipe"),h.unpipe(t)}var h=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=t;break;case 1:d.pipes=[d.pipes,t];break;default:d.pipes.push(t)}d.pipesCount+=1,j("pipe count=%d opts=%j",d.pipesCount,e);var p=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr,g=p?i:f;d.endEmitted?D(g):h.once("end",g),t.on("unpipe",n);var y=E(h);t.on("drain",y);var m=!1,b=!1;return h.on("data",s),o(t,"error",u),t.once("close",c),t.once("finish",l),t.emit("pipe",h),d.flowing||(j("pipe resume"),h.resume()),t},u.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a"}function s(t,e,n){if(e.ignoreInstruction)return"";var r;for(r in t)if(t.hasOwnProperty(r))break;var i="instructionNameFn"in e?e.instructionNameFn(r,t[r],v,b):r;if("object"==typeof t[r])return b=t,v=i,"";var o=t[r]?t[r]:"";return"instructionFn"in e&&(o=e.instructionFn(o,r,v,b)),""}function u(t,e){return e.ignoreComment?"":"\x3c!--"+("commentFn"in e?e.commentFn(t,v,b):t)+"--\x3e"}function c(t,e){return e.ignoreCdata?"":""}function l(t,e){return e.ignoreDoctype?"":""}function f(t,e){return e.ignoreText?"":(t=""+t,t=t.replace(/&/g,"&"),t=t.replace(/&/g,"&").replace(//g,">"),"textFn"in e?e.textFn(t,v,b):t)}function h(t,e){var n;if(t.elements&&t.elements.length)for(n=0;n"):r+="/>",r}function p(t,e,n,r){return t.reduce(function(t,a){var o=i(e,n,r&&!t);switch(a.type){case"element":return t+o+d(a,e,n);case"comment":return t+o+u(a[e.commentKey],e);case"doctype":return t+o+l(a[e.doctypeKey],e);case"cdata":return t+(e.indentCdata?o:"")+c(a[e.cdataKey],e);case"text":return t+(e.indentText?o:"")+f(a[e.textKey],e);case"instruction":var h={};return h[a[e.nameKey]]=a[e.attributesKey]?a:a[e.instructionKey],t+(e.indentInstruction?o:"")+s(h,e,n)}},"")}function g(t,e,n){var r;for(r in t)if(t.hasOwnProperty(r))switch(r){case e.parentKey:case e.attributesKey:break;case e.textKey:if(e.indentText||n)return!0;break;case e.cdataKey:if(e.indentCdata||n)return!0;break;case e.instructionKey:if(e.indentInstruction||n)return!0;break;case e.doctypeKey:case e.commentKey:default:return!0}return!1}function y(t,e,n,r,o){b=t,v=e;var s="elementNameFn"in n?n.elementNameFn(e,t):e;if(void 0===t||null===t)return"fullTagEmptyElementFn"in n&&n.fullTagEmptyElementFn(e,t)||n.fullTagEmptyElement?"<"+s+">":"<"+s+"/>";var u="";if(e){if(u+="<"+s,"object"!=typeof t)return u+=">"+f(t,n)+"";t[n.attributesKey]&&(u+=a(t[n.attributesKey],n,r));var c=g(t,n,!0)||t[n.attributesKey]&&"preserve"===t[n.attributesKey]["xml:space"];if(c||(c="fullTagEmptyElementFn"in n?n.fullTagEmptyElementFn(e,t):n.fullTagEmptyElement),!c)return u+="/>";u+=">"}return u+=m(t,n,r+1,!1),b=t,v=e,e&&(u+=(o?i(n,r,!1):"")+""),u}function m(t,e,n,r){var a,h,d,p="";for(h in t)if(t.hasOwnProperty(h))for(d=w(t[h])?t[h]:[t[h]],a=0;an)switch(F[i]){case"textNode":y(t);break;case"cdata":g(t,"oncdata",t.cdata),t.cdata="";break;case"script":g(t,"onscript",t.script),t.script="";break;default:b(t,"Max buffer length exceeded: "+F[i])}r=Math.max(r,o)}var s=e.MAX_BUFFER_LENGTH-r;t.bufferCheckPosition=s+t.position}function a(t){for(var e=0,n=F.length;e"===t||c(t)}function h(t,e){return t.test(e)}function d(t,e){return!h(t,e)}function p(t,e,n){t[e]&&t[e](n)}function g(t,e,n){t.textNode&&y(t),p(t,e,n)}function y(t){t.textNode=m(t.opt,t.textNode),t.textNode&&p(t,"ontext",t.textNode),t.textNode=""}function m(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function b(t,e){return y(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,p(t,"onerror",e),t}function v(t){return t.sawRoot&&!t.closedRoot&&E(t,"Unclosed root tag"),t.state!==Y.BEGIN&&t.state!==Y.BEGIN_WHITESPACE&&t.state!==Y.TEXT&&b(t,"Unexpected end"),y(t),t.c="",t.closed=!0,p(t,"onend"),r.call(t,t.strict,t.opt),t}function E(t,e){if("object"!=typeof t||!(t instanceof r))throw new Error("bad call to strictFail");t.strict&&b(t,e)}function w(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,g(t,"onopentagstart",n)}function _(t,e){var n=t.indexOf(":"),r=n<0?["",t]:t.split(":"),i=r[0],a=r[1];return e&&"xmlns"===t&&(i="xmlns",a=""),{prefix:i,local:a}}function T(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))return void(t.attribName=t.attribValue="");if(t.opt.xmlns){var e=_(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==L)E(t,"xml: prefix must be bound to "+L+"\nActual: "+t.attribValue);else if("xmlns"===r&&t.attribValue!==k)E(t,"xmlns: prefix must be bound to "+k+"\nActual: "+t.attribValue);else{var i=t.tag,a=t.tags[t.tags.length-1]||t;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,g(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}function A(t,e){if(t.opt.xmlns){var n=t.tag,r=_(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(E(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var i=t.tags[t.tags.length-1]||t;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach(function(e){g(t,"onopennamespace",{prefix:e,uri:n.ns[e]})});for(var a=0,o=t.attribList.length;a",t.tagName="",void(t.state=Y.SCRIPT);g(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--;){if(t.tags[e].name===r)break;E(t,"Unexpected close tag")}if(e<0)return E(t,"Unmatched closing tag: "+t.tagName),t.textNode+="",void(t.state=Y.TEXT);t.tagName=n;for(var i=t.tags.length;i-- >e;){var a=t.tag=t.tags.pop();t.tagName=t.tag.name,g(t,"onclosetag",t.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var u=t.tags[t.tags.length-1]||t;t.opt.xmlns&&a.ns!==u.ns&&Object.keys(a.ns).forEach(function(e){var n=a.ns[e];g(t,"onclosenamespace",{prefix:e,uri:n})})}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=Y.TEXT}function S(t){var e,n=t.entity,r=n.toLowerCase(),i="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[r]?t.ENTITIES[r]:(n=r,"#"===n.charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),e=parseInt(n,16),i=e.toString(16)):(n=n.slice(1),e=parseInt(n,10),i=e.toString(10))),n=n.replace(/^0+/,""),isNaN(e)||i.toLowerCase()!==n?(E(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function N(t,e){"<"===e?(t.state=Y.OPEN_WAKA,t.startTagPosition=t.position):c(e)||(E(t,"Non-whitespace before first tag."),t.textNode=e,t.state=Y.TEXT)}function I(t,e){var n="";return e"===r?(g(e,"onsgmldeclaration",e.sgmlDecl),e.sgmlDecl="",e.state=Y.TEXT):l(r)?(e.state=Y.SGML_DECL_QUOTED,e.sgmlDecl+=r):e.sgmlDecl+=r;continue;case Y.SGML_DECL_QUOTED:r===e.q&&(e.state=Y.SGML_DECL,e.q=""),e.sgmlDecl+=r;continue;case Y.DOCTYPE:">"===r?(e.state=Y.TEXT,g(e,"ondoctype",e.doctype),e.doctype=!0):(e.doctype+=r,"["===r?e.state=Y.DOCTYPE_DTD:l(r)&&(e.state=Y.DOCTYPE_QUOTED,e.q=r));continue;case Y.DOCTYPE_QUOTED:e.doctype+=r,r===e.q&&(e.q="",e.state=Y.DOCTYPE);continue;case Y.DOCTYPE_DTD:e.doctype+=r,"]"===r?e.state=Y.DOCTYPE:l(r)&&(e.state=Y.DOCTYPE_DTD_QUOTED,e.q=r);continue;case Y.DOCTYPE_DTD_QUOTED:e.doctype+=r,r===e.q&&(e.state=Y.DOCTYPE_DTD,e.q="");continue;case Y.COMMENT:"-"===r?e.state=Y.COMMENT_ENDING:e.comment+=r;continue;case Y.COMMENT_ENDING:"-"===r?(e.state=Y.COMMENT_ENDED,e.comment=m(e.opt,e.comment),e.comment&&g(e,"oncomment",e.comment),e.comment=""):(e.comment+="-"+r,e.state=Y.COMMENT);continue;case Y.COMMENT_ENDED:">"!==r?(E(e,"Malformed comment"),e.comment+="--"+r,e.state=Y.COMMENT):e.state=Y.TEXT;continue;case Y.CDATA:"]"===r?e.state=Y.CDATA_ENDING:e.cdata+=r;continue;case Y.CDATA_ENDING:"]"===r?e.state=Y.CDATA_ENDING_2:(e.cdata+="]"+r,e.state=Y.CDATA);continue;case Y.CDATA_ENDING_2:">"===r?(e.cdata&&g(e,"oncdata",e.cdata),g(e,"onclosecdata"),e.cdata="",e.state=Y.TEXT):"]"===r?e.cdata+="]":(e.cdata+="]]"+r,e.state=Y.CDATA);continue;case Y.PROC_INST:"?"===r?e.state=Y.PROC_INST_ENDING:c(r)?e.state=Y.PROC_INST_BODY:e.procInstName+=r;continue;case Y.PROC_INST_BODY:if(!e.procInstBody&&c(r))continue;"?"===r?e.state=Y.PROC_INST_ENDING:e.procInstBody+=r;continue;case Y.PROC_INST_ENDING:">"===r?(g(e,"onprocessinginstruction",{name:e.procInstName,body:e.procInstBody}),e.procInstName=e.procInstBody="",e.state=Y.TEXT):(e.procInstBody+="?"+r,e.state=Y.PROC_INST_BODY);continue;case Y.OPEN_TAG:h(U,r)?e.tagName+=r:(w(e),">"===r?A(e):"/"===r?e.state=Y.OPEN_TAG_SLASH:(c(r)||E(e,"Invalid character in tag name"),e.state=Y.ATTRIB));continue;case Y.OPEN_TAG_SLASH:">"===r?(A(e,!0),x(e)):(E(e,"Forward-slash in opening tag not followed by >"),e.state=Y.ATTRIB);continue;case Y.ATTRIB:if(c(r))continue;">"===r?A(e):"/"===r?e.state=Y.OPEN_TAG_SLASH:h(M,r)?(e.attribName=r,e.attribValue="",e.state=Y.ATTRIB_NAME):E(e,"Invalid attribute name");continue;case Y.ATTRIB_NAME:"="===r?e.state=Y.ATTRIB_VALUE:">"===r?(E(e,"Attribute without value"),e.attribValue=e.attribName,T(e),A(e)):c(r)?e.state=Y.ATTRIB_NAME_SAW_WHITE:h(U,r)?e.attribName+=r:E(e,"Invalid attribute name");continue;case Y.ATTRIB_NAME_SAW_WHITE:if("="===r)e.state=Y.ATTRIB_VALUE;else{if(c(r))continue;E(e,"Attribute without value"),e.tag.attributes[e.attribName]="",e.attribValue="",g(e,"onattribute",{name:e.attribName,value:""}),e.attribName="",">"===r?A(e):h(M,r)?(e.attribName=r,e.state=Y.ATTRIB_NAME):(E(e,"Invalid attribute name"),e.state=Y.ATTRIB)}continue;case Y.ATTRIB_VALUE:if(c(r))continue;l(r)?(e.q=r,e.state=Y.ATTRIB_VALUE_QUOTED):(E(e,"Unquoted attribute value"),e.state=Y.ATTRIB_VALUE_UNQUOTED,e.attribValue=r);continue;case Y.ATTRIB_VALUE_QUOTED:if(r!==e.q){"&"===r?e.state=Y.ATTRIB_VALUE_ENTITY_Q:e.attribValue+=r;continue}T(e),e.q="",e.state=Y.ATTRIB_VALUE_CLOSED;continue;case Y.ATTRIB_VALUE_CLOSED:c(r)?e.state=Y.ATTRIB:">"===r?A(e):"/"===r?e.state=Y.OPEN_TAG_SLASH:h(M,r)?(E(e,"No whitespace between attributes"),e.attribName=r,e.attribValue="",e.state=Y.ATTRIB_NAME):E(e,"Invalid attribute name");continue;case Y.ATTRIB_VALUE_UNQUOTED:if(!f(r)){"&"===r?e.state=Y.ATTRIB_VALUE_ENTITY_U:e.attribValue+=r;continue}T(e),">"===r?A(e):e.state=Y.ATTRIB;continue;case Y.CLOSE_TAG:if(e.tagName)">"===r?x(e):h(U,r)?e.tagName+=r:e.script?(e.script+=""===r?x(e):E(e,"Invalid characters in closing tag");continue;case Y.TEXT_ENTITY:case Y.ATTRIB_VALUE_ENTITY_Q:case Y.ATTRIB_VALUE_ENTITY_U:var s,u;switch(e.state){case Y.TEXT_ENTITY:s=Y.TEXT,u="textNode";break;case Y.ATTRIB_VALUE_ENTITY_Q:s=Y.ATTRIB_VALUE_QUOTED,u="attribValue";break;case Y.ATTRIB_VALUE_ENTITY_U:s=Y.ATTRIB_VALUE_UNQUOTED,u="attribValue"}";"===r?(e[u]+=S(e),e.entity="",e.state=s):h(e.entity.length?j:K,r)?e.entity+=r:(E(e,"Invalid character in entity name"),e[u]+="&"+e.entity+r,e.entity="",e.state=s);continue;default:throw new Error(e,"Unknown state: "+e.state)}}return e.position>=e.bufferCheckPosition&&i(e),e}e.parser=function(t,e){return new r(t,e)},e.SAXParser=r,e.SAXStream=u,e.createStream=s,e.MAX_BUFFER_LENGTH=65536;var F=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),r.prototype={end:function(){v(this)},write:C,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){o(this)}};var R;try{R=n(25).Stream}catch(t){R=function(){}}var D=e.EVENTS.filter(function(t){return"error"!==t&&"end"!==t});u.prototype=Object.create(R.prototype,{constructor:{value:u}}),u.prototype.write=function(e){if("function"==typeof t&&"function"==typeof t.isBuffer&&t.isBuffer(e)){if(!this._decoder){var r=n(11).StringDecoder;this._decoder=new r("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},u.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},u.prototype.on=function(t,e){var n=this;return n._parser["on"+t]||-1===D.indexOf(t)||(n._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),n.emit.apply(n,e)}),R.prototype.on.call(n,t,e)};var O="[CDATA[",P="DOCTYPE",L="http://www.w3.org/XML/1998/namespace",k="http://www.w3.org/2000/xmlns/",B={xml:L,xmlns:k},M=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,U=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,K=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,j=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Y=0;e.STATE={BEGIN:Y++,BEGIN_WHITESPACE:Y++,TEXT:Y++,TEXT_ENTITY:Y++,OPEN_WAKA:Y++,SGML_DECL:Y++,SGML_DECL_QUOTED:Y++,DOCTYPE:Y++,DOCTYPE_QUOTED:Y++,DOCTYPE_DTD:Y++,DOCTYPE_DTD_QUOTED:Y++,COMMENT_STARTING:Y++,COMMENT:Y++,COMMENT_ENDING:Y++,COMMENT_ENDED:Y++,CDATA:Y++,CDATA_ENDING:Y++,CDATA_ENDING_2:Y++,PROC_INST:Y++,PROC_INST_BODY:Y++,PROC_INST_ENDING:Y++,OPEN_TAG:Y++,OPEN_TAG_SLASH:Y++,ATTRIB:Y++,ATTRIB_NAME:Y++,ATTRIB_NAME_SAW_WHITE:Y++,ATTRIB_VALUE:Y++,ATTRIB_VALUE_QUOTED:Y++,ATTRIB_VALUE_CLOSED:Y++,ATTRIB_VALUE_UNQUOTED:Y++,ATTRIB_VALUE_ENTITY_Q:Y++,ATTRIB_VALUE_ENTITY_U:Y++,CLOSE_TAG:Y++,CLOSE_TAG_SAW_WHITE:Y++,SCRIPT:Y++,SCRIPT_ENDING:Y++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(t){var n=e.ENTITIES[t],r="number"==typeof n?String.fromCharCode(n):n;e.ENTITIES[t]=r});for(var V in e.STATE)e.STATE[e.STATE[V]]=V;Y=e.STATE,/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */ String.fromCodePoint||function(){var t=String.fromCharCode,e=Math.floor,n=function(){var n,r,i=[],a=-1,o=arguments.length;if(!o)return"";for(var s="";++a1114111||e(u)!==u)throw RangeError("Invalid code point: "+u);u<=65535?i.push(u):(u-=65536,n=55296+(u>>10),r=u%1024+56320,i.push(n,r)),(a+1===o||i.length>16384)&&(s+=t.apply(null,i),i.length=0)}return s};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n}()}(e)}).call(e,n(4).Buffer)},function(t,e,n){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-r(t)}function a(t){var e,n,i,a,o,s=t.length;a=r(t),o=new f(3*s/4-a),n=a>0?s-4:s;var u=0;for(e=0;e>16&255,o[u++]=i>>8&255,o[u++]=255&i;return 2===a?(i=l[t.charCodeAt(e)]<<2|l[t.charCodeAt(e+1)]>>4,o[u++]=255&i):1===a&&(i=l[t.charCodeAt(e)]<<10|l[t.charCodeAt(e+1)]<<4|l[t.charCodeAt(e+2)]>>2,o[u++]=i>>8&255,o[u++]=255&i),o}function o(t){return c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}function s(t,e,n){for(var r,i=[],a=e;au?u:o+16383));return 1===r?(e=t[n-1],i+=c[e>>2],i+=c[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=c[e>>10],i+=c[e>>4&63],i+=c[e<<2&63],i+="="),a.push(i),a.join("")}e.byteLength=i,e.toByteArray=a,e.fromByteArray=u;for(var c=[],l=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=h.length;d>1,l=-7,f=n?i-1:0,h=n?-1:1,d=t[e+f];for(f+=h,a=d&(1<<-l)-1,d>>=-l,l+=s;l>0;a=256*a+t[e+f],f+=h,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+t[e+f],f+=h,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),a-=c}return(d?-1:1)*o*Math.pow(2,a-r)},e.write=function(t,e,n,r,i,a){var o,s,u,c=8*a-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),e+=o+f>=1?h/u:h*Math.pow(2,1-f),e*u>=2&&(o++,u/=2),o+f>=l?(s=0,o=l):o+f>=1?(s=(e*u-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;t[n+d]=255&o,d+=p,o/=256,c-=8);t[n+d-p]|=128*g}},function(t,e,n){function r(){i.call(this)}t.exports=r;var i=n(8).EventEmitter;n(1)(r,i),r.Readable=n(9),r.Writable=n(32),r.Duplex=n(33),r.Transform=n(34),r.PassThrough=n(35),r.Stream=r,r.prototype.pipe=function(t,e){function n(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function r(){c.readable&&c.resume&&c.resume()}function a(){l||(l=!0,t.end())}function o(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function s(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){c.removeListener("data",n),t.removeListener("drain",r),c.removeListener("end",a),c.removeListener("close",o),c.removeListener("error",s),t.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),t.removeListener("close",u)}var c=this;c.on("data",n),t.on("drain",r),t._isStdio||e&&!1===e.end||(c.on("end",a),c.on("close",o));var l=!1;return c.on("error",s),t.on("error",s),c.on("end",u),c.on("close",u),t.on("close",u),t.emit("pipe",c),t}},function(t,e){},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e,n){t.copy(e,n)}var a=n(7).Buffer;t.exports=function(){function t(){r(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return a.alloc(0);if(1===this.length)return this.head.data;for(var e=a.allocUnsafe(t>>>0),n=this.head,r=0;n;)i(n.data,e,r),r+=n.data.length,n=n.next;return e},t}()},function(t,e,n){function r(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(29),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function r(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n