!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["grapesjs-plugin-export"]=t():e["grapesjs-plugin-export"]=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";grapesjs.plugins.add("gjs-plugin-export",function(e,t){var n=t||{},i=r(1),o=r(91),a=e.getConfig(),s=a.stylePrefix,u=document.createElement("BUTTON"),h="gjs-export-zip",f={addExportBtn:1,btnLabel:"Export to ZIP",preHtml:'',postHtml:"",preCss:"",postCss:""};for(var c in f)c in n||(n[c]=f[c]);u.innerHTML=n.btnLabel,u.className=s+"btn-prim",e.Commands.add(h,{run:function(){var t=new i,r=t.folder("css"),a="grapesjs_template_"+Date.now()+".zip";t.file("index.html",n.preHtml+e.getHtml()+n.postHtml),r.file("style.css",n.preCss+e.getCss()+n.postCss),t.generateAsync({type:"blob"}).then(function(e){o.saveAs(e,a)})}}),n.addExportBtn&&e.on("run:export-template",function(){e.Modal.getContentEl().appendChild(u),u.onclick=function(){e.runCommand(h)}})})},function(e,t,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}n.prototype=r(2),n.prototype.loadAsync=r(82),n.support=r(5),n.defaults=r(53),n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=r(45),e.exports=n},function(e,t,r){"use strict";function n(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var i=r(3),o=r(4),a=r(50),s=r(51),u=r(53),h=r(54),f=r(59),c=r(60),l=r(42),d=r(81),p=function(e,t,r){var n,i=o.getTypeOf(t);r=o.extend(r||{},u),r.date=r.date||new Date,null!==r.compression&&(r.compression=r.compression.toUpperCase()),"string"==typeof r.unixPermissions&&(r.unixPermissions=parseInt(r.unixPermissions,8)),r.unixPermissions&&16384&r.unixPermissions&&(r.dir=!0),r.dosPermissions&&16&r.dosPermissions&&(r.dir=!0),r.dir&&(e=m(e)),r.createFolders&&(n=g(e))&&_.call(this,n,!0);var s="string"===i&&r.binary===!1&&r.base64===!1;r.binary=!s;var c=t instanceof h&&0===t.uncompressedSize;(c||r.dir||!t||0===t.length)&&(r.base64=!1,r.binary=!0,t="",r.compression="STORE",i="string");var p=null;p=t instanceof h||t instanceof a?t:l.isNode&&l.isStream(t)?new d(e,t):o.prepareContent(e,t,r.binary,r.optimizedBinaryString,r.base64);var v=new f(e,p,r);this.files[e]=v},g=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},m=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},_=function(e,t){return t="undefined"!=typeof t?t:u.createFolders,e=m(e),this.files[e]||p.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]},v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)this.files.hasOwnProperty(t)&&(n=this.files[t],r=t.slice(this.root.length,t.length),r&&t.slice(0,this.root.length)===this.root&&e(r,n))},filter:function(e){var t=[];return this.forEach(function(r,n){e(r,n)&&t.push(n)}),t},file:function(e,t,r){if(1===arguments.length){if(n(e)){var i=e;return this.filter(function(e,t){return!t.dir&&i.test(e)})}var o=this.files[this.root+e];return o&&!o.dir?o:null}return e=this.root+e,p.call(this,e,t,r),this},folder:function(e){if(!e)return this;if(n(e))return this.filter(function(t,r){return r.dir&&e.test(t)});var t=this.root+e,r=_.call(this,t),i=this.clone();return i.root=r.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(t,r){return r.name.slice(0,e.length)===e}),n=0;n=252?6:f>=248?5:f>=240?4:f>=224?3:f>=192?2:1;h[254]=h[254]=1;var c=function(e){var t,r,n,i,o,s=e.length,u=0;for(i=0;i>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t},l=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&128===(192&e[r]);)r--;return r<0?t:0===r?t:r+h[e[r]]>t?r:t},d=function(e){var t,r,n,i,a=e.length,s=new Array(2*a);for(r=0,t=0;t4)s[r++]=65533,t+=i-1;else{for(n&=2===i?31:3===i?15:7;i>1&&t1?s[r++]=65533:n<65536?s[r++]=n:(n-=65536,s[r++]=55296|n>>10&1023,s[r++]=56320|1023&n)}return s.length!==r&&(s.subarray?s=s.subarray(0,r):s.length=r),o.applyFromCharCode(s)};t.utf8encode=function(e){return a.nodebuffer?s.newBuffer(e,"utf-8"):c(e)},t.utf8decode=function(e){return a.nodebuffer?o.transformTo("nodebuffer",e).toString("utf-8"):(e=o.transformTo(a.uint8array?"uint8array":"array",e),d(e))},o.inherits(n,u),n.prototype.processChunk=function(e){var r=o.transformTo(a.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var n=r;r=new Uint8Array(n.length+this.leftOver.length),r.set(this.leftOver,0),r.set(n,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var i=l(r),s=r;i!==r.length&&(a.uint8array?(s=r.subarray(0,i),this.leftOver=r.subarray(i,r.length)):(s=r.slice(0,i),this.leftOver=r.slice(i,r.length))),this.push({data:t.utf8decode(s),meta:e.meta})},n.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=n,o.inherits(i,u),i.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=i},function(e,t,r){"use strict";function n(e){var t=null;return t=u.uint8array?new Uint8Array(e.length):new Array(e.length),o(e,t)}function i(e){return e}function o(e,t){for(var r=0;r1;)try{return d.stringifyByChunk(e,n,r)}catch(o){r=Math.floor(r/2)}return d.stringifyByChar(e)}function s(e,t){for(var r=0;r * @license MIT */ "use strict";function i(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(t){return this instanceof e?(e.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof t?a(this,t):"string"==typeof t?s(this,t,arguments.length>1?arguments[1]:"utf8"):u(this,t)):arguments.length>1?new e(t,arguments[1]):new e(t)}function a(t,r){if(t=g(t,r<0?0:0|m(r)),!e.TYPED_ARRAY_SUPPORT)for(var n=0;n>>1;return n&&(t.parent=G),t}function m(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function _(t,r){if(!(this instanceof _))return new _(t,r);var n=new e(t,r);return delete n.parent,n}function v(e,t){"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(n)return Z(e).length;t=(""+t).toLowerCase(),n=!0}}function w(e,t,r){var n=!1;if(t=0|t,r=void 0===r||r===1/0?this.length:0|r,e||(e="utf8"),t<0&&(t=0),r>this.length&&(r=this.length),r<=t)return"";for(;;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return R(this,t,r);case"ascii":return I(this,t,r);case"binary":return T(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,h,f,c;switch(s){case 1:o<128&&(a=o);break;case 2:u=e[i+1],128===(192&u)&&(c=(31&o)<<6|63&u,c>127&&(a=c));break;case 3:u=e[i+1],h=e[i+2],128===(192&u)&&128===(192&h)&&(c=(15&o)<<12|(63&u)<<6|63&h,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:u=e[i+1],h=e[i+2],f=e[i+3],128===(192&u)&&128===(192&h)&&128===(192&f)&&(c=(15&o)<<18|(63&u)<<12|(63&h)<<6|63&f,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return C(n)}function C(e){var t=e.length;if(t<=$)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function L(t,r,n,i,o,a){if(!e.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(r>o||rt.length)throw new RangeError("index out of range")}function D(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function U(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function P(e,t,r,n,i,o){if(t>i||te.length)throw new RangeError("index out of range");if(r<0)throw new RangeError("index out of range")}function M(e,t,r,n,i){return i||P(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(e,t,r,n,23,4),r+4}function N(e,t,r,n,i){return i||P(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(e,t,r,n,52,8),r+8}function F(e){if(e=j(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function j(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return e<16?"0"+e.toString(16):e.toString(16)}function Z(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Y(e){for(var t=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function q(e){return X.toByteArray(F(e))}function K(e,t,r,n){for(var i=0;i=t.length||i>=e.length);i++)t[i+r]=e[i];return i}var X=r(7),J=r(8),V=r(9);t.Buffer=e,t.SlowBuffer=_,t.INSPECT_MAX_BYTES=50,e.poolSize=8192;var G={};e.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.TYPED_ARRAY_SUPPORT?(e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array):(e.prototype.length=void 0,e.prototype.parent=void 0),e.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.compare=function(t,r){if(!e.isBuffer(t)||!e.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var n=t.length,i=r.length,o=0,a=Math.min(n,i);o0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},e.prototype.compare=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:e.compare(this,t)},e.prototype.indexOf=function(t,r){function n(e,t,r){for(var n=-1,i=0;r+i2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(r<0&&(r=Math.max(this.length+r,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,r);if(e.isBuffer(t))return n(this,t,r);if("number"==typeof t)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,r):n(this,[t],r);throw new TypeError("val must be string, number or Buffer")},e.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},e.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},e.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=t,t=0|r,r=i}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return k(this,e,t,r);case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;e.prototype.slice=function(t,r){var n=this.length;t=~~t,r=void 0===r?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r0&&(i*=256);)n+=this[e+--t]*i;return n},e.prototype.readUInt8=function(e,t){return t||z(e,1,this.length),this[e]},e.prototype.readUInt16LE=function(e,t){return t||z(e,2,this.length),this[e]|this[e+1]<<8},e.prototype.readUInt16BE=function(e,t){return t||z(e,2,this.length),this[e]<<8|this[e+1]},e.prototype.readUInt32LE=function(e,t){return t||z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},e.prototype.readUInt32BE=function(e,t){return t||z(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},e.prototype.readIntLE=function(e,t,r){e=0|e,t=0|t,r||z(e,t,this.length);for(var n=this[e],i=1,o=0;++o=i&&(n-=Math.pow(2,8*t)),n},e.prototype.readIntBE=function(e,t,r){e=0|e,t=0|t,r||z(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},e.prototype.readInt8=function(e,t){return t||z(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},e.prototype.readInt16LE=function(e,t){t||z(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(e,t){t||z(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(e,t){return t||z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},e.prototype.readInt32BE=function(e,t){return t||z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},e.prototype.readFloatLE=function(e,t){return t||z(e,4,this.length),J.read(this,e,!0,23,4)},e.prototype.readFloatBE=function(e,t){return t||z(e,4,this.length),J.read(this,e,!1,23,4)},e.prototype.readDoubleLE=function(e,t){return t||z(e,8,this.length),J.read(this,e,!0,52,8)},e.prototype.readDoubleBE=function(e,t){return t||z(e,8,this.length),J.read(this,e,!1,52,8)},e.prototype.writeUIntLE=function(e,t,r,n){e=+e,t=0|t,r=0|r,n||L(this,e,t,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},e.prototype.writeUInt8=function(t,r,n){return t=+t,r=0|r,n||L(this,t,r,1,255,0),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},e.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=0|r,n||L(this,t,r,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):D(this,t,r,!0),r+2},e.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=0|r,n||L(this,t,r,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):D(this,t,r,!1),r+2},e.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=0|r,n||L(this,t,r,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):U(this,t,r,!0),r+4},e.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=0|r,n||L(this,t,r,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):U(this,t,r,!1),r+4},e.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=0|t,!n){var i=Math.pow(2,8*r-1);L(this,e,t,r,i-1,-i)}var o=0,a=1,s=e<0?1:0;for(this[t]=255&e;++o>0)-s&255;return t+r},e.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=0|t,!n){var i=Math.pow(2,8*r-1);L(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=e<0?1:0;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=(e/a>>0)-s&255;return t+r},e.prototype.writeInt8=function(t,r,n){return t=+t,r=0|r,n||L(this,t,r,1,127,-128),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},e.prototype.writeInt16LE=function(t,r,n){return t=+t,r=0|r,n||L(this,t,r,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):D(this,t,r,!0),r+2},e.prototype.writeInt16BE=function(t,r,n){return t=+t,r=0|r,n||L(this,t,r,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):D(this,t,r,!1),r+2},e.prototype.writeInt32LE=function(t,r,n){return t=+t,r=0|r,n||L(this,t,r,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):U(this,t,r,!0),r+4},e.prototype.writeInt32BE=function(t,r,n){return t=+t,r=0|r,n||L(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):U(this,t,r,!1),r+4},e.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},e.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},e.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},e.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},e.prototype.copy=function(t,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r=0;o--)t[o+r]=this[o+n];else if(a<1e3||!e.TYPED_ARRAY_SUPPORT)for(o=0;o=this.length)throw new RangeError("start out of bounds");if(r<0||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof e)for(n=t;n0)throw new Error("Invalid string. Length must be a multiple of 4");var f=e.length;u="="===e.charAt(f-2)?2:"="===e.charAt(f-1)?1:0,h=new o(3*e.length/4-u),a=u>0?e.length-4:e.length;var c=0;for(n=0,i=0;n>16),r((65280&s)>>8),r(255&s);return 2===u?(s=t(e.charAt(n))<<2|t(e.charAt(n+1))>>4,r(255&s)):1===u&&(s=t(e.charAt(n))<<10|t(e.charAt(n+1))<<4|t(e.charAt(n+2))>>2,r(s>>8&255),r(255&s)),h}function i(e){function t(e){return n.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,o,a,s=e.length%3,u="";for(i=0,a=e.length-s;i>2),u+=t(o<<4&63),u+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],u+=t(o>>10),u+=t(o>>4&63),u+=t(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),u="0".charCodeAt(0),h="a".charCodeAt(0),f="A".charCodeAt(0),c="-".charCodeAt(0),l="_".charCodeAt(0);e.toByteArray=r,e.fromByteArray=i}(t)},function(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,f=-7,c=r?i-1:0,l=r?-1:1,d=e[t+c];for(c+=l,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+e[t+c],c+=l,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===u)return a?NaN:(d?-1:1)*(1/0);a+=Math.pow(2,n),o-=h}return(d?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,h=8*o-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+c>=1?l/u:l*Math.pow(2,1-c),t*u>=2&&(a++,u/=2),a+c>=f?(s=0,a=f):a+c>=1?(s=(t*u-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,h-=8);e[r+d-p]|=128*g}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";function n(e,t,r){i.call(this,t),this._helper=e;var n=this;e.on("data",function(e,t){n.push(e)||n._helper.pause(),r&&r(t)}).on("error",function(e){n.emit("error",e)}).on("end",function(){n.push(null)})}var i=r(11).Readable,o=r(39);o.inherits(n,i),n.prototype._read=function(){this._helper.resume()},e.exports=n},function(e,t,r){var n=function(){try{return r(12)}catch(e){}}();t=e.exports=r(30),t.Stream=n||t,t.Readable=t,t.Writable=r(34),t.Duplex=r(33),t.Transform=r(37),t.PassThrough=r(38)},function(e,t,r){function n(){i.call(this)}e.exports=n;var i=r(13).EventEmitter,o=r(14);o(n,i),n.Readable=r(15),n.Writable=r(26),n.Duplex=r(27),n.Transform=r(28),n.PassThrough=r(29),n.Stream=n,n.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&h.pause&&h.pause()}function n(){h.readable&&h.resume&&h.resume()}function o(){f||(f=!0,e.end())}function a(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){h.removeListener("data",r),e.removeListener("drain",n),h.removeListener("end",o),h.removeListener("close",a),h.removeListener("error",s),e.removeListener("error",s),h.removeListener("end",u),h.removeListener("close",u),e.removeListener("close",u)}var h=this;h.on("data",r),e.on("drain",n),e._isStdio||t&&t.end===!1||(h.on("end",o),h.on("close",a));var f=!1;return h.on("error",s),e.on("error",s),h.on("end",u),h.on("close",u),e.on("close",u),e.emit("pipe",h),e}},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,i,s,u,h;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var f=new Error('Uncaught, unspecified "error" event. ('+t+")");throw f.context=t,f}if(r=this._events[e],a(r))return!1;if(n(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:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(o(r))for(s=Array.prototype.slice.call(arguments,1),h=r.slice(),i=h.length,u=0;u0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,i,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,i=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){i=s;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){(function(n){t=e.exports=r(17),t.Stream=r(12),t.Readable=t,t.Writable=r(22),t.Duplex=r(21),t.Transform=r(24),t.PassThrough=r(25),n.browser||"disable"!==n.env.READABLE_STREAM||(e.exports=r(12))}).call(t,r(16))},function(e,t){function r(e){return u===setTimeout?setTimeout(e,0):u.call(null,e,0)}function n(e){h===clearTimeout?clearTimeout(e):h.call(null,e)}function i(){d&&c&&(d=!1,c.length?l=c.concat(l):p=-1,l.length&&o())}function o(){if(!d){var e=r(i);d=!0;for(var t=l.length;t;){for(c=l,l=[];++p1)for(var n=1;n0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||i||n||(r=t.decoder.write(r)),i||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&c(e)),d(e,t);else i||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length=T)e=T;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}function u(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||R.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function h(e,t){var r=null;return R.isBuffer(t)||R.isString(t)||R.isNullOrUndefined(t)||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function f(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,c(e)}function c(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(I("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?t.nextTick(function(){l(e)}):l(e))}function l(e){I("emit readable"),e.emit("readable"),v(e)}function d(e,r){r.readingMore||(r.readingMore=!0,t.nextTick(function(){p(e,r)}))}function p(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=i)r=o?n.join(""):S.concat(n,i),n.length=0;else if(e0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,t.nextTick(function(){r.endEmitted||0!==r.length||(r.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function y(e,t){for(var r=0,n=e.length;r0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return I("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?b(this):c(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&b(this),null;var n=t.needReadable;I("need readable",n),(0===t.length||t.length-e0?w(e,t):null,R.isNull(i)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&b(this),R.isNull(i)||this.emit("data",i),i},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,r){function n(e){I("onunpipe"),e===c&&o()}function i(){I("onend"),e.end()}function o(){I("cleanup"),e.removeListener("close",u),e.removeListener("finish",h),e.removeListener("drain",m),e.removeListener("error",s),e.removeListener("unpipe",n),c.removeListener("end",i),c.removeListener("end",o),c.removeListener("data",a),!l.awaitDrain||e._writableState&&!e._writableState.needDrain||m()}function a(t){I("ondata");var r=e.write(t);!1===r&&(I("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++,c.pause())}function s(t){I("onerror",t),f(),e.removeListener("error",s),0===x.listenerCount(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",h),f()}function h(){I("onfinish"),e.removeListener("close",u),f()}function f(){I("unpipe"),c.unpipe(e)}var c=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=e;break;case 1:l.pipes=[l.pipes,e];break;default:l.pipes.push(e)}l.pipesCount+=1,I("pipe count=%d opts=%j",l.pipesCount,r);var d=(!r||r.end!==!1)&&e!==t.stdout&&e!==t.stderr,p=d?i:o;l.endEmitted?t.nextTick(p):c.once("end",p),e.on("unpipe",n);var m=g(c);return e.on("drain",m),c.on("data",a),e._events&&e._events.error?E(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on("error",s),e.once("close",u),e.once("finish",h),e.emit("pipe",c),l.flowing||(I("pipe resume"),c.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i1){for(var r=[],n=0;n=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,n=t.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},h.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},h.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},function(e,t,r){function n(e,t){this.afterTransform=function(e,r){return i(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,u.isNullOrUndefined(r)||e.push(r),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var u;!t.decoder||i||n||(r=t.decoder.write(r),u=!t.objectMode&&0===r.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&c(e))),d(e,t)}else i||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length=D?e=D:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function u(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function h(e,t){var r=null;return R.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function f(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,c(e)}}function c(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(O("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?x(l,e):l(e))}function l(e){O("emit readable"),e.emit("readable"),w(e)}function d(e,t){t.readingMore||(t.readingMore=!0,x(p,e,t))}function p(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=i)r=o?n.join(""):1===n.length?n[0]:R.concat(n,i),n.length=0;else if(e0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,x(k,t,e))}function k(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function E(e,t){for(var r=0,n=e.length;r0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return O("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?y(this):c(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&y(this),null;var n=t.needReadable;O("need readable",n),(0===t.length||t.length-e0?b(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&y(this),null!==i&&this.emit("data",i),i},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,r){function n(e){O("onunpipe"),e===c&&o()}function i(){O("onend"),e.end()}function o(){O("cleanup"),e.removeListener("close",u),e.removeListener("finish",h),e.removeListener("drain",m),e.removeListener("error",s),e.removeListener("unpipe",n),c.removeListener("end",i),c.removeListener("end",o),c.removeListener("data",a),_=!0,!l.awaitDrain||e._writableState&&!e._writableState.needDrain||m()}function a(t){O("ondata");var r=e.write(t);!1===r&&(1!==l.pipesCount||l.pipes[0]!==e||1!==c.listenerCount("data")||_||(O("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++),c.pause())}function s(t){O("onerror",t),f(),e.removeListener("error",s),0===I(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",h),f()}function h(){O("onfinish"),e.removeListener("close",u),f()}function f(){O("unpipe"),c.unpipe(e)}var c=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=e;break;case 1:l.pipes=[l.pipes,e];break;default:l.pipes.push(e)}l.pipesCount+=1,O("pipe count=%d opts=%j",l.pipesCount,r);var d=(!r||r.end!==!1)&&e!==t.stdout&&e!==t.stderr,p=d?i:o;l.endEmitted?x(p):c.once("end",p),e.on("unpipe",n);var m=g(c);e.on("drain",m);var _=!1;return c.on("data",a),e._events&&e._events.error?A(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on("error",s),e.once("close",u),e.once("finish",h),e.emit("pipe",c),l.flowing||(O("pipe resume"),c.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1?n:S,A=r(6).Buffer;s.WritableState=a;var R=r(19);R.inherits=r(14);var C,I={deprecate:r(36)};!function(){try{C=r(12)}catch(e){}finally{C||(C=r(13).EventEmitter)}}();var A=r(6).Buffer;R.inherits(s,C);var T;a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var T;s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},s.prototype.write=function(e,t,r){var n=this._writableState,o=!1;return"function"==typeof t&&(r=t,t=null),A.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=i),n.ended?u(this,r):h(this,n,e,r)&&(n.pendingcb++,o=c(this,n,e,t,r)),o},s.prototype.cork=function(){var e=this._writableState;e.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},s.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e},s.prototype._write=function(e,t,r){r(new Error("not implemented"))},s.prototype._writev=null,s.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||k(this,n,r)}}).call(t,r(16),r(35).setImmediate)},function(e,t,r){(function(e,n){function i(e,t){this._id=e,this._clearFn=t}var o=r(16).nextTick,a=Function.prototype.apply,s=Array.prototype.slice,u={},h=0;t.setTimeout=function(){return new i(a.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new i(a.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},t.setImmediate="function"==typeof e?e:function(e){var r=h++,n=!(arguments.length<2)&&s.call(arguments,1); return u[r]=!0,o(function(){u[r]&&(n?e.apply(null,n):e.call(null),t.clearImmediate(r))}),r},t.clearImmediate="function"==typeof n?n:function(e){delete u[e]}}).call(t,r(35).setImmediate,r(35).clearImmediate)},function(e,t){(function(t){function r(e,t){function r(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(n("noDeprecation"))return e;var i=!1;return r}function n(e){try{if(!t.localStorage)return!1}catch(r){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=r}).call(t,function(){return this}())},function(e,t,r){"use strict";function n(e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r),i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,e,n.depth)}function o(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,r,n){if(e.customInspect&&r&&A(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return w(i)||(i=u(e,i,n)),i}var o=h(e,r);if(o)return o;var a=Object.keys(r),g=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),x(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(r);if(0===a.length){if(A(r)){var m=r.name?": "+r.name:"";return e.stylize("[Function"+m+"]","special")}if(k(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return f(r)}var _="",v=!1,b=["{","}"];if(p(r)&&(v=!0,b=["[","]"]),A(r)){var y=r.name?": "+r.name:"";_=" [Function"+y+"]"}if(k(r)&&(_=" "+RegExp.prototype.toString.call(r)),S(r)&&(_=" "+Date.prototype.toUTCString.call(r)),x(r)&&(_=" "+f(r)),0===a.length&&(!v||0==r.length))return b[0]+_+b[1];if(n<0)return k(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var E;return E=v?c(e,r,n,g,a):a.map(function(t){return l(e,r,n,g,t,v)}),e.seen.pop(),d(E,_,b)}function h(e,t){if(y(t))return e.stylize("undefined","undefined");if(w(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return v(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,r,n,i){for(var o=[],a=0,s=t.length;a-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),y(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function p(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function _(e){return null==e}function v(e){return"number"==typeof e}function w(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function y(e){return void 0===e}function k(e){return E(e)&&"[object RegExp]"===C(e)}function E(e){return"object"==typeof e&&null!==e}function S(e){return E(e)&&"[object Date]"===C(e)}function x(e){return E(e)&&("[object Error]"===C(e)||e instanceof Error)}function A(e){return"function"==typeof e}function R(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function C(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}function T(){var e=new Date,t=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":");return[e.getDate(),D[e.getMonth()],t].join(" ")}function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var O=/%[sdj%]/g;t.format=function(e){if(!w(e)){for(var t=[],r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}}),s=n[r];r>2,s=(3&t)<<4|r>>4,u=d>1?(15&r)<<2|i>>6:64,h=d>2?63&i:64,f.push(o.charAt(a)+o.charAt(s)+o.charAt(u)+o.charAt(h));return f.join("")},t.decode=function(e){var t,r,n,a,s,u,h,f=0,c=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");var l=3*e.length/4;e.charAt(e.length-1)===o.charAt(64)&&l--,e.charAt(e.length-2)===o.charAt(64)&&l--;var d;for(d=i.uint8array?new Uint8Array(l):new Array(l);f>4,r=(15&s)<<4|u>>2,n=(3&u)<<6|h,d[c++]=t,64!==u&&(d[c++]=r),64!==h&&(d[c++]=n);return d}},function(e,t,r){(function(t){"use strict";e.exports={isNode:"undefined"!=typeof t,newBuffer:function(e,r){return new t(e,r)},isBuffer:function(e){return t.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}}).call(t,r(6).Buffer)},function(e,t,r){"use strict";function n(){if(u.length)throw u.shift()}function i(e){var t;t=s.length?s.pop():new o,t.task=e,a(t)}function o(){this.task=null}var a=r(44),s=[],u=[],h=a.makeRequestCallFromTimer(n);e.exports=i,o.prototype.call=function(){try{this.task.call()}catch(e){i.onerror?i.onerror(e):(u.push(e),h())}finally{this.task=null,s[s.length]=this}}},function(e,t){(function(t){"use strict";function r(e){s.length||(a(),u=!0),s[s.length]=e}function n(){for(;hf){for(var t=0,r=s.length-h;t "+e:e}},e.exports=r},function(e,t,r){(function(t){"use strict";function n(e,t,r){switch(e){case"blob":return s.newBlob(s.transformTo("arraybuffer",t),r);case"base64":return f.encode(t);default:return s.transformTo(e,t)}}function i(e,r){var n,i=0,o=null,a=0;for(n=0;n=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,r);break;case"uint8array":t=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":t=this.data.slice(this.index,r)}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=n},function(e,t,r){"use strict";function n(e){o.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}var i=r(4),o=r(50);i.inherits(n,o),n.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}o.prototype.processChunk.call(this,e)},e.exports=n},function(e,t,r){"use strict";function n(){i.call(this,"Crc32Probe")}var i=r(50),o=r(58),a=r(4);a.inherits(n,i),n.prototype.processChunk=function(e){this.streamInfo.crc32=o(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=n},function(e,t,r){"use strict";function n(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}function i(e,t,r,n){var i=s,o=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return e^-1}function o(e,t,r,n){var i=s,o=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t.charCodeAt(a))];return e^-1}var a=r(4),s=n();e.exports=function(e,t){if("undefined"==typeof e||!e.length)return 0;var r="string"!==a.getTypeOf(e);return r?i(0|t,e,e.length,0):o(0|t,e,e.length,0)}},function(e,t,r){"use strict";var n=r(51),i=r(55),o=r(3),a=r(54),s=r(50),u=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};u.prototype={internalStream:function(e){var t=e.toLowerCase(),r="string"===t||"text"===t;"binarystring"!==t&&"text"!==t||(t="string");var i=this._decompressWorker(),a=!this._dataBinary;return a&&!r&&(i=i.pipe(new o.Utf8EncodeWorker)),!a&&r&&(i=i.pipe(new o.Utf8DecodeWorker)),new n(i,t,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new o.Utf8EncodeWorker)),a.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof s?this._data:new i(this._data)}};for(var h=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],f=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=s.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==g)throw new Error(f[r]);if(t.header&&s.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(i="string"==typeof t.dictionary?h.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=s.deflateSetDictionary(this.strm,i),r!==g)throw new Error(f[r]);this._dict_set=!0}}function i(e,t){var r=new n(t);if(r.push(e,!0),r.err)throw r.msg;return r.result}function o(e,t){return t=t||{},t.raw=!0,i(e,t)}function a(e,t){return t=t||{},t.gzip=!0,i(e,t)}var s=r(66),u=r(64),h=r(71),f=r(70),c=r(72),l=Object.prototype.toString,d=0,p=4,g=0,m=1,_=2,v=-1,w=0,b=8;n.prototype.push=function(e,t){var r,n,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:t===!0?p:d,"string"==typeof e?i.input=h.string2buf(e):"[object ArrayBuffer]"===l.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new u.Buf8(o),i.next_out=0,i.avail_out=o),r=s.deflate(i,n),r!==m&&r!==g)return this.onEnd(r),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||n!==p&&n!==_)||("string"===this.options.to?this.onData(h.buf2binstring(u.shrinkBuf(i.output,i.next_out))):this.onData(u.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&r!==m);return n===p?(r=s.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===g):n!==_||(this.onEnd(g),i.avail_out=0,!0)},n.prototype.onData=function(e){this.chunks.push(e)},n.prototype.onEnd=function(e){e===g&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=n,t.deflate=i,t.deflateRaw=o,t.gzip=a},function(e,t,r){"use strict";function n(e,t){return e.msg=L[t],t}function i(e){return(e<<1)-(e>4?9:0)}function o(e){for(var t=e.length;--t>=0;)e[t]=0}function a(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(T.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function s(e,t){B._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,a(e.strm)}function u(e,t){e.pending_buf[e.pending++]=t}function h(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function f(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,T.arraySet(t,e.input,e.next_in,i,r),1===e.state.wrap?e.adler=O(e.adler,t,i,r):2===e.state.wrap&&(e.adler=z(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function c(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-ce?e.strstart-(e.w_size-ce):0,h=e.window,f=e.w_mask,c=e.prev,l=e.strstart+fe,d=h[o+a-1],p=h[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(r=t,h[r+a]===p&&h[r+a-1]===d&&h[r]===h[o]&&h[++r]===h[o+1]){o+=2,r++;do;while(h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&oa){if(e.match_start=t,a=n,n>=s)break;d=h[o+a-1],p=h[o+a]}}while((t=c[t&f])>u&&0!==--i);return a<=e.lookahead?a:e.lookahead}function l(e){var t,r,n,i,o,a=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=a+(a-ce)){T.arraySet(e.window,e.window,a,a,0),e.match_start-=a,e.strstart-=a,e.block_start-=a,r=e.hash_size,t=r;do n=e.head[--t],e.head[t]=n>=a?n-a:0;while(--r);r=a,t=r;do n=e.prev[--t],e.prev[t]=n>=a?n-a:0;while(--r);i+=a}if(0===e.strm.avail_in)break;if(r=f(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=he)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(l(e),0===e.lookahead&&t===D)return be;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,s(e,!1),0===e.strm.avail_out))return be;if(e.strstart-e.block_start>=e.w_size-ce&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===M?(s(e,!0),0===e.strm.avail_out?ke:Ee):e.strstart>e.block_start&&(s(e,!1),0===e.strm.avail_out)?be:be}function p(e,t){for(var r,n;;){if(e.lookahead=he&&(e.ins_h=(e.ins_h<=he)if(n=B._tr_tally(e,e.strstart-e.match_start,e.match_length-he),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=he){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=he&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=he-1)),e.prev_length>=he&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-he,n=B._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-he),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<=he&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+fe;do;while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=he?(r=B._tr_tally(e,1,e.match_length-he),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=B._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===M?(s(e,!0),0===e.strm.avail_out?ke:Ee):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?be:ye}function _(e,t){for(var r;;){if(0===e.lookahead&&(l(e),0===e.lookahead)){if(t===D)return be;break}if(e.match_length=0,r=B._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(s(e,!1),0===e.strm.avail_out))return be}return e.insert=0,t===M?(s(e,!0),0===e.strm.avail_out?ke:Ee):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?be:ye}function v(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function w(e){e.window_size=2*e.w_size,o(e.head),e.max_lazy_match=I[e.level].max_lazy,e.good_match=I[e.level].good_length,e.nice_match=I[e.level].nice_length,e.max_chain_length=I[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=he-1,e.match_available=0,e.ins_h=0}function b(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=$,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new T.Buf16(2*se),this.dyn_dtree=new T.Buf16(2*(2*oe+1)),this.bl_tree=new T.Buf16(2*(2*ae+1)),o(this.dyn_ltree),o(this.dyn_dtree),o(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new T.Buf16(ue+1),this.heap=new T.Buf16(2*ie+1),o(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new T.Buf16(2*ie+1),o(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function y(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=G,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?de:ve,e.adler=2===t.wrap?0:1,t.last_flush=D,B._tr_init(t),F):n(e,W)}function k(e){var t=y(e);return t===F&&w(e.state),t}function E(e,t){return e&&e.state?2!==e.state.wrap?W:(e.state.gzhead=t,F):W}function S(e,t,r,i,o,a){if(!e)return W;var s=1;if(t===H&&(t=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),o<1||o>Q||r!==$||i<8||i>15||t<0||t>9||a<0||a>J)return n(e,W);8===i&&(i=9);var u=new b;return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=i,u.w_size=1<N||t<0)return e?n(e,W):W;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===we&&t!==M)return n(e,0===e.avail_out?Y:W);if(s.strm=e,r=s.last_flush,s.last_flush=t,s.status===de)if(2===s.wrap)e.adler=0,u(s,31),u(s,139),u(s,8),s.gzhead?(u(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),u(s,255&s.gzhead.time),u(s,s.gzhead.time>>8&255),u(s,s.gzhead.time>>16&255),u(s,s.gzhead.time>>24&255),u(s,9===s.level?2:s.strategy>=K||s.level<2?4:0),u(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(u(s,255&s.gzhead.extra.length),u(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=z(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=pe):(u(s,0),u(s,0),u(s,0),u(s,0),u(s,0),u(s,9===s.level?2:s.strategy>=K||s.level<2?4:0),u(s,Se),s.status=ve);else{var l=$+(s.w_bits-8<<4)<<8,d=-1;d=s.strategy>=K||s.level<2?0:s.level<6?1:6===s.level?2:3,l|=d<<6,0!==s.strstart&&(l|=le),l+=31-l%31,s.status=ve,h(s,l),0!==s.strstart&&(h(s,e.adler>>>16),h(s,65535&e.adler)),e.adler=1}if(s.status===pe)if(s.gzhead.extra){for(f=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>f&&(e.adler=z(e.adler,s.pending_buf,s.pending-f,f)),a(e),f=s.pending,s.pending!==s.pending_buf_size));)u(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>f&&(e.adler=z(e.adler,s.pending_buf,s.pending-f,f)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=ge)}else s.status=ge;if(s.status===ge)if(s.gzhead.name){f=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>f&&(e.adler=z(e.adler,s.pending_buf,s.pending-f,f)),a(e),f=s.pending,s.pending===s.pending_buf_size)){c=1;break}c=s.gzindexf&&(e.adler=z(e.adler,s.pending_buf,s.pending-f,f)),0===c&&(s.gzindex=0,s.status=me)}else s.status=me;if(s.status===me)if(s.gzhead.comment){f=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>f&&(e.adler=z(e.adler,s.pending_buf,s.pending-f,f)),a(e),f=s.pending,s.pending===s.pending_buf_size)){c=1;break}c=s.gzindexf&&(e.adler=z(e.adler,s.pending_buf,s.pending-f,f)),0===c&&(s.status=_e)}else s.status=_e; if(s.status===_e&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&a(e),s.pending+2<=s.pending_buf_size&&(u(s,255&e.adler),u(s,e.adler>>8&255),e.adler=0,s.status=ve)):s.status=ve),0!==s.pending){if(a(e),0===e.avail_out)return s.last_flush=-1,F}else if(0===e.avail_in&&i(t)<=i(r)&&t!==M)return n(e,Y);if(s.status===we&&0!==e.avail_in)return n(e,Y);if(0!==e.avail_in||0!==s.lookahead||t!==D&&s.status!==we){var p=s.strategy===K?_(s,t):s.strategy===X?m(s,t):I[s.level].func(s,t);if(p!==ke&&p!==Ee||(s.status=we),p===be||p===ke)return 0===e.avail_out&&(s.last_flush=-1),F;if(p===ye&&(t===U?B._tr_align(s):t!==N&&(B._tr_stored_block(s,0,0,!1),t===P&&(o(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),a(e),0===e.avail_out))return s.last_flush=-1,F}return t!==M?F:s.wrap<=0?j:(2===s.wrap?(u(s,255&e.adler),u(s,e.adler>>8&255),u(s,e.adler>>16&255),u(s,e.adler>>24&255),u(s,255&e.total_in),u(s,e.total_in>>8&255),u(s,e.total_in>>16&255),u(s,e.total_in>>24&255)):(h(s,e.adler>>>16),h(s,65535&e.adler)),a(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?F:j)}function R(e){var t;return e&&e.state?(t=e.state.status,t!==de&&t!==pe&&t!==ge&&t!==me&&t!==_e&&t!==ve&&t!==we?n(e,W):(e.state=null,t===ve?n(e,Z):F)):W}function C(e,t){var r,n,i,a,s,u,h,f,c=t.length;if(!e||!e.state)return W;if(r=e.state,a=r.wrap,2===a||1===a&&r.status!==de||r.lookahead)return W;for(1===a&&(e.adler=O(e.adler,t,c,0)),r.wrap=0,c>=r.w_size&&(0===a&&(o(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new T.Buf8(r.w_size),T.arraySet(f,t,c-r.w_size,r.w_size,0),t=f,c=r.w_size),s=e.avail_in,u=e.next_in,h=e.input,e.avail_in=c,e.next_in=0,e.input=t,l(r);r.lookahead>=he;){n=r.strstart,i=r.lookahead-(he-1);do r.ins_h=(r.ins_h<=0;)e[t]=0}function i(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function o(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function a(e){return e<256?ue[e]:ue[256+(e>>>7)]}function s(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function u(e,t,r){e.bi_valid>J-r?(e.bi_buf|=t<>J-e.bi_valid,e.bi_valid+=r-J):(e.bi_buf|=t<>>=1,r<<=1;while(--t>0);return r>>>1}function c(e){16===e.bi_valid?(s(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function l(e,t){var r,n,i,o,a,s,u=t.dyn_tree,h=t.max_code,f=t.stat_desc.static_tree,c=t.stat_desc.has_stree,l=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,g=0;for(o=0;o<=X;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;rp&&(o=p,g++),u[2*n+1]=o,n>h||(e.bl_count[o]++,a=0,n>=d&&(a=l[n-d]),s=u[2*n],e.opt_len+=s*(o+a),c&&(e.static_len+=s*(f[2*n+1]+a)));if(0!==g){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,g-=2}while(g>0);for(o=p;0!==o;o--)for(n=e.bl_count[o];0!==n;)i=e.heap[--r],i>h||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}function d(e,t,r){var n,i,o=new Array(X+1),a=0;for(n=1;n<=X;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=f(o[s]++,s))}}function p(){var e,t,r,n,o,a=new Array(X+1);for(r=0,n=0;n>=7;n8?s(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function _(e,t,r,n){m(e),n&&(s(e,r),s(e,~r)),O.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function v(e,t,r,n){var i=2*t,o=2*r;return e[i]>1;r>=1;r--)w(e,o,r);i=u;do r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],w(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,w(e,o,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],l(e,t),d(o,h,e.bl_count)}function k(e,t,r){var n,i,o=-1,a=t[1],s=0,u=7,h=4;for(0===a&&(u=138,h=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++s=3&&0===e.bl_tree[2*ie[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function x(e,t,r,n){var i;for(u(e,t-257,5),u(e,r-1,5),u(e,n-4,4),i=0;i>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return L;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return D;for(t=32;t0?(e.strm.data_type===U&&(e.strm.data_type=A(e)),y(e,e.l_desc),y(e,e.d_desc),a=S(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&t!==-1?C(e,t,r,n):e.strategy===z||o===i?(u(e,(M<<1)+(n?1:0),3),b(e,ae,se)):(u(e,(N<<1)+(n?1:0),3),x(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),b(e,e.dyn_ltree,e.dyn_dtree)),g(e),n&&m(e)}function B(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(he[r]+Z+1)]++,e.dyn_dtree[2*a(t)]++),e.last_lit===e.lit_bufsize-1}var O=r(64),z=4,L=0,D=1,U=2,P=0,M=1,N=2,F=3,j=258,W=29,Z=256,Y=Z+1+W,H=30,q=19,K=2*Y+1,X=15,J=16,V=7,G=256,$=16,Q=17,ee=18,te=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],re=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ne=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],oe=512,ae=new Array(2*(Y+2));n(ae);var se=new Array(2*H);n(se);var ue=new Array(oe);n(ue);var he=new Array(j-F+1);n(he);var fe=new Array(W);n(fe);var ce=new Array(H);n(ce);var le,de,pe,ge=!1;t._tr_init=R,t._tr_stored_block=C,t._tr_flush_block=T,t._tr_tally=B,t._tr_align=I},function(e,t){"use strict";function r(e,t,r,n){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==r;){a=r>2e3?2e3:r,r-=a;do i=i+t[n++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}e.exports=r},function(e,t){"use strict";function r(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}function n(e,t,r,n){var o=i,a=n+r;e^=-1;for(var s=n;s>>8^o[255&(e^t[s])];return e^-1}var i=r();e.exports=n},function(e,t){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,r){"use strict";function n(e,t){if(t<65537&&(e.subarray&&a||!e.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var r="",n=0;n=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;u[254]=u[254]=1,t.string2buf=function(e){var t,r,n,o,a,s=e.length,u=0;for(o=0;o>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},t.buf2binstring=function(e){return n(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),r=0,n=t.length;r4)h[i++]=65533,r+=a-1;else{for(o&=2===a?31:3===a?15:7;a>1&&r1?h[i++]=65533:o<65536?h[i++]=o:(o-=65536,h[i++]=55296|o>>10&1023,h[i++]=56320|1023&o)}return n(h,i)},t.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&128===(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}},function(e,t){"use strict";function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=r},function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=a.inflateInit2(this.strm,t.windowBits);if(r!==h.Z_OK)throw new Error(f[r]);this.header=new l,a.inflateGetHeader(this.strm,this.header)}function i(e,t){var r=new n(t);if(r.push(e,!0),r.err)throw r.msg;return r.result}function o(e,t){return t=t||{},t.raw=!0,i(e,t)}var a=r(74),s=r(64),u=r(71),h=r(77),f=r(70),c=r(72),l=r(78),d=Object.prototype.toString;n.prototype.push=function(e,t){var r,n,i,o,f,c,l=this.strm,p=this.options.chunkSize,g=this.options.dictionary,m=!1;if(this.ended)return!1;n=t===~~t?t:t===!0?h.Z_FINISH:h.Z_NO_FLUSH,"string"==typeof e?l.input=u.binstring2buf(e):"[object ArrayBuffer]"===d.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new s.Buf8(p),l.next_out=0,l.avail_out=p),r=a.inflate(l,h.Z_NO_FLUSH),r===h.Z_NEED_DICT&&g&&(c="string"==typeof g?u.string2buf(g):"[object ArrayBuffer]"===d.call(g)?new Uint8Array(g):g,r=a.inflateSetDictionary(this.strm,c)),r===h.Z_BUF_ERROR&&m===!0&&(r=h.Z_OK,m=!1),r!==h.Z_STREAM_END&&r!==h.Z_OK)return this.onEnd(r),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&r!==h.Z_STREAM_END&&(0!==l.avail_in||n!==h.Z_FINISH&&n!==h.Z_SYNC_FLUSH)||("string"===this.options.to?(i=u.utf8border(l.output,l.next_out),o=l.next_out-i,f=u.buf2string(l.output,i),l.next_out=o,l.avail_out=p-o,o&&s.arraySet(l.output,l.output,i,o,0),this.onData(f)):this.onData(s.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(m=!0)}while((l.avail_in>0||0===l.avail_out)&&r!==h.Z_STREAM_END);return r===h.Z_STREAM_END&&(n=h.Z_FINISH),n===h.Z_FINISH?(r=a.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===h.Z_OK):n!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),l.avail_out=0,!0)},n.prototype.onData=function(e){this.chunks.push(e)},n.prototype.onEnd=function(e){e===h.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=n,t.inflate=i,t.inflateRaw=o,t.ungzip=i},function(e,t,r){"use strict";function n(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new v.Buf16(320),this.work=new v.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new v.Buf32(ge),t.distcode=t.distdyn=new v.Buf32(me),t.sane=1,t.back=-1,I):O}function a(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,o(e)):O}function s(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?O:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,a(e))):O}function u(e,t){var r,n;return e?(n=new i,e.state=n,n.window=null,r=s(e,t),r!==I&&(e.state=null),r):O}function h(e){return u(e,ve)}function f(e){if(we){var t;for(m=new v.Buf32(512),_=new v.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(k(S,e.lens,0,288,m,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;k(x,e.lens,0,32,_,0,e.work,{bits:5}),we=!1}e.lencode=m,e.lenbits=9,e.distcode=_,e.distbits=5}function c(e,t,r,n){var i,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(v.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),v.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(v.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=b(r.check,Re,2,0),l=0,d=0,r.mode=M;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=le;break}if((15&l)!==U){e.msg="unknown compression method",r.mode=le;break}if(l>>>=4,d-=4,ke=(15&l)+8,0===r.wbits)r.wbits=ke;else if(ke>r.wbits){e.msg="invalid window size",r.mode=le;break}r.dmax=1<>8&1),512&r.flags&&(Re[0]=255&l,Re[1]=l>>>8&255,r.check=b(r.check,Re,2,0)),l=0,d=0,r.mode=N;case N:for(;d<32;){if(0===u)break e;u--,l+=i[a++]<>>8&255,Re[2]=l>>>16&255,Re[3]=l>>>24&255,r.check=b(r.check,Re,4,0)),l=0,d=0,r.mode=F;case F:for(;d<16;){if(0===u)break e;u--,l+=i[a++]<>8),512&r.flags&&(Re[0]=255&l,Re[1]=l>>>8&255,r.check=b(r.check,Re,2,0)),l=0,d=0,r.mode=j;case j:if(1024&r.flags){for(;d<16;){if(0===u)break e;u--,l+=i[a++]<>>8&255,r.check=b(r.check,Re,2,0)),l=0,d=0}else r.head&&(r.head.extra=null);r.mode=W;case W:if(1024&r.flags&&(m=r.length,m>u&&(m=u),m&&(r.head&&(ke=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),v.arraySet(r.head.extra,i,a,m,ke)),512&r.flags&&(r.check=b(r.check,i,m,a)),u-=m,a+=m,r.length-=m),r.length))break e;r.length=0,r.mode=Z;case Z:if(2048&r.flags){if(0===u)break e;m=0;do ke=i[a+m++],r.head&&ke&&r.length<65536&&(r.head.name+=String.fromCharCode(ke));while(ke&&m>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=X;break;case q:for(;d<32;){if(0===u)break e;u--,l+=i[a++]<>>=7&d,d-=7&d,r.mode=he;break}for(;d<3;){if(0===u)break e;u--,l+=i[a++]<>>=1,d-=1,3&l){case 0:r.mode=V;break;case 1:if(f(r),r.mode=re,t===C){l>>>=2,d-=2;break e}break;case 2:r.mode=Q;break;case 3:e.msg="invalid block type",r.mode=le}l>>>=2,d-=2;break;case V:for(l>>>=7&d,d-=7&d;d<32;){if(0===u)break e;u--,l+=i[a++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=le;break}if(r.length=65535&l,l=0,d=0,r.mode=G,t===C)break e;case G:r.mode=$;case $:if(m=r.length){if(m>u&&(m=u),m>h&&(m=h),0===m)break e;v.arraySet(o,i,a,m,s),u-=m,a+=m,h-=m,s+=m,r.length-=m;break}r.mode=X;break;case Q:for(;d<14;){if(0===u)break e;u--,l+=i[a++]<>>=5,d-=5,r.ndist=(31&l)+1,l>>>=5,d-=5,r.ncode=(15&l)+4,l>>>=4,d-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=le;break}r.have=0,r.mode=ee;case ee:for(;r.have>>=3,d-=3}for(;r.have<19;)r.lens[Ce[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,Se={bits:r.lenbits},Ee=k(E,r.lens,0,19,r.lencode,0,r.work,Se),r.lenbits=Se.bits,Ee){e.msg="invalid code lengths set",r.mode=le;break}r.have=0,r.mode=te;case te:for(;r.have>>24,_e=Ae>>>16&255,ve=65535&Ae,!(me<=d);){if(0===u)break e;u--,l+=i[a++]<>>=me,d-=me,r.lens[r.have++]=ve;else{if(16===ve){for(xe=me+2;d>>=me,d-=me,0===r.have){e.msg="invalid bit length repeat",r.mode=le;break}ke=r.lens[r.have-1],m=3+(3&l),l>>>=2,d-=2}else if(17===ve){for(xe=me+3;d>>=me,d-=me,ke=0,m=3+(7&l),l>>>=3,d-=3}else{for(xe=me+7;d>>=me,d-=me,ke=0,m=11+(127&l),l>>>=7,d-=7}if(r.have+m>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=le;break}for(;m--;)r.lens[r.have++]=ke}}if(r.mode===le)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=le;break}if(r.lenbits=9,Se={bits:r.lenbits},Ee=k(S,r.lens,0,r.nlen,r.lencode,0,r.work,Se),r.lenbits=Se.bits,Ee){e.msg="invalid literal/lengths set",r.mode=le;break}if(r.distbits=6,r.distcode=r.distdyn,Se={bits:r.distbits},Ee=k(x,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Se),r.distbits=Se.bits,Ee){e.msg="invalid distances set",r.mode=le;break}if(r.mode=re,t===C)break e;case re:r.mode=ne;case ne:if(u>=6&&h>=258){e.next_out=s,e.avail_out=h,e.next_in=a,e.avail_in=u,r.hold=l,r.bits=d,y(e,g),s=e.next_out,o=e.output,h=e.avail_out,a=e.next_in,i=e.input,u=e.avail_in,l=r.hold,d=r.bits,r.mode===X&&(r.back=-1);break}for(r.back=0;Ae=r.lencode[l&(1<>>24,_e=Ae>>>16&255,ve=65535&Ae,!(me<=d);){if(0===u)break e;u--,l+=i[a++]<>we)],me=Ae>>>24,_e=Ae>>>16&255,ve=65535&Ae,!(we+me<=d);){if(0===u)break e;u--,l+=i[a++]<>>=we,d-=we,r.back+=we}if(l>>>=me,d-=me,r.back+=me,r.length=ve,0===_e){r.mode=ue;break}if(32&_e){r.back=-1,r.mode=X;break}if(64&_e){e.msg="invalid literal/length code",r.mode=le;break}r.extra=15&_e,r.mode=ie;case ie:if(r.extra){for(xe=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=oe;case oe:for(;Ae=r.distcode[l&(1<>>24,_e=Ae>>>16&255,ve=65535&Ae,!(me<=d);){if(0===u)break e;u--,l+=i[a++]<>we)],me=Ae>>>24,_e=Ae>>>16&255,ve=65535&Ae,!(we+me<=d);){if(0===u)break e;u--,l+=i[a++]<>>=we,d-=we,r.back+=we}if(l>>>=me,d-=me,r.back+=me,64&_e){e.msg="invalid distance code",r.mode=le;break}r.offset=ve,r.extra=15&_e,r.mode=ae;case ae:if(r.extra){for(xe=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=le;break}r.mode=se;case se:if(0===h)break e;if(m=g-h,r.offset>m){if(m=r.offset-m,m>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=le;break}m>r.wnext?(m-=r.wnext,_=r.wsize-m):_=r.wnext-m,m>r.length&&(m=r.length),ge=r.window}else ge=o,_=s-r.offset,m=r.length;m>h&&(m=h),h-=m,r.length-=m;do o[s++]=ge[_++];while(--m);0===r.length&&(r.mode=ne);break;case ue:if(0===h)break e;o[s++]=r.length,h--,r.mode=ne;break;case he:if(r.wrap){for(;d<32;){if(0===u)break e;u--,l|=i[a++]<>>24,g>>>=k,m-=k,k=y>>>16&255,0===k)C[s++]=65535&y;else{if(!(16&k)){if(0===(64&k)){y=_[(65535&y)+(g&(1<>>=k,m-=k),m<15&&(g+=R[o++]<>>24,g>>>=k,m-=k,k=y>>>16&255,!(16&k)){if(0===(64&k)){y=v[(65535&y)+(g&(1<f){e.msg="invalid distance too far back",i.mode=r;break e}if(g>>>=k,m-=k,k=s-u,S>k){if(k=S-k,k>l&&i.sane){e.msg="invalid distance too far back",i.mode=r;break e}if(x=0,A=p,0===d){if(x+=c-k,k2;)C[s++]=A[x++],C[s++]=A[x++],C[s++]=A[x++],E-=3;E&&(C[s++]=A[x++],E>1&&(C[s++]=A[x++]))}else{x=s-S;do C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],E-=3;while(E>2);E&&(C[s++]=C[x++],E>1&&(C[s++]=C[x++]))}break}}break}}while(o>3,o-=E,m-=E<<3,g&=(1<=1&&0===j[O];O--);if(z>O&&(z=O),0===O)return g[m++]=20971520,g[m++]=20971520,v.bits=1,0;for(B=1;B0&&(e===s||1!==O))return-1;for(W[1]=0,I=1;Io||e===h&&P>a)return 1;for(var H=0;;){H++,x=I-D,_[T]S?(A=Z[Y+_[T]],R=N[F+_[T]]):(A=96,R=0),w=1<>D)+b]=x<<24|A<<16|R|0;while(0!==b);for(w=1<>=1;if(0!==w?(M&=w-1,M+=w):M=0,T++,0===--j[I]){if(I===O)break;I=t[r+_[T]]}if(I>z&&(M&k)!==y){for(0===D&&(D=z),E+=B,L=I-D,U=1<o||e===h&&P>a)return 1;y=M&k,g[y]=z<<24|L<<16|E-m|0}}return 0!==M&&(g[E+M]=I-D<<24|64<<16|0),v.bits=z,0}},function(e,t){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t){"use strict";function r(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}e.exports=r},function(e,t,r){"use strict";function n(e,t,r,n){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var i=r(4),o=r(50),a=r(3),s=r(58),u=r(80),h=function(e,t){var r,n="";for(r=0;r>>=8;return n},f=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16},c=function(e,t){return 63&(e||0)},l=function(e,t,r,n,o,l){var d,p,g=e.file,m=e.compression,_=l!==a.utf8encode,v=i.transformTo("string",l(g.name)),w=i.transformTo("string",a.utf8encode(g.name)),b=g.comment,y=i.transformTo("string",l(b)),k=i.transformTo("string",a.utf8encode(b)),E=w.length!==g.name.length,S=k.length!==b.length,x="",A="",R="",C=g.dir,I=g.date,T={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var B=0;t&&(B|=8),_||!E&&!S||(B|=2048);var O=0,z=0;C&&(O|=16),"UNIX"===o?(z=798,O|=f(g.unixPermissions,C)):(z=20,O|=c(g.dosPermissions,C)),d=I.getUTCHours(),d<<=6,d|=I.getUTCMinutes(),d<<=5,d|=I.getUTCSeconds()/2,p=I.getUTCFullYear()-1980,p<<=4,p|=I.getUTCMonth()+1,p<<=5,p|=I.getUTCDate(),E&&(A=h(1,1)+h(s(v),4)+w,x+="up"+h(A.length,2)+A),S&&(R=h(1,1)+h(s(y),4)+k,x+="uc"+h(R.length,2)+R);var L="";L+="\n\0",L+=h(B,2),L+=m.magic,L+=h(d,2),L+=h(p,2),L+=h(T.crc32,4),L+=h(T.compressedSize,4),L+=h(T.uncompressedSize,4),L+=h(v.length,2),L+=h(x.length,2);var D=u.LOCAL_FILE_HEADER+L+v+x,U=u.CENTRAL_FILE_HEADER+h(z,2)+L+h(y.length,2)+"\0\0\0\0"+h(O,4)+h(n,4)+v+x+y;return{fileRecord:D,dirRecord:U}},d=function(e,t,r,n,o){var a="",s=i.transformTo("string",o(n));return a=u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+h(e,2)+h(e,2)+h(t,4)+h(r,4)+h(s.length,2)+s; },p=function(e){var t="";return t=u.DATA_DESCRIPTOR+h(e.crc32,4)+h(e.compressedSize,4)+h(e.uncompressedSize,4)};i.inherits(n,o),n.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},n.prototype.openedSource=function(e){if(this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name,this.streamFiles&&!e.file.dir){var t=l(e,this.streamFiles,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0},n.prototype.closedSource=function(e){this.accumulate=!1;var t=l(e,this.streamFiles,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(t.dirRecord),this.streamFiles&&!e.file.dir)this.push({data:p(e),meta:{percent:100}});else for(this.push({data:t.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},n.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(r,a.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(e){this.reader=i(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=n},function(e,t,r){"use strict";var n=r(4),i=r(5),o=r(85),a=r(87),s=r(88),u=r(89);e.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new u(n.transformTo("uint8array",e)):new o(n.transformTo("array",e)):new a(e)}},function(e,t,r){"use strict";function n(e){i.call(this,e);for(var t=0;t=0;--o)if(this.data[o]===t&&this.data[o+1]===r&&this.data[o+2]===n&&this.data[o+3]===i)return o-this.zero;return-1},n.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&r===o[1]&&n===o[2]&&i===o[3]},n.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=n},function(e,t,r){"use strict";function n(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}var i=r(4);n.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return i.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=n},function(e,t,r){"use strict";function n(e){i.call(this,e)}var i=r(86),o=r(4);o.inherits(n,i),n.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},n.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},n.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t},n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=n},function(e,t,r){"use strict";function n(e){i.call(this,e)}var i=r(89),o=r(4);o.inherits(n,i),n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=n},function(e,t,r){"use strict";function n(e){i.call(this,e)}var i=r(85),o=r(4);o.inherits(n,i),n.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=n},function(e,t,r){"use strict";function n(e,t){this.options=e,this.loadOptions=t}var i=r(84),o=r(4),a=r(54),s=r(58),u=r(3),h=r(61),f=r(5),c=0,l=3,d=function(e){for(var t in h)if(h.hasOwnProperty(t)&&h[t].magic===e)return h[t];return null};n.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=d(this.compressionMethod),null===t)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),e===c&&(this.dosPermissions=63&this.externalFileAttributes),e===l&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index