Files
fa-diagrams/docs/fa-diagrams.min.js
T
2019-07-16 15:40:27 +02:00

1 line
108 KiB
JavaScript

!function(){return function t(e,r,n){function i(o,a){if(!r[o]){if(!e[o]){var u="function"==typeof require&&require;if(!a&&u)return u(o,!0);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[o]={exports:{}};e[o][0].call(c.exports,function(t){return i(e[o][1][t]||t)},c,c.exports,t,e,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}}()({1:[function(t,e,r){"use strict";r.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){for(var e,r=l(t),n=r[0],o=r[1],a=new s(function(t,e,r){return 3*(e+r)/4-r}(0,n,o)),u=0,c=o>0?n-4:n,f=0;f<c;f+=4)e=i[t.charCodeAt(f)]<<18|i[t.charCodeAt(f+1)]<<12|i[t.charCodeAt(f+2)]<<6|i[t.charCodeAt(f+3)],a[u++]=e>>16&255,a[u++]=e>>8&255,a[u++]=255&e;2===o&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,a[u++]=255&e);1===o&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e);return a},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,s=[],o=0,a=r-i;o<a;o+=16383)s.push(c(t,o,o+16383>a?a:o+16383));1===i?(e=t[r-1],s.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],s.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return s.join("")};for(var n=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=o.length;a<u;++a)n[a]=o[a],i[o.charCodeAt(a)]=a;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,r){for(var i,s,o=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){"use strict";var n=t("base64-js"),i=t("ieee754");r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;var s=2147483647;function o(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return r.__proto__=e.prototype,r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return a(t,e,r)}function a(t,r,n){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|h(t,r),i=o(n),s=i.write(t,r);s!==n&&(i=i.slice(0,s));return i}(t,r);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(P(t,ArrayBuffer)||t&&P(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(n||0))throw new RangeError('"length" is outside of buffer bounds');var i;i=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);return i.__proto__=e.prototype,i}(t,r,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return e.from(i,r,n);var s=function(t){if(e.isBuffer(t)){var r=0|f(t.length),n=o(r);return 0===n.length?n:(t.copy(n,0,0,r),n)}if(void 0!==t.length)return"number"!=typeof t.length||U(t.length)?o(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return e.from(t[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return u(t),o(t<0?0:0|f(t))}function c(t){for(var e=t.length<0?0:0|f(t.length),r=o(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function f(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function h(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||P(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var s=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(s)return i?-1:j(t).length;r=(""+r).toLowerCase(),s=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,r,n,i,s){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),U(n=+n)&&(n=s?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(s)return-1;n=t.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof r&&(r=e.from(r,i)),e.isBuffer(r))return 0===r.length?-1:g(t,r,n,i,s);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):g(t,[r],n,i,s);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var s,o=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,a/=2,u/=2,r/=2}function l(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(s=r;s<a;s++)if(l(t,s)===l(e,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===u)return c*o}else-1!==c&&(s-=s-c),c=-1}else for(r+u>a&&(r=a-u),s=r;s>=0;s--){for(var f=!0,h=0;h<u;h++)if(l(t,s+h)!==l(e,h)){f=!1;break}if(f)return s}return-1}function m(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=e.length;n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(e.substr(2*o,2),16);if(U(a))return o;t[r+o]=a}return o}function y(t,e,r,n){return R(j(e,t.length-r),t,r,n)}function b(t,e,r,n){return R(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return b(t,e,r,n)}function v(t,e,r,n){return R(B(e),t,r,n)}function E(t,e,r,n){return R(function(t,e){for(var r,n,i,s=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}(e,t.length-r),t,r,n)}function _(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var s,o,a,u,l=t[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=r)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(s=t[i+1]))&&(u=(31&l)<<6|63&s)>127&&(c=u);break;case 3:s=t[i+1],o=t[i+2],128==(192&s)&&128==(192&o)&&(u=(15&l)<<12|(63&s)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:s=t[i+1],o=t[i+2],a=t[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(u=(15&l)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(t){var e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=x));return r}(n)}r.kMaxLength=s,e.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),e.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192,e.from=function(t,e,r){return a(t,e,r)},e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array,e.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},e.allocUnsafe=function(t){return l(t)},e.allocUnsafeSlow=function(t){return l(t)},e.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==e.prototype},e.compare=function(t,r){if(P(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),P(r,Uint8Array)&&(r=e.from(r,r.offset,r.byteLength)),!e.isBuffer(t)||!e.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var n=t.length,i=r.length,s=0,o=Math.min(n,i);s<o;++s)if(t[s]!==r[s]){n=t[s],i=r[s];break}return n<i?-1:i<n?1:0},e.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return e.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var i=e.allocUnsafe(r),s=0;for(n=0;n<t.length;++n){var o=t[n];if(P(o,Uint8Array)&&(o=e.from(o)),!e.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,s),s+=o.length}return i},e.byteLength=h,e.prototype._isBuffer=!0,e.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)p(this,e,e+1);return this},e.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)p(this,e,e+3),p(this,e+1,e+2);return this},e.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(this,e+3,e+4);return this},e.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return N(this,e,r);case"base64":return _(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},e.prototype.compare=function(t,r,n,i,s){if(P(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===s&&(s=this.length),r<0||n>t.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&r>=n)return 0;if(i>=s)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,s>>>=0,this===t)return 0;for(var o=s-i,a=n-r,u=Math.min(o,a),l=this.slice(i,s),c=t.slice(r,n),f=0;f<u;++f)if(l[f]!==c[f]){o=l[f],a=c[f];break}return o<a?-1:a<o?1:0},e.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},e.prototype.indexOf=function(t,e,r){return d(this,t,e,r,!0)},e.prototype.lastIndexOf=function(t,e,r){return d(this,t,e,r,!1)},e.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return y(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return v(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function N(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function S(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=e;s<r;++s)i+=D(t[s]);return i}function C(t,e,r){for(var n=t.slice(e,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function k(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function F(t,r,n,i,s,o){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>s||r<o)throw new RangeError('"value" argument is out of bounds');if(n+i>t.length)throw new RangeError("Index out of range")}function I(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(t,e,r,n,s){return e=+e,r>>>=0,s||I(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,s){return e=+e,r>>>=0,s||I(t,0,r,8),i.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;t=~~t,r=void 0===r?n:~~r,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),r<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t);var i=this.subarray(t,r);return i.__proto__=e.prototype,i},e.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return n},e.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||k(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||k(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||k(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||k(t,e,this.length);for(var n=e,i=1,s=this[t+--n];n>0&&(i*=256);)s+=this[t+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*e)),s},e.prototype.readInt8=function(t,e){return t>>>=0,e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||k(t,4,this.length),i.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||k(t,4,this.length),i.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||k(t,8,this.length),i.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||k(t,8,this.length),i.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||F(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[e]=255&t;++s<r&&(i*=256);)this[e+s]=t/i&255;return e+r},e.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||F(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,s=1;for(this[e+i]=255&t;--i>=0&&(s*=256);)this[e+i]=t/s&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);F(this,t,e,r,i-1,-i)}var s=0,o=1,a=0;for(this[e]=255&t;++s<r&&(o*=256);)t<0&&0===a&&0!==this[e+s-1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+r},e.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);F(this,t,e,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[e+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeFloatLE=function(t,e,r){return O(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return O(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,i){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);var s=i-n;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,n,i);else if(this===t&&n<r&&r<i)for(var o=s-1;o>=0;--o)t[o+r]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,i),r);return s},e.prototype.fill=function(t,r,n,i){if("string"==typeof t){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!e.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var s=t.charCodeAt(0);("utf8"===i&&s<128||"latin1"===i)&&(t=s)}}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var o;if(r>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=r;o<n;++o)this[o]=t;else{var a=e.isBuffer(t)?t:e.from(t,i),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-r;++o)this[o+r]=a[o%u]}return this};var M=/[^+/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function j(t,e){var r;e=e||1/0;for(var n=t.length,i=null,s=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function B(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function R(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function P(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function U(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:6}],4:[function(t,e,r){(function(t){function e(t){return Object.prototype.toString.call(t)}r.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},r.isBoolean=function(t){return"boolean"==typeof t},r.isNull=function(t){return null===t},r.isNullOrUndefined=function(t){return null==t},r.isNumber=function(t){return"number"==typeof t},r.isString=function(t){return"string"==typeof t},r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=function(t){return void 0===t},r.isRegExp=function(t){return"[object RegExp]"===e(t)},r.isObject=function(t){return"object"==typeof t&&null!==t},r.isDate=function(t){return"[object Date]"===e(t)},r.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},r.isFunction=function(t){return"function"==typeof t},r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":8}],5:[function(t,e,r){var n=Object.create||function(t){var e=function(){};return e.prototype=t,new e},i=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return r},s=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function o(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var a,u=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),a=0===l.x}catch(t){a=!1}function c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function f(t,e,r,i){var s,o,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((o=t._events)?(o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]):(o=t._events=n(null),t._eventsCount=0),a){if("function"==typeof a?a=o[e]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),!a.warned&&(s=c(t))&&s>0&&a.length>s){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else a=o[e]=r,++t._eventsCount;return t}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=s.call(h,n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(!n)return[];var i=n[e];return i?"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):m(i,i.length):[]}function g(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function m(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}a?Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||t!=t)throw new TypeError('"defaultMaxListeners" must be a positive number');u=t}}):o.defaultMaxListeners=u,o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(t){var e,r,n,i,s,o,a="error"===t;if(o=this._events)a=a&&null==o.error;else if(!a)return!1;if(a){if(arguments.length>1&&(e=arguments[1]),e instanceof Error)throw e;var u=new Error('Unhandled "error" event. ('+e+")");throw u.context=e,u}if(!(r=o[t]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,i=m(t,n),s=0;s<n;++s)i[s].call(r)}(r,l,this);break;case 2:!function(t,e,r,n){if(e)t.call(r,n);else for(var i=t.length,s=m(t,i),o=0;o<i;++o)s[o].call(r,n)}(r,l,this,arguments[1]);break;case 3:!function(t,e,r,n,i){if(e)t.call(r,n,i);else for(var s=t.length,o=m(t,s),a=0;a<s;++a)o[a].call(r,n,i)}(r,l,this,arguments[1],arguments[2]);break;case 4:!function(t,e,r,n,i,s){if(e)t.call(r,n,i,s);else for(var o=t.length,a=m(t,o),u=0;u<o;++u)a[u].call(r,n,i,s)}(r,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),s=1;s<n;s++)i[s-1]=arguments[s];!function(t,e,r,n){if(e)t.apply(r,n);else for(var i=t.length,s=m(t,i),o=0;o<i;++o)s[o].apply(r,n)}(r,l,this,i)}return!0},o.prototype.addListener=function(t,e){return f(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return f(this,t,e,!0)},o.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,p(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,p(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,i,s,o,a;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=n(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(s=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,s=o;break}if(s<0)return this;0===s?r.shift():function(t,e){for(var r=e,n=r+1,i=t.length;n<i;r+=1,n+=1)t[r]=t[n];t.pop()}(r,s),1===r.length&&(i[t]=r[0]),i.removeListener&&this.emit("removeListener",t,a||e)}return this},o.prototype.removeAllListeners=function(t){var e,r,s;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=n(null):delete r[t]),this;if(0===arguments.length){var o,a=i(r);for(s=0;s<a.length;++s)"removeListener"!==(o=a[s])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=n(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)for(s=e.length-1;s>=0;s--)this.removeListener(t,e[s]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],6:[function(t,e,r){r.read=function(t,e,r,n,i){var s,o,a=8*i-n-1,u=(1<<a)-1,l=u>>1,c=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,s=p&(1<<-c)-1,p>>=-c,c+=a;c>0;s=256*s+t[e+f],f+=h,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=n;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===s)s=1-l;else{if(s===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),s-=l}return(p?-1:1)*o*Math.pow(2,s-n)},r.write=function(t,e,r,n,i,s){var o,a,u,l=8*s-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=c):(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))*u>=2&&(o++,u/=2),o+f>=c?(a=0,o=c):o+f>=1?(a=(e*u-1)*Math.pow(2,i),o+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;t[r+p]=255&o,p+=d,o/=256,l-=8);t[r+p-d]|=128*g}},{}],7:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],8:[function(t,e,r){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],9:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],10:[function(t,e,r){(function(t){"use strict";void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,o,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(s=new Array(a-1),o=0;o<s.length;)s[o++]=arguments[o];return t.nextTick(function(){e.apply(null,s)})}}}:e.exports=t}).call(this,t("_process"))},{_process:11}],11:[function(t,e,r){var n,i,s=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var l,c=[],f=!1,h=-1;function p(){f&&l&&(f=!1,l.length?c=l.concat(c):h=-1,c.length&&d())}function d(){if(!f){var t=u(p);f=!0;for(var e=c.length;e;){for(l=c,c=[];++h<e;)l&&l[h].run();h=-1,e=c.length}l=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function m(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new g(t,e)),1!==c.length||f||u(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],12:[function(t,e,r){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":13}],13:[function(t,e,r){"use strict";var n=t("process-nextick-args"),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=f;var s=t("core-util-is");s.inherits=t("inherits");var o=t("./_stream_readable"),a=t("./_stream_writable");s.inherits(f,o);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(t){if(!(this instanceof f))return new f(t);o.call(this,t),a.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",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),f.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},{"./_stream_readable":15,"./_stream_writable":17,"core-util-is":4,inherits:7,"process-nextick-args":10}],14:[function(t,e,r){"use strict";e.exports=s;var n=t("./_stream_transform"),i=t("core-util-is");function s(t){if(!(this instanceof s))return new s(t);n.call(this,t)}i.inherits=t("inherits"),i.inherits(s,n),s.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":16,"core-util-is":4,inherits:7}],15:[function(t,e,r){(function(r,n){"use strict";var i=t("process-nextick-args");e.exports=w;var s,o=t("isarray");w.ReadableState=b;t("events").EventEmitter;var a=function(t,e){return t.listeners(e).length},u=t("./internal/streams/stream"),l=t("safe-buffer").Buffer,c=n.Uint8Array||function(){};var f=t("core-util-is");f.inherits=t("inherits");var h=t("util"),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,g=t("./internal/streams/BufferList"),m=t("./internal/streams/destroy");f.inherits(w,u);var y=["error","close","destroy","pause","resume"];function b(e,r){s=s||t("./_stream_duplex"),e=e||{};var n=r instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=t("string_decoder/").StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function w(e){if(s=s||t("./_stream_duplex"),!(this instanceof w))return new w(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function v(t,e,r,n,i){var s,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,x(t)}(t,o)):(i||(s=function(t,e){var r;n=e,l.isBuffer(n)||n instanceof c||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,e)),s?t.emit("error",s):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===l.prototype||(e=function(t){return l.from(t)}(e)),n?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):E(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?E(t,o,e,!1):N(t,o)):E(t,o,e,!1))):n||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(o)}function E(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&x(t)),N(t,e)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(t,e){this.push(null),e(t)},w.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=l.from(t,e),e=""),r=!0),v(this,t,e,!1,r)},w.prototype.unshift=function(t){return v(this,t,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(e){return d||(d=t("string_decoder/").StringDecoder),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};var _=8388608;function T(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=function(t){return t>=_?t=_:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function x(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(A,t):A(t))}function A(t){p("emit readable"),t.emit("readable"),F(t)}function N(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(S,t,e))}function S(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function C(t){p("readable nexttick read 0"),t.read(0)}function k(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),F(t),e.flowing&&!e.reading&&t.read(0)}function F(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function I(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?i+=s:i+=s.slice(0,t),0===(t-=o)){o===s.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=l.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var s=n.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),0===(t-=o)){o===s.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=s.slice(o));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function O(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(L,e,t))}function L(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function M(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}w.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?O(this):x(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&O(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=T(r,e))),null===(n=t>0?I(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&O(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(t,e){var n=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t)}s.pipesCount+=1,p("pipe count=%d opts=%j",s.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?c:w;function l(e,r){p("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),t.removeListener("close",y),t.removeListener("finish",b),t.removeListener("drain",f),t.removeListener("error",m),t.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",g),h=!0,!s.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function c(){p("onend"),t.end()}s.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",l);var f=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,F(t))}}(n);t.on("drain",f);var h=!1;var d=!1;function g(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===s.pipesCount&&s.pipes===t||s.pipesCount>1&&-1!==M(s.pipes,t))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function m(e){p("onerror",e),w(),t.removeListener("error",m),0===a(t,"error")&&t.emit("error",e)}function y(){t.removeListener("finish",b),w()}function b(){p("onfinish"),t.removeListener("close",y),w()}function w(){p("unpipe"),n.unpipe(t)}return n.on("data",g),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?o(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",m),t.once("close",y),t.once("finish",b),t.emit("pipe",n),s.flowing||(p("pipe resume"),n.resume()),t},w.prototype.unpipe=function(t){var e=this._readableState,r={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,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var o=M(e.pipes,t);return-1===o?this:(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},w.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&x(this):i.nextTick(C,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(k,t,e))}(this,t)),this},w.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(p("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause())))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var s=0;s<y.length;s++)t.on(y[s],this.emit.bind(this,y[s]));return this._read=function(e){p("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=I}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":13,"./internal/streams/BufferList":18,"./internal/streams/destroy":19,"./internal/streams/stream":20,_process:11,"core-util-is":4,events:5,inherits:7,isarray:9,"process-nextick-args":10,"safe-buffer":25,"string_decoder/":28,util:2}],16:[function(t,e,r){"use strict";e.exports=s;var n=t("./_stream_duplex"),i=t("core-util-is");function s(t){if(!(this instanceof s))return new s(t);n.call(this,t),this._transformState={afterTransform:function(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",o)}function o(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){a(t,e,r)}):a(this,null,null)}function a(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=t("inherits"),i.inherits(s,n),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},{"./_stream_duplex":13,"core-util-is":4,inherits:7}],17:[function(t,e,r){(function(r,n,i){"use strict";var s=t("process-nextick-args");function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}e.exports=b;var a,u=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:s.nextTick;b.WritableState=y;var l=t("core-util-is");l.inherits=t("inherits");var c={deprecate:t("util-deprecate")},f=t("./internal/streams/stream"),h=t("safe-buffer").Buffer,p=n.Uint8Array||function(){};var d,g=t("./internal/streams/destroy");function m(){}function y(e,r){a=a||t("./_stream_duplex"),e=e||{};var n=r instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,l=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(l||0===l)?l:c,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 f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(s.nextTick(i,n),s.nextTick(x,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),x(t,e))}(t,r,n,e,i);else{var o=_(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||E(t,r),n?u(v,t,r,o,i):v(t,r,o,i)}}(r,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 o(this)}function b(e){if(a=a||t("./_stream_duplex"),!(d.call(b,this)||this instanceof a))return new b(e);this._writableState=new y(e,this),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)),f.call(this)}function w(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function v(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),x(t,e)}function E(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,w(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,f=r.callback;if(w(t,e,!1,e.objectMode?1:l.length,l,c,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function T(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),x(t,e)})}function x(t,e){var r=_(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,s.nextTick(T,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}l.inherits(b,f),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===b&&(t&&t._writableState instanceof y)}})):d=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,r){var n,i=this._writableState,o=!1,a=!i.objectMode&&(n=t,h.isBuffer(n)||n instanceof p);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=m),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),s.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),s.nextTick(n,o),i=!1),i}(this,i,t,r))&&(i.pendingcb++,o=function(t,e,r,n,i,s){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else w(t,e,!1,a,n,i,s);return u}(this,i,a,t,e,r)),o},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||E(this,t))},b.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},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,x(t,e),r&&(e.finished?s.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("timers").setImmediate)},{"./_stream_duplex":13,"./internal/streams/destroy":19,"./internal/streams/stream":20,_process:11,"core-util-is":4,inherits:7,"process-nextick-args":10,"safe-buffer":25,timers:29,"util-deprecate":30}],18:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=t("util");e.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(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,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,s=n.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=s,i=a,e.copy(r,i),a+=o.data.length,o=o.next;return s},t}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},{"safe-buffer":25,util:2}],19:[function(t,e,r){"use strict";var n=t("process-nextick-args");function i(t,e){t.emit("error",e)}e.exports={destroy:function(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)}),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.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":10}],20:[function(t,e,r){e.exports=t("events").EventEmitter},{events:5}],21:[function(t,e,r){e.exports=t("./readable").PassThrough},{"./readable":22}],22:[function(t,e,r){(r=e.exports=t("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":13,"./lib/_stream_passthrough.js":14,"./lib/_stream_readable.js":15,"./lib/_stream_transform.js":16,"./lib/_stream_writable.js":17}],23:[function(t,e,r){e.exports=t("./readable").Transform},{"./readable":22}],24:[function(t,e,r){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":17}],25:[function(t,e,r){var n=t("buffer"),i=n.Buffer;function s(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,r),r.Buffer=o),s(i,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},{buffer:3}],26:[function(t,e,r){(function(e){!function(r){r.parser=function(t,e){return new s(t,e)},r.SAXParser=s,r.SAXStream=a,r.createStream=function(t,e){return new a(t,e)},r.MAX_BUFFER_LENGTH=65536;var n,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function s(t,e){if(!(this instanceof s))return new s(t,e);!function(t){for(var e=0,r=i.length;e<r;e++)t[i[e]]=""}(this),this.q=this.c="",this.bufferCheckPosition=r.MAX_BUFFER_LENGTH,this.opt=e||{},this.opt.lowercase=this.opt.lowercase||this.opt.lowercasetags,this.looseCase=this.opt.lowercase?"toLowerCase":"toUpperCase",this.tags=[],this.closed=this.closedRoot=this.sawRoot=!1,this.tag=this.error=null,this.strict=!!t,this.noscript=!(!t&&!this.opt.noscript),this.state=A.BEGIN,this.strictEntities=this.opt.strictEntities,this.ENTITIES=this.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),this.attribList=[],this.opt.xmlns&&(this.ns=Object.create(h)),this.trackPosition=!1!==this.opt.position,this.trackPosition&&(this.position=this.line=this.column=0),S(this,"onready")}r.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 r in t)t.hasOwnProperty(r)&&e.push(r);return e}),s.prototype={end:function(){O(this)},write:function(t){if(this.error)throw this.error;if(this.closed)return I(this,"Cannot write after close. Assign an onready handler.");if(null===t)return O(this);"object"==typeof t&&(t=t.toString());var e=0,n="";for(;n=K(t,e++),this.c=n,n;)switch(this.trackPosition&&(this.position++,"\n"===n?(this.line++,this.column=0):this.column++),this.state){case A.BEGIN:if(this.state=A.BEGIN_WHITESPACE,"\ufeff"===n)continue;U(this,n);continue;case A.BEGIN_WHITESPACE:U(this,n);continue;case A.TEXT:if(this.sawRoot&&!this.closedRoot){for(var s=e-1;n&&"<"!==n&&"&"!==n;)(n=K(t,e++))&&this.trackPosition&&(this.position++,"\n"===n?(this.line++,this.column=0):this.column++);this.textNode+=t.substring(s,e-1)}"<"!==n||this.sawRoot&&this.closedRoot&&!this.strict?(y(n)||this.sawRoot&&!this.closedRoot||L(this,"Text data outside of root node."),"&"===n?this.state=A.TEXT_ENTITY:this.textNode+=n):(this.state=A.OPEN_WAKA,this.startTagPosition=this.position);continue;case A.SCRIPT:"<"===n?this.state=A.SCRIPT_ENDING:this.script+=n;continue;case A.SCRIPT_ENDING:"/"===n?this.state=A.CLOSE_TAG:(this.script+="<"+n,this.state=A.SCRIPT);continue;case A.OPEN_WAKA:if("!"===n)this.state=A.SGML_DECL,this.sgmlDecl="";else if(y(n));else if(v(p,n))this.state=A.OPEN_TAG,this.tagName=n;else if("/"===n)this.state=A.CLOSE_TAG,this.tagName="";else if("?"===n)this.state=A.PROC_INST,this.procInstName=this.procInstBody="";else{if(L(this,"Unencoded <"),this.startTagPosition+1<this.position){var o=this.position-this.startTagPosition;n=new Array(o).join(" ")+n}this.textNode+="<"+n,this.state=A.TEXT}continue;case A.SGML_DECL:(this.sgmlDecl+n).toUpperCase()===u?(C(this,"onopencdata"),this.state=A.CDATA,this.sgmlDecl="",this.cdata=""):this.sgmlDecl+n==="--"?(this.state=A.COMMENT,this.comment="",this.sgmlDecl=""):(this.sgmlDecl+n).toUpperCase()===l?(this.state=A.DOCTYPE,(this.doctype||this.sawRoot)&&L(this,"Inappropriately located doctype declaration"),this.doctype="",this.sgmlDecl=""):">"===n?(C(this,"onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=A.TEXT):b(n)?(this.state=A.SGML_DECL_QUOTED,this.sgmlDecl+=n):this.sgmlDecl+=n;continue;case A.SGML_DECL_QUOTED:n===this.q&&(this.state=A.SGML_DECL,this.q=""),this.sgmlDecl+=n;continue;case A.DOCTYPE:">"===n?(this.state=A.TEXT,C(this,"ondoctype",this.doctype),this.doctype=!0):(this.doctype+=n,"["===n?this.state=A.DOCTYPE_DTD:b(n)&&(this.state=A.DOCTYPE_QUOTED,this.q=n));continue;case A.DOCTYPE_QUOTED:this.doctype+=n,n===this.q&&(this.q="",this.state=A.DOCTYPE);continue;case A.DOCTYPE_DTD:this.doctype+=n,"]"===n?this.state=A.DOCTYPE:b(n)&&(this.state=A.DOCTYPE_DTD_QUOTED,this.q=n);continue;case A.DOCTYPE_DTD_QUOTED:this.doctype+=n,n===this.q&&(this.state=A.DOCTYPE_DTD,this.q="");continue;case A.COMMENT:"-"===n?this.state=A.COMMENT_ENDING:this.comment+=n;continue;case A.COMMENT_ENDING:"-"===n?(this.state=A.COMMENT_ENDED,this.comment=F(this.opt,this.comment),this.comment&&C(this,"oncomment",this.comment),this.comment=""):(this.comment+="-"+n,this.state=A.COMMENT);continue;case A.COMMENT_ENDED:">"!==n?(L(this,"Malformed comment"),this.comment+="--"+n,this.state=A.COMMENT):this.state=A.TEXT;continue;case A.CDATA:"]"===n?this.state=A.CDATA_ENDING:this.cdata+=n;continue;case A.CDATA_ENDING:"]"===n?this.state=A.CDATA_ENDING_2:(this.cdata+="]"+n,this.state=A.CDATA);continue;case A.CDATA_ENDING_2:">"===n?(this.cdata&&C(this,"oncdata",this.cdata),C(this,"onclosecdata"),this.cdata="",this.state=A.TEXT):"]"===n?this.cdata+="]":(this.cdata+="]]"+n,this.state=A.CDATA);continue;case A.PROC_INST:"?"===n?this.state=A.PROC_INST_ENDING:y(n)?this.state=A.PROC_INST_BODY:this.procInstName+=n;continue;case A.PROC_INST_BODY:if(!this.procInstBody&&y(n))continue;"?"===n?this.state=A.PROC_INST_ENDING:this.procInstBody+=n;continue;case A.PROC_INST_ENDING:">"===n?(C(this,"onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=A.TEXT):(this.procInstBody+="?"+n,this.state=A.PROC_INST_BODY);continue;case A.OPEN_TAG:v(d,n)?this.tagName+=n:(M(this),">"===n?B(this):"/"===n?this.state=A.OPEN_TAG_SLASH:(y(n)||L(this,"Invalid character in tag name"),this.state=A.ATTRIB));continue;case A.OPEN_TAG_SLASH:">"===n?(B(this,!0),R(this)):(L(this,"Forward-slash in opening tag not followed by >"),this.state=A.ATTRIB);continue;case A.ATTRIB:if(y(n))continue;">"===n?B(this):"/"===n?this.state=A.OPEN_TAG_SLASH:v(p,n)?(this.attribName=n,this.attribValue="",this.state=A.ATTRIB_NAME):L(this,"Invalid attribute name");continue;case A.ATTRIB_NAME:"="===n?this.state=A.ATTRIB_VALUE:">"===n?(L(this,"Attribute without value"),this.attribValue=this.attribName,j(this),B(this)):y(n)?this.state=A.ATTRIB_NAME_SAW_WHITE:v(d,n)?this.attribName+=n:L(this,"Invalid attribute name");continue;case A.ATTRIB_NAME_SAW_WHITE:if("="===n)this.state=A.ATTRIB_VALUE;else{if(y(n))continue;L(this,"Attribute without value"),this.tag.attributes[this.attribName]="",this.attribValue="",C(this,"onattribute",{name:this.attribName,value:""}),this.attribName="",">"===n?B(this):v(p,n)?(this.attribName=n,this.state=A.ATTRIB_NAME):(L(this,"Invalid attribute name"),this.state=A.ATTRIB)}continue;case A.ATTRIB_VALUE:if(y(n))continue;b(n)?(this.q=n,this.state=A.ATTRIB_VALUE_QUOTED):(L(this,"Unquoted attribute value"),this.state=A.ATTRIB_VALUE_UNQUOTED,this.attribValue=n);continue;case A.ATTRIB_VALUE_QUOTED:if(n!==this.q){"&"===n?this.state=A.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=n;continue}j(this),this.q="",this.state=A.ATTRIB_VALUE_CLOSED;continue;case A.ATTRIB_VALUE_CLOSED:y(n)?this.state=A.ATTRIB:">"===n?B(this):"/"===n?this.state=A.OPEN_TAG_SLASH:v(p,n)?(L(this,"No whitespace between attributes"),this.attribName=n,this.attribValue="",this.state=A.ATTRIB_NAME):L(this,"Invalid attribute name");continue;case A.ATTRIB_VALUE_UNQUOTED:if(!w(n)){"&"===n?this.state=A.ATTRIB_VALUE_ENTITY_U:this.attribValue+=n;continue}j(this),">"===n?B(this):this.state=A.ATTRIB;continue;case A.CLOSE_TAG:if(this.tagName)">"===n?R(this):v(d,n)?this.tagName+=n:this.script?(this.script+="</"+this.tagName,this.tagName="",this.state=A.SCRIPT):(y(n)||L(this,"Invalid tagname in closing tag"),this.state=A.CLOSE_TAG_SAW_WHITE);else{if(y(n))continue;E(p,n)?this.script?(this.script+="</"+n,this.state=A.SCRIPT):L(this,"Invalid tagname in closing tag."):this.tagName=n}continue;case A.CLOSE_TAG_SAW_WHITE:if(y(n))continue;">"===n?R(this):L(this,"Invalid characters in closing tag");continue;case A.TEXT_ENTITY:case A.ATTRIB_VALUE_ENTITY_Q:case A.ATTRIB_VALUE_ENTITY_U:var a,c;switch(this.state){case A.TEXT_ENTITY:a=A.TEXT,c="textNode";break;case A.ATTRIB_VALUE_ENTITY_Q:a=A.ATTRIB_VALUE_QUOTED,c="attribValue";break;case A.ATTRIB_VALUE_ENTITY_U:a=A.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===n?(this[c]+=P(this),this.entity="",this.state=a):v(this.entity.length?m:g,n)?this.entity+=n:(L(this,"Invalid character in entity name"),this[c]+="&"+this.entity+n,this.entity="",this.state=a);continue;default:throw new Error(this,"Unknown state: "+this.state)}this.position>=this.bufferCheckPosition&&function(t){for(var e=Math.max(r.MAX_BUFFER_LENGTH,10),n=0,s=0,o=i.length;s<o;s++){var a=t[i[s]].length;if(a>e)switch(i[s]){case"textNode":k(t);break;case"cdata":C(t,"oncdata",t.cdata),t.cdata="";break;case"script":C(t,"onscript",t.script),t.script="";break;default:I(t,"Max buffer length exceeded: "+i[s])}n=Math.max(n,a)}var u=r.MAX_BUFFER_LENGTH-n;t.bufferCheckPosition=u+t.position}(this);return this},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;k(t=this),""!==t.cdata&&(C(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(C(t,"onscript",t.script),t.script="")}};try{n=t("stream").Stream}catch(t){n=function(){}}var o=r.EVENTS.filter(function(t){return"error"!==t&&"end"!==t});function a(t,e){if(!(this instanceof a))return new a(t,e);n.apply(this),this._parser=new s(t,e),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(t){r.emit("error",t),r._parser.error=null},this._decoder=null,o.forEach(function(t){Object.defineProperty(r,"on"+t,{get:function(){return r._parser["on"+t]},set:function(e){if(!e)return r.removeAllListeners(t),r._parser["on"+t]=e,e;r.on(t,e)},enumerable:!0,configurable:!1})})}a.prototype=Object.create(n.prototype,{constructor:{value:a}}),a.prototype.write=function(r){if("function"==typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(r)){if(!this._decoder){var n=t("string_decoder").StringDecoder;this._decoder=new n("utf8")}r=this._decoder.write(r)}return this._parser.write(r.toString()),this.emit("data",r),!0},a.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},a.prototype.on=function(t,e){var r=this;return r._parser["on"+t]||-1===o.indexOf(t)||(r._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),r.emit.apply(r,e)}),n.prototype.on.call(r,t,e)};var u="[CDATA[",l="DOCTYPE",c="http://www.w3.org/XML/1998/namespace",f="http://www.w3.org/2000/xmlns/",h={xml:c,xmlns:f},p=/[:_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]/,d=/[:_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-]/,g=/[#:_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]/,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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function y(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function b(t){return'"'===t||"'"===t}function w(t){return">"===t||y(t)}function v(t,e){return t.test(e)}function E(t,e){return!v(t,e)}var _,T,x,A=0;for(var N in r.STATE={BEGIN:A++,BEGIN_WHITESPACE:A++,TEXT:A++,TEXT_ENTITY:A++,OPEN_WAKA:A++,SGML_DECL:A++,SGML_DECL_QUOTED:A++,DOCTYPE:A++,DOCTYPE_QUOTED:A++,DOCTYPE_DTD:A++,DOCTYPE_DTD_QUOTED:A++,COMMENT_STARTING:A++,COMMENT:A++,COMMENT_ENDING:A++,COMMENT_ENDED:A++,CDATA:A++,CDATA_ENDING:A++,CDATA_ENDING_2:A++,PROC_INST:A++,PROC_INST_BODY:A++,PROC_INST_ENDING:A++,OPEN_TAG:A++,OPEN_TAG_SLASH:A++,ATTRIB:A++,ATTRIB_NAME:A++,ATTRIB_NAME_SAW_WHITE:A++,ATTRIB_VALUE:A++,ATTRIB_VALUE_QUOTED:A++,ATTRIB_VALUE_CLOSED:A++,ATTRIB_VALUE_UNQUOTED:A++,ATTRIB_VALUE_ENTITY_Q:A++,ATTRIB_VALUE_ENTITY_U:A++,CLOSE_TAG:A++,CLOSE_TAG_SAW_WHITE:A++,SCRIPT:A++,SCRIPT_ENDING:A++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.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(r.ENTITIES).forEach(function(t){var e=r.ENTITIES[t],n="number"==typeof e?String.fromCharCode(e):e;r.ENTITIES[t]=n}),r.STATE)r.STATE[r.STATE[N]]=N;function S(t,e,r){t[e]&&t[e](r)}function C(t,e,r){t.textNode&&k(t),S(t,e,r)}function k(t){t.textNode=F(t.opt,t.textNode),t.textNode&&S(t,"ontext",t.textNode),t.textNode=""}function F(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function I(t,e){return k(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,S(t,"onerror",e),t}function O(t){return t.sawRoot&&!t.closedRoot&&L(t,"Unclosed root tag"),t.state!==A.BEGIN&&t.state!==A.BEGIN_WHITESPACE&&t.state!==A.TEXT&&I(t,"Unexpected end"),k(t),t.c="",t.closed=!0,S(t,"onend"),s.call(t,t.strict,t.opt),t}function L(t,e){if("object"!=typeof t||!(t instanceof s))throw new Error("bad call to strictFail");t.strict&&I(t,e)}function M(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,r=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(r.ns=e.ns),t.attribList.length=0,C(t,"onopentagstart",r)}function D(t,e){var r=t.indexOf(":")<0?["",t]:t.split(":"),n=r[0],i=r[1];return e&&"xmlns"===t&&(n="xmlns",i=""),{prefix:n,local:i}}function j(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=D(t.attribName,!0),r=e.prefix,n=e.local;if("xmlns"===r)if("xml"===n&&t.attribValue!==c)L(t,"xml: prefix must be bound to "+c+"\nActual: "+t.attribValue);else if("xmlns"===n&&t.attribValue!==f)L(t,"xmlns: prefix must be bound to "+f+"\nActual: "+t.attribValue);else{var i=t.tag,s=t.tags[t.tags.length-1]||t;i.ns===s.ns&&(i.ns=Object.create(s.ns)),i.ns[n]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,C(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function B(t,e){if(t.opt.xmlns){var r=t.tag,n=D(t.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(L(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),r.uri=n.prefix);var i=t.tags[t.tags.length-1]||t;r.ns&&i.ns!==r.ns&&Object.keys(r.ns).forEach(function(e){C(t,"onopennamespace",{prefix:e,uri:r.ns[e]})});for(var s=0,o=t.attribList.length;s<o;s++){var a=t.attribList[s],u=a[0],l=a[1],c=D(u,!0),f=c.prefix,h=c.local,p=""===f?"":r.ns[f]||"",d={name:u,value:l,prefix:f,local:h,uri:p};f&&"xmlns"!==f&&!p&&(L(t,"Unbound namespace prefix: "+JSON.stringify(f)),d.uri=f),t.tag.attributes[u]=d,C(t,"onattribute",d)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),C(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=A.TEXT:t.state=A.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function R(t){if(!t.tagName)return L(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=A.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=A.SCRIPT);C(t,"onscript",t.script),t.script=""}var e=t.tags.length,r=t.tagName;t.strict||(r=r[t.looseCase]());for(var n=r;e--;){if(t.tags[e].name===n)break;L(t,"Unexpected close tag")}if(e<0)return L(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=A.TEXT);t.tagName=r;for(var i=t.tags.length;i-- >e;){var s=t.tag=t.tags.pop();t.tagName=t.tag.name,C(t,"onclosetag",t.tagName);var o={};for(var a in s.ns)o[a]=s.ns[a];var u=t.tags[t.tags.length-1]||t;t.opt.xmlns&&s.ns!==u.ns&&Object.keys(s.ns).forEach(function(e){var r=s.ns[e];C(t,"onclosenamespace",{prefix:e,uri:r})})}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=A.TEXT}function P(t){var e,r=t.entity,n=r.toLowerCase(),i="";return t.ENTITIES[r]?t.ENTITIES[r]:t.ENTITIES[n]?t.ENTITIES[n]:("#"===(r=n).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),i=(e=parseInt(r,16)).toString(16)):(r=r.slice(1),i=(e=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(e)||i.toLowerCase()!==r?(L(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function U(t,e){"<"===e?(t.state=A.OPEN_WAKA,t.startTagPosition=t.position):y(e)||(L(t,"Non-whitespace before first tag."),t.textNode=e,t.state=A.TEXT)}function K(t,e){var r="";return e<t.length&&(r=t.charAt(e)),r}A=r.STATE,String.fromCodePoint||(_=String.fromCharCode,T=Math.floor,x=function(){var t,e,r=[],n=-1,i=arguments.length;if(!i)return"";for(var s="";++n<i;){var o=Number(arguments[n]);if(!isFinite(o)||o<0||o>1114111||T(o)!==o)throw RangeError("Invalid code point: "+o);o<=65535?r.push(o):(t=55296+((o-=65536)>>10),e=o%1024+56320,r.push(t,e)),(n+1===i||r.length>16384)&&(s+=_.apply(null,r),r.length=0)}return s},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:x,configurable:!0,writable:!0}):String.fromCodePoint=x)}(void 0===r?this.sax={}:r)}).call(this,t("buffer").Buffer)},{buffer:3,stream:27,string_decoder:28}],27:[function(t,e,r){e.exports=i;var n=t("events").EventEmitter;function i(){n.call(this)}t("inherits")(i,n),i.Readable=t("readable-stream/readable.js"),i.Writable=t("readable-stream/writable.js"),i.Duplex=t("readable-stream/duplex.js"),i.Transform=t("readable-stream/transform.js"),i.PassThrough=t("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function s(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",s),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var o=!1;function a(){o||(o=!0,t.end())}function u(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function l(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){r.removeListener("data",i),t.removeListener("drain",s),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",l),t.on("error",l),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},{events:5,inherits:7,"readable-stream/duplex.js":12,"readable-stream/passthrough.js":21,"readable-stream/readable.js":22,"readable-stream/transform.js":23,"readable-stream/writable.js":24}],28:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=n.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}};function s(t){var e;switch(this.encoding=function(t){var e=function(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}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=l,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=c,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,""}}(this,t);return void 0!==r?r: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 u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?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-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}r.StringDecoder=s,s.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},s.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"":e},s.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=o(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=o(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=o(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":25}],29:[function(t,e,r){(function(e,n){var i=t("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},u=0;function l(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new l(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new l(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r.setImmediate="function"==typeof e?e:function(t){var e=u++,n=!(arguments.length<2)&&o.call(arguments,1);return a[e]=!0,i(function(){a[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))}),e},r.clearImmediate="function"==typeof n?n:function(t){delete a[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":11,timers:29}],30:[function(t,e,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(t){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],31:[function(t,e,r){e.exports={isArray:function(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}}},{}],32:[function(t,e,r){var n=t("./xml2js"),i=t("./xml2json"),s=t("./js2xml"),o=t("./json2xml");e.exports={xml2js:n,xml2json:i,js2xml:s,json2xml:o}},{"./js2xml":33,"./json2xml":34,"./xml2js":36,"./xml2json":37}],33:[function(t,e,r){var n,i,s=t("./options-helper"),o=t("./array-helper").isArray;function a(t,e,r){return(!r&&t.spaces?"\n":"")+Array(e+1).join(t.spaces)}function u(t,e,r){if(e.ignoreAttributes)return"";"attributesFn"in e&&(t=e.attributesFn(t,i,n));var s,o,u,l,c=[];for(s in t)t.hasOwnProperty(s)&&null!==t[s]&&void 0!==t[s]&&(l=e.noQuotesForNativeAttributes&&"string"!=typeof t[s]?"":'"',o=(o=""+t[s]).replace(/"/g,"&quot;"),u="attributeNameFn"in e?e.attributeNameFn(s,o,i,n):s,c.push(e.spaces&&e.indentAttributes?a(e,r+1,!1):" "),c.push(u+"="+l+("attributeValueFn"in e?e.attributeValueFn(o,s,i,n):o)+l));return t&&Object.keys(t).length&&e.spaces&&e.indentAttributes&&c.push(a(e,r,!1)),c.join("")}function l(t,e,r){return n=t,i="xml",e.ignoreDeclaration?"":"<?xml"+u(t[e.attributesKey],e,r)+"?>"}function c(t,e,r){if(e.ignoreInstruction)return"";var s;for(s in t)if(t.hasOwnProperty(s))break;var o="instructionNameFn"in e?e.instructionNameFn(s,t[s],i,n):s;if("object"==typeof t[s])return n=t,i=o,"<?"+o+u(t[s][e.attributesKey],e,r)+"?>";var a=t[s]?t[s]:"";return"instructionFn"in e&&(a=e.instructionFn(a,s,i,n)),"<?"+o+(a?" "+a:"")+"?>"}function f(t,e){return e.ignoreComment?"":"\x3c!--"+("commentFn"in e?e.commentFn(t,i,n):t)+"--\x3e"}function h(t,e){return e.ignoreCdata?"":"<![CDATA["+("cdataFn"in e?e.cdataFn(t,i,n):t.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function p(t,e){return e.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in e?e.doctypeFn(t,i,n):t)+">"}function d(t,e){return e.ignoreText?"":(t=(t=(t=""+t).replace(/&amp;/g,"&")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"textFn"in e?e.textFn(t,i,n):t)}function g(t,e,r,s){return t.reduce(function(t,o){var l=a(e,r,s&&!t);switch(o.type){case"element":return t+l+function(t,e,r){n=t,i=t.name;var s=[],o="elementNameFn"in e?e.elementNameFn(t.name,t):t.name;s.push("<"+o),t[e.attributesKey]&&s.push(u(t[e.attributesKey],e,r));var a=t[e.elementsKey]&&t[e.elementsKey].length||t[e.attributesKey]&&"preserve"===t[e.attributesKey]["xml:space"];return a||(a="fullTagEmptyElementFn"in e?e.fullTagEmptyElementFn(t.name,t):e.fullTagEmptyElement),a?(s.push(">"),t[e.elementsKey]&&t[e.elementsKey].length&&(s.push(g(t[e.elementsKey],e,r+1)),n=t,i=t.name),s.push(e.spaces&&function(t,e){var r;if(t.elements&&t.elements.length)for(r=0;r<t.elements.length;++r)switch(t.elements[r][e.typeKey]){case"text":if(e.indentText)return!0;break;case"cdata":if(e.indentCdata)return!0;break;case"instruction":if(e.indentInstruction)return!0;break;case"doctype":case"comment":case"element":default:return!0}return!1}(t,e)?"\n"+Array(r+1).join(e.spaces):""),s.push("</"+o+">")):s.push("/>"),s.join("")}(o,e,r);case"comment":return t+l+f(o[e.commentKey],e);case"doctype":return t+l+p(o[e.doctypeKey],e);case"cdata":return t+(e.indentCdata?l:"")+h(o[e.cdataKey],e);case"text":return t+(e.indentText?l:"")+d(o[e.textKey],e);case"instruction":var m={};return m[o[e.nameKey]]=o[e.attributesKey]?o:o[e.instructionKey],t+(e.indentInstruction?l:"")+c(m,e,r)}},"")}function m(t,e,r){var n;for(n in t)if(t.hasOwnProperty(n))switch(n){case e.parentKey:case e.attributesKey:break;case e.textKey:if(e.indentText||r)return!0;break;case e.cdataKey:if(e.indentCdata||r)return!0;break;case e.instructionKey:if(e.indentInstruction||r)return!0;break;case e.doctypeKey:case e.commentKey:default:return!0}return!1}function y(t,e,r,s,o){n=t,i=e;var l="elementNameFn"in r?r.elementNameFn(e,t):e;if(void 0===t||null===t||""===t)return"fullTagEmptyElementFn"in r&&r.fullTagEmptyElementFn(e,t)||r.fullTagEmptyElement?"<"+l+"></"+l+">":"<"+l+"/>";var c=[];if(e){if(c.push("<"+l),"object"!=typeof t)return c.push(">"+d(t,r)+"</"+l+">"),c.join("");t[r.attributesKey]&&c.push(u(t[r.attributesKey],r,s));var f=m(t,r,!0)||t[r.attributesKey]&&"preserve"===t[r.attributesKey]["xml:space"];if(f||(f="fullTagEmptyElementFn"in r?r.fullTagEmptyElementFn(e,t):r.fullTagEmptyElement),!f)return c.push("/>"),c.join("");c.push(">")}return c.push(b(t,r,s+1,!1)),n=t,i=e,e&&c.push((o?a(r,s,!1):"")+"</"+l+">"),c.join("")}function b(t,e,r,n){var i,s,u,g=[];for(s in t)if(t.hasOwnProperty(s))for(u=o(t[s])?t[s]:[t[s]],i=0;i<u.length;++i){switch(s){case e.declarationKey:g.push(l(u[i],e,r));break;case e.instructionKey:g.push((e.indentInstruction?a(e,r,n):"")+c(u[i],e,r));break;case e.attributesKey:case e.parentKey:break;case e.textKey:g.push((e.indentText?a(e,r,n):"")+d(u[i],e));break;case e.cdataKey:g.push((e.indentCdata?a(e,r,n):"")+h(u[i],e));break;case e.doctypeKey:g.push(a(e,r,n)+p(u[i],e));break;case e.commentKey:g.push(a(e,r,n)+f(u[i],e));break;default:g.push(a(e,r,n)+y(u[i],s,e,r,m(u[i],e)))}n=n&&!g.length}return g.join("")}e.exports=function(t,e){e=function(t){var e=s.copyOptions(t);return s.ensureFlagExists("ignoreDeclaration",e),s.ensureFlagExists("ignoreInstruction",e),s.ensureFlagExists("ignoreAttributes",e),s.ensureFlagExists("ignoreText",e),s.ensureFlagExists("ignoreComment",e),s.ensureFlagExists("ignoreCdata",e),s.ensureFlagExists("ignoreDoctype",e),s.ensureFlagExists("compact",e),s.ensureFlagExists("indentText",e),s.ensureFlagExists("indentCdata",e),s.ensureFlagExists("indentAttributes",e),s.ensureFlagExists("indentInstruction",e),s.ensureFlagExists("fullTagEmptyElement",e),s.ensureFlagExists("noQuotesForNativeAttributes",e),s.ensureSpacesExists(e),"number"==typeof e.spaces&&(e.spaces=Array(e.spaces+1).join(" ")),s.ensureKeyExists("declaration",e),s.ensureKeyExists("instruction",e),s.ensureKeyExists("attributes",e),s.ensureKeyExists("text",e),s.ensureKeyExists("comment",e),s.ensureKeyExists("cdata",e),s.ensureKeyExists("doctype",e),s.ensureKeyExists("type",e),s.ensureKeyExists("name",e),s.ensureKeyExists("elements",e),s.checkFnExists("doctype",e),s.checkFnExists("instruction",e),s.checkFnExists("cdata",e),s.checkFnExists("comment",e),s.checkFnExists("text",e),s.checkFnExists("instructionName",e),s.checkFnExists("elementName",e),s.checkFnExists("attributeName",e),s.checkFnExists("attributeValue",e),s.checkFnExists("attributes",e),s.checkFnExists("fullTagEmptyElement",e),e}(e);var r=[];return n=t,i="_root_",e.compact?r.push(b(t,e,0,!0)):(t[e.declarationKey]&&r.push(l(t[e.declarationKey],e,0)),t[e.elementsKey]&&t[e.elementsKey].length&&r.push(g(t[e.elementsKey],e,0,!r.length))),r.join("")}},{"./array-helper":31,"./options-helper":35}],34:[function(t,e,r){(function(r){var n=t("./js2xml.js");e.exports=function(t,e){t instanceof r&&(t=t.toString());var i=null;if("string"==typeof t)try{i=JSON.parse(t)}catch(t){throw new Error("The JSON structure is invalid")}else i=t;return n(i,e)}}).call(this,t("buffer").Buffer)},{"./js2xml.js":33,buffer:3}],35:[function(t,e,r){var n=t("./array-helper").isArray;e.exports={copyOptions:function(t){var e,r={};for(e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);return r},ensureFlagExists:function(t,e){t in e&&"boolean"==typeof e[t]||(e[t]=!1)},ensureSpacesExists:function(t){"spaces"in t&&("number"==typeof t.spaces||"string"==typeof t.spaces)||(t.spaces=0)},ensureAlwaysArrayExists:function(t){"alwaysArray"in t&&("boolean"==typeof t.alwaysArray||n(t.alwaysArray))||(t.alwaysArray=!1)},ensureKeyExists:function(t,e){t+"Key"in e&&"string"==typeof e[t+"Key"]||(e[t+"Key"]=e.compact?"_"+t:t)},checkFnExists:function(t,e){return t+"Fn"in e}}},{"./array-helper":31}],36:[function(t,e,r){var n,i,s=t("sax"),o=t("./options-helper"),a=t("./array-helper").isArray;function u(t){var e=Number(t);if(!isNaN(e))return e;var r=t.toLowerCase();return"true"===r||"false"!==r&&t}function l(t,e){var r;if(n.compact){if(!i[n[t+"Key"]]&&(a(n.alwaysArray)?-1!==n.alwaysArray.indexOf(n[t+"Key"]):n.alwaysArray)&&(i[n[t+"Key"]]=[]),i[n[t+"Key"]]&&!a(i[n[t+"Key"]])&&(i[n[t+"Key"]]=[i[n[t+"Key"]]]),t+"Fn"in n&&"string"==typeof e&&(e=n[t+"Fn"](e,i)),"instruction"===t&&("instructionFn"in n||"instructionNameFn"in n))for(r in e)if(e.hasOwnProperty(r))if("instructionFn"in n)e[r]=n.instructionFn(e[r],r,i);else{var s=e[r];delete e[r],e[n.instructionNameFn(r,s,i)]=s}a(i[n[t+"Key"]])?i[n[t+"Key"]].push(e):i[n[t+"Key"]]=e}else{i[n.elementsKey]||(i[n.elementsKey]=[]);var o={};if(o[n.typeKey]=t,"instruction"===t){for(r in e)if(e.hasOwnProperty(r))break;o[n.nameKey]="instructionNameFn"in n?n.instructionNameFn(r,e,i):r,n.instructionHasAttributes?(o[n.attributesKey]=e[r][n.attributesKey],"instructionFn"in n&&(o[n.attributesKey]=n.instructionFn(o[n.attributesKey],r,i))):("instructionFn"in n&&(e[r]=n.instructionFn(e[r],r,i)),o[n.instructionKey]=e[r])}else t+"Fn"in n&&(e=n[t+"Fn"](e,i)),o[n[t+"Key"]]=e;n.addParent&&(o[n.parentKey]=i),i[n.elementsKey].push(o)}}function c(t){var e;if("attributesFn"in n&&t&&(t=n.attributesFn(t,i)),(n.trim||"attributeValueFn"in n||"attributeNameFn"in n||n.nativeTypeAttributes)&&t)for(e in t)if(t.hasOwnProperty(e)&&(n.trim&&(t[e]=t[e].trim()),n.nativeTypeAttributes&&(t[e]=u(t[e])),"attributeValueFn"in n&&(t[e]=n.attributeValueFn(t[e],e,i)),"attributeNameFn"in n)){var r=t[e];delete t[e],t[n.attributeNameFn(e,t[e],i)]=r}return t}function f(t){var e={};if(t.body&&("xml"===t.name.toLowerCase()||n.instructionHasAttributes)){for(var r,s=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(r=s.exec(t.body));)e[r[1]]=r[2]||r[3]||r[4];e=c(e)}if("xml"===t.name.toLowerCase()){if(n.ignoreDeclaration)return;i[n.declarationKey]={},Object.keys(e).length&&(i[n.declarationKey][n.attributesKey]=e),n.addParent&&(i[n.declarationKey][n.parentKey]=i)}else{if(n.ignoreInstruction)return;n.trim&&(t.body=t.body.trim());var o={};n.instructionHasAttributes&&Object.keys(e).length?(o[t.name]={},o[t.name][n.attributesKey]=e):o[t.name]=t.body,l("instruction",o)}}function h(t,e){var r;if("object"==typeof t&&(e=t.attributes,t=t.name),e=c(e),"elementNameFn"in n&&(t=n.elementNameFn(t,i)),n.compact){var s;if(r={},!n.ignoreAttributes&&e&&Object.keys(e).length)for(s in r[n.attributesKey]={},e)e.hasOwnProperty(s)&&(r[n.attributesKey][s]=e[s]);t in i||(a(n.alwaysArray)?-1===n.alwaysArray.indexOf(t):!n.alwaysArray)||(i[t]=[]),i[t]&&!a(i[t])&&(i[t]=[i[t]]),a(i[t])?i[t].push(r):i[t]=r}else i[n.elementsKey]||(i[n.elementsKey]=[]),(r={})[n.typeKey]="element",r[n.nameKey]=t,!n.ignoreAttributes&&e&&Object.keys(e).length&&(r[n.attributesKey]=e),n.alwaysChildren&&(r[n.elementsKey]=[]),i[n.elementsKey].push(r);r[n.parentKey]=i,i=r}function p(t){n.ignoreText||(t.trim()||n.captureSpacesBetweenElements)&&(n.trim&&(t=t.trim()),n.nativeType&&(t=u(t)),n.sanitize&&(t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),l("text",t))}function d(t){n.ignoreComment||(n.trim&&(t=t.trim()),l("comment",t))}function g(t){var e=i[n.parentKey];n.addParent||delete i[n.parentKey],i=e}function m(t){n.ignoreCdata||(n.trim&&(t=t.trim()),l("cdata",t))}function y(t){n.ignoreDoctype||(t=t.replace(/^ /,""),n.trim&&(t=t.trim()),l("doctype",t))}function b(t){t.note=t}e.exports=function(t,e){var r=s.parser(!0,{}),a={};if(i=a,n=function(t){return n=o.copyOptions(t),o.ensureFlagExists("ignoreDeclaration",n),o.ensureFlagExists("ignoreInstruction",n),o.ensureFlagExists("ignoreAttributes",n),o.ensureFlagExists("ignoreText",n),o.ensureFlagExists("ignoreComment",n),o.ensureFlagExists("ignoreCdata",n),o.ensureFlagExists("ignoreDoctype",n),o.ensureFlagExists("compact",n),o.ensureFlagExists("alwaysChildren",n),o.ensureFlagExists("addParent",n),o.ensureFlagExists("trim",n),o.ensureFlagExists("nativeType",n),o.ensureFlagExists("nativeTypeAttributes",n),o.ensureFlagExists("sanitize",n),o.ensureFlagExists("instructionHasAttributes",n),o.ensureFlagExists("captureSpacesBetweenElements",n),o.ensureAlwaysArrayExists(n),o.ensureKeyExists("declaration",n),o.ensureKeyExists("instruction",n),o.ensureKeyExists("attributes",n),o.ensureKeyExists("text",n),o.ensureKeyExists("comment",n),o.ensureKeyExists("cdata",n),o.ensureKeyExists("doctype",n),o.ensureKeyExists("type",n),o.ensureKeyExists("name",n),o.ensureKeyExists("elements",n),o.ensureKeyExists("parent",n),o.checkFnExists("doctype",n),o.checkFnExists("instruction",n),o.checkFnExists("cdata",n),o.checkFnExists("comment",n),o.checkFnExists("text",n),o.checkFnExists("instructionName",n),o.checkFnExists("elementName",n),o.checkFnExists("attributeName",n),o.checkFnExists("attributeValue",n),o.checkFnExists("attributes",n),n}(e),r.opt={strictEntities:!0},r.onopentag=h,r.ontext=p,r.oncomment=d,r.onclosetag=g,r.onerror=b,r.oncdata=m,r.ondoctype=y,r.onprocessinginstruction=f,r.write(t).close(),a[n.elementsKey]){var u=a[n.elementsKey];delete a[n.elementsKey],a[n.elementsKey]=u,delete a.text}return a}},{"./array-helper":31,"./options-helper":35,sax:26}],37:[function(t,e,r){var n=t("./options-helper"),i=t("./xml2js");e.exports=function(t,e){var r,s,o;return r=function(t){var e=n.copyOptions(t);return n.ensureSpacesExists(e),e}(e),s=i(t,r),o="compact"in r&&r.compact?"_parent":"parent",("addParent"in r&&r.addParent?JSON.stringify(s,function(t,e){return t===o?"_":e},r.spaces):JSON.stringify(s,null,r.spaces)).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}},{"./options-helper":35,"./xml2js":36}],38:[function(t,e,r){(function(r){const n=t("./placing"),i=t("./rendering"),s={compute:t=>{const e=t.options||{};let r={};(t.nodes||[]).filter(t=>"string"==typeof t.name).forEach(t=>r[t.name]=t);let s=(t.links||[]).filter(t=>t.from&&t.to);if(s.filter(t=>!r[t.from]).forEach(t=>console.warn(`unknown source node "${t.from}"`)),s.filter(t=>!r[t.to]).forEach(t=>console.warn(`unknown destination node "${t.to}"`)),s=s.filter(t=>r[t.from]&&r[t.to]),!(r=n(e.placing).compute(r,s)))throw"Failed to place nodes";return i(e.rendering).compute(r,s)}};e.exports=s,r.faDiagrams=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./placing":39,"./rendering":40}],39:[function(t,e,r){const n=t("./utils"),i={name:"!string",x:"number",y:"number"},s={from:"!string",to:"!string",direction:"string"},o={"max-link-length":3,diagonals:!0};e.exports=(t=>{t=n.merge(o,t);const e={getBounds:t=>{const e=Object.values(t).filter(t=>void 0!==t.x);if(0===e.length)return{x:0,y:0,w:0,h:0};let r=null,n=null,i=null,s=null;return e.forEach(t=>{r=null!==r?Math.min(t.x,r):t.x,n=null!==n?Math.min(t.y,n):t.y,i=null!==i?Math.max(t.x,i):t.x,s=null!==s?Math.max(t.y,s):t.y}),{x:r,y:n,w:i-r+1,h:s-n+1}},getNewPos:t=>{const r=e.getBounds(t),i=n.newMap(r.w,r.h,!1);Object.values(t).filter(t=>void 0!==t.x).forEach(t=>{i[t.x-r.x][t.y-r.y]=!0});for(let t=0;t<r.h;t++)for(let e=0;e<r.w;e++)if(!i[e][t])return{x:e+r.x,y:t+r.y};return r.w<=r.h?{x:r.x+r.w,y:r.y}:{x:r.x,y:r.y+r.h}},nodeBetween:(t,e,r)=>{let n=t[e].x,i=t[e].y,s=t[r].x,o=t[r].y;const a=s-n,u=o-i,l=(t,n)=>i=>i.x===t&&i.y===n&&i.name!==e&&i.name!==r;if(Math.abs(a)>=Math.abs(u)){if(n>s){let t=n;n=s,s=t}for(let e=n;e<=s;e++){let r=Math.round(i+u*(e-n)/a);if(Object.values(t).find(l(e,r)))return!0}}else{if(i>o){let t=i;i=o,o=t}for(let e=i;e<=o;e++){let r=Math.round(n+a*(e-i)/u);if(Object.values(t).find(l(r,e)))return!0}}return!1},getPosition:(e,r,n)=>{const i=e[r],s={maxX:null,maxY:null,minX:null,minY:null,startX:null,startY:null,free:!0},o=(t,r,n,i)=>o=>{if(void 0!==e[o].x){const a=e[o].x,u=e[o].y;s.minX=null!==s.minX?Math.max(a+t,s.minX):a+t,s.maxX=null!==s.maxX?Math.min(a+r,s.maxX):a+r,s.minY=null!==s.minY?Math.max(u+n,s.minY):u+n,s.maxY=null!==s.maxY?Math.min(u+i,s.maxY):u+i,null===s.startX&&(s.startX=Math.abs(i+n)>0?a:1===Math.abs(t)?"minX":"maxX",s.startY=Math.abs(r+t)>0?u:1===Math.abs(n)?"minY":"maxY"),s.free=!1}},a=t["max-link-length"],u=n?a:0;return i.const.beforeX.forEach(o(1,1+a,-u,u)),i.const.beforeY.forEach(o(-u,u,1,1+a)),i.const.afterX.forEach(o(-1-a,-1,-u,u)),i.const.afterY.forEach(o(-u,u,-1-a,-1)),"string"==typeof s.startX&&(s.startX=s[s.startX]),"string"==typeof s.startY&&(s.startY=s[s.startY]),s.minX>s.maxX||s.minY>s.maxY?null:{x:s.startX,y:s.startY,free:s.free}},isValid:(r,n)=>{let i,s,o;const a=Object.values(r).filter(t=>void 0!==t.x);for(let t=0;t<a.length-1;t++)for(let e=t+1;e<a.length;e++)if(a[t].x===a[e].x&&a[t].y===a[e].y)return!1;for(let a=0;a<n.length;a++)if(s=r[(i=n[a]).from],o=r[i.to],void 0!==s.x&&void 0!==o.x){if(e.nodeBetween(r,i.from,i.to))return!1;if(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2)>Math.pow(t["max-link-length"],2))return!1;switch(i.direction){case"up":case"top":if(o.y-s.y>=0)return!1;break;case"down":case"bottom":if(o.y-s.y<=0)return!1;break;case"left":if(o.x-s.x>=0)return!1;break;case"right":if(o.x-s.x<=0)return!1}if(!t.diagonals&&s.x!==o.x&&s.y!==o.y)return!1}return!0},correctPlacing:t=>{const r=e.getBounds(t);Object.values(t).forEach(t=>{t.x-=r.x,t.y-=r.y})},applyLinks:(r,i,s=0)=>{if(!e.isValid(r,i))return null;const o=Object.keys(r).filter(t=>void 0===r[t].x);if(0===o.length)return r;const a=[],u=(t,o,a)=>{const u=n.ezClone(r);return u[t].x=o,u[t].y=a,e.applyLinks(u,i,s+1)};let l,c,f;for(let n=0;n<o.length;n++){if(l=o[n],!(f=e.getPosition(r,l,!1))&&!t.diagonals)return null;if(f&&f.free)a.push(o[n]);else if(f&&(c=u(l,f.x,f.y)))return c}for(let t=0;t<o.length;t++){if(l=o[t],!(f=e.getPosition(r,l,!0)))return null;if(f.free)a.push(o[t]);else if(c=u(l,f.x,f.y))return c}for(let t=0;t<a.length;t++)if(c=u(l=a[t],(f=e.getNewPos(r)).x,f.y))return c;return null},compute:(t,r)=>(Object.keys(t).forEach(e=>{const r=n.isValid(t[e],i);if(r)throw`Node '${e}' is invalid at key '${r}'`}),r.forEach((t,e)=>{const r=n.isValid(t,s);if(r)throw`Link ${e} (${t.from}->${t.to}) is invalid at key '${r}'`}),Object.values(t).forEach(t=>{t.const={beforeX:[],afterX:[],beforeY:[],afterY:[]}}),r.forEach(e=>{if(e.direction)switch(e.direction){case"up":case"top":t[e.from].const.beforeY.push(e.to),t[e.to].const.afterY.push(e.from);break;case"down":case"bottom":t[e.from].const.afterY.push(e.to),t[e.to].const.beforeY.push(e.from);break;case"left":t[e.from].const.beforeX.push(e.to),t[e.to].const.afterX.push(e.from);break;case"right":t[e.from].const.afterX.push(e.to),t[e.to].const.beforeX.push(e.from)}}),(t=e.applyLinks(t,r))&&(e.correctPlacing(t),Object.values(t).forEach(t=>{delete t.const})),t)};return e})},{"./utils":41}],40:[function(t,e,r){const n=t("xml-js"),i=t("./utils");let s={name:"error",height:512,index:[],links:{"arrow-head":{},"arrow-head-reverse":{},"line-start":{},"line-end":{},"dashed-step":{}},icons:{}};try{s=t("../resources.json")}catch(t){console.error("fa-diagrams: SVG resources could not be loaded: "+t)}const o={_:"string",text:"string",icon:{_:"string",path:"string",width:"number",height:"number"},color:"string",font:"string","font-size":"number","font-style":"string",scale:"number"},a={name:"!string",icon:{_:"string",path:"string",width:"number",height:"number"},x:"!number",y:"!number",color:"string",scale:"number",top:o,bottom:o,left:o,right:o},u={from:"!string",to:"!string",type:"string",color:"string",scale:"number",size:"number",top:o,bottom:o},l={beautify:!1,scale:128,"h-spacing":1.3,color:"black",icons:{scale:1,color:""},links:{scale:1,color:"",size:0},texts:{font:"sans-serif","font-size":"20","font-style":"normal",color:""}},c={"font-awesome":{fas:"solid",far:"regular",fab:"brands"}};e.exports=(t=>{t=i.merge(l,t);const e={getIcon:t=>{if(!t)return null;if("object"==typeof t)return t.path&&t.path.trim()?(t.height=t.height||t.width||s.height,t.width=t.width||t.height,t):null;if(!t.trim())return null;let e=i.ezClone(s.index);const r=t.trim().split(" ").map(t=>0===t.indexOf("fa-")?t.substr(3):t);for(let t=0;t<r.length;t++)Object.keys(c[s.name]||{}).includes(r[t])&&(r[t]=c[s.name][r[t]]),s.index.includes(r[t])&&(e=[r.splice(t,1)]);t=r[0];for(let r=0;r<e.length;r++)if(s.icons[e[r]]&&s.icons[e[r]][t])return s.icons[e[r]][t].height=s.height,s.icons[e[r]][t];return null},getLinkPath:(t,e)=>{const r="v46.059c0 21.382 25.851 32.09 40.971 16.971 l86.059 -86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971v46.059",n="v-46.059c0-21.382-25.851-32.09-40.971-16.971l-86.059 86.059c-9.373 9.373-9.373 24.568 0 33.941l86.059 86.059c15.119 15.119 40.971 4.411 40.971-16.971v-46.059",i="c6.627 0 12 -5.373 12 -12v-56c0 -6.627 -5.373 -12 -12 -12",s="c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12",o=`${s}h56${i}`;switch(t){case"none":return null;default:return`M12 216${s}h${512*e-146.059}${r}z`;case"line":return`M12 216${s}h${512*e-24}${i}z`;case"double":return`M134.059 216${n}h${512*e-268.06}${r}z`;case"split-double":return`M12 126${s}h${512*e-146.059}${r}M134.059 306${n}h${512*e-146.059}${i}z`;case"dashed":const a=Math.floor((512*e-134.059)/168),u=(512*e-134.059-56*a-24)/a;return`M12 216${new Array(a).fill(`${o}m${u} 0`).join("")}v80${r}z`;case"dashed-line":const l=Math.floor(512*e/168),c=(512*e-56*l-24)/(l-1);return`M12 216${new Array(l).fill(o).join(`m${c} 0`)}z`;case"dashed-double":const f=Math.floor((512*e-268.118)/168),h=(512*e-268.118-56*f-24)/(f+1);return`M134.059 216${n}m${h}-80${new Array(f).fill(`${o}m${h} 0`).join("")}v80${r}z`;case"dashed-split-double":const p=Math.floor((512*e-134.059)/168),d=(512*e-134.059-56*p-24)/p;return`M12 126${new Array(p).fill(`${o}m${d} 0`).join("")}v80${r}M134.059 306${n}m${d} -80${new Array(p).fill(`${o}`).join(`m${d} 0`)}z`}},getBounds:t=>{const e=Object.values(t);if(0===e.length)return{w:0,h:0};let r=0,n=0;return e.forEach(t=>{r=Math.max(t.x,r),n=Math.max(t.y,n)}),{w:r+1,h:n+1}},renderNode:r=>{const n=e.getIcon(r.icon);if(!n)return null;const i=.4*(r.scale||t.icons.scale);return{_attributes:{transform:`translate(${(r.x+.5)*t["h-spacing"]} ${r.y+.5})`},g:{_attributes:{transform:`scale(${i/n.height} ${i/n.height}) translate(${-n.width/2} ${-n.height/2})`,stroke:r.color||t.icons.color||void 0,fill:r.color||t.icons.color||void 0},path:{_attributes:{d:n.path}}}}},renderLink:(r,n)=>{const i=r[n.from],s=r[n.to],o=((i.x+s.x)/2+.5)*t["h-spacing"],a=(i.y+s.y)/2+.5,u=180*Math.atan2(s.y-i.y,(s.x-i.x)*t["h-spacing"])/Math.PI,l=.4*(n.scale||t.links.scale);let c=n.size||t.links.size;if(!c){let e=Math.abs(s.x-i.x)*t["h-spacing"];e>0&&(e-=.6);let r=Math.abs(s.y-i.y);r>0&&(r-=.6),c=Math.sqrt(Math.pow(e,2)+Math.pow(r,2))/l}const f=e.getLinkPath(n.type,c);return f?{_attributes:{transform:`translate(${o} ${a}) rotate(${u})`},g:{_attributes:{transform:`scale(${l/512} ${l/512}) translate(${-256*c} -256)`,stroke:n.color||t.links.color||void 0,fill:n.color||t.links.color||void 0},path:{_attributes:{d:f}}}}:null},toXML:(e,r)=>{const i={svg:{_attributes:{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${r.w*t["h-spacing"]} ${r.h}`,width:r.w*t["h-spacing"]*t.scale/.4,height:r.h*t.scale/.4,stroke:t.color,fill:t.color}}};return Object.keys(e).forEach(t=>{i.svg[t]=e[t]}),n.js2xml(i,{compact:!0,spaces:t.beautify?"\t":0})},compute:(t,r)=>{const n={g:[]};Object.keys(t).forEach(r=>{const s=i.isValid(t[r],a);if(s)throw`Node '${r}' is invalid at key '${s}'`;const o=e.renderNode(t[r]);o&&n.g.push(o)}),r.forEach((r,s)=>{const o=i.isValid(r,u);if(o)throw`Link ${s} (${r.from}->${r.to}) is invalid at key '${o}'`;const a=e.renderLink(t,r);a&&n.g.push(a)});const s=e.getBounds(t);return e.toXML(n,s)}};return e})},{"../resources.json":void 0,"./utils":41,"xml-js":32}],41:[function(t,e,r){const n={merge:(t,e)=>{if(typeof t!=typeof e)return t;if(t.length&&!e.length)return t;if(t.length&&e.length)return e;if("object"==typeof t){const r={};return Object.keys(t).forEach(i=>r[i]=n.merge(t[i],e[i])),r}return e},isValid:(t,e)=>{const r=Object.keys(e).filter(t=>"_"!==t);let i,s;for(let o=0;o<r.length;o++)if(i=r[o],"object"===(s="object"!=typeof t||void 0===t[i]||null===t[i]?null:typeof t[i])&&t[i].length>0&&(s="array"),"object"==typeof e[i]){if(s&&"object"!==s&&s!==e[i]._)return i;const r=n.isValid(s?t[i]:void 0,e[i]);if(r)return i+"."+r}else{if("!"===e[i][0]&&(e[i]=e[i].substr(1),!s))return i;if(s&&s!==e[i])return i}return null},ezClone:t=>JSON.parse(JSON.stringify(t)),newMap:(t,e,r)=>new Array(t).fill(0).map(()=>new Array(e).fill(r))};e.exports=n},{}]},{},[38]);