├── README.md ├── index.html ├── filesaver.min.js └── zip.min.js /README.md: -------------------------------------------------------------------------------- 1 | # browser-bookmarks-to-url-files 2 | 3 | Convert .html bookmark export to an archive of .url files 4 | 5 | Works with Chrome and Firefox ig 6 | 7 | ![Screenshot 2021-12-29 212606](https://user-images.githubusercontent.com/39745401/147692435-8e94b0a0-14da-4517-b455-99c8c5bf8ba9.png) 8 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | URL script generator 6 | 7 | 8 | 9 | 10 |
11 |

Open the .html file exported by Chrome

12 | 13 |

Next, press this button to download an archive contatining your shortcuts

14 | 15 | 16 |
17 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /filesaver.min.js: -------------------------------------------------------------------------------- 1 | (function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,"undefined"!=typeof module&&(module.exports=g)}); 2 | 3 | //# sourceMappingURL=FileSaver.min.js.map -------------------------------------------------------------------------------- /zip.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},n=Object.assign({},e);function i(){return n}function r(t){if(void 0!==t.chunkSize&&(n.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(n.maxWorkers=t.maxWorkers),void 0!==t.terminateWorkerTimeout&&(n.terminateWorkerTimeout=t.terminateWorkerTimeout),void 0!==t.useWebWorkers&&(n.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(n.Deflate=t.Deflate),void 0!==t.Inflate&&(n.Inflate=t.Inflate),void 0!==t.workerScripts){if(t.workerScripts.deflate){if(!Array.isArray(t.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");n.workerScripts||(n.workerScripts={}),n.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!Array.isArray(t.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");n.workerScripts||(n.workerScripts={}),n.workerScripts.inflate=t.workerScripts.inflate}}}function a(t,e,n){return class{constructor(i){const r=this;r.codec=new t(Object.assign({},e,i)),n(r.codec,(t=>{if(r.pendingData){const e=r.pendingData;r.pendingData=new Uint8Array(e.length+t.length),r.pendingData.set(e,0),r.pendingData.set(t,e.length)}else r.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),i(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),i(this)}};function i(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const s=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;s[t]=e}class o{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^s[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const l={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=l.getPartial(n);return 32===i?t.concat(e):l._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+l.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=l.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=l.getPartial(r);return i.push(l.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},c={bytes:{fromBits(t){const e=l.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const a=new Uint32Array(n);let s=0;for(let t=e.blockSize+i-(e.blockSize+i&e.blockSize-1);t<=r;t+=e.blockSize)e._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),e},finalize:function(){const t=this;let e=t._buffer;const n=t._h;e=l.concat(e,[l.partial(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(t,e,n,i){return t<=19?e&n|~e&i:t<=39?e^n^i:t<=59?e&n|e&i|n&i:t<=79?e^n^i:void 0},_S:function(t,e){return e<>>32-t},_block:function(t){const e=this,n=e._h,i=Array(80);for(let e=0;e<16;e++)i[e]=t[e];let r=n[0],a=n[1],s=n[2],o=n[3],l=n[4];for(let t=0;t<=79;t++){t>=16&&(i[t]=e._S(1,i[t-3]^i[t-8]^i[t-14]^i[t-16]));const n=e._S(5,r)+e._f(t,a,s,o)+l+i[t]+e._key[Math.floor(t/20)]|0;l=o,o=s,s=e._S(30,a),a=r,r=n}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0}};const u={aes:class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],i=e._tables[1],r=t.length;let a,s,o,l=1;if(4!==r&&6!==r&&8!==r)throw new Error("invalid aes key size");for(e._key=[s=t.slice(0),o=[]],a=r;a<4*r+28;a++){let t=s[a-1];(a%r==0||8===r&&a%r==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,c;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][d]=f=f<<24^f>>>8,e[n][a]=u=u<<24^u>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let u,f,h,p=t[0]^n[0],w=t[e?3:1]^n[1],_=t[2]^n[2],g=t[e?1:3]^n[3],y=4;for(let t=0;t>>24]^o[w>>16&255]^l[_>>8&255]^c[255&g]^n[y],f=s[w>>>24]^o[_>>16&255]^l[g>>8&255]^c[255&p]^n[y+1],h=s[_>>>24]^o[g>>16&255]^l[p>>8&255]^c[255&w]^n[y+2],g=s[g>>>24]^o[p>>16&255]^l[w>>8&255]^c[255&_]^n[y+3],y+=4,p=u,w=f,_=h;for(let t=0;t<4;t++)r[e?3&-t:t]=d[p>>>24]<<24^d[w>>16&255]<<16^d[_>>8&255]<<8^d[255&g]^n[y++],u=p,p=w,w=_,_=g,g=u;return r}}},f={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=l.bitLength(e);for(let r=0;rr&&(t=n.hash(t));for(let e=0;et.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}(n,s-s%w)),o=0;o<=s-w;o+=w){const r=A.toBits(I(e,o,o+w));a&&t.hmac.update(r);const s=t.aesCtrGladman.update(r);a||t.hmac.update(s),n.set(A.fromBits(s),o+i)}return t.pendingInput=I(e,o),n}async function T(t,e,n){const i=(new TextEncoder).encode(e),r=await crypto.subtle.importKey("raw",i,g,!1,b),a=await crypto.subtle.deriveBits(Object.assign({salt:n},y),r,8*(2*x[t.strength]+2)),s=new Uint8Array(a);t.keys={key:A.toBits(I(s,0,x[t.strength])),authentication:A.toBits(I(s,x[t.strength],2*x[t.strength])),passwordVerification:I(s,2*x[t.strength])}}function F(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function I(t,e,n){return t.subarray(e,n)}const B=12;class C{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),H(this,t)}append(t){const e=this;if(e.password){const n=W(e,t.subarray(0,B));if(e.password=null,n[11]!=e.passwordVerification)throw new Error(p);t=t.subarray(B)}return W(e,t)}flush(){return{valid:!0,data:new Uint8Array(0)}}}class M{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),H(this,t)}append(t){const e=this;let n,i;if(e.password){e.password=null;const r=crypto.getRandomValues(new Uint8Array(B));r[11]=e.passwordVerification,n=new Uint8Array(t.length+r.length),n.set(O(e,r),0),i=B}else n=new Uint8Array(t.length),i=0;return n.set(O(e,t),i),n}flush(){return{data:new Uint8Array(0)}}}function W(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function N(t){const e=2|t.keys[2];return P(Math.imul(e,1^e)>>>8)}function P(t){return 255&t}function j(t){return 4294967295&t}const V="deflate",K="inflate",q="Invalid signature";class G{constructor(t,{signature:e,password:n,signed:i,compressed:r,zipCrypto:a,passwordVerification:s,encryptionStrength:l},{chunkSize:c}){const d=Boolean(n);Object.assign(this,{signature:e,encrypted:d,signed:i,compressed:r,inflate:r&&new t({chunkSize:c}),crc32:i&&new o,zipCrypto:a,decrypt:d&&a?new C(n,s):new S(n,i,l)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.inflate.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),t}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.encrypted){const e=t.decrypt.flush();if(!e.valid)throw new Error(q);n=e.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new DataView(new Uint8Array(4).buffer);if(e=t.crc32.get(),n.setUint32(0,e),t.signature!=n.getUint32(0,!1))throw new Error(q)}return t.compressed&&(n=await t.inflate.append(n)||new Uint8Array(0),await t.inflate.flush()),{data:n,signature:e}}}class Z{constructor(t,{encrypted:e,signed:n,compressed:i,level:r,zipCrypto:a,password:s,passwordVerification:l,encryptionStrength:c},{chunkSize:d}){Object.assign(this,{encrypted:e,signed:n,compressed:i,deflate:i&&new t({level:r||5,chunkSize:d}),crc32:n&&new o,zipCrypto:a,encrypt:e&&a?new M(s,l):new D(s,c)})}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.deflate.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),n}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.compressed&&(n=await t.deflate.flush()||new Uint8Array(0)),t.encrypted){n=await t.encrypt.append(n);const i=t.encrypt.flush();e=i.signature;const r=new Uint8Array(n.length+i.data.length);r.set(n,0),r.set(i.data,n.length),n=r}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.crc32.get()),{data:n,signature:e}}}const X="init",Q="append",Y="flush",J="message";let $=!0;var tt=(t,e,n,i,r,a,s)=>(Object.assign(t,{busy:!0,codecConstructor:e,options:Object.assign({},n),scripts:s,terminate(){t.worker&&!t.busy&&(t.worker.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,r(t)}}),a?function(t,e){let n;const i={type:"module"};if(!t.interface){if($)try{t.worker=r()}catch(e){$=!1,t.worker=r(i)}else t.worker=r(i);t.worker.addEventListener(J,o,!1),t.interface={append:t=>a({type:Q,data:t}),flush:()=>a({type:Y})}}return t.interface;function r(e={}){return new Worker(new URL(t.scripts[0],"undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("zip.min.js",document.baseURI).href),e)}async function a(i){if(!n){const n=t.options,i=t.scripts.slice(1);await s({scripts:i,type:X,options:n,config:{chunkSize:e.chunkSize}})}return s(i)}function s(e){const i=t.worker,r=new Promise(((t,e)=>n={resolve:t,reject:e}));try{if(e.data)try{e.data=e.data.buffer,i.postMessage(e,[e.data])}catch(t){i.postMessage(e)}else i.postMessage(e)}catch(e){n.reject(e),n=null,t.onTaskFinished()}return r}function o(e){const i=e.data;if(n){const e=i.error,r=i.type;if(e){const i=new Error(e.message);i.stack=e.stack,n.reject(i),n=null,t.onTaskFinished()}else if(r==X||r==Y||r==Q){const e=i.data;r==Y?(n.resolve({data:new Uint8Array(e),signature:i.signature}),n=null,t.onTaskFinished()):n.resolve(e&&new Uint8Array(e))}}}}(t,i):function(t,e){const n=function(t,e,n){return e.codecType.startsWith(V)?new Z(t,e,n):e.codecType.startsWith(K)?new G(t,e,n):void 0}(t.codecConstructor,t.options,e);return{async append(e){try{return await n.append(e)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await n.flush()}finally{t.onTaskFinished()}}}}(t,i));let et=[],nt=[];function it(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(et.length!t.busy));return s?(rt(s),tt(s,t,e,n,a,i,r)):new Promise((n=>nt.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}function a(t){if(nt.length){const[{resolve:e,codecConstructor:i,options:r,webWorker:s,scripts:o}]=nt.splice(0,1);e(tt(t,i,r,n,a,s,o))}else t.worker?(rt(t),Number.isFinite(n.terminateWorkerTimeout)&&n.terminateWorkerTimeout>=0&&(t.terminateTimeout=setTimeout((()=>{et=et.filter((e=>e!=t)),t.terminate()}),n.terminateWorkerTimeout))):et=et.filter((e=>e!=t))}}function rt(t){t.terminateTimeout&&(clearTimeout(t.terminateTimeout),t.terminateTimeout=null)}const at="Abort error";async function st(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(l=0,c=0){const d=s.signal;if(l{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=()=>r(n.error),n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}}class kt extends mt{constructor(t){super(),this.contentType=t,this.arrayBuffers=[]}async writeUint8Array(t){super.writeUint8Array(t),this.arrayBuffers.push(t.buffer)}getData(){return this.blob||(this.blob=new Blob(this.arrayBuffers,{type:this.contentType})),this.blob}}class vt extends bt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),Rt(this.url)&&!this.preventHeadRequest){const t=await Ut(wt,this.url,this.options);if(this.size=Number(t.headers.get(ft)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(ht)!=gt)throw new Error(dt);void 0===this.size&&await At(this,this.options)}else await At(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await Ut(_t,this.url,this.options,Object.assign({},this.options.headers,{[pt]:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(dt);return new Uint8Array(await n.arrayBuffer())}return this.data||await At(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function At(t,e){const n=await Ut(_t,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function Ut(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(ct+(r.statusText||r.status))}class Et extends bt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),Rt(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>St(wt,this.url,(n=>{this.size=Number(n.getResponseHeader(ft)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(ht)==gt?t():e(new Error(dt)):void 0===this.size?zt(this,this.url).then((()=>t())).catch(e):t()}),e)));await zt(this,this.url)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await new Promise(((n,i)=>St(_t,this.url,(t=>n(t)),i,[[pt,"bytes="+t+"-"+(t+e-1)]])));if(206!=n.status)throw new Error(dt);return new Uint8Array(n.response)}return this.data||await zt(this,this.url),new Uint8Array(this.data.subarray(t,t+e))}}function zt(t,e){return new Promise(((n,i)=>St(_t,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function St(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(ct+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class Dt extends bt{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new Et(t,e):this.reader=new vt(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}function Rt(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const Tt=4294967295,Ft=65535,It=67324752,Bt=134695760,Ct=33639248,Mt=101010256,Wt=101075792,Ot=117853008,Ht=39169,Lt=21589,Nt=2048,Pt="/",jt=new Date(2107,11,31),Vt=new Date(1980,0,1),Kt="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const qt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class Gt{constructor(t){qt.forEach((e=>this[e]=t[e]))}}const Zt="File format is not recognized",Xt="End of central directory not found",Qt="End of Zip64 central directory not found",Yt="End of Zip64 central directory locator not found",Jt="Central directory header not found",$t="Local file header not found",te="Zip64 extra field not found",ee="File contains encrypted entry",ne="Encryption method not supported",ie="Compression method not supported",re="utf-8",ae=["uncompressedSize","compressedSize","offset"];class se{constructor(t,e,n){Object.assign(this,{reader:t,config:e,options:n})}async getData(t,e,n={}){const i=this,{reader:r,offset:a,extraFieldAES:s,compressionMethod:o,config:l,bitFlag:c,signature:d,rawLastModDate:u,compressedSize:f}=i,h=i.localDirectory={};r.initialized||await r.init();let p=await be(r,a,30);const w=ye(p);let _=de(i,n,"password");if(_=_&&_.length&&_,s&&99!=s.originalCompressionMethod)throw new Error(ie);if(0!=o&&8!=o)throw new Error(ie);if(_e(w,0)!=It)throw new Error($t);oe(h,w,4),p=await be(r,a,30+h.filenameLength+h.extraFieldLength),h.rawExtraField=p.subarray(30+h.filenameLength),le(i,h,w,4),e.lastAccessDate=h.lastAccessDate,e.creationDate=h.creationDate;const g=i.encrypted&&h.encrypted,y=g&&!s;if(g){if(!y&&void 0===s.strength)throw new Error(ne);if(!_)throw new Error(ee)}const b=await it(l.Inflate,{codecType:K,password:_,zipCrypto:y,encryptionStrength:s&&s.strength,signed:de(i,n,"checkSignature"),passwordVerification:y&&(c.dataDescriptor?u>>>8&255:d>>>24&255),signature:d,compressed:0!=o,encrypted:g,useWebWorkers:de(i,n,"useWebWorkers")},l);t.initialized||await t.init();const m=de(i,n,"signal"),x=a+30+h.filenameLength+h.extraFieldLength;return await st(b,r,t,x,f,l,{onprogress:n.onprogress,signal:m}),t.getData()}}function oe(t,e,n){const i=t.rawBitFlag=we(e,n+2),r=1==(1&i),a=_e(e,n+6);Object.assign(t,{encrypted:r,version:we(e,n),bitFlag:{level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&Nt)==Nt},rawLastModDate:a,lastModDate:fe(a),filenameLength:we(e,n+22),extraFieldLength:we(e,n+24)})}function le(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=ye(new Uint8Array(r));let o=0;try{for(;oe[t]==Tt));for(let e=0;e{if(e[n]==Tt){if(void 0===t[n])throw new Error(te);e[n]=t[n]}}))}(c,e),e.extraFieldZip64=c);const d=a.get(28789);d&&(ce(d,"filename","rawFilename",e,t),e.extraFieldUnicodePath=d);const u=a.get(25461);u&&(ce(u,"comment","rawComment",e,t),e.extraFieldUnicodeComment=u);const f=a.get(39169);f?(!function(t,e,n){const i=ye(t.data);t.vendorVersion=pe(i,0),t.vendorId=pe(i,2);const r=pe(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=we(i,5)}(f,e,l),e.extraFieldAES=f):e.compressionMethod=l;const h=a.get(10);h&&(!function(t,e){const n=ye(t.data);let i,r=4;try{for(;r{if(t.data.length>=s+4){const o=_e(n,s);e[i]=t[i]=new Date(1e3*o);const l=a[r];t[l]=o}s+=4}))}(p,e),e.extraFieldExtendedTimestamp=p)}function ce(t,e,n,i,r){const a=ye(t.data);t.version=pe(a,0),t.signature=_e(a,1);const s=new o;s.append(r[n]);const l=ye(new Uint8Array(4));l.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==_e(l,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function de(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function ue(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}function he(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function pe(t,e){return t.getUint8(e)}function we(t,e){return t.getUint16(e,!0)}function _e(t,e){return t.getUint32(e,!0)}function ge(t,e){return Number(t.getBigUint64(e,!0))}function ye(t){return new DataView(t.buffer)}function be(t,e,n){return t.readUint8Array(e,n)}const me="File already exists",xe="Zip file comment exceeds 64KB",ke="File entry comment exceeds 64KB",ve="File entry name exceeds 64KB",Ae="Version exceeds 65535",Ue="The strength must equal 1, 2, or 3",Ee="Extra field type exceeds 65535",ze="Extra field data exceeds 64KB",Se="Zip64 is not supported",De=new Uint8Array([7,0,2,0,65,69,3,0,0]);let Re=0;function Te(t,e,n){if(t.arrayBuffer)return e||n?t.slice(e,n).arrayBuffer():t.arrayBuffer();{const i=new FileReader;return new Promise(((r,a)=>{i.onload=t=>r(t.target.result),i.onerror=()=>a(i.error),i.readAsArrayBuffer(e||n?t.slice(e,n):t)}))}}function Fe(t){if(t)return(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4)}function Ie(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Be(t,e,n){t.setUint8(e,n)}function Ce(t,e,n){t.setUint16(e,n,!0)}function Me(t,e,n){t.setUint32(e,n,!0)}function We(t,e,n){t.setBigUint64(e,n,!0)}function Oe(t,e,n){t.set(e,n)}function He(t){return new DataView(t.buffer)}(()=>{if("function"==typeof URL.createObjectURL){const t='\n\t\t\t\n\nconst t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n;}class e{constructor(t){this.crc=t||-1;}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n;}get(){return ~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],a=n.getPartial(i);return 32===a?t.concat(e):n._shiftRight(e,a,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,a){for(void 0===a&&(a=[]);e>=32;e-=32)a.push(i),i=0;if(0===e)return a.concat(t);for(let n=0;n>>e),i=t[n]<<32-e;const r=t.length?t[t.length-1]:0,s=n.getPartial(r);return a.push(n.partial(e+s&31,e+s>32?i:a.pop(),1)),a}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let a;for(let n=0;n>>24,a<<=8;return i},toBits(t){const e=[];let i,a=0;for(i=0;i9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const o=new Uint32Array(a);let l=0;for(let t=e.blockSize+r-(e.blockSize+r&e.blockSize-1);t<=s;t+=e.blockSize)e._block(o.subarray(16*l,16*(l+1))),l+=1;return a.splice(0,16*l),e},finalize:function(){const t=this;let e=t._buffer;const i=t._h;e=n.concat(e,[n.partial(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),i},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(t,e,n,i){return t<=19?e&n|~e&i:t<=39?e^n^i:t<=59?e&n|e&i|n&i:t<=79?e^n^i:void 0},_S:function(t,e){return e<>>32-t},_block:function(t){const e=this,n=e._h,i=Array(80);for(let e=0;e<16;e++)i[e]=t[e];let a=n[0],r=n[1],s=n[2],o=n[3],l=n[4];for(let t=0;t<=79;t++){t>=16&&(i[t]=e._S(1,i[t-3]^i[t-8]^i[t-14]^i[t-16]));const n=e._S(5,a)+e._f(t,r,s,o)+l+i[t]+e._key[Math.floor(t/20)]|0;l=o,o=s,s=e._S(30,r),r=a,a=n;}n[0]=n[0]+a|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+l|0;}};const r={aes:class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],i=e._tables[1],a=t.length;let r,s,o,l=1;if(4!==a&&6!==a&&8!==a)throw new Error("invalid aes key size");for(e._key=[s=t.slice(0),o=[]],r=a;r<4*a+28;r++){let t=s[r-1];(r%a==0||8===a&&r%a==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],r%a==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[r]=s[r-a]^t;}for(let t=0;r;t++,r--){const e=s[3&t?r:r-4];o[t]=r<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]];}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],a=[],r=[];let s,o,l,_;for(let t=0;t<256;t++)r[(a[t]=t<<1^283*(t>>7))^t]=t;for(let d=s=0;!n[d];d^=o||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[d]=r,i[r]=d,_=a[l=a[o=a[d]]];let c=16843009*_^65537*l^257*o^16843008*d,f=257*a[r]^16843008*r;for(let n=0;n<4;n++)t[n][d]=f=f<<24^f>>>8,e[n][r]=c=c<<24^c>>>8;}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0);}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,a=[0,0,0,0],r=this._tables[e],s=r[0],o=r[1],l=r[2],_=r[3],d=r[4];let c,f,u,h=t[0]^n[0],b=t[e?3:1]^n[1],w=t[2]^n[2],p=t[e?1:3]^n[3],x=4;for(let t=0;t>>24]^o[b>>16&255]^l[w>>8&255]^_[255&p]^n[x],f=s[b>>>24]^o[w>>16&255]^l[p>>8&255]^_[255&h]^n[x+1],u=s[w>>>24]^o[p>>16&255]^l[h>>8&255]^_[255&b]^n[x+2],p=s[p>>>24]^o[h>>16&255]^l[b>>8&255]^_[255&w]^n[x+3],x+=4,h=c,b=f,w=u;for(let t=0;t<4;t++)a[e?3&-t:t]=d[h>>>24]<<24^d[b>>16&255]<<16^d[w>>8&255]<<8^d[255&p]^n[x++],c=h,h=b,b=w,w=p,p=c;return a}}},s={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e;}reset(){this._iv=this._initIv;}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i;}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]));}calculate(t,e,i){let a;if(!(a=e.length))return [];const r=n.bitLength(e);for(let n=0;nr&&(t=n.hash(t));for(let e=0;et.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}(n,s-s%16)),o=0;o<=s-16;o+=16){const a=b.toBits(A(e,o,o+16));r&&t.hmac.update(a);const s=t.aesCtrGladman.update(a);r||t.hmac.update(s),n.set(b.fromBits(s),o+i);}return t.pendingInput=A(e,o),n}async function k(t,e,n){const i=(new TextEncoder).encode(e),a=await crypto.subtle.importKey("raw",i,_,!1,c),r=await crypto.subtle.deriveBits(Object.assign({salt:n},d),a,8*(2*u[t.strength]+2)),s=new Uint8Array(r);t.keys={key:b.toBits(A(s,0,u[t.strength])),authentication:b.toBits(A(s,u[t.strength],2*u[t.strength])),passwordVerification:A(s,2*u[t.strength])};}function v(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function A(t,e,n){return t.subarray(e,n)}class U{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),E(this,t);}append(t){const e=this;if(e.password){const n=z(e,t.subarray(0,12));if(e.password=null,n[11]!=e.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return z(e,t)}flush(){return {valid:!0,data:new Uint8Array(0)}}}class S{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),E(this,t);}append(t){const e=this;let n,i;if(e.password){e.password=null;const a=crypto.getRandomValues(new Uint8Array(12));a[11]=e.passwordVerification,n=new Uint8Array(t.length+a.length),n.set(I(e,a),0),i=12;}else n=new Uint8Array(t.length),i=0;return n.set(I(e,t),i),n}flush(){return {data:new Uint8Array(0)}}}function z(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function M(t){const e=2|t.keys[2];return B(Math.imul(e,1^e)>>>8)}function B(t){return 255&t}function H(t){return 4294967295&t}class V{constructor(t,{signature:n,password:i,signed:a,compressed:r,zipCrypto:s,passwordVerification:o,encryptionStrength:l},{chunkSize:_}){const d=Boolean(i);Object.assign(this,{signature:n,encrypted:d,signed:a,compressed:r,inflate:r&&new t({chunkSize:_}),crc32:a&&new e,zipCrypto:s,decrypt:d&&s?new U(i,o):new g(i,a,l)});}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.inflate.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),t}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.encrypted){const e=t.decrypt.flush();if(!e.valid)throw new Error("Invalid signature");n=e.data;}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new DataView(new Uint8Array(4).buffer);if(e=t.crc32.get(),n.setUint32(0,e),t.signature!=n.getUint32(0,!1))throw new Error("Invalid signature")}return t.compressed&&(n=await t.inflate.append(n)||new Uint8Array(0),await t.inflate.flush()),{data:n,signature:e}}}class D{constructor(t,{encrypted:n,signed:i,compressed:a,level:r,zipCrypto:s,password:o,passwordVerification:l,encryptionStrength:_},{chunkSize:d}){Object.assign(this,{encrypted:n,signed:i,compressed:a,deflate:a&&new t({level:r||5,chunkSize:d}),crc32:i&&new e,zipCrypto:s,encrypt:n&&s?new S(o,l):new y(o,_)});}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.deflate.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),n}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.compressed&&(n=await t.deflate.flush()||new Uint8Array(0)),t.encrypted){n=await t.encrypt.append(n);const i=t.encrypt.flush();e=i.signature;const a=new Uint8Array(n.length+i.data.length);a.set(n,0),a.set(i.data,n.length),n=a;}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.crc32.get()),{data:n,signature:e}}}const j={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),O=function(t,e,n){return e.codecType.startsWith("deflate")?new D(t,e,n):e.codecType.startsWith("inflate")?new V(t,e,n):void 0}(n,e,t.config);},append:async t=>({data:await O.append(t.data)}),flush:()=>O.flush()};let O;addEventListener("message",(async t=>{const e=t.data,n=e.type,i=j[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data]);}catch(e){postMessage(t);}else postMessage(t);}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}});}}));function P(t){return K(t.map((([t,e])=>new Array(t).fill(e,0,t))))}function K(t){return t.reduce(((t,e)=>t.concat(Array.isArray(e)?K(e):e)),[])}const G=[0,1,2,3].concat(...P([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function W(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1;}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,o,l,_=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1);}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,_,d,c,f,u=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],d=n[2*n[2*l+1]+1]+1,d>s&&(d=s,u++),n[2*l+1]=d,l>t.max_code||(e.bl_count[d]++,c=0,l>=r&&(c=a[l-r]),f=n[2*l],e.opt_len+=f*(d+c),i&&(e.static_len+=f*(i[2*l+1]+c)));if(0!==u){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,u-=2;}while(u>0);for(d=s;0!==d;d--)for(l=e.bl_count[d];0!==l;)_=e.heap[--o],_>t.max_code||(n[2*_+1]!=d&&(e.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),l--);}}(n),function(t,n,i){const a=[];let r,s,o,l=0;for(r=1;r<=15;r++)a[r]=l=l+i[r-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(a[o]++,o));}(i,t.max_code,n.bl_count);};}function L(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a;}W._length_code=[0,1,2,3,4,5,6,7].concat(...P([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),W.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],W.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],W.d_code=function(t){return t<256?G[t]:G[256+(t>>>7)]},W.extra_lbits=[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],W.extra_dbits=[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],W.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],W.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],L.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],L.static_l_desc=new L(L.static_ltree,W.extra_lbits,257,286,15),L.static_d_desc=new L(L.static_dtree,W.extra_dbits,0,30,15),L.static_bl_desc=new L(null,W.extra_blbits,0,19,7);function T(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a;}const q=[new T(0,0,0,0,0),new T(4,4,8,4,1),new T(4,5,16,8,1),new T(4,6,32,32,1),new T(4,4,16,16,2),new T(8,16,32,32,2),new T(8,16,128,128,2),new T(8,32,128,256,2),new T(32,128,258,1024,2),new T(32,258,258,4096,2)],R=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function F(t,e,n,i){const a=t[2*e],r=t[2*n];return a>>8&255);}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<>>16-Q,Q+=i-16):(N|=t<=8&&(Z(255&N),N>>>=8,Q-=8);}function at(e,n){let i,a,r;if(t.pending_buf[G+2*K]=e>>>8&255,t.pending_buf[G+2*K+1]=255&e,t.pending_buf[O+K]=255&n,K++,0===e?M[2*n]++:(T++,e--,M[2*(W._length_code[n]+256+1)]++,B[2*W.d_code(e)]++),0==(8191&K)&&z>2){for(i=8*K,a=m-p,r=0;r<30;r++)i+=B[2*r]*(5+W.extra_dbits[r]);if(i>>>=3,T8?$(N):Q>0&&Z(255&N),N=0,Q=0;}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,i&&($(n),$(~n)),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n;}(e,n,!0);}function lt(e,n,i){let a,r,s=0;z>0?(V.build_tree(t),D.build_tree(t),s=function(){let e;for(Y(M,V.max_code),Y(B,D.max_code),j.build_tree(t),e=18;e>=3&&0===H[2*W.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?ot(e,n,i):r==a?(tt(2+(i?1:0),3),rt(L.static_ltree,L.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?p:-1,m-p,t),p=m,e.flush_pending();}function dt(){let t,n,i,a;do{if(a=_-v-m,0===a&&0===m&&0===v)a=r;else if(-1==a)a--;else if(m>=r+r-262){l.set(l.subarray(r,r+r),0),k-=r,m-=r,p-=r,t=u,i=t;do{n=65535&c[--i],c[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&d[--i],d[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(l,m+v,a),v+=t,v>=3&&(f=255&l[m],f=(f<r-262?m-(r-262):0;let c=C;const f=o,u=m+258;let h=l[a+s-1],b=l[a+s];A>=E&&(i>>=2),c>v&&(c=v);do{if(e=t,l[e+s]==b&&l[e+s-1]==h&&l[e]==l[a]&&l[++e]==l[a+1]){a+=2,e++;do{}while(l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&as){if(k=t,s=n,n>=c)break;h=l[a+s-1],b=l[a+s];}}}while((t=65535&d[t&f])>_&&0!=--i);return s<=v?s:v}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,V.dyn_tree=M,V.stat_desc=L.static_l_desc,D.dyn_tree=B,D.stat_desc=L.static_d_desc,j.dyn_tree=H,j.stat_desc=L.static_bl_desc,N=0,Q=0,J=8,X(),function(){_=2*r,c[u-1]=0;for(let t=0;t9||8!=_||a<9||a>15||n<0||n>9||p<0||p>2?-2:(e.dstate=t,s=a,r=1<9||n<0||n>2?-2:(q[z].func!=q[e].func&&0!==t.total_in&&(i=t.deflate(1)),z!=e&&(z=e,S=q[z].max_lazy,E=q[z].good_length,C=q[z].nice_length,U=q[z].max_chain),I=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,_=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,_=i-s),l.set(e.subarray(_,_+s),0),m=s,p=s,f=255&l[0],f=(f<4||h<0)return -2;if(!_.next_out||!_.next_in&&0!==_.avail_in||666==n&&4!=h)return _.msg=R[4],-2;if(0===_.avail_out)return _.msg=R[7],-5;var H;if(e=_,M=a,a=h,42==n&&(E=8+(s-8<<4)<<8,C=(z-1&255)>>1,C>3&&(C=3),E|=C<<6,0!==m&&(E|=32),E+=31-E%31,n=113,Z((H=E)>>8&255),Z(255&H)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=M&&4!=h)return e.msg=R[7],-5;if(666==n&&0!==e.avail_in)return _.msg=R[7],-5;if(0!==e.avail_in||0!==v||0!=h&&666!=n){switch(B=-1,q[z].func){case 0:B=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(v<=1){if(dt(),0===v&&0==t)return 0;if(0===v)break}if(m+=v,v=0,n=p+a,(0===m||m>=n)&&(v=m-n,m=n,_t(!1),0===e.avail_out))return 0;if(m-p>=r-262&&(_t(!1),0===e.avail_out))return 0}return _t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:B=function(t){let n,i=0;for(;;){if(v<262){if(dt(),v<262&&0==t)return 0;if(0===v)break}if(v>=3&&(f=(f<=3)if(n=at(m-k,x-3),v-=x,x<=S&&v>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+v-3,n=at(m-1-g,A-3),v-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(i(e.next_in_index),o=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return d.length>1?(s=new Uint8Array(_),d.forEach((function(t){s.set(t,l),l+=t.length;}))):s=d[0]||new Uint8Array(0),s}},this.flush=function(){let t,i,r=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(a.slice(0,e.next_out_index)),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),i=new Uint8Array(s),o.forEach((function(t){i.set(t,r),r+=t.length;})),i};}N.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new J,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return -2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0));}};const X=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Y=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Z=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],$=[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],tt=[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,112,112],et=[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],nt=[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];function it(){let t,e,n,i,a,r;function s(t,e,s,o,l,_,d,c,f,u,h){let b,w,p,x,g,y,m,k,v,A,U,S,z,I,E;A=0,g=s;do{n[t[e+A]]++,A++,g--;}while(0!==g);if(n[0]==s)return d[0]=-1,c[0]=0,0;for(k=c[0],y=1;y<=15&&0===n[y];y++);for(m=y,kg&&(k=g),c[0]=k,I=1<S+k;){if(x++,S+=k,E=p-S,E=E>k?k:E,(w=1<<(y=m-S))>b+1&&(w-=b+1,z=m,y1440)return -3;a[x]=U=u[0],u[0]+=E,0!==x?(r[x]=g,i[0]=y,i[1]=k,y=g>>>S-k,i[2]=U-a[x-1]-y,f.set(i,3*(a[x-1]+y))):d[0]=U;}for(i[1]=m-S,A>=s?i[0]=192:h[A]>>S;y>>=1)g^=y;for(g^=y,v=(1<257?(-3==u?f.msg="oversubscribed distance tree":-5==u?(f.msg="incomplete distance tree",u=-3):-4!=u&&(f.msg="empty distance tree with lengths",u=-3),u):0)};}it.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=Y,i[0]=Z,0};function at(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,_=0,d=0,c=0,f=0,u=0,h=0;function b(t,e,n,i,a,r,s,o){let l,_,d,c,f,u,h,b,w,p,x,g,y,m,k,v;h=o.next_in_index,b=o.avail_in,f=s.bitb,u=s.bitk,w=s.write,p=w>=_[v+1],u-=_[v+1],0!=(16&c)){for(c&=15,y=_[v+2]+(f&X[c]),f>>=c,u-=c;u<15;)b--,f|=(255&o.read_byte(h++))<>=_[v+1],u-=_[v+1],0!=(16&c)){for(c&=15;u>=c,u-=c,p-=y,w>=m)k=w-m,w-k>0&&2>w-k?(s.window[w++]=s.window[k++],s.window[w++]=s.window[k++],y-=2):(s.window.set(s.window.subarray(k,k+2),w),w+=2,k+=2,y-=2);else {k=w-m;do{k+=s.end;}while(k<0);if(c=s.end-k,y>c){if(y-=c,w-k>0&&c>w-k)do{s.window[w++]=s.window[k++];}while(0!=--c);else s.window.set(s.window.subarray(k,k+c),w),w+=c,k+=c,c=0;k=0;}}if(w-k>0&&y>w-k)do{s.window[w++]=s.window[k++];}while(0!=--y);else s.window.set(s.window.subarray(k,k+y),w),w+=y,k+=y,y=0;break}if(0!=(64&c))return o.msg="invalid distance code",y=o.avail_in-b,y=u>>3>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,-3;l+=_[v+2],l+=f&X[c],v=3*(d+l),c=_[v];}break}if(0!=(64&c))return 0!=(32&c)?(y=o.avail_in-b,y=u>>3>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,1):(o.msg="invalid literal/length code",y=o.avail_in-b,y=u>>3>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,-3);if(l+=_[v+2],l+=f&X[c],v=3*(d+l),0===(c=_[v])){f>>=_[v+1],u-=_[v+1],s.window[w++]=_[v+2],p--;break}}else f>>=_[v+1],u-=_[v+1],s.window[w++]=_[v+2],p--;}while(p>=258&&b>=10);return y=o.avail_in-b,y=u>>3>3:y,b+=y,h-=y,u-=y<<3,s.bitb=f,s.bitk=u,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,0}t.init=function(t,r,s,o,l,_){e=0,c=t,f=r,i=s,u=o,a=l,h=_,n=null;},t.proc=function(t,w,p){let x,g,y,m,k,v,A,U=0,S=0,z=0;for(z=w.next_in_index,m=w.avail_in,U=t.bitb,S=t.bitk,k=t.write,v=k=258&&m>=10&&(t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=z-w.next_in_index,w.next_in_index=z,t.write=k,p=b(c,f,i,u,a,h,t,w),z=w.next_in_index,m=w.avail_in,U=t.bitb,S=t.bitk,k=t.write,v=k>>=n[g+1],S-=n[g+1],y=n[g],0===y){l=n[g+2],e=6;break}if(0!=(16&y)){_=15&y,r=n[g+2],e=2;break}if(0==(64&y)){o=y,s=g/3+n[g+2];break}if(0!=(32&y)){e=7;break}return e=9,w.msg="invalid literal/length code",p=-3,t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=z-w.next_in_index,w.next_in_index=z,t.write=k,t.inflate_flush(w,p);case 2:for(x=_;S>=x,S-=x,o=f,n=a,s=h,e=3;case 3:for(x=o;S>=n[g+1],S-=n[g+1],y=n[g],0!=(16&y)){_=15&y,d=n[g+2],e=4;break}if(0==(64&y)){o=y,s=g/3+n[g+2];break}return e=9,w.msg="invalid distance code",p=-3,t.bitb=U,t.bitk=S,w.avail_in=m,w.total_in+=z-w.next_in_index,w.next_in_index=z,t.write=k,t.inflate_flush(w,p);case 4:for(x=_;S>=x,S-=x,e=5;case 5:for(A=k-d;A<0;)A+=t.end;for(;0!==r;){if(0===v&&(k==t.end&&0!==t.read&&(k=0,v=k7&&(S-=8,m++,z--),t.write=k,p=t.inflate_flush(w,p),k=t.write,v=kt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,w,p,x,g,y,m;for(p=t.next_in_index,x=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g>>1){case 0:b>>>=3,w-=3,h=7&w,b>>>=h,w-=h,a=1;break;case 1:k=[],v=[],A=[[]],U=[[]],it.inflate_trees_fixed(k,v,A,U),d.init(k[0],v[0],A[0],0,U[0],0),b>>>=3,w-=3,a=6;break;case 2:b>>>=3,w-=3,a=3;break;case 3:return b>>>=3,w-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;w<32;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);r=65535&b,b=w=0,a=0!==r?2:0!==c?7:0;break;case 2:if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);if(0===y&&(g==n.end&&0!==n.read&&(g=0,y=gx&&(h=x),h>y&&(h=y),n.window.set(t.read_buf(p,h),g),p+=h,x-=h,g+=h,y-=h,0!=(r-=h))break;a=0!==c?7:0;break;case 3:for(;w<14;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,w-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;w<3;){if(0===x)return n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(p++))<>>=3,w-=3;}for(;o<19;)i[rt[o++]]=0;if(l[0]=7,h=u.inflate_trees_bits(i,l,_,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,d;for(h=l[0];w>>=h,w-=h,i[o++]=d;else {for(m=18==d?7:d-14,r=18==d?11:3;w>>=h,w-=h,r+=b&X[m],b>>>=m,w-=m,m=o,h=s,m+r>258+(31&h)+(h>>5&31)||16==d&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);d=16==d?i[m-1]:0;do{i[m++]=d;}while(0!=--r);o=m;}}if(_[0]=-1,S=[],z=[],I=[],E=[],S[0]=9,z[0]=6,h=s,h=u.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,S,z,I,E,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,n.inflate_flush(t,e);d.init(S[0],z[0],f,I[0],f,E[0]),a=6;case 6:if(n.bitb=b,n.bitk=w,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=g,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),p=t.next_in_index,x=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new st(n,1<>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return -3;default:return -2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return -2;const r=t.istate;return a>=1<0&&e.next_in_index!=_&&(r(e.next_in_index),_=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s.length>1?(l=new Uint8Array(c),s.forEach((function(t){l.set(t,d),d+=t.length;}))):l=s[0]||new Uint8Array(0),l}},this.flush=function(){e.inflateEnd();};}_t.prototype={inflateInit:function(t){const e=this;return e.istate=new lt,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return -2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in[t]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=Q,self.Inflate=dt;};\n\n\t\t',e=URL.createObjectURL(new Blob([t],{type:"text/javascript"}));r({workerScripts:{inflate:[e],deflate:[e]}})}})(),t.BlobReader=xt,t.BlobWriter=kt,t.Data64URIReader=class extends bt{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_ABORT=at,t.ERR_BAD_FORMAT=Zt,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Jt,t.ERR_DUPLICATED_NAME=me,t.ERR_ENCRYPTED=ee,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Yt,t.ERR_EOCDR_NOT_FOUND=Xt,t.ERR_EOCDR_ZIP64_NOT_FOUND=Qt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=te,t.ERR_HTTP_RANGE=dt,t.ERR_INVALID_COMMENT=xe,t.ERR_INVALID_ENCRYPTION_STRENGTH=Ue,t.ERR_INVALID_ENTRY_COMMENT=ke,t.ERR_INVALID_ENTRY_NAME=ve,t.ERR_INVALID_EXTRAFIELD_DATA=ze,t.ERR_INVALID_EXTRAFIELD_TYPE=Ee,t.ERR_INVALID_PASSWORD=p,t.ERR_INVALID_SIGNATURE=q,t.ERR_INVALID_VERSION=Ae,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=$t,t.ERR_UNSUPPORTED_COMPRESSION=ie,t.ERR_UNSUPPORTED_ENCRYPTION=ne,t.ERR_UNSUPPORTED_FORMAT=Se,t.HttpRangeReader=class extends Dt{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=Dt,t.Reader=bt,t.TextReader=class extends bt{constructor(t){super(),this.blobReader=new xt(new Blob([t],{type:ut}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends mt{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:ut})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:ut})}getData(){if(this.blob.text)return this.blob.text();{const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=()=>n(t.error),t.readAsText(this.blob,this.encoding)}))}}},t.Uint8ArrayReader=class extends bt{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends mt{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.Writer=mt,t.ZipReader=class{constructor(t,e={}){Object.assign(this,{reader:t,options:e,config:i()})}async getEntries(t={}){const e=this,n=e.reader;if(n.initialized||await n.init(),n.size<22)throw new Error(Zt);const i=await async function(t,e,n,i,r){const a=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(ye(a),0,e);const s=i+r;return await o(i)||await o(Math.min(s,n));async function o(e){const r=n-e,s=await be(t,r,e);for(let t=s.length-i;t>=0;t--)if(s[t]==a[0]&&s[t+1]==a[1]&&s[t+2]==a[2]&&s[t+3]==a[3])return{offset:r+t,buffer:s.slice(t,t+i).buffer}}}(n,Mt,n.size,22,1048560);if(!i)throw new Error(Xt);const r=ye(i);let a=_e(r,12),s=_e(r,16),o=we(r,8),l=0;if(s==Tt||a==Tt||o==Ft){const t=ye(await be(n,i.offset-20,20));if(_e(t,0)!=Ot)throw new Error(Qt);s=ge(t,8);let e=await be(n,s,56),r=ye(e);const c=i.offset-20-56;if(_e(r,0)!=Wt&&s!=c){const t=s;s=c,l=s-t,e=await be(n,s,56),r=ye(e)}if(_e(r,0)!=Wt)throw new Error(Yt);o=ge(r,32),a=ge(r,40),s-=a}if(s<0||s>=n.size)throw new Error(Zt);let c=0,d=await be(n,s,a),u=ye(d);const f=i.offset-a;if(_e(u,c)!=Ct&&s!=f){const t=s;s=f,l=s-t,d=await be(n,s,a),u=ye(d)}if(s<0||s>=n.size)throw new Error(Zt);const h=[];for(let i=0;ir.getData(t,y,e),h.push(y),c=g,t.onprogress)try{t.onprogress(i+1,o,new Gt(r))}catch(t){}}return h}async close(){}},t.ZipWriter=class{constructor(t,e={}){Object.assign(this,{writer:t,options:e,config:i(),files:new Map,offset:t.size,pendingCompressedSize:0,pendingEntries:[]})}async add(t="",e,n={}){const i=this;if(!(Rei.pendingEntries.push({name:t,reader:e,options:n,resolve:r,reject:a})));Re++;try{return await async function(t,e,n,i){e=e.trim(),i.directory&&!e.endsWith(Pt)?e+=Pt:i.directory=e.endsWith(Pt);if(t.files.has(e))throw new Error(me);const r=(new TextEncoder).encode(e);if(r.length>Ft)throw new Error(ve);const a=i.comment||"",s=(new TextEncoder).encode(a);if(s.length>Ft)throw new Error(ke);const o=t.options.version||i.version||0;if(o>Ft)throw new Error(Ae);const l=t.options.versionMadeBy||i.versionMadeBy||20;if(l>Ft)throw new Error(Ae);const c=Ie(t,i,"lastModDate")||new Date,d=Ie(t,i,"lastAccessDate"),u=Ie(t,i,"creationDate"),f=Ie(t,i,"password"),h=Ie(t,i,"encryptionStrength")||3,p=Ie(t,i,"zipCrypto");if(void 0!==f&&void 0!==h&&(h<1||h>3))throw new Error(Ue);let w=new Uint8Array(0);const _=i.extraField;if(_){let t=0,e=0;_.forEach((e=>t+=4+e.length)),w=new Uint8Array(t),_.forEach(((t,n)=>{if(n>Ft)throw new Error(Ee);if(t.length>Ft)throw new Error(ze);Oe(w,new Uint16Array([n]),e),Oe(w,new Uint16Array([t.length]),e+2),Oe(w,t,e+4),e+=4+t.length}))}let g=Ie(t,i,"extendedTimestamp");void 0===g&&(g=!0);let y=0,b=Ie(t,i,"keepOrder");void 0===b&&(b=!0);let m=0,x=Ie(t,i,"msDosCompatible");void 0===x&&(x=!0);const k=Ie(t,i,"internalFileAttribute")||0,v=Ie(t,i,"externalFileAttribute")||0;n&&(n.initialized||await n.init(),m=n.size,y=function(t){return t+5*(Math.floor(t/16383)+1)}(m));let A=i.zip64||t.options.zip64||!1;if(t.offset+t.pendingCompressedSize>=Tt||m>=Tt||y>=Tt){if(!1===i.zip64||!1===t.options.zip64||!b)throw new Error(Se);A=!0}t.pendingCompressedSize+=y,await Promise.resolve();const U=Ie(t,i,"level"),E=Ie(t,i,"useWebWorkers"),z=Ie(t,i,"bufferedWrite");let S=Ie(t,i,"dataDescriptor"),D=Ie(t,i,"dataDescriptorSignature");const R=Ie(t,i,"signal");void 0===S&&(S=!0);S&&void 0===D&&(D=!0);const T=await async function(t,e,n,i){const r=t.files,a=t.writer,s=Array.from(r.values()).pop();let o,l,c,d={};r.set(e,d);try{let u,f,h;if(i.keepOrder&&(u=s&&s.lock),d.lock=h=new Promise((t=>c=t)),i.bufferedWrite||t.lockWrite||!i.dataDescriptor?(f=new kt,f.init(),o=!0):(t.lockWrite=new Promise((t=>l=t)),a.initialized||await a.init(),f=a),d=await async function(t,e,n,i){const{rawFilename:r,lastAccessDate:a,creationDate:s,password:o,level:l,zip64:c,zipCrypto:d,dataDescriptor:u,dataDescriptorSignature:f,directory:h,version:p,versionMadeBy:w,rawComment:_,rawExtraField:g,useWebWorkers:y,onprogress:b,signal:m,encryptionStrength:x,extendedTimestamp:k,msDosCompatible:v,internalFileAttribute:A,externalFileAttribute:U}=i,E=Boolean(o&&o.length),z=0!==l&&!h;let S,D,R;if(E&&!d){S=new Uint8Array(De.length+2);const t=He(S);Ce(t,0,Ht),Oe(S,De,2),Be(t,8,x)}else S=new Uint8Array(0);if(k){R=new Uint8Array(9+(a?4:0)+(s?4:0));const t=He(R);Ce(t,0,Lt),Ce(t,2,R.length-4);Be(t,4,1+(a?2:0)+(s?4:0)),Me(t,5,Math.floor(i.lastModDate.getTime()/1e3)),a&&Me(t,9,Math.floor(a.getTime()/1e3)),s&&Me(t,13,Math.floor(s.getTime()/1e3));try{D=new Uint8Array(36);const t=He(D),e=Fe(i.lastModDate);Ce(t,0,10),Ce(t,2,32),Ce(t,8,1),Ce(t,10,24),We(t,12,e),We(t,20,Fe(a)||e),We(t,28,Fe(s)||e)}catch(t){D=new Uint8Array(0)}}else D=R=new Uint8Array(0);const T={version:p||20,versionMadeBy:w,zip64:c,directory:Boolean(h),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:_,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldExtendedTimestamp:R,rawExtraFieldNTFS:D,rawExtraFieldAES:S,rawExtraField:g,extendedTimestamp:k,msDosCompatible:v,internalFileAttribute:A,externalFileAttribute:U};let F=T.uncompressedSize=0,I=Nt;u&&(I|=8);let B=0;z&&(B=8);c&&(T.version=T.version>45?T.version:45);E&&(I|=1,d||(T.version=T.version>51?T.version:51,B=99,z&&(T.rawExtraFieldAES[9]=8)));T.compressionMethod=B;const C=T.headerArray=new Uint8Array(26),M=He(C);Ce(M,0,T.version),Ce(M,2,I),Ce(M,4,B);const W=new Uint32Array(1),O=He(W);let H;H=i.lastModDatejt?jt:i.lastModDate;Ce(O,0,(H.getHours()<<6|H.getMinutes())<<5|H.getSeconds()/2),Ce(O,2,(H.getFullYear()-1980<<4|H.getMonth()+1)<<5|H.getDate());const L=W[0];Me(M,6,L),Ce(M,22,r.length);const N=S.length+R.length+D.length+T.rawExtraField.length;Ce(M,24,N);const P=new Uint8Array(30+r.length+N);let j;Me(He(P),0,It),Oe(P,C,4),Oe(P,r,30),Oe(P,S,30+r.length),Oe(P,R,30+r.length+S.length),Oe(P,D,30+r.length+S.length+R.length),Oe(P,T.rawExtraField,30+r.length+S.length+R.length+D.length);let K=0;if(t){F=T.uncompressedSize=t.size;const i=await it(n.Deflate,{codecType:V,level:l,password:o,encryptionStrength:x,zipCrypto:E&&d,passwordVerification:E&&d&&L>>8&255,signed:!0,compressed:z,encrypted:E,useWebWorkers:y},n);await e.writeUint8Array(P),T.dataWritten=!0,j=await st(i,t,e,0,F,n,{onprogress:b,signal:m}),K=j.length}else await e.writeUint8Array(P),T.dataWritten=!0;let q,G=new Uint8Array(0),Z=0;u&&(G=new Uint8Array(c?f?24:20:f?16:12),q=He(G),f&&(Z=4,Me(q,0,Bt)));if(t){const t=j.signature;if(E&&!d||void 0===t||(Me(M,10,t),T.signature=t,u&&Me(q,Z,t)),c){const t=He(T.rawExtraFieldZip64);Ce(t,0,1),Ce(t,2,24),Me(M,14,Tt),We(t,12,BigInt(K)),Me(M,18,Tt),We(t,4,BigInt(F)),u&&(We(q,Z+4,BigInt(K)),We(q,Z+12,BigInt(F)))}else Me(M,14,K),Me(M,18,F),u&&(Me(q,Z+4,K),Me(q,Z+8,F))}u&&await e.writeUint8Array(G);const X=P.length+K+G.length;return Object.assign(T,{compressedSize:K,lastModDate:H,rawLastModDate:L,creationDate:s,lastAccessDate:a,encrypted:E,length:X}),T}(n,f,t.config,i),d.lock=h,r.set(e,d),d.filename=e,o){let e=0;const n=f.getData();let s;await Promise.all([t.lockWrite,u]);do{s=Array.from(r.values()).find((t=>t.writingBufferedData)),s&&await s.lock}while(s&&s.lock);if(d.writingBufferedData=!0,!i.dataDescriptor){const t=26,r=await Te(n,0,t),s=new DataView(r);d.encrypted&&!i.zipCrypto||Me(s,14,d.signature),d.zip64?(Me(s,18,Tt),Me(s,22,Tt)):(Me(s,18,d.compressedSize),Me(s,22,d.uncompressedSize)),await a.writeUint8Array(new Uint8Array(r)),e=t}await async function(t,e,n=0){const i=536870912;async function r(){if(n=Tt)throw new Error(Se);return t.offset+=d.length,d}catch(n){throw(o&&d.writingBufferedData||!o&&d.dataWritten)&&(n.corruptedEntry=t.hasCorruptedEntries=!0,d.uncompressedSize&&(t.offset+=d.uncompressedSize)),r.delete(e),n}finally{c(),l&&l()}}(t,e,n,Object.assign({},i,{rawFilename:r,rawComment:s,version:o,versionMadeBy:l,lastModDate:c,lastAccessDate:d,creationDate:u,rawExtraField:w,zip64:A,password:f,level:U,useWebWorkers:E,encryptionStrength:h,extendedTimestamp:g,zipCrypto:p,bufferedWrite:z,keepOrder:b,dataDescriptor:S,dataDescriptorSignature:D,signal:R,msDosCompatible:x,internalFileAttribute:k,externalFileAttribute:v}));y&&(t.pendingCompressedSize-=y);return Object.assign(T,{name:e,comment:a,extraField:_}),new Gt(T)}(i,t,e,n)}finally{Re--;const t=i.pendingEntries.shift();t&&i.add(t.name,t.reader,t.options).then(t.resolve).catch(t.reject)}}async close(t=new Uint8Array(0),e={}){return await async function(t,e,n){const i=t.writer,r=t.files;let a=0,s=0,o=t.offset,l=r.size;for(const[,t]of r)s+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraFieldExtendedTimestamp.length+t.rawExtraFieldNTFS.length+t.rawExtraField.length;let c=n.zip64||t.options.zip64||!1;if(o>=Tt||s>=Tt||l>=Ft){if(!1===n.zip64||!1===t.options.zip64)throw new Error(Se);c=!0}const d=new Uint8Array(s+(c?98:22)),u=He(d);if(e&&e.length){if(!(e.length<=Ft))throw new Error(xe);Ce(u,a+20,e.length)}for(const[t,e]of Array.from(r.values()).entries()){const{rawFilename:i,rawExtraFieldZip64:s,rawExtraFieldAES:o,rawExtraField:l,rawComment:c,versionMadeBy:f,headerArray:h,directory:p,zip64:w,msDosCompatible:_,internalFileAttribute:g,externalFileAttribute:y}=e;let b,m;if(e.extendedTimestamp){m=e.rawExtraFieldNTFS,b=new Uint8Array(9);const t=He(b);Ce(t,0,Lt),Ce(t,2,b.length-4),Be(t,4,1),Me(t,5,Math.floor(e.lastModDate.getTime()/1e3))}else m=b=new Uint8Array(0);const x=s.length+o.length+b.length+m.length+l.length;if(Me(u,a,Ct),Ce(u,a+4,f),Oe(d,h,a+6),Ce(u,a+30,x),Ce(u,a+32,c.length),Me(u,a+34,g),y?Me(u,a+38,y):p&&_&&Be(u,a+38,16),Me(u,a+42,w?Tt:e.offset),Oe(d,i,a+46),Oe(d,s,a+46+i.length),Oe(d,o,a+46+i.length+s.length),Oe(d,b,a+46+i.length+s.length+o.length),Oe(d,m,a+46+i.length+s.length+o.length+b.length),Oe(d,l,a+46+i.length+s.length+o.length+b.length+m.length),Oe(d,c,a+46+i.length+x),a+=46+i.length+x+c.length,n.onprogress)try{n.onprogress(t+1,r.size,new Gt(e))}catch(t){}}c&&(Me(u,a,Wt),We(u,a+4,BigInt(44)),Ce(u,a+12,45),Ce(u,a+14,45),We(u,a+24,BigInt(l)),We(u,a+32,BigInt(l)),We(u,a+40,BigInt(s)),We(u,a+48,BigInt(o)),Me(u,a+56,Ot),We(u,a+64,BigInt(o)+BigInt(s)),Me(u,a+72,1),l=Ft,o=Tt,s=Tt,a+=76);Me(u,a,Mt),Ce(u,a+8,l),Ce(u,a+10,l),Me(u,a+12,s),Me(u,a+16,o),await i.writeUint8Array(d),e&&e.length&&await i.writeUint8Array(e)}(this,t,e),this.writer.getData()}},t.configure=r,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={},n)=>({Deflate:a(t.Deflate,e.deflate,n),Inflate:a(t.Inflate,e.inflate,n)}),t.terminateWorkers=function(){et.forEach((t=>{rt(t),t.terminate()}))},Object.defineProperty(t,"__esModule",{value:!0})})); 2 | --------------------------------------------------------------------------------