@progress/jszip-esm
Version:
JSZip fork with bundler-friendly packaging
1 lines • 79.1 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).JSZip=e()}(this,(function(){"use strict";var t={Promise:Promise},e={base64:!0,array:!0,string:!0,nodebuffer:!1,nodestream:!1,get arraybuffer(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array},get uint8array(){return"undefined"!=typeof Uint8Array},get blob(){return r()}},r=function(){var t;if("undefined"==typeof ArrayBuffer)t=!1;else{var e=new ArrayBuffer(0);try{t=0===new Blob([e],{type:"application/zip"}).size}catch(e){t=!1}}return r=function(){return t},t},i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function n(t){return t}function a(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}function s(t,e,r){var i=[],n=0,a=t.length;if(a<=r)return String.fromCharCode.apply(null,t);for(;n<a;)"array"===e?i.push(String.fromCharCode.apply(null,t.slice(n,Math.min(n+r,a)))):i.push(String.fromCharCode.apply(null,t.subarray(n,Math.min(n+r,a)))),n+=r;return i.join("")}var o=function(){var t;try{t=e.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){t=!1}return o=function(){return t},t};function h(t){var e=65536,r=p(t),i=!0;if("uint8array"===r&&(i=o()),i)for(;e>1;)try{return s(t,r,e)}catch(t){e=Math.floor(e/2)}return function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}(t)}var l=h;function d(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}var u={string:{string:n,array:function(t){return a(t,new Array(t.length))},arraybuffer:function(t){return u.string.uint8array(t).buffer},uint8array:function(t){return a(t,new Uint8Array(t.length))}},array:{string:h,array:n,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)}},arraybuffer:{string:function(t){return h(new Uint8Array(t))},array:function(t){return d(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:n,uint8array:function(t){return new Uint8Array(t)}},uint8array:{string:h,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:n}},c=function(t,e){if(e||(e=""),!t)return e;m(t);var r=p(e);return u[r][t](e)},f=function(t){for(var e=t.split("/"),r=[],i=0;i<e.length;i++){var n=e[i];"."===n||""===n&&0!==i&&i!==e.length-1||(".."===n?r.pop():r.push(n))}return r.join("/")},p=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":e.uint8array&&t instanceof Uint8Array?"uint8array":e.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},m=function(t){if(!e[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},_=65535,g=-1,y=function(t){var e,r,i="";for(r=0;r<(t||"").length;r++)i+="\\x"+((e=t.charCodeAt(r))<16?"0":"")+e.toString(16).toUpperCase();return i},v=function(t,e,r){setTimeout((function(){t.apply(r||null,e||[])}),0)},w=function(){var t,e,r=arguments,i={};for(t=0;t<arguments.length;t++)for(e in arguments[t])Object.hasOwnProperty.call(r[t],e)&&void 0===i[e]&&(i[e]=r[t][e]);return i},b=function(r,n,s,o,h){var l=t.Promise.resolve(n).then((function(r){return e.blob&&(r instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(r)))&&"undefined"!=typeof FileReader?new t.Promise((function(t,e){var i=new FileReader;i.onload=function(e){t(e.target.result)},i.onerror=function(t){e(t.target.error)},i.readAsArrayBuffer(r)})):r}));return l.then((function(n){var l,d=p(n);return d?("arraybuffer"===d?n=c("uint8array",n):"string"===d&&(h?n=function(t){var r,n,a,s,o,h,l=0,d=0,u="data:";if(t.substr(0,5)===u)throw new Error("Invalid base64 input, it looks like a data url.");var c,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===i.charAt(64)&&f--,t.charAt(t.length-2)===i.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(c=e.uint8array?new Uint8Array(0|f):new Array(0|f);l<t.length;)r=i.indexOf(t.charAt(l++))<<2|(s=i.indexOf(t.charAt(l++)))>>4,n=(15&s)<<4|(o=i.indexOf(t.charAt(l++)))>>2,a=(3&o)<<6|(h=i.indexOf(t.charAt(l++))),c[d++]=r,64!==o&&(c[d++]=n),64!==h&&(c[d++]=a);return c}(n):s&&!0!==o&&(n=a(l=n,e.uint8array?new Uint8Array(l.length):new Array(l.length)))),n):t.Promise.reject(new Error("Can't read the data of '"+r+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))},k=function(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null};k.prototype.push=function(t){this.emit("data",t)},k.prototype.end=function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},k.prototype.error=function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},k.prototype.on=function(t,e){return this._listeners[t].push(e),this},k.prototype.cleanUp=function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},k.prototype.emit=function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e)},k.prototype.pipe=function(t){return t.registerPrevious(this)},k.prototype.registerPrevious=function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.end()})),t.on("error",(function(t){e.error(t)})),this},k.prototype.pause=function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},k.prototype.resume=function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var t=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},k.prototype.flush=function(){},k.prototype.processChunk=function(t){this.push(t)},k.prototype.withStreamInfo=function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},k.prototype.mergeStreamInfo=function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},k.prototype.lock=function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},k.prototype.toString=function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t};var x=function(t){for(var e=new Array(256),r=0;r<256;r++)e[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;return e[254]=e[254]=1,x=function(t){return e[t]},e[t]},z=function(t){return function(t){var r,i,n,a,s,o=t.length,h=0;for(a=0;a<o;a++)55296==(64512&(i=t.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=t.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),h+=i<128?1:i<2048?2:i<65536?3:4;for(r=e.uint8array?new Uint8Array(h):new Array(h),s=0,a=0;s<h;a++)55296==(64512&(i=t.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=t.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),i<128?r[s++]=i:i<2048?(r[s++]=192|i>>>6,r[s++]=128|63&i):i<65536?(r[s++]=224|i>>>12,r[s++]=128|i>>>6&63,r[s++]=128|63&i):(r[s++]=240|i>>>18,r[s++]=128|i>>>12&63,r[s++]=128|i>>>6&63,r[s++]=128|63&i);return r}(t)},S=function(t){return function(t){var e,r,i,n,a=t.length,s=new Array(2*a);for(r=0,e=0;e<a;)if((i=t[e++])<128)s[r++]=i;else if((n=x(i))>4)s[r++]=65533,e+=n-1;else{for(i&=2===n?31:3===n?15:7;n>1&&e<a;)i=i<<6|63&t[e++],n--;n>1?s[r++]=65533:i<65536?s[r++]=i:(i-=65536,s[r++]=55296|i>>10&1023,s[r++]=56320|1023&i)}return s.length!==r&&(s.subarray?s=s.subarray(0,r):s.length=r),l(s)}(t=c(e.uint8array?"uint8array":"array",t))},C=function(t){function r(){t.call(this,"utf-8 decode"),this.leftOver=null}return r.__proto__=t,r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.processChunk=function(t){var r=c(e.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(e.uint8array){var i=r;(r=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),r.set(i,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var n=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+x(t[r])>e?r:e}(r),a=r;n!==r.length&&(e.uint8array?(a=r.subarray(0,n),this.leftOver=r.subarray(n,r.length)):(a=r.slice(0,n),this.leftOver=r.slice(n,r.length))),this.push({data:S(a),meta:t.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:S(this.leftOver),meta:{}}),this.leftOver=null)},r}(k),A=function(t){function e(){t.call(this,"utf-8 encode")}return e.__proto__=t,e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.processChunk=function(t){this.push({data:z(t.data),meta:t.meta})},e}(k),O=function(t){function e(e){t.call(this,"ConvertWorker to "+e),this.destType=e}return e.__proto__=t,e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.processChunk=function(t){this.push({data:c(this.destType,t.data),meta:t.meta})},e}(k);function I(t,e,r){switch(t){case"blob":return function(t,e){return m("blob"),new Blob([t],{type:e})}(c("arraybuffer",e),r);case"base64":return function(t){for(var e,r,n,a,s,o,h,l=[],d=0,u=t.length,c=u,f="string"!=typeof t;d<t.length;)c=u-d,f?(e=t[d++],r=d<u?t[d++]:0,n=d<u?t[d++]:0):(e=t.charCodeAt(d++),r=d<u?t.charCodeAt(d++):0,n=d<u?t.charCodeAt(d++):0),a=e>>2,s=(3&e)<<4|r>>4,o=c>1?(15&r)<<2|n>>6:64,h=c>2?63&n:64,l.push(i.charAt(a)+i.charAt(s)+i.charAt(o)+i.charAt(h));return l.join("")}(e);default:return c(t,e)}}function E(e,r){return new t.Promise((function(t,i){var n=[],a=e._internalType,s=e._outputType,o=e._mimeType;e.on("data",(function(t,e){n.push(t),r&&r(e)})).on("error",(function(t){n=[],i(t)})).on("end",(function(){try{var e=I(s,function(t,e){var r,i=0,n=null,a=0;for(r=0;r<e.length;r++)a+=e[r].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(n=new Uint8Array(a),r=0;r<e.length;r++)n.set(e[r],i),i+=e[r].length;return n;default:throw new Error("concat : unsupported type '"+t+"'")}}(a,n),o);t(e)}catch(t){i(t)}n=[]})).resume()}))}var P=function(t,e,r){var i=e;switch(e){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=e,this._mimeType=r,m(i),this._worker=t.pipe(new O(i)),t.lock()}catch(t){this._worker=new k("error"),this._worker.error(t)}};P.prototype.accumulate=function(t){return E(this,t)},P.prototype.on=function(t,e){var r=this;return"data"===t?this._worker.on(t,(function(t){e.call(r,t.data,t.meta)})):this._worker.on(t,(function(){v(e,arguments,r)})),this},P.prototype.resume=function(){return v(this._worker.resume,[],this._worker),this},P.prototype.pause=function(){return this._worker.pause(),this};var F=!0,B=Object.freeze({__proto__:null,base64:!1,binary:!1,comment:null,compression:null,compressionOptions:null,createFolders:F,date:null,dir:!1,dosPermissions:null,unixPermissions:null}),D=function(t){function e(e){t.call(this,"DataWorker");var r=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(t){r.dataIsReady=!0,r.data=t,r.max=t&&t.length||0,r.type=p(t),r.isPaused||r._tickAndRepeat()}),(function(t){r.error(t)}))}return e.__proto__=t,e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.cleanUp=function(){t.prototype.cleanUp.call(this),this.data=null},e.prototype.resume=function(){return!!t.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,v(this._tickAndRepeat,[],this)),!0)},e.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(v(this._tickAndRepeat,[],this),this._tickScheduled=!0))},e.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e}(k),U=function(t){function e(e){t.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.processChunk=function(e){if(e){var r=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=r+e.data.length}t.prototype.processChunk.call(this,e)},e}(k),j=function(){for(var t=[],e=0;e<256;e++){for(var r=e,i=0;i<8;i++)r=1&r?3988292384^r>>>1:r>>>1;t[e]=r}return j=function(){return t},t};function N(t,e){return void 0!==t&&t.length?"string"!==p(t)?function(t,e,r,i){var n=j(),a=i+r;t=~t;for(var s=i;s<a;s++)t=t>>>8^n[255&(t^e[s])];return~t}(0|e,t,t.length,0):function(t,e,r,i){var n=j(),a=i+r;t=~t;for(var s=i;s<a;s++)t=t>>>8^n[255&(t^e.charCodeAt(s))];return~t}(0|e,t,t.length,0):0}var R=function(t){function e(){t.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.processChunk=function(t){this.streamInfo.crc32=N(t.data,this.streamInfo.crc32||0),this.push(t)},e}(k),T=function(t,e,r,i,n){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=i,this.compressedContent=n};T.prototype.getContentWorker=function(){var e=new D(t.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new U("data_length")),r=this;return e.on("end",(function(){if(this.streamInfo.data_length!==r.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},T.prototype.getCompressedWorker=function(){return new D(t.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)},T.createWorkerFrom=function(t,e,r){return t.pipe(new R).pipe(new U("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new U("compressedSize")).withStreamInfo("compression",e)};var W=function(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};W.prototype.internalStream=function(t){var e=null,r="string";try{if(!t)throw new Error("No output type specified.");var i="string"===(r=t.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),e=this._decompressWorker();var n=!this._dataBinary;n&&!i&&(e=e.pipe(new A)),!n&&i&&(e=e.pipe(new C))}catch(t){(e=new k("error")).error(t)}return new P(e,r,"")},W.prototype.async=function(t,e){return this.internalStream(t).accumulate(e)},W.prototype._compressWorker=function(t,e){if(this._data instanceof T&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new A)),T.createWorkerFrom(r,t,e)},W.prototype._decompressWorker=function(){return this._data instanceof T?this._data.getContentWorker():this._data instanceof k?this._data:new D(this._data)};var L=-2;function Z(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function M(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)Z(r,i)&&(t[i]=r[i])}}return t}function K(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)}var H={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+i),n);else for(var a=0;a<i;a++)t[n+a]=e[r+a]},flattenChunks:function(t){var e,r,i,n,a,s;for(i=0,e=0,r=t.length;e<r;e++)i+=t[e].length;for(s=new Uint8Array(i),n=0,e=0,r=t.length;e<r;e++)a=t[e],s.set(a,n),n+=a.length;return s},Buf8:function(t){return new Uint8Array(t)},Buf16:function(t){return new Uint16Array(t)},Buf32:function(t){return new Int32Array(t)}},J={arraySet:function(t,e,r,i,n){for(var a=0;a<i;a++)t[n+a]=e[r+a]},flattenChunks:function(t){return[].concat.apply([],t)},Buf8:function(t){return new Array(t)},Buf16:function(t){return new Array(t)},Buf32:function(t){return new Array(t)}},X=function(){var t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;return X=function(){return t},t},Y=function(t,e,r,i,n){return(Y=X()?H.arraySet:J.arraySet)(t,e,r,i,n)},q=function(t){return(q=X()?H.flattenChunks:J.flattenChunks)(t)},G=function(t){return(G=X()?H.Buf8:J.Buf8)(t)},Q=function(t){return(Q=X()?H.Buf16:J.Buf16)(t)},V=function(t){return(V=X()?H.Buf32:J.Buf32)(t)},$=function(){var t=!0;try{String.fromCharCode.apply(null,[0])}catch(e){t=!1}return $=function(){return t},t},tt=function(){var t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}return tt=function(){return t},t},et=function(t){for(var e=G(256),r=0;r<256;r++)e[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;return e[254]=e[254]=1,et=function(t){return e[t]},e[t]};function rt(t){var e,r,i,n,a,s=t.length,o=0;for(n=0;n<s;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<s&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(o),a=0,n=0;a<o;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<s&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),r<128?e[a++]=r:r<2048?(e[a++]=192|r>>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e}function it(t,e){if(e<65534&&(t.subarray&&tt()||!t.subarray&&$()))return String.fromCharCode.apply(null,K(t,e));for(var r="",i=0;i<e;i++)r+=String.fromCharCode(t[i]);return r}function nt(t,e){var r,i,n,a,s=e||t.length,o=new Array(2*s);for(i=0,r=0;r<s;)if((n=t[r++])<128)o[i++]=n;else if((a=et(n))>4)o[i++]=65533,r+=a-1;else{for(n&=2===a?31:3===a?15:7;a>1&&r<s;)n=n<<6|63&t[r++],a--;a>1?o[i++]=65533:n<65536?o[i++]=n:(n-=65536,o[i++]=55296|n>>10&1023,o[i++]=56320|1023&n)}return it(o,i)}function at(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+et(t[r])>e?r:e}function st(t,e,r,i){for(var n=65535&t,a=t>>>16&65535,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{a=a+(n=n+e[i++]|0)|0}while(--s);n%=65521,a%=65521}return n|a<<16}var ot=function(){var t=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();return ot=function(){return t},t};function ht(t,e,r,i){var n=ot(),a=i+r;t^=-1;for(var s=i;s<a;s++)t=t>>>8^n[255&(t^e[s])];return~t}function lt(t,e){var r,i,n,a,s,o,h,l,d,u,c,f,p,m,_,g,y,v,w,b,k,x,z,S,C;r=t.state,i=t.next_in,S=t.input,n=i+(t.avail_in-5),a=t.next_out,C=t.output,s=a-(e-t.avail_out),o=a+(t.avail_out-257),h=r.dmax,l=r.wsize,d=r.whave,u=r.wnext,c=r.window,f=r.hold,p=r.bits,m=r.lencode,_=r.distcode,g=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;t:do{p<15&&(f+=S[i++]<<p,p+=8,f+=S[i++]<<p,p+=8),v=m[f&g];e:for(;;){if(f>>>=w=v>>>24,p-=w,0===(w=v>>>16&255))C[a++]=65535&v;else{if(!(16&w)){if(64&w){if(32&w){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}v=m[(65535&v)+(f&(1<<w)-1)];continue e}for(b=65535&v,(w&=15)&&(p<w&&(f+=S[i++]<<p,p+=8),b+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=S[i++]<<p,p+=8,f+=S[i++]<<p,p+=8),v=_[f&y];;){if(f>>>=w=v>>>24,p-=w,16&(w=v>>>16&255)){if(k=65535&v,p<(w&=15)&&(f+=S[i++]<<p,(p+=8)<w&&(f+=S[i++]<<p,p+=8)),(k+=f&(1<<w)-1)>h){t.msg="invalid distance too far back",r.mode=30;break t}if(f>>>=w,p-=w,k>(w=a-s)){if((w=k-w)>d&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(x=0,z=c,0===u){if(x+=l-w,w<b){b-=w;do{C[a++]=c[x++]}while(--w);x=a-k,z=C}}else if(u<w){if(x+=l+u-w,(w-=u)<b){b-=w;do{C[a++]=c[x++]}while(--w);if(x=0,u<b){b-=w=u;do{C[a++]=c[x++]}while(--w);x=a-k,z=C}}}else if(x+=u-w,w<b){b-=w;do{C[a++]=c[x++]}while(--w);x=a-k,z=C}for(;b>2;)C[a++]=z[x++],C[a++]=z[x++],C[a++]=z[x++],b-=3;b&&(C[a++]=z[x++],b>1&&(C[a++]=z[x++]))}else{x=a-k;do{C[a++]=C[x++],C[a++]=C[x++],C[a++]=C[x++],b-=3}while(b>2);b&&(C[a++]=C[x++],b>1&&(C[a++]=C[x++]))}break}if(64&w){t.msg="invalid distance code",r.mode=30;break t}v=_[(65535&v)+(f&(1<<w)-1)]}}break}}while(i<n&&a<o);i-=b=p>>3,f&=(1<<(p-=b<<3))-1,t.next_in=i,t.next_out=a,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=a<o?o-a+257:257-(a-o),r.hold=f,r.bits=p}var dt=15,ut=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],ct=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],ft=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],pt=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function mt(t,e,r,i,n,a,s,o){var h,l,d,u,c,f,p,m,_,g=o.bits,y=0,v=0,w=0,b=0,k=0,x=0,z=0,S=0,C=0,A=0,O=null,I=0,E=Q(16),P=Q(16),F=null,B=0;for(y=0;y<=dt;y++)E[y]=0;for(v=0;v<i;v++)E[e[r+v]]++;for(k=g,b=dt;b>=1&&0===E[b];b--);if(k>b&&(k=b),0===b)return n[a++]=20971520,n[a++]=20971520,o.bits=1,0;for(w=1;w<b&&0===E[w];w++);for(k<w&&(k=w),S=1,y=1;y<=dt;y++)if(S<<=1,(S-=E[y])<0)return-1;if(S>0&&(0===t||1!==b))return-1;for(P[1]=0,y=1;y<dt;y++)P[y+1]=P[y]+E[y];for(v=0;v<i;v++)0!==e[r+v]&&(s[P[e[r+v]]++]=v);if(0===t?(O=F=s,f=19):1===t?(O=ut,I-=257,F=ct,B-=257,f=256):(O=ft,F=pt,f=-1),A=0,v=0,y=w,c=a,x=k,z=0,d=-1,u=(C=1<<k)-1,1===t&&C>852||2===t&&C>592)return 1;for(;;){p=y-z,s[v]<f?(m=0,_=s[v]):s[v]>f?(m=F[B+s[v]],_=O[I+s[v]]):(m=96,_=0),h=1<<y-z,w=l=1<<x;do{n[c+(A>>z)+(l-=h)]=p<<24|m<<16|_}while(0!==l);for(h=1<<y-1;A&h;)h>>=1;if(0!==h?(A&=h-1,A+=h):A=0,v++,0==--E[y]){if(y===b)break;y=e[r+s[v]]}if(y>k&&(A&u)!==d){for(0===z&&(z=k),c+=w,S=1<<(x=y-z);x+z<b&&!((S-=E[x+z])<=0);)x++,S<<=1;if(C+=1<<x,1===t&&C>852||2===t&&C>592)return 1;n[d=A&u]=k<<24|x<<16|c-a}}return 0!==A&&(n[c+A]=y-z<<24|64<<16),o.bits=k,0}var _t=-2,gt=12,yt=30;function vt(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function wt(){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=Q(320),this.work=Q(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function bt(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,function(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=V(852),e.distcode=e.distdyn=V(592),e.sane=1,e.back=-1,0):_t}(t)):_t}function kt(t,e){var r,i;return t?(i=new wt,t.state=i,i.window=null,r=function(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_t:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,bt(t))):_t}(t,e),0!==r&&(t.state=null),r):_t}var xt,zt,St=!0;function Ct(t){if(St){var e;for(xt=V(512),zt=V(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(mt(1,t.lens,0,288,xt,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;mt(2,t.lens,0,32,zt,0,t.work,{bits:5}),St=!1}t.lencode=xt,t.lenbits=9,t.distcode=zt,t.distbits=5}function At(t,e,r,i){var n,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=G(a.wsize)),i>=a.wsize?(Y(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((n=a.wsize-a.wnext)>i&&(n=i),Y(a.window,e,r-i,n,a.wnext),(i-=n)?(Y(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function Ot(t,e){var r,i,n,a,s,o,h,l,d,u,c,f,p,m,_,g,y,v,w,b,k,x,z,S,C=0,A=G(4),O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return _t;(r=t.state).mode===gt&&(r.mode=13),s=t.next_out,n=t.output,h=t.avail_out,a=t.next_in,i=t.input,o=t.avail_in,l=r.hold,d=r.bits,u=o,c=h,x=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;d<16;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}if(2&r.wrap&&35615===l){r.check=0,A[0]=255&l,A[1]=l>>>8&255,r.check=ht(r.check,A,2,0),l=0,d=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&l)<<8)+(l>>8))%31){t.msg="incorrect header check",r.mode=yt;break}if(8!=(15&l)){t.msg="unknown compression method",r.mode=yt;break}if(d-=4,k=8+(15&(l>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){t.msg="invalid window size",r.mode=yt;break}r.dmax=1<<k,t.adler=r.check=1,r.mode=512&l?10:gt,l=0,d=0;break;case 2:for(;d<16;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}if(r.flags=l,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=yt;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=yt;break}r.head&&(r.head.text=l>>8&1),512&r.flags&&(A[0]=255&l,A[1]=l>>>8&255,r.check=ht(r.check,A,2,0)),l=0,d=0,r.mode=3;case 3:for(;d<32;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}r.head&&(r.head.time=l),512&r.flags&&(A[0]=255&l,A[1]=l>>>8&255,A[2]=l>>>16&255,A[3]=l>>>24&255,r.check=ht(r.check,A,4,0)),l=0,d=0,r.mode=4;case 4:for(;d<16;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}r.head&&(r.head.xflags=255&l,r.head.os=l>>8),512&r.flags&&(A[0]=255&l,A[1]=l>>>8&255,r.check=ht(r.check,A,2,0)),l=0,d=0,r.mode=5;case 5:if(1024&r.flags){for(;d<16;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}r.length=l,r.head&&(r.head.extra_len=l),512&r.flags&&(A[0]=255&l,A[1]=l>>>8&255,r.check=ht(r.check,A,2,0)),l=0,d=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((f=r.length)>o&&(f=o),f&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Y(r.head.extra,i,a,f,k)),512&r.flags&&(r.check=ht(r.check,i,f,a)),o-=f,a+=f,r.length-=f),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break t;f=0;do{k=i[a+f++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k))}while(k&&f<o);if(512&r.flags&&(r.check=ht(r.check,i,f,a)),o-=f,a+=f,k)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===o)break t;f=0;do{k=i[a+f++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k))}while(k&&f<o);if(512&r.flags&&(r.check=ht(r.check,i,f,a)),o-=f,a+=f,k)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;d<16;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}if(l!==(65535&r.check)){t.msg="header crc mismatch",r.mode=yt;break}l=0,d=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=gt;break;case 10:for(;d<32;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}t.adler=r.check=vt(l),l=0,d=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=o,r.hold=l,r.bits=d,2;t.adler=r.check=1,r.mode=gt;case gt:case 13:if(r.last){l>>>=7&d,d-=7&d,r.mode=27;break}for(;d<3;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}switch(r.last=1&l,d-=1,3&(l>>>=1)){case 0:r.mode=14;break;case 1:Ct(r),r.mode=20;break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=yt}l>>>=2,d-=2;break;case 14:for(l>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}if((65535&l)!=(l>>>16^65535)){t.msg="invalid stored block lengths",r.mode=yt;break}r.length=65535&l,l=0,d=0,r.mode=15;case 15:r.mode=16;case 16:if(f=r.length){if(f>o&&(f=o),f>h&&(f=h),0===f)break t;Y(n,i,a,f,s),o-=f,a+=f,h-=f,s+=f,r.length-=f;break}r.mode=gt;break;case 17:for(;d<14;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}if(r.nlen=257+(31&l),l>>>=5,d-=5,r.ndist=1+(31&l),l>>>=5,d-=5,r.ncode=4+(15&l),l>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=yt;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;d<3;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}r.lens[O[r.have++]]=7&l,l>>>=3,d-=3}for(;r.have<19;)r.lens[O[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,z={bits:r.lenbits},x=mt(0,r.lens,0,19,r.lencode,0,r.work,z),r.lenbits=z.bits,x){t.msg="invalid code lengths set",r.mode=yt;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;g=(C=r.lencode[l&(1<<r.lenbits)-1])>>>16&255,y=65535&C,!((_=C>>>24)<=d);){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}if(y<16)l>>>=_,d-=_,r.lens[r.have++]=y;else{if(16===y){for(S=_+2;d<S;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}if(l>>>=_,d-=_,0===r.have){t.msg="invalid bit length repeat",r.mode=yt;break}k=r.lens[r.have-1],f=3+(3&l),l>>>=2,d-=2}else if(17===y){for(S=_+3;d<S;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}d-=_,k=0,f=3+(7&(l>>>=_)),l>>>=3,d-=3}else{for(S=_+7;d<S;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}d-=_,k=0,f=11+(127&(l>>>=_)),l>>>=7,d-=7}if(r.have+f>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=yt;break}for(;f--;)r.lens[r.have++]=k}}if(r.mode===yt)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=yt;break}if(r.lenbits=9,z={bits:r.lenbits},x=mt(1,r.lens,0,r.nlen,r.lencode,0,r.work,z),r.lenbits=z.bits,x){t.msg="invalid literal/lengths set",r.mode=yt;break}if(r.distbits=6,r.distcode=r.distdyn,z={bits:r.distbits},x=mt(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,z),r.distbits=z.bits,x){t.msg="invalid distances set",r.mode=yt;break}r.mode=20;case 20:r.mode=21;case 21:if(o>=6&&h>=258){t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=o,r.hold=l,r.bits=d,lt(t,c),s=t.next_out,n=t.output,h=t.avail_out,a=t.next_in,i=t.input,o=t.avail_in,l=r.hold,d=r.bits,r.mode===gt&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[l&(1<<r.lenbits)-1])>>>16&255,y=65535&C,!((_=C>>>24)<=d);){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}if(g&&!(240&g)){for(v=_,w=g,b=y;g=(C=r.lencode[b+((l&(1<<v+w)-1)>>v)])>>>16&255,y=65535&C,!(v+(_=C>>>24)<=d);){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}l>>>=v,d-=v,r.back+=v}if(l>>>=_,d-=_,r.back+=_,r.length=y,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=gt;break}if(64&g){t.msg="invalid literal/length code",r.mode=yt;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(S=r.extra;d<S;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}r.length+=l&(1<<r.extra)-1,l>>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[l&(1<<r.distbits)-1])>>>16&255,y=65535&C,!((_=C>>>24)<=d);){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}if(!(240&g)){for(v=_,w=g,b=y;g=(C=r.distcode[b+((l&(1<<v+w)-1)>>v)])>>>16&255,y=65535&C,!(v+(_=C>>>24)<=d);){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}l>>>=v,d-=v,r.back+=v}if(l>>>=_,d-=_,r.back+=_,64&g){t.msg="invalid distance code",r.mode=yt;break}r.offset=y,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(S=r.extra;d<S;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}r.offset+=l&(1<<r.extra)-1,l>>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=yt;break}r.mode=25;case 25:if(0===h)break t;if(f=c-h,r.offset>f){if((f=r.offset-f)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=yt;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),m=r.window}else m=n,p=s-r.offset,f=r.length;f>h&&(f=h),h-=f,r.length-=f;do{n[s++]=m[p++]}while(--f);0===r.length&&(r.mode=21);break;case 26:if(0===h)break t;n[s++]=r.length,h--,r.mode=21;break;case 27:if(r.wrap){for(;d<32;){if(0===o)break t;o--,l|=i[a++]<<d,d+=8}if(c-=h,t.total_out+=c,r.total+=c,c&&(t.adler=r.check=r.flags?ht(r.check,n,c,s-c):st(r.check,n,c,s-c)),c=h,(r.flags?l:vt(l))!==r.check){t.msg="incorrect data check",r.mode=yt;break}l=0,d=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;d<32;){if(0===o)break t;o--,l+=i[a++]<<d,d+=8}if(l!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=yt;break}l=0,d=0}r.mode=29;case 29:x=1;break t;case yt:x=-3;break t;case 31:return-4;default:return _t}return t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=o,r.hold=l,r.bits=d,(r.wsize||c!==t.avail_out&&r.mode<yt&&(r.mode<27||4!==e))&&At(t,t.output,t.next_out,c-t.avail_out),u-=t.avail_in,c-=t.avail_out,t.total_in+=u,t.total_out+=c,r.total+=c,r.wrap&&c&&(t.adler=r.check=r.flags?ht(r.check,n,c,t.next_out-c):st(r.check,n,c,t.next_out-c)),t.data_type=r.bits+(r.last?64:0)+(r.mode===gt?128:0)+(20===r.mode||15===r.mode?256:0),(0===u&&0===c||4===e)&&0===x&&(x=-5),x}function It(t,e){var r,i=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?_t:11===r.mode&&st(1,e,i,0)!==r.check?-3:At(t,e,i,i)?(r.mode=31,-4):(r.havedict=1,0):_t}var Et={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 Pt(){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}function Ft(){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}var Bt=Object.prototype.toString,Dt=function t(e){if(!(this instanceof t))return new t(e);this.options=M({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,0===r.windowBits&&(r.windowBits=-15)),!(r.windowBits>=0&&r.windowBits<16)||e&&e.windowBits||(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(15&r.windowBits||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Pt,this.strm.avail_out=0;var i,n,a,s=kt(this.strm,r.windowBits);if(0!==s)throw new Error(Et[s]);if(this.header=new Ft,i=this.strm,n=this.header,i&&i.state&&2&(a=i.state).wrap&&(a.head=n,n.done=!1),r.dictionary&&("string"==typeof r.dictionary?r.dictionary=rt(r.dictionary):"[object ArrayBuffer]"===Bt.call(r.dictionary)&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&0!==(s=It(this.strm,r.dictionary))))throw new Error(Et[s])};function Ut(t){for(var e=t.length;--e>=0;)t[e]=0}Dt.prototype.push=function(t,e){var r,i,n,a,s,o,h=this.strm,l=this.options.chunkSize,d=this.options.dictionary,u=!1;if(this.ended)return!1;i=e===~~e?e:!0===e?4:0,"string"==typeof t?h.input=function(t){for(var e=new Uint8Array(t.length),r=0,i=e.length;r<i;r++)e[r]=t.charCodeAt(r);return e}(t):"[object ArrayBuffer]"===Bt.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=G(l),h.next_out=0,h.avail_out=l),2===(r=Ot(h,0))&&d&&(o="string"==typeof d?rt(d):"[object ArrayBuffer]"===Bt.call(d)?new Uint8Array(d):d,r=It(this.strm,o)),-5===r&&!0===u&&(r=0,u=!1),1!==r&&0!==r)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&1!==r&&(0!==h.avail_in||4!==i&&2!==i)||("string"===this.options.to?(n=at(h.output,h.next_out),a=h.next_out-n,s=nt(h.output,n),h.next_out=a,h.avail_out=l-a,a&&Y(h.output,h.output,n,a,0),this.onData(s)):this.onData(K(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(u=!0)}while((h.avail_in>0||0===h.avail_out)&&1!==r);return 1===r&&(i=4),4===i?(r=function(t){if(!t||!t.state)return _t;var e=t.state;return e.window&&(e.window=null),t.state=null,0}(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==i||(this.onEnd(0),h.avail_out=0,!0)},Dt.prototype.onData=function(t){this.chunks.push(t)},Dt.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=q(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var jt,Nt,Rt,Tt,Wt,Lt,Zt,Mt,Kt,Ht=256,Jt=286,Xt=30,Yt=15,qt=[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],Gt=[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],Qt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Vt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function $t(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function te(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function ee(t){return t<256?Rt[t]:Rt[256+(t>>>7)]}function re(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function ie(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,re(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function ne(t,e,r){ie(t,r[2*e],r[2*e+1])}function ae(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function se(t,e,r){var i,n,a=new Array(16),s=0;for(i=1;i<=Yt;i++)a[i]=s=s+r[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=ae(a[o]++,o))}}function oe(t){var e;for(e=0;e<Jt;e++)t.dyn_ltree[2*e]=0;for(e=0;e<Xt;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function he(t){t.bi_valid>8?re(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function le(t,e,r,i){var n=2*e,a=2*r;return t[n]<t[a]||t[n]===t[a]&&i[e]<=i[r]}function de(t,e,r){for(var i=t.heap[r],n=r<<1;n<=t.heap_len&&(n<t.heap_len&&le(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!le(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i}function ue(t,e,r){var i,n,a,s,o=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],n=t.pending_buf[t.l_buf+o],o++,0===i?ne(t,n,e):(ne(t,(a=Tt[n])+Ht+1,e),0!==(s=qt[a])&&ie(t,n-=Wt[a],s),ne(t,a=ee(--i),r),0!==(s=Gt[a])&&ie(t,i-=Lt[a],s))}while(o<t.last_lit);ne(t,256,e)}function ce(t,e){var r,i,n,a=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<h;r++)0!==a[2*r]?(t.heap[++t.heap_len]=l=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)a[2*(n=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[n]=0,t.opt_len--,o&&(t.static_len-=s[2*n+1]);for(e.max_code=l,r=t.heap_len>>1;r>=1;r--)de(t,a,r);n=h;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],de(t,a,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,a[2*n]=a[2*r]+a[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,a[2*r+1]=a[2*i+1]=n,t.heap[1]=n++,de(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,a,s,o,h=e.dyn_tree,l=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,c=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(a=0;a<=Yt;a++)t.bl_count[a]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(a=h[2*h[2*(i=t.heap[r])+1]+1]+1)>p&&(a=p,m++),h[2*i+1]=a,i>l||(t.bl_count[a]++,s=0,i>=f&&(s=c[i-f]),o=h[2*i],t.opt_len+=o*(a+s),u&&(t.static_len+=o*(d[2*i+1]+s)));if(0!==m){do{for(a=p-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(i=t.bl_count[a];0!==i;)(n=t.heap[--r])>l||(h[2*n+1]!==a&&(t.opt_len+=(a-h[2*n+1])*h[2*n],h[2*n+1]=a),i--)}}(t,e),se(a,l,t.bl_count)}function fe(t,e,r){var i,n,a=-1,s=e[1],o=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=s,s=e[2*(i+1)+1],++o<h&&n===s||(o<l?t.bl_tree[2*n]+=o:0!==n?(n!==a&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,a=n,0===s?(h=138,l=3):n===s?(h=6,l=3):(h=7,l=4))}function pe(t,e,r){var i,n,a=-1,s=e[1],o=0,h=7,l=4;for(0===s&&(h=138,l=3),i=0;i<=r;i++)if(n=s,s=e[2*(i+1)+1],!(++o<h&&n===s)){if(o<l)do{ne(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==a&&(ne(t,n,t.bl_tree),o--),ne(t,16,t.bl_tree),ie(t,o-3,2)):o<=10?(ne(t,17,t.bl_tree),ie(t,o-3,3)):(ne(t,18,t.bl_tree),ie(t,o-11,7));o=0,a=n,0===s?(h=138,l=3):n===s?(h=6,l=3):(h=7,l=4)}}var me=!1;function _e(t){me||(!function(){var t,e,r,i,n,a=new Array(16);for(Ut(jt=new Array(576)),Ut(Nt=new Array(60)),Ut(Rt=new Array(512)),Ut(Tt=new Array(256)),Ut(Wt=new Array(29)),Ut(Lt=new Array(Xt)),r=0,i=0;i<28;i++)for(Wt[i]=r,t=0;t<1<<qt[i];t++)Tt[r++]=i;for(Tt[r-1]=i,n=0,i=0;i<16;i++)for(Lt[i]=n,t=0;t<1<<Gt[i];t++)Rt[n++]=i;for(n>>=7;i<Xt;i++)for(Lt[i]=n<<7,t=0;t<1<<Gt[i]-7;t++)Rt[256+n++]=i;for(e=0;e<=Yt;e++)a[e]=0;for(t=0;t<=143;)jt[2*t+1]=8,t++,a[8]++;for(;t<=255;)jt[2*t+1]=9,t++,a[9]++;for(;t<=279;)jt[2*t+1]=7,t++,a[7]++;for(;t<=287;)jt[2*t+1]=8,t++,a[8]++;for(se(jt,287,a),t=0;t<Xt;t++)Nt[2*t+1]=5,Nt[2*t]=ae(t,5);Zt=new $t(jt,qt,257,Jt,Yt),Mt=new $t(Nt,Gt,0,Xt,Yt),Kt=new $t(new Array(0),Qt,0,19,7)}(),me=!0),t.l_desc=new te(t.dyn_ltree,Zt),t.d_desc=new te(t.dyn_dtree,Mt),t.bl_desc=new te(t.bl_tree,Kt),t.bi_buf=0,t.bi_valid=0,oe(t)}function ge(t,e,r,i){ie(t,0+(i?1:0),3),function(t,e,r){he(t),re(t,r),re(t,~r),Y(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r)}function ye(t){ie(t,2,3),ne(t,256,jt),function(t){16===t.bi_valid?(re(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}function ve(t,e,r,i){var n,a,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<Ht;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),ce(t,t.l_desc),ce(t,t.d_desc),s=function(t){var e;for(fe(t,t.dyn_ltree,t.l_desc.max_code),fe(t,t.dyn_dtree,t.d_desc.max_code),ce(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*Vt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(a=t.static_len+3+7>>>3)<=n&&(n=a)):n=a=r+5,r+4<=n&&-1!==e?ge(t,e,r,i):4===t.strategy||a===n?(ie(t,2+(i?1:0),3),ue(t,jt,Nt)):(ie(t,4+(i?1:0),3),function(t,e,r,i){var n;for(ie(t,e-257,5),ie(t,r-1,5),ie(t,i-4,4),n=0;n<i;n++)ie(t,t.bl_tree[2*Vt[n]+1],3);pe(t,t.dyn_ltree,e-1),pe(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),ue(t,t.dyn_ltree,t.dyn_dtree)),oe(t),i&&he(t)}function we(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(Tt[r]+Ht+1)]++,t.dyn_dtree[2*ee(e)]++),t.last_lit===t.lit_bufsize-1}var be=258,ke=262,xe=103,ze=113,Se=666;function Ce(t,e){return t.msg=Et[e],e}function Ae(t){return(t<<1)-(t>4?9:0)}function Oe(t){for(var e=t.length;--e>=0;)t[e]=0}function Ie(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(Y(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function Ee(t,e){ve(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Ie(t.strm)}function Pe(t,e){t.pending_buf[t.pending++]=e}function Fe(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function Be(t,e){var r,i,n=t.max_chain_length,a=t.strstart,s=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-ke?t.strstart-(t.w_size-ke):0,l=t.window,d=t.w_mask,u=t.prev,c=t.strstart+be,f=l[a+s-1],p=l[a+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(l[(r=e)+s]===p&&l[r+s-1]===f&&l[r]===l[a]&&l[++r]===l[a+1]){a+=2,r++;do{}while(l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&a<c);if(i=be-(c-a),a=c-be,i>s){if(t.match_start=e,s=i,i>=o)break;f=l[a+s-1],p=l[a+s]}}}while((e=u[e&d])>h&&0!=--n);return s<=t.lookahead?s:t.lookahead}function De(t){var e,r,i,n,a,s,o,h,l,d,u=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=u+(u-ke)){Y(t.window,t.window,u,u,0),t.match_start-=u,t.strstart-=u,t.block_start-=u,e=r=t.hash_size;do{i=t.head[--e],t.head[e]=i>=u?i-u:0}while(--r);e=r=u;do{i=t.prev[--e],t.prev[e]=i>=u?i-u:0}while(--r);n+=u}if(0===t.strm.avail_in)break;if(s=t.strm,o=t.window,h=t.strstart+t.lookahead,l=n,d=void 0,(d=s.avail_in)>l&&(d=l),r=0===d?0:(s.avail_in-=d,Y(o,s.input,s.next_in,d,h),1===s.state.wrap?s.adler=st(s.adler,o,d,h):2===s.state.wrap&&(s.adler=ht(s.adler,o,d,h)),s.next_in+=d,s.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+3-1])&t.hash_mask,t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ke&&0!==t.strm.avail_in)}function Ue(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(De(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,Ee(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ke&&(Ee(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Ee(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Ee(t,!1),t.strm.avail_out),1)}function je(t,e){for(var r,i;;){if(t.lookahead<ke){if(De(t),t.lookahead<ke&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-ke&&(t.match_length=Be(t,r)),t.match_length>=3)if(i=we(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=we(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(Ee(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Ee(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ee(t,!1),0===t.strm.avail_out)?1:2}function Ne(t,e){for(var r,i,n;;){if(t.lookahead<ke){if(De(t),t.lookahead<ke&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-ke&&(t.match_length=Be(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=we(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(Ee(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((i=we(t,0,t.window[t.strstart-1]))&&Ee(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=we(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Ee(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ee(t,!1),0===t.strm.avail_out)?1:2}function Re(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}var Te=function(){var t=[new Re(0,0,0,0,Ue),new Re(4,4,8,4,je),new Re(4,5,16,8,je),new Re(4,6,32,32,je),new Re(4,4,16,16,Ne),new Re(8,16,32,32,Ne),new Re(8,16,128,128,Ne),new Re(8,32,128,256,Ne),new Re(32,128,258,1024,Ne),new Re(32,258,258,4096,Ne)];return Te=function(){return t},t};function We(){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=8,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=Q(1146),this.dyn_dtree=Q(122),this.bl_tree=Q(78),Oe(this.dyn_ltree),Oe(this.dyn_dtree),Oe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=Q(16),this.heap=Q(573),Oe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=Q(573),Oe(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 Le(t){var e=function(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:ze,t.adler=2===e.wrap?0:1,e.last_flush=0,_e(e),0):Ce(t,L)}(t);return 0===e&&function(t){t.window_size=2*t.w_size,Oe(t.head);var e=Te();t.max_lazy_match=e[t.level].max_lazy,t.good_match=e[t.level].good_length,t.nice_match=e[t.level].nice_length,t.max_chain_length=e[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0}(t.state),e}function Ze(t,e){var r,i,n,a;if(!t||!t.state||e>5||e<0)return t?Ce(t,L):L;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===Se&&4!==e)return Ce(t,0===t.avail_out?-5:L);if(i.strm=t,r=i.last_flush,i.last_flush=e