UNPKG

@mertdeveci55/univer-import-export

Version:

Excel/CSV import and export library for Univer spreadsheets with full format preservation

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