UNPKG

@grapecity/spread-sheets-pdf

Version:

SpreadJS PDF export plugin

10 lines 2.03 MB
/*! * * SpreadJS Library 18.2.3 * * Copyright(c) of respective holders. All rights reserved. * * Licensed under the SpreadJS Commercial License. * */ !function(n){"object"==typeof module&&"object"==typeof module.exports?(require("@grapecity/spread-sheets-print"),module.exports=n(require("@grapecity/spread-sheets"))):"function"==typeof define&&define.amd?define(["@grapecity/spread-sheets","@grapecity/spread-sheets-print"],n):"object"==typeof exports?(require("@grapecity/spread-sheets-print"),exports.Spread=n(require("@grapecity/spread-sheets"))):n(GC)}((function(n){!function(){var e,r={"./dist/plugins/exportPDF/lib/blob-stream.js":function(n){var e,r;e=function(){var n,e,r;return function n(e,r,t){var a,i;function c(i,o){var u,s,X;if(!r[i]){if(!e[i]){if(!o&&(u=void 0))return require(i,!0);if(a)return a(i,!0);throw(s=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",s}X=r[i]={exports:{}},e[i][0].call(X.exports,(function(n){var r=e[i][1][n];return c(r||n)}),X,X.exports,n,e,r,t)}return r[i].exports}for(a=void 0,i=0;i<t.length;i++)c(t[i]);return c}({1:[function(n,e,r){(function(n){var r=n.BlobBuilder||n.WebKitBlobBuilder||n.MSBlobBuilder||n.MozBlobBuilder,t=function(){try{var n;return 2===new Blob(["hi"]).size}catch(n){return!1}}(),a=t&&function(){try{var n;return 2===new Blob([new Uint8Array([1,2])]).size}catch(n){return!1}}(),i=r&&r.prototype.append&&r.prototype.getBlob;function c(n){var e,r,t,a;for(e=0;e<n.length;e++)(r=n[e]).buffer instanceof ArrayBuffer&&(t=r.buffer,r.byteLength!==t.byteLength&&((a=new Uint8Array(r.byteLength)).set(new Uint8Array(t,r.byteOffset,r.byteLength)),t=a.buffer),n[e]=t)}function o(n,e){var t,a;for(e=e||{},t=new r,c(n),a=0;a<n.length;a++)t.append(n[a]);return e.type?t.getBlob(e.type):t.getBlob()}function u(n,e){return c(n),new Blob(n,e||{})}e.exports=t?a?n.Blob:u:i?o:void 0}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(n,e,r){(function(r){var t=n("stream").Writable,a=n("util"),i=n("blob"),c=r.URL||r.webkitURL||r.mozURL;function o(){if(!(this instanceof o))return new o;t.call(this),this.Id=[],this.n_=null,this.length=0}a.inherits(o,t),o.prototype._write=function(n,e,r){n instanceof Uint8Array||(n=new Uint8Array(n)),this.length+=n.length,this.Id.push(n),r()},o.prototype.toBlob=function(n){return n=n||"application/octet-stream",this.n_||(this.n_=new i(this.Id,{type:n}),this.Id=[]),this.n_.type!==n&&(this.n_=new i([this.n_],{type:n})),this.n_},o.prototype.toBlobURL=function(n){return c.createObjectURL(this.toBlob(n))},e.exports=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{blob:1,stream:22,util:25}],3:[function(n,e,r){var t,a,i,c=n("base64-js"),o=n("ieee754"),u=n("is-array");function s(n,e,r){var a,i,c,o;if(!(this instanceof s))return new s(n,e,r);if("number"==(a=typeof n))i=n>0?n>>>0:0;else if("string"===a)"base64"===e&&(n=w(n)),i=s.byteLength(n,e);else{if("object"!==a||null===n)throw new TypeError("must start with number, buffer, array or string");"Buffer"===n.type&&u(n.data)&&(n=n.data),i=+n.length>0?Math.floor(+n.length):0}if(this.length>t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t.toString(16)+" bytes");if(s.TYPED_ARRAY_SUPPORT?c=s.Zen(new Uint8Array(i)):((c=this).length=i,c.bin=!0),s.TYPED_ARRAY_SUPPORT&&"number"==typeof n.byteLength)c.Ydn(n);else if(x(n))if(s.isBuffer(n))for(o=0;o<i;o++)c[o]=n.readUInt8(o);else for(o=0;o<i;o++)c[o]=(n[o]%256+256)%256;else if("string"===a)c.write(n,0,e);else if("number"===a&&!s.TYPED_ARRAY_SUPPORT&&!r)for(o=0;o<i;o++)c[o]=0;return c}function X(n,e,r,t){var a,i,c,o;if(r=Number(r)||0,a=n.length-r,t?(t=Number(t))>a&&(t=a):t=a,(i=e.length)%2!=0)throw new Error("Invalid hex string");for(t>i/2&&(t=i/2),c=0;c<t;c++){if(o=parseInt(e.substr(2*c,2),16),isNaN(o))throw new Error("Invalid hex string");n[r+c]=o}return c}function P(n,e,r,t){var a;return E(U(e),n,r,t)}function K(n,e,r,t){var a;return E(Y(e),n,r,t)}function l(n,e,r,t){return K(n,e,r,t)}function m(n,e,r,t){var a;return E(S(e),n,r,t)}function f(n,e,r,t){var a;return E(R(e),n,r,t)}function d(n,e,r){return 0===e&&r===n.length?c.fromByteArray(n):c.fromByteArray(n.slice(e,r))}function h(n,e,r){var t,a="",i="";for(r=Math.min(n.length,r),t=e;t<r;t++)n[t]<=127?(a+=V(i)+String.fromCharCode(n[t]),i=""):i+="%"+n[t].toString(16);return a+V(i)}function g(n,e,r){var t,a="";for(r=Math.min(n.length,r),t=e;t<r;t++)a+=String.fromCharCode(n[t]);return a}function A(n,e,r){return g(n,e,r)}function v(n,e,r){var t,a,i=n.length;for((!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i),t="",a=e;a<r;a++)t+=T(n[a]);return t}function C(n,e,r){var t,a=n.slice(e,r),i="";for(t=0;t<a.length;t+=2)i+=String.fromCharCode(a[t]+256*a[t+1]);return i}function W(n,e,r){if(n%1!=0||n<0)throw new RangeError("offset is not uint");if(n+e>r)throw new RangeError("Trying to access beyond buffer length")}function b(n,e,r,t,a,i){if(!s.isBuffer(n))throw new TypeError("buffer must be a Buffer instance");if(e>a||e<i)throw new TypeError("value is out of bounds");if(r+t>n.length)throw new TypeError("index out of range")}function y(n,e,r,t){e<0&&(e=65535+e+1);for(var a=0,i=Math.min(n.length-r,2);a<i;a++)n[r+a]=(e&255<<8*(t?a:1-a))>>>8*(t?a:1-a)}function N(n,e,r,t){e<0&&(e=4294967295+e+1);for(var a=0,i=Math.min(n.length-r,4);a<i;a++)n[r+a]=e>>>8*(t?a:3-a)&255}function B(n,e,r,t,a,i){if(e>a||e<i)throw new TypeError("value is out of bounds");if(r+t>n.length)throw new TypeError("index out of range")}function p(n,e,r,t,a){return a||B(n,e,r,4,34028234663852886e22,-34028234663852886e22),o.write(n,e,r,t,23,4),r+4}function O(n,e,r,t,a){return a||B(n,e,r,8,17976931348623157e292,-17976931348623157e292),o.write(n,e,r,t,52,8),r+8}function w(n){for(n=k(n).replace(i,"");n.length%4!=0;)n+="=";return n}function k(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function x(n){return u(n)||s.isBuffer(n)||n&&"object"==typeof n&&"number"==typeof n.length}function T(n){return n<16?"0"+n.toString(16):n.toString(16)}function U(n){var e,r,t,a,i,c=[];for(e=0;e<n.length;e++)if((r=n.charCodeAt(e))<=127)c.push(r);else for(t=e,r>=55296&&r<=57343&&e++,a=encodeURIComponent(n.slice(t,e+1)).substr(1).split("%"),i=0;i<a.length;i++)c.push(parseInt(a[i],16));return c}function Y(n){var e,r=[];for(e=0;e<n.length;e++)r.push(255&n.charCodeAt(e));return r}function R(n){var e,r,t,a,i=[];for(a=0;a<n.length;a++)r=(e=n.charCodeAt(a))>>8,t=e%256,i.push(t),i.push(r);return i}function S(n){return c.toByteArray(n)}function E(n,e,r,t){for(var a=0;a<t&&!(a+r>=e.length||a>=n.length);a++)e[a+r]=n[a];return a}function V(n){try{return decodeURIComponent(n)}catch(n){return String.fromCharCode(65533)}}r.Buffer=s,r.SlowBuffer=s,r.INSPECT_MAX_BYTES=50,s.poolSize=8192,t=1073741823,s.TYPED_ARRAY_SUPPORT=function(){var n,e;try{return n=new ArrayBuffer(0),(e=new Uint8Array(n)).foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(n){return!1}}(),s.isBuffer=function(n){return!(null==n||!n.bin)},s.compare=function(n,e){var r,t,a,i;if(!s.isBuffer(n)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");for(r=n.length,t=e.length,a=0,i=Math.min(r,t);a<i&&n[a]===e[a];a++);return a!==i&&(r=n[a],t=e[a]),r<t?-1:t<r?1:0},s.isEncoding=function(n){switch(String(n).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(n,e){var r,t,a,i;if(!u(n))throw new TypeError("Usage: Buffer.concat(list[, length])");if(0===n.length)return new s(0);if(1===n.length)return n[0];if(void 0===e)for(e=0,r=0;r<n.length;r++)e+=n[r].length;for(t=new s(e),a=0,r=0;r<n.length;r++)(i=n[r]).copy(t,a),a+=i.length;return t},s.byteLength=function(n,e){var r;switch(n+="",e||"utf8"){case"ascii":case"binary":case"raw":default:r=n.length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*n.length;break;case"hex":r=n.length>>>1;break;case"utf8":case"utf-8":r=U(n).length;break;case"base64":r=S(n).length}return r},s.prototype.length=void 0,s.prototype.parent=void 0,s.prototype.toString=function(n,e,r){var t=!1;if(n||(n="utf8"),(e>>>=0)<0&&(e=0),(r=void 0===r||r===1/0?this.length:r>>>0)>this.length&&(r=this.length),r<=e)return"";for(;;)switch(n){case"hex":return v(this,e,r);case"utf8":case"utf-8":return h(this,e,r);case"ascii":return g(this,e,r);case"binary":return A(this,e,r);case"base64":return d(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(t)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),t=!0}},s.prototype.equals=function(n){if(!s.isBuffer(n))throw new TypeError("Argument must be a Buffer");return 0===s.compare(this,n)},s.prototype.inspect=function(){var n="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(n=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(n+=" ... ")),"<Buffer "+n+">"},s.prototype.compare=function(n){if(!s.isBuffer(n))throw new TypeError("Argument must be a Buffer");return s.compare(this,n)},s.prototype.get=function(n){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(n)},s.prototype.set=function(n,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(n,e)},s.prototype.write=function(n,e,r,t){var a,i,c;switch(isFinite(e)?isFinite(r)||(t=r,r=void 0):(a=t,t=e,e=r,r=a),e=Number(e)||0,i=this.length-e,r?(r=Number(r))>i&&(r=i):r=i,t=String(t||"utf8").toLowerCase()){case"hex":c=X(this,n,e,r);break;case"utf8":case"utf-8":c=P(this,n,e,r);break;case"ascii":c=K(this,n,e,r);break;case"binary":c=l(this,n,e,r);break;case"base64":c=m(this,n,e,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":c=f(this,n,e,r);break;default:throw new TypeError("Unknown encoding: "+t)}return c},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.X$r||this,0)}},s.prototype.slice=function(n,e){var r,t,a,i=this.length;if((n=~~n)<0?(n+=i)<0&&(n=0):n>i&&(n=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<n&&(e=n),s.TYPED_ARRAY_SUPPORT)return s.Zen(this.subarray(n,e));for(t=new s(r=e-n,void 0,!0),a=0;a<r;a++)t[a]=this[a+n];return t},s.prototype.readUInt8=function(n,e){return e||W(n,1,this.length),this[n]},s.prototype.readUInt16LE=function(n,e){return e||W(n,2,this.length),this[n]|this[n+1]<<8},s.prototype.readUInt16BE=function(n,e){return e||W(n,2,this.length),this[n]<<8|this[n+1]},s.prototype.readUInt32LE=function(n,e){return e||W(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+16777216*this[n+3]},s.prototype.readUInt32BE=function(n,e){return e||W(n,4,this.length),16777216*this[n]+(this[n+1]<<16|this[n+2]<<8|this[n+3])},s.prototype.readInt8=function(n,e){return e||W(n,1,this.length),128&this[n]?-1*(255-this[n]+1):this[n]},s.prototype.readInt16LE=function(n,e){e||W(n,2,this.length);var r=this[n]|this[n+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(n,e){e||W(n,2,this.length);var r=this[n+1]|this[n]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(n,e){return e||W(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},s.prototype.readInt32BE=function(n,e){return e||W(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},s.prototype.readFloatLE=function(n,e){return e||W(n,4,this.length),o.read(this,n,!0,23,4)},s.prototype.readFloatBE=function(n,e){return e||W(n,4,this.length),o.read(this,n,!1,23,4)},s.prototype.readDoubleLE=function(n,e){return e||W(n,8,this.length),o.read(this,n,!0,52,8)},s.prototype.readDoubleBE=function(n,e){return e||W(n,8,this.length),o.read(this,n,!1,52,8)},s.prototype.writeUInt8=function(n,e,r){return n=+n,e>>>=0,r||b(this,n,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),this[e]=n,e+1},s.prototype.writeUInt16LE=function(n,e,r){return n=+n,e>>>=0,r||b(this,n,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=n,this[e+1]=n>>>8):y(this,n,e,!0),e+2},s.prototype.writeUInt16BE=function(n,e,r){return n=+n,e>>>=0,r||b(this,n,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=n>>>8,this[e+1]=n):y(this,n,e,!1),e+2},s.prototype.writeUInt32LE=function(n,e,r){return n=+n,e>>>=0,r||b(this,n,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=n>>>24,this[e+2]=n>>>16,this[e+1]=n>>>8,this[e]=n):N(this,n,e,!0),e+4},s.prototype.writeUInt32BE=function(n,e,r){return n=+n,e>>>=0,r||b(this,n,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=n>>>24,this[e+1]=n>>>16,this[e+2]=n>>>8,this[e+3]=n):N(this,n,e,!1),e+4},s.prototype.writeInt8=function(n,e,r){return n=+n,e>>>=0,r||b(this,n,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),n<0&&(n=255+n+1),this[e]=n,e+1},s.prototype.writeInt16LE=function(n,e,r){return n=+n,e>>>=0,r||b(this,n,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=n,this[e+1]=n>>>8):y(this,n,e,!0),e+2},s.prototype.writeInt16BE=function(n,e,r){return n=+n,e>>>=0,r||b(this,n,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=n>>>8,this[e+1]=n):y(this,n,e,!1),e+2},s.prototype.writeInt32LE=function(n,e,r){return n=+n,e>>>=0,r||b(this,n,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=n,this[e+1]=n>>>8,this[e+2]=n>>>16,this[e+3]=n>>>24):N(this,n,e,!0),e+4},s.prototype.writeInt32BE=function(n,e,r){return n=+n,e>>>=0,r||b(this,n,e,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),s.TYPED_ARRAY_SUPPORT?(this[e]=n>>>24,this[e+1]=n>>>16,this[e+2]=n>>>8,this[e+3]=n):N(this,n,e,!1),e+4},s.prototype.writeFloatLE=function(n,e,r){return p(this,n,e,!0,r)},s.prototype.writeFloatBE=function(n,e,r){return p(this,n,e,!1,r)},s.prototype.writeDoubleLE=function(n,e,r){return O(this,n,e,!0,r)},s.prototype.writeDoubleBE=function(n,e,r){return O(this,n,e,!1,r)},s.prototype.copy=function(n,e,r,t){var a,i,c=this;if(r||(r=0),t||0===t||(t=this.length),e||(e=0),t!==r&&0!==n.length&&0!==c.length){if(t<r)throw new TypeError("sourceEnd < sourceStart");if(e<0||e>=n.length)throw new TypeError("targetStart out of bounds");if(r<0||r>=c.length)throw new TypeError("sourceStart out of bounds");if(t<0||t>c.length)throw new TypeError("sourceEnd out of bounds");if(t>this.length&&(t=this.length),n.length-e<t-r&&(t=n.length-e+r),(a=t-r)<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<a;i++)n[i+e]=this[i+r];else n.Ydn(this.subarray(r,r+a),e)}},s.prototype.fill=function(n,e,r){var t,a,i;if(n||(n=0),e||(e=0),r||(r=this.length),r<e)throw new TypeError("end < start");if(r!==e&&0!==this.length){if(e<0||e>=this.length)throw new TypeError("start out of bounds");if(r<0||r>this.length)throw new TypeError("end out of bounds");if("number"==typeof n)for(t=e;t<r;t++)this[t]=n;else for(i=(a=U(n.toString())).length,t=e;t<r;t++)this[t]=a[t%i];return this}},s.prototype.toArrayBuffer=function(){var n,e,r;if("undefined"!=typeof Uint8Array){if(s.TYPED_ARRAY_SUPPORT)return new s(this).buffer;for(e=0,r=(n=new Uint8Array(this.length)).length;e<r;e+=1)n[e]=this[e];return n.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")},a=s.prototype,s.Zen=function(n){return n.constructor=s,n.bin=!0,n.ev=n.get,n.Ydn=n.set,n.get=a.get,n.set=a.set,n.write=a.write,n.toString=a.toString,n.toLocaleString=a.toString,n.toJSON=a.toJSON,n.equals=a.equals,n.compare=a.compare,n.copy=a.copy,n.slice=a.slice,n.readUInt8=a.readUInt8,n.readUInt16LE=a.readUInt16LE,n.readUInt16BE=a.readUInt16BE,n.readUInt32LE=a.readUInt32LE,n.readUInt32BE=a.readUInt32BE,n.readInt8=a.readInt8,n.readInt16LE=a.readInt16LE,n.readInt16BE=a.readInt16BE,n.readInt32LE=a.readInt32LE,n.readInt32BE=a.readInt32BE,n.readFloatLE=a.readFloatLE,n.readFloatBE=a.readFloatBE,n.readDoubleLE=a.readDoubleLE,n.readDoubleBE=a.readDoubleBE,n.writeUInt8=a.writeUInt8,n.writeUInt16LE=a.writeUInt16LE,n.writeUInt16BE=a.writeUInt16BE,n.writeUInt32LE=a.writeUInt32LE,n.writeUInt32BE=a.writeUInt32BE,n.writeInt8=a.writeInt8,n.writeInt16LE=a.writeInt16LE,n.writeInt16BE=a.writeInt16BE,n.writeInt32LE=a.writeInt32LE,n.writeInt32BE=a.writeInt32BE,n.writeFloatLE=a.writeFloatLE,n.writeFloatBE=a.writeFloatBE,n.writeDoubleLE=a.writeDoubleLE,n.writeDoubleBE=a.writeDoubleBE,n.fill=a.fill,n.inspect=a.inspect,n.toArrayBuffer=a.toArrayBuffer,n},i=/[^+\/0-9A-z]/g},{"base64-js":4,ieee754:5,"is-array":6}],4:[function(n,e,r){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(n){"use strict";var e="undefined"!=typeof Uint8Array?Uint8Array:Array,r="+".charCodeAt(0),a="/".charCodeAt(0),i="0".charCodeAt(0),c="a".charCodeAt(0),o="A".charCodeAt(0);function u(n){var e=n.charCodeAt(0);return e===r?62:e===a?63:e<i?-1:e<i+10?e-i+26+26:e<o+26?e-o:e<c+26?e-c+26:void 0}function s(n){var r,t,a,i,c,o,s,X;if(n.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");function P(n){o[X++]=n}for(s=n.length,c="="===n.charAt(s-2)?2:"="===n.charAt(s-1)?1:0,o=new e(3*n.length/4-c),a=c>0?n.length-4:n.length,X=0,r=0,t=0;r<a;r+=4,t+=3)P((16711680&(i=u(n.charAt(r))<<18|u(n.charAt(r+1))<<12|u(n.charAt(r+2))<<6|u(n.charAt(r+3))))>>16),P((65280&i)>>8),P(255&i);return 2===c?P(255&(i=u(n.charAt(r))<<2|u(n.charAt(r+1))>>4)):1===c&&(P((i=u(n.charAt(r))<<10|u(n.charAt(r+1))<<4|u(n.charAt(r+2))>>2)>>8&255),P(255&i)),o}function X(n){var e,r=n.length%3,a="",i,c;function o(n){return t.charAt(n)}function u(n){return o(n>>18&63)+o(n>>12&63)+o(n>>6&63)+o(63&n)}for(e=0,c=n.length-r;e<c;e+=3)a+=u(i=(n[e]<<16)+(n[e+1]<<8)+n[e+2]);switch(r){case 1:a+=o((i=n[n.length-1])>>2),a+=o(i<<4&63),a+="==";break;case 2:a+=o((i=(n[n.length-2]<<8)+n[n.length-1])>>10),a+=o(i>>4&63),a+=o(i<<2&63),a+="="}return a}n.toByteArray=s,n.fromByteArray=X}(void 0===r?this.base64js={}:r)},{}],5:[function(n,e,r){r.read=function(n,e,r,t,a){var i,c,o=8*a-t-1,u=(1<<o)-1,s=u>>1,X=-7,P=r?a-1:0,K=r?-1:1,l=n[e+P];for(P+=K,i=l&(1<<-X)-1,l>>=-X,X+=o;X>0;i=256*i+n[e+P],P+=K,X-=8);for(c=i&(1<<-X)-1,i>>=-X,X+=t;X>0;c=256*c+n[e+P],P+=K,X-=8);if(0===i)i=1-s;else{if(i===u)return c?NaN:1/0*(l?-1:1);c+=Math.pow(2,t),i-=s}return(l?-1:1)*c*Math.pow(2,i-t)},r.write=function(n,e,r,t,a,i){var c,o,u,s=8*i-a-1,X=(1<<s)-1,P=X>>1,K=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,l=t?0:i-1,m=t?1:-1,f=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,c=X):(c=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-c))<1&&(c--,u*=2),(e+=c+P>=1?K/u:K*Math.pow(2,1-P))*u>=2&&(c++,u/=2),c+P>=X?(o=0,c=X):c+P>=1?(o=(e*u-1)*Math.pow(2,a),c+=P):(o=e*Math.pow(2,P-1)*Math.pow(2,a),c=0));a>=8;n[r+l]=255&o,l+=m,o/=256,a-=8);for(c=c<<a|o,s+=a;s>0;n[r+l]=255&c,l+=m,c/=256,s-=8);n[r+l-m]|=128*f}},{}],6:[function(n,e,r){var t=Array.isArray,a=Object.prototype.toString;e.exports=t||function(n){return!!n&&"[object Array]"==a.call(n)}},{}],7:[function(n,e,r){function t(){this._events=this._events||{},this.Min=this.Min||void 0}function a(n){return"function"==typeof n}function i(n){return"number"==typeof n}function c(n){return"object"==typeof n&&null!==n}function o(n){return void 0===n}e.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype.Min=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(n){if(!i(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");return this.Min=n,this},t.prototype.emit=function(n){var e,r,t,i,u,s;if(this._events||(this._events={}),"error"===n&&(!this._events.error||c(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(o(r=this._events[n]))return!1;if(a(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(t=arguments.length,i=new Array(t-1),u=1;u<t;u++)i[u-1]=arguments[u];r.apply(this,i)}else if(c(r)){for(t=arguments.length,i=new Array(t-1),u=1;u<t;u++)i[u-1]=arguments[u];for(t=(s=r.slice()).length,u=0;u<t;u++)s[u].apply(this,i)}return!0},t.prototype.addListener=function(n,e){var r;if(!a(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",n,a(e.listener)?e.listener:e),this._events[n]?c(this._events[n])?this._events[n].push(e):this._events[n]=[this._events[n],e]:this._events[n]=e,c(this._events[n])&&!this._events[n].warned&&(r=o(this.Min)?t.defaultMaxListeners:this.Min)&&r>0&&this._events[n].length>r&&(this._events[n].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[n].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(n,e){if(!a(e))throw TypeError("listener must be a function");var r=!1;function t(){this.removeListener(n,t),r||(r=!0,e.apply(this,arguments))}return t.listener=e,this.on(n,t),this},t.prototype.removeListener=function(n,e){var r,t,i,o;if(!a(e))throw TypeError("listener must be a function");if(!this._events||!this._events[n])return this;if(i=(r=this._events[n]).length,t=-1,r===e||a(r.listener)&&r.listener===e)delete this._events[n],this._events.removeListener&&this.emit("removeListener",n,e);else if(c(r)){for(o=i;o-- >0;)if(r[o]===e||r[o].listener&&r[o].listener===e){t=o;break}if(t<0)return this;1===r.length?(r.length=0,delete this._events[n]):r.splice(t,1),this._events.removeListener&&this.emit("removeListener",n,e)}return this},t.prototype.removeAllListeners=function(n){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[n]&&delete this._events[n],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(a(r=this._events[n]))this.removeListener(n,r);else for(;r.length;)this.removeListener(n,r[r.length-1]);return delete this._events[n],this},t.prototype.listeners=function(n){var e;return e=this._events&&this._events[n]?a(this._events[n])?[this._events[n]]:this._events[n].slice():[]},t.listenerCount=function(n,e){var r;return r=n._events&&n._events[e]?a(n._events[e])?1:n._events[e].length:0}},{}],8:[function(n,e,r){"function"==typeof Object.create?e.exports=function n(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function n(e,r){e.super_=r;var t=function(){};t.prototype=r.prototype,e.prototype=new t,e.prototype.constructor=e}},{}],9:[function(n,e,r){e.exports=Array.isArray||function(n){return"[object Array]"==Object.prototype.toString.call(n)}},{}],10:[function(n,e,r){var t=e.exports={},a,i,c,o,u,s;function X(){}t.nextTick=(o="undefined"!=typeof window&&window.setImmediate,u="undefined"!=typeof window&&window.MutationObserver,s="undefined"!=typeof window&&window.postMessage&&window.addEventListener,o?function(n){return window.setImmediate(n)}:(a=[],u?(i=document.createElement("div"),(c=new MutationObserver((function(){var n=a.slice();a.length=0,n.forEach((function(n){n()}))}))).observe(i,{attributes:!0}),function n(e){a.length||i.setAttribute("yes","no"),a.push(e)}):s?(window.addEventListener("message",(function(n){var e,r=n.source;r!==window&&null!==r||"process-tick"!==n.data||(n.stopPropagation(),a.length>0&&(e=a.shift())())}),!0),function n(e){a.push(e),window.postMessage("process-tick","*")}):function n(e){setTimeout(e,0)})),t.title="browser",t.browser=!0,t.env={},t.argv=[],t.on=X,t.addListener=X,t.once=X,t.off=X,t.removeListener=X,t.removeAllListeners=X,t.emit=X,t.binding=function(n){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(n){throw new Error("process.chdir is not supported")}},{}],11:[function(n,e,r){e.exports=n("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":12}],12:[function(n,e,r){(function(r){var t,a,i,c;function o(n){if(!(this instanceof o))return new o(n);i.call(this,n),c.call(this,n),n&&!1===n.readable&&(this.readable=!1),n&&!1===n.writable&&(this.writable=!1),this.allowHalfOpen=!0,n&&!1===n.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this.n0e.ended||r.nextTick(this.end.bind(this))}function s(n,e){for(var r=0,t=n.length;r<t;r++)e(n[r],r)}e.exports=o,t=Object.keys||function(n){var e,r=[];for(e in n)r.push(e);return r},(a=n("core-util-is")).inherits=n("inherits"),i=n("./_stream_readable"),c=n("./_stream_writable"),a.inherits(o,i),s(t(c.prototype),(function(n){o.prototype[n]||(o.prototype[n]=c.prototype[n])}))}).call(this,n("_process"))},{"./_stream_readable":14,"./_stream_writable":16,_process:10,"core-util-is":17,inherits:8}],13:[function(n,e,r){var t,a;function i(n){if(!(this instanceof i))return new i(n);t.call(this,n)}e.exports=i,t=n("./_stream_transform"),(a=n("core-util-is")).inherits=n("inherits"),a.inherits(i,t),i.prototype._transform=function(n,e,r){r(null,n)}},{"./_stream_transform":15,"core-util-is":17,inherits:8}],14:[function(n,e,r){(function(r){var t,a,i,c,o,u,s;function X(e,r){var t=(e=e||{}).highWaterMark;this.highWaterMark=t||0===t?t:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=n("string_decoder/").StringDecoder),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function P(n){if(!(this instanceof P))return new P(n);this.e0e=new X(n,this),this.readable=!0,c.call(this)}function K(n,e,r,t,a){var i,c=d(e,r);return c?n.emit("error",c):null==r?(e.reading=!1,e.ended||h(n,e)):e.objectMode||r&&r.length>0?e.ended&&!a?(i=new Error("stream.push() after EOF"),n.emit("error",i)):e.endEmitted&&a?(i=new Error("stream.unshift() after end event"),n.emit("error",i)):(!e.decoder||a||t||(r=e.decoder.write(r)),e.length+=e.objectMode?1:r.length,a?e.buffer.unshift(r):(e.reading=!1,e.buffer.push(r)),e.needReadable&&g(n),v(n,e)):a||(e.reading=!1),l(e)}function l(n){return!n.ended&&(n.needReadable||n.length<n.highWaterMark||0===n.length)}function m(n){if(n>=s)n=s;else{n--;for(var e=1;e<32;e<<=1)n|=n>>e;n++}return n}function f(n,e){return 0===e.length&&e.ended?0:e.objectMode?0===n?0:1:null===n||isNaN(n)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:n<=0?0:(n>e.highWaterMark&&(e.highWaterMark=m(n)),n>e.length?e.ended?e.length:(e.needReadable=!0,0):n)}function d(n,e){var r=null;return a.isBuffer(e)||"string"==typeof e||null==e||n.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function h(n,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.length>0?g(n):p(n)}function g(n){var e=n.e0e;e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,e.sync?r.nextTick((function(){A(n)})):A(n))}function A(n){n.emit("readable")}function v(n,e){e.readingMore||(e.readingMore=!0,r.nextTick((function(){C(n,e)})))}function C(n,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(n.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function W(n){return function(){var e=this,r=n.e0e;r.awaitDrain--,0===r.awaitDrain&&b(n)}}function b(n){var e,r=n.e0e;function t(n,t,a){var i;!1===n.write(e)&&r.awaitDrain++}for(r.awaitDrain=0;r.pipesCount&&null!==(e=n.read());)if(1===r.pipesCount?t(r.pipes,0,null):O(r.pipes,t),n.emit("data",e),r.awaitDrain>0)return;if(0===r.pipesCount)return r.flowing=!1,void(i.listenerCount(n,"data")>0&&N(n));r.ranOut=!0}function y(){this.e0e.ranOut&&(this.e0e.ranOut=!1,b(this))}function N(n,e){var t,a,i=n.e0e;if(i.flowing)throw new Error("Cannot switch to old mode now.");t=e||!1,a=!1,n.readable=!0,n.pipe=c.prototype.pipe,n.on=n.addListener=c.prototype.on,n.on("readable",(function(){var e;for(a=!0;!t&&null!==(e=n.read());)n.emit("data",e);null===e&&(a=!1,n.e0e.needReadable=!0)})),n.pause=function(){t=!0,this.emit("pause")},n.resume=function(){t=!1,a?r.nextTick((function(){n.emit("readable")})):this.read(0),this.emit("resume")},n.emit("readable")}function B(n,e){var r,t,i,c,o,u,s=e.buffer,X=e.length,P=!!e.decoder,K=!!e.objectMode;if(0===s.length)return null;if(0===X)r=null;else if(K)r=s.shift();else if(!n||n>=X)r=P?s.join(""):a.concat(s,X),s.length=0;else if(n<s[0].length)r=(t=s[0]).slice(0,n),s[0]=t.slice(n);else if(n===s[0].length)r=s.shift();else for(r=P?"":new a(n),i=0,c=0,o=s.length;c<o&&i<n;c++)t=s[0],u=Math.min(n-i,t.length),P?r+=t.slice(0,u):t.copy(r,i,0,u),u<t.length?s[0]=t.slice(u):s.shift(),i+=u;return r}function p(n){var e=n.e0e;if(e.length>0)throw new Error("endReadable called on non-empty stream");!e.endEmitted&&e.calledRead&&(e.ended=!0,r.nextTick((function(){e.endEmitted||0!==e.length||(e.endEmitted=!0,n.readable=!1,n.emit("end"))})))}function O(n,e){for(var r=0,t=n.length;r<t;r++)e(n[r],r)}function w(n,e){for(var r=0,t=n.length;r<t;r++)if(n[r]===e)return r;return-1}e.exports=P,t=n("isarray"),a=n("buffer").Buffer,P.ReadableState=X,(i=n("events").EventEmitter).listenerCount||(i.listenerCount=function(n,e){return n.listeners(e).length}),c=n("stream"),(o=n("core-util-is")).inherits=n("inherits"),o.inherits(P,c),P.prototype.push=function(n,e){var r=this.e0e;return"string"!=typeof n||r.objectMode||(e=e||r.defaultEncoding)!==r.encoding&&(n=new a(n,e),e=""),K(this,r,n,e,!1)},P.prototype.unshift=function(n){var e;return K(this,this.e0e,n,"",!0)},P.prototype.setEncoding=function(e){u||(u=n("string_decoder/").StringDecoder),this.e0e.decoder=new u(e),this.e0e.encoding=e},s=8388608,P.prototype.read=function(n){var e,r,t,a=this.e0e;return a.calledRead=!0,e=n,("number"!=typeof n||n>0)&&(a.emittedReadable=!1),0===n&&a.needReadable&&(a.length>=a.highWaterMark||a.ended)?(g(this),null):0===(n=f(n,a))&&a.ended?(r=null,a.length>0&&a.decoder&&(r=B(n,a),a.length-=r.length),0===a.length&&p(this),r):(t=a.needReadable,a.length-n<=a.highWaterMark&&(t=!0),(a.ended||a.reading)&&(t=!1),t&&(a.reading=!0,a.sync=!0,0===a.length&&(a.needReadable=!0),this._read(a.highWaterMark),a.sync=!1),t&&!a.reading&&(n=f(e,a)),null===(r=n>0?B(n,a):null)&&(a.needReadable=!0,n=0),a.length-=n,0!==a.length||a.ended||(a.needReadable=!0),a.ended&&!a.endEmitted&&0===a.length&&p(this),r)},P.prototype._read=function(n){this.emit("error",new Error("not implemented"))},P.prototype.pipe=function(n,e){var a,c,o,u=this,s=this.e0e;switch(s.pipesCount){case 0:s.pipes=n;break;case 1:s.pipes=[s.pipes,n];break;default:s.pipes.push(n)}function X(n){n===u&&K()}function P(){n.end()}function K(){n.removeListener("close",m),n.removeListener("finish",f),n.removeListener("drain",o),n.removeListener("error",l),n.removeListener("unpipe",X),u.removeListener("end",P),u.removeListener("end",K),n.n0e&&!n.n0e.needDrain||o()}function l(e){d(),n.removeListener("error",l),0===i.listenerCount(n,"error")&&n.emit("error",e)}function m(){n.removeListener("finish",f),d()}function f(){n.removeListener("close",m),d()}function d(){u.unpipe(n)}return s.pipesCount+=1,c=(a=(!e||!1!==e.end)&&n!==r.stdout&&n!==r.stderr)?P:K,s.endEmitted?r.nextTick(c):u.once("end",c),n.on("unpipe",X),o=W(u),n.on("drain",o),n._events&&n._events.error?t(n._events.error)?n._events.error.unshift(l):n._events.error=[l,n._events.error]:n.on("error",l),n.once("close",m),n.once("finish",f),n.emit("pipe",u),s.flowing||(this.on("readable",y),s.flowing=!0,r.nextTick((function(){b(u)}))),n},P.prototype.unpipe=function(n){var e,r,t,a=this.e0e;if(0===a.pipesCount)return this;if(1===a.pipesCount)return n&&n!==a.pipes||(n||(n=a.pipes),a.pipes=null,a.pipesCount=0,this.removeListener("readable",y),a.flowing=!1,n&&n.emit("unpipe",this)),this;if(!n){for(e=a.pipes,r=a.pipesCount,a.pipes=null,a.pipesCount=0,this.removeListener("readable",y),a.flowing=!1,t=0;t<r;t++)e[t].emit("unpipe",this);return this}return-1===(t=w(a.pipes,n))||(a.pipes.splice(t,1),a.pipesCount-=1,1===a.pipesCount&&(a.pipes=a.pipes[0]),n.emit("unpipe",this)),this},P.prototype.on=function(n,e){var r,t=c.prototype.on.call(this,n,e);return"data"!==n||this.e0e.flowing||N(this),"readable"===n&&this.readable&&((r=this.e0e).readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&g(this,r):this.read(0))),t},P.prototype.addListener=P.prototype.on,P.prototype.resume=function(){N(this),this.read(0),this.emit("resume")},P.prototype.pause=function(){N(this,!0),this.emit("pause")},P.prototype.wrap=function(n){var e,r,t=this.e0e,a=!1,i=this;for(e in n.on("end",(function(){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&i.push(n)}i.push(null)})),n.on("data",(function(e){var r;t.decoder&&(e=t.decoder.write(e)),t.objectMode&&null==e||(t.objectMode||e&&e.length)&&(i.push(e)||(a=!0,n.pause()))})),n)"function"==typeof n[e]&&void 0===this[e]&&(this[e]=function(e){return function(){return n[e].apply(n,arguments)}}(e));return O(r=["error","close","destroy","pause","resume"],(function(e){n.on(e,i.emit.bind(i,e))})),i._read=function(e){a&&(a=!1,n.resume())},i},P.r0e=B}).call(this,n("_process"))},{_process:10,buffer:3,"core-util-is":17,events:7,inherits:8,isarray:9,stream:22,"string_decoder/":23}],15:[function(n,e,r){var t,a;function i(n,e){this.afterTransform=function(n,r){return c(e,n,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function c(n,e,r){var t,a,i=n.t0e;if(i.transforming=!1,!(t=i.writecb))return n.emit("error",new Error("no writecb in Transform class"));i.writechunk=null,i.writecb=null,null!=r&&n.push(r),t&&t(e),(a=n.e0e).reading=!1,(a.needReadable||a.length<a.highWaterMark)&&n._read(a.highWaterMark)}function o(n){var e,r;if(!(this instanceof o))return new o(n);t.call(this,n),e=this.t0e=new i(n,this),r=this,this.e0e.needReadable=!0,this.e0e.sync=!1,this.once("finish",(function(){"function"==typeof this._flush?this._flush((function(n){u(r,n)})):u(r)}))}function u(n,e){var r,t,a;if(e)return n.emit("error",e);if(r=n.n0e,t=n.e0e,a=n.t0e,r.length)throw new Error("calling transform done when ws.length != 0");if(a.transforming)throw new Error("calling transform done when still transforming");return n.push(null)}e.exports=o,t=n("./_stream_duplex"),(a=n("core-util-is")).inherits=n("inherits"),a.inherits(o,t),o.prototype.push=function(n,e){return this.t0e.needTransform=!1,t.prototype.push.call(this,n,e)},o.prototype._transform=function(n,e,r){throw new Error("not implemented")},o.prototype._write=function(n,e,r){var t,a=this.t0e;a.writecb=r,a.writechunk=n,a.writeencoding=e,a.transforming||(t=this.e0e,(a.needTransform||t.needReadable||t.length<t.highWaterMark)&&this._read(t.highWaterMark))},o.prototype._read=function(n){var e=this.t0e;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0}},{"./_stream_duplex":12,"core-util-is":17,inherits:8}],16:[function(n,e,r){(function(r){var t,a,i;function c(n,e,r){this.chunk=n,this.encoding=e,this.callback=r}function o(n,e){var r,t;r=(n=n||{}).highWaterMark,this.highWaterMark=r||0===r?r:16384,this.objectMode=!!n.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,t=!1===n.decodeStrings,this.decodeStrings=!t,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){d(e,n)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function u(e){var r=n("./_stream_duplex");if(!(this instanceof u||this instanceof r))return new u(e);this.n0e=new o(e,this),this.writable=!0,i.call(this)}function s(n,e,t){var a=new Error("write after end");n.emit("error",a),r.nextTick((function(){t(a)}))}function X(n,e,a,i){var c,o=!0;return t.isBuffer(a)||"string"==typeof a||null==a||e.objectMode||(c=new TypeError("Invalid non-string/buffer chunk"),n.emit("error",c),r.nextTick((function(){i(c)})),o=!1),o}function P(n,e,r){return n.objectMode||!1===n.decodeStrings||"string"!=typeof e||(e=new t(e,r)),e}function K(n,e,r,a,i){var o,u;return r=P(e,r,a),t.isBuffer(r)&&(a="buffer"),o=e.objectMode?1:r.length,e.length+=o,(u=e.length<e.highWaterMark)||(e.needDrain=!0),e.writing?e.buffer.push(new c(r,a,i)):l(n,e,o,r,a,i),u}function l(n,e,r,t,a,i){e.writelen=r,e.writecb=i,e.writing=!0,e.sync=!0,n._write(t,a,e.onwrite),e.sync=!1}function m(n,e,t,a,i){t?r.nextTick((function(){i(a)})):i(a),n.n0e.errorEmitted=!0,n.emit("error",a)}function f(n){n.writing=!1,n.writecb=null,n.length-=n.writelen,n.writelen=0}function d(n,e){var t,a=n.n0e,i=a.sync,c=a.writecb;f(a),e?m(n,a,i,e,c):((t=v(n,a))||a.bufferProcessing||!a.buffer.length||A(n,a),i?r.nextTick((function(){h(n,a,t,c)})):h(n,a,t,c))}function h(n,e,r,t){r||g(n,e),t(),r&&C(n,e)}function g(n,e){0===e.length&&e.needDrain&&(e.needDrain=!1,n.emit("drain"))}function A(n,e){var r,t,a,i,c,o;for(e.bufferProcessing=!0,r=0;r<e.buffer.length;r++)if(a=(t=e.buffer[r]).chunk,i=t.encoding,c=t.callback,l(n,e,o=e.objectMode?1:a.length,a,i,c),e.writing){r++;break}e.bufferProcessing=!1,r<e.buffer.length?e.buffer=e.buffer.slice(r):e.buffer.length=0}function v(n,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function C(n,e){var r=v(n,e);return r&&(e.finished=!0,n.emit("finish")),r}function W(n,e,t){e.ending=!0,C(n,e),t&&(e.finished?r.nextTick(t):n.once("finish",t)),e.ended=!0}e.exports=u,t=n("buffer").Buffer,u.WritableState=o,(a=n("core-util-is")).inherits=n("inherits"),i=n("stream"),a.inherits(u,i),u.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},u.prototype.write=function(n,e,r){var a=this.n0e,i=!1;return"function"==typeof e&&(r=e,e=null),t.isBuffer(n)?e="buffer":e||(e=a.defaultEncoding),"function"!=typeof r&&(r=function(){}),a.ended?s(this,a,r):X(this,a,n,r)&&(i=K(this,a,n,e,r)),i},u.prototype._write=function(n,e,r){r(new Error("not implemented"))},u.prototype.end=function(n,e,r){var t=this.n0e;"function"==typeof n?(r=n,n=null,e=null):"function"==typeof e&&(r=e,e=null),null!=n&&this.write(n,e),t.ending||t.finished||W(this,t,r)}}).call(this,n("_process"))},{"./_stream_duplex":12,_process:10,buffer:3,"core-util-is":17,inherits:8,stream:22}],17:[function(n,e,r){(function(n){function e(n){return Array.isArray(n)}function t(n){return"boolean"==typeof n}function a(n){return null===n}function i(n){return null==n}function c(n){return"number"==typeof n}function o(n){return"string"==typeof n}function u(n){return"symbol"==typeof n}function s(n){return void 0===n}function X(n){return P(n)&&"[object RegExp]"===h(n)}function P(n){return"object"==typeof n&&null!==n}function K(n){return P(n)&&"[object Date]"===h(n)}function l(n){return P(n)&&("[object Error]"===h(n)||n instanceof Error)}function m(n){return"function"==typeof n}function f(n){return null===n||"boolean"==typeof n||"number"==typeof n||"string"==typeof n||"symbol"==typeof n||void 0===n}function d(e){return n.isBuffer(e)}function h(n){return Object.prototype.toString.call(n)}r.isArray=e,r.isBoolean=t,r.isNull=a,r.isNullOrUndefined=i,r.isNumber=c,r.isString=o,r.isSymbol=u,r.isUndefined=s,r.isRegExp=X,r.isObject=P,r.isDate=K,r.isError=l,r.isFunction=m,r.isPrimitive=f,r.isBuffer=d}).call(this,n("buffer").Buffer)},{buffer:3}],18:[function(n,e,r){e.exports=n("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":13}],19:[function(n,e,r){var t=n("stream");(r=e.exports=n("./lib/_stream_readable.js")).Stream=t,r.Readable=r,r.Writable=n("./lib/_stream_writable.js"),r.Duplex=n("./lib/_stream_duplex.js"),r.Transform=n("./lib/_stream_transform.js"),r.PassThrough=n("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":12,"./lib/_stream_passthrough.js":13,"./lib/_stream_readable.js":14,"./lib/_stream_transform.js":15,"./lib/_stream_writable.js":16,stream:22}],20:[function(n,e,r){e.exports=n("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":15}],21:[function(n,e,r){e.exports=n("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":16}],22:[function(n,e,r){var t,a;function i(){t.call(this)}e.exports=i,t=n("events").EventEmitter,(a=n("inherits"))(i,t),i.Readable=n("readable-stream/readable.js"),i.Writable=n("readable-stream/writable.js"),i.Duplex=n("readable-stream/duplex.js"),i.Transform=n("readable-stream/transform.js"),i.PassThrough=n("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(n,e){var r,a=this;function i(e){n.writable&&!1===n.write(e)&&a.pause&&a.pause()}function c(){a.readable&&a.resume&&a.resume()}function o(){r||(r=!0,n.end())}function u(){r||(r=!0,"function"==typeof n.destroy&&n.destroy())}function s(n){if(X(),0===t.listenerCount(this,"error"))throw n}function X(){a.removeListener("data",i),n.removeListener("drain",c),a.removeListener("end",o),a.removeListener("close",u),a.removeListener("error",s),n.removeListener("error",s),a.removeListener("end",X),a.removeListener("close",X),n.removeListener("close",X)}return a.on("data",i),n.on("drain",c),n.K$r||e&&!1===e.end||(a.on("end",o),a.on("close",u)),r=!1,a.on("error",s),n.on("error",s),a.on("end",X),a.on("close",X),n.on("close",X),n.emit("pipe",a),n}},{events:7,inherits:8,"readable-stream/duplex.js":11,"readable-stream/passthrough.js":18,"readable-stream/readable.js":19,"readable-stream/transform.js":20,"readable-stream/writable.js":21}],23:[function(n,e,r){var t,a=n("buffer").Buffer,i=a.isEncoding||function(n){switch(n&&n.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 c(n){if(n&&!i(n))throw new Error("Unknown encoding: "+n)}function o(n){return n.toString(this.encoding)}function u(n){this.charReceived=n.length%2,this.charLength=this.charReceived?2:0}function s(n){this.charReceived=n.length%3,this.charLength=this.charReceived?3:0}(t=r.StringDecoder=function(n){switch(this.encoding=(n||"utf8").toLowerCase().replace(/[-_]/,""),c(n),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=u;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=o)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0}).prototype.write=function(n){for(var e,r,t,a,i="";this.charLength;){if(e=n.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:n.length,n.copy(this.charBuffer,this.charReceived,0,e),this.charReceived+=e,this.charReceived<this.charLength)return"";if(n=n.slice(e,n.length),!((r=(i=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(i.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===n.length)return i;break}this.charLength+=this.surrogateSize,i=""}return this.detectIncompleteChar(n),t=n.length,this.charLength&&(n.copy(this.charBuffer,0,n.length-this.charReceived,t),t-=this.charReceived),t=(i+=n.toString(this.encoding,0,t)).length-1,(r=i.charCodeAt(t))>=55296&&r<=56319?(a=this.surrogateSize,this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),n.copy(this.charBuffer,0,0,a),i.substring(0,t)):i},t.prototype.detectIncompleteChar=function(n){for(var e,r=n.length>=3?3:n.length;r>0;r--){if(e=n[n.length-r],1==r&&e>>5==6){this.charLength=2;break}if(r<=2&&e>>4==14){this.charLength=3;break}if(r<=3&&e>>3==30){this.charLength=4;break}}this.charReceived=r},t.prototype.end=function(n){var e,r,t,a="";return n&&n.length&&(a=this.write(n)),this.charReceived&&(e=this.charReceived,r=this.charBuffer,t=this.encoding,a+=r.slice(0,e).toString(t)),a}},{buffer:3}],24:[function(n,e,r){e.exports=function n(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],25:[function(n,e,r){(function(e,t){var a,i,c,o=/%[sdj%]/g;function u(n,e){var t={seen:[],stylize:X};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),A(e)?t.showHidden=e:e&&r.Dh(t,e),N(t.showHidden)&&(t.showHidden=!1),N(t.depth)&&(t.depth=2),N(t.colors)&&(t.colors=!1),N(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=s),K(t,n,t.depth)}function s(n,e){var r=u.styles[e];return r?"\x1b["+u.colors[r][0]+"m"+n+"\x1b["+u.colors[r][1]+"m":n}function X(n,e){return n}function P(n){var e={};return n.forEach((function(n,r){e[n]=!0})),e}function K(n,e,t){var a,i,c,o,u,s,X,A,v,C;if(n.customInspect&&e&&k(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e))return b(a=e.inspect(t,n))||(a=K(n,a,t)),a;if(i=l(n,e))return i;if(c=Object.keys(e),o=P(c),n.showHidden&&(c=Object.getOwnPropertyNames(e)),w(e)&&(c.indexOf("message")>=0||c.indexOf("description")>=0))return m(e);if(0===c.length){if(k(e))return u=e.name?": "+e.name:"",n.stylize("[Function"+u+"]","special");if(B(e))return n.stylize(RegExp.prototype.toString.call(e),"regexp");if(O(e))return n.stylize(Date.prototype.toString.call(e),"date");if(w(e))return m(e)}return s="",X=!1,A=["{","}"],g(e)&&(X=!0,A=["[","]"]),k(e)&&(s=" [Function"+(v=e.name?": "+e.name:"")+"]"),B(e)&&(s=" "+RegExp.prototype.toString.call(e)),O(e)&&(s=" "+Date.prototype.toUTCString.call(e)),w(e)&&(s=" "+m(e)),0!==c.length||X&&0!=e.length?t<0?B(e)?n.stylize(RegExp.prototype.toString.call(e),"regexp"):n.stylize("[Object]","special"):(n.seen.push(e),C=X?f(n,e,t,o,c):c.map((function(r){return d(n,e,t,o,r,X)})),n.seen.pop(),h(C,s,A)):A[0]+s+A[1]}function l(n,e){if(N(e))return n.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return n.stylize(r,"string")}return W(e)?n.stylize(""+e,"number"):A(e)?n.stylize(""+e,"boolean"):v(e)?n.stylize("null","null"):void 0}function m(n){return"["+Error.prototype.toString.call(n)+"]"}function f(n,e,r,t,a){var i,c,o=[];for(i=0,c=e.length;i<c;++i)R(e,String(i))?o.push(d(n,e,r,t,String(i),!0)):o.push("");return a.forEach((function(a){a.match(/^\d+$/)||o.push(d(n,e,r,t,a,!0))})),o}function d(n,e,r,t,a,i){var c,o,u;if((u=Object.getOwnPropertyDescriptor(e,a)||{value:e[a]}).get?o=u.set?n.stylize("[Getter/Setter]","special"):n.stylize("[Getter]","special"):u.set&&(o=n.stylize("[Setter]","special")),R(t,a)||(c="["+a+"]"),o||(n.seen.indexOf(u.value)<0?(o=v(r)?K(n,u.value,null):K(n,u.value,r-1)).indexOf("\n")>-1&&(o=i?o.split("\n").map((function(n){return" "+n})).join("\n").substr(2):"\n"+o.split("\n").map((function(n){return" "+n})).join("\n")):o=n.stylize("[Circular]","special")),N(c)){if(i&&a.match(/^\d+$/))return o;(c=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(c=c.substr(1,c.length-2),c=n.stylize(c,"name")):(c=c.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),c=n.stylize(c,"string"))}return c+": "+o}function h(n,e,r){var t=0,a=n.reduce((function(n,e){return t++,e.indexOf("\n")>=0&&t++,n+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return a>60?r[0]+(""===e?"":e+"\n ")+" "+n.join(",\n ")+" "+r[1]:r[0]+e+" "+n.join(", ")+" "+r[1]}function g(n){return Array.isArray(n)}function A(n){return"boolean"==typeof n}function v(n){return null===n}function C(n){return null==n}function W(n){return"number"==typeof n}function b(n){return"string"==typeof n}function y(n){return"symbol"==typeof n}function N(n){return void 0===n}function B(n){return p(n)&&"[object RegExp]"===T(n)}function p(n){return"object"==typeof n&&null!==n}function O(n){return p(n)&&"[object Date]"===T(n)}function w(n){return p(n)&&("[object Error]"===T(n)||n instanceof Error)}function k(n){return"function"==typeof n}function x(n){return null===n||"boolean"==typeof n||"number"==typeof n||"string"==typeof n||"symbol"==typeof n||void 0===n}function T(n){return Object.prototype.toString.call(n)}function U(n){return n<10?"0"+n.toString(10):n.toString(10)}function Y(){var n=new Date,e=[U(n.getHours()),U(n.getMinutes()),U(n.getSeconds())].join(":");return[n.getDate(),c[n.getMonth()],e].join(" ")}function R(n,e){return Object.prototype.hasOwnProperty.call(n,e)}r.format=function(n){var e,r,t,a,i,c;if(!b(n)){for(e=[],r=0;r<arguments.length;r++)e.push(u(arguments[r]));return e.join(" ")}for(r=1,a=(t=arguments).length,i=String(n).replace(o,(function(n){if("%%"===n)return"%";if(r>=a)return n;switch(n){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(n){return"[Circular]"}default:return n}})),c=t[r];r<a;c=t[++r])v(c)||!p(c)?i+=" "+c:i+=" "+u(c);return i},r.deprecate=function(n,a){if(N(t.process))return function(){return r.deprecate(n,a).apply(this,arguments)};if(!0===e.noDeprecation)return n;var i=!1;function c(){if(!i){if(e.throwDeprecation)throw new Error(a);e.traceDeprecation?console.trace(a):console.error(a),i=!0}return n.apply(this,arguments)}return c},a={},r.debuglog=function(n){if(N(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var t=e.pid;a[n]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",n,t,e)}}else a[n]=function(){};return a[n]},r.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=g,r.isBoolean=A,r.isNull=v,r.isNullOrUndefined=C,r.isNumber=W,r.isString=b,r.isSymbol=y,r.isUndefined=N,r.isRegExp=B,r.isObject=p,r.isDate=O,r.isError=w,r.isFunction=k,r.isPrimitive=x,r.isBuffer=n("./support/isBuffer"),c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r.log=function(){console.log("%s - %s",Y(),r.format.apply(r,arguments))},r.inherits=n("inherits"),r.Dh=function(n,e){var r,t;if(!e||!p(e))return n;for(t=(r=Object.keys(e)).length;t--;)n[r[t]]=e[r[t]];return n}}).call(this,n("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?sel