From b026956e1abd88087ec70e60fda286e71f822764 Mon Sep 17 00:00:00 2001 From: Gildas Date: Wed, 24 Feb 2021 00:39:46 +0100 Subject: [PATCH] bump version --- dist/zip-fs-full.js | 104 ++++-------------- dist/zip-fs-full.min.js | 2 +- dist/zip-fs.js | 168 +++++++++--------------------- dist/zip-fs.min.js | 2 +- dist/zip-full.js | 164 +++++++++-------------------- dist/zip-full.min.js | 2 +- dist/zip-no-worker-deflate.min.js | 2 +- dist/zip-no-worker-inflate.min.js | 2 +- dist/zip-no-worker.min.js | 2 +- dist/zip.js | 164 +++++++++-------------------- dist/zip.min.js | 2 +- package.json | 2 +- 12 files changed, 172 insertions(+), 444 deletions(-) diff --git a/dist/zip-fs-full.js b/dist/zip-fs-full.js index 08bc05cf..a74f24e2 100644 --- a/dist/zip-fs-full.js +++ b/dist/zip-fs-full.js @@ -6785,10 +6785,10 @@ class ZipReader { - constructor(reader, options = {}, config = {}) { + constructor(reader, options = {}) { this.reader = reader; this.options = options; - this.config = config; + this.config = getConfiguration(); } async getEntries(options = {}) { @@ -7124,41 +7124,6 @@ view.setUint32(offset, value, true); } - /* - Copyright (c) 2021 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - class ZipReader$1 extends ZipReader { - - constructor(reader, options) { - super(reader, options, getConfiguration()); - } - } - /* Copyright (c) 2021 Gildas Lormeau. All rights reserved. @@ -7202,10 +7167,10 @@ class ZipWriter { - constructor(writer, options = {}, config = {}) { + constructor(writer, options = {}) { this.writer = writer; this.options = options; - this.config = config; + this.config = getConfiguration(); this.files = new Map(); this.offset = writer.size; } @@ -7373,7 +7338,7 @@ zipWriter.lockPreviousFile = new Promise(resolve => resolveLockPreviousFile = resolve); } if (options.bufferedWrite || zipWriter.lockWrite) { - fileWriter = new Uint8ArrayWriter(); + fileWriter = new BlobWriter(); await fileWriter.init(); } else { zipWriter.lockWrite = new Promise(resolve => resolveLockWrite = resolve); @@ -7389,13 +7354,15 @@ } files.set(name, fileEntry); if (fileWriter != writer) { - if (zipWriter.lockWrite) { - await zipWriter.lockWrite; - } - if (lockPreviousFile) { - await lockPreviousFile; - } - await writer.writeUint8Array(fileWriter.getData()); + const blob = fileWriter.getData(); + const fileReader = new FileReader(); + const arrayBuffer = await new Promise((resolve, reject) => { + fileReader.onload = event => resolve(event.target.result); + fileReader.onerror = reject; + fileReader.readAsArrayBuffer(blob); + }); + await Promise.all([zipWriter.lockWrite, lockPreviousFile]); + await writer.writeUint8Array(new Uint8Array(arrayBuffer)); } fileEntry.offset = zipWriter.offset; if (fileEntry.zip64) { @@ -7558,41 +7525,6 @@ view.setBigUint64(offset, value, true); } - /* - Copyright (c) 2021 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - class ZipWriter$1 extends ZipWriter { - - constructor(writer, options) { - super(writer, options, getConfiguration()); - } - } - /* Copyright (c) 2021 Gildas Lormeau. All rights reserved. @@ -7837,7 +7769,7 @@ if (!reader.initialized) { await reader.init(); } - const zipReader = new ZipReader$1(reader, options); + const zipReader = new ZipReader(reader, options); const entries = await zipReader.getEntries(); entries.forEach((entry) => { let parent = this; @@ -7856,7 +7788,7 @@ async exportZip(writer, options) { await initReaders(this); await writer.init(); - const zipWriter = new ZipWriter$1(writer, options); + const zipWriter = new ZipWriter(writer, options); await exportZip(zipWriter, this, getTotalSize([this], "uncompressedSize"), options); await zipWriter.close(); return writer.getData(); @@ -8251,8 +8183,8 @@ exports.Uint8ArrayReader = Uint8ArrayReader; exports.Uint8ArrayWriter = Uint8ArrayWriter; exports.Writer = Writer; - exports.ZipReader = ZipReader$1; - exports.ZipWriter = ZipWriter$1; + exports.ZipReader = ZipReader; + exports.ZipWriter = ZipWriter; exports.configure = configure; exports.fs = fs; exports.getMimeType = getMimeType; diff --git a/dist/zip-fs-full.min.js b/dist/zip-fs-full.min.js index d6d53fe5..e0a8c153 100644 --- a/dist/zip-fs-full.min.js +++ b/dist/zip-fs-full.min.js @@ -1 +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=256,n=256,i=-2,r=-5;function a(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const s=[0,1,2,3].concat(...a([[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 o(){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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,d,l=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);d=a;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*d]=i[2*s]+i[2*o],n.depth[d]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=d,n.heap[1]=d++,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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,d,l,c,f,u,p=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)d=e.heap[o],c=n[2*n[2*d+1]+1]+1,c>s&&(c=s,p++),n[2*d+1]=c,d>t.max_code||(e.bl_count[c]++,f=0,d>=a&&(f=r[d-a]),u=n[2*d],e.opt_len+=u*(c+f),i&&(e.static_len+=u*(i[2*d+1]+f)));if(0!==p){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(c=s;0!==c;c--)for(d=e.bl_count[c];0!==d;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=c&&(e.opt_len+=(c-n[2*l+1])*n[2*l],n[2*l+1]=c),d--)}}(n),function(t,n,i){const r=[];let a,s,o,d=0;for(a=1;a<=15;a++)r[a]=d=d+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function d(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[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]])),o.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],o.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],o.d_code=function(t){return t<256?s[t]:s[256+(t>>>7)]},o.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],o.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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d.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],d.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],d.static_l_desc=new d(d.static_ltree,o.extra_lbits,257,286,15),d.static_d_desc=new d(d.static_dtree,o.extra_dbits,0,30,15),d.static_bl_desc=new d(null,o.extra_blbits,0,19,7);function l(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],f=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],u=113,p=666,h=258,m=262;function x(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function dt(t,e){let n;const i=e;it>16-i?(n=t,nt|=n<>>16-it,it+=i-16):(nt|=t<=8&&(st(255&nt),nt>>>=8,it-=8)}function ut(n,i){let r,a,s;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[G+Q]=255&i,Q++,0===n?P[2*i]++:(tt++,n--,P[2*(o._length_code[i]+e+1)]++,H[2*o.d_code(n)]++),0==(8191&Q)&&B>2){for(r=8*Q,a=C-I,s=0;s<30;s++)r+=H[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,tt8?ot(nt):it>0&&st(255&nt),nt=0,it=0}function mt(e,n,i){dt(0+(i?1:0),3),function(e,n,i){ht(),et=8,i&&(ot(n),ot(~n)),t.pending_buf.set(v.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function xt(e,n,i){let r,a,s=0;B>0?(K.build_tree(t),Y.build_tree(t),s=function(){let e;for(at(P,K.max_code),at(H,Y.max_code),X.build_tree(t),e=18;e>=3&&0===Z[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?mt(e,n,i):a==r?(dt(2+(i?1:0),3),pt(d.static_ltree,d.static_dtree)):(dt(4+(i?1:0),3),function(t,e,n){let i;for(dt(t-257,5),dt(e-1,5),dt(n-4,4),i=0;i=0?I:-1,C-I,t),I=C,a.flush_pending()}function wt(){let t,e,n,i;do{if(i=y-q-C,0===i&&0===C&&0===q)i=w;else if(-1==i)i--;else if(C>=w+w-m){v.set(v.subarray(w,w+w),0),T-=w,C-=w,I-=w,t=z,n=t;do{e=65535&A[--n],A[n]=e>=w?e-w:0}while(0!=--t);t=w,n=t;do{e=65535&k[--n],k[n]=e>=w?e-w:0}while(0!=--t);i+=w}if(0===a.avail_in)return;t=a.read_buf(v,C+q,i),q+=t,q>=3&&(U=255&v[C],U=(U<w-m?C-(w-m):0;let o=N;const d=b,l=C+h;let c=v[r+a-1],f=v[r+a];O>=V&&(i>>=2),o>q&&(o=q);do{if(e=t,v[e+a]==f&&v[e+a-1]==c&&v[e]==v[r]&&v[++e]==v[r+1]){r+=2,e++;do{}while(v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&ra){if(T=t,a=n,n>=o)break;c=v[r+a-1],f=v[r+a]}}}while((t=65535&k[t&d])>s&&0!=--i);return a<=q?a:q}function bt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,s=u,_=0,K.dyn_tree=P,K.stat_desc=d.static_l_desc,Y.dyn_tree=H,Y.stat_desc=d.static_d_desc,X.dyn_tree=Z,X.stat_desc=d.static_bl_desc,nt=0,it=0,et=8,rt(),function(){y=2*w,A[z-1]=0;for(let t=0;t9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(e.dstate=t,g=r,w=1<9||n<0||n>2?i:(c[B].func!=c[e].func&&0!==t.total_in&&(r=t.deflate(1)),B!=e&&(B=e,W=c[B].max_lazy,V=c[B].good_length,N=c[B].nice_length,M=c[B].max_chain),L=n,r)},t.deflateSetDictionary=function(t,e,n){let r,a=n,o=0;if(!e||42!=s)return i;if(a<3)return 0;for(a>w-m&&(a=w-m,o=n-a),v.set(e.subarray(o,o+a),0),C=a,I=a,U=255&v[0],U=(U<4||o<0)return i;if(!e.next_out||!e.next_in&&0!==e.avail_in||s==p&&4!=o)return e.msg=f[4],i;if(0===e.avail_out)return e.msg=f[7],r;var V;if(a=e,E=_,_=o,42==s&&(x=8+(g-8<<4)<<8,y=(B-1&255)>>1,y>3&&(y=3),x|=y<<6,0!==C&&(x|=32),x+=31-x%31,s=u,st((V=x)>>8&255),st(255&V)),0!==t.pending){if(a.flush_pending(),0===a.avail_out)return _=-1,0}else if(0===a.avail_in&&o<=E&&4!=o)return a.msg=f[7],r;if(s==p&&0!==a.avail_in)return e.msg=f[7],r;if(0!==a.avail_in||0!==q||0!=o&&s!=p){switch(M=-1,c[B].func){case 0:M=function(t){let e,n=65535;for(n>l-5&&(n=l-5);;){if(q<=1){if(wt(),0===q&&0==t)return 0;if(0===q)break}if(C+=q,q=0,e=I+n,(0===C||C>=e)&&(q=C-e,C=e,_t(!1),0===a.avail_out))return 0;if(C-I>=w-m&&(_t(!1),0===a.avail_out))return 0}return _t(4==t),0===a.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:M=function(t){let e,n=0;for(;;){if(q=3&&(U=(U<=3)if(e=ut(C-T,j-3),q-=j,j<=W&&q>=3){j--;do{C++,U=(U<=3&&(U=(U<4096)&&(j=2)),O>=3&&j<=O){n=C+q-3,e=ut(C-1-F,O-3),q-=O-1,O-=2;do{++C<=n&&(U=(U<n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 g=-2,b=-3,v=-5,y=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=[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],A=[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],U=[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],z=[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],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],R=[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],D=15;function I(){let t,e,n,i,r,a;function s(t,e,s,o,d,l,c,f,u,p,h){let m,x,_,w,g,y,k,A,U,z,E,R,I,j,F;z=0,g=s;do{n[t[e+z]]++,z++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,f[0]=0,0;for(A=f[0],y=1;y<=D&&0===n[y];y++);for(k=y,Ag&&(A=g),f[0]=A,j=1<R+A;){if(w++,R+=A,F=_-R,F=F>A?A:F,(x=1<<(y=k-R))>m+1&&(x-=m+1,I=k,y1440)return b;r[w]=E=p[0],p[0]+=F,0!==w?(a[w]=g,i[0]=y,i[1]=A,y=g>>>R-A,i[2]=E-r[w-1]-y,u.set(i,3*(r[w-1]+y))):c[0]=E}for(i[1]=k-R,z>=s?i[0]=192:h[z]>>R;y>>=1)g^=y;for(g^=y,U=(1<257?(p==b?u.msg="oversubscribed distance tree":p==v?(u.msg="incomplete distance tree",p=b):-4!=p&&(u.msg="empty distance tree with lengths",p=b),p):0)}}I.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=k,i[0]=A,0};function j(){const t=this;let e,n,i,r,a=0,s=0,o=0,d=0,l=0,c=0,f=0,u=0,p=0,h=0;function m(t,e,n,i,r,a,s,o){let d,l,c,f,u,p,h,m,x,_,w,g,v,k,A,U;h=o.next_in_index,m=o.avail_in,u=s.bitb,p=s.bitk,x=s.write,_=x>=l[U+1],p-=l[U+1],0!=(16&f)){for(f&=15,v=l[U+2]+(u&y[f]),u>>=f,p-=f;p<15;)m--,u|=(255&o.read_byte(h++))<>=l[U+1],p-=l[U+1],0!=(16&f)){for(f&=15;p>=f,p-=f,_-=v,x>=k)A=x-k,x-A>0&&2>x-A?(s.window[x++]=s.window[A++],s.window[x++]=s.window[A++],v-=2):(s.window.set(s.window.subarray(A,A+2),x),x+=2,A+=2,v-=2);else{A=x-k;do{A+=s.end}while(A<0);if(f=s.end-A,v>f){if(v-=f,x-A>0&&f>x-A)do{s.window[x++]=s.window[A++]}while(0!=--f);else s.window.set(s.window.subarray(A,A+f),x),x+=f,A+=f,f=0;A=0}}if(x-A>0&&v>x-A)do{s.window[x++]=s.window[A++]}while(0!=--v);else s.window.set(s.window.subarray(A,A+v),x),x+=v,A+=v,v=0;break}if(0!=(64&f))return o.msg="invalid distance code",v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,b;d+=l[U+2],d+=u&y[f],U=3*(c+d),f=l[U]}break}if(0!=(64&f))return 0!=(32&f)?(v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,1):(o.msg="invalid literal/length code",v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,b);if(d+=l[U+2],d+=u&y[f],U=3*(c+d),0===(f=l[U])){u>>=l[U+1],p-=l[U+1],s.window[x++]=l[U+2],_--;break}}else u>>=l[U+1],p-=l[U+1],s.window[x++]=l[U+2],_--}while(_>=258&&m>=10);return v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,0}t.init=function(t,a,s,o,d,l){e=0,f=t,u=a,i=s,p=o,r=d,h=l,n=null},t.proc=function(t,x,_){let w,v,k,A,U,z,E,R=0,D=0,I=0;for(I=x.next_in_index,A=x.avail_in,R=t.bitb,D=t.bitk,U=t.write,z=U=258&&A>=10&&(t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=U,_=m(f,u,i,p,r,h,t,x),I=x.next_in_index,A=x.avail_in,R=t.bitb,D=t.bitk,U=t.write,z=U>>=n[v+1],D-=n[v+1],k=n[v],0===k){d=n[v+2],e=6;break}if(0!=(16&k)){l=15&k,a=n[v+2],e=2;break}if(0==(64&k)){o=k,s=v/3+n[v+2];break}if(0!=(32&k)){e=7;break}return e=9,x.msg="invalid literal/length code",_=b,t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=U,t.inflate_flush(x,_);case 2:for(w=l;D>=w,D-=w,o=u,n=r,s=h,e=3;case 3:for(w=o;D>=n[v+1],D-=n[v+1],k=n[v],0!=(16&k)){l=15&k,c=n[v+2],e=4;break}if(0==(64&k)){o=k,s=v/3+n[v+2];break}return e=9,x.msg="invalid distance code",_=b,t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=U,t.inflate_flush(x,_);case 4:for(w=l;D>=w,D-=w,e=5;case 5:for(E=U-c;E<0;)E+=t.end;for(;0!==a;){if(0===z&&(U==t.end&&0!==t.read&&(U=0,z=U7&&(D-=8,A++,I--),t.write=U,_=t.inflate_flush(x,_),U=t.write,z=Ut.avail_out&&(i=t.avail_out),0!==i&&e==v&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&e==v&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,m,x,_,w,v,k,A;for(_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,v=n.write,k=v>>1){case 0:m>>>=3,x-=3,h=7&x,m>>>=h,x-=h,r=1;break;case 1:U=[],z=[],E=[[]],R=[[]],I.inflate_trees_fixed(U,z,E,R),c.init(U[0],z[0],E[0],0,R[0],0),m>>>=3,x-=3,r=6;break;case 2:m>>>=3,x-=3,r=3;break;case 3:return m>>>=3,x-=3,r=9,t.msg="invalid block type",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e)}break;case 1:for(;x<32;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>16&65535)!=(65535&m))return r=9,t.msg="invalid stored block lengths",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);a=65535&m,m=x=0,r=0!==a?2:0!==f?7:0;break;case 2:if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);if(0===k&&(v==n.end&&0!==n.read&&(v=0,k=vw&&(h=w),h>k&&(h=k),n.window.set(t.read_buf(_,h),v),_+=h,w-=h,v+=h,k-=h,0!=(a-=h))break;r=0!==f?7:0;break;case 3:for(;x<14;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,x-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;x<3;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>=3,x-=3}for(;o<19;)i[F[o++]]=0;if(d[0]=7,h=p.inflate_trees_bits(i,d,l,u,t),0!=h)return(e=h)==b&&(i=null,r=9),n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=d[0];x>>=h,x-=h,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;x>>=h,x-=h,a+=m&y[A],m>>>=A,x-=A,A=o,h=s,A+a>258+(31&h)+(h>>5&31)||16==c&&A<1)return i=null,r=9,t.msg="invalid bit length repeat",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(l[0]=-1,D=[],j=[],S=[],C=[],D[0]=9,j[0]=6,h=s,h=p.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,D,j,S,C,u,t),0!=h)return h==b&&(i=null,r=9),e=h,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);c.init(D[0],j[0],u,S[0],u,C[0]),r=6;case 6:if(n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,v=n.write,k=v15?(t.inflateEnd(n),g):(t.wbits=i,n.istate.blocks=new S(n,1<>4)>r.wbits){r.mode=C,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=C,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=C,t.msg="need dictionary",r.marker=0,g;case 7:if(n=r.blocks.proc(t,n),n==b){r.mode=C,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case C:return b;default:return g}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return g;const a=t.istate;return r>=1<{const t={};for(let e in V)if(V.hasOwnProperty(e))for(let n in V[e])if(V[e].hasOwnProperty(n)){const i=V[e][n];if("string"==typeof i)t[i]=e+"/"+n;else for(let r=0;r{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)};if(this.codec=new t(Object.assign({},e,n)),typeof this.codec.onData==P)this.codec.onData=i;else{if(typeof this.codec.on!=P)throw new Error("Cannot register the callback function");this.codec.on("data",i)}}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const Z="HTTP error ",K="HTTP Range not supported",Y="text/plain",X="Content-Length",G="Accept-Ranges",J="HEAD",Q="GET",$="bytes";class tt{constructor(){this.size=0}init(){this.initialized=!0}}class et extends tt{}class nt extends tt{writeUint8Array(t){this.size+=t.length}}class it extends et{constructor(t){super(),this.blobReader=new ot(new Blob([t],{type:Y}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}}class rt extends nt{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:Y})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:Y})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}}class at extends et{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)}}class ot extends et{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class dt extends nt{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class lt extends et{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(),wt(this.url)&&!this.preventHeadRequest){const t=await ft(J,this.url,this.options);if(this.size=Number(t.headers.get(X)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(G)!=$)throw new Error(K);void 0===this.size&&await ct(this,this.options)}else await ct(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await ft(Q,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(K);return new Uint8Array(await n.arrayBuffer())}return this.data||await ct(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function ct(t,e){const n=await ft(Q,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function ft(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(Z+(r.statusText||r.status))}class ut extends et{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),wt(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>ht(J,this.url,(n=>{this.size=Number(n.getResponseHeader(X)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(G)==$?t():e(new Error(K)):void 0===this.size?pt(this,this.url).then((()=>t())).catch(e):t()}),e)));await pt(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await pt(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>ht(Q,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(K)}}function pt(t,e){return new Promise(((n,i)=>ht(Q,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function ht(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(Z+(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 mt extends et{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new ut(t,e):this.reader=new lt(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)}}class xt extends et{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}}class _t extends nt{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}}function wt(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 gt=4294967295,bt=65535,vt=67324752,yt=134695760,kt=33639248,At=101010256,Ut=101075792,zt=117853008,Et=39169,Rt=2048,Dt="/",It=new Date(2107,11,31),jt=new Date(1980,0,1),Ft="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const St=[];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;St[t]=e}class Ct{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^St[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Tt="Invalid pasword",qt=16,Ot="raw",Mt={name:"PBKDF2"},Wt={name:"HMAC"},Bt="SHA-1",Lt={name:"AES-CTR"},Vt=Object.assign({hash:Wt},Mt),Nt=Object.assign({iterations:1e3,hash:{name:Bt}},Mt),Pt=Object.assign({hash:Bt},Wt),Ht=Object.assign({length:qt},Lt),Zt=["deriveBits"],Kt=["sign"],Yt=[8,12,16],Xt=[16,24,32],Gt=10,Jt=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Qt=crypto.subtle;class $t{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+qt<=i.length-Gt){const t=i.subarray(r,r+qt),a=await Qt.decrypt(Object.assign({counter:this.counter},Ht),this.keys.key,t);return ne(this.counter),n.set(new Uint8Array(a),r),e(r+qt)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=ie(this.input,t)),n};if(this.password){const e=t.subarray(0,Yt[this.strength]+2);await async function(t,e,n){await ee(t,n,e.subarray(0,Yt[t.strength]),["decrypt"]);const i=e.subarray(Yt[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(Tt)}(this,e,this.password),this.password=null,t=t.subarray(Yt[this.strength]+2)}let n=new Uint8Array(t.length-Gt-(t.length-Gt)%qt),i=t;return this.pendingInput.length&&(i=ie(this.pendingInput,t),n=re(n,i.length-Gt-(i.length-Gt)%qt)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-Gt),i=t.subarray(t.length-Gt);let r=new Uint8Array(0);if(n.length){const t=await Qt.decrypt(Object.assign({counter:this.counter},Ht),e.key,n);r=new Uint8Array(t)}let a=!0;if(this.signed){const t=await Qt.sign(Wt,e.authentication,this.input.subarray(0,this.input.length-Gt)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(r+qt<=t.length){const a=t.subarray(r,r+qt),s=await Qt.encrypt(Object.assign({counter:this.counter},Ht),this.keys.key,a);return ne(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+qt)}return this.pendingInput=t.subarray(r),this.output=ie(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(Yt[t.strength]));return await ee(t,e,n,["encrypt"]),ie(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%qt);return i.set(n,0),this.pendingInput.length&&(t=ie(this.pendingInput,t),i=re(i,t.length-t.length%qt)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await Qt.encrypt(Object.assign({counter:this.counter},Ht),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=ie(this.output,t)}const e=await Qt.sign(Wt,this.keys.authentication,this.output.subarray(Yt[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,Gt);return{data:ie(t,n),signature:n}}}async function ee(t,e,n,i){t.counter=new Uint8Array(Jt);const r=(new TextEncoder).encode(e),a=await Qt.importKey(Ot,r,Vt,!1,Zt),s=await Qt.deriveBits(Object.assign({salt:n},Nt),a,8*(2*Xt[t.strength]+2)),o=new Uint8Array(s);t.keys={key:await Qt.importKey(Ot,o.subarray(0,Xt[t.strength]),Lt,!0,i),authentication:await Qt.importKey(Ot,o.subarray(Xt[t.strength],2*Xt[t.strength]),Pt,!1,Kt),passwordVerification:o.subarray(2*Xt[t.strength])}}function ne(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function ie(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 re(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const ae=12;class se{constructor(t,e){this.password=t,this.passwordVerification=e,ce(this,t)}async append(t){if(this.password){const e=de(this,t.subarray(0,ae));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(Tt);t=t.subarray(ae)}return de(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class oe{constructor(t,e){this.passwordVerification=e,this.password=t,ce(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(ae));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(le(this,i),0),n=ae}else e=new Uint8Array(t.length),n=0;return e.set(le(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function de(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function ue(t){const e=2|t.keys[2];return pe(Math.imul(e,1^e)>>>8)}function pe(t){return 255&t}function he(t){return 4294967295&t}const me="deflate",xe="inflate",_e="Invalid signature";class we{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Ct,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new se(e.password,e.passwordVerification):new $t(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(_e);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(_e)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class ge{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Ct,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new oe(e.password,e.passwordVerification):new te(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const be="init",ve="append",ye="flush",ke="message";var Ae=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-fs-full.min.js",document.baseURI).href)),t.worker.addEventListener(ke,r,!1),t.interface={append:t=>n({type:ve,data:t}),flush:()=>n({type:ye})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:be,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==be||r==ye||r==ve){const n=i.data;r==ye?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(me)?new ge(t,e):e.codecType.startsWith(xe)?new we(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Ue=[],ze=[];function Ee(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(Ue.length!t.busy));return n?Ae(n,t,e,Re,i,r):new Promise((n=>ze.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Re(t){const e=!ze.length;if(e)Ue=Ue.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=ze.splice(0,1);e(Ae(t,n,i,Re,r,a))}return e}async function De(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(d=0,l=0){if(dthis[e]=t[e]))}}const Se="File format is not recognized",Ce="End of central directory not found",Te="End of Zip64 central directory not found",qe="End of Zip64 central directory locator not found",Oe="Central directory header not found",Me="Local file header not found",We="Zip64 extra field not found",Be="File contains encrypted entry",Le="Encryption method not supported",Ve="Compression method not supported",Ne="utf-8",Pe=["uncompressedSize","compressedSize","offset"];class He{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=Xe(this,e,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error(Ve);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error(Ve);if($e(r,0)!=vt)throw new Error(Me);const s=this.localDirectory={};Ze(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),Ke(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,d=this.bitFlag.encrypted&&s.bitFlag.encrypted,l=d&&!this.extraFieldAES;if(d){if(!l&&void 0===this.extraFieldAES.strength)throw new Error(Le);if(!a)throw new Error(Be)}const c=await Ee(this.config.Inflate,{codecType:xe,password:a,zipCrypto:l,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:Xe(this,e,"checkSignature"),passwordVerification:l&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:d,useWebWorkers:Xe(this,e,"useWebWorkers")},this.config);return t.initialized||await t.init(),await De(c,n,t,o,this.compressedSize,this.config,{onprogress:e.onprogress}),t.getData()}}function Ze(t,e,n){t.version=Qe(e,n);const i=t.rawBitFlag=Qe(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&Rt)==Rt},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=$e(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>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){}}(t.rawLastModDate),t.filenameLength=Qe(e,n+22),t.extraFieldLength=Qe(e,n+24)}function Ke(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==gt));for(let e=0;e{if(e[n]==gt){if(!t||void 0===t[n])throw new Error(We);e[n]=t[n]}}))}(l,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Ye(c,"filename","rawFilename",e,t);const f=e.extraFieldUnicodeComment=a.get(25461);f&&Ye(f,"comment","rawComment",e,t);const u=e.extraFieldAES=a.get(39169);u?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=Je(i,0),t.vendorId=Je(i,2);const r=Je(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=Qe(i,5)}else e.compressionMethod=n}(u,e,d):e.compressionMethod=d,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Ye(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=Je(a,0),t.signature=$e(a,1);const s=new Ct;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==$e(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Xe(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Ge(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,At,22,1048560);if(!n)throw new Error(Ce);const i=new DataView(n.buffer);let r=$e(i,12),a=$e(i,16),s=Qe(i,8),o=0;if(a==gt||r==gt||s==bt){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if($e(i,0)!=zt)throw new Error(Te);a=tn(i,8);let d=await e.readUint8Array(a,56),l=new DataView(d.buffer);const c=n.offset-20-56;if($e(l,0)!=Ut&&a!=c){const t=a;a=c,o=a-t,d=await e.readUint8Array(a,56),l=new DataView(d.buffer)}if($e(l,0)!=Ut)throw new Error(qe);s=tn(l,24),r=tn(i,4),a-=tn(l,40)}if(a<0||a>=e.size)throw new Error(Se);let d=0,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer);const f=n.offset-r;if($e(c,d)!=kt&&a!=f){const t=a;a=f,o=a-t,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer)}if(a<0||a>=e.size)throw new Error(Se);const u=[];for(let e=0;ee.getData(t,n),u.push(r),d+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return u}async close(){}}{constructor(t,e){super(t,e,B())}}const nn="File already exists",rn="Zip file comment exceeds 64KB",an="File entry comment exceeds 64KB",sn="File entry name exceeds 64KB",on="Version exceeds 65535",dn="The modification date must be between 1/1/1980 and 12/31/2107",ln="The strength must equal 1, 2, or 3",cn="Extra field type exceeds 65535",fn="Extra field data exceeds 64KB",un=new Uint8Array([7,0,2,0,65,69,3,0,0]);function pn(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function hn(t,e,n){t.setUint8(e,n)}function mn(t,e,n){t.setUint16(e,n,!0)}function xn(t,e,n){t.setUint32(e,n,!0)}function _n(t,e,n){t.setBigUint64(e,n,!0)}class wn extends class{constructor(t,e={},n={}){this.writer=t,this.options=e,this.config=n,this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(Dt)?t+=Dt:n.directory=t.endsWith(Dt),this.files.has(t))throw new Error(nn);const i=(new TextEncoder).encode(t);if(i.length>bt)throw new Error(sn);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>bt)throw new Error(an);const s=this.options.version||n.version||0;if(s>bt)throw new Error(on);const o=n.lastModDate||new Date;if(oIt)throw new Error(dn);const d=pn(this,n,"password"),l=pn(this,n,"encryptionStrength")||3,c=pn(this,n,"zipCrypto");if(void 0!==d&&void 0!==l&&(l<1||l>3))throw new Error(ln);e&&!e.initialized&&await e.init();let f=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),f=new Uint8Array(t),u.forEach(((t,n)=>{if(n>bt)throw new Error(cn);if(t.length>bt)throw new Error(fn);f.set(new Uint16Array([n]),e),f.set(new Uint16Array([t.length]),e+2),f.set(t,e+4),e+=4+t.length}))}const p=e?1.05*e.size:0,h=n.zip64||this.options.zip64||this.offset>=gt||p>=gt||this.offset+p>=gt,m=pn(this,n,"level"),x=pn(this,n,"useWebWorkers"),_=pn(this,n,"bufferedWrite"),w=pn(this,n,"keepOrder"),g=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,d;r.set(e,null);try{let l,c;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>d=t))),i.bufferedWrite||t.lockWrite?(l=new _t,await l.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),l=a),c=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),d=i.level,l=0!==d&&!i.directory,c=i.zip64;let f,u;if(o&&!i.zipCrypto){f=new Uint8Array(un.length+2);const t=new DataView(f.buffer);mn(t,0,Et),f.set(un,2),u=i.encryptionStrength,hn(t,8,u)}else f=new Uint8Array(0);const p={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:f,rawExtraField:i.rawExtraField};let h=2056,m=0;l&&(m=8);c&&(p.version=p.version>45?p.version:45);o&&(h|=1,i.zipCrypto||(p.version=p.version>51?p.version:51,m=99,l&&(p.rawExtraFieldAES[9]=8)));const x=p.headerArray=new Uint8Array(26),_=new DataView(x.buffer);mn(_,0,p.version),mn(_,2,h),mn(_,4,m);const w=new Uint32Array(1),g=new DataView(w.buffer);mn(g,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),mn(g,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const b=w[0];xn(_,6,b),mn(_,22,r.length),mn(_,24,0);const v=new Uint8Array(30+r.length);let y;xn(new DataView(v.buffer),0,vt),v.set(x,4),v.set(r,30);let k=0,A=0;if(t){k=t.size;const r=await Ee(n.Deflate,{codecType:me,level:d,password:s,encryptionStrength:u,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&b>>8&255,signed:!0,compressed:l,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(v),y=await De(r,t,e,0,k,n,{onprogress:i.onprogress}),A=y.length}else await e.writeUint8Array(v);const U=new Uint8Array(c?24:16),z=new DataView(U.buffer);if(xn(z,0,yt),t)if(o&&!i.zipCrypto||void 0===y.signature||(xn(_,10,y.signature),xn(z,4,y.signature),p.signature=y.signature),c){const t=new DataView(p.rawExtraFieldZip64.buffer);mn(t,0,1),mn(t,2,24),xn(_,14,gt),_n(z,8,BigInt(A)),_n(t,12,BigInt(A)),xn(_,18,gt),_n(z,16,BigInt(k)),_n(t,4,BigInt(k))}else xn(_,14,A),xn(z,8,A),xn(_,18,k),xn(z,12,k);await e.writeUint8Array(U);const E=v.length+(y?y.length:0)+U.length;return Object.assign(p,{compressedSize:A,uncompressedSize:k,lastModDate:a,rawLastModDate:b,encrypted:o,length:E}),p}(n,l,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,c),l!=a&&(t.lockWrite&&await t.lockWrite,o&&await o,await a.writeUint8Array(l.getData())),c.offset=t.offset,c.zip64){_n(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return t.offset+=c.length,c}finally{d&&d(),s&&(t.lockWrite=null,s())}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:f,zip64:h,password:d,level:m,useWebWorkers:x,encryptionStrength:l,zipCrypto:c,bufferedWrite:_,keepOrder:w}));return Object.assign(g,{name:t,comment:r,extraField:u}),new Fe(g)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=gt||r>=gt||s>=bt,d=new Uint8Array(r+(o?98:22)),l=new DataView(d.buffer);if(t.length){if(!(t.length<=bt))throw new Error(rn);mn(l,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;xn(l,i,kt),mn(l,i+4,t.version),d.set(t.headerArray,i+6),mn(l,i+30,a),mn(l,i+32,t.rawComment.length),t.directory&&hn(l,i+38,16),t.zip64?xn(l,i+42,gt):xn(l,i+42,t.offset),d.set(e,i+46),d.set(n,i+46+e.length),d.set(r,i+46+e.length+n.length),d.set(t.rawExtraField,46+e.length+n.length+r.length),d.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(xn(l,i,Ut),_n(l,i+4,BigInt(44)),mn(l,i+12,45),mn(l,i+14,45),_n(l,i+24,BigInt(s)),_n(l,i+32,BigInt(s)),_n(l,i+40,BigInt(r)),_n(l,i+48,BigInt(a)),xn(l,i+56,zt),_n(l,i+64,BigInt(a)+BigInt(r)),xn(l,i+72,1),s=bt,a=gt,r=gt,i+=76),xn(l,i,At),mn(l,i+8,s),mn(l,i+10,s),xn(l,i+12,r),xn(l,i+16,a),await e.writeUint8Array(d),t.length&&await e.writeUint8Array(t),e.getData()}}{constructor(t,e){super(t,e,B())}}const gn=524288;class bn{constructor(t,e,n,i){if(t.root&&i&&i.getChildByName(e))throw new Error("Entry filename already exists");n||(n={}),this.fs=t,this.name=e,this.data=n.data,this.id=t.entries.length,this.parent=i,this.children=[],this.uncompressedSize=0,t.entries.push(this),i&&this.parent.children.push(this)}moveTo(t){this.fs.move(this,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}}class vn extends bn{constructor(t,e,n,i){super(t,e,n,i),this.Reader=n.Reader,this.Writer=n.Writer,n.getData&&(this.getData=n.getData)}async getData(t,e={}){return!t||t.constructor==this.Writer&&this.data?this.data:(this.reader=new this.Reader(this.data,e),await this.reader.init(),t.initialized||await t.init(),this.uncompressedSize=this.reader.size,async function(t,e){return n();async function n(i=0){const r=i*gn;if(re.file((i=>n(t.addBlob(e.name,i))),i)));async function n(t,e){const r=await i(e);for(const e of r)e.isDirectory?await n(t.addDirectory(e.name),e):await new Promise(((n,i)=>{e.file((i=>{const r=t.addBlob(e.name,i);r.uncompressedSize=i.size,n(r)}),i)}))}function i(t){return new Promise(((e,n)=>{let i=[];function r(t){t.readEntries((n=>{n.length?(i=i.concat(n),r(t)):e(i)}),n)}t.isDirectory&&r(t.createReader()),t.isFile&&e(i)}))}}(this,t)}async addData(t,e){return Rn(this,t,e)}async importBlob(t,e={}){await this.importZip(new ot(t),e)}async importData64URI(t,e={}){await this.importZip(new at(t),e)}async importUint8Array(t,e={}){await this.importZip(new xt(t),e)}async importHttpContent(t,e={}){await this.importZip(new mt(t,e),e)}async exportBlob(t={}){return this.exportZip(new dt("application/zip"),t)}async exportData64URI(t={}){return this.exportZip(new st("application/zip"),t)}async exportUint8Array(t={}){return this.exportZip(new _t,t)}async importZip(t,e){t.initialized||await t.init();const n=new en(t,e);(await n.getEntries()).forEach((t=>{let n=this;const i=t.filename.split("/"),r=i.pop();i.forEach((t=>n=n.getChildByName(t)||new yn(this.fs,t,null,n))),t.directory||Rn(n,r,{data:t,Reader:An(Object.assign({},e))})}))}async exportZip(t,e){await Un(this),await t.init();const n=new wn(t,e);return await async function(t,e,n,i){const r=e,a=new Map;async function s(t,e){async function o(){if(i.bufferedWrite)await Promise.all(e.children.map(d));else for(const t of e.children)await d(t)}async function d(e){const o=i.relativePath?e.getRelativeName(r):e.getFullname();await t.add(o,e.reader,Object.assign({directory:e.directory},Object.assign({},i,{onprogress:t=>{if(i.onprogress){a.set(o,t);try{i.onprogress(Array.from(a.values()).reduce(((t,e)=>t+e)),n)}catch(t){}}}}))),await s(t,e)}await o()}await s(t,e)}(n,this,function(t,e){let n=0;return t.forEach(i),n;function i(t){n+=t[e],t.children&&t.children.forEach(i)}}([this],"uncompressedSize"),e),await n.close(),t.getData()}getChildByName(t){for(let e=0;e{n.id==t.id&&e.splice(i,1)}))}function En(t){t.entries=[],t.root=new yn(t)}function Rn(t,e,n,i){if(t.directory)return i?new yn(t.fs,e,n,t):new vn(t.fs,e,n,t);throw new Error("Parent entry is not a directory")}(()=>{if("function"==typeof URL.createObjectURL){const t=(()=>{const 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,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),d=Object.assign({length:16},r),l=["deriveBits"],c=["sign"],f=[8,12,16],u=[16,24,32],p=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class m{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await h.decrypt(Object.assign({counter:this.counter},d),this.keys.key,t);return w(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=g(this.input,t)),n};if(this.password){const e=t.subarray(0,f[this.strength]+2);await async function(t,e,n){await _(t,n,e.subarray(0,f[t.strength]),["decrypt"]);const i=e.subarray(f[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(f[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=g(this.pendingInput,t),n=b(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},d),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class x{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await h.encrypt(Object.assign({counter:this.counter},d),this.keys.key,a);return w(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=g(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(f[t.strength]));return await _(t,e,n,["encrypt"]),g(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=g(this.pendingInput,t),i=b(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},d),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=g(this.output,t)}const e=await h.sign(i,this.keys.authentication,this.output.subarray(f[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:g(t,n),signature:n}}}async function _(t,e,n,i){t.counter=new Uint8Array(p);const d=(new TextEncoder).encode(e),f=await h.importKey("raw",d,a,!1,l),m=await h.deriveBits(Object.assign({salt:n},s),f,8*(2*u[t.strength]+2)),x=new Uint8Array(m);t.keys={key:await h.importKey("raw",x.subarray(0,u[t.strength]),r,!0,i),authentication:await h.importKey("raw",x.subarray(u[t.strength],2*u[t.strength]),o,!1,c),passwordVerification:x.subarray(2*u[t.strength])}}function w(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function g(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 b(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return k(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class y{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function E(t){const e=2|t.keys[2];return R(Math.imul(e,1^e)>>>8)}function R(t){return 255&t}function D(t){return 4294967295&t}class I{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new m(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new y(n.password,n.passwordVerification):new x(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const F={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),S=function(t,e){return e.codecType.startsWith("deflate")?new j(t,e):e.codecType.startsWith("inflate")?new I(t,e):void 0}(n,e)},append:async t=>({data:await S.append(t.data)}),flush:()=>S.flush()};let S;function C(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=F[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}})}}));const T=[0,1,2,3].concat(...C([[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 q(){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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,d,l=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);d=a;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*d]=i[2*s]+i[2*o],n.depth[d]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=d,n.heap[1]=d++,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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,d,l,c,f,u,p=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)d=e.heap[o],c=n[2*n[2*d+1]+1]+1,c>s&&(c=s,p++),n[2*d+1]=c,d>t.max_code||(e.bl_count[c]++,f=0,d>=a&&(f=r[d-a]),u=n[2*d],e.opt_len+=u*(c+f),i&&(e.static_len+=u*(i[2*d+1]+f)));if(0!==p){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(c=s;0!==c;c--)for(d=e.bl_count[c];0!==d;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=c&&(e.opt_len+=(c-n[2*l+1])*n[2*l],n[2*l+1]=c),d--)}}(n),function(t,n,i){const r=[];let a,s,o,d=0;for(a=1;a<=15;a++)r[a]=d=d+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function O(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function M(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}q._length_code=[0,1,2,3,4,5,6,7].concat(...C([[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]])),q.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],q.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],q.d_code=function(t){return t<256?T[t]:T[256+(t>>>7)]},q.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],q.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],q.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],q.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O.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],O.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],O.static_l_desc=new O(O.static_ltree,q.extra_lbits,257,286,15),O.static_d_desc=new O(O.static_dtree,q.extra_dbits,0,30,15),O.static_bl_desc=new O(null,q.extra_blbits,0,19,7);const W=[new M(0,0,0,0,0),new M(4,4,8,4,1),new M(4,5,16,8,1),new M(4,6,32,32,1),new M(4,4,16,16,2),new M(8,16,32,32,2),new M(8,16,128,128,2),new M(8,32,128,256,2),new M(32,128,258,1024,2),new M(32,258,258,4096,2)],B=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function L(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;X>16-i?(n=t,Y|=n<>>16-X,X+=i-16):(Y|=t<=8&&(Q(255&Y),Y>>>=8,X-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[H+2*P]=e>>>8&255,t.pending_buf[H+2*P+1]=255&e,t.pending_buf[V+P]=255&n,P++,0===e?j[2*n]++:(Z++,e--,j[2*(q._length_code[n]+256+1)]++,F[2*q.d_code(e)]++),0==(8191&P)&&E>2){for(i=8*P,r=v-_,a=0;a<30;a++)i+=F[2*a]*(5+q.extra_dbits[a]);if(i>>>=3,Z8?$(Y):X>0&&Q(255&Y),Y=0,X=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),K=8,$(n),$(~n),t.pending_buf.set(d.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function dt(e,n,i){let r,a,s=0;E>0?(C.build_tree(t),T.build_tree(t),s=function(){let e;for(J(j,C.max_code),J(F,T.max_code),M.build_tree(t),e=18;e>=3&&0===S[2*q.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(O.static_ltree,O.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?_:-1,v-_,t),_=v,e.flush_pending()}function ct(){let t,n,i,r;do{if(r=l-k-v,0===r&&0===v&&0===k)r=a;else if(-1==r)r--;else if(v>=a+a-262){d.set(d.subarray(a,a+a),0),y-=a,v-=a,_-=a,t=p,i=t;do{n=65535&f[--i],f[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&c[--i],c[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(d,v+k,r),k+=t,k>=3&&(u=255&d[v],u=(u<a-262?v-(a-262):0;let f=I;const u=o,p=v+258;let h=d[r+s-1],m=d[r+s];A>=D&&(i>>=2),f>k&&(f=k);do{if(e=t,d[e+s]==m&&d[e+s-1]==h&&d[e]==d[r]&&d[++e]==d[r+1]){r+=2,e++;do{}while(d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&rs){if(y=t,s=n,n>=f)break;h=d[r+s-1],m=d[r+s]}}}while((t=65535&c[t&u])>l&&0!=--i);return s<=k?s:k}function ut(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,C.dyn_tree=j,C.stat_desc=O.static_l_desc,T.dyn_tree=F,T.stat_desc=O.static_d_desc,M.dyn_tree=S,M.stat_desc=O.static_bl_desc,Y=0,X=0,K=8,G(),function(){l=2*a,f[p-1]=0;for(let t=0;t9||8!=l||r<9||r>15||n<0||n>9||_<0||_>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(W[E].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,z=W[E].max_lazy,D=W[E].good_length,I=W[E].nice_length,U=W[E].max_chain),R=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,l=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,l=i-s),d.set(e.subarray(l,l+s),0),v=s,_=s,u=255&d[0],u=(u<4||h<0)return-2;if(!l.next_out||!l.next_in&&0!==l.avail_in||666==n&&4!=h)return l.msg=B[4],-2;if(0===l.avail_out)return l.msg=B[7],-5;var S;if(e=l,j=r,r=h,42==n&&(D=8+(s-8<<4)<<8,I=(E-1&255)>>1,I>3&&(I=3),D|=I<<6,0!==v&&(D|=32),D+=31-D%31,n=113,Q((S=D)>>8&255),Q(255&S)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&h<=j&&4!=h)return e.msg=B[7],-5;if(666==n&&0!==e.avail_in)return l.msg=B[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(F=-1,W[E].func){case 0:F=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(k<=1){if(ct(),0===k&&0==t)return 0;if(0===k)break}if(v+=k,k=0,n=_+r,(0===v||v>=n)&&(k=v-n,v=n,lt(!1),0===e.avail_out))return 0;if(v-_>=a-262&&(lt(!1),0===e.avail_out))return 0}return lt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:F=function(t){let n,i=0;for(;;){if(k<262){if(ct(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(u=(u<=3)if(n=rt(v-y,w-3),k-=w,w<=z&&k>=3){w--;do{v++,u=(u<=3&&(u=(u<4096)&&(w=2)),A>=3&&w<=A){i=v+k-3,n=rt(v-1-g,A-3),k-=A-1,A-=2;do{++v<=i&&(u=(u<0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(l),c.forEach((function(t){s.set(t,d),d+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}N.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new V,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 r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 H=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Z=[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],K=[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],Y=[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],X=[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],G=[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],J=[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 Q(){let t,e,n,i,r,a;function s(t,e,s,o,d,l,c,f,u,p,h){let m,x,_,w,g,b,v,y,k,A,U,z,E,R,D;A=0,g=s;do{n[t[e+A]]++,A++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,f[0]=0,0;for(y=f[0],b=1;b<=15&&0===n[b];b++);for(v=b,yg&&(y=g),f[0]=y,R=1<z+y;){if(w++,z+=y,D=_-z,D=D>y?y:D,(x=1<<(b=v-z))>m+1&&(x-=m+1,E=v,b1440)return-3;r[w]=U=p[0],p[0]+=D,0!==w?(a[w]=g,i[0]=b,i[1]=y,b=g>>>z-y,i[2]=U-r[w-1]-b,u.set(i,3*(r[w-1]+b))):c[0]=U}for(i[1]=v-z,A>=s?i[0]=192:h[A]>>z;b>>=1)g^=b;for(g^=b,k=(1<257?(-3==p?u.msg="oversubscribed distance tree":-5==p?(u.msg="incomplete distance tree",p=-3):-4!=p&&(u.msg="empty distance tree with lengths",p=-3),p):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,d=0,l=0,c=0,f=0,u=0,p=0,h=0;function m(t,e,n,i,r,a,s,o){let d,l,c,f,u,p,h,m,x,_,w,g,b,v,y,k;h=o.next_in_index,m=o.avail_in,u=s.bitb,p=s.bitk,x=s.write,_=x>=l[k+1],p-=l[k+1],0!=(16&f)){for(f&=15,b=l[k+2]+(u&H[f]),u>>=f,p-=f;p<15;)m--,u|=(255&o.read_byte(h++))<>=l[k+1],p-=l[k+1],0!=(16&f)){for(f&=15;p>=f,p-=f,_-=b,x>=v)y=x-v,x-y>0&&2>x-y?(s.window[x++]=s.window[y++],s.window[x++]=s.window[y++],b-=2):(s.window.set(s.window.subarray(y,y+2),x),x+=2,y+=2,b-=2);else{y=x-v;do{y+=s.end}while(y<0);if(f=s.end-y,b>f){if(b-=f,x-y>0&&f>x-y)do{s.window[x++]=s.window[y++]}while(0!=--f);else s.window.set(s.window.subarray(y,y+f),x),x+=f,y+=f,f=0;y=0}}if(x-y>0&&b>x-y)do{s.window[x++]=s.window[y++]}while(0!=--b);else s.window.set(s.window.subarray(y,y+b),x),x+=b,y+=b,b=0;break}if(0!=(64&f))return o.msg="invalid distance code",b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,-3;d+=l[k+2],d+=u&H[f],k=3*(c+d),f=l[k]}break}if(0!=(64&f))return 0!=(32&f)?(b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,1):(o.msg="invalid literal/length code",b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,-3);if(d+=l[k+2],d+=u&H[f],k=3*(c+d),0===(f=l[k])){u>>=l[k+1],p-=l[k+1],s.window[x++]=l[k+2],_--;break}}else u>>=l[k+1],p-=l[k+1],s.window[x++]=l[k+2],_--}while(_>=258&&m>=10);return b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,0}t.init=function(t,a,s,o,d,l){e=0,f=t,u=a,i=s,p=o,r=d,h=l,n=null},t.proc=function(t,x,_){let w,g,b,v,y,k,A,U=0,z=0,E=0;for(E=x.next_in_index,v=x.avail_in,U=t.bitb,z=t.bitk,y=t.write,k=y=258&&v>=10&&(t.bitb=U,t.bitk=z,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,_=m(f,u,i,p,r,h,t,x),E=x.next_in_index,v=x.avail_in,U=t.bitb,z=t.bitk,y=t.write,k=y>>=n[g+1],z-=n[g+1],b=n[g],0===b){d=n[g+2],e=6;break}if(0!=(16&b)){l=15&b,a=n[g+2],e=2;break}if(0==(64&b)){o=b,s=g/3+n[g+2];break}if(0!=(32&b)){e=7;break}return e=9,x.msg="invalid literal/length code",_=-3,t.bitb=U,t.bitk=z,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,t.inflate_flush(x,_);case 2:for(w=l;z>=w,z-=w,o=u,n=r,s=h,e=3;case 3:for(w=o;z>=n[g+1],z-=n[g+1],b=n[g],0!=(16&b)){l=15&b,c=n[g+2],e=4;break}if(0==(64&b)){o=b,s=g/3+n[g+2];break}return e=9,x.msg="invalid distance code",_=-3,t.bitb=U,t.bitk=z,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,t.inflate_flush(x,_);case 4:for(w=l;z>=w,z-=w,e=5;case 5:for(A=y-c;A<0;)A+=t.end;for(;0!==a;){if(0===k&&(y==t.end&&0!==t.read&&(y=0,k=y7&&(z-=8,v++,E--),t.write=y,_=t.inflate_flush(x,_),y=t.write,k=yt.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(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,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(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,m,x,_,w,g,b,v;for(_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,g=n.write,b=g>>1){case 0:m>>>=3,x-=3,h=7&x,m>>>=h,x-=h,r=1;break;case 1:y=[],k=[],A=[[]],U=[[]],Q.inflate_trees_fixed(y,k,A,U),c.init(y[0],k[0],A[0],0,U[0],0),m>>>=3,x-=3,r=6;break;case 2:m>>>=3,x-=3,r=3;break;case 3:return m>>>=3,x-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;x<32;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>16&65535)!=(65535&m))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);a=65535&m,m=x=0,r=0!==a?2:0!==f?7:0;break;case 2:if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);if(0===b&&(g==n.end&&0!==n.read&&(g=0,b=gw&&(h=w),h>b&&(h=b),n.window.set(t.read_buf(_,h),g),_+=h,w-=h,g+=h,b-=h,0!=(a-=h))break;r=0!==f?7:0;break;case 3:for(;x<14;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,x-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;x<3;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>=3,x-=3}for(;o<19;)i[tt[o++]]=0;if(d[0]=7,h=p.inflate_trees_bits(i,d,l,u,t),0!=h)return-3==(e=h)&&(i=null,r=9),n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=d[0];x>>=h,x-=h,i[o++]=c;else{for(v=18==c?7:c-14,a=18==c?11:3;x>>=h,x-=h,a+=m&H[v],m>>>=v,x-=v,v=o,h=s,v+a>258+(31&h)+(h>>5&31)||16==c&&v<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);c=16==c?i[v-1]:0;do{i[v++]=c}while(0!=--a);o=v}}if(l[0]=-1,z=[],E=[],R=[],D=[],z[0]=9,E[0]=6,h=s,h=p.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,z,E,R,D,u,t),0!=h)return-3==h&&(i=null,r=9),e=h,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);c.init(z[0],E[0],u,R[0],u,D[0]),r=6;case 6:if(n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,g=n.write,b=g15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=d&&(r(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,l),l+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,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.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=P,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));L({workerScripts:{inflate:[e],deflate:[e]}})}})(),L({Deflate:function(t){const e=new w,n=512,i=new Uint8Array(n);let r=t?t.level:-1;void 0===r&&(r=-1),e.deflateInit(r),e.next_out=i,this.append=function(t,r){let a,s,o=0,d=0,l=0;const c=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,a=e.deflate(0),0!=a)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?c.push(new Uint8Array(i)):c.push(new Uint8Array(i.subarray(0,e.next_out_index)))),l+=e.next_out_index,r&&e.next_in_index>0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(l),c.forEach((function(t){s.set(t,d),d+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}},Inflate:function(){const t=new O,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,r){const a=[];let s,o,d=0,l=0,c=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===v){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?a.push(new Uint8Array(e)):a.push(new Uint8Array(e.subarray(0,t.next_out_index)))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=d&&(r(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,l),l+=t.length})),o}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=ot,t.BlobWriter=dt,t.Data64URIReader=at,t.Data64URIWriter=st,t.ERR_BAD_FORMAT=Se,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Oe,t.ERR_DUPLICATED_NAME=nn,t.ERR_ENCRYPTED=Be,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=qe,t.ERR_EOCDR_NOT_FOUND=Ce,t.ERR_EOCDR_ZIP64_NOT_FOUND=Te,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=We,t.ERR_HTTP_RANGE=K,t.ERR_INVALID_COMMENT=rn,t.ERR_INVALID_DATE=dn,t.ERR_INVALID_ENCRYPTION_STRENGTH=ln,t.ERR_INVALID_ENTRY_COMMENT=an,t.ERR_INVALID_ENTRY_NAME=sn,t.ERR_INVALID_EXTRAFIELD_DATA=fn,t.ERR_INVALID_EXTRAFIELD_TYPE=cn,t.ERR_INVALID_PASSWORD=Tt,t.ERR_INVALID_SIGNATURE=_e,t.ERR_INVALID_VERSION=on,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Me,t.ERR_UNSUPPORTED_COMPRESSION=Ve,t.ERR_UNSUPPORTED_ENCRYPTION=Le,t.HttpRangeReader=class extends mt{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=mt,t.Reader=et,t.TextReader=it,t.TextWriter=rt,t.Uint8ArrayReader=xt,t.Uint8ArrayWriter=_t,t.Writer=nt,t.ZipReader=en,t.ZipWriter=wn,t.configure=L,t.fs=kn,t.getMimeType=function(t){return t&&N[t.split(".").pop().toLowerCase()]||"application/octet-stream"},t.initShimAsyncCodec=(t,e={})=>({Deflate:H(t.Deflate,e.deflate),Inflate:H(t.Inflate,e.inflate)}),Object.defineProperty(t,"__esModule",{value:!0})})); +!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=256,n=256,i=-2,r=-5;function a(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const s=[0,1,2,3].concat(...a([[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 o(){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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,d,l=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);d=a;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*d]=i[2*s]+i[2*o],n.depth[d]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=d,n.heap[1]=d++,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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,d,l,c,f,u,p=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)d=e.heap[o],c=n[2*n[2*d+1]+1]+1,c>s&&(c=s,p++),n[2*d+1]=c,d>t.max_code||(e.bl_count[c]++,f=0,d>=a&&(f=r[d-a]),u=n[2*d],e.opt_len+=u*(c+f),i&&(e.static_len+=u*(i[2*d+1]+f)));if(0!==p){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(c=s;0!==c;c--)for(d=e.bl_count[c];0!==d;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=c&&(e.opt_len+=(c-n[2*l+1])*n[2*l],n[2*l+1]=c),d--)}}(n),function(t,n,i){const r=[];let a,s,o,d=0;for(a=1;a<=15;a++)r[a]=d=d+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function d(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[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]])),o.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],o.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],o.d_code=function(t){return t<256?s[t]:s[256+(t>>>7)]},o.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],o.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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d.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],d.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],d.static_l_desc=new d(d.static_ltree,o.extra_lbits,257,286,15),d.static_d_desc=new d(d.static_dtree,o.extra_dbits,0,30,15),d.static_bl_desc=new d(null,o.extra_blbits,0,19,7);function l(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],f=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],u=113,p=666,h=258,m=262;function x(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function dt(t,e){let n;const i=e;it>16-i?(n=t,nt|=n<>>16-it,it+=i-16):(nt|=t<=8&&(st(255&nt),nt>>>=8,it-=8)}function ut(n,i){let r,a,s;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[G+Q]=255&i,Q++,0===n?P[2*i]++:(tt++,n--,P[2*(o._length_code[i]+e+1)]++,H[2*o.d_code(n)]++),0==(8191&Q)&&B>2){for(r=8*Q,a=C-I,s=0;s<30;s++)r+=H[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,tt8?ot(nt):it>0&&st(255&nt),nt=0,it=0}function mt(e,n,i){dt(0+(i?1:0),3),function(e,n,i){ht(),et=8,i&&(ot(n),ot(~n)),t.pending_buf.set(v.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function xt(e,n,i){let r,a,s=0;B>0?(K.build_tree(t),Y.build_tree(t),s=function(){let e;for(at(P,K.max_code),at(H,Y.max_code),X.build_tree(t),e=18;e>=3&&0===Z[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?mt(e,n,i):a==r?(dt(2+(i?1:0),3),pt(d.static_ltree,d.static_dtree)):(dt(4+(i?1:0),3),function(t,e,n){let i;for(dt(t-257,5),dt(e-1,5),dt(n-4,4),i=0;i=0?I:-1,C-I,t),I=C,a.flush_pending()}function wt(){let t,e,n,i;do{if(i=y-q-C,0===i&&0===C&&0===q)i=w;else if(-1==i)i--;else if(C>=w+w-m){v.set(v.subarray(w,w+w),0),T-=w,C-=w,I-=w,t=z,n=t;do{e=65535&A[--n],A[n]=e>=w?e-w:0}while(0!=--t);t=w,n=t;do{e=65535&k[--n],k[n]=e>=w?e-w:0}while(0!=--t);i+=w}if(0===a.avail_in)return;t=a.read_buf(v,C+q,i),q+=t,q>=3&&(U=255&v[C],U=(U<w-m?C-(w-m):0;let o=N;const d=b,l=C+h;let c=v[r+a-1],f=v[r+a];O>=V&&(i>>=2),o>q&&(o=q);do{if(e=t,v[e+a]==f&&v[e+a-1]==c&&v[e]==v[r]&&v[++e]==v[r+1]){r+=2,e++;do{}while(v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&ra){if(T=t,a=n,n>=o)break;c=v[r+a-1],f=v[r+a]}}}while((t=65535&k[t&d])>s&&0!=--i);return a<=q?a:q}function bt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,s=u,_=0,K.dyn_tree=P,K.stat_desc=d.static_l_desc,Y.dyn_tree=H,Y.stat_desc=d.static_d_desc,X.dyn_tree=Z,X.stat_desc=d.static_bl_desc,nt=0,it=0,et=8,rt(),function(){y=2*w,A[z-1]=0;for(let t=0;t9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(e.dstate=t,g=r,w=1<9||n<0||n>2?i:(c[B].func!=c[e].func&&0!==t.total_in&&(r=t.deflate(1)),B!=e&&(B=e,W=c[B].max_lazy,V=c[B].good_length,N=c[B].nice_length,M=c[B].max_chain),L=n,r)},t.deflateSetDictionary=function(t,e,n){let r,a=n,o=0;if(!e||42!=s)return i;if(a<3)return 0;for(a>w-m&&(a=w-m,o=n-a),v.set(e.subarray(o,o+a),0),C=a,I=a,U=255&v[0],U=(U<4||o<0)return i;if(!e.next_out||!e.next_in&&0!==e.avail_in||s==p&&4!=o)return e.msg=f[4],i;if(0===e.avail_out)return e.msg=f[7],r;var V;if(a=e,E=_,_=o,42==s&&(x=8+(g-8<<4)<<8,y=(B-1&255)>>1,y>3&&(y=3),x|=y<<6,0!==C&&(x|=32),x+=31-x%31,s=u,st((V=x)>>8&255),st(255&V)),0!==t.pending){if(a.flush_pending(),0===a.avail_out)return _=-1,0}else if(0===a.avail_in&&o<=E&&4!=o)return a.msg=f[7],r;if(s==p&&0!==a.avail_in)return e.msg=f[7],r;if(0!==a.avail_in||0!==q||0!=o&&s!=p){switch(M=-1,c[B].func){case 0:M=function(t){let e,n=65535;for(n>l-5&&(n=l-5);;){if(q<=1){if(wt(),0===q&&0==t)return 0;if(0===q)break}if(C+=q,q=0,e=I+n,(0===C||C>=e)&&(q=C-e,C=e,_t(!1),0===a.avail_out))return 0;if(C-I>=w-m&&(_t(!1),0===a.avail_out))return 0}return _t(4==t),0===a.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:M=function(t){let e,n=0;for(;;){if(q=3&&(U=(U<=3)if(e=ut(C-T,j-3),q-=j,j<=W&&q>=3){j--;do{C++,U=(U<=3&&(U=(U<4096)&&(j=2)),O>=3&&j<=O){n=C+q-3,e=ut(C-1-F,O-3),q-=O-1,O-=2;do{++C<=n&&(U=(U<n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 g=-2,b=-3,v=-5,y=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=[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],A=[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],U=[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],z=[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],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],R=[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],D=15;function I(){let t,e,n,i,r,a;function s(t,e,s,o,d,l,c,f,u,p,h){let m,x,_,w,g,y,k,A,U,z,E,R,I,j,F;z=0,g=s;do{n[t[e+z]]++,z++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,f[0]=0,0;for(A=f[0],y=1;y<=D&&0===n[y];y++);for(k=y,Ag&&(A=g),f[0]=A,j=1<R+A;){if(w++,R+=A,F=_-R,F=F>A?A:F,(x=1<<(y=k-R))>m+1&&(x-=m+1,I=k,y1440)return b;r[w]=E=p[0],p[0]+=F,0!==w?(a[w]=g,i[0]=y,i[1]=A,y=g>>>R-A,i[2]=E-r[w-1]-y,u.set(i,3*(r[w-1]+y))):c[0]=E}for(i[1]=k-R,z>=s?i[0]=192:h[z]>>R;y>>=1)g^=y;for(g^=y,U=(1<257?(p==b?u.msg="oversubscribed distance tree":p==v?(u.msg="incomplete distance tree",p=b):-4!=p&&(u.msg="empty distance tree with lengths",p=b),p):0)}}I.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=k,i[0]=A,0};function j(){const t=this;let e,n,i,r,a=0,s=0,o=0,d=0,l=0,c=0,f=0,u=0,p=0,h=0;function m(t,e,n,i,r,a,s,o){let d,l,c,f,u,p,h,m,x,_,w,g,v,k,A,U;h=o.next_in_index,m=o.avail_in,u=s.bitb,p=s.bitk,x=s.write,_=x>=l[U+1],p-=l[U+1],0!=(16&f)){for(f&=15,v=l[U+2]+(u&y[f]),u>>=f,p-=f;p<15;)m--,u|=(255&o.read_byte(h++))<>=l[U+1],p-=l[U+1],0!=(16&f)){for(f&=15;p>=f,p-=f,_-=v,x>=k)A=x-k,x-A>0&&2>x-A?(s.window[x++]=s.window[A++],s.window[x++]=s.window[A++],v-=2):(s.window.set(s.window.subarray(A,A+2),x),x+=2,A+=2,v-=2);else{A=x-k;do{A+=s.end}while(A<0);if(f=s.end-A,v>f){if(v-=f,x-A>0&&f>x-A)do{s.window[x++]=s.window[A++]}while(0!=--f);else s.window.set(s.window.subarray(A,A+f),x),x+=f,A+=f,f=0;A=0}}if(x-A>0&&v>x-A)do{s.window[x++]=s.window[A++]}while(0!=--v);else s.window.set(s.window.subarray(A,A+v),x),x+=v,A+=v,v=0;break}if(0!=(64&f))return o.msg="invalid distance code",v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,b;d+=l[U+2],d+=u&y[f],U=3*(c+d),f=l[U]}break}if(0!=(64&f))return 0!=(32&f)?(v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,1):(o.msg="invalid literal/length code",v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,b);if(d+=l[U+2],d+=u&y[f],U=3*(c+d),0===(f=l[U])){u>>=l[U+1],p-=l[U+1],s.window[x++]=l[U+2],_--;break}}else u>>=l[U+1],p-=l[U+1],s.window[x++]=l[U+2],_--}while(_>=258&&m>=10);return v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,0}t.init=function(t,a,s,o,d,l){e=0,f=t,u=a,i=s,p=o,r=d,h=l,n=null},t.proc=function(t,x,_){let w,v,k,A,U,z,E,R=0,D=0,I=0;for(I=x.next_in_index,A=x.avail_in,R=t.bitb,D=t.bitk,U=t.write,z=U=258&&A>=10&&(t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=U,_=m(f,u,i,p,r,h,t,x),I=x.next_in_index,A=x.avail_in,R=t.bitb,D=t.bitk,U=t.write,z=U>>=n[v+1],D-=n[v+1],k=n[v],0===k){d=n[v+2],e=6;break}if(0!=(16&k)){l=15&k,a=n[v+2],e=2;break}if(0==(64&k)){o=k,s=v/3+n[v+2];break}if(0!=(32&k)){e=7;break}return e=9,x.msg="invalid literal/length code",_=b,t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=U,t.inflate_flush(x,_);case 2:for(w=l;D>=w,D-=w,o=u,n=r,s=h,e=3;case 3:for(w=o;D>=n[v+1],D-=n[v+1],k=n[v],0!=(16&k)){l=15&k,c=n[v+2],e=4;break}if(0==(64&k)){o=k,s=v/3+n[v+2];break}return e=9,x.msg="invalid distance code",_=b,t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=U,t.inflate_flush(x,_);case 4:for(w=l;D>=w,D-=w,e=5;case 5:for(E=U-c;E<0;)E+=t.end;for(;0!==a;){if(0===z&&(U==t.end&&0!==t.read&&(U=0,z=U7&&(D-=8,A++,I--),t.write=U,_=t.inflate_flush(x,_),U=t.write,z=Ut.avail_out&&(i=t.avail_out),0!==i&&e==v&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&e==v&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,m,x,_,w,v,k,A;for(_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,v=n.write,k=v>>1){case 0:m>>>=3,x-=3,h=7&x,m>>>=h,x-=h,r=1;break;case 1:U=[],z=[],E=[[]],R=[[]],I.inflate_trees_fixed(U,z,E,R),c.init(U[0],z[0],E[0],0,R[0],0),m>>>=3,x-=3,r=6;break;case 2:m>>>=3,x-=3,r=3;break;case 3:return m>>>=3,x-=3,r=9,t.msg="invalid block type",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e)}break;case 1:for(;x<32;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>16&65535)!=(65535&m))return r=9,t.msg="invalid stored block lengths",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);a=65535&m,m=x=0,r=0!==a?2:0!==f?7:0;break;case 2:if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);if(0===k&&(v==n.end&&0!==n.read&&(v=0,k=vw&&(h=w),h>k&&(h=k),n.window.set(t.read_buf(_,h),v),_+=h,w-=h,v+=h,k-=h,0!=(a-=h))break;r=0!==f?7:0;break;case 3:for(;x<14;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,x-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;x<3;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>=3,x-=3}for(;o<19;)i[F[o++]]=0;if(d[0]=7,h=p.inflate_trees_bits(i,d,l,u,t),0!=h)return(e=h)==b&&(i=null,r=9),n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=d[0];x>>=h,x-=h,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;x>>=h,x-=h,a+=m&y[A],m>>>=A,x-=A,A=o,h=s,A+a>258+(31&h)+(h>>5&31)||16==c&&A<1)return i=null,r=9,t.msg="invalid bit length repeat",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(l[0]=-1,D=[],j=[],S=[],C=[],D[0]=9,j[0]=6,h=s,h=p.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,D,j,S,C,u,t),0!=h)return h==b&&(i=null,r=9),e=h,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);c.init(D[0],j[0],u,S[0],u,C[0]),r=6;case 6:if(n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,v=n.write,k=v15?(t.inflateEnd(n),g):(t.wbits=i,n.istate.blocks=new S(n,1<>4)>r.wbits){r.mode=C,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=C,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=C,t.msg="need dictionary",r.marker=0,g;case 7:if(n=r.blocks.proc(t,n),n==b){r.mode=C,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case C:return b;default:return g}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return g;const a=t.istate;return r>=1<{const t={};for(let e in V)if(V.hasOwnProperty(e))for(let n in V[e])if(V[e].hasOwnProperty(n)){const i=V[e][n];if("string"==typeof i)t[i]=e+"/"+n;else for(let r=0;r{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)};if(this.codec=new t(Object.assign({},e,n)),typeof this.codec.onData==P)this.codec.onData=i;else{if(typeof this.codec.on!=P)throw new Error("Cannot register the callback function");this.codec.on("data",i)}}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const Z="HTTP error ",K="HTTP Range not supported",Y="text/plain",X="Content-Length",G="Accept-Ranges",J="HEAD",Q="GET",$="bytes";class tt{constructor(){this.size=0}init(){this.initialized=!0}}class et extends tt{}class nt extends tt{writeUint8Array(t){this.size+=t.length}}class it extends et{constructor(t){super(),this.blobReader=new ot(new Blob([t],{type:Y}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}}class rt extends nt{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:Y})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:Y})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}}class at extends et{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)}}class ot extends et{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class dt extends nt{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class lt extends et{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(),wt(this.url)&&!this.preventHeadRequest){const t=await ft(J,this.url,this.options);if(this.size=Number(t.headers.get(X)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(G)!=$)throw new Error(K);void 0===this.size&&await ct(this,this.options)}else await ct(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await ft(Q,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(K);return new Uint8Array(await n.arrayBuffer())}return this.data||await ct(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function ct(t,e){const n=await ft(Q,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function ft(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(Z+(r.statusText||r.status))}class ut extends et{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),wt(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>ht(J,this.url,(n=>{this.size=Number(n.getResponseHeader(X)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(G)==$?t():e(new Error(K)):void 0===this.size?pt(this,this.url).then((()=>t())).catch(e):t()}),e)));await pt(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await pt(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>ht(Q,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(K)}}function pt(t,e){return new Promise(((n,i)=>ht(Q,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function ht(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(Z+(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 mt extends et{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new ut(t,e):this.reader=new lt(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)}}class xt extends et{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}}class _t extends nt{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}}function wt(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 gt=4294967295,bt=65535,vt=67324752,yt=134695760,kt=33639248,At=101010256,Ut=101075792,zt=117853008,Et=39169,Rt=2048,Dt="/",It=new Date(2107,11,31),jt=new Date(1980,0,1),Ft="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const St=[];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;St[t]=e}class Ct{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^St[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Tt="Invalid pasword",qt=16,Ot="raw",Mt={name:"PBKDF2"},Wt={name:"HMAC"},Bt="SHA-1",Lt={name:"AES-CTR"},Vt=Object.assign({hash:Wt},Mt),Nt=Object.assign({iterations:1e3,hash:{name:Bt}},Mt),Pt=Object.assign({hash:Bt},Wt),Ht=Object.assign({length:qt},Lt),Zt=["deriveBits"],Kt=["sign"],Yt=[8,12,16],Xt=[16,24,32],Gt=10,Jt=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Qt=crypto.subtle;class $t{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+qt<=i.length-Gt){const t=i.subarray(r,r+qt),a=await Qt.decrypt(Object.assign({counter:this.counter},Ht),this.keys.key,t);return ne(this.counter),n.set(new Uint8Array(a),r),e(r+qt)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=ie(this.input,t)),n};if(this.password){const e=t.subarray(0,Yt[this.strength]+2);await async function(t,e,n){await ee(t,n,e.subarray(0,Yt[t.strength]),["decrypt"]);const i=e.subarray(Yt[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(Tt)}(this,e,this.password),this.password=null,t=t.subarray(Yt[this.strength]+2)}let n=new Uint8Array(t.length-Gt-(t.length-Gt)%qt),i=t;return this.pendingInput.length&&(i=ie(this.pendingInput,t),n=re(n,i.length-Gt-(i.length-Gt)%qt)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-Gt),i=t.subarray(t.length-Gt);let r=new Uint8Array(0);if(n.length){const t=await Qt.decrypt(Object.assign({counter:this.counter},Ht),e.key,n);r=new Uint8Array(t)}let a=!0;if(this.signed){const t=await Qt.sign(Wt,e.authentication,this.input.subarray(0,this.input.length-Gt)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(r+qt<=t.length){const a=t.subarray(r,r+qt),s=await Qt.encrypt(Object.assign({counter:this.counter},Ht),this.keys.key,a);return ne(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+qt)}return this.pendingInput=t.subarray(r),this.output=ie(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(Yt[t.strength]));return await ee(t,e,n,["encrypt"]),ie(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%qt);return i.set(n,0),this.pendingInput.length&&(t=ie(this.pendingInput,t),i=re(i,t.length-t.length%qt)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await Qt.encrypt(Object.assign({counter:this.counter},Ht),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=ie(this.output,t)}const e=await Qt.sign(Wt,this.keys.authentication,this.output.subarray(Yt[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,Gt);return{data:ie(t,n),signature:n}}}async function ee(t,e,n,i){t.counter=new Uint8Array(Jt);const r=(new TextEncoder).encode(e),a=await Qt.importKey(Ot,r,Vt,!1,Zt),s=await Qt.deriveBits(Object.assign({salt:n},Nt),a,8*(2*Xt[t.strength]+2)),o=new Uint8Array(s);t.keys={key:await Qt.importKey(Ot,o.subarray(0,Xt[t.strength]),Lt,!0,i),authentication:await Qt.importKey(Ot,o.subarray(Xt[t.strength],2*Xt[t.strength]),Pt,!1,Kt),passwordVerification:o.subarray(2*Xt[t.strength])}}function ne(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function ie(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 re(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const ae=12;class se{constructor(t,e){this.password=t,this.passwordVerification=e,ce(this,t)}async append(t){if(this.password){const e=de(this,t.subarray(0,ae));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(Tt);t=t.subarray(ae)}return de(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class oe{constructor(t,e){this.passwordVerification=e,this.password=t,ce(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(ae));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(le(this,i),0),n=ae}else e=new Uint8Array(t.length),n=0;return e.set(le(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function de(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function ue(t){const e=2|t.keys[2];return pe(Math.imul(e,1^e)>>>8)}function pe(t){return 255&t}function he(t){return 4294967295&t}const me="deflate",xe="inflate",_e="Invalid signature";class we{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Ct,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new se(e.password,e.passwordVerification):new $t(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(_e);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(_e)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class ge{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Ct,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new oe(e.password,e.passwordVerification):new te(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const be="init",ve="append",ye="flush",ke="message";var Ae=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-fs-full.min.js",document.baseURI).href)),t.worker.addEventListener(ke,r,!1),t.interface={append:t=>n({type:ve,data:t}),flush:()=>n({type:ye})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:be,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==be||r==ye||r==ve){const n=i.data;r==ye?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(me)?new ge(t,e):e.codecType.startsWith(xe)?new we(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Ue=[],ze=[];function Ee(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(Ue.length!t.busy));return n?Ae(n,t,e,Re,i,r):new Promise((n=>ze.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Re(t){const e=!ze.length;if(e)Ue=Ue.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=ze.splice(0,1);e(Ae(t,n,i,Re,r,a))}return e}async function De(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(d=0,l=0){if(dthis[e]=t[e]))}}const Se="File format is not recognized",Ce="End of central directory not found",Te="End of Zip64 central directory not found",qe="End of Zip64 central directory locator not found",Oe="Central directory header not found",Me="Local file header not found",We="Zip64 extra field not found",Be="File contains encrypted entry",Le="Encryption method not supported",Ve="Compression method not supported",Ne="utf-8",Pe=["uncompressedSize","compressedSize","offset"];class He{constructor(t,e={}){this.reader=t,this.options=e,this.config=B()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Se);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,At,22,1048560);if(!n)throw new Error(Ce);const i=new DataView(n.buffer);let r=tn(i,12),a=tn(i,16),s=$e(i,8),o=0;if(a==gt||r==gt||s==bt){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(tn(i,0)!=zt)throw new Error(Te);a=en(i,8);let d=await e.readUint8Array(a,56),l=new DataView(d.buffer);const c=n.offset-20-56;if(tn(l,0)!=Ut&&a!=c){const t=a;a=c,o=a-t,d=await e.readUint8Array(a,56),l=new DataView(d.buffer)}if(tn(l,0)!=Ut)throw new Error(qe);s=en(l,24),r=en(i,4),a-=en(l,40)}if(a<0||a>=e.size)throw new Error(Se);let d=0,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer);const f=n.offset-r;if(tn(c,d)!=kt&&a!=f){const t=a;a=f,o=a-t,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer)}if(a<0||a>=e.size)throw new Error(Se);const u=[];for(let e=0;ee.getData(t,n),u.push(r),d+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return u}async close(){}}class Ze{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=Ge(this,e,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error(Ve);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error(Ve);if(tn(r,0)!=vt)throw new Error(Me);const s=this.localDirectory={};Ke(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),Ye(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,d=this.bitFlag.encrypted&&s.bitFlag.encrypted,l=d&&!this.extraFieldAES;if(d){if(!l&&void 0===this.extraFieldAES.strength)throw new Error(Le);if(!a)throw new Error(Be)}const c=await Ee(this.config.Inflate,{codecType:xe,password:a,zipCrypto:l,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:Ge(this,e,"checkSignature"),passwordVerification:l&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:d,useWebWorkers:Ge(this,e,"useWebWorkers")},this.config);return t.initialized||await t.init(),await De(c,n,t,o,this.compressedSize,this.config,{onprogress:e.onprogress}),t.getData()}}function Ke(t,e,n){t.version=$e(e,n);const i=t.rawBitFlag=$e(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&Rt)==Rt},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=tn(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>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){}}(t.rawLastModDate),t.filenameLength=$e(e,n+22),t.extraFieldLength=$e(e,n+24)}function Ye(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==gt));for(let e=0;e{if(e[n]==gt){if(!t||void 0===t[n])throw new Error(We);e[n]=t[n]}}))}(l,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Xe(c,"filename","rawFilename",e,t);const f=e.extraFieldUnicodeComment=a.get(25461);f&&Xe(f,"comment","rawComment",e,t);const u=e.extraFieldAES=a.get(39169);u?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=Qe(i,0),t.vendorId=Qe(i,2);const r=Qe(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=$e(i,5)}else e.compressionMethod=n}(u,e,d):e.compressionMethod=d,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Xe(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=Qe(a,0),t.signature=tn(a,1);const s=new Ct;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==tn(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Ge(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Je(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;nbt)throw new Error(sn);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>bt)throw new Error(an);const s=this.options.version||n.version||0;if(s>bt)throw new Error(on);const o=n.lastModDate||new Date;if(oIt)throw new Error(dn);const d=hn(this,n,"password"),l=hn(this,n,"encryptionStrength")||3,c=hn(this,n,"zipCrypto");if(void 0!==d&&void 0!==l&&(l<1||l>3))throw new Error(ln);e&&!e.initialized&&await e.init();let f=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),f=new Uint8Array(t),u.forEach(((t,n)=>{if(n>bt)throw new Error(cn);if(t.length>bt)throw new Error(fn);f.set(new Uint16Array([n]),e),f.set(new Uint16Array([t.length]),e+2),f.set(t,e+4),e+=4+t.length}))}const p=e?1.05*e.size:0,h=n.zip64||this.options.zip64||this.offset>=gt||p>=gt||this.offset+p>=gt,m=hn(this,n,"level"),x=hn(this,n,"useWebWorkers"),_=hn(this,n,"bufferedWrite"),w=hn(this,n,"keepOrder"),g=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,d;r.set(e,null);try{let l,c;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>d=t))),i.bufferedWrite||t.lockWrite?(l=new dt,await l.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),l=a),c=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),d=i.level,l=0!==d&&!i.directory,c=i.zip64;let f,u;if(o&&!i.zipCrypto){f=new Uint8Array(un.length+2);const t=new DataView(f.buffer);xn(t,0,Et),f.set(un,2),u=i.encryptionStrength,mn(t,8,u)}else f=new Uint8Array(0);const p={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:f,rawExtraField:i.rawExtraField};let h=2056,m=0;l&&(m=8);c&&(p.version=p.version>45?p.version:45);o&&(h|=1,i.zipCrypto||(p.version=p.version>51?p.version:51,m=99,l&&(p.rawExtraFieldAES[9]=8)));const x=p.headerArray=new Uint8Array(26),_=new DataView(x.buffer);xn(_,0,p.version),xn(_,2,h),xn(_,4,m);const w=new Uint32Array(1),g=new DataView(w.buffer);xn(g,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),xn(g,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const b=w[0];_n(_,6,b),xn(_,22,r.length),xn(_,24,0);const v=new Uint8Array(30+r.length);let y;_n(new DataView(v.buffer),0,vt),v.set(x,4),v.set(r,30);let k=0,A=0;if(t){k=t.size;const r=await Ee(n.Deflate,{codecType:me,level:d,password:s,encryptionStrength:u,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&b>>8&255,signed:!0,compressed:l,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(v),y=await De(r,t,e,0,k,n,{onprogress:i.onprogress}),A=y.length}else await e.writeUint8Array(v);const U=new Uint8Array(c?24:16),z=new DataView(U.buffer);if(_n(z,0,yt),t)if(o&&!i.zipCrypto||void 0===y.signature||(_n(_,10,y.signature),_n(z,4,y.signature),p.signature=y.signature),c){const t=new DataView(p.rawExtraFieldZip64.buffer);xn(t,0,1),xn(t,2,24),_n(_,14,gt),wn(z,8,BigInt(A)),wn(t,12,BigInt(A)),_n(_,18,gt),wn(z,16,BigInt(k)),wn(t,4,BigInt(k))}else _n(_,14,A),_n(z,8,A),_n(_,18,k),_n(z,12,k);await e.writeUint8Array(U);const E=v.length+(y?y.length:0)+U.length;return Object.assign(p,{compressedSize:A,uncompressedSize:k,lastModDate:a,rawLastModDate:b,encrypted:o,length:E}),p}(n,l,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,c),l!=a){const e=l.getData(),n=new FileReader,i=await new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)}));await Promise.all([t.lockWrite,o]),await a.writeUint8Array(new Uint8Array(i))}if(c.offset=t.offset,c.zip64){wn(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return t.offset+=c.length,c}finally{d&&d(),s&&(t.lockWrite=null,s())}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:f,zip64:h,password:d,level:m,useWebWorkers:x,encryptionStrength:l,zipCrypto:c,bufferedWrite:_,keepOrder:w}));return Object.assign(g,{name:t,comment:r,extraField:u}),new Fe(g)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=gt||r>=gt||s>=bt,d=new Uint8Array(r+(o?98:22)),l=new DataView(d.buffer);if(t.length){if(!(t.length<=bt))throw new Error(rn);xn(l,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;_n(l,i,kt),xn(l,i+4,t.version),d.set(t.headerArray,i+6),xn(l,i+30,a),xn(l,i+32,t.rawComment.length),t.directory&&mn(l,i+38,16),t.zip64?_n(l,i+42,gt):_n(l,i+42,t.offset),d.set(e,i+46),d.set(n,i+46+e.length),d.set(r,i+46+e.length+n.length),d.set(t.rawExtraField,46+e.length+n.length+r.length),d.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(_n(l,i,Ut),wn(l,i+4,BigInt(44)),xn(l,i+12,45),xn(l,i+14,45),wn(l,i+24,BigInt(s)),wn(l,i+32,BigInt(s)),wn(l,i+40,BigInt(r)),wn(l,i+48,BigInt(a)),_n(l,i+56,zt),wn(l,i+64,BigInt(a)+BigInt(r)),_n(l,i+72,1),s=bt,a=gt,r=gt,i+=76),_n(l,i,At),xn(l,i+8,s),xn(l,i+10,s),_n(l,i+12,r),_n(l,i+16,a),await e.writeUint8Array(d),t.length&&await e.writeUint8Array(t),e.getData()}}function hn(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function mn(t,e,n){t.setUint8(e,n)}function xn(t,e,n){t.setUint16(e,n,!0)}function _n(t,e,n){t.setUint32(e,n,!0)}function wn(t,e,n){t.setBigUint64(e,n,!0)}const gn=524288;class bn{constructor(t,e,n,i){if(t.root&&i&&i.getChildByName(e))throw new Error("Entry filename already exists");n||(n={}),this.fs=t,this.name=e,this.data=n.data,this.id=t.entries.length,this.parent=i,this.children=[],this.uncompressedSize=0,t.entries.push(this),i&&this.parent.children.push(this)}moveTo(t){this.fs.move(this,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}}class vn extends bn{constructor(t,e,n,i){super(t,e,n,i),this.Reader=n.Reader,this.Writer=n.Writer,n.getData&&(this.getData=n.getData)}async getData(t,e={}){return!t||t.constructor==this.Writer&&this.data?this.data:(this.reader=new this.Reader(this.data,e),await this.reader.init(),t.initialized||await t.init(),this.uncompressedSize=this.reader.size,async function(t,e){return n();async function n(i=0){const r=i*gn;if(re.file((i=>n(t.addBlob(e.name,i))),i)));async function n(t,e){const r=await i(e);for(const e of r)e.isDirectory?await n(t.addDirectory(e.name),e):await new Promise(((n,i)=>{e.file((i=>{const r=t.addBlob(e.name,i);r.uncompressedSize=i.size,n(r)}),i)}))}function i(t){return new Promise(((e,n)=>{let i=[];function r(t){t.readEntries((n=>{n.length?(i=i.concat(n),r(t)):e(i)}),n)}t.isDirectory&&r(t.createReader()),t.isFile&&e(i)}))}}(this,t)}async addData(t,e){return Rn(this,t,e)}async importBlob(t,e={}){await this.importZip(new ot(t),e)}async importData64URI(t,e={}){await this.importZip(new at(t),e)}async importUint8Array(t,e={}){await this.importZip(new xt(t),e)}async importHttpContent(t,e={}){await this.importZip(new mt(t,e),e)}async exportBlob(t={}){return this.exportZip(new dt("application/zip"),t)}async exportData64URI(t={}){return this.exportZip(new st("application/zip"),t)}async exportUint8Array(t={}){return this.exportZip(new _t,t)}async importZip(t,e){t.initialized||await t.init();const n=new He(t,e);(await n.getEntries()).forEach((t=>{let n=this;const i=t.filename.split("/"),r=i.pop();i.forEach((t=>n=n.getChildByName(t)||new yn(this.fs,t,null,n))),t.directory||Rn(n,r,{data:t,Reader:An(Object.assign({},e))})}))}async exportZip(t,e){await Un(this),await t.init();const n=new pn(t,e);return await async function(t,e,n,i){const r=e,a=new Map;async function s(t,e){async function o(){if(i.bufferedWrite)await Promise.all(e.children.map(d));else for(const t of e.children)await d(t)}async function d(e){const o=i.relativePath?e.getRelativeName(r):e.getFullname();await t.add(o,e.reader,Object.assign({directory:e.directory},Object.assign({},i,{onprogress:t=>{if(i.onprogress){a.set(o,t);try{i.onprogress(Array.from(a.values()).reduce(((t,e)=>t+e)),n)}catch(t){}}}}))),await s(t,e)}await o()}await s(t,e)}(n,this,function(t,e){let n=0;return t.forEach(i),n;function i(t){n+=t[e],t.children&&t.children.forEach(i)}}([this],"uncompressedSize"),e),await n.close(),t.getData()}getChildByName(t){for(let e=0;e{n.id==t.id&&e.splice(i,1)}))}function En(t){t.entries=[],t.root=new yn(t)}function Rn(t,e,n,i){if(t.directory)return i?new yn(t.fs,e,n,t):new vn(t.fs,e,n,t);throw new Error("Parent entry is not a directory")}(()=>{if("function"==typeof URL.createObjectURL){const t=(()=>{const 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,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),d=Object.assign({length:16},r),l=["deriveBits"],c=["sign"],f=[8,12,16],u=[16,24,32],p=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class m{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await h.decrypt(Object.assign({counter:this.counter},d),this.keys.key,t);return w(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=g(this.input,t)),n};if(this.password){const e=t.subarray(0,f[this.strength]+2);await async function(t,e,n){await _(t,n,e.subarray(0,f[t.strength]),["decrypt"]);const i=e.subarray(f[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(f[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=g(this.pendingInput,t),n=b(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},d),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class x{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await h.encrypt(Object.assign({counter:this.counter},d),this.keys.key,a);return w(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=g(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(f[t.strength]));return await _(t,e,n,["encrypt"]),g(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=g(this.pendingInput,t),i=b(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},d),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=g(this.output,t)}const e=await h.sign(i,this.keys.authentication,this.output.subarray(f[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:g(t,n),signature:n}}}async function _(t,e,n,i){t.counter=new Uint8Array(p);const d=(new TextEncoder).encode(e),f=await h.importKey("raw",d,a,!1,l),m=await h.deriveBits(Object.assign({salt:n},s),f,8*(2*u[t.strength]+2)),x=new Uint8Array(m);t.keys={key:await h.importKey("raw",x.subarray(0,u[t.strength]),r,!0,i),authentication:await h.importKey("raw",x.subarray(u[t.strength],2*u[t.strength]),o,!1,c),passwordVerification:x.subarray(2*u[t.strength])}}function w(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function g(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 b(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return k(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class y{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function E(t){const e=2|t.keys[2];return R(Math.imul(e,1^e)>>>8)}function R(t){return 255&t}function D(t){return 4294967295&t}class I{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new m(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new y(n.password,n.passwordVerification):new x(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const F={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),S=function(t,e){return e.codecType.startsWith("deflate")?new j(t,e):e.codecType.startsWith("inflate")?new I(t,e):void 0}(n,e)},append:async t=>({data:await S.append(t.data)}),flush:()=>S.flush()};let S;function C(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=F[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}})}}));const T=[0,1,2,3].concat(...C([[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 q(){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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,d,l=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);d=a;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*d]=i[2*s]+i[2*o],n.depth[d]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=d,n.heap[1]=d++,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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,d,l,c,f,u,p=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)d=e.heap[o],c=n[2*n[2*d+1]+1]+1,c>s&&(c=s,p++),n[2*d+1]=c,d>t.max_code||(e.bl_count[c]++,f=0,d>=a&&(f=r[d-a]),u=n[2*d],e.opt_len+=u*(c+f),i&&(e.static_len+=u*(i[2*d+1]+f)));if(0!==p){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(c=s;0!==c;c--)for(d=e.bl_count[c];0!==d;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=c&&(e.opt_len+=(c-n[2*l+1])*n[2*l],n[2*l+1]=c),d--)}}(n),function(t,n,i){const r=[];let a,s,o,d=0;for(a=1;a<=15;a++)r[a]=d=d+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function O(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function M(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}q._length_code=[0,1,2,3,4,5,6,7].concat(...C([[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]])),q.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],q.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],q.d_code=function(t){return t<256?T[t]:T[256+(t>>>7)]},q.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],q.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],q.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],q.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O.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],O.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],O.static_l_desc=new O(O.static_ltree,q.extra_lbits,257,286,15),O.static_d_desc=new O(O.static_dtree,q.extra_dbits,0,30,15),O.static_bl_desc=new O(null,q.extra_blbits,0,19,7);const W=[new M(0,0,0,0,0),new M(4,4,8,4,1),new M(4,5,16,8,1),new M(4,6,32,32,1),new M(4,4,16,16,2),new M(8,16,32,32,2),new M(8,16,128,128,2),new M(8,32,128,256,2),new M(32,128,258,1024,2),new M(32,258,258,4096,2)],B=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function L(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;X>16-i?(n=t,Y|=n<>>16-X,X+=i-16):(Y|=t<=8&&(Q(255&Y),Y>>>=8,X-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[H+2*P]=e>>>8&255,t.pending_buf[H+2*P+1]=255&e,t.pending_buf[V+P]=255&n,P++,0===e?j[2*n]++:(Z++,e--,j[2*(q._length_code[n]+256+1)]++,F[2*q.d_code(e)]++),0==(8191&P)&&E>2){for(i=8*P,r=v-_,a=0;a<30;a++)i+=F[2*a]*(5+q.extra_dbits[a]);if(i>>>=3,Z8?$(Y):X>0&&Q(255&Y),Y=0,X=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),K=8,$(n),$(~n),t.pending_buf.set(d.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function dt(e,n,i){let r,a,s=0;E>0?(C.build_tree(t),T.build_tree(t),s=function(){let e;for(J(j,C.max_code),J(F,T.max_code),M.build_tree(t),e=18;e>=3&&0===S[2*q.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(O.static_ltree,O.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?_:-1,v-_,t),_=v,e.flush_pending()}function ct(){let t,n,i,r;do{if(r=l-k-v,0===r&&0===v&&0===k)r=a;else if(-1==r)r--;else if(v>=a+a-262){d.set(d.subarray(a,a+a),0),y-=a,v-=a,_-=a,t=p,i=t;do{n=65535&f[--i],f[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&c[--i],c[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(d,v+k,r),k+=t,k>=3&&(u=255&d[v],u=(u<a-262?v-(a-262):0;let f=I;const u=o,p=v+258;let h=d[r+s-1],m=d[r+s];A>=D&&(i>>=2),f>k&&(f=k);do{if(e=t,d[e+s]==m&&d[e+s-1]==h&&d[e]==d[r]&&d[++e]==d[r+1]){r+=2,e++;do{}while(d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&rs){if(y=t,s=n,n>=f)break;h=d[r+s-1],m=d[r+s]}}}while((t=65535&c[t&u])>l&&0!=--i);return s<=k?s:k}function ut(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,C.dyn_tree=j,C.stat_desc=O.static_l_desc,T.dyn_tree=F,T.stat_desc=O.static_d_desc,M.dyn_tree=S,M.stat_desc=O.static_bl_desc,Y=0,X=0,K=8,G(),function(){l=2*a,f[p-1]=0;for(let t=0;t9||8!=l||r<9||r>15||n<0||n>9||_<0||_>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(W[E].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,z=W[E].max_lazy,D=W[E].good_length,I=W[E].nice_length,U=W[E].max_chain),R=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,l=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,l=i-s),d.set(e.subarray(l,l+s),0),v=s,_=s,u=255&d[0],u=(u<4||h<0)return-2;if(!l.next_out||!l.next_in&&0!==l.avail_in||666==n&&4!=h)return l.msg=B[4],-2;if(0===l.avail_out)return l.msg=B[7],-5;var S;if(e=l,j=r,r=h,42==n&&(D=8+(s-8<<4)<<8,I=(E-1&255)>>1,I>3&&(I=3),D|=I<<6,0!==v&&(D|=32),D+=31-D%31,n=113,Q((S=D)>>8&255),Q(255&S)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&h<=j&&4!=h)return e.msg=B[7],-5;if(666==n&&0!==e.avail_in)return l.msg=B[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(F=-1,W[E].func){case 0:F=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(k<=1){if(ct(),0===k&&0==t)return 0;if(0===k)break}if(v+=k,k=0,n=_+r,(0===v||v>=n)&&(k=v-n,v=n,lt(!1),0===e.avail_out))return 0;if(v-_>=a-262&&(lt(!1),0===e.avail_out))return 0}return lt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:F=function(t){let n,i=0;for(;;){if(k<262){if(ct(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(u=(u<=3)if(n=rt(v-y,w-3),k-=w,w<=z&&k>=3){w--;do{v++,u=(u<=3&&(u=(u<4096)&&(w=2)),A>=3&&w<=A){i=v+k-3,n=rt(v-1-g,A-3),k-=A-1,A-=2;do{++v<=i&&(u=(u<0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(l),c.forEach((function(t){s.set(t,d),d+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}N.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new V,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 r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 H=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Z=[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],K=[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],Y=[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],X=[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],G=[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],J=[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 Q(){let t,e,n,i,r,a;function s(t,e,s,o,d,l,c,f,u,p,h){let m,x,_,w,g,b,v,y,k,A,U,z,E,R,D;A=0,g=s;do{n[t[e+A]]++,A++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,f[0]=0,0;for(y=f[0],b=1;b<=15&&0===n[b];b++);for(v=b,yg&&(y=g),f[0]=y,R=1<z+y;){if(w++,z+=y,D=_-z,D=D>y?y:D,(x=1<<(b=v-z))>m+1&&(x-=m+1,E=v,b1440)return-3;r[w]=U=p[0],p[0]+=D,0!==w?(a[w]=g,i[0]=b,i[1]=y,b=g>>>z-y,i[2]=U-r[w-1]-b,u.set(i,3*(r[w-1]+b))):c[0]=U}for(i[1]=v-z,A>=s?i[0]=192:h[A]>>z;b>>=1)g^=b;for(g^=b,k=(1<257?(-3==p?u.msg="oversubscribed distance tree":-5==p?(u.msg="incomplete distance tree",p=-3):-4!=p&&(u.msg="empty distance tree with lengths",p=-3),p):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,d=0,l=0,c=0,f=0,u=0,p=0,h=0;function m(t,e,n,i,r,a,s,o){let d,l,c,f,u,p,h,m,x,_,w,g,b,v,y,k;h=o.next_in_index,m=o.avail_in,u=s.bitb,p=s.bitk,x=s.write,_=x>=l[k+1],p-=l[k+1],0!=(16&f)){for(f&=15,b=l[k+2]+(u&H[f]),u>>=f,p-=f;p<15;)m--,u|=(255&o.read_byte(h++))<>=l[k+1],p-=l[k+1],0!=(16&f)){for(f&=15;p>=f,p-=f,_-=b,x>=v)y=x-v,x-y>0&&2>x-y?(s.window[x++]=s.window[y++],s.window[x++]=s.window[y++],b-=2):(s.window.set(s.window.subarray(y,y+2),x),x+=2,y+=2,b-=2);else{y=x-v;do{y+=s.end}while(y<0);if(f=s.end-y,b>f){if(b-=f,x-y>0&&f>x-y)do{s.window[x++]=s.window[y++]}while(0!=--f);else s.window.set(s.window.subarray(y,y+f),x),x+=f,y+=f,f=0;y=0}}if(x-y>0&&b>x-y)do{s.window[x++]=s.window[y++]}while(0!=--b);else s.window.set(s.window.subarray(y,y+b),x),x+=b,y+=b,b=0;break}if(0!=(64&f))return o.msg="invalid distance code",b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,-3;d+=l[k+2],d+=u&H[f],k=3*(c+d),f=l[k]}break}if(0!=(64&f))return 0!=(32&f)?(b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,1):(o.msg="invalid literal/length code",b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,-3);if(d+=l[k+2],d+=u&H[f],k=3*(c+d),0===(f=l[k])){u>>=l[k+1],p-=l[k+1],s.window[x++]=l[k+2],_--;break}}else u>>=l[k+1],p-=l[k+1],s.window[x++]=l[k+2],_--}while(_>=258&&m>=10);return b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,0}t.init=function(t,a,s,o,d,l){e=0,f=t,u=a,i=s,p=o,r=d,h=l,n=null},t.proc=function(t,x,_){let w,g,b,v,y,k,A,U=0,z=0,E=0;for(E=x.next_in_index,v=x.avail_in,U=t.bitb,z=t.bitk,y=t.write,k=y=258&&v>=10&&(t.bitb=U,t.bitk=z,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,_=m(f,u,i,p,r,h,t,x),E=x.next_in_index,v=x.avail_in,U=t.bitb,z=t.bitk,y=t.write,k=y>>=n[g+1],z-=n[g+1],b=n[g],0===b){d=n[g+2],e=6;break}if(0!=(16&b)){l=15&b,a=n[g+2],e=2;break}if(0==(64&b)){o=b,s=g/3+n[g+2];break}if(0!=(32&b)){e=7;break}return e=9,x.msg="invalid literal/length code",_=-3,t.bitb=U,t.bitk=z,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,t.inflate_flush(x,_);case 2:for(w=l;z>=w,z-=w,o=u,n=r,s=h,e=3;case 3:for(w=o;z>=n[g+1],z-=n[g+1],b=n[g],0!=(16&b)){l=15&b,c=n[g+2],e=4;break}if(0==(64&b)){o=b,s=g/3+n[g+2];break}return e=9,x.msg="invalid distance code",_=-3,t.bitb=U,t.bitk=z,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,t.inflate_flush(x,_);case 4:for(w=l;z>=w,z-=w,e=5;case 5:for(A=y-c;A<0;)A+=t.end;for(;0!==a;){if(0===k&&(y==t.end&&0!==t.read&&(y=0,k=y7&&(z-=8,v++,E--),t.write=y,_=t.inflate_flush(x,_),y=t.write,k=yt.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(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,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(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,m,x,_,w,g,b,v;for(_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,g=n.write,b=g>>1){case 0:m>>>=3,x-=3,h=7&x,m>>>=h,x-=h,r=1;break;case 1:y=[],k=[],A=[[]],U=[[]],Q.inflate_trees_fixed(y,k,A,U),c.init(y[0],k[0],A[0],0,U[0],0),m>>>=3,x-=3,r=6;break;case 2:m>>>=3,x-=3,r=3;break;case 3:return m>>>=3,x-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;x<32;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>16&65535)!=(65535&m))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);a=65535&m,m=x=0,r=0!==a?2:0!==f?7:0;break;case 2:if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);if(0===b&&(g==n.end&&0!==n.read&&(g=0,b=gw&&(h=w),h>b&&(h=b),n.window.set(t.read_buf(_,h),g),_+=h,w-=h,g+=h,b-=h,0!=(a-=h))break;r=0!==f?7:0;break;case 3:for(;x<14;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,x-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;x<3;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>=3,x-=3}for(;o<19;)i[tt[o++]]=0;if(d[0]=7,h=p.inflate_trees_bits(i,d,l,u,t),0!=h)return-3==(e=h)&&(i=null,r=9),n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=d[0];x>>=h,x-=h,i[o++]=c;else{for(v=18==c?7:c-14,a=18==c?11:3;x>>=h,x-=h,a+=m&H[v],m>>>=v,x-=v,v=o,h=s,v+a>258+(31&h)+(h>>5&31)||16==c&&v<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);c=16==c?i[v-1]:0;do{i[v++]=c}while(0!=--a);o=v}}if(l[0]=-1,z=[],E=[],R=[],D=[],z[0]=9,E[0]=6,h=s,h=p.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,z,E,R,D,u,t),0!=h)return-3==h&&(i=null,r=9),e=h,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);c.init(z[0],E[0],u,R[0],u,D[0]),r=6;case 6:if(n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,g=n.write,b=g15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=d&&(r(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,l),l+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,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.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=P,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));L({workerScripts:{inflate:[e],deflate:[e]}})}})(),L({Deflate:function(t){const e=new w,n=512,i=new Uint8Array(n);let r=t?t.level:-1;void 0===r&&(r=-1),e.deflateInit(r),e.next_out=i,this.append=function(t,r){let a,s,o=0,d=0,l=0;const c=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,a=e.deflate(0),0!=a)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?c.push(new Uint8Array(i)):c.push(new Uint8Array(i.subarray(0,e.next_out_index)))),l+=e.next_out_index,r&&e.next_in_index>0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(l),c.forEach((function(t){s.set(t,d),d+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}},Inflate:function(){const t=new O,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,r){const a=[];let s,o,d=0,l=0,c=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===v){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?a.push(new Uint8Array(e)):a.push(new Uint8Array(e.subarray(0,t.next_out_index)))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=d&&(r(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,l),l+=t.length})),o}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=ot,t.BlobWriter=dt,t.Data64URIReader=at,t.Data64URIWriter=st,t.ERR_BAD_FORMAT=Se,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Oe,t.ERR_DUPLICATED_NAME=nn,t.ERR_ENCRYPTED=Be,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=qe,t.ERR_EOCDR_NOT_FOUND=Ce,t.ERR_EOCDR_ZIP64_NOT_FOUND=Te,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=We,t.ERR_HTTP_RANGE=K,t.ERR_INVALID_COMMENT=rn,t.ERR_INVALID_DATE=dn,t.ERR_INVALID_ENCRYPTION_STRENGTH=ln,t.ERR_INVALID_ENTRY_COMMENT=an,t.ERR_INVALID_ENTRY_NAME=sn,t.ERR_INVALID_EXTRAFIELD_DATA=fn,t.ERR_INVALID_EXTRAFIELD_TYPE=cn,t.ERR_INVALID_PASSWORD=Tt,t.ERR_INVALID_SIGNATURE=_e,t.ERR_INVALID_VERSION=on,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Me,t.ERR_UNSUPPORTED_COMPRESSION=Ve,t.ERR_UNSUPPORTED_ENCRYPTION=Le,t.HttpRangeReader=class extends mt{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=mt,t.Reader=et,t.TextReader=it,t.TextWriter=rt,t.Uint8ArrayReader=xt,t.Uint8ArrayWriter=_t,t.Writer=nt,t.ZipReader=He,t.ZipWriter=pn,t.configure=L,t.fs=kn,t.getMimeType=function(t){return t&&N[t.split(".").pop().toLowerCase()]||"application/octet-stream"},t.initShimAsyncCodec=(t,e={})=>({Deflate:H(t.Deflate,e.deflate),Inflate:H(t.Inflate,e.inflate)}),Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/zip-fs.js b/dist/zip-fs.js index fd838ba6..f62221f5 100644 --- a/dist/zip-fs.js +++ b/dist/zip-fs.js @@ -85,6 +85,38 @@ var configureWebWorker = ()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const 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={name:"PBKDF2"},i={name:"HMAC"},a={name:"AES-CTR"},r=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},a),d=["deriveBits"],_=["sign"],u=[8,12,16],f=[16,24,32],c=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await h.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return x(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=y(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await p(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2);}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=y(this.pendingInput,t),n=g(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},l),e.key,n);r=new Uint8Array(t);}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=a[t]&&(s=!1);}return {valid:s,data:r}}}class b{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,r);return x(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=y(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await p(t,e,n,["encrypt"]),y(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=y(this.pendingInput,t),i=g(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=y(this.output,t);}const e=await h.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return {data:y(t,n),signature:n}}}async function p(t,e,n,i){t.counter=new Uint8Array(c);const l=(new TextEncoder).encode(e),u=await h.importKey("raw",l,r,!1,d),w=await h.deriveBits(Object.assign({salt:n},s),u,8*(2*f[t.strength]+2)),b=new Uint8Array(w);t.keys={key:await h.importKey("raw",b.subarray(0,f[t.strength]),a,!0,i),authentication:await h.importKey("raw",b.subarray(f[t.strength],2*f[t.strength]),o,!1,_),passwordVerification:b.subarray(2*f[t.strength])};}function x(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0;}}function y(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 g(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t);}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return k(this,t)}async flush(){return {valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t);}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12;}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return {data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function E(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function C(t){return 4294967295&t}class z{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength);}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new b(n.password,n.encryptionStrength);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const M={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),V=function(t,e){return e.codecType.startsWith("deflate")?new j(t,e):e.codecType.startsWith("inflate")?new z(t,e):void 0}(n,e);},append:async t=>({data:await V.append(t.data)}),flush:()=>V.flush()};let V;function O(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=M[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}});}}));const D=[0,1,2,3].concat(...O([[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 K(){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,d=-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,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],_=n[2*n[2*l+1]+1]+1,_>s&&(_=s,c++),n[2*l+1]=_,l>t.max_code||(e.bl_count[_]++,u=0,l>=r&&(u=a[l-r]),f=n[2*l],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(_=s;0!==_;_--)for(l=e.bl_count[_];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),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 R(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;}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;}K._length_code=[0,1,2,3,4,5,6,7].concat(...O([[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]])),K.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],K.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],K.d_code=function(t){return t<256?D[t]:D[256+(t>>>7)]},K.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],K.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],K.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R.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],R.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],R.static_l_desc=new R(R.static_ltree,K.extra_lbits,257,286,15),R.static_d_desc=new R(R.static_dtree,K.extra_dbits,0,30,15),R.static_bl_desc=new R(null,K.extra_blbits,0,19,7);const B=[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)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function P(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[F+2*H]=e>>>8&255,t.pending_buf[F+2*H+1]=255&e,t.pending_buf[q+H]=255&n,H++,0===e?j[2*n]++:(G++,e--,j[2*(K._length_code[n]+256+1)]++,M[2*K.d_code(e)]++),0==(8191&H)&&E>2){for(i=8*H,a=m-p,r=0;r<30;r++)i+=M[2*r]*(5+K.extra_dbits[r]);if(i>>>=3,G8?$(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,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n;}(e,n);}function lt(e,n,i){let a,r,s=0;E>0?(O.build_tree(t),D.build_tree(t),s=function(){let e;for(Y(j,O.max_code),Y(M,D.max_code),T.build_tree(t),e=18;e>=3&&0===V[2*K.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(R.static_ltree,R.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 _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){l.set(l.subarray(r,r+r),0),v-=r,m-=r,p-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(l,m+k,a),k+=t,k>=3&&(f=255&l[m],f=(f<r-262?m-(r-262):0;let u=z;const f=o,c=m+258;let h=l[a+s-1],w=l[a+s];A>=C&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&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(v=t,s=n,n>=u)break;h=l[a+s-1],w=l[a+s];}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}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,O.dyn_tree=j,O.stat_desc=R.static_l_desc,D.dyn_tree=M,D.stat_desc=R.static_d_desc,T.dyn_tree=V,T.stat_desc=R.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||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:(B[E].func!=B[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=B[E].max_lazy,C=B[E].good_length,z=B[E].nice_length,U=B[E].max_chain),S=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,p=s,f=255&l[0],f=(f<4||h<0)return -2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=L[4],-2;if(0===d.avail_out)return d.msg=L[7],-5;var V;if(e=d,j=a,a=h,42==n&&(C=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),C|=z<<6,0!==m&&(C|=32),C+=31-C%31,n=113,Z((V=C)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=j&&4!=h)return e.msg=L[7],-5;if(666==n&&0!==e.avail_in)return d.msg=L[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,B[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=p+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-p>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(a(e.next_in_index),o=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,l),l+=t.length;})),s}},this.flush=function(){let t,a,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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),o.forEach((function(t){a.set(t,r),r+=t.length;})),a};}W.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new q,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 F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],G=[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],J=[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],N=[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],Q=[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],X=[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],Y=[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 Z(){let t,e,n,i,a,r;function s(t,e,s,o,l,d,_,u,f,c,h){let w,b,p,x,y,g,m,v,k,A,U,I,E,S,C;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,S=1<I+v;){if(x++,I+=v,C=p-I,C=C>v?v:C,(b=1<<(g=m-I))>w+1&&(b-=w+1,E=m,g1440)return -3;a[x]=U=c[0],c[0]+=C,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U;}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}function $(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,d=0,_=0,u=0,f=0,c=0,h=0;function w(t,e,n,i,a,r,s,o){let l,d,_,u,f,c,h,w,b,p,x,y,g,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,c=s.bitk,b=s.write,p=b>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)w--,f|=(255&o.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,p-=g,b>=m)v=b-m,b-v>0&&2>b-v?(s.window[b++]=s.window[v++],s.window[b++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),b),b+=2,v+=2,g-=2);else {v=b-m;do{v+=s.end;}while(v<0);if(u=s.end-v,g>u){if(g-=u,b-v>0&&u>b-v)do{s.window[b++]=s.window[v++];}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),b),b+=u,v+=u,u=0;v=0;}}if(b-v>0&&g>b-v)do{s.window[b++]=s.window[v++];}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),b),b+=g,v+=g,g=0;break}if(0!=(64&u))return o.msg="invalid distance code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3;l+=d[k+2],l+=f&F[u],k=3*(_+l),u=d[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,1):(o.msg="invalid literal/length code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3);if(l+=d[k+2],l+=f&F[u],k=3*(_+l),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;break}}else f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;}while(p>=258&&w>=10);return g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,0}t.init=function(t,r,s,o,l,d){e=0,u=t,f=r,i=s,c=o,a=l,h=d,n=null;},t.proc=function(t,b,p){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,p=w(u,f,i,c,a,h,t,b),E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){l=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,b.msg="invalid literal/length code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 2:for(x=d;I>=x,I-=x,o=f,n=a,s=h,e=3;case 3:for(x=o;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}return e=9,b.msg="invalid distance code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,p=t.inflate_flush(b,p),v=t.write,k=vt.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,w,b,p,x,y,g,m;for(p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y>>1){case 0:w>>>=3,b-=3,h=7&b,w>>>=h,b-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],Z.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,b-=3,a=6;break;case 2:w>>>=3,b-=3,a=3;break;case 3:return w>>>=3,b-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;b<32;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>16&65535)!=(65535&w))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);r=65535&w,w=b=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(p,h),y),p+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;b<14;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(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=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,b-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;b<3;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>=3,b-=3;}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,h=c.inflate_trees_bits(i,l,d,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,_;for(h=l[0];b>>=h,b-=h,i[o++]=_;else {for(m=18==_?7:_-14,r=18==_?11:3;b>>=h,b-=h,r+=w&F[m],w>>>=m,b-=m,m=o,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_;}while(0!=--r);o=m;}}if(d[0]=-1,I=[],E=[],S=[],C=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,C,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,S[0],f,C[0]),a=6;case 6:if(n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(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&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(_),r.forEach((function(t){o.set(t,d),d+=t.length;})),o}},this.flush=function(){t.inflateEnd();};}at.prototype={inflateInit:function(t){const e=this;return e.istate=new it,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.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=rt;};}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));configure({workerScripts:{inflate:[n],deflate:[n]}});}}; + /* + Copyright (c) 2021 Gildas Lormeau. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + + 3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, + INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + function getMimeType() { + return "application/octet-stream"; + } + const FUNCTION_TYPE = "function"; var streamCodecShim = (library, options = {}) => { @@ -1587,10 +1619,10 @@ class ZipReader { - constructor(reader, options = {}, config = {}) { + constructor(reader, options = {}) { this.reader = reader; this.options = options; - this.config = config; + this.config = getConfiguration(); } async getEntries(options = {}) { @@ -1926,41 +1958,6 @@ view.setUint32(offset, value, true); } - /* - Copyright (c) 2021 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - class ZipReader$1 extends ZipReader { - - constructor(reader, options) { - super(reader, options, getConfiguration()); - } - } - /* Copyright (c) 2021 Gildas Lormeau. All rights reserved. @@ -2004,10 +2001,10 @@ class ZipWriter { - constructor(writer, options = {}, config = {}) { + constructor(writer, options = {}) { this.writer = writer; this.options = options; - this.config = config; + this.config = getConfiguration(); this.files = new Map(); this.offset = writer.size; } @@ -2175,7 +2172,7 @@ zipWriter.lockPreviousFile = new Promise(resolve => resolveLockPreviousFile = resolve); } if (options.bufferedWrite || zipWriter.lockWrite) { - fileWriter = new Uint8ArrayWriter(); + fileWriter = new BlobWriter(); await fileWriter.init(); } else { zipWriter.lockWrite = new Promise(resolve => resolveLockWrite = resolve); @@ -2191,13 +2188,15 @@ } files.set(name, fileEntry); if (fileWriter != writer) { - if (zipWriter.lockWrite) { - await zipWriter.lockWrite; - } - if (lockPreviousFile) { - await lockPreviousFile; - } - await writer.writeUint8Array(fileWriter.getData()); + const blob = fileWriter.getData(); + const fileReader = new FileReader(); + const arrayBuffer = await new Promise((resolve, reject) => { + fileReader.onload = event => resolve(event.target.result); + fileReader.onerror = reject; + fileReader.readAsArrayBuffer(blob); + }); + await Promise.all([zipWriter.lockWrite, lockPreviousFile]); + await writer.writeUint8Array(new Uint8Array(arrayBuffer)); } fileEntry.offset = zipWriter.offset; if (fileEntry.zip64) { @@ -2360,73 +2359,6 @@ view.setBigUint64(offset, value, true); } - /* - Copyright (c) 2021 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - class ZipWriter$1 extends ZipWriter { - - constructor(writer, options) { - super(writer, options, getConfiguration()); - } - } - - /* - Copyright (c) 2021 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - function getMimeType() { - return "application/octet-stream"; - } - /* Copyright (c) 2021 Gildas Lormeau. All rights reserved. @@ -2671,7 +2603,7 @@ if (!reader.initialized) { await reader.init(); } - const zipReader = new ZipReader$1(reader, options); + const zipReader = new ZipReader(reader, options); const entries = await zipReader.getEntries(); entries.forEach((entry) => { let parent = this; @@ -2690,7 +2622,7 @@ async exportZip(writer, options) { await initReaders(this); await writer.init(); - const zipWriter = new ZipWriter$1(writer, options); + const zipWriter = new ZipWriter(writer, options); await exportZip(zipWriter, this, getTotalSize([this], "uncompressedSize"), options); await zipWriter.close(); return writer.getData(); @@ -3055,8 +2987,8 @@ exports.Uint8ArrayReader = Uint8ArrayReader; exports.Uint8ArrayWriter = Uint8ArrayWriter; exports.Writer = Writer; - exports.ZipReader = ZipReader$1; - exports.ZipWriter = ZipWriter$1; + exports.ZipReader = ZipReader; + exports.ZipWriter = ZipWriter; exports.configure = configure; exports.fs = fs; exports.getMimeType = getMimeType; diff --git a/dist/zip-fs.min.js b/dist/zip-fs.min.js index a90c1139..ef15829b 100644 --- a/dist/zip-fs.min.js +++ b/dist/zip-fs.min.js @@ -1 +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,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.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}}}const a="function";function s(t,e){return class{constructor(n){const i=t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)};if(this.codec=new t(Object.assign({},e,n)),typeof this.codec.onData==a)this.codec.onData=i;else{if(typeof this.codec.on!=a)throw new Error("Cannot register the callback function");this.codec.on("data",i)}}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const o="HTTP error ",c="HTTP Range not supported",d="text/plain",l="Content-Length",h="Accept-Ranges",u="HEAD",f="GET",p="bytes";class w{constructor(){this.size=0}init(){this.initialized=!0}}class _ extends w{}class y extends w{writeUint8Array(t){this.size+=t.length}}class g extends _{constructor(t){super(),this.blobReader=new A(new Blob([t],{type:d}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}}class b extends y{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:d})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:d})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}}class x extends _{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)}}class A extends _{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class k extends y{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class U extends _{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(),C(this.url)&&!this.preventHeadRequest){const t=await E(u,this.url,this.options);if(this.size=Number(t.headers.get(l)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(h)!=p)throw new Error(c);void 0===this.size&&await v(this,this.options)}else await v(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await E(f,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(c);return new Uint8Array(await n.arrayBuffer())}return this.data||await v(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function v(t,e){const n=await E(f,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function E(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(o+(r.statusText||r.status))}class R extends _{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),C(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>z(u,this.url,(n=>{this.size=Number(n.getResponseHeader(l)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(h)==p?t():e(new Error(c)):void 0===this.size?D(this,this.url).then((()=>t())).catch(e):t()}),e)));await D(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await D(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>z(f,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(c)}}function D(t,e){return new Promise(((n,i)=>z(f,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function z(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(o+(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 F extends _{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new R(t,e):this.reader=new U(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)}}class I extends _{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}}class S extends y{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}}function C(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 T=4294967295,O=65535,W=67324752,M=134695760,B=33639248,V=101010256,L=101075792,N=117853008,H=39169,P=2048,j="/",Z=new Date(2107,11,31),K=new Date(1980,0,1),q="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Y=[];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;Y[t]=e}class X{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^Y[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const G="Invalid pasword",J=16,Q="raw",$={name:"PBKDF2"},tt={name:"HMAC"},et="SHA-1",nt={name:"AES-CTR"},it=Object.assign({hash:tt},$),rt=Object.assign({iterations:1e3,hash:{name:et}},$),at=Object.assign({hash:et},tt),st=Object.assign({length:J},nt),ot=["deriveBits"],ct=["sign"],dt=[8,12,16],lt=[16,24,32],ht=10,ut=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ft=crypto.subtle;class pt{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+J<=i.length-ht){const t=i.subarray(r,r+J),a=await ft.decrypt(Object.assign({counter:this.counter},st),this.keys.key,t);return yt(this.counter),n.set(new Uint8Array(a),r),e(r+J)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=gt(this.input,t)),n};if(this.password){const e=t.subarray(0,dt[this.strength]+2);await async function(t,e,n){await _t(t,n,e.subarray(0,dt[t.strength]),["decrypt"]);const i=e.subarray(dt[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(G)}(this,e,this.password),this.password=null,t=t.subarray(dt[this.strength]+2)}let n=new Uint8Array(t.length-ht-(t.length-ht)%J),i=t;return this.pendingInput.length&&(i=gt(this.pendingInput,t),n=bt(n,i.length-ht-(i.length-ht)%J)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-ht),i=t.subarray(t.length-ht);let r=new Uint8Array(0);if(n.length){const t=await ft.decrypt(Object.assign({counter:this.counter},st),e.key,n);r=new Uint8Array(t)}let a=!0;if(this.signed){const t=await ft.sign(tt,e.authentication,this.input.subarray(0,this.input.length-ht)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(r+J<=t.length){const a=t.subarray(r,r+J),s=await ft.encrypt(Object.assign({counter:this.counter},st),this.keys.key,a);return yt(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+J)}return this.pendingInput=t.subarray(r),this.output=gt(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(dt[t.strength]));return await _t(t,e,n,["encrypt"]),gt(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%J);return i.set(n,0),this.pendingInput.length&&(t=gt(this.pendingInput,t),i=bt(i,t.length-t.length%J)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await ft.encrypt(Object.assign({counter:this.counter},st),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=gt(this.output,t)}const e=await ft.sign(tt,this.keys.authentication,this.output.subarray(dt[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,ht);return{data:gt(t,n),signature:n}}}async function _t(t,e,n,i){t.counter=new Uint8Array(ut);const r=(new TextEncoder).encode(e),a=await ft.importKey(Q,r,it,!1,ot),s=await ft.deriveBits(Object.assign({salt:n},rt),a,8*(2*lt[t.strength]+2)),o=new Uint8Array(s);t.keys={key:await ft.importKey(Q,o.subarray(0,lt[t.strength]),nt,!0,i),authentication:await ft.importKey(Q,o.subarray(lt[t.strength],2*lt[t.strength]),at,!1,ct),passwordVerification:o.subarray(2*lt[t.strength])}}function yt(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function gt(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 bt(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const xt=12;class mt{constructor(t,e){this.password=t,this.passwordVerification=e,vt(this,t)}async append(t){if(this.password){const e=kt(this,t.subarray(0,xt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(G);t=t.subarray(xt)}return kt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class At{constructor(t,e){this.passwordVerification=e,this.password=t,vt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(xt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(Ut(this,i),0),n=xt}else e=new Uint8Array(t.length),n=0;return e.set(Ut(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function kt(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function Rt(t){const e=2|t.keys[2];return Dt(Math.imul(e,1^e)>>>8)}function Dt(t){return 255&t}function zt(t){return 4294967295&t}const Ft="deflate",It="inflate",St="Invalid signature";class Ct{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new X,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new mt(e.password,e.passwordVerification):new pt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(St);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(St)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Tt{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new X,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new At(e.password,e.passwordVerification):new wt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Ot="init",Wt="append",Mt="flush",Bt="message";var Vt=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-fs.min.js",document.baseURI).href)),t.worker.addEventListener(Bt,r,!1),t.interface={append:t=>n({type:Wt,data:t}),flush:()=>n({type:Mt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:Ot,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==Ot||r==Mt||r==Wt){const n=i.data;r==Mt?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(Ft)?new Tt(t,e):e.codecType.startsWith(It)?new Ct(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Lt=[],Nt=[];function Ht(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(Lt.length!t.busy));return n?Vt(n,t,e,Pt,i,r):new Promise((n=>Nt.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Pt(t){const e=!Nt.length;if(e)Lt=Lt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Nt.splice(0,1);e(Vt(t,n,i,Pt,r,a))}return e}async function jt(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(c=0,d=0){if(cthis[e]=t[e]))}}const Yt="File format is not recognized",Xt="End of central directory not found",Gt="End of Zip64 central directory not found",Jt="End of Zip64 central directory locator not found",Qt="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){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=le(this,e,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error(ie);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error(ie);if(pe(r,0)!=W)throw new Error($t);const s=this.localDirectory={};oe(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),ce(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,c=this.bitFlag.encrypted&&s.bitFlag.encrypted,d=c&&!this.extraFieldAES;if(c){if(!d&&void 0===this.extraFieldAES.strength)throw new Error(ne);if(!a)throw new Error(ee)}const l=await Ht(this.config.Inflate,{codecType:It,password:a,zipCrypto:d,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:le(this,e,"checkSignature"),passwordVerification:d&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:c,useWebWorkers:le(this,e,"useWebWorkers")},this.config);return t.initialized||await t.init(),await jt(l,n,t,o,this.compressedSize,this.config,{onprogress:e.onprogress}),t.getData()}}function oe(t,e,n){t.version=fe(e,n);const i=t.rawBitFlag=fe(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&P)==P},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=pe(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>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){}}(t.rawLastModDate),t.filenameLength=fe(e,n+22),t.extraFieldLength=fe(e,n+24)}function ce(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==T));for(let e=0;e{if(e[n]==T){if(!t||void 0===t[n])throw new Error(te);e[n]=t[n]}}))}(d,e);const l=e.extraFieldUnicodePath=a.get(28789);l&&de(l,"filename","rawFilename",e,t);const h=e.extraFieldUnicodeComment=a.get(25461);h&&de(h,"comment","rawComment",e,t);const u=e.extraFieldAES=a.get(39169);u?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=ue(i,0),t.vendorId=ue(i,2);const r=ue(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=fe(i,5)}else e.compressionMethod=n}(u,e,c):e.compressionMethod=c,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function de(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=ue(a,0),t.signature=pe(a,1);const s=new X;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==pe(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function le(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function he(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,V,22,1048560);if(!n)throw new Error(Xt);const i=new DataView(n.buffer);let r=pe(i,12),a=pe(i,16),s=fe(i,8),o=0;if(a==T||r==T||s==O){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(pe(i,0)!=N)throw new Error(Gt);a=we(i,8);let c=await e.readUint8Array(a,56),d=new DataView(c.buffer);const l=n.offset-20-56;if(pe(d,0)!=L&&a!=l){const t=a;a=l,o=a-t,c=await e.readUint8Array(a,56),d=new DataView(c.buffer)}if(pe(d,0)!=L)throw new Error(Jt);s=we(d,24),r=we(i,4),a-=we(d,40)}if(a<0||a>=e.size)throw new Error(Yt);let c=0,d=await e.readUint8Array(a,e.size-a),l=new DataView(d.buffer);const h=n.offset-r;if(pe(l,c)!=B&&a!=h){const t=a;a=h,o=a-t,d=await e.readUint8Array(a,e.size-a),l=new DataView(d.buffer)}if(a<0||a>=e.size)throw new Error(Yt);const u=[];for(let e=0;ee.getData(t,n),u.push(r),c+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return u}async close(){}}{constructor(t,e){super(t,e,i())}}const ye="File already exists",ge="Zip file comment exceeds 64KB",be="File entry comment exceeds 64KB",xe="File entry name exceeds 64KB",me="Version exceeds 65535",Ae="The modification date must be between 1/1/1980 and 12/31/2107",ke="The strength must equal 1, 2, or 3",Ue="Extra field type exceeds 65535",ve="Extra field data exceeds 64KB",Ee=new Uint8Array([7,0,2,0,65,69,3,0,0]);function Re(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function De(t,e,n){t.setUint8(e,n)}function ze(t,e,n){t.setUint16(e,n,!0)}function Fe(t,e,n){t.setUint32(e,n,!0)}function Ie(t,e,n){t.setBigUint64(e,n,!0)}class Se extends class{constructor(t,e={},n={}){this.writer=t,this.options=e,this.config=n,this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(j)?t+=j:n.directory=t.endsWith(j),this.files.has(t))throw new Error(ye);const i=(new TextEncoder).encode(t);if(i.length>O)throw new Error(xe);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>O)throw new Error(be);const s=this.options.version||n.version||0;if(s>O)throw new Error(me);const o=n.lastModDate||new Date;if(oZ)throw new Error(Ae);const c=Re(this,n,"password"),d=Re(this,n,"encryptionStrength")||3,l=Re(this,n,"zipCrypto");if(void 0!==c&&void 0!==d&&(d<1||d>3))throw new Error(ke);e&&!e.initialized&&await e.init();let h=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),h=new Uint8Array(t),u.forEach(((t,n)=>{if(n>O)throw new Error(Ue);if(t.length>O)throw new Error(ve);h.set(new Uint16Array([n]),e),h.set(new Uint16Array([t.length]),e+2),h.set(t,e+4),e+=4+t.length}))}const f=e?1.05*e.size:0,p=n.zip64||this.options.zip64||this.offset>=T||f>=T||this.offset+f>=T,w=Re(this,n,"level"),_=Re(this,n,"useWebWorkers"),y=Re(this,n,"bufferedWrite"),g=Re(this,n,"keepOrder"),b=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,c;r.set(e,null);try{let d,l;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>c=t))),i.bufferedWrite||t.lockWrite?(d=new S,await d.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),d=a),l=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),c=i.level,d=0!==c&&!i.directory,l=i.zip64;let h,u;if(o&&!i.zipCrypto){h=new Uint8Array(Ee.length+2);const t=new DataView(h.buffer);ze(t,0,H),h.set(Ee,2),u=i.encryptionStrength,De(t,8,u)}else h=new Uint8Array(0);const f={version:i.version||20,zip64:l,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:l?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:h,rawExtraField:i.rawExtraField};let p=2056,w=0;d&&(w=8);l&&(f.version=f.version>45?f.version:45);o&&(p|=1,i.zipCrypto||(f.version=f.version>51?f.version:51,w=99,d&&(f.rawExtraFieldAES[9]=8)));const _=f.headerArray=new Uint8Array(26),y=new DataView(_.buffer);ze(y,0,f.version),ze(y,2,p),ze(y,4,w);const g=new Uint32Array(1),b=new DataView(g.buffer);ze(b,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),ze(b,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=g[0];Fe(y,6,x),ze(y,22,r.length),ze(y,24,0);const m=new Uint8Array(30+r.length);let A;Fe(new DataView(m.buffer),0,W),m.set(_,4),m.set(r,30);let k=0,U=0;if(t){k=t.size;const r=await Ht(n.Deflate,{codecType:Ft,level:c,password:s,encryptionStrength:u,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:d,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),A=await jt(r,t,e,0,k,n,{onprogress:i.onprogress}),U=A.length}else await e.writeUint8Array(m);const v=new Uint8Array(l?24:16),E=new DataView(v.buffer);if(Fe(E,0,M),t)if(o&&!i.zipCrypto||void 0===A.signature||(Fe(y,10,A.signature),Fe(E,4,A.signature),f.signature=A.signature),l){const t=new DataView(f.rawExtraFieldZip64.buffer);ze(t,0,1),ze(t,2,24),Fe(y,14,T),Ie(E,8,BigInt(U)),Ie(t,12,BigInt(U)),Fe(y,18,T),Ie(E,16,BigInt(k)),Ie(t,4,BigInt(k))}else Fe(y,14,U),Fe(E,8,U),Fe(y,18,k),Fe(E,12,k);await e.writeUint8Array(v);const R=m.length+(A?A.length:0)+v.length;return Object.assign(f,{compressedSize:U,uncompressedSize:k,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),f}(n,d,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,l),d!=a&&(t.lockWrite&&await t.lockWrite,o&&await o,await a.writeUint8Array(d.getData())),l.offset=t.offset,l.zip64){Ie(new DataView(l.rawExtraFieldZip64.buffer),20,BigInt(l.offset))}return t.offset+=l.length,l}finally{c&&c(),s&&(t.lockWrite=null,s())}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:h,zip64:p,password:c,level:w,useWebWorkers:_,encryptionStrength:d,zipCrypto:l,bufferedWrite:y,keepOrder:g}));return Object.assign(b,{name:t,comment:r,extraField:u}),new qt(b)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=T||r>=T||s>=O,c=new Uint8Array(r+(o?98:22)),d=new DataView(c.buffer);if(t.length){if(!(t.length<=O))throw new Error(ge);ze(d,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;Fe(d,i,B),ze(d,i+4,t.version),c.set(t.headerArray,i+6),ze(d,i+30,a),ze(d,i+32,t.rawComment.length),t.directory&&De(d,i+38,16),t.zip64?Fe(d,i+42,T):Fe(d,i+42,t.offset),c.set(e,i+46),c.set(n,i+46+e.length),c.set(r,i+46+e.length+n.length),c.set(t.rawExtraField,46+e.length+n.length+r.length),c.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(Fe(d,i,L),Ie(d,i+4,BigInt(44)),ze(d,i+12,45),ze(d,i+14,45),Ie(d,i+24,BigInt(s)),Ie(d,i+32,BigInt(s)),Ie(d,i+40,BigInt(r)),Ie(d,i+48,BigInt(a)),Fe(d,i+56,N),Ie(d,i+64,BigInt(a)+BigInt(r)),Fe(d,i+72,1),s=O,a=T,r=T,i+=76),Fe(d,i,V),ze(d,i+8,s),ze(d,i+10,s),Fe(d,i+12,r),Fe(d,i+16,a),await e.writeUint8Array(c),t.length&&await e.writeUint8Array(t),e.getData()}}{constructor(t,e){super(t,e,i())}}const Ce=524288;class Te{constructor(t,e,n,i){if(t.root&&i&&i.getChildByName(e))throw new Error("Entry filename already exists");n||(n={}),this.fs=t,this.name=e,this.data=n.data,this.id=t.entries.length,this.parent=i,this.children=[],this.uncompressedSize=0,t.entries.push(this),i&&this.parent.children.push(this)}moveTo(t){this.fs.move(this,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}}class Oe extends Te{constructor(t,e,n,i){super(t,e,n,i),this.Reader=n.Reader,this.Writer=n.Writer,n.getData&&(this.getData=n.getData)}async getData(t,e={}){return!t||t.constructor==this.Writer&&this.data?this.data:(this.reader=new this.Reader(this.data,e),await this.reader.init(),t.initialized||await t.init(),this.uncompressedSize=this.reader.size,async function(t,e){return n();async function n(i=0){const r=i*Ce;if(re.file((i=>n(t.addBlob(e.name,i))),i)));async function n(t,e){const r=await i(e);for(const e of r)e.isDirectory?await n(t.addDirectory(e.name),e):await new Promise(((n,i)=>{e.file((i=>{const r=t.addBlob(e.name,i);r.uncompressedSize=i.size,n(r)}),i)}))}function i(t){return new Promise(((e,n)=>{let i=[];function r(t){t.readEntries((n=>{n.length?(i=i.concat(n),r(t)):e(i)}),n)}t.isDirectory&&r(t.createReader()),t.isFile&&e(i)}))}}(this,t)}async addData(t,e){return He(this,t,e)}async importBlob(t,e={}){await this.importZip(new A(t),e)}async importData64URI(t,e={}){await this.importZip(new x(t),e)}async importUint8Array(t,e={}){await this.importZip(new I(t),e)}async importHttpContent(t,e={}){await this.importZip(new F(t,e),e)}async exportBlob(t={}){return this.exportZip(new k("application/zip"),t)}async exportData64URI(t={}){return this.exportZip(new m("application/zip"),t)}async exportUint8Array(t={}){return this.exportZip(new S,t)}async importZip(t,e){t.initialized||await t.init();const n=new _e(t,e);(await n.getEntries()).forEach((t=>{let n=this;const i=t.filename.split("/"),r=i.pop();i.forEach((t=>n=n.getChildByName(t)||new We(this.fs,t,null,n))),t.directory||He(n,r,{data:t,Reader:Be(Object.assign({},e))})}))}async exportZip(t,e){await Ve(this),await t.init();const n=new Se(t,e);return await async function(t,e,n,i){const r=e,a=new Map;async function s(t,e){async function o(){if(i.bufferedWrite)await Promise.all(e.children.map(c));else for(const t of e.children)await c(t)}async function c(e){const o=i.relativePath?e.getRelativeName(r):e.getFullname();await t.add(o,e.reader,Object.assign({directory:e.directory},Object.assign({},i,{onprogress:t=>{if(i.onprogress){a.set(o,t);try{i.onprogress(Array.from(a.values()).reduce(((t,e)=>t+e)),n)}catch(t){}}}}))),await s(t,e)}await o()}await s(t,e)}(n,this,function(t,e){let n=0;return t.forEach(i),n;function i(t){n+=t[e],t.children&&t.children.forEach(i)}}([this],"uncompressedSize"),e),await n.close(),t.getData()}getChildByName(t){for(let e=0;e{n.id==t.id&&e.splice(i,1)}))}function Ne(t){t.entries=[],t.root=new We(t)}function He(t,e,n,i){if(t.directory)return i?new We(t.fs,e,n,t):new Oe(t.fs,e,n,t);throw new Error("Parent entry is not a directory")}(()=>{if("function"==typeof URL.createObjectURL){const t=(()=>{const 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,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),c=Object.assign({length:16},r),d=["deriveBits"],l=["sign"],h=[8,12,16],u=[16,24,32],f=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],p=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await p.decrypt(Object.assign({counter:this.counter},c),this.keys.key,t);return g(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=b(this.input,t)),n};if(this.password){const e=t.subarray(0,h[this.strength]+2);await async function(t,e,n){await y(t,n,e.subarray(0,h[t.strength]),["decrypt"]);const i=e.subarray(h[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(h[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=b(this.pendingInput,t),n=x(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await p.decrypt(Object.assign({counter:this.counter},c),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await p.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class _{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await p.encrypt(Object.assign({counter:this.counter},c),this.keys.key,a);return g(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=b(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(h[t.strength]));return await y(t,e,n,["encrypt"]),b(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=b(this.pendingInput,t),i=x(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await p.encrypt(Object.assign({counter:this.counter},c),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=b(this.output,t)}const e=await p.sign(i,this.keys.authentication,this.output.subarray(h[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:b(t,n),signature:n}}}async function y(t,e,n,i){t.counter=new Uint8Array(f);const c=(new TextEncoder).encode(e),h=await p.importKey("raw",c,a,!1,d),w=await p.deriveBits(Object.assign({salt:n},s),h,8*(2*u[t.strength]+2)),_=new Uint8Array(w);t.keys={key:await p.importKey("raw",_.subarray(0,u[t.strength]),r,!0,i),authentication:await p.importKey("raw",_.subarray(u[t.strength],2*u[t.strength]),o,!1,l),passwordVerification:_.subarray(2*u[t.strength])}}function g(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function b(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 x(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,v(this,t)}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return k(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class A{constructor(t,e){this.passwordVerification=e,this.password=t,v(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(U(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(U(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function R(t){const e=2|t.keys[2];return D(Math.imul(e,1^e)>>>8)}function D(t){return 255&t}function z(t){return 4294967295&t}class F{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class I{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new A(n.password,n.passwordVerification):new _(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const S={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),C=function(t,e){return e.codecType.startsWith("deflate")?new I(t,e):e.codecType.startsWith("inflate")?new F(t,e):void 0}(n,e)},append:async t=>({data:await C.append(t.data)}),flush:()=>C.flush()};let C;function T(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=S[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}})}}));const O=[0,1,2,3].concat(...T([[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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,c,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);c=a;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*c]=i[2*s]+i[2*o],n.depth[c]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=c,n.heap[1]=c++,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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,c,d,l,h,u,f=0;for(l=0;l<=15;l++)e.bl_count[l]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)c=e.heap[o],l=n[2*n[2*c+1]+1]+1,l>s&&(l=s,f++),n[2*c+1]=l,c>t.max_code||(e.bl_count[l]++,h=0,c>=a&&(h=r[c-a]),u=n[2*c],e.opt_len+=u*(l+h),i&&(e.static_len+=u*(i[2*c+1]+h)));if(0!==f){do{for(l=s-1;0===e.bl_count[l];)l--;e.bl_count[l]--,e.bl_count[l+1]+=2,e.bl_count[s]--,f-=2}while(f>0);for(l=s;0!==l;l--)for(c=e.bl_count[l];0!==c;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=l&&(e.opt_len+=(l-n[2*d+1])*n[2*d],n[2*d+1]=l),c--)}}(n),function(t,n,i){const r=[];let a,s,o,c=0;for(a=1;a<=15;a++)r[a]=c=c+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function M(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function B(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}W._length_code=[0,1,2,3,4,5,6,7].concat(...T([[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?O[t]:O[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],M.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],M.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],M.static_l_desc=new M(M.static_ltree,W.extra_lbits,257,286,15),M.static_d_desc=new M(M.static_dtree,W.extra_dbits,0,30,15),M.static_bl_desc=new M(null,W.extra_blbits,0,19,7);const V=[new B(0,0,0,0,0),new B(4,4,8,4,1),new B(4,5,16,8,1),new B(4,6,32,32,1),new B(4,4,16,16,2),new B(8,16,32,32,2),new B(8,16,128,128,2),new B(8,32,128,256,2),new B(32,128,258,1024,2),new B(32,258,258,4096,2)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function N(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;X>16-i?(n=t,Y|=n<>>16-X,X+=i-16):(Y|=t<=8&&(Q(255&Y),Y>>>=8,X-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[Z+2*j]=e>>>8&255,t.pending_buf[Z+2*j+1]=255&e,t.pending_buf[H+j]=255&n,j++,0===e?I[2*n]++:(K++,e--,I[2*(W._length_code[n]+256+1)]++,S[2*W.d_code(e)]++),0==(8191&j)&&R>2){for(i=8*j,r=m-y,a=0;a<30;a++)i+=S[2*a]*(5+W.extra_dbits[a]);if(i>>>=3,K8?$(Y):X>0&&Q(255&Y),Y=0,X=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),q=8,$(n),$(~n),t.pending_buf.set(c.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function ct(e,n,i){let r,a,s=0;R>0?(T.build_tree(t),O.build_tree(t),s=function(){let e;for(J(I,T.max_code),J(S,O.max_code),B.build_tree(t),e=18;e>=3&&0===C[2*W.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(M.static_ltree,M.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?y:-1,m-y,t),y=m,e.flush_pending()}function lt(){let t,n,i,r;do{if(r=d-k-m,0===r&&0===m&&0===k)r=a;else if(-1==r)r--;else if(m>=a+a-262){c.set(c.subarray(a,a+a),0),A-=a,m-=a,y-=a,t=f,i=t;do{n=65535&h[--i],h[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&l[--i],l[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(c,m+k,r),k+=t,k>=3&&(u=255&c[m],u=(u<<_^255&c[m+1])&w)}while(k<262&&0!==e.avail_in)}function ht(t){let e,n,i=v,r=m,s=U;const d=m>a-262?m-(a-262):0;let h=F;const u=o,f=m+258;let p=c[r+s-1],w=c[r+s];U>=z&&(i>>=2),h>k&&(h=k);do{if(e=t,c[e+s]==w&&c[e+s-1]==p&&c[e]==c[r]&&c[++e]==c[r+1]){r+=2,e++;do{}while(c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&rs){if(A=t,s=n,n>=h)break;p=c[r+s-1],w=c[r+s]}}}while((t=65535&l[t&u])>d&&0!=--i);return s<=k?s:k}function ut(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,T.dyn_tree=I,T.stat_desc=M.static_l_desc,O.dyn_tree=S,O.stat_desc=M.static_d_desc,B.dyn_tree=C,B.stat_desc=M.static_bl_desc,Y=0,X=0,q=8,G(),function(){d=2*a,h[f-1]=0;for(let t=0;t9||8!=d||r<9||r>15||n<0||n>9||y<0||y>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(V[R].func!=V[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=V[R].max_lazy,z=V[R].good_length,F=V[R].nice_length,v=V[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,d=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,d=i-s),c.set(e.subarray(d,d+s),0),m=s,y=s,u=255&c[0],u=(u<<_^255&c[1])&w,r=0;r<=s-3;r++)u=(u<<_^255&c[r+2])&w,l[r&o]=h[u],h[u]=r;return 0},t.deflate=function(d,p){let v,z,F,I,S;if(p>4||p<0)return-2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=p)return d.msg=L[4],-2;if(0===d.avail_out)return d.msg=L[7],-5;var C;if(e=d,I=r,r=p,42==n&&(z=8+(s-8<<4)<<8,F=(R-1&255)>>1,F>3&&(F=3),z|=F<<6,0!==m&&(z|=32),z+=31-z%31,n=113,Q((C=z)>>8&255),Q(255&C)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&p<=I&&4!=p)return e.msg=L[7],-5;if(666==n&&0!==e.avail_in)return d.msg=L[7],-5;if(0!==e.avail_in||0!==k||0!=p&&666!=n){switch(S=-1,V[R].func){case 0:S=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(k<=1){if(lt(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=y+r,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-y>=a-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p);break;case 1:S=function(t){let n,i=0;for(;;){if(k<262){if(lt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(u=(u<<_^255&c[m+2])&w,i=65535&h[u],l[m&o]=h[u],h[u]=m),0!==i&&(m-i&65535)<=a-262&&2!=D&&(g=ht(i)),g>=3)if(n=rt(m-A,g-3),k-=g,g<=E&&k>=3){g--;do{m++,u=(u<<_^255&c[m+2])&w,i=65535&h[u],l[m&o]=h[u],h[u]=m}while(0!=--g);m++}else m+=g,g=0,u=255&c[m],u=(u<<_^255&c[m+1])&w;else n=rt(0,255&c[m]),k--,m++;if(n&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p);break;case 2:S=function(t){let n,i,r=0;for(;;){if(k<262){if(lt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(u=(u<<_^255&c[m+2])&w,r=65535&h[u],l[m&o]=h[u],h[u]=m),U=g,b=A,g=2,0!==r&&U4096)&&(g=2)),U>=3&&g<=U){i=m+k-3,n=rt(m-1-b,U-3),k-=U-1,U-=2;do{++m<=i&&(u=(u<<_^255&c[m+2])&w,r=65535&h[u],l[m&o]=h[u],h[u]=m)}while(0!=--U);if(x=0,g=2,m++,n&&(dt(!1),0===e.avail_out))return 0}else if(0!==x){if(n=rt(0,255&c[m-1]),n&&dt(!1),m++,k--,0===e.avail_out)return 0}else x=1,m++,k--}return 0!==x&&(n=rt(0,255&c[m-1]),x=0),dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p)}if(2!=S&&3!=S||(n=666),0==S||2==S)return 0===e.avail_out&&(r=-1),0;if(1==S){if(1==p)tt(2,3),et(256,M.static_ltree),it(),1+q+10-X<9&&(tt(2,3),et(256,M.static_ltree),it()),q=7;else if(ot(0,0,!1),3==p)for(v=0;v0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),l.forEach((function(t){s.set(t,c),c+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}P.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new H,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 r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 Z=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],K=[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],q=[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],Y=[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],X=[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],G=[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],J=[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 Q(){let t,e,n,i,r,a;function s(t,e,s,o,c,d,l,h,u,f,p){let w,_,y,g,b,x,m,A,k,U,v,E,R,D,z;U=0,b=s;do{n[t[e+U]]++,U++,b--}while(0!==b);if(n[0]==s)return l[0]=-1,h[0]=0,0;for(A=h[0],x=1;x<=15&&0===n[x];x++);for(m=x,Ab&&(A=b),h[0]=A,D=1<E+A;){if(g++,E+=A,z=y-E,z=z>A?A:z,(_=1<<(x=m-E))>w+1&&(_-=w+1,R=m,x1440)return-3;r[g]=v=f[0],f[0]+=z,0!==g?(a[g]=b,i[0]=x,i[1]=A,x=b>>>E-A,i[2]=v-r[g-1]-x,u.set(i,3*(r[g-1]+x))):l[0]=v}for(i[1]=m-E,U>=s?i[0]=192:p[U]>>E;x>>=1)b^=x;for(b^=x,k=(1<257?(-3==f?u.msg="oversubscribed distance tree":-5==f?(u.msg="incomplete distance tree",f=-3):-4!=f&&(u.msg="empty distance tree with lengths",f=-3),f):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,c=0,d=0,l=0,h=0,u=0,f=0,p=0;function w(t,e,n,i,r,a,s,o){let c,d,l,h,u,f,p,w,_,y,g,b,x,m,A,k;p=o.next_in_index,w=o.avail_in,u=s.bitb,f=s.bitk,_=s.write,y=_>=d[k+1],f-=d[k+1],0!=(16&h)){for(h&=15,x=d[k+2]+(u&Z[h]),u>>=h,f-=h;f<15;)w--,u|=(255&o.read_byte(p++))<>=d[k+1],f-=d[k+1],0!=(16&h)){for(h&=15;f>=h,f-=h,y-=x,_>=m)A=_-m,_-A>0&&2>_-A?(s.window[_++]=s.window[A++],s.window[_++]=s.window[A++],x-=2):(s.window.set(s.window.subarray(A,A+2),_),_+=2,A+=2,x-=2);else{A=_-m;do{A+=s.end}while(A<0);if(h=s.end-A,x>h){if(x-=h,_-A>0&&h>_-A)do{s.window[_++]=s.window[A++]}while(0!=--h);else s.window.set(s.window.subarray(A,A+h),_),_+=h,A+=h,h=0;A=0}}if(_-A>0&&x>_-A)do{s.window[_++]=s.window[A++]}while(0!=--x);else s.window.set(s.window.subarray(A,A+x),_),_+=x,A+=x,x=0;break}if(0!=(64&h))return o.msg="invalid distance code",x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,-3;c+=d[k+2],c+=u&Z[h],k=3*(l+c),h=d[k]}break}if(0!=(64&h))return 0!=(32&h)?(x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,1):(o.msg="invalid literal/length code",x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,-3);if(c+=d[k+2],c+=u&Z[h],k=3*(l+c),0===(h=d[k])){u>>=d[k+1],f-=d[k+1],s.window[_++]=d[k+2],y--;break}}else u>>=d[k+1],f-=d[k+1],s.window[_++]=d[k+2],y--}while(y>=258&&w>=10);return x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,0}t.init=function(t,a,s,o,c,d){e=0,h=t,u=a,i=s,f=o,r=c,p=d,n=null},t.proc=function(t,_,y){let g,b,x,m,A,k,U,v=0,E=0,R=0;for(R=_.next_in_index,m=_.avail_in,v=t.bitb,E=t.bitk,A=t.write,k=A=258&&m>=10&&(t.bitb=v,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=A,y=w(h,u,i,f,r,p,t,_),R=_.next_in_index,m=_.avail_in,v=t.bitb,E=t.bitk,A=t.write,k=A>>=n[b+1],E-=n[b+1],x=n[b],0===x){c=n[b+2],e=6;break}if(0!=(16&x)){d=15&x,a=n[b+2],e=2;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}if(0!=(32&x)){e=7;break}return e=9,_.msg="invalid literal/length code",y=-3,t.bitb=v,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=A,t.inflate_flush(_,y);case 2:for(g=d;E>=g,E-=g,o=u,n=r,s=p,e=3;case 3:for(g=o;E>=n[b+1],E-=n[b+1],x=n[b],0!=(16&x)){d=15&x,l=n[b+2],e=4;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}return e=9,_.msg="invalid distance code",y=-3,t.bitb=v,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=A,t.inflate_flush(_,y);case 4:for(g=d;E>=g,E-=g,e=5;case 5:for(U=A-l;U<0;)U+=t.end;for(;0!==a;){if(0===k&&(A==t.end&&0!==t.read&&(A=0,k=A7&&(E-=8,m++,R--),t.write=A,y=t.inflate_flush(_,y),A=t.write,k=At.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(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,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(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let p,w,_,y,g,b,x,m;for(y=t.next_in_index,g=t.avail_in,w=n.bitb,_=n.bitk,b=n.write,x=b>>1){case 0:w>>>=3,_-=3,p=7&_,w>>>=p,_-=p,r=1;break;case 1:A=[],k=[],U=[[]],v=[[]],Q.inflate_trees_fixed(A,k,U,v),l.init(A[0],k[0],U[0],0,v[0],0),w>>>=3,_-=3,r=6;break;case 2:w>>>=3,_-=3,r=3;break;case 3:return w>>>=3,_-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e)}break;case 1:for(;_<32;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}if((~w>>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);a=65535&w,w=_=0,r=0!==a?2:0!==h?7:0;break;case 2:if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(0===x&&(b==n.end&&0!==n.read&&(b=0,x=bg&&(p=g),p>x&&(p=x),n.window.set(t.read_buf(y,p),b),y+=p,g-=p,b+=p,x-=p,0!=(a-=p))break;r=0!==h?7:0;break;case 3:for(;_<14;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}if(s=p=16383&w,(31&p)>29||(p>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(p=258+(31&p)+(p>>5&31),!i||i.length>>=14,_-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;_<3;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}i[tt[o++]]=7&w,w>>>=3,_-=3}for(;o<19;)i[tt[o++]]=0;if(c[0]=7,p=f.inflate_trees_bits(i,c,d,u,t),0!=p)return-3==(e=p)&&(i=null,r=9),n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);o=0,r=5;case 5:for(;p=s,!(o>=258+(31&p)+(p>>5&31));){let a,l;for(p=c[0];_>>=p,_-=p,i[o++]=l;else{for(m=18==l?7:l-14,a=18==l?11:3;_>>=p,_-=p,a+=w&Z[m],w>>>=m,_-=m,m=o,p=s,m+a>258+(31&p)+(p>>5&31)||16==l&&m<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);l=16==l?i[m-1]:0;do{i[m++]=l}while(0!=--a);o=m}}if(d[0]=-1,E=[],R=[],D=[],z=[],E[0]=9,R[0]=6,p=s,p=f.inflate_trees_dynamic(257+(31&p),1+(p>>5&31),i,E,R,D,z,u,t),0!=p)return-3==p&&(i=null,r=9),e=p,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);l.init(E[0],R[0],u,D[0],u,z[0]),r=6;case 6:if(n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,1!=(e=l.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,l.free(t),y=t.next_in_index,g=t.avail_in,w=n.bitb,_=n.bitk,b=n.write,x=b15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=c&&(r(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(l),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,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.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=j,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));r({workerScripts:{inflate:[e],deflate:[e]}})}})(),t.BlobReader=A,t.BlobWriter=k,t.Data64URIReader=x,t.Data64URIWriter=m,t.ERR_BAD_FORMAT=Yt,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Qt,t.ERR_DUPLICATED_NAME=ye,t.ERR_ENCRYPTED=ee,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Jt,t.ERR_EOCDR_NOT_FOUND=Xt,t.ERR_EOCDR_ZIP64_NOT_FOUND=Gt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=te,t.ERR_HTTP_RANGE=c,t.ERR_INVALID_COMMENT=ge,t.ERR_INVALID_DATE=Ae,t.ERR_INVALID_ENCRYPTION_STRENGTH=ke,t.ERR_INVALID_ENTRY_COMMENT=be,t.ERR_INVALID_ENTRY_NAME=xe,t.ERR_INVALID_EXTRAFIELD_DATA=ve,t.ERR_INVALID_EXTRAFIELD_TYPE=Ue,t.ERR_INVALID_PASSWORD=G,t.ERR_INVALID_SIGNATURE=St,t.ERR_INVALID_VERSION=me,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=$t,t.ERR_UNSUPPORTED_COMPRESSION=ie,t.ERR_UNSUPPORTED_ENCRYPTION=ne,t.HttpRangeReader=class extends F{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=F,t.Reader=_,t.TextReader=g,t.TextWriter=b,t.Uint8ArrayReader=I,t.Uint8ArrayWriter=S,t.Writer=y,t.ZipReader=_e,t.ZipWriter=Se,t.configure=r,t.fs=Me,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={})=>({Deflate:s(t.Deflate,e.deflate),Inflate:s(t.Inflate,e.inflate)}),Object.defineProperty(t,"__esModule",{value:!0})})); +!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,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.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}}}const a="function";function s(t,e){return class{constructor(n){const i=t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)};if(this.codec=new t(Object.assign({},e,n)),typeof this.codec.onData==a)this.codec.onData=i;else{if(typeof this.codec.on!=a)throw new Error("Cannot register the callback function");this.codec.on("data",i)}}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const o="HTTP error ",c="HTTP Range not supported",d="text/plain",l="Content-Length",h="Accept-Ranges",u="HEAD",f="GET",w="bytes";class p{constructor(){this.size=0}init(){this.initialized=!0}}class y extends p{}class _ extends p{writeUint8Array(t){this.size+=t.length}}class g extends y{constructor(t){super(),this.blobReader=new A(new Blob([t],{type:d}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}}class b extends _{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:d})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:d})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}}class x extends y{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)}}class A extends y{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class k extends _{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class U extends y{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(),C(this.url)&&!this.preventHeadRequest){const t=await E(u,this.url,this.options);if(this.size=Number(t.headers.get(l)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(h)!=w)throw new Error(c);void 0===this.size&&await v(this,this.options)}else await v(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await E(f,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(c);return new Uint8Array(await n.arrayBuffer())}return this.data||await v(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function v(t,e){const n=await E(f,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function E(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(o+(r.statusText||r.status))}class R extends y{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),C(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>z(u,this.url,(n=>{this.size=Number(n.getResponseHeader(l)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(h)==w?t():e(new Error(c)):void 0===this.size?D(this,this.url).then((()=>t())).catch(e):t()}),e)));await D(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await D(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>z(f,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(c)}}function D(t,e){return new Promise(((n,i)=>z(f,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function z(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(o+(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 F extends y{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new R(t,e):this.reader=new U(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)}}class I extends y{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}}class S extends _{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}}function C(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 T=4294967295,O=65535,W=67324752,B=134695760,M=33639248,V=101010256,L=101075792,N=117853008,P=39169,H=2048,j="/",Z=new Date(2107,11,31),K=new Date(1980,0,1),q="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Y=[];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;Y[t]=e}class X{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^Y[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const G="Invalid pasword",J=16,Q="raw",$={name:"PBKDF2"},tt={name:"HMAC"},et="SHA-1",nt={name:"AES-CTR"},it=Object.assign({hash:tt},$),rt=Object.assign({iterations:1e3,hash:{name:et}},$),at=Object.assign({hash:et},tt),st=Object.assign({length:J},nt),ot=["deriveBits"],ct=["sign"],dt=[8,12,16],lt=[16,24,32],ht=10,ut=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ft=crypto.subtle;class wt{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+J<=i.length-ht){const t=i.subarray(r,r+J),a=await ft.decrypt(Object.assign({counter:this.counter},st),this.keys.key,t);return _t(this.counter),n.set(new Uint8Array(a),r),e(r+J)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=gt(this.input,t)),n};if(this.password){const e=t.subarray(0,dt[this.strength]+2);await async function(t,e,n){await yt(t,n,e.subarray(0,dt[t.strength]),["decrypt"]);const i=e.subarray(dt[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(G)}(this,e,this.password),this.password=null,t=t.subarray(dt[this.strength]+2)}let n=new Uint8Array(t.length-ht-(t.length-ht)%J),i=t;return this.pendingInput.length&&(i=gt(this.pendingInput,t),n=bt(n,i.length-ht-(i.length-ht)%J)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-ht),i=t.subarray(t.length-ht);let r=new Uint8Array(0);if(n.length){const t=await ft.decrypt(Object.assign({counter:this.counter},st),e.key,n);r=new Uint8Array(t)}let a=!0;if(this.signed){const t=await ft.sign(tt,e.authentication,this.input.subarray(0,this.input.length-ht)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(r+J<=t.length){const a=t.subarray(r,r+J),s=await ft.encrypt(Object.assign({counter:this.counter},st),this.keys.key,a);return _t(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+J)}return this.pendingInput=t.subarray(r),this.output=gt(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(dt[t.strength]));return await yt(t,e,n,["encrypt"]),gt(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%J);return i.set(n,0),this.pendingInput.length&&(t=gt(this.pendingInput,t),i=bt(i,t.length-t.length%J)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await ft.encrypt(Object.assign({counter:this.counter},st),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=gt(this.output,t)}const e=await ft.sign(tt,this.keys.authentication,this.output.subarray(dt[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,ht);return{data:gt(t,n),signature:n}}}async function yt(t,e,n,i){t.counter=new Uint8Array(ut);const r=(new TextEncoder).encode(e),a=await ft.importKey(Q,r,it,!1,ot),s=await ft.deriveBits(Object.assign({salt:n},rt),a,8*(2*lt[t.strength]+2)),o=new Uint8Array(s);t.keys={key:await ft.importKey(Q,o.subarray(0,lt[t.strength]),nt,!0,i),authentication:await ft.importKey(Q,o.subarray(lt[t.strength],2*lt[t.strength]),at,!1,ct),passwordVerification:o.subarray(2*lt[t.strength])}}function _t(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function gt(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 bt(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const xt=12;class mt{constructor(t,e){this.password=t,this.passwordVerification=e,vt(this,t)}async append(t){if(this.password){const e=kt(this,t.subarray(0,xt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(G);t=t.subarray(xt)}return kt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class At{constructor(t,e){this.passwordVerification=e,this.password=t,vt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(xt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(Ut(this,i),0),n=xt}else e=new Uint8Array(t.length),n=0;return e.set(Ut(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function kt(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function Rt(t){const e=2|t.keys[2];return Dt(Math.imul(e,1^e)>>>8)}function Dt(t){return 255&t}function zt(t){return 4294967295&t}const Ft="deflate",It="inflate",St="Invalid signature";class Ct{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new X,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new mt(e.password,e.passwordVerification):new wt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(St);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(St)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Tt{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new X,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new At(e.password,e.passwordVerification):new pt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Ot="init",Wt="append",Bt="flush",Mt="message";var Vt=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-fs.min.js",document.baseURI).href)),t.worker.addEventListener(Mt,r,!1),t.interface={append:t=>n({type:Wt,data:t}),flush:()=>n({type:Bt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:Ot,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==Ot||r==Bt||r==Wt){const n=i.data;r==Bt?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(Ft)?new Tt(t,e):e.codecType.startsWith(It)?new Ct(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Lt=[],Nt=[];function Pt(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(Lt.length!t.busy));return n?Vt(n,t,e,Ht,i,r):new Promise((n=>Nt.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Ht(t){const e=!Nt.length;if(e)Lt=Lt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Nt.splice(0,1);e(Vt(t,n,i,Ht,r,a))}return e}async function jt(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(c=0,d=0){if(cthis[e]=t[e]))}}const Yt="File format is not recognized",Xt="End of central directory not found",Gt="End of Zip64 central directory not found",Jt="End of Zip64 central directory locator not found",Qt="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={}){this.reader=t,this.options=e,this.config=i()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Yt);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,V,22,1048560);if(!n)throw new Error(Xt);const i=new DataView(n.buffer);let r=pe(i,12),a=pe(i,16),s=we(i,8),o=0;if(a==T||r==T||s==O){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(pe(i,0)!=N)throw new Error(Gt);a=ye(i,8);let c=await e.readUint8Array(a,56),d=new DataView(c.buffer);const l=n.offset-20-56;if(pe(d,0)!=L&&a!=l){const t=a;a=l,o=a-t,c=await e.readUint8Array(a,56),d=new DataView(c.buffer)}if(pe(d,0)!=L)throw new Error(Jt);s=ye(d,24),r=ye(i,4),a-=ye(d,40)}if(a<0||a>=e.size)throw new Error(Yt);let c=0,d=await e.readUint8Array(a,e.size-a),l=new DataView(d.buffer);const h=n.offset-r;if(pe(l,c)!=M&&a!=h){const t=a;a=h,o=a-t,d=await e.readUint8Array(a,e.size-a),l=new DataView(d.buffer)}if(a<0||a>=e.size)throw new Error(Yt);const u=[];for(let e=0;ee.getData(t,n),u.push(r),c+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return u}async close(){}}class oe{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=he(this,e,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error(ie);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error(ie);if(pe(r,0)!=W)throw new Error($t);const s=this.localDirectory={};ce(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),de(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,c=this.bitFlag.encrypted&&s.bitFlag.encrypted,d=c&&!this.extraFieldAES;if(c){if(!d&&void 0===this.extraFieldAES.strength)throw new Error(ne);if(!a)throw new Error(ee)}const l=await Pt(this.config.Inflate,{codecType:It,password:a,zipCrypto:d,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:he(this,e,"checkSignature"),passwordVerification:d&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:c,useWebWorkers:he(this,e,"useWebWorkers")},this.config);return t.initialized||await t.init(),await jt(l,n,t,o,this.compressedSize,this.config,{onprogress:e.onprogress}),t.getData()}}function ce(t,e,n){t.version=we(e,n);const i=t.rawBitFlag=we(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&H)==H},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=pe(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>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){}}(t.rawLastModDate),t.filenameLength=we(e,n+22),t.extraFieldLength=we(e,n+24)}function de(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==T));for(let e=0;e{if(e[n]==T){if(!t||void 0===t[n])throw new Error(te);e[n]=t[n]}}))}(d,e);const l=e.extraFieldUnicodePath=a.get(28789);l&&le(l,"filename","rawFilename",e,t);const h=e.extraFieldUnicodeComment=a.get(25461);h&&le(h,"comment","rawComment",e,t);const u=e.extraFieldAES=a.get(39169);u?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=fe(i,0),t.vendorId=fe(i,2);const r=fe(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=we(i,5)}else e.compressionMethod=n}(u,e,c):e.compressionMethod=c,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function le(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=fe(a,0),t.signature=pe(a,1);const s=new X;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==pe(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function he(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;nO)throw new Error(xe);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>O)throw new Error(be);const s=this.options.version||n.version||0;if(s>O)throw new Error(me);const o=n.lastModDate||new Date;if(oZ)throw new Error(Ae);const c=De(this,n,"password"),d=De(this,n,"encryptionStrength")||3,l=De(this,n,"zipCrypto");if(void 0!==c&&void 0!==d&&(d<1||d>3))throw new Error(ke);e&&!e.initialized&&await e.init();let h=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),h=new Uint8Array(t),u.forEach(((t,n)=>{if(n>O)throw new Error(Ue);if(t.length>O)throw new Error(ve);h.set(new Uint16Array([n]),e),h.set(new Uint16Array([t.length]),e+2),h.set(t,e+4),e+=4+t.length}))}const f=e?1.05*e.size:0,w=n.zip64||this.options.zip64||this.offset>=T||f>=T||this.offset+f>=T,p=De(this,n,"level"),y=De(this,n,"useWebWorkers"),_=De(this,n,"bufferedWrite"),g=De(this,n,"keepOrder"),b=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,c;r.set(e,null);try{let d,l;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>c=t))),i.bufferedWrite||t.lockWrite?(d=new k,await d.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),d=a),l=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),c=i.level,d=0!==c&&!i.directory,l=i.zip64;let h,u;if(o&&!i.zipCrypto){h=new Uint8Array(Ee.length+2);const t=new DataView(h.buffer);Fe(t,0,P),h.set(Ee,2),u=i.encryptionStrength,ze(t,8,u)}else h=new Uint8Array(0);const f={version:i.version||20,zip64:l,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:l?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:h,rawExtraField:i.rawExtraField};let w=2056,p=0;d&&(p=8);l&&(f.version=f.version>45?f.version:45);o&&(w|=1,i.zipCrypto||(f.version=f.version>51?f.version:51,p=99,d&&(f.rawExtraFieldAES[9]=8)));const y=f.headerArray=new Uint8Array(26),_=new DataView(y.buffer);Fe(_,0,f.version),Fe(_,2,w),Fe(_,4,p);const g=new Uint32Array(1),b=new DataView(g.buffer);Fe(b,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),Fe(b,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=g[0];Ie(_,6,x),Fe(_,22,r.length),Fe(_,24,0);const m=new Uint8Array(30+r.length);let A;Ie(new DataView(m.buffer),0,W),m.set(y,4),m.set(r,30);let k=0,U=0;if(t){k=t.size;const r=await Pt(n.Deflate,{codecType:Ft,level:c,password:s,encryptionStrength:u,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:d,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),A=await jt(r,t,e,0,k,n,{onprogress:i.onprogress}),U=A.length}else await e.writeUint8Array(m);const v=new Uint8Array(l?24:16),E=new DataView(v.buffer);if(Ie(E,0,B),t)if(o&&!i.zipCrypto||void 0===A.signature||(Ie(_,10,A.signature),Ie(E,4,A.signature),f.signature=A.signature),l){const t=new DataView(f.rawExtraFieldZip64.buffer);Fe(t,0,1),Fe(t,2,24),Ie(_,14,T),Se(E,8,BigInt(U)),Se(t,12,BigInt(U)),Ie(_,18,T),Se(E,16,BigInt(k)),Se(t,4,BigInt(k))}else Ie(_,14,U),Ie(E,8,U),Ie(_,18,k),Ie(E,12,k);await e.writeUint8Array(v);const R=m.length+(A?A.length:0)+v.length;return Object.assign(f,{compressedSize:U,uncompressedSize:k,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),f}(n,d,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,l),d!=a){const e=d.getData(),n=new FileReader,i=await new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)}));await Promise.all([t.lockWrite,o]),await a.writeUint8Array(new Uint8Array(i))}if(l.offset=t.offset,l.zip64){Se(new DataView(l.rawExtraFieldZip64.buffer),20,BigInt(l.offset))}return t.offset+=l.length,l}finally{c&&c(),s&&(t.lockWrite=null,s())}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:h,zip64:w,password:c,level:p,useWebWorkers:y,encryptionStrength:d,zipCrypto:l,bufferedWrite:_,keepOrder:g}));return Object.assign(b,{name:t,comment:r,extraField:u}),new qt(b)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=T||r>=T||s>=O,c=new Uint8Array(r+(o?98:22)),d=new DataView(c.buffer);if(t.length){if(!(t.length<=O))throw new Error(ge);Fe(d,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;Ie(d,i,M),Fe(d,i+4,t.version),c.set(t.headerArray,i+6),Fe(d,i+30,a),Fe(d,i+32,t.rawComment.length),t.directory&&ze(d,i+38,16),t.zip64?Ie(d,i+42,T):Ie(d,i+42,t.offset),c.set(e,i+46),c.set(n,i+46+e.length),c.set(r,i+46+e.length+n.length),c.set(t.rawExtraField,46+e.length+n.length+r.length),c.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(Ie(d,i,L),Se(d,i+4,BigInt(44)),Fe(d,i+12,45),Fe(d,i+14,45),Se(d,i+24,BigInt(s)),Se(d,i+32,BigInt(s)),Se(d,i+40,BigInt(r)),Se(d,i+48,BigInt(a)),Ie(d,i+56,N),Se(d,i+64,BigInt(a)+BigInt(r)),Ie(d,i+72,1),s=O,a=T,r=T,i+=76),Ie(d,i,V),Fe(d,i+8,s),Fe(d,i+10,s),Ie(d,i+12,r),Ie(d,i+16,a),await e.writeUint8Array(c),t.length&&await e.writeUint8Array(t),e.getData()}}function De(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function ze(t,e,n){t.setUint8(e,n)}function Fe(t,e,n){t.setUint16(e,n,!0)}function Ie(t,e,n){t.setUint32(e,n,!0)}function Se(t,e,n){t.setBigUint64(e,n,!0)}const Ce=524288;class Te{constructor(t,e,n,i){if(t.root&&i&&i.getChildByName(e))throw new Error("Entry filename already exists");n||(n={}),this.fs=t,this.name=e,this.data=n.data,this.id=t.entries.length,this.parent=i,this.children=[],this.uncompressedSize=0,t.entries.push(this),i&&this.parent.children.push(this)}moveTo(t){this.fs.move(this,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}}class Oe extends Te{constructor(t,e,n,i){super(t,e,n,i),this.Reader=n.Reader,this.Writer=n.Writer,n.getData&&(this.getData=n.getData)}async getData(t,e={}){return!t||t.constructor==this.Writer&&this.data?this.data:(this.reader=new this.Reader(this.data,e),await this.reader.init(),t.initialized||await t.init(),this.uncompressedSize=this.reader.size,async function(t,e){return n();async function n(i=0){const r=i*Ce;if(re.file((i=>n(t.addBlob(e.name,i))),i)));async function n(t,e){const r=await i(e);for(const e of r)e.isDirectory?await n(t.addDirectory(e.name),e):await new Promise(((n,i)=>{e.file((i=>{const r=t.addBlob(e.name,i);r.uncompressedSize=i.size,n(r)}),i)}))}function i(t){return new Promise(((e,n)=>{let i=[];function r(t){t.readEntries((n=>{n.length?(i=i.concat(n),r(t)):e(i)}),n)}t.isDirectory&&r(t.createReader()),t.isFile&&e(i)}))}}(this,t)}async addData(t,e){return Pe(this,t,e)}async importBlob(t,e={}){await this.importZip(new A(t),e)}async importData64URI(t,e={}){await this.importZip(new x(t),e)}async importUint8Array(t,e={}){await this.importZip(new I(t),e)}async importHttpContent(t,e={}){await this.importZip(new F(t,e),e)}async exportBlob(t={}){return this.exportZip(new k("application/zip"),t)}async exportData64URI(t={}){return this.exportZip(new m("application/zip"),t)}async exportUint8Array(t={}){return this.exportZip(new S,t)}async importZip(t,e){t.initialized||await t.init();const n=new se(t,e);(await n.getEntries()).forEach((t=>{let n=this;const i=t.filename.split("/"),r=i.pop();i.forEach((t=>n=n.getChildByName(t)||new We(this.fs,t,null,n))),t.directory||Pe(n,r,{data:t,Reader:Me(Object.assign({},e))})}))}async exportZip(t,e){await Ve(this),await t.init();const n=new Re(t,e);return await async function(t,e,n,i){const r=e,a=new Map;async function s(t,e){async function o(){if(i.bufferedWrite)await Promise.all(e.children.map(c));else for(const t of e.children)await c(t)}async function c(e){const o=i.relativePath?e.getRelativeName(r):e.getFullname();await t.add(o,e.reader,Object.assign({directory:e.directory},Object.assign({},i,{onprogress:t=>{if(i.onprogress){a.set(o,t);try{i.onprogress(Array.from(a.values()).reduce(((t,e)=>t+e)),n)}catch(t){}}}}))),await s(t,e)}await o()}await s(t,e)}(n,this,function(t,e){let n=0;return t.forEach(i),n;function i(t){n+=t[e],t.children&&t.children.forEach(i)}}([this],"uncompressedSize"),e),await n.close(),t.getData()}getChildByName(t){for(let e=0;e{n.id==t.id&&e.splice(i,1)}))}function Ne(t){t.entries=[],t.root=new We(t)}function Pe(t,e,n,i){if(t.directory)return i?new We(t.fs,e,n,t):new Oe(t.fs,e,n,t);throw new Error("Parent entry is not a directory")}(()=>{if("function"==typeof URL.createObjectURL){const t=(()=>{const 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,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),c=Object.assign({length:16},r),d=["deriveBits"],l=["sign"],h=[8,12,16],u=[16,24,32],f=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=crypto.subtle;class p{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await w.decrypt(Object.assign({counter:this.counter},c),this.keys.key,t);return g(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=b(this.input,t)),n};if(this.password){const e=t.subarray(0,h[this.strength]+2);await async function(t,e,n){await _(t,n,e.subarray(0,h[t.strength]),["decrypt"]);const i=e.subarray(h[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(h[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=b(this.pendingInput,t),n=x(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await w.decrypt(Object.assign({counter:this.counter},c),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await w.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class y{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await w.encrypt(Object.assign({counter:this.counter},c),this.keys.key,a);return g(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=b(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(h[t.strength]));return await _(t,e,n,["encrypt"]),b(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=b(this.pendingInput,t),i=x(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await w.encrypt(Object.assign({counter:this.counter},c),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=b(this.output,t)}const e=await w.sign(i,this.keys.authentication,this.output.subarray(h[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:b(t,n),signature:n}}}async function _(t,e,n,i){t.counter=new Uint8Array(f);const c=(new TextEncoder).encode(e),h=await w.importKey("raw",c,a,!1,d),p=await w.deriveBits(Object.assign({salt:n},s),h,8*(2*u[t.strength]+2)),y=new Uint8Array(p);t.keys={key:await w.importKey("raw",y.subarray(0,u[t.strength]),r,!0,i),authentication:await w.importKey("raw",y.subarray(u[t.strength],2*u[t.strength]),o,!1,l),passwordVerification:y.subarray(2*u[t.strength])}}function g(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function b(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 x(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,v(this,t)}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return k(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class A{constructor(t,e){this.passwordVerification=e,this.password=t,v(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(U(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(U(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function R(t){const e=2|t.keys[2];return D(Math.imul(e,1^e)>>>8)}function D(t){return 255&t}function z(t){return 4294967295&t}class F{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new p(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class I{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new A(n.password,n.passwordVerification):new y(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const S={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),C=function(t,e){return e.codecType.startsWith("deflate")?new I(t,e):e.codecType.startsWith("inflate")?new F(t,e):void 0}(n,e)},append:async t=>({data:await C.append(t.data)}),flush:()=>C.flush()};let C;function T(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=S[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}})}}));const O=[0,1,2,3].concat(...T([[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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,c,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);c=a;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*c]=i[2*s]+i[2*o],n.depth[c]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=c,n.heap[1]=c++,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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,c,d,l,h,u,f=0;for(l=0;l<=15;l++)e.bl_count[l]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)c=e.heap[o],l=n[2*n[2*c+1]+1]+1,l>s&&(l=s,f++),n[2*c+1]=l,c>t.max_code||(e.bl_count[l]++,h=0,c>=a&&(h=r[c-a]),u=n[2*c],e.opt_len+=u*(l+h),i&&(e.static_len+=u*(i[2*c+1]+h)));if(0!==f){do{for(l=s-1;0===e.bl_count[l];)l--;e.bl_count[l]--,e.bl_count[l+1]+=2,e.bl_count[s]--,f-=2}while(f>0);for(l=s;0!==l;l--)for(c=e.bl_count[l];0!==c;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=l&&(e.opt_len+=(l-n[2*d+1])*n[2*d],n[2*d+1]=l),c--)}}(n),function(t,n,i){const r=[];let a,s,o,c=0;for(a=1;a<=15;a++)r[a]=c=c+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function B(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function M(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}W._length_code=[0,1,2,3,4,5,6,7].concat(...T([[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?O[t]:O[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],B.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],B.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],B.static_l_desc=new B(B.static_ltree,W.extra_lbits,257,286,15),B.static_d_desc=new B(B.static_dtree,W.extra_dbits,0,30,15),B.static_bl_desc=new B(null,W.extra_blbits,0,19,7);const V=[new M(0,0,0,0,0),new M(4,4,8,4,1),new M(4,5,16,8,1),new M(4,6,32,32,1),new M(4,4,16,16,2),new M(8,16,32,32,2),new M(8,16,128,128,2),new M(8,32,128,256,2),new M(32,128,258,1024,2),new M(32,258,258,4096,2)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function N(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;X>16-i?(n=t,Y|=n<>>16-X,X+=i-16):(Y|=t<=8&&(Q(255&Y),Y>>>=8,X-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[Z+2*j]=e>>>8&255,t.pending_buf[Z+2*j+1]=255&e,t.pending_buf[P+j]=255&n,j++,0===e?I[2*n]++:(K++,e--,I[2*(W._length_code[n]+256+1)]++,S[2*W.d_code(e)]++),0==(8191&j)&&R>2){for(i=8*j,r=m-_,a=0;a<30;a++)i+=S[2*a]*(5+W.extra_dbits[a]);if(i>>>=3,K8?$(Y):X>0&&Q(255&Y),Y=0,X=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),q=8,$(n),$(~n),t.pending_buf.set(c.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function ct(e,n,i){let r,a,s=0;R>0?(T.build_tree(t),O.build_tree(t),s=function(){let e;for(J(I,T.max_code),J(S,O.max_code),M.build_tree(t),e=18;e>=3&&0===C[2*W.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(B.static_ltree,B.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?_:-1,m-_,t),_=m,e.flush_pending()}function lt(){let t,n,i,r;do{if(r=d-k-m,0===r&&0===m&&0===k)r=a;else if(-1==r)r--;else if(m>=a+a-262){c.set(c.subarray(a,a+a),0),A-=a,m-=a,_-=a,t=f,i=t;do{n=65535&h[--i],h[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&l[--i],l[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(c,m+k,r),k+=t,k>=3&&(u=255&c[m],u=(u<a-262?m-(a-262):0;let h=F;const u=o,f=m+258;let w=c[r+s-1],p=c[r+s];U>=z&&(i>>=2),h>k&&(h=k);do{if(e=t,c[e+s]==p&&c[e+s-1]==w&&c[e]==c[r]&&c[++e]==c[r+1]){r+=2,e++;do{}while(c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&rs){if(A=t,s=n,n>=h)break;w=c[r+s-1],p=c[r+s]}}}while((t=65535&l[t&u])>d&&0!=--i);return s<=k?s:k}function ut(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,T.dyn_tree=I,T.stat_desc=B.static_l_desc,O.dyn_tree=S,O.stat_desc=B.static_d_desc,M.dyn_tree=C,M.stat_desc=B.static_bl_desc,Y=0,X=0,q=8,G(),function(){d=2*a,h[f-1]=0;for(let t=0;t9||8!=d||r<9||r>15||n<0||n>9||_<0||_>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(V[R].func!=V[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=V[R].max_lazy,z=V[R].good_length,F=V[R].nice_length,v=V[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,d=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,d=i-s),c.set(e.subarray(d,d+s),0),m=s,_=s,u=255&c[0],u=(u<4||w<0)return-2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=w)return d.msg=L[4],-2;if(0===d.avail_out)return d.msg=L[7],-5;var C;if(e=d,I=r,r=w,42==n&&(z=8+(s-8<<4)<<8,F=(R-1&255)>>1,F>3&&(F=3),z|=F<<6,0!==m&&(z|=32),z+=31-z%31,n=113,Q((C=z)>>8&255),Q(255&C)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&w<=I&&4!=w)return e.msg=L[7],-5;if(666==n&&0!==e.avail_in)return d.msg=L[7],-5;if(0!==e.avail_in||0!==k||0!=w&&666!=n){switch(S=-1,V[R].func){case 0:S=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(k<=1){if(lt(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=_+r,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-_>=a-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(w);break;case 1:S=function(t){let n,i=0;for(;;){if(k<262){if(lt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(u=(u<=3)if(n=rt(m-A,g-3),k-=g,g<=E&&k>=3){g--;do{m++,u=(u<=3&&(u=(u<4096)&&(g=2)),U>=3&&g<=U){i=m+k-3,n=rt(m-1-b,U-3),k-=U-1,U-=2;do{++m<=i&&(u=(u<0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),l.forEach((function(t){s.set(t,c),c+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}H.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new P,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 r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 Z=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],K=[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],q=[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],Y=[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],X=[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],G=[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],J=[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 Q(){let t,e,n,i,r,a;function s(t,e,s,o,c,d,l,h,u,f,w){let p,y,_,g,b,x,m,A,k,U,v,E,R,D,z;U=0,b=s;do{n[t[e+U]]++,U++,b--}while(0!==b);if(n[0]==s)return l[0]=-1,h[0]=0,0;for(A=h[0],x=1;x<=15&&0===n[x];x++);for(m=x,Ab&&(A=b),h[0]=A,D=1<E+A;){if(g++,E+=A,z=_-E,z=z>A?A:z,(y=1<<(x=m-E))>p+1&&(y-=p+1,R=m,x1440)return-3;r[g]=v=f[0],f[0]+=z,0!==g?(a[g]=b,i[0]=x,i[1]=A,x=b>>>E-A,i[2]=v-r[g-1]-x,u.set(i,3*(r[g-1]+x))):l[0]=v}for(i[1]=m-E,U>=s?i[0]=192:w[U]>>E;x>>=1)b^=x;for(b^=x,k=(1<257?(-3==f?u.msg="oversubscribed distance tree":-5==f?(u.msg="incomplete distance tree",f=-3):-4!=f&&(u.msg="empty distance tree with lengths",f=-3),f):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,c=0,d=0,l=0,h=0,u=0,f=0,w=0;function p(t,e,n,i,r,a,s,o){let c,d,l,h,u,f,w,p,y,_,g,b,x,m,A,k;w=o.next_in_index,p=o.avail_in,u=s.bitb,f=s.bitk,y=s.write,_=y>=d[k+1],f-=d[k+1],0!=(16&h)){for(h&=15,x=d[k+2]+(u&Z[h]),u>>=h,f-=h;f<15;)p--,u|=(255&o.read_byte(w++))<>=d[k+1],f-=d[k+1],0!=(16&h)){for(h&=15;f>=h,f-=h,_-=x,y>=m)A=y-m,y-A>0&&2>y-A?(s.window[y++]=s.window[A++],s.window[y++]=s.window[A++],x-=2):(s.window.set(s.window.subarray(A,A+2),y),y+=2,A+=2,x-=2);else{A=y-m;do{A+=s.end}while(A<0);if(h=s.end-A,x>h){if(x-=h,y-A>0&&h>y-A)do{s.window[y++]=s.window[A++]}while(0!=--h);else s.window.set(s.window.subarray(A,A+h),y),y+=h,A+=h,h=0;A=0}}if(y-A>0&&x>y-A)do{s.window[y++]=s.window[A++]}while(0!=--x);else s.window.set(s.window.subarray(A,A+x),y),y+=x,A+=x,x=0;break}if(0!=(64&h))return o.msg="invalid distance code",x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=y,-3;c+=d[k+2],c+=u&Z[h],k=3*(l+c),h=d[k]}break}if(0!=(64&h))return 0!=(32&h)?(x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=y,1):(o.msg="invalid literal/length code",x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=y,-3);if(c+=d[k+2],c+=u&Z[h],k=3*(l+c),0===(h=d[k])){u>>=d[k+1],f-=d[k+1],s.window[y++]=d[k+2],_--;break}}else u>>=d[k+1],f-=d[k+1],s.window[y++]=d[k+2],_--}while(_>=258&&p>=10);return x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=y,0}t.init=function(t,a,s,o,c,d){e=0,h=t,u=a,i=s,f=o,r=c,w=d,n=null},t.proc=function(t,y,_){let g,b,x,m,A,k,U,v=0,E=0,R=0;for(R=y.next_in_index,m=y.avail_in,v=t.bitb,E=t.bitk,A=t.write,k=A=258&&m>=10&&(t.bitb=v,t.bitk=E,y.avail_in=m,y.total_in+=R-y.next_in_index,y.next_in_index=R,t.write=A,_=p(h,u,i,f,r,w,t,y),R=y.next_in_index,m=y.avail_in,v=t.bitb,E=t.bitk,A=t.write,k=A>>=n[b+1],E-=n[b+1],x=n[b],0===x){c=n[b+2],e=6;break}if(0!=(16&x)){d=15&x,a=n[b+2],e=2;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}if(0!=(32&x)){e=7;break}return e=9,y.msg="invalid literal/length code",_=-3,t.bitb=v,t.bitk=E,y.avail_in=m,y.total_in+=R-y.next_in_index,y.next_in_index=R,t.write=A,t.inflate_flush(y,_);case 2:for(g=d;E>=g,E-=g,o=u,n=r,s=w,e=3;case 3:for(g=o;E>=n[b+1],E-=n[b+1],x=n[b],0!=(16&x)){d=15&x,l=n[b+2],e=4;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}return e=9,y.msg="invalid distance code",_=-3,t.bitb=v,t.bitk=E,y.avail_in=m,y.total_in+=R-y.next_in_index,y.next_in_index=R,t.write=A,t.inflate_flush(y,_);case 4:for(g=d;E>=g,E-=g,e=5;case 5:for(U=A-l;U<0;)U+=t.end;for(;0!==a;){if(0===k&&(A==t.end&&0!==t.read&&(A=0,k=A7&&(E-=8,m++,R--),t.write=A,_=t.inflate_flush(y,_),A=t.write,k=At.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(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,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(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let w,p,y,_,g,b,x,m;for(_=t.next_in_index,g=t.avail_in,p=n.bitb,y=n.bitk,b=n.write,x=b>>1){case 0:p>>>=3,y-=3,w=7&y,p>>>=w,y-=w,r=1;break;case 1:A=[],k=[],U=[[]],v=[[]],Q.inflate_trees_fixed(A,k,U,v),l.init(A[0],k[0],U[0],0,v[0],0),p>>>=3,y-=3,r=6;break;case 2:p>>>=3,y-=3,r=3;break;case 3:return p>>>=3,y-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=p,n.bitk=y,t.avail_in=g,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=b,n.inflate_flush(t,e)}break;case 1:for(;y<32;){if(0===g)return n.bitb=p,n.bitk=y,t.avail_in=g,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=b,n.inflate_flush(t,e);e=0,g--,p|=(255&t.read_byte(_++))<>>16&65535)!=(65535&p))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=p,n.bitk=y,t.avail_in=g,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=b,n.inflate_flush(t,e);a=65535&p,p=y=0,r=0!==a?2:0!==h?7:0;break;case 2:if(0===g)return n.bitb=p,n.bitk=y,t.avail_in=g,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=b,n.inflate_flush(t,e);if(0===x&&(b==n.end&&0!==n.read&&(b=0,x=bg&&(w=g),w>x&&(w=x),n.window.set(t.read_buf(_,w),b),_+=w,g-=w,b+=w,x-=w,0!=(a-=w))break;r=0!==h?7:0;break;case 3:for(;y<14;){if(0===g)return n.bitb=p,n.bitk=y,t.avail_in=g,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=b,n.inflate_flush(t,e);e=0,g--,p|=(255&t.read_byte(_++))<29||(w>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=p,n.bitk=y,t.avail_in=g,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=b,n.inflate_flush(t,e);if(w=258+(31&w)+(w>>5&31),!i||i.length>>=14,y-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;y<3;){if(0===g)return n.bitb=p,n.bitk=y,t.avail_in=g,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=b,n.inflate_flush(t,e);e=0,g--,p|=(255&t.read_byte(_++))<>>=3,y-=3}for(;o<19;)i[tt[o++]]=0;if(c[0]=7,w=f.inflate_trees_bits(i,c,d,u,t),0!=w)return-3==(e=w)&&(i=null,r=9),n.bitb=p,n.bitk=y,t.avail_in=g,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=b,n.inflate_flush(t,e);o=0,r=5;case 5:for(;w=s,!(o>=258+(31&w)+(w>>5&31));){let a,l;for(w=c[0];y>>=w,y-=w,i[o++]=l;else{for(m=18==l?7:l-14,a=18==l?11:3;y>>=w,y-=w,a+=p&Z[m],p>>>=m,y-=m,m=o,w=s,m+a>258+(31&w)+(w>>5&31)||16==l&&m<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=p,n.bitk=y,t.avail_in=g,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=b,n.inflate_flush(t,e);l=16==l?i[m-1]:0;do{i[m++]=l}while(0!=--a);o=m}}if(d[0]=-1,E=[],R=[],D=[],z=[],E[0]=9,R[0]=6,w=s,w=f.inflate_trees_dynamic(257+(31&w),1+(w>>5&31),i,E,R,D,z,u,t),0!=w)return-3==w&&(i=null,r=9),e=w,n.bitb=p,n.bitk=y,t.avail_in=g,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=b,n.inflate_flush(t,e);l.init(E[0],R[0],u,D[0],u,z[0]),r=6;case 6:if(n.bitb=p,n.bitk=y,t.avail_in=g,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=b,1!=(e=l.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,l.free(t),_=t.next_in_index,g=t.avail_in,p=n.bitb,y=n.bitk,b=n.write,x=b15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=c&&(r(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(l),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,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.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=j,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));r({workerScripts:{inflate:[e],deflate:[e]}})}})(),t.BlobReader=A,t.BlobWriter=k,t.Data64URIReader=x,t.Data64URIWriter=m,t.ERR_BAD_FORMAT=Yt,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Qt,t.ERR_DUPLICATED_NAME=_e,t.ERR_ENCRYPTED=ee,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Jt,t.ERR_EOCDR_NOT_FOUND=Xt,t.ERR_EOCDR_ZIP64_NOT_FOUND=Gt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=te,t.ERR_HTTP_RANGE=c,t.ERR_INVALID_COMMENT=ge,t.ERR_INVALID_DATE=Ae,t.ERR_INVALID_ENCRYPTION_STRENGTH=ke,t.ERR_INVALID_ENTRY_COMMENT=be,t.ERR_INVALID_ENTRY_NAME=xe,t.ERR_INVALID_EXTRAFIELD_DATA=ve,t.ERR_INVALID_EXTRAFIELD_TYPE=Ue,t.ERR_INVALID_PASSWORD=G,t.ERR_INVALID_SIGNATURE=St,t.ERR_INVALID_VERSION=me,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=$t,t.ERR_UNSUPPORTED_COMPRESSION=ie,t.ERR_UNSUPPORTED_ENCRYPTION=ne,t.HttpRangeReader=class extends F{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=F,t.Reader=y,t.TextReader=g,t.TextWriter=b,t.Uint8ArrayReader=I,t.Uint8ArrayWriter=S,t.Writer=_,t.ZipReader=se,t.ZipWriter=Re,t.configure=r,t.fs=Be,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={})=>({Deflate:s(t.Deflate,e.deflate),Inflate:s(t.Inflate,e.inflate)}),Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/zip-full.js b/dist/zip-full.js index ebc16004..35cffd15 100644 --- a/dist/zip-full.js +++ b/dist/zip-full.js @@ -4281,6 +4281,38 @@ var configureWebWorker = ()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const 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={name:"PBKDF2"},i={name:"HMAC"},a={name:"AES-CTR"},r=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},a),d=["deriveBits"],_=["sign"],u=[8,12,16],f=[16,24,32],c=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await h.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return x(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=y(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await p(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2);}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=y(this.pendingInput,t),n=g(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},l),e.key,n);r=new Uint8Array(t);}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=a[t]&&(s=!1);}return {valid:s,data:r}}}class b{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,r);return x(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=y(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await p(t,e,n,["encrypt"]),y(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=y(this.pendingInput,t),i=g(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=y(this.output,t);}const e=await h.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return {data:y(t,n),signature:n}}}async function p(t,e,n,i){t.counter=new Uint8Array(c);const l=(new TextEncoder).encode(e),u=await h.importKey("raw",l,r,!1,d),w=await h.deriveBits(Object.assign({salt:n},s),u,8*(2*f[t.strength]+2)),b=new Uint8Array(w);t.keys={key:await h.importKey("raw",b.subarray(0,f[t.strength]),a,!0,i),authentication:await h.importKey("raw",b.subarray(f[t.strength],2*f[t.strength]),o,!1,_),passwordVerification:b.subarray(2*f[t.strength])};}function x(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0;}}function y(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 g(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t);}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return k(this,t)}async flush(){return {valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t);}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12;}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return {data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function E(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function C(t){return 4294967295&t}class z{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength);}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new b(n.password,n.encryptionStrength);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const M={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),V=function(t,e){return e.codecType.startsWith("deflate")?new j(t,e):e.codecType.startsWith("inflate")?new z(t,e):void 0}(n,e);},append:async t=>({data:await V.append(t.data)}),flush:()=>V.flush()};let V;function O(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=M[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}});}}));const D=[0,1,2,3].concat(...O([[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 K(){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,d=-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,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],_=n[2*n[2*l+1]+1]+1,_>s&&(_=s,c++),n[2*l+1]=_,l>t.max_code||(e.bl_count[_]++,u=0,l>=r&&(u=a[l-r]),f=n[2*l],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(_=s;0!==_;_--)for(l=e.bl_count[_];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),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 R(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;}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;}K._length_code=[0,1,2,3,4,5,6,7].concat(...O([[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]])),K.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],K.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],K.d_code=function(t){return t<256?D[t]:D[256+(t>>>7)]},K.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],K.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],K.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R.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],R.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],R.static_l_desc=new R(R.static_ltree,K.extra_lbits,257,286,15),R.static_d_desc=new R(R.static_dtree,K.extra_dbits,0,30,15),R.static_bl_desc=new R(null,K.extra_blbits,0,19,7);const B=[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)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function P(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[F+2*H]=e>>>8&255,t.pending_buf[F+2*H+1]=255&e,t.pending_buf[q+H]=255&n,H++,0===e?j[2*n]++:(G++,e--,j[2*(K._length_code[n]+256+1)]++,M[2*K.d_code(e)]++),0==(8191&H)&&E>2){for(i=8*H,a=m-p,r=0;r<30;r++)i+=M[2*r]*(5+K.extra_dbits[r]);if(i>>>=3,G8?$(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,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n;}(e,n);}function lt(e,n,i){let a,r,s=0;E>0?(O.build_tree(t),D.build_tree(t),s=function(){let e;for(Y(j,O.max_code),Y(M,D.max_code),T.build_tree(t),e=18;e>=3&&0===V[2*K.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(R.static_ltree,R.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 _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){l.set(l.subarray(r,r+r),0),v-=r,m-=r,p-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(l,m+k,a),k+=t,k>=3&&(f=255&l[m],f=(f<r-262?m-(r-262):0;let u=z;const f=o,c=m+258;let h=l[a+s-1],w=l[a+s];A>=C&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&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(v=t,s=n,n>=u)break;h=l[a+s-1],w=l[a+s];}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}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,O.dyn_tree=j,O.stat_desc=R.static_l_desc,D.dyn_tree=M,D.stat_desc=R.static_d_desc,T.dyn_tree=V,T.stat_desc=R.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||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:(B[E].func!=B[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=B[E].max_lazy,C=B[E].good_length,z=B[E].nice_length,U=B[E].max_chain),S=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,p=s,f=255&l[0],f=(f<4||h<0)return -2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=L[4],-2;if(0===d.avail_out)return d.msg=L[7],-5;var V;if(e=d,j=a,a=h,42==n&&(C=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),C|=z<<6,0!==m&&(C|=32),C+=31-C%31,n=113,Z((V=C)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=j&&4!=h)return e.msg=L[7],-5;if(666==n&&0!==e.avail_in)return d.msg=L[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,B[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=p+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-p>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(a(e.next_in_index),o=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,l),l+=t.length;})),s}},this.flush=function(){let t,a,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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),o.forEach((function(t){a.set(t,r),r+=t.length;})),a};}W.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new q,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 F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],G=[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],J=[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],N=[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],Q=[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],X=[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],Y=[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 Z(){let t,e,n,i,a,r;function s(t,e,s,o,l,d,_,u,f,c,h){let w,b,p,x,y,g,m,v,k,A,U,I,E,S,C;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,S=1<I+v;){if(x++,I+=v,C=p-I,C=C>v?v:C,(b=1<<(g=m-I))>w+1&&(b-=w+1,E=m,g1440)return -3;a[x]=U=c[0],c[0]+=C,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U;}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}function $(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,d=0,_=0,u=0,f=0,c=0,h=0;function w(t,e,n,i,a,r,s,o){let l,d,_,u,f,c,h,w,b,p,x,y,g,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,c=s.bitk,b=s.write,p=b>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)w--,f|=(255&o.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,p-=g,b>=m)v=b-m,b-v>0&&2>b-v?(s.window[b++]=s.window[v++],s.window[b++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),b),b+=2,v+=2,g-=2);else {v=b-m;do{v+=s.end;}while(v<0);if(u=s.end-v,g>u){if(g-=u,b-v>0&&u>b-v)do{s.window[b++]=s.window[v++];}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),b),b+=u,v+=u,u=0;v=0;}}if(b-v>0&&g>b-v)do{s.window[b++]=s.window[v++];}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),b),b+=g,v+=g,g=0;break}if(0!=(64&u))return o.msg="invalid distance code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3;l+=d[k+2],l+=f&F[u],k=3*(_+l),u=d[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,1):(o.msg="invalid literal/length code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3);if(l+=d[k+2],l+=f&F[u],k=3*(_+l),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;break}}else f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;}while(p>=258&&w>=10);return g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,0}t.init=function(t,r,s,o,l,d){e=0,u=t,f=r,i=s,c=o,a=l,h=d,n=null;},t.proc=function(t,b,p){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,p=w(u,f,i,c,a,h,t,b),E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){l=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,b.msg="invalid literal/length code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 2:for(x=d;I>=x,I-=x,o=f,n=a,s=h,e=3;case 3:for(x=o;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}return e=9,b.msg="invalid distance code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,p=t.inflate_flush(b,p),v=t.write,k=vt.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,w,b,p,x,y,g,m;for(p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y>>1){case 0:w>>>=3,b-=3,h=7&b,w>>>=h,b-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],Z.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,b-=3,a=6;break;case 2:w>>>=3,b-=3,a=3;break;case 3:return w>>>=3,b-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;b<32;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>16&65535)!=(65535&w))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);r=65535&w,w=b=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(p,h),y),p+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;b<14;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(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=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,b-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;b<3;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>=3,b-=3;}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,h=c.inflate_trees_bits(i,l,d,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,_;for(h=l[0];b>>=h,b-=h,i[o++]=_;else {for(m=18==_?7:_-14,r=18==_?11:3;b>>=h,b-=h,r+=w&F[m],w>>>=m,b-=m,m=o,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_;}while(0!=--r);o=m;}}if(d[0]=-1,I=[],E=[],S=[],C=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,C,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,S[0],f,C[0]),a=6;case 6:if(n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(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&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(_),r.forEach((function(t){o.set(t,d),d+=t.length;})),o}},this.flush=function(){t.inflateEnd();};}at.prototype={inflateInit:function(t){const e=this;return e.istate=new it,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.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=rt;};}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));configure({workerScripts:{inflate:[n],deflate:[n]}});}}; + /* + Copyright (c) 2021 Gildas Lormeau. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + + 3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, + INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + function getMimeType() { + return "application/octet-stream"; + } + const FUNCTION_TYPE = "function"; var streamCodecShim = (library, options = {}) => { @@ -5783,10 +5815,10 @@ class ZipReader { - constructor(reader, options = {}, config = {}) { + constructor(reader, options = {}) { this.reader = reader; this.options = options; - this.config = config; + this.config = getConfiguration(); } async getEntries(options = {}) { @@ -6122,41 +6154,6 @@ view.setUint32(offset, value, true); } - /* - Copyright (c) 2021 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - class ZipReader$1 extends ZipReader { - - constructor(reader, options) { - super(reader, options, getConfiguration()); - } - } - /* Copyright (c) 2021 Gildas Lormeau. All rights reserved. @@ -6200,10 +6197,10 @@ class ZipWriter { - constructor(writer, options = {}, config = {}) { + constructor(writer, options = {}) { this.writer = writer; this.options = options; - this.config = config; + this.config = getConfiguration(); this.files = new Map(); this.offset = writer.size; } @@ -6371,7 +6368,7 @@ zipWriter.lockPreviousFile = new Promise(resolve => resolveLockPreviousFile = resolve); } if (options.bufferedWrite || zipWriter.lockWrite) { - fileWriter = new Uint8ArrayWriter(); + fileWriter = new BlobWriter(); await fileWriter.init(); } else { zipWriter.lockWrite = new Promise(resolve => resolveLockWrite = resolve); @@ -6387,13 +6384,15 @@ } files.set(name, fileEntry); if (fileWriter != writer) { - if (zipWriter.lockWrite) { - await zipWriter.lockWrite; - } - if (lockPreviousFile) { - await lockPreviousFile; - } - await writer.writeUint8Array(fileWriter.getData()); + const blob = fileWriter.getData(); + const fileReader = new FileReader(); + const arrayBuffer = await new Promise((resolve, reject) => { + fileReader.onload = event => resolve(event.target.result); + fileReader.onerror = reject; + fileReader.readAsArrayBuffer(blob); + }); + await Promise.all([zipWriter.lockWrite, lockPreviousFile]); + await writer.writeUint8Array(new Uint8Array(arrayBuffer)); } fileEntry.offset = zipWriter.offset; if (fileEntry.zip64) { @@ -6556,73 +6555,6 @@ view.setBigUint64(offset, value, true); } - /* - Copyright (c) 2021 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - class ZipWriter$1 extends ZipWriter { - - constructor(writer, options) { - super(writer, options, getConfiguration()); - } - } - - /* - Copyright (c) 2021 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - function getMimeType() { - return "application/octet-stream"; - } - /* Copyright (c) 2021 Gildas Lormeau. All rights reserved. @@ -6688,8 +6620,8 @@ exports.Uint8ArrayReader = Uint8ArrayReader; exports.Uint8ArrayWriter = Uint8ArrayWriter; exports.Writer = Writer; - exports.ZipReader = ZipReader$1; - exports.ZipWriter = ZipWriter$1; + exports.ZipReader = ZipReader; + exports.ZipWriter = ZipWriter; exports.configure = configure; exports.getMimeType = getMimeType; exports.initShimAsyncCodec = streamCodecShim; diff --git a/dist/zip-full.min.js b/dist/zip-full.min.js index 1cb1822c..266e85e3 100644 --- a/dist/zip-full.min.js +++ b/dist/zip-full.min.js @@ -1 +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=256,n=256,i=-2,r=-5;function a(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const s=[0,1,2,3].concat(...a([[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 o(){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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,c,u,f,_=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,_++),n[2*l+1]=c,l>t.max_code||(e.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],e.opt_len+=f*(c+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==_){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,_-=2}while(_>0);for(c=s;0!==c;c--)for(l=e.bl_count[c];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=c&&(e.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function l(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[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]])),o.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],o.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],o.d_code=function(t){return t<256?s[t]:s[256+(t>>>7)]},o.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],o.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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.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,o.extra_lbits,257,286,15),l.static_d_desc=new l(l.static_dtree,o.extra_dbits,0,30,15),l.static_bl_desc=new l(null,o.extra_blbits,0,19,7);function d(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new d(0,0,0,0,0),new d(4,4,8,4,1),new d(4,5,16,8,1),new d(4,6,32,32,1),new d(4,4,16,16,2),new d(8,16,32,32,2),new d(8,16,128,128,2),new d(8,32,128,256,2),new d(32,128,258,1024,2),new d(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],f=113,_=666,h=258,w=262;function p(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function lt(t,e){let n;const i=e;it>16-i?(n=t,nt|=n<>>16-it,it+=i-16):(nt|=t<=8&&(st(255&nt),nt>>>=8,it-=8)}function ft(n,i){let r,a,s;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[G+Q]=255&i,Q++,0===n?j[2*i]++:(tt++,n--,j[2*(o._length_code[i]+e+1)]++,q[2*o.d_code(n)]++),0==(8191&Q)&&N>2){for(r=8*Q,a=T-F,s=0;s<30;s++)r+=q[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,tt8?ot(nt):it>0&&st(255&nt),nt=0,it=0}function wt(e,n,i){lt(0+(i?1:0),3),function(e,n,i){ht(),et=8,i&&(ot(n),ot(~n)),t.pending_buf.set(m.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function pt(e,n,i){let r,a,s=0;N>0?(Z.build_tree(t),Y.build_tree(t),s=function(){let e;for(at(j,Z.max_code),at(q,Y.max_code),X.build_tree(t),e=18;e>=3&&0===K[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?wt(e,n,i):a==r?(lt(2+(i?1:0),3),_t(l.static_ltree,l.static_dtree)):(lt(4+(i?1:0),3),function(t,e,n){let i;for(lt(t-257,5),lt(e-1,5),lt(n-4,4),i=0;i=0?F:-1,T-F,t),F=T,a.flush_pending()}function yt(){let t,e,n,i;do{if(i=v-O-T,0===i&&0===T&&0===O)i=y;else if(-1==i)i--;else if(T>=y+y-w){m.set(m.subarray(y,y+y),0),M-=y,T-=y,F-=y,t=E,n=t;do{e=65535&A[--n],A[n]=e>=y?e-y:0}while(0!=--t);t=y,n=t;do{e=65535&k[--n],k[n]=e>=y?e-y:0}while(0!=--t);i+=y}if(0===a.avail_in)return;t=a.read_buf(m,T+O,i),O+=t,O>=3&&(U=255&m[T],U=(U<y-w?T-(y-w):0;let o=H;const l=x,d=T+h;let c=m[r+a-1],u=m[r+a];V>=P&&(i>>=2),o>O&&(o=O);do{if(e=t,m[e+a]==u&&m[e+a-1]==c&&m[e]==m[r]&&m[++e]==m[r+1]){r+=2,e++;do{}while(m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&ra){if(M=t,a=n,n>=o)break;c=m[r+a-1],u=m[r+a]}}}while((t=65535&k[t&l])>s&&0!=--i);return a<=O?a:O}function xt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,s=f,b=0,Z.dyn_tree=j,Z.stat_desc=l.static_l_desc,Y.dyn_tree=q,Y.stat_desc=l.static_d_desc,X.dyn_tree=K,X.stat_desc=l.static_bl_desc,nt=0,it=0,et=8,rt(),function(){v=2*y,A[E-1]=0;for(let t=0;t9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(e.dstate=t,g=r,y=1<9||n<0||n>2?i:(c[N].func!=c[e].func&&0!==t.total_in&&(r=t.deflate(1)),N!=e&&(N=e,W=c[N].max_lazy,P=c[N].good_length,H=c[N].nice_length,L=c[N].max_chain),B=n,r)},t.deflateSetDictionary=function(t,e,n){let r,a=n,o=0;if(!e||42!=s)return i;if(a<3)return 0;for(a>y-w&&(a=y-w,o=n-a),m.set(e.subarray(o,o+a),0),T=a,F=a,U=255&m[0],U=(U<4||o<0)return i;if(!e.next_out||!e.next_in&&0!==e.avail_in||s==_&&4!=o)return e.msg=u[4],i;if(0===e.avail_out)return e.msg=u[7],r;var P;if(a=e,R=b,b=o,42==s&&(p=8+(g-8<<4)<<8,v=(N-1&255)>>1,v>3&&(v=3),p|=v<<6,0!==T&&(p|=32),p+=31-p%31,s=f,st((P=p)>>8&255),st(255&P)),0!==t.pending){if(a.flush_pending(),0===a.avail_out)return b=-1,0}else if(0===a.avail_in&&o<=R&&4!=o)return a.msg=u[7],r;if(s==_&&0!==a.avail_in)return e.msg=u[7],r;if(0!==a.avail_in||0!==O||0!=o&&s!=_){switch(L=-1,c[N].func){case 0:L=function(t){let e,n=65535;for(n>d-5&&(n=d-5);;){if(O<=1){if(yt(),0===O&&0==t)return 0;if(0===O)break}if(T+=O,O=0,e=F+n,(0===T||T>=e)&&(O=T-e,T=e,bt(!1),0===a.avail_out))return 0;if(T-F>=y-w&&(bt(!1),0===a.avail_out))return 0}return bt(4==t),0===a.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:L=function(t){let e,n=0;for(;;){if(O=3&&(U=(U<=3)if(e=ft(T-M,z-3),O-=z,z<=W&&O>=3){z--;do{T++,U=(U<=3&&(U=(U<4096)&&(z=2)),V>=3&&z<=V){n=T+O-3,e=ft(T-1-S,V-3),O-=V-1,V-=2;do{++T<=n&&(U=(U<n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 g=-2,x=-3,m=-5,v=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=[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],A=[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],U=[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],E=[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],R=[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],D=[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],I=15;function F(){let t,e,n,i,r,a;function s(t,e,s,o,l,d,c,u,f,_,h){let w,p,b,y,g,v,k,A,U,E,R,D,F,z,S;E=0,g=s;do{n[t[e+E]]++,E++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(A=u[0],v=1;v<=I&&0===n[v];v++);for(k=v,Ag&&(A=g),u[0]=A,z=1<D+A;){if(y++,D+=A,S=b-D,S=S>A?A:S,(p=1<<(v=k-D))>w+1&&(p-=w+1,F=k,v1440)return x;r[y]=R=_[0],_[0]+=S,0!==y?(a[y]=g,i[0]=v,i[1]=A,v=g>>>D-A,i[2]=R-r[y-1]-v,f.set(i,3*(r[y-1]+v))):c[0]=R}for(i[1]=k-D,E>=s?i[0]=192:h[E]>>D;v>>=1)g^=v;for(g^=v,U=(1<257?(_==x?f.msg="oversubscribed distance tree":_==m?(f.msg="incomplete distance tree",_=x):-4!=_&&(f.msg="empty distance tree with lengths",_=x),_):0)}}F.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=k,i[0]=A,0};function z(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,_=0,h=0;function w(t,e,n,i,r,a,s,o){let l,d,c,u,f,_,h,w,p,b,y,g,m,k,A,U;h=o.next_in_index,w=o.avail_in,f=s.bitb,_=s.bitk,p=s.write,b=p>=d[U+1],_-=d[U+1],0!=(16&u)){for(u&=15,m=d[U+2]+(f&v[u]),f>>=u,_-=u;_<15;)w--,f|=(255&o.read_byte(h++))<<_,_+=8;for(l=f&g,d=r,c=a,U=3*(c+l),u=d[U];;){if(f>>=d[U+1],_-=d[U+1],0!=(16&u)){for(u&=15;_>=u,_-=u,b-=m,p>=k)A=p-k,p-A>0&&2>p-A?(s.window[p++]=s.window[A++],s.window[p++]=s.window[A++],m-=2):(s.window.set(s.window.subarray(A,A+2),p),p+=2,A+=2,m-=2);else{A=p-k;do{A+=s.end}while(A<0);if(u=s.end-A,m>u){if(m-=u,p-A>0&&u>p-A)do{s.window[p++]=s.window[A++]}while(0!=--u);else s.window.set(s.window.subarray(A,A+u),p),p+=u,A+=u,u=0;A=0}}if(p-A>0&&m>p-A)do{s.window[p++]=s.window[A++]}while(0!=--m);else s.window.set(s.window.subarray(A,A+m),p),p+=m,A+=m,m=0;break}if(0!=(64&u))return o.msg="invalid distance code",m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,x;l+=d[U+2],l+=f&v[u],U=3*(c+l),u=d[U]}break}if(0!=(64&u))return 0!=(32&u)?(m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,1):(o.msg="invalid literal/length code",m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,x);if(l+=d[U+2],l+=f&v[u],U=3*(c+l),0===(u=d[U])){f>>=d[U+1],_-=d[U+1],s.window[p++]=d[U+2],b--;break}}else f>>=d[U+1],_-=d[U+1],s.window[p++]=d[U+2],b--}while(b>=258&&w>=10);return m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,0}t.init=function(t,a,s,o,l,d){e=0,u=t,f=a,i=s,_=o,r=l,h=d,n=null},t.proc=function(t,p,b){let y,m,k,A,U,E,R,D=0,I=0,F=0;for(F=p.next_in_index,A=p.avail_in,D=t.bitb,I=t.bitk,U=t.write,E=U=258&&A>=10&&(t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=F-p.next_in_index,p.next_in_index=F,t.write=U,b=w(u,f,i,_,r,h,t,p),F=p.next_in_index,A=p.avail_in,D=t.bitb,I=t.bitk,U=t.write,E=U>>=n[m+1],I-=n[m+1],k=n[m],0===k){l=n[m+2],e=6;break}if(0!=(16&k)){d=15&k,a=n[m+2],e=2;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}if(0!=(32&k)){e=7;break}return e=9,p.msg="invalid literal/length code",b=x,t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=F-p.next_in_index,p.next_in_index=F,t.write=U,t.inflate_flush(p,b);case 2:for(y=d;I>=y,I-=y,o=f,n=r,s=h,e=3;case 3:for(y=o;I>=n[m+1],I-=n[m+1],k=n[m],0!=(16&k)){d=15&k,c=n[m+2],e=4;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}return e=9,p.msg="invalid distance code",b=x,t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=F-p.next_in_index,p.next_in_index=F,t.write=U,t.inflate_flush(p,b);case 4:for(y=d;I>=y,I-=y,e=5;case 5:for(R=U-c;R<0;)R+=t.end;for(;0!==a;){if(0===E&&(U==t.end&&0!==t.read&&(U=0,E=U7&&(I-=8,A++,F--),t.write=U,b=t.inflate_flush(p,b),U=t.write,E=Ut.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,w,p,b,y,m,k,A;for(b=t.next_in_index,y=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m>>1){case 0:w>>>=3,p-=3,h=7&p,w>>>=h,p-=h,r=1;break;case 1:U=[],E=[],R=[[]],D=[[]],F.inflate_trees_fixed(U,E,R,D),c.init(U[0],E[0],R[0],0,D[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,t.msg="invalid block type",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);if(0===k&&(m==n.end&&0!==n.read&&(m=0,k=my&&(h=y),h>k&&(h=k),n.window.set(t.read_buf(b,h),m),b+=h,y-=h,m+=h,k-=h,0!=(a-=h))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<>>=3,p-=3}for(;o<19;)i[S[o++]]=0;if(l[0]=7,h=_.inflate_trees_bits(i,l,d,f,t),0!=h)return(e=h)==x&&(i=null,r=9),n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=l[0];p>>=h,p-=h,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;p>>=h,p-=h,a+=w&v[A],w>>>=A,p-=A,A=o,h=s,A+a>258+(31&h)+(h>>5&31)||16==c&&A<1)return i=null,r=9,t.msg="invalid bit length repeat",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(d[0]=-1,I=[],z=[],C=[],T=[],I[0]=9,z[0]=6,h=s,h=_.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,z,C,T,f,t),0!=h)return h==x&&(i=null,r=9),e=h,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);c.init(I[0],z[0],f,C[0],f,T[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),b=t.next_in_index,y=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m15?(t.inflateEnd(n),g):(t.wbits=i,n.istate.blocks=new C(n,1<>4)>r.wbits){r.mode=T,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=T,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=T,t.msg="need dictionary",r.marker=0,g;case 7:if(n=r.blocks.proc(t,n),n==x){r.mode=T,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case T:return x;default:return g}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return g;const a=t.istate;return r>=1<{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)};if(this.codec=new t(Object.assign({},e,n)),typeof this.codec.onData==P)this.codec.onData=i;else{if(typeof this.codec.on!=P)throw new Error("Cannot register the callback function");this.codec.on("data",i)}}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const j="HTTP error ",q="HTTP Range not supported",K="text/plain",Z="Content-Length",Y="Accept-Ranges",X="HEAD",G="GET",J="bytes";class Q{constructor(){this.size=0}init(){this.initialized=!0}}class $ extends Q{}class tt extends Q{writeUint8Array(t){this.size+=t.length}}class et extends ${constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class nt extends ${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(),ct(this.url)&&!this.preventHeadRequest){const t=await rt(X,this.url,this.options);if(this.size=Number(t.headers.get(Z)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(Y)!=J)throw new Error(q);void 0===this.size&&await it(this,this.options)}else await it(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await rt(G,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(q);return new Uint8Array(await n.arrayBuffer())}return this.data||await it(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function it(t,e){const n=await rt(G,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function rt(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(j+(r.statusText||r.status))}class at extends ${constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),ct(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>ot(X,this.url,(n=>{this.size=Number(n.getResponseHeader(Z)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(Y)==J?t():e(new Error(q)):void 0===this.size?st(this,this.url).then((()=>t())).catch(e):t()}),e)));await st(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await st(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>ot(G,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(q)}}function st(t,e){return new Promise(((n,i)=>ot(G,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function ot(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(j+(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 lt extends ${constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new at(t,e):this.reader=new nt(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)}}class dt extends tt{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}}function ct(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 ut=4294967295,ft=65535,_t=67324752,ht=134695760,wt=33639248,pt=101010256,bt=101075792,yt=117853008,gt=39169,xt=2048,mt="/",vt=new Date(2107,11,31),kt=new Date(1980,0,1),At="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Ut=[];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;Ut[t]=e}class Et{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^Ut[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Rt="Invalid pasword",Dt=16,It="raw",Ft={name:"PBKDF2"},zt={name:"HMAC"},St="SHA-1",Ct={name:"AES-CTR"},Tt=Object.assign({hash:zt},Ft),Mt=Object.assign({iterations:1e3,hash:{name:St}},Ft),Ot=Object.assign({hash:St},zt),Vt=Object.assign({length:Dt},Ct),Lt=["deriveBits"],Wt=["sign"],Nt=[8,12,16],Bt=[16,24,32],Pt=10,Ht=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],jt=crypto.subtle;class qt{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+Dt<=i.length-Pt){const t=i.subarray(r,r+Dt),a=await jt.decrypt(Object.assign({counter:this.counter},Vt),this.keys.key,t);return Yt(this.counter),n.set(new Uint8Array(a),r),e(r+Dt)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=Xt(this.input,t)),n};if(this.password){const e=t.subarray(0,Nt[this.strength]+2);await async function(t,e,n){await Zt(t,n,e.subarray(0,Nt[t.strength]),["decrypt"]);const i=e.subarray(Nt[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(Rt)}(this,e,this.password),this.password=null,t=t.subarray(Nt[this.strength]+2)}let n=new Uint8Array(t.length-Pt-(t.length-Pt)%Dt),i=t;return this.pendingInput.length&&(i=Xt(this.pendingInput,t),n=Gt(n,i.length-Pt-(i.length-Pt)%Dt)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-Pt),i=t.subarray(t.length-Pt);let r=new Uint8Array(0);if(n.length){const t=await jt.decrypt(Object.assign({counter:this.counter},Vt),e.key,n);r=new Uint8Array(t)}let a=!0;if(this.signed){const t=await jt.sign(zt,e.authentication,this.input.subarray(0,this.input.length-Pt)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(r+Dt<=t.length){const a=t.subarray(r,r+Dt),s=await jt.encrypt(Object.assign({counter:this.counter},Vt),this.keys.key,a);return Yt(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+Dt)}return this.pendingInput=t.subarray(r),this.output=Xt(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(Nt[t.strength]));return await Zt(t,e,n,["encrypt"]),Xt(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%Dt);return i.set(n,0),this.pendingInput.length&&(t=Xt(this.pendingInput,t),i=Gt(i,t.length-t.length%Dt)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await jt.encrypt(Object.assign({counter:this.counter},Vt),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=Xt(this.output,t)}const e=await jt.sign(zt,this.keys.authentication,this.output.subarray(Nt[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,Pt);return{data:Xt(t,n),signature:n}}}async function Zt(t,e,n,i){t.counter=new Uint8Array(Ht);const r=(new TextEncoder).encode(e),a=await jt.importKey(It,r,Tt,!1,Lt),s=await jt.deriveBits(Object.assign({salt:n},Mt),a,8*(2*Bt[t.strength]+2)),o=new Uint8Array(s);t.keys={key:await jt.importKey(It,o.subarray(0,Bt[t.strength]),Ct,!0,i),authentication:await jt.importKey(It,o.subarray(Bt[t.strength],2*Bt[t.strength]),Ot,!1,Wt),passwordVerification:o.subarray(2*Bt[t.strength])}}function Yt(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function Xt(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 Gt(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const Jt=12;class Qt{constructor(t,e){this.password=t,this.passwordVerification=e,ne(this,t)}async append(t){if(this.password){const e=te(this,t.subarray(0,Jt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(Rt);t=t.subarray(Jt)}return te(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class $t{constructor(t,e){this.passwordVerification=e,this.password=t,ne(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(Jt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(ee(this,i),0),n=Jt}else e=new Uint8Array(t.length),n=0;return e.set(ee(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function te(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function re(t){const e=2|t.keys[2];return ae(Math.imul(e,1^e)>>>8)}function ae(t){return 255&t}function se(t){return 4294967295&t}const oe="deflate",le="inflate",de="Invalid signature";class ce{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Et,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new Qt(e.password,e.passwordVerification):new qt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(de);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(de)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class ue{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Et,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new $t(e.password,e.passwordVerification):new Kt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const fe="init",_e="append",he="flush",we="message";var pe=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-full.min.js",document.baseURI).href)),t.worker.addEventListener(we,r,!1),t.interface={append:t=>n({type:_e,data:t}),flush:()=>n({type:he})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:fe,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==fe||r==he||r==_e){const n=i.data;r==he?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(oe)?new ue(t,e):e.codecType.startsWith(le)?new ce(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let be=[],ye=[];function ge(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(be.length!t.busy));return n?pe(n,t,e,xe,i,r):new Promise((n=>ye.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function xe(t){const e=!ye.length;if(e)be=be.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=ye.splice(0,1);e(pe(t,n,i,xe,r,a))}return e}async function me(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(l=0,d=0){if(lthis[e]=t[e]))}}const Ue="File format is not recognized",Ee="End of central directory not found",Re="End of Zip64 central directory not found",De="End of Zip64 central directory locator not found",Ie="Central directory header not found",Fe="Local file header not found",ze="Zip64 extra field not found",Se="File contains encrypted entry",Ce="Encryption method not supported",Te="Compression method not supported",Me="utf-8",Oe=["uncompressedSize","compressedSize","offset"];class Ve{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=Be(this,e,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error(Te);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error(Te);if(qe(r,0)!=_t)throw new Error(Fe);const s=this.localDirectory={};Le(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),We(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,l=this.bitFlag.encrypted&&s.bitFlag.encrypted,d=l&&!this.extraFieldAES;if(l){if(!d&&void 0===this.extraFieldAES.strength)throw new Error(Ce);if(!a)throw new Error(Se)}const c=await ge(this.config.Inflate,{codecType:le,password:a,zipCrypto:d,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:Be(this,e,"checkSignature"),passwordVerification:d&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:l,useWebWorkers:Be(this,e,"useWebWorkers")},this.config);return t.initialized||await t.init(),await me(c,n,t,o,this.compressedSize,this.config,{onprogress:e.onprogress}),t.getData()}}function Le(t,e,n){t.version=je(e,n);const i=t.rawBitFlag=je(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&xt)==xt},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=qe(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>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){}}(t.rawLastModDate),t.filenameLength=je(e,n+22),t.extraFieldLength=je(e,n+24)}function We(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==ut));for(let e=0;e{if(e[n]==ut){if(!t||void 0===t[n])throw new Error(ze);e[n]=t[n]}}))}(d,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Ne(c,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&Ne(u,"comment","rawComment",e,t);const f=e.extraFieldAES=a.get(39169);f?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=He(i,0),t.vendorId=He(i,2);const r=He(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=je(i,5)}else e.compressionMethod=n}(f,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Ne(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=He(a,0),t.signature=qe(a,1);const s=new Et;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==qe(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Be(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Pe(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n{if("function"==typeof URL.createObjectURL){const t=(()=>{const 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,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},r),d=["deriveBits"],c=["sign"],u=[8,12,16],f=[16,24,32],_=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await h.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return y(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=g(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await b(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=g(this.pendingInput,t),n=x(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},l),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class p{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,a);return y(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=g(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await b(t,e,n,["encrypt"]),g(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=g(this.pendingInput,t),i=x(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=g(this.output,t)}const e=await h.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:g(t,n),signature:n}}}async function b(t,e,n,i){t.counter=new Uint8Array(_);const l=(new TextEncoder).encode(e),u=await h.importKey("raw",l,a,!1,d),w=await h.deriveBits(Object.assign({salt:n},s),u,8*(2*f[t.strength]+2)),p=new Uint8Array(w);t.keys={key:await h.importKey("raw",p.subarray(0,f[t.strength]),r,!0,i),authentication:await h.importKey("raw",p.subarray(f[t.strength],2*f[t.strength]),o,!1,c),passwordVerification:p.subarray(2*f[t.strength])}}function y(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function g(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 x(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return k(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function R(t){const e=2|t.keys[2];return D(Math.imul(e,1^e)>>>8)}function D(t){return 255&t}function I(t){return 4294967295&t}class F{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class z{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new p(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const S={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),C=function(t,e){return e.codecType.startsWith("deflate")?new z(t,e):e.codecType.startsWith("inflate")?new F(t,e):void 0}(n,e)},append:async t=>({data:await C.append(t.data)}),flush:()=>C.flush()};let C;function T(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=S[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}})}}));const M=[0,1,2,3].concat(...T([[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 O(){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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,c,u,f,_=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,_++),n[2*l+1]=c,l>t.max_code||(e.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],e.opt_len+=f*(c+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==_){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,_-=2}while(_>0);for(c=s;0!==c;c--)for(l=e.bl_count[c];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=c&&(e.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function V(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function L(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}O._length_code=[0,1,2,3,4,5,6,7].concat(...T([[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]])),O.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],O.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],O.d_code=function(t){return t<256?M[t]:M[256+(t>>>7)]},O.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],O.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],O.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],V.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],V.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],V.static_l_desc=new V(V.static_ltree,O.extra_lbits,257,286,15),V.static_d_desc=new V(V.static_dtree,O.extra_dbits,0,30,15),V.static_bl_desc=new V(null,O.extra_blbits,0,19,7);const W=[new L(0,0,0,0,0),new L(4,4,8,4,1),new L(4,5,16,8,1),new L(4,6,32,32,1),new L(4,4,16,16,2),new L(8,16,32,32,2),new L(8,16,128,128,2),new L(8,32,128,256,2),new L(32,128,258,1024,2),new L(32,258,258,4096,2)],N=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function B(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;X>16-i?(n=t,Y|=n<>>16-X,X+=i-16):(Y|=t<=8&&(Q(255&Y),Y>>>=8,X-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[q+2*j]=e>>>8&255,t.pending_buf[q+2*j+1]=255&e,t.pending_buf[P+j]=255&n,j++,0===e?z[2*n]++:(K++,e--,z[2*(O._length_code[n]+256+1)]++,S[2*O.d_code(e)]++),0==(8191&j)&&R>2){for(i=8*j,r=m-b,a=0;a<30;a++)i+=S[2*a]*(5+O.extra_dbits[a]);if(i>>>=3,K8?$(Y):X>0&&Q(255&Y),Y=0,X=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),Z=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let r,a,s=0;R>0?(T.build_tree(t),M.build_tree(t),s=function(){let e;for(J(z,T.max_code),J(S,M.max_code),L.build_tree(t),e=18;e>=3&&0===C[2*O.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(V.static_ltree,V.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?b:-1,m-b,t),b=m,e.flush_pending()}function ct(){let t,n,i,r;do{if(r=d-k-m,0===r&&0===m&&0===k)r=a;else if(-1==r)r--;else if(m>=a+a-262){l.set(l.subarray(a,a+a),0),v-=a,m-=a,b-=a,t=_,i=t;do{n=65535&u[--i],u[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&c[--i],c[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(l,m+k,r),k+=t,k>=3&&(f=255&l[m],f=(f<a-262?m-(a-262):0;let u=F;const f=o,_=m+258;let h=l[r+s-1],w=l[r+s];A>=I&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&l[e+s-1]==h&&l[e]==l[r]&&l[++e]==l[r+1]){r+=2,e++;do{}while(l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&r<_);if(n=258-(_-r),r=_-258,n>s){if(v=t,s=n,n>=u)break;h=l[r+s-1],w=l[r+s]}}}while((t=65535&c[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,T.dyn_tree=z,T.stat_desc=V.static_l_desc,M.dyn_tree=S,M.stat_desc=V.static_d_desc,L.dyn_tree=C,L.stat_desc=V.static_bl_desc,Y=0,X=0,Z=8,G(),function(){d=2*a,u[_-1]=0;for(let t=0;t<_-1;t++)u[t]=0;E=W[R].max_lazy,I=W[R].good_length,F=W[R].nice_length,U=W[R].max_chain,m=0,b=0,k=0,y=A=2,x=0,f=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],z=[],S=[],C=[],t.pqdownheap=function(e,n){const i=t.heap,r=i[n];let a=n<<1;for(;a<=t.heap_len&&(a9||8!=d||r<9||r>15||n<0||n>9||b<0||b>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(W[R].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=W[R].max_lazy,I=W[R].good_length,F=W[R].nice_length,U=W[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,d=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,b=s,f=255&l[0],f=(f<4||h<0)return-2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=N[4],-2;if(0===d.avail_out)return d.msg=N[7],-5;var C;if(e=d,z=r,r=h,42==n&&(I=8+(s-8<<4)<<8,F=(R-1&255)>>1,F>3&&(F=3),I|=F<<6,0!==m&&(I|=32),I+=31-I%31,n=113,Q((C=I)>>8&255),Q(255&C)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&h<=z&&4!=h)return e.msg=N[7],-5;if(666==n&&0!==e.avail_in)return d.msg=N[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(S=-1,W[R].func){case 0:S=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(k<=1){if(ct(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=b+r,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-b>=a-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:S=function(t){let n,i=0;for(;;){if(k<262){if(ct(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=rt(m-v,y-3),k-=y,y<=E&&k>=3){y--;do{m++,f=(f<=3&&(f=(f<4096)&&(y=2)),A>=3&&y<=A){i=m+k-3,n=rt(m-1-g,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),c.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}H.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new P,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 r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 q=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],K=[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],Y=[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],X=[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],G=[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],J=[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 Q(){let t,e,n,i,r,a;function s(t,e,s,o,l,d,c,u,f,_,h){let w,p,b,y,g,x,m,v,k,A,U,E,R,D,I;A=0,g=s;do{n[t[e+A]]++,A++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(v=u[0],x=1;x<=15&&0===n[x];x++);for(m=x,vg&&(v=g),u[0]=v,D=1<E+v;){if(y++,E+=v,I=b-E,I=I>v?v:I,(p=1<<(x=m-E))>w+1&&(p-=w+1,R=m,x1440)return-3;r[y]=U=_[0],_[0]+=I,0!==y?(a[y]=g,i[0]=x,i[1]=v,x=g>>>E-v,i[2]=U-r[y-1]-x,f.set(i,3*(r[y-1]+x))):c[0]=U}for(i[1]=m-E,A>=s?i[0]=192:h[A]>>E;x>>=1)g^=x;for(g^=x,k=(1<257?(-3==_?f.msg="oversubscribed distance tree":-5==_?(f.msg="incomplete distance tree",_=-3):-4!=_&&(f.msg="empty distance tree with lengths",_=-3),_):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,_=0,h=0;function w(t,e,n,i,r,a,s,o){let l,d,c,u,f,_,h,w,p,b,y,g,x,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,_=s.bitk,p=s.write,b=p>=d[k+1],_-=d[k+1],0!=(16&u)){for(u&=15,x=d[k+2]+(f&q[u]),f>>=u,_-=u;_<15;)w--,f|=(255&o.read_byte(h++))<<_,_+=8;for(l=f&g,d=r,c=a,k=3*(c+l),u=d[k];;){if(f>>=d[k+1],_-=d[k+1],0!=(16&u)){for(u&=15;_>=u,_-=u,b-=x,p>=m)v=p-m,p-v>0&&2>p-v?(s.window[p++]=s.window[v++],s.window[p++]=s.window[v++],x-=2):(s.window.set(s.window.subarray(v,v+2),p),p+=2,v+=2,x-=2);else{v=p-m;do{v+=s.end}while(v<0);if(u=s.end-v,x>u){if(x-=u,p-v>0&&u>p-v)do{s.window[p++]=s.window[v++]}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),p),p+=u,v+=u,u=0;v=0}}if(p-v>0&&x>p-v)do{s.window[p++]=s.window[v++]}while(0!=--x);else s.window.set(s.window.subarray(v,v+x),p),p+=x,v+=x,x=0;break}if(0!=(64&u))return o.msg="invalid distance code",x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,-3;l+=d[k+2],l+=f&q[u],k=3*(c+l),u=d[k]}break}if(0!=(64&u))return 0!=(32&u)?(x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,1):(o.msg="invalid literal/length code",x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,-3);if(l+=d[k+2],l+=f&q[u],k=3*(c+l),0===(u=d[k])){f>>=d[k+1],_-=d[k+1],s.window[p++]=d[k+2],b--;break}}else f>>=d[k+1],_-=d[k+1],s.window[p++]=d[k+2],b--}while(b>=258&&w>=10);return x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,0}t.init=function(t,a,s,o,l,d){e=0,u=t,f=a,i=s,_=o,r=l,h=d,n=null},t.proc=function(t,p,b){let y,g,x,m,v,k,A,U=0,E=0,R=0;for(R=p.next_in_index,m=p.avail_in,U=t.bitb,E=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,b=w(u,f,i,_,r,h,t,p),R=p.next_in_index,m=p.avail_in,U=t.bitb,E=t.bitk,v=t.write,k=v>>=n[g+1],E-=n[g+1],x=n[g],0===x){l=n[g+2],e=6;break}if(0!=(16&x)){d=15&x,a=n[g+2],e=2;break}if(0==(64&x)){o=x,s=g/3+n[g+2];break}if(0!=(32&x)){e=7;break}return e=9,p.msg="invalid literal/length code",b=-3,t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,t.inflate_flush(p,b);case 2:for(y=d;E>=y,E-=y,o=f,n=r,s=h,e=3;case 3:for(y=o;E>=n[g+1],E-=n[g+1],x=n[g],0!=(16&x)){d=15&x,c=n[g+2],e=4;break}if(0==(64&x)){o=x,s=g/3+n[g+2];break}return e=9,p.msg="invalid distance code",b=-3,t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,t.inflate_flush(p,b);case 4:for(y=d;E>=y,E-=y,e=5;case 5:for(A=v-c;A<0;)A+=t.end;for(;0!==a;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(E-=8,m++,R--),t.write=v,b=t.inflate_flush(p,b),v=t.write,k=vt.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(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,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(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,w,p,b,y,g,x,m;for(b=t.next_in_index,y=t.avail_in,w=n.bitb,p=n.bitk,g=n.write,x=g>>1){case 0:w>>>=3,p-=3,h=7&p,w>>>=h,p-=h,r=1;break;case 1:v=[],k=[],A=[[]],U=[[]],Q.inflate_trees_fixed(v,k,A,U),c.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);if(0===x&&(g==n.end&&0!==n.read&&(g=0,x=gy&&(h=y),h>x&&(h=x),n.window.set(t.read_buf(b,h),g),b+=h,y-=h,g+=h,x-=h,0!=(a-=h))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<>>=3,p-=3}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,h=_.inflate_trees_bits(i,l,d,f,t),0!=h)return-3==(e=h)&&(i=null,r=9),n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=l[0];p>>=h,p-=h,i[o++]=c;else{for(m=18==c?7:c-14,a=18==c?11:3;p>>=h,p-=h,a+=w&q[m],w>>>=m,p-=m,m=o,h=s,m+a>258+(31&h)+(h>>5&31)||16==c&&m<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);c=16==c?i[m-1]:0;do{i[m++]=c}while(0!=--a);o=m}}if(d[0]=-1,E=[],R=[],D=[],I=[],E[0]=9,R[0]=6,h=s,h=_.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,E,R,D,I,f,t),0!=h)return-3==h&&(i=null,r=9),e=h,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);c.init(E[0],R[0],f,D[0],f,I[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),b=t.next_in_index,y=t.avail_in,w=n.bitb,p=n.bitk,g=n.write,x=g15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,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.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=j,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));B({workerScripts:{inflate:[e],deflate:[e]}})}})(),B({Deflate:function(t){const e=new y,n=512,i=new Uint8Array(n);let r=t?t.level:-1;void 0===r&&(r=-1),e.deflateInit(r),e.next_out=i,this.append=function(t,r){let a,s,o=0,l=0,d=0;const c=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,a=e.deflate(0),0!=a)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?c.push(new Uint8Array(i)):c.push(new Uint8Array(i.subarray(0,e.next_out_index)))),d+=e.next_out_index,r&&e.next_in_index>0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),c.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}},Inflate:function(){const t=new V,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,r){const a=[];let s,o,l=0,d=0,c=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===m){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?a.push(new Uint8Array(e)):a.push(new Uint8Array(e.subarray(0,t.next_out_index)))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=et,t.BlobWriter=class extends tt{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}},t.Data64URIReader=class extends ${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_BAD_FORMAT=Ue,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Ie,t.ERR_DUPLICATED_NAME=Ze,t.ERR_ENCRYPTED=Se,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=De,t.ERR_EOCDR_NOT_FOUND=Ee,t.ERR_EOCDR_ZIP64_NOT_FOUND=Re,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=ze,t.ERR_HTTP_RANGE=q,t.ERR_INVALID_COMMENT=Ye,t.ERR_INVALID_DATE=Qe,t.ERR_INVALID_ENCRYPTION_STRENGTH=$e,t.ERR_INVALID_ENTRY_COMMENT=Xe,t.ERR_INVALID_ENTRY_NAME=Ge,t.ERR_INVALID_EXTRAFIELD_DATA=en,t.ERR_INVALID_EXTRAFIELD_TYPE=tn,t.ERR_INVALID_PASSWORD=Rt,t.ERR_INVALID_SIGNATURE=de,t.ERR_INVALID_VERSION=Je,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Fe,t.ERR_UNSUPPORTED_COMPRESSION=Te,t.ERR_UNSUPPORTED_ENCRYPTION=Ce,t.HttpRangeReader=class extends lt{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=lt,t.Reader=$,t.TextReader=class extends ${constructor(t){super(),this.blobReader=new et(new Blob([t],{type:K}))}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 tt{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:K})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:K})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends ${constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=dt,t.Writer=tt,t.ZipReader=class extends class{constructor(t,e={},n={}){this.reader=t,this.options=e,this.config=n}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Ue);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,pt,22,1048560);if(!n)throw new Error(Ee);const i=new DataView(n.buffer);let r=qe(i,12),a=qe(i,16),s=je(i,8),o=0;if(a==ut||r==ut||s==ft){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(qe(i,0)!=yt)throw new Error(Re);a=Ke(i,8);let l=await e.readUint8Array(a,56),d=new DataView(l.buffer);const c=n.offset-20-56;if(qe(d,0)!=bt&&a!=c){const t=a;a=c,o=a-t,l=await e.readUint8Array(a,56),d=new DataView(l.buffer)}if(qe(d,0)!=bt)throw new Error(De);s=Ke(d,24),r=Ke(i,4),a-=Ke(d,40)}if(a<0||a>=e.size)throw new Error(Ue);let l=0,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer);const u=n.offset-r;if(qe(c,l)!=wt&&a!=u){const t=a;a=u,o=a-t,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer)}if(a<0||a>=e.size)throw new Error(Ue);const f=[];for(let e=0;ee.getData(t,n),f.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return f}async close(){}}{constructor(t,e){super(t,e,N())}},t.ZipWriter=class extends class{constructor(t,e={},n={}){this.writer=t,this.options=e,this.config=n,this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(mt)?t+=mt:n.directory=t.endsWith(mt),this.files.has(t))throw new Error(Ze);const i=(new TextEncoder).encode(t);if(i.length>ft)throw new Error(Ge);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>ft)throw new Error(Xe);const s=this.options.version||n.version||0;if(s>ft)throw new Error(Je);const o=n.lastModDate||new Date;if(ovt)throw new Error(Qe);const l=rn(this,n,"password"),d=rn(this,n,"encryptionStrength")||3,c=rn(this,n,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error($e);e&&!e.initialized&&await e.init();let u=new Uint8Array(0);const f=n.extraField;if(f){let t=0,e=0;f.forEach((e=>t+=4+e.length)),u=new Uint8Array(t),f.forEach(((t,n)=>{if(n>ft)throw new Error(tn);if(t.length>ft)throw new Error(en);u.set(new Uint16Array([n]),e),u.set(new Uint16Array([t.length]),e+2),u.set(t,e+4),e+=4+t.length}))}const _=e?1.05*e.size:0,h=n.zip64||this.options.zip64||this.offset>=ut||_>=ut||this.offset+_>=ut,w=rn(this,n,"level"),p=rn(this,n,"useWebWorkers"),b=rn(this,n,"bufferedWrite"),y=rn(this,n,"keepOrder"),g=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,l;r.set(e,null);try{let d,c;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>l=t))),i.bufferedWrite||t.lockWrite?(d=new dt,await d.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),d=a),c=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),l=i.level,d=0!==l&&!i.directory,c=i.zip64;let u,f;if(o&&!i.zipCrypto){u=new Uint8Array(nn.length+2);const t=new DataView(u.buffer);sn(t,0,gt),u.set(nn,2),f=i.encryptionStrength,an(t,8,f)}else u=new Uint8Array(0);const _={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let h=2056,w=0;d&&(w=8);c&&(_.version=_.version>45?_.version:45);o&&(h|=1,i.zipCrypto||(_.version=_.version>51?_.version:51,w=99,d&&(_.rawExtraFieldAES[9]=8)));const p=_.headerArray=new Uint8Array(26),b=new DataView(p.buffer);sn(b,0,_.version),sn(b,2,h),sn(b,4,w);const y=new Uint32Array(1),g=new DataView(y.buffer);sn(g,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),sn(g,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=y[0];on(b,6,x),sn(b,22,r.length),sn(b,24,0);const m=new Uint8Array(30+r.length);let v;on(new DataView(m.buffer),0,_t),m.set(p,4),m.set(r,30);let k=0,A=0;if(t){k=t.size;const r=await ge(n.Deflate,{codecType:oe,level:l,password:s,encryptionStrength:f,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:d,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),v=await me(r,t,e,0,k,n,{onprogress:i.onprogress}),A=v.length}else await e.writeUint8Array(m);const U=new Uint8Array(c?24:16),E=new DataView(U.buffer);if(on(E,0,ht),t)if(o&&!i.zipCrypto||void 0===v.signature||(on(b,10,v.signature),on(E,4,v.signature),_.signature=v.signature),c){const t=new DataView(_.rawExtraFieldZip64.buffer);sn(t,0,1),sn(t,2,24),on(b,14,ut),ln(E,8,BigInt(A)),ln(t,12,BigInt(A)),on(b,18,ut),ln(E,16,BigInt(k)),ln(t,4,BigInt(k))}else on(b,14,A),on(E,8,A),on(b,18,k),on(E,12,k);await e.writeUint8Array(U);const R=m.length+(v?v.length:0)+U.length;return Object.assign(_,{compressedSize:A,uncompressedSize:k,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),_}(n,d,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,c),d!=a&&(t.lockWrite&&await t.lockWrite,o&&await o,await a.writeUint8Array(d.getData())),c.offset=t.offset,c.zip64){ln(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return t.offset+=c.length,c}finally{l&&l(),s&&(t.lockWrite=null,s())}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:u,zip64:h,password:l,level:w,useWebWorkers:p,encryptionStrength:d,zipCrypto:c,bufferedWrite:b,keepOrder:y}));return Object.assign(g,{name:t,comment:r,extraField:f}),new Ae(g)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=ut||r>=ut||s>=ft,l=new Uint8Array(r+(o?98:22)),d=new DataView(l.buffer);if(t.length){if(!(t.length<=ft))throw new Error(Ye);sn(d,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;on(d,i,wt),sn(d,i+4,t.version),l.set(t.headerArray,i+6),sn(d,i+30,a),sn(d,i+32,t.rawComment.length),t.directory&&an(d,i+38,16),t.zip64?on(d,i+42,ut):on(d,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(on(d,i,bt),ln(d,i+4,BigInt(44)),sn(d,i+12,45),sn(d,i+14,45),ln(d,i+24,BigInt(s)),ln(d,i+32,BigInt(s)),ln(d,i+40,BigInt(r)),ln(d,i+48,BigInt(a)),on(d,i+56,yt),ln(d,i+64,BigInt(a)+BigInt(r)),on(d,i+72,1),s=ft,a=ut,r=ut,i+=76),on(d,i,pt),sn(d,i+8,s),sn(d,i+10,s),on(d,i+12,r),on(d,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}}{constructor(t,e){super(t,e,N())}},t.configure=B,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={})=>({Deflate:H(t.Deflate,e.deflate),Inflate:H(t.Inflate,e.inflate)}),Object.defineProperty(t,"__esModule",{value:!0})})); +!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=256,n=256,i=-2,r=-5;function a(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const s=[0,1,2,3].concat(...a([[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 o(){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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,c,u,f,_=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,_++),n[2*l+1]=c,l>t.max_code||(e.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],e.opt_len+=f*(c+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==_){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,_-=2}while(_>0);for(c=s;0!==c;c--)for(l=e.bl_count[c];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=c&&(e.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function l(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[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]])),o.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],o.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],o.d_code=function(t){return t<256?s[t]:s[256+(t>>>7)]},o.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],o.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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.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,o.extra_lbits,257,286,15),l.static_d_desc=new l(l.static_dtree,o.extra_dbits,0,30,15),l.static_bl_desc=new l(null,o.extra_blbits,0,19,7);function d(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new d(0,0,0,0,0),new d(4,4,8,4,1),new d(4,5,16,8,1),new d(4,6,32,32,1),new d(4,4,16,16,2),new d(8,16,32,32,2),new d(8,16,128,128,2),new d(8,32,128,256,2),new d(32,128,258,1024,2),new d(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],f=113,_=666,h=258,w=262;function p(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function lt(t,e){let n;const i=e;it>16-i?(n=t,nt|=n<>>16-it,it+=i-16):(nt|=t<=8&&(st(255&nt),nt>>>=8,it-=8)}function ft(n,i){let r,a,s;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[G+Q]=255&i,Q++,0===n?j[2*i]++:(tt++,n--,j[2*(o._length_code[i]+e+1)]++,q[2*o.d_code(n)]++),0==(8191&Q)&&N>2){for(r=8*Q,a=T-F,s=0;s<30;s++)r+=q[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,tt8?ot(nt):it>0&&st(255&nt),nt=0,it=0}function wt(e,n,i){lt(0+(i?1:0),3),function(e,n,i){ht(),et=8,i&&(ot(n),ot(~n)),t.pending_buf.set(m.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function pt(e,n,i){let r,a,s=0;N>0?(Z.build_tree(t),Y.build_tree(t),s=function(){let e;for(at(j,Z.max_code),at(q,Y.max_code),X.build_tree(t),e=18;e>=3&&0===K[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?wt(e,n,i):a==r?(lt(2+(i?1:0),3),_t(l.static_ltree,l.static_dtree)):(lt(4+(i?1:0),3),function(t,e,n){let i;for(lt(t-257,5),lt(e-1,5),lt(n-4,4),i=0;i=0?F:-1,T-F,t),F=T,a.flush_pending()}function yt(){let t,e,n,i;do{if(i=v-O-T,0===i&&0===T&&0===O)i=y;else if(-1==i)i--;else if(T>=y+y-w){m.set(m.subarray(y,y+y),0),M-=y,T-=y,F-=y,t=E,n=t;do{e=65535&A[--n],A[n]=e>=y?e-y:0}while(0!=--t);t=y,n=t;do{e=65535&k[--n],k[n]=e>=y?e-y:0}while(0!=--t);i+=y}if(0===a.avail_in)return;t=a.read_buf(m,T+O,i),O+=t,O>=3&&(U=255&m[T],U=(U<y-w?T-(y-w):0;let o=H;const l=x,d=T+h;let c=m[r+a-1],u=m[r+a];V>=P&&(i>>=2),o>O&&(o=O);do{if(e=t,m[e+a]==u&&m[e+a-1]==c&&m[e]==m[r]&&m[++e]==m[r+1]){r+=2,e++;do{}while(m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&ra){if(M=t,a=n,n>=o)break;c=m[r+a-1],u=m[r+a]}}}while((t=65535&k[t&l])>s&&0!=--i);return a<=O?a:O}function xt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,s=f,b=0,Z.dyn_tree=j,Z.stat_desc=l.static_l_desc,Y.dyn_tree=q,Y.stat_desc=l.static_d_desc,X.dyn_tree=K,X.stat_desc=l.static_bl_desc,nt=0,it=0,et=8,rt(),function(){v=2*y,A[E-1]=0;for(let t=0;t9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(e.dstate=t,g=r,y=1<9||n<0||n>2?i:(c[N].func!=c[e].func&&0!==t.total_in&&(r=t.deflate(1)),N!=e&&(N=e,W=c[N].max_lazy,P=c[N].good_length,H=c[N].nice_length,L=c[N].max_chain),B=n,r)},t.deflateSetDictionary=function(t,e,n){let r,a=n,o=0;if(!e||42!=s)return i;if(a<3)return 0;for(a>y-w&&(a=y-w,o=n-a),m.set(e.subarray(o,o+a),0),T=a,F=a,U=255&m[0],U=(U<4||o<0)return i;if(!e.next_out||!e.next_in&&0!==e.avail_in||s==_&&4!=o)return e.msg=u[4],i;if(0===e.avail_out)return e.msg=u[7],r;var P;if(a=e,R=b,b=o,42==s&&(p=8+(g-8<<4)<<8,v=(N-1&255)>>1,v>3&&(v=3),p|=v<<6,0!==T&&(p|=32),p+=31-p%31,s=f,st((P=p)>>8&255),st(255&P)),0!==t.pending){if(a.flush_pending(),0===a.avail_out)return b=-1,0}else if(0===a.avail_in&&o<=R&&4!=o)return a.msg=u[7],r;if(s==_&&0!==a.avail_in)return e.msg=u[7],r;if(0!==a.avail_in||0!==O||0!=o&&s!=_){switch(L=-1,c[N].func){case 0:L=function(t){let e,n=65535;for(n>d-5&&(n=d-5);;){if(O<=1){if(yt(),0===O&&0==t)return 0;if(0===O)break}if(T+=O,O=0,e=F+n,(0===T||T>=e)&&(O=T-e,T=e,bt(!1),0===a.avail_out))return 0;if(T-F>=y-w&&(bt(!1),0===a.avail_out))return 0}return bt(4==t),0===a.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:L=function(t){let e,n=0;for(;;){if(O=3&&(U=(U<=3)if(e=ft(T-M,z-3),O-=z,z<=W&&O>=3){z--;do{T++,U=(U<=3&&(U=(U<4096)&&(z=2)),V>=3&&z<=V){n=T+O-3,e=ft(T-1-S,V-3),O-=V-1,V-=2;do{++T<=n&&(U=(U<n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 g=-2,x=-3,m=-5,v=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=[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],A=[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],U=[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],E=[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],R=[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],D=[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],I=15;function F(){let t,e,n,i,r,a;function s(t,e,s,o,l,d,c,u,f,_,h){let w,p,b,y,g,v,k,A,U,E,R,D,F,z,S;E=0,g=s;do{n[t[e+E]]++,E++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(A=u[0],v=1;v<=I&&0===n[v];v++);for(k=v,Ag&&(A=g),u[0]=A,z=1<D+A;){if(y++,D+=A,S=b-D,S=S>A?A:S,(p=1<<(v=k-D))>w+1&&(p-=w+1,F=k,v1440)return x;r[y]=R=_[0],_[0]+=S,0!==y?(a[y]=g,i[0]=v,i[1]=A,v=g>>>D-A,i[2]=R-r[y-1]-v,f.set(i,3*(r[y-1]+v))):c[0]=R}for(i[1]=k-D,E>=s?i[0]=192:h[E]>>D;v>>=1)g^=v;for(g^=v,U=(1<257?(_==x?f.msg="oversubscribed distance tree":_==m?(f.msg="incomplete distance tree",_=x):-4!=_&&(f.msg="empty distance tree with lengths",_=x),_):0)}}F.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=k,i[0]=A,0};function z(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,_=0,h=0;function w(t,e,n,i,r,a,s,o){let l,d,c,u,f,_,h,w,p,b,y,g,m,k,A,U;h=o.next_in_index,w=o.avail_in,f=s.bitb,_=s.bitk,p=s.write,b=p>=d[U+1],_-=d[U+1],0!=(16&u)){for(u&=15,m=d[U+2]+(f&v[u]),f>>=u,_-=u;_<15;)w--,f|=(255&o.read_byte(h++))<<_,_+=8;for(l=f&g,d=r,c=a,U=3*(c+l),u=d[U];;){if(f>>=d[U+1],_-=d[U+1],0!=(16&u)){for(u&=15;_>=u,_-=u,b-=m,p>=k)A=p-k,p-A>0&&2>p-A?(s.window[p++]=s.window[A++],s.window[p++]=s.window[A++],m-=2):(s.window.set(s.window.subarray(A,A+2),p),p+=2,A+=2,m-=2);else{A=p-k;do{A+=s.end}while(A<0);if(u=s.end-A,m>u){if(m-=u,p-A>0&&u>p-A)do{s.window[p++]=s.window[A++]}while(0!=--u);else s.window.set(s.window.subarray(A,A+u),p),p+=u,A+=u,u=0;A=0}}if(p-A>0&&m>p-A)do{s.window[p++]=s.window[A++]}while(0!=--m);else s.window.set(s.window.subarray(A,A+m),p),p+=m,A+=m,m=0;break}if(0!=(64&u))return o.msg="invalid distance code",m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,x;l+=d[U+2],l+=f&v[u],U=3*(c+l),u=d[U]}break}if(0!=(64&u))return 0!=(32&u)?(m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,1):(o.msg="invalid literal/length code",m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,x);if(l+=d[U+2],l+=f&v[u],U=3*(c+l),0===(u=d[U])){f>>=d[U+1],_-=d[U+1],s.window[p++]=d[U+2],b--;break}}else f>>=d[U+1],_-=d[U+1],s.window[p++]=d[U+2],b--}while(b>=258&&w>=10);return m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,0}t.init=function(t,a,s,o,l,d){e=0,u=t,f=a,i=s,_=o,r=l,h=d,n=null},t.proc=function(t,p,b){let y,m,k,A,U,E,R,D=0,I=0,F=0;for(F=p.next_in_index,A=p.avail_in,D=t.bitb,I=t.bitk,U=t.write,E=U=258&&A>=10&&(t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=F-p.next_in_index,p.next_in_index=F,t.write=U,b=w(u,f,i,_,r,h,t,p),F=p.next_in_index,A=p.avail_in,D=t.bitb,I=t.bitk,U=t.write,E=U>>=n[m+1],I-=n[m+1],k=n[m],0===k){l=n[m+2],e=6;break}if(0!=(16&k)){d=15&k,a=n[m+2],e=2;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}if(0!=(32&k)){e=7;break}return e=9,p.msg="invalid literal/length code",b=x,t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=F-p.next_in_index,p.next_in_index=F,t.write=U,t.inflate_flush(p,b);case 2:for(y=d;I>=y,I-=y,o=f,n=r,s=h,e=3;case 3:for(y=o;I>=n[m+1],I-=n[m+1],k=n[m],0!=(16&k)){d=15&k,c=n[m+2],e=4;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}return e=9,p.msg="invalid distance code",b=x,t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=F-p.next_in_index,p.next_in_index=F,t.write=U,t.inflate_flush(p,b);case 4:for(y=d;I>=y,I-=y,e=5;case 5:for(R=U-c;R<0;)R+=t.end;for(;0!==a;){if(0===E&&(U==t.end&&0!==t.read&&(U=0,E=U7&&(I-=8,A++,F--),t.write=U,b=t.inflate_flush(p,b),U=t.write,E=Ut.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,w,p,b,y,m,k,A;for(b=t.next_in_index,y=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m>>1){case 0:w>>>=3,p-=3,h=7&p,w>>>=h,p-=h,r=1;break;case 1:U=[],E=[],R=[[]],D=[[]],F.inflate_trees_fixed(U,E,R,D),c.init(U[0],E[0],R[0],0,D[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,t.msg="invalid block type",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);if(0===k&&(m==n.end&&0!==n.read&&(m=0,k=my&&(h=y),h>k&&(h=k),n.window.set(t.read_buf(b,h),m),b+=h,y-=h,m+=h,k-=h,0!=(a-=h))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<>>=3,p-=3}for(;o<19;)i[S[o++]]=0;if(l[0]=7,h=_.inflate_trees_bits(i,l,d,f,t),0!=h)return(e=h)==x&&(i=null,r=9),n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=l[0];p>>=h,p-=h,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;p>>=h,p-=h,a+=w&v[A],w>>>=A,p-=A,A=o,h=s,A+a>258+(31&h)+(h>>5&31)||16==c&&A<1)return i=null,r=9,t.msg="invalid bit length repeat",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(d[0]=-1,I=[],z=[],C=[],T=[],I[0]=9,z[0]=6,h=s,h=_.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,z,C,T,f,t),0!=h)return h==x&&(i=null,r=9),e=h,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);c.init(I[0],z[0],f,C[0],f,T[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),b=t.next_in_index,y=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m15?(t.inflateEnd(n),g):(t.wbits=i,n.istate.blocks=new C(n,1<>4)>r.wbits){r.mode=T,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=T,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=T,t.msg="need dictionary",r.marker=0,g;case 7:if(n=r.blocks.proc(t,n),n==x){r.mode=T,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case T:return x;default:return g}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return g;const a=t.istate;return r>=1<{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)};if(this.codec=new t(Object.assign({},e,n)),typeof this.codec.onData==P)this.codec.onData=i;else{if(typeof this.codec.on!=P)throw new Error("Cannot register the callback function");this.codec.on("data",i)}}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const j="HTTP error ",q="HTTP Range not supported",K="text/plain",Z="Content-Length",Y="Accept-Ranges",X="HEAD",G="GET",J="bytes";class Q{constructor(){this.size=0}init(){this.initialized=!0}}class $ extends Q{}class tt extends Q{writeUint8Array(t){this.size+=t.length}}class et extends ${constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class nt extends tt{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class it extends ${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(),ct(this.url)&&!this.preventHeadRequest){const t=await at(X,this.url,this.options);if(this.size=Number(t.headers.get(Z)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(Y)!=J)throw new Error(q);void 0===this.size&&await rt(this,this.options)}else await rt(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await at(G,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(q);return new Uint8Array(await n.arrayBuffer())}return this.data||await rt(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function rt(t,e){const n=await at(G,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function at(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(j+(r.statusText||r.status))}class st extends ${constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),ct(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>lt(X,this.url,(n=>{this.size=Number(n.getResponseHeader(Z)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(Y)==J?t():e(new Error(q)):void 0===this.size?ot(this,this.url).then((()=>t())).catch(e):t()}),e)));await ot(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await ot(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>lt(G,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(q)}}function ot(t,e){return new Promise(((n,i)=>lt(G,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function lt(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(j+(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 ${constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new st(t,e):this.reader=new it(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 ct(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 ut=4294967295,ft=65535,_t=67324752,ht=134695760,wt=33639248,pt=101010256,bt=101075792,yt=117853008,gt=39169,xt=2048,mt="/",vt=new Date(2107,11,31),kt=new Date(1980,0,1),At="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Ut=[];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;Ut[t]=e}class Et{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^Ut[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Rt="Invalid pasword",Dt=16,It="raw",Ft={name:"PBKDF2"},zt={name:"HMAC"},St="SHA-1",Ct={name:"AES-CTR"},Tt=Object.assign({hash:zt},Ft),Mt=Object.assign({iterations:1e3,hash:{name:St}},Ft),Ot=Object.assign({hash:St},zt),Vt=Object.assign({length:Dt},Ct),Lt=["deriveBits"],Wt=["sign"],Nt=[8,12,16],Bt=[16,24,32],Pt=10,Ht=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],jt=crypto.subtle;class qt{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+Dt<=i.length-Pt){const t=i.subarray(r,r+Dt),a=await jt.decrypt(Object.assign({counter:this.counter},Vt),this.keys.key,t);return Yt(this.counter),n.set(new Uint8Array(a),r),e(r+Dt)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=Xt(this.input,t)),n};if(this.password){const e=t.subarray(0,Nt[this.strength]+2);await async function(t,e,n){await Zt(t,n,e.subarray(0,Nt[t.strength]),["decrypt"]);const i=e.subarray(Nt[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(Rt)}(this,e,this.password),this.password=null,t=t.subarray(Nt[this.strength]+2)}let n=new Uint8Array(t.length-Pt-(t.length-Pt)%Dt),i=t;return this.pendingInput.length&&(i=Xt(this.pendingInput,t),n=Gt(n,i.length-Pt-(i.length-Pt)%Dt)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-Pt),i=t.subarray(t.length-Pt);let r=new Uint8Array(0);if(n.length){const t=await jt.decrypt(Object.assign({counter:this.counter},Vt),e.key,n);r=new Uint8Array(t)}let a=!0;if(this.signed){const t=await jt.sign(zt,e.authentication,this.input.subarray(0,this.input.length-Pt)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(r+Dt<=t.length){const a=t.subarray(r,r+Dt),s=await jt.encrypt(Object.assign({counter:this.counter},Vt),this.keys.key,a);return Yt(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+Dt)}return this.pendingInput=t.subarray(r),this.output=Xt(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(Nt[t.strength]));return await Zt(t,e,n,["encrypt"]),Xt(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%Dt);return i.set(n,0),this.pendingInput.length&&(t=Xt(this.pendingInput,t),i=Gt(i,t.length-t.length%Dt)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await jt.encrypt(Object.assign({counter:this.counter},Vt),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=Xt(this.output,t)}const e=await jt.sign(zt,this.keys.authentication,this.output.subarray(Nt[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,Pt);return{data:Xt(t,n),signature:n}}}async function Zt(t,e,n,i){t.counter=new Uint8Array(Ht);const r=(new TextEncoder).encode(e),a=await jt.importKey(It,r,Tt,!1,Lt),s=await jt.deriveBits(Object.assign({salt:n},Mt),a,8*(2*Bt[t.strength]+2)),o=new Uint8Array(s);t.keys={key:await jt.importKey(It,o.subarray(0,Bt[t.strength]),Ct,!0,i),authentication:await jt.importKey(It,o.subarray(Bt[t.strength],2*Bt[t.strength]),Ot,!1,Wt),passwordVerification:o.subarray(2*Bt[t.strength])}}function Yt(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function Xt(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 Gt(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const Jt=12;class Qt{constructor(t,e){this.password=t,this.passwordVerification=e,ne(this,t)}async append(t){if(this.password){const e=te(this,t.subarray(0,Jt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(Rt);t=t.subarray(Jt)}return te(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class $t{constructor(t,e){this.passwordVerification=e,this.password=t,ne(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(Jt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(ee(this,i),0),n=Jt}else e=new Uint8Array(t.length),n=0;return e.set(ee(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function te(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function re(t){const e=2|t.keys[2];return ae(Math.imul(e,1^e)>>>8)}function ae(t){return 255&t}function se(t){return 4294967295&t}const oe="deflate",le="inflate",de="Invalid signature";class ce{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Et,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new Qt(e.password,e.passwordVerification):new qt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(de);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(de)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class ue{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Et,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new $t(e.password,e.passwordVerification):new Kt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const fe="init",_e="append",he="flush",we="message";var pe=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-full.min.js",document.baseURI).href)),t.worker.addEventListener(we,r,!1),t.interface={append:t=>n({type:_e,data:t}),flush:()=>n({type:he})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:fe,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==fe||r==he||r==_e){const n=i.data;r==he?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(oe)?new ue(t,e):e.codecType.startsWith(le)?new ce(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let be=[],ye=[];function ge(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(be.length!t.busy));return n?pe(n,t,e,xe,i,r):new Promise((n=>ye.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function xe(t){const e=!ye.length;if(e)be=be.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=ye.splice(0,1);e(pe(t,n,i,xe,r,a))}return e}async function me(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(l=0,d=0){if(lthis[e]=t[e]))}}const Ue="File format is not recognized",Ee="End of central directory not found",Re="End of Zip64 central directory not found",De="End of Zip64 central directory locator not found",Ie="Central directory header not found",Fe="Local file header not found",ze="Zip64 extra field not found",Se="File contains encrypted entry",Ce="Encryption method not supported",Te="Compression method not supported",Me="utf-8",Oe=["uncompressedSize","compressedSize","offset"];class Ve{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=Be(this,e,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error(Te);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error(Te);if(qe(r,0)!=_t)throw new Error(Fe);const s=this.localDirectory={};Le(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),We(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,l=this.bitFlag.encrypted&&s.bitFlag.encrypted,d=l&&!this.extraFieldAES;if(l){if(!d&&void 0===this.extraFieldAES.strength)throw new Error(Ce);if(!a)throw new Error(Se)}const c=await ge(this.config.Inflate,{codecType:le,password:a,zipCrypto:d,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:Be(this,e,"checkSignature"),passwordVerification:d&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:l,useWebWorkers:Be(this,e,"useWebWorkers")},this.config);return t.initialized||await t.init(),await me(c,n,t,o,this.compressedSize,this.config,{onprogress:e.onprogress}),t.getData()}}function Le(t,e,n){t.version=je(e,n);const i=t.rawBitFlag=je(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&xt)==xt},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=qe(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>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){}}(t.rawLastModDate),t.filenameLength=je(e,n+22),t.extraFieldLength=je(e,n+24)}function We(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==ut));for(let e=0;e{if(e[n]==ut){if(!t||void 0===t[n])throw new Error(ze);e[n]=t[n]}}))}(d,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Ne(c,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&Ne(u,"comment","rawComment",e,t);const f=e.extraFieldAES=a.get(39169);f?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=He(i,0),t.vendorId=He(i,2);const r=He(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=je(i,5)}else e.compressionMethod=n}(f,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Ne(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=He(a,0),t.signature=qe(a,1);const s=new Et;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==qe(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Be(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Pe(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n{if("function"==typeof URL.createObjectURL){const t=(()=>{const 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,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},r),d=["deriveBits"],c=["sign"],u=[8,12,16],f=[16,24,32],_=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await h.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return y(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=g(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await b(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=g(this.pendingInput,t),n=x(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},l),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class p{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,a);return y(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=g(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await b(t,e,n,["encrypt"]),g(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=g(this.pendingInput,t),i=x(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=g(this.output,t)}const e=await h.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:g(t,n),signature:n}}}async function b(t,e,n,i){t.counter=new Uint8Array(_);const l=(new TextEncoder).encode(e),u=await h.importKey("raw",l,a,!1,d),w=await h.deriveBits(Object.assign({salt:n},s),u,8*(2*f[t.strength]+2)),p=new Uint8Array(w);t.keys={key:await h.importKey("raw",p.subarray(0,f[t.strength]),r,!0,i),authentication:await h.importKey("raw",p.subarray(f[t.strength],2*f[t.strength]),o,!1,c),passwordVerification:p.subarray(2*f[t.strength])}}function y(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function g(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 x(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return k(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function R(t){const e=2|t.keys[2];return D(Math.imul(e,1^e)>>>8)}function D(t){return 255&t}function I(t){return 4294967295&t}class F{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class z{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new p(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const S={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),C=function(t,e){return e.codecType.startsWith("deflate")?new z(t,e):e.codecType.startsWith("inflate")?new F(t,e):void 0}(n,e)},append:async t=>({data:await C.append(t.data)}),flush:()=>C.flush()};let C;function T(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=S[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}})}}));const M=[0,1,2,3].concat(...T([[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 O(){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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,c,u,f,_=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,_++),n[2*l+1]=c,l>t.max_code||(e.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],e.opt_len+=f*(c+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==_){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,_-=2}while(_>0);for(c=s;0!==c;c--)for(l=e.bl_count[c];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=c&&(e.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function V(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function L(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}O._length_code=[0,1,2,3,4,5,6,7].concat(...T([[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]])),O.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],O.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],O.d_code=function(t){return t<256?M[t]:M[256+(t>>>7)]},O.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],O.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],O.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],V.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],V.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],V.static_l_desc=new V(V.static_ltree,O.extra_lbits,257,286,15),V.static_d_desc=new V(V.static_dtree,O.extra_dbits,0,30,15),V.static_bl_desc=new V(null,O.extra_blbits,0,19,7);const W=[new L(0,0,0,0,0),new L(4,4,8,4,1),new L(4,5,16,8,1),new L(4,6,32,32,1),new L(4,4,16,16,2),new L(8,16,32,32,2),new L(8,16,128,128,2),new L(8,32,128,256,2),new L(32,128,258,1024,2),new L(32,258,258,4096,2)],N=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function B(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;X>16-i?(n=t,Y|=n<>>16-X,X+=i-16):(Y|=t<=8&&(Q(255&Y),Y>>>=8,X-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[q+2*j]=e>>>8&255,t.pending_buf[q+2*j+1]=255&e,t.pending_buf[P+j]=255&n,j++,0===e?z[2*n]++:(K++,e--,z[2*(O._length_code[n]+256+1)]++,S[2*O.d_code(e)]++),0==(8191&j)&&R>2){for(i=8*j,r=m-b,a=0;a<30;a++)i+=S[2*a]*(5+O.extra_dbits[a]);if(i>>>=3,K8?$(Y):X>0&&Q(255&Y),Y=0,X=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),Z=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let r,a,s=0;R>0?(T.build_tree(t),M.build_tree(t),s=function(){let e;for(J(z,T.max_code),J(S,M.max_code),L.build_tree(t),e=18;e>=3&&0===C[2*O.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(V.static_ltree,V.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?b:-1,m-b,t),b=m,e.flush_pending()}function ct(){let t,n,i,r;do{if(r=d-k-m,0===r&&0===m&&0===k)r=a;else if(-1==r)r--;else if(m>=a+a-262){l.set(l.subarray(a,a+a),0),v-=a,m-=a,b-=a,t=_,i=t;do{n=65535&u[--i],u[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&c[--i],c[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(l,m+k,r),k+=t,k>=3&&(f=255&l[m],f=(f<a-262?m-(a-262):0;let u=F;const f=o,_=m+258;let h=l[r+s-1],w=l[r+s];A>=I&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&l[e+s-1]==h&&l[e]==l[r]&&l[++e]==l[r+1]){r+=2,e++;do{}while(l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&r<_);if(n=258-(_-r),r=_-258,n>s){if(v=t,s=n,n>=u)break;h=l[r+s-1],w=l[r+s]}}}while((t=65535&c[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,T.dyn_tree=z,T.stat_desc=V.static_l_desc,M.dyn_tree=S,M.stat_desc=V.static_d_desc,L.dyn_tree=C,L.stat_desc=V.static_bl_desc,Y=0,X=0,Z=8,G(),function(){d=2*a,u[_-1]=0;for(let t=0;t<_-1;t++)u[t]=0;E=W[R].max_lazy,I=W[R].good_length,F=W[R].nice_length,U=W[R].max_chain,m=0,b=0,k=0,y=A=2,x=0,f=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],z=[],S=[],C=[],t.pqdownheap=function(e,n){const i=t.heap,r=i[n];let a=n<<1;for(;a<=t.heap_len&&(a9||8!=d||r<9||r>15||n<0||n>9||b<0||b>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(W[R].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=W[R].max_lazy,I=W[R].good_length,F=W[R].nice_length,U=W[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,d=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,b=s,f=255&l[0],f=(f<4||h<0)return-2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=N[4],-2;if(0===d.avail_out)return d.msg=N[7],-5;var C;if(e=d,z=r,r=h,42==n&&(I=8+(s-8<<4)<<8,F=(R-1&255)>>1,F>3&&(F=3),I|=F<<6,0!==m&&(I|=32),I+=31-I%31,n=113,Q((C=I)>>8&255),Q(255&C)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&h<=z&&4!=h)return e.msg=N[7],-5;if(666==n&&0!==e.avail_in)return d.msg=N[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(S=-1,W[R].func){case 0:S=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(k<=1){if(ct(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=b+r,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-b>=a-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:S=function(t){let n,i=0;for(;;){if(k<262){if(ct(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=rt(m-v,y-3),k-=y,y<=E&&k>=3){y--;do{m++,f=(f<=3&&(f=(f<4096)&&(y=2)),A>=3&&y<=A){i=m+k-3,n=rt(m-1-g,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),c.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}H.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new P,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 r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 q=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],K=[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],Y=[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],X=[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],G=[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],J=[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 Q(){let t,e,n,i,r,a;function s(t,e,s,o,l,d,c,u,f,_,h){let w,p,b,y,g,x,m,v,k,A,U,E,R,D,I;A=0,g=s;do{n[t[e+A]]++,A++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(v=u[0],x=1;x<=15&&0===n[x];x++);for(m=x,vg&&(v=g),u[0]=v,D=1<E+v;){if(y++,E+=v,I=b-E,I=I>v?v:I,(p=1<<(x=m-E))>w+1&&(p-=w+1,R=m,x1440)return-3;r[y]=U=_[0],_[0]+=I,0!==y?(a[y]=g,i[0]=x,i[1]=v,x=g>>>E-v,i[2]=U-r[y-1]-x,f.set(i,3*(r[y-1]+x))):c[0]=U}for(i[1]=m-E,A>=s?i[0]=192:h[A]>>E;x>>=1)g^=x;for(g^=x,k=(1<257?(-3==_?f.msg="oversubscribed distance tree":-5==_?(f.msg="incomplete distance tree",_=-3):-4!=_&&(f.msg="empty distance tree with lengths",_=-3),_):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,_=0,h=0;function w(t,e,n,i,r,a,s,o){let l,d,c,u,f,_,h,w,p,b,y,g,x,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,_=s.bitk,p=s.write,b=p>=d[k+1],_-=d[k+1],0!=(16&u)){for(u&=15,x=d[k+2]+(f&q[u]),f>>=u,_-=u;_<15;)w--,f|=(255&o.read_byte(h++))<<_,_+=8;for(l=f&g,d=r,c=a,k=3*(c+l),u=d[k];;){if(f>>=d[k+1],_-=d[k+1],0!=(16&u)){for(u&=15;_>=u,_-=u,b-=x,p>=m)v=p-m,p-v>0&&2>p-v?(s.window[p++]=s.window[v++],s.window[p++]=s.window[v++],x-=2):(s.window.set(s.window.subarray(v,v+2),p),p+=2,v+=2,x-=2);else{v=p-m;do{v+=s.end}while(v<0);if(u=s.end-v,x>u){if(x-=u,p-v>0&&u>p-v)do{s.window[p++]=s.window[v++]}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),p),p+=u,v+=u,u=0;v=0}}if(p-v>0&&x>p-v)do{s.window[p++]=s.window[v++]}while(0!=--x);else s.window.set(s.window.subarray(v,v+x),p),p+=x,v+=x,x=0;break}if(0!=(64&u))return o.msg="invalid distance code",x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,-3;l+=d[k+2],l+=f&q[u],k=3*(c+l),u=d[k]}break}if(0!=(64&u))return 0!=(32&u)?(x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,1):(o.msg="invalid literal/length code",x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,-3);if(l+=d[k+2],l+=f&q[u],k=3*(c+l),0===(u=d[k])){f>>=d[k+1],_-=d[k+1],s.window[p++]=d[k+2],b--;break}}else f>>=d[k+1],_-=d[k+1],s.window[p++]=d[k+2],b--}while(b>=258&&w>=10);return x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,0}t.init=function(t,a,s,o,l,d){e=0,u=t,f=a,i=s,_=o,r=l,h=d,n=null},t.proc=function(t,p,b){let y,g,x,m,v,k,A,U=0,E=0,R=0;for(R=p.next_in_index,m=p.avail_in,U=t.bitb,E=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,b=w(u,f,i,_,r,h,t,p),R=p.next_in_index,m=p.avail_in,U=t.bitb,E=t.bitk,v=t.write,k=v>>=n[g+1],E-=n[g+1],x=n[g],0===x){l=n[g+2],e=6;break}if(0!=(16&x)){d=15&x,a=n[g+2],e=2;break}if(0==(64&x)){o=x,s=g/3+n[g+2];break}if(0!=(32&x)){e=7;break}return e=9,p.msg="invalid literal/length code",b=-3,t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,t.inflate_flush(p,b);case 2:for(y=d;E>=y,E-=y,o=f,n=r,s=h,e=3;case 3:for(y=o;E>=n[g+1],E-=n[g+1],x=n[g],0!=(16&x)){d=15&x,c=n[g+2],e=4;break}if(0==(64&x)){o=x,s=g/3+n[g+2];break}return e=9,p.msg="invalid distance code",b=-3,t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,t.inflate_flush(p,b);case 4:for(y=d;E>=y,E-=y,e=5;case 5:for(A=v-c;A<0;)A+=t.end;for(;0!==a;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(E-=8,m++,R--),t.write=v,b=t.inflate_flush(p,b),v=t.write,k=vt.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(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,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(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,w,p,b,y,g,x,m;for(b=t.next_in_index,y=t.avail_in,w=n.bitb,p=n.bitk,g=n.write,x=g>>1){case 0:w>>>=3,p-=3,h=7&p,w>>>=h,p-=h,r=1;break;case 1:v=[],k=[],A=[[]],U=[[]],Q.inflate_trees_fixed(v,k,A,U),c.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);if(0===x&&(g==n.end&&0!==n.read&&(g=0,x=gy&&(h=y),h>x&&(h=x),n.window.set(t.read_buf(b,h),g),b+=h,y-=h,g+=h,x-=h,0!=(a-=h))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(b++))<>>=3,p-=3}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,h=_.inflate_trees_bits(i,l,d,f,t),0!=h)return-3==(e=h)&&(i=null,r=9),n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=l[0];p>>=h,p-=h,i[o++]=c;else{for(m=18==c?7:c-14,a=18==c?11:3;p>>=h,p-=h,a+=w&q[m],w>>>=m,p-=m,m=o,h=s,m+a>258+(31&h)+(h>>5&31)||16==c&&m<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);c=16==c?i[m-1]:0;do{i[m++]=c}while(0!=--a);o=m}}if(d[0]=-1,E=[],R=[],D=[],I=[],E[0]=9,R[0]=6,h=s,h=_.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,E,R,D,I,f,t),0!=h)return-3==h&&(i=null,r=9),e=h,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,n.inflate_flush(t,e);c.init(E[0],R[0],f,D[0],f,I[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=g,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),b=t.next_in_index,y=t.avail_in,w=n.bitb,p=n.bitk,g=n.write,x=g15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,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.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=j,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));B({workerScripts:{inflate:[e],deflate:[e]}})}})(),B({Deflate:function(t){const e=new y,n=512,i=new Uint8Array(n);let r=t?t.level:-1;void 0===r&&(r=-1),e.deflateInit(r),e.next_out=i,this.append=function(t,r){let a,s,o=0,l=0,d=0;const c=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,a=e.deflate(0),0!=a)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?c.push(new Uint8Array(i)):c.push(new Uint8Array(i.subarray(0,e.next_out_index)))),d+=e.next_out_index,r&&e.next_in_index>0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),c.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}},Inflate:function(){const t=new V,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,r){const a=[];let s,o,l=0,d=0,c=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===m){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?a.push(new Uint8Array(e)):a.push(new Uint8Array(e.subarray(0,t.next_out_index)))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=et,t.BlobWriter=nt,t.Data64URIReader=class extends ${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_BAD_FORMAT=Ue,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Ie,t.ERR_DUPLICATED_NAME=Ze,t.ERR_ENCRYPTED=Se,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=De,t.ERR_EOCDR_NOT_FOUND=Ee,t.ERR_EOCDR_ZIP64_NOT_FOUND=Re,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=ze,t.ERR_HTTP_RANGE=q,t.ERR_INVALID_COMMENT=Ye,t.ERR_INVALID_DATE=Qe,t.ERR_INVALID_ENCRYPTION_STRENGTH=$e,t.ERR_INVALID_ENTRY_COMMENT=Xe,t.ERR_INVALID_ENTRY_NAME=Ge,t.ERR_INVALID_EXTRAFIELD_DATA=en,t.ERR_INVALID_EXTRAFIELD_TYPE=tn,t.ERR_INVALID_PASSWORD=Rt,t.ERR_INVALID_SIGNATURE=de,t.ERR_INVALID_VERSION=Je,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Fe,t.ERR_UNSUPPORTED_COMPRESSION=Te,t.ERR_UNSUPPORTED_ENCRYPTION=Ce,t.HttpRangeReader=class extends dt{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=dt,t.Reader=$,t.TextReader=class extends ${constructor(t){super(),this.blobReader=new et(new Blob([t],{type:K}))}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 tt{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:K})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:K})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends ${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 tt{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=tt,t.ZipReader=class{constructor(t,e={}){this.reader=t,this.options=e,this.config=N()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Ue);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,pt,22,1048560);if(!n)throw new Error(Ee);const i=new DataView(n.buffer);let r=qe(i,12),a=qe(i,16),s=je(i,8),o=0;if(a==ut||r==ut||s==ft){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(qe(i,0)!=yt)throw new Error(Re);a=Ke(i,8);let l=await e.readUint8Array(a,56),d=new DataView(l.buffer);const c=n.offset-20-56;if(qe(d,0)!=bt&&a!=c){const t=a;a=c,o=a-t,l=await e.readUint8Array(a,56),d=new DataView(l.buffer)}if(qe(d,0)!=bt)throw new Error(De);s=Ke(d,24),r=Ke(i,4),a-=Ke(d,40)}if(a<0||a>=e.size)throw new Error(Ue);let l=0,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer);const u=n.offset-r;if(qe(c,l)!=wt&&a!=u){const t=a;a=u,o=a-t,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer)}if(a<0||a>=e.size)throw new Error(Ue);const f=[];for(let e=0;ee.getData(t,n),f.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return f}async close(){}},t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=N(),this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(mt)?t+=mt:n.directory=t.endsWith(mt),this.files.has(t))throw new Error(Ze);const i=(new TextEncoder).encode(t);if(i.length>ft)throw new Error(Ge);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>ft)throw new Error(Xe);const s=this.options.version||n.version||0;if(s>ft)throw new Error(Je);const o=n.lastModDate||new Date;if(ovt)throw new Error(Qe);const l=rn(this,n,"password"),d=rn(this,n,"encryptionStrength")||3,c=rn(this,n,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error($e);e&&!e.initialized&&await e.init();let u=new Uint8Array(0);const f=n.extraField;if(f){let t=0,e=0;f.forEach((e=>t+=4+e.length)),u=new Uint8Array(t),f.forEach(((t,n)=>{if(n>ft)throw new Error(tn);if(t.length>ft)throw new Error(en);u.set(new Uint16Array([n]),e),u.set(new Uint16Array([t.length]),e+2),u.set(t,e+4),e+=4+t.length}))}const _=e?1.05*e.size:0,h=n.zip64||this.options.zip64||this.offset>=ut||_>=ut||this.offset+_>=ut,w=rn(this,n,"level"),p=rn(this,n,"useWebWorkers"),b=rn(this,n,"bufferedWrite"),y=rn(this,n,"keepOrder"),g=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,l;r.set(e,null);try{let d,c;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>l=t))),i.bufferedWrite||t.lockWrite?(d=new nt,await d.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),d=a),c=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),l=i.level,d=0!==l&&!i.directory,c=i.zip64;let u,f;if(o&&!i.zipCrypto){u=new Uint8Array(nn.length+2);const t=new DataView(u.buffer);sn(t,0,gt),u.set(nn,2),f=i.encryptionStrength,an(t,8,f)}else u=new Uint8Array(0);const _={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let h=2056,w=0;d&&(w=8);c&&(_.version=_.version>45?_.version:45);o&&(h|=1,i.zipCrypto||(_.version=_.version>51?_.version:51,w=99,d&&(_.rawExtraFieldAES[9]=8)));const p=_.headerArray=new Uint8Array(26),b=new DataView(p.buffer);sn(b,0,_.version),sn(b,2,h),sn(b,4,w);const y=new Uint32Array(1),g=new DataView(y.buffer);sn(g,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),sn(g,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=y[0];on(b,6,x),sn(b,22,r.length),sn(b,24,0);const m=new Uint8Array(30+r.length);let v;on(new DataView(m.buffer),0,_t),m.set(p,4),m.set(r,30);let k=0,A=0;if(t){k=t.size;const r=await ge(n.Deflate,{codecType:oe,level:l,password:s,encryptionStrength:f,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:d,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),v=await me(r,t,e,0,k,n,{onprogress:i.onprogress}),A=v.length}else await e.writeUint8Array(m);const U=new Uint8Array(c?24:16),E=new DataView(U.buffer);if(on(E,0,ht),t)if(o&&!i.zipCrypto||void 0===v.signature||(on(b,10,v.signature),on(E,4,v.signature),_.signature=v.signature),c){const t=new DataView(_.rawExtraFieldZip64.buffer);sn(t,0,1),sn(t,2,24),on(b,14,ut),ln(E,8,BigInt(A)),ln(t,12,BigInt(A)),on(b,18,ut),ln(E,16,BigInt(k)),ln(t,4,BigInt(k))}else on(b,14,A),on(E,8,A),on(b,18,k),on(E,12,k);await e.writeUint8Array(U);const R=m.length+(v?v.length:0)+U.length;return Object.assign(_,{compressedSize:A,uncompressedSize:k,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),_}(n,d,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,c),d!=a){const e=d.getData(),n=new FileReader,i=await new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)}));await Promise.all([t.lockWrite,o]),await a.writeUint8Array(new Uint8Array(i))}if(c.offset=t.offset,c.zip64){ln(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return t.offset+=c.length,c}finally{l&&l(),s&&(t.lockWrite=null,s())}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:u,zip64:h,password:l,level:w,useWebWorkers:p,encryptionStrength:d,zipCrypto:c,bufferedWrite:b,keepOrder:y}));return Object.assign(g,{name:t,comment:r,extraField:f}),new Ae(g)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=ut||r>=ut||s>=ft,l=new Uint8Array(r+(o?98:22)),d=new DataView(l.buffer);if(t.length){if(!(t.length<=ft))throw new Error(Ye);sn(d,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;on(d,i,wt),sn(d,i+4,t.version),l.set(t.headerArray,i+6),sn(d,i+30,a),sn(d,i+32,t.rawComment.length),t.directory&&an(d,i+38,16),t.zip64?on(d,i+42,ut):on(d,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(on(d,i,bt),ln(d,i+4,BigInt(44)),sn(d,i+12,45),sn(d,i+14,45),ln(d,i+24,BigInt(s)),ln(d,i+32,BigInt(s)),ln(d,i+40,BigInt(r)),ln(d,i+48,BigInt(a)),on(d,i+56,yt),ln(d,i+64,BigInt(a)+BigInt(r)),on(d,i+72,1),s=ft,a=ut,r=ut,i+=76),on(d,i,pt),sn(d,i+8,s),sn(d,i+10,s),on(d,i+12,r),on(d,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=B,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={})=>({Deflate:H(t.Deflate,e.deflate),Inflate:H(t.Inflate,e.inflate)}),Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/zip-no-worker-deflate.min.js b/dist/zip-no-worker-deflate.min.js index 9f9ca418..0ea073d8 100644 --- a/dist/zip-no-worker-deflate.min.js +++ b/dist/zip-no-worker-deflate.min.js @@ -1 +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=256,n=256,r=-2,i=-5;function s(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const a=[0,1,2,3].concat(...s([[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 o(){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 r=t.dyn_tree,i=t.stat_desc.static_tree,s=t.stat_desc.elems;let a,o,c,l=-1;for(n.heap_len=0,n.heap_max=573,a=0;a=1;a--)n.pqdownheap(r,a);c=s;do{a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,r[2*c]=r[2*a]+r[2*o],n.depth[c]=Math.max(n.depth[a],n.depth[o])+1,r[2*a+1]=r[2*o+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,a=t.stat_desc.max_length;let o,c,l,h,d,u,f=0;for(h=0;h<=15;h++)e.bl_count[h]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)c=e.heap[o],h=n[2*n[2*c+1]+1]+1,h>a&&(h=a,f++),n[2*c+1]=h,c>t.max_code||(e.bl_count[h]++,d=0,c>=s&&(d=i[c-s]),u=n[2*c],e.opt_len+=u*(h+d),r&&(e.static_len+=u*(r[2*c+1]+d)));if(0!==f){do{for(h=a-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[a]--,f-=2}while(f>0);for(h=a;0!==h;h--)for(c=e.bl_count[h];0!==c;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=h&&(e.opt_len+=(h-n[2*l+1])*n[2*l],n[2*l+1]=h),c--)}}(n),function(t,n,r){const i=[];let s,a,o,c=0;for(s=1;s<=15;s++)i[s]=c=c+r[s-1]<<1;for(a=0;a<=n;a++)o=t[2*a+1],0!==o&&(t[2*a]=e(i[o]++,o))}(r,t.max_code,n.bl_count)}}function c(t,e,n,r,i){const s=this;s.static_tree=t,s.extra_bits=e,s.extra_base=n,s.elems=r,s.max_length=i}o._length_code=[0,1,2,3,4,5,6,7].concat(...s([[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]])),o.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],o.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],o.d_code=function(t){return t<256?a[t]:a[256+(t>>>7)]},o.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],o.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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c.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],c.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],c.static_l_desc=new c(c.static_ltree,o.extra_lbits,257,286,15),c.static_d_desc=new c(c.static_dtree,o.extra_dbits,0,30,15),c.static_bl_desc=new c(null,o.extra_blbits,0,19,7);function l(t,e,n,r,i){const s=this;s.good_length=t,s.max_lazy=e,s.nice_length=n,s.max_chain=r,s.func=i}const h=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],d=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],u=113,f=666,p=258,w=262;function y(t,e,n,r){const i=t[2*e],s=t[2*n];return i>>8&255)}function ct(t,e){let n;const r=e;rt>16-r?(n=t,nt|=n<>>16-rt,rt+=r-16):(nt|=t<=8&&(at(255&nt),nt>>>=8,rt-=8)}function ut(n,r){let i,s,a;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[G+Q]=255&r,Q++,0===n?N[2*r]++:(tt++,n--,N[2*(o._length_code[r]+e+1)]++,L[2*o.d_code(n)]++),0==(8191&Q)&&O>2){for(i=8*Q,s=W-S,a=0;a<30;a++)i+=L[2*a]*(5+o.extra_dbits[a]);if(i>>>=3,tt8?ot(nt):rt>0&&at(255&nt),nt=0,rt=0}function wt(e,n,r){ct(0+(r?1:0),3),function(e,n,r){pt(),et=8,r&&(ot(n),ot(~n)),t.pending_buf.set(x.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function yt(e,n,r){let i,s,a=0;O>0?(Z.build_tree(t),X.build_tree(t),a=function(){let e;for(st(N,Z.max_code),st(L,X.max_code),Y.build_tree(t),e=18;e>=3&&0===K[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),i=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!=e?wt(e,n,r):s==i?(ct(2+(r?1:0),3),ft(c.static_ltree,c.static_dtree)):(ct(4+(r?1:0),3),function(t,e,n){let r;for(ct(t-257,5),ct(e-1,5),ct(n-4,4),r=0;r=0?S:-1,W-S,t),S=W,s.flush_pending()}function _t(){let t,e,n,r;do{if(r=A-M-W,0===r&&0===W&&0===M)r=_;else if(-1==r)r--;else if(W>=_+_-w){x.set(x.subarray(_,_+_),0),C-=_,W-=_,S-=_,t=E,n=t;do{e=65535&k[--n],k[n]=e>=_?e-_:0}while(0!=--t);t=_,n=t;do{e=65535&U[--n],U[n]=e>=_?e-_:0}while(0!=--t);r+=_}if(0===s.avail_in)return;t=s.read_buf(x,W+M,r),M+=t,M>=3&&(v=255&x[W],v=(v<_-w?W-(_-w):0;let o=q;const c=m,l=W+p;let h=x[i+s-1],d=x[i+s];H>=P&&(r>>=2),o>M&&(o=M);do{if(e=t,x[e+s]==d&&x[e+s-1]==h&&x[e]==x[i]&&x[++e]==x[i+1]){i+=2,e++;do{}while(x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&is){if(C=t,s=n,n>=o)break;h=x[i+s-1],d=x[i+s]}}}while((t=65535&U[t&c])>a&&0!=--r);return s<=M?s:M}function mt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,a=u,g=0,Z.dyn_tree=N,Z.stat_desc=c.static_l_desc,X.dyn_tree=L,X.stat_desc=c.static_d_desc,Y.dyn_tree=K,Y.stat_desc=c.static_bl_desc,nt=0,rt=0,et=8,it(),function(){A=2*_,k[E-1]=0;for(let t=0;t9||8!=s||i<9||i>15||n<0||n>9||o<0||o>2?r:(e.dstate=t,b=i,_=1<9||n<0||n>2?r:(h[O].func!=h[e].func&&0!==t.total_in&&(i=t.deflate(1)),O!=e&&(O=e,V=h[O].max_lazy,P=h[O].good_length,q=h[O].nice_length,B=h[O].max_chain),j=n,i)},t.deflateSetDictionary=function(t,e,n){let i,s=n,o=0;if(!e||42!=a)return r;if(s<3)return 0;for(s>_-w&&(s=_-w,o=n-s),x.set(e.subarray(o,o+s),0),W=s,S=s,v=255&x[0],v=(v<4||o<0)return r;if(!e.next_out||!e.next_in&&0!==e.avail_in||a==f&&4!=o)return e.msg=d[4],r;if(0===e.avail_out)return e.msg=d[7],i;var P;if(s=e,R=g,g=o,42==a&&(y=8+(b-8<<4)<<8,A=(O-1&255)>>1,A>3&&(A=3),y|=A<<6,0!==W&&(y|=32),y+=31-y%31,a=u,at((P=y)>>8&255),at(255&P)),0!==t.pending){if(s.flush_pending(),0===s.avail_out)return g=-1,0}else if(0===s.avail_in&&o<=R&&4!=o)return s.msg=d[7],i;if(a==f&&0!==s.avail_in)return e.msg=d[7],i;if(0!==s.avail_in||0!==M||0!=o&&a!=f){switch(B=-1,h[O].func){case 0:B=function(t){let e,n=65535;for(n>l-5&&(n=l-5);;){if(M<=1){if(_t(),0===M&&0==t)return 0;if(0===M)break}if(W+=M,M=0,e=S+n,(0===W||W>=e)&&(M=W-e,W=e,gt(!1),0===s.avail_out))return 0;if(W-S>=_-w&&(gt(!1),0===s.avail_out))return 0}return gt(4==t),0===s.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:B=function(t){let e,n=0;for(;;){if(M=3&&(v=(v<=3)if(e=ut(W-C,D-3),M-=D,D<=V&&M>=3){D--;do{W++,v=(v<=3&&(v=(v<4096)&&(D=2)),H>=3&&D<=H){n=W+M-3,e=ut(W-1-F,H-3),M-=H-1,H-=2;do{++W<=n&&(v=(v<n&&(i=n),0===i?0:(r.avail_in-=i,t.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),e),r.next_in_index+=i,r.total_in+=i,i)},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 b={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},m=Object.assign({},b);function x(t){if(void 0!==t.chunkSize&&(m.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(m.maxWorkers=t.maxWorkers),void 0!==t.useWebWorkers&&(m.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(m.Deflate=t.Deflate),void 0!==t.Inflate&&(m.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");m.workerScripts||(m.workerScripts={}),m.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!Array.isArray(t.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.inflate=t.workerScripts.inflate}}}const A=4294967295,U=65535,k=67324752,v=134695760,E=new Date(2107,11,31),R=new Date(1980,0,1),z=[];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;z[t]=e}class I{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,r=0|t.length;n>>8^z[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const S="Invalid pasword",D=16,F="raw",T={name:"PBKDF2"},W={name:"HMAC"},C="SHA-1",M={name:"AES-CTR"},H=Object.assign({hash:W},T),B=Object.assign({iterations:1e3,hash:{name:C}},T),V=Object.assign({hash:C},W),O=Object.assign({length:D},M),j=["deriveBits"],P=["sign"],q=[8,12,16],N=[16,24,32],L=10,K=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Z=crypto.subtle;class X{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(i=0)=>{if(i+D<=r.length-L){const t=r.subarray(i,i+D),s=await Z.decrypt(Object.assign({counter:this.counter},O),this.keys.key,t);return J(this.counter),n.set(new Uint8Array(s),i),e(i+D)}return this.pendingInput=r.subarray(i),this.signed&&(this.input=Q(this.input,t)),n};if(this.password){const e=t.subarray(0,q[this.strength]+2);await async function(t,e,n){await G(t,n,e.subarray(0,q[t.strength]),["decrypt"]);const r=e.subarray(q[t.strength]),i=t.keys.passwordVerification;if(i[0]!=r[0]||i[1]!=r[1])throw new Error(S)}(this,e,this.password),this.password=null,t=t.subarray(q[this.strength]+2)}let n=new Uint8Array(t.length-L-(t.length-L)%D),r=t;return this.pendingInput.length&&(r=Q(this.pendingInput,t),n=$(n,r.length-L-(r.length-L)%D)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-L),r=t.subarray(t.length-L);let i=new Uint8Array(0);if(n.length){const t=await Z.decrypt(Object.assign({counter:this.counter},O),e.key,n);i=new Uint8Array(t)}let s=!0;if(this.signed){const t=await Z.sign(W,e.authentication,this.input.subarray(0,this.input.length-L)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(i+D<=t.length){const s=t.subarray(i,i+D),a=await Z.encrypt(Object.assign({counter:this.counter},O),this.keys.key,s);return J(this.counter),r.set(new Uint8Array(a),i+n.length),e(i+D)}return this.pendingInput=t.subarray(i),this.output=Q(this.output,r),r};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(q[t.strength]));return await G(t,e,n,["encrypt"]),Q(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let r=new Uint8Array(n.length+t.length-t.length%D);return r.set(n,0),this.pendingInput.length&&(t=Q(this.pendingInput,t),r=$(r,t.length-t.length%D)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await Z.encrypt(Object.assign({counter:this.counter},O),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=Q(this.output,t)}const e=await Z.sign(W,this.keys.authentication,this.output.subarray(q[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,L);return{data:Q(t,n),signature:n}}}async function G(t,e,n,r){t.counter=new Uint8Array(K);const i=(new TextEncoder).encode(e),s=await Z.importKey(F,i,H,!1,j),a=await Z.deriveBits(Object.assign({salt:n},B),s,8*(2*N[t.strength]+2)),o=new Uint8Array(a);t.keys={key:await Z.importKey(F,o.subarray(0,N[t.strength]),M,!0,r),authentication:await Z.importKey(F,o.subarray(N[t.strength],2*N[t.strength]),V,!1,P),passwordVerification:o.subarray(2*N[t.strength])}}function J(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function Q(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 $(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const tt=12;class et{constructor(t,e){this.password=t,this.passwordVerification=e,st(this,t)}async append(t){if(this.password){const e=rt(this,t.subarray(0,tt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(S);t=t.subarray(tt)}return rt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class nt{constructor(t,e){this.passwordVerification=e,this.password=t,st(this,t)}async append(t){let e,n;if(this.password){this.password=null;const r=crypto.getRandomValues(new Uint8Array(tt));r[11]=this.passwordVerification,e=new Uint8Array(t.length+r.length),e.set(it(this,r),0),n=tt}else e=new Uint8Array(t.length),n=0;return e.set(it(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function rt(t,e){const n=new Uint8Array(e.length);for(let r=0;r>>24]),t.keys[2]=~t.crcKey2.get()}function ot(t){const e=2|t.keys[2];return ct(Math.imul(e,1^e)>>>8)}function ct(t){return 255&t}function lt(t){return 4294967295&t}const ht="deflate",dt="Invalid signature";class ut{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new I,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new et(e.password,e.passwordVerification):new X(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(dt);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(dt)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class ft{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new I,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new nt(e.password,e.passwordVerification):new Y(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const r=new Uint8Array(e.length+n.data.length);r.set(e,0),r.set(n.data,e.length),e=r}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const pt="init",wt="append",yt="flush",gt="message";var _t=(t,e,n,r,i,s)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=s,t.webWorker=i,t.onTaskFinished=()=>{t.busy=!1;r(t)&&t.worker&&t.worker.terminate()},i?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-deflate.min.js",document.baseURI).href)),t.worker.addEventListener(gt,i,!1),t.interface={append:t=>n({type:wt,data:t}),flush:()=>n({type:yt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await r({scripts:n,type:pt,options:e})}return r(n)}function r(n){const r=t.worker,i=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,r.postMessage(n,[n.data])}catch(t){r.postMessage(n)}else r.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return i}function i(n){const r=n.data;if(e){const n=r.error,i=r.type;if(n){const r=new Error(n.message);r.stack=n.stack,e.reject(r),e=null,t.onTaskFinished()}else if(i==pt||i==yt||i==wt){const n=r.data;i==yt?(e.resolve({data:new Uint8Array(n),signature:r.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(ht)?new ft(t,e):e.codecType.startsWith("inflate")?new ut(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let bt=[],mt=[];function xt(t){const e=!mt.length;if(e)bt=bt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:r,webWorker:i,scripts:s}]=mt.splice(0,1);e(_t(t,n,r,xt,i,s))}return e}const At="HTTP error ",Ut="HTTP Range not supported",kt="text/plain",vt="Content-Length",Et="Accept-Ranges",Rt="HEAD",zt="GET",It="bytes";class St{constructor(){this.size=0}init(){this.initialized=!0}}class Dt extends St{}class Ft extends St{writeUint8Array(t){this.size+=t.length}}class Tt extends Dt{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((r,i)=>{n.onload=t=>r(new Uint8Array(t.target.result)),n.onerror=i,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class Wt extends Dt{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(),Pt(this.url)&&!this.preventHeadRequest){const t=await Mt(Rt,this.url,this.options);if(this.size=Number(t.headers.get(vt)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(Et)!=It)throw new Error(Ut);void 0===this.size&&await Ct(this,this.options)}else await Ct(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await Mt(zt,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(Ut);return new Uint8Array(await n.arrayBuffer())}return this.data||await Ct(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function Ct(t,e){const n=await Mt(zt,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function Mt(t,e,n,r){r=Object.assign({},n.headers,r);const i=await fetch(e,Object.assign({},n,{method:t,headers:r}));if(i.status<400)return i;throw new Error(At+(i.statusText||i.status))}class Ht extends Dt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),Pt(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>Vt(Rt,this.url,(n=>{this.size=Number(n.getResponseHeader(vt)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(Et)==It?t():e(new Error(Ut)):void 0===this.size?Bt(this,this.url).then((()=>t())).catch(e):t()}),e)));await Bt(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await Bt(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,r)=>Vt(zt,this.url,(t=>n(new Uint8Array(t.response))),r,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(Ut)}}function Bt(t,e){return new Promise(((n,r)=>Vt(zt,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),r)))}function Vt(t,e,n,r,i=[]){const s=new XMLHttpRequest;return s.addEventListener("load",(()=>{s.status<400?n(s):r(At+(s.statusText||s.status))}),!1),s.addEventListener("error",r,!1),s.open(t,e),i.forEach((t=>s.setRequestHeader(t[0],t[1]))),s.responseType="arraybuffer",s.send(),s}class Ot extends Dt{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new Ht(t,e):this.reader=new Wt(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)}}class jt extends Ft{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}}function Pt(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)}async function qt(t,e){return e.length&&await t.writeUint8Array(e),e.length}const Nt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Lt{constructor(t){Nt.forEach((e=>this[e]=t[e]))}}const Kt="File already exists",Zt="Zip file comment exceeds 64KB",Xt="File entry comment exceeds 64KB",Yt="File entry name exceeds 64KB",Gt="Version exceeds 65535",Jt="The modification date must be between 1/1/1980 and 12/31/2107",Qt="The strength must equal 1, 2, or 3",$t="Extra field type exceeds 65535",te="Extra field data exceeds 64KB",ee=new Uint8Array([7,0,2,0,65,69,3,0,0]);function ne(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function re(t,e,n){t.setUint8(e,n)}function ie(t,e,n){t.setUint16(e,n,!0)}function se(t,e,n){t.setUint32(e,n,!0)}function ae(t,e,n){t.setBigUint64(e,n,!0)}x({Deflate:function(t){const e=new _,n=512,r=new Uint8Array(n);let i=t?t.level:-1;void 0===i&&(i=-1),e.deflateInit(i),e.next_out=r,this.append=function(t,i){let s,a,o=0,c=0,l=0;const h=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,s=e.deflate(0),0!=s)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?h.push(new Uint8Array(r)):h.push(new Uint8Array(r.subarray(0,e.next_out_index)))),l+=e.next_out_index,i&&e.next_in_index>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 a=new Uint8Array(l),h.forEach((function(t){a.set(t,c),c+=t.length})),a}},this.flush=function(){let t,i,s=0,a=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(new Uint8Array(r.subarray(0,e.next_out_index))),a+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),i=new Uint8Array(a),o.forEach((function(t){i.set(t,s),s+=t.length})),i}}}),t.BlobReader=Tt,t.BlobWriter=class extends Ft{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}},t.Data64URIReader=class extends Dt{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),r=4*Math.floor(t/3),i=atob(this.dataURI.substring(r+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),s=t-3*Math.floor(r/4);for(let t=s;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_DUPLICATED_NAME=Kt,t.ERR_HTTP_RANGE=Ut,t.ERR_INVALID_COMMENT=Zt,t.ERR_INVALID_DATE=Jt,t.ERR_INVALID_ENCRYPTION_STRENGTH=Qt,t.ERR_INVALID_ENTRY_COMMENT=Xt,t.ERR_INVALID_ENTRY_NAME=Yt,t.ERR_INVALID_EXTRAFIELD_DATA=te,t.ERR_INVALID_EXTRAFIELD_TYPE=$t,t.ERR_INVALID_VERSION=Gt,t.HttpRangeReader=class extends Ot{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=Ot,t.Reader=Dt,t.TextReader=class extends Dt{constructor(t){super(),this.blobReader=new Tt(new Blob([t],{type:kt}))}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 Ft{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:kt})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:kt})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends Dt{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=jt,t.Writer=Ft,t.ZipWriter=class extends class{constructor(t,e={},n={}){this.writer=t,this.options=e,this.config=n,this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith("/")?t+="/":n.directory=t.endsWith("/"),this.files.has(t))throw new Error(Kt);const r=(new TextEncoder).encode(t);if(r.length>U)throw new Error(Yt);const i=n.comment||"",s=(new TextEncoder).encode(i);if(s.length>U)throw new Error(Xt);const a=this.options.version||n.version||0;if(a>U)throw new Error(Gt);const o=n.lastModDate||new Date;if(oE)throw new Error(Jt);const c=ne(this,n,"password"),l=ne(this,n,"encryptionStrength")||3,h=ne(this,n,"zipCrypto");if(void 0!==c&&void 0!==l&&(l<1||l>3))throw new Error(Qt);e&&!e.initialized&&await e.init();let d=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),d=new Uint8Array(t),u.forEach(((t,n)=>{if(n>U)throw new Error($t);if(t.length>U)throw new Error(te);d.set(new Uint16Array([n]),e),d.set(new Uint16Array([t.length]),e+2),d.set(t,e+4),e+=4+t.length}))}const f=e?1.05*e.size:0,p=n.zip64||this.options.zip64||this.offset>=A||f>=A||this.offset+f>=A,w=ne(this,n,"level"),y=ne(this,n,"useWebWorkers"),g=ne(this,n,"bufferedWrite"),_=ne(this,n,"keepOrder"),b=await async function(t,e,n,r){const i=t.files,s=t.writer;let a,o,c;i.set(e,null);try{let l,h;try{r.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>c=t))),r.bufferedWrite||t.lockWrite?(l=new jt,await l.init()):(t.lockWrite=new Promise((t=>a=t)),s.initialized||await s.init(),l=s),h=await async function(t,e,n,r){const i=r.rawFilename,s=r.lastModDate,a=r.password,o=Boolean(a&&a.length),c=r.level,l=0!==c&&!r.directory,h=r.zip64;let d,u;if(o&&!r.zipCrypto){d=new Uint8Array(ee.length+2);const t=new DataView(d.buffer);ie(t,0,39169),d.set(ee,2),u=r.encryptionStrength,re(t,8,u)}else d=new Uint8Array(0);const f={version:r.version||20,zip64:h,directory:Boolean(r.directory),filenameUTF8:!0,rawFilename:i,commentUTF8:!0,rawComment:r.rawComment,rawExtraFieldZip64:h?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:d,rawExtraField:r.rawExtraField};let p=2056,w=0;l&&(w=8);h&&(f.version=f.version>45?f.version:45);o&&(p|=1,r.zipCrypto||(f.version=f.version>51?f.version:51,w=99,l&&(f.rawExtraFieldAES[9]=8)));const y=f.headerArray=new Uint8Array(26),g=new DataView(y.buffer);ie(g,0,f.version),ie(g,2,p),ie(g,4,w);const _=new Uint32Array(1),b=new DataView(_.buffer);ie(b,0,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2),ie(b,2,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate());const m=_[0];se(g,6,m),ie(g,22,i.length),ie(g,24,0);const x=new Uint8Array(30+i.length);let U;se(new DataView(x.buffer),0,k),x.set(y,4),x.set(i,30);let E=0,R=0;if(t){E=t.size;const i=await function(t,e,n){const r=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),i=r&&n.workerScripts?n.workerScripts[e.codecType]:[];if(bt.length!t.busy));return n?_t(n,t,e,xt,r,i):new Promise((n=>mt.push({resolve:n,codecConstructor:t,options:e,webWorker:r,scripts:i})))}}(n.Deflate,{codecType:ht,level:c,password:a,encryptionStrength:u,zipCrypto:o&&r.zipCrypto,passwordVerification:o&&r.zipCrypto&&m>>8&255,signed:!0,compressed:l,encrypted:o,useWebWorkers:r.useWebWorkers},n);await e.writeUint8Array(x),U=await async function(t,e,n,r,i,s,a){const o=Math.max(s.chunkSize,64);return async function s(c=0,l=0){if(c=A||i>=A||a>=U,c=new Uint8Array(i+(o?98:22)),l=new DataView(c.buffer);if(t.length){if(!(t.length<=U))throw new Error(Zt);ie(l,r+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,i=t.rawExtraFieldAES,s=n.length+i.length+t.rawExtraField.length;se(l,r,33639248),ie(l,r+4,t.version),c.set(t.headerArray,r+6),ie(l,r+30,s),ie(l,r+32,t.rawComment.length),t.directory&&re(l,r+38,16),t.zip64?se(l,r+42,A):se(l,r+42,t.offset),c.set(e,r+46),c.set(n,r+46+e.length),c.set(i,r+46+e.length+n.length),c.set(t.rawExtraField,46+e.length+n.length+i.length),c.set(t.rawComment,r+46+e.length+s),r+=46+e.length+s+t.rawComment.length}return o&&(se(l,r,101075792),ae(l,r+4,BigInt(44)),ie(l,r+12,45),ie(l,r+14,45),ae(l,r+24,BigInt(a)),ae(l,r+32,BigInt(a)),ae(l,r+40,BigInt(i)),ae(l,r+48,BigInt(s)),se(l,r+56,117853008),ae(l,r+64,BigInt(s)+BigInt(i)),se(l,r+72,1),a=U,s=A,i=A,r+=76),se(l,r,101010256),ie(l,r+8,a),ie(l,r+10,a),se(l,r+12,i),se(l,r+16,s),await e.writeUint8Array(c),t.length&&await e.writeUint8Array(t),e.getData()}}{constructor(t,e){super(t,e,m)}},t.configure=x,t.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(t,"__esModule",{value:!0})})); +!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=256,n=256,r=-2,i=-5;function s(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const a=[0,1,2,3].concat(...s([[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 o(){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 r=t.dyn_tree,i=t.stat_desc.static_tree,s=t.stat_desc.elems;let a,o,c,l=-1;for(n.heap_len=0,n.heap_max=573,a=0;a=1;a--)n.pqdownheap(r,a);c=s;do{a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,r[2*c]=r[2*a]+r[2*o],n.depth[c]=Math.max(n.depth[a],n.depth[o])+1,r[2*a+1]=r[2*o+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,a=t.stat_desc.max_length;let o,c,l,h,d,u,f=0;for(h=0;h<=15;h++)e.bl_count[h]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)c=e.heap[o],h=n[2*n[2*c+1]+1]+1,h>a&&(h=a,f++),n[2*c+1]=h,c>t.max_code||(e.bl_count[h]++,d=0,c>=s&&(d=i[c-s]),u=n[2*c],e.opt_len+=u*(h+d),r&&(e.static_len+=u*(r[2*c+1]+d)));if(0!==f){do{for(h=a-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[a]--,f-=2}while(f>0);for(h=a;0!==h;h--)for(c=e.bl_count[h];0!==c;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=h&&(e.opt_len+=(h-n[2*l+1])*n[2*l],n[2*l+1]=h),c--)}}(n),function(t,n,r){const i=[];let s,a,o,c=0;for(s=1;s<=15;s++)i[s]=c=c+r[s-1]<<1;for(a=0;a<=n;a++)o=t[2*a+1],0!==o&&(t[2*a]=e(i[o]++,o))}(r,t.max_code,n.bl_count)}}function c(t,e,n,r,i){const s=this;s.static_tree=t,s.extra_bits=e,s.extra_base=n,s.elems=r,s.max_length=i}o._length_code=[0,1,2,3,4,5,6,7].concat(...s([[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]])),o.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],o.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],o.d_code=function(t){return t<256?a[t]:a[256+(t>>>7)]},o.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],o.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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c.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],c.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],c.static_l_desc=new c(c.static_ltree,o.extra_lbits,257,286,15),c.static_d_desc=new c(c.static_dtree,o.extra_dbits,0,30,15),c.static_bl_desc=new c(null,o.extra_blbits,0,19,7);function l(t,e,n,r,i){const s=this;s.good_length=t,s.max_lazy=e,s.nice_length=n,s.max_chain=r,s.func=i}const h=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],d=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],u=113,f=666,p=258,w=262;function y(t,e,n,r){const i=t[2*e],s=t[2*n];return i>>8&255)}function ct(t,e){let n;const r=e;rt>16-r?(n=t,nt|=n<>>16-rt,rt+=r-16):(nt|=t<=8&&(at(255&nt),nt>>>=8,rt-=8)}function ut(n,r){let i,s,a;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[G+Q]=255&r,Q++,0===n?N[2*r]++:(tt++,n--,N[2*(o._length_code[r]+e+1)]++,L[2*o.d_code(n)]++),0==(8191&Q)&&O>2){for(i=8*Q,s=W-S,a=0;a<30;a++)i+=L[2*a]*(5+o.extra_dbits[a]);if(i>>>=3,tt8?ot(nt):rt>0&&at(255&nt),nt=0,rt=0}function wt(e,n,r){ct(0+(r?1:0),3),function(e,n,r){pt(),et=8,r&&(ot(n),ot(~n)),t.pending_buf.set(x.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function yt(e,n,r){let i,s,a=0;O>0?(Z.build_tree(t),X.build_tree(t),a=function(){let e;for(st(N,Z.max_code),st(L,X.max_code),Y.build_tree(t),e=18;e>=3&&0===K[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),i=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!=e?wt(e,n,r):s==i?(ct(2+(r?1:0),3),ft(c.static_ltree,c.static_dtree)):(ct(4+(r?1:0),3),function(t,e,n){let r;for(ct(t-257,5),ct(e-1,5),ct(n-4,4),r=0;r=0?S:-1,W-S,t),S=W,s.flush_pending()}function _t(){let t,e,n,r;do{if(r=A-M-W,0===r&&0===W&&0===M)r=_;else if(-1==r)r--;else if(W>=_+_-w){x.set(x.subarray(_,_+_),0),C-=_,W-=_,S-=_,t=E,n=t;do{e=65535&k[--n],k[n]=e>=_?e-_:0}while(0!=--t);t=_,n=t;do{e=65535&U[--n],U[n]=e>=_?e-_:0}while(0!=--t);r+=_}if(0===s.avail_in)return;t=s.read_buf(x,W+M,r),M+=t,M>=3&&(v=255&x[W],v=(v<_-w?W-(_-w):0;let o=q;const c=m,l=W+p;let h=x[i+s-1],d=x[i+s];B>=j&&(r>>=2),o>M&&(o=M);do{if(e=t,x[e+s]==d&&x[e+s-1]==h&&x[e]==x[i]&&x[++e]==x[i+1]){i+=2,e++;do{}while(x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&is){if(C=t,s=n,n>=o)break;h=x[i+s-1],d=x[i+s]}}}while((t=65535&U[t&c])>a&&0!=--r);return s<=M?s:M}function mt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,a=u,g=0,Z.dyn_tree=N,Z.stat_desc=c.static_l_desc,X.dyn_tree=L,X.stat_desc=c.static_d_desc,Y.dyn_tree=K,Y.stat_desc=c.static_bl_desc,nt=0,rt=0,et=8,it(),function(){A=2*_,k[E-1]=0;for(let t=0;t9||8!=s||i<9||i>15||n<0||n>9||o<0||o>2?r:(e.dstate=t,b=i,_=1<9||n<0||n>2?r:(h[O].func!=h[e].func&&0!==t.total_in&&(i=t.deflate(1)),O!=e&&(O=e,V=h[O].max_lazy,j=h[O].good_length,q=h[O].nice_length,H=h[O].max_chain),P=n,i)},t.deflateSetDictionary=function(t,e,n){let i,s=n,o=0;if(!e||42!=a)return r;if(s<3)return 0;for(s>_-w&&(s=_-w,o=n-s),x.set(e.subarray(o,o+s),0),W=s,S=s,v=255&x[0],v=(v<4||o<0)return r;if(!e.next_out||!e.next_in&&0!==e.avail_in||a==f&&4!=o)return e.msg=d[4],r;if(0===e.avail_out)return e.msg=d[7],i;var j;if(s=e,R=g,g=o,42==a&&(y=8+(b-8<<4)<<8,A=(O-1&255)>>1,A>3&&(A=3),y|=A<<6,0!==W&&(y|=32),y+=31-y%31,a=u,at((j=y)>>8&255),at(255&j)),0!==t.pending){if(s.flush_pending(),0===s.avail_out)return g=-1,0}else if(0===s.avail_in&&o<=R&&4!=o)return s.msg=d[7],i;if(a==f&&0!==s.avail_in)return e.msg=d[7],i;if(0!==s.avail_in||0!==M||0!=o&&a!=f){switch(H=-1,h[O].func){case 0:H=function(t){let e,n=65535;for(n>l-5&&(n=l-5);;){if(M<=1){if(_t(),0===M&&0==t)return 0;if(0===M)break}if(W+=M,M=0,e=S+n,(0===W||W>=e)&&(M=W-e,W=e,gt(!1),0===s.avail_out))return 0;if(W-S>=_-w&&(gt(!1),0===s.avail_out))return 0}return gt(4==t),0===s.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:H=function(t){let e,n=0;for(;;){if(M=3&&(v=(v<=3)if(e=ut(W-C,D-3),M-=D,D<=V&&M>=3){D--;do{W++,v=(v<=3&&(v=(v<4096)&&(D=2)),B>=3&&D<=B){n=W+M-3,e=ut(W-1-F,B-3),M-=B-1,B-=2;do{++W<=n&&(v=(v<n&&(i=n),0===i?0:(r.avail_in-=i,t.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),e),r.next_in_index+=i,r.total_in+=i,i)},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 b={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},m=Object.assign({},b);function x(t){if(void 0!==t.chunkSize&&(m.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(m.maxWorkers=t.maxWorkers),void 0!==t.useWebWorkers&&(m.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(m.Deflate=t.Deflate),void 0!==t.Inflate&&(m.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");m.workerScripts||(m.workerScripts={}),m.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!Array.isArray(t.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.inflate=t.workerScripts.inflate}}}const A="HTTP error ",U="HTTP Range not supported",k="text/plain",v="Content-Length",E="Accept-Ranges",R="HEAD",z="GET",I="bytes";class S{constructor(){this.size=0}init(){this.initialized=!0}}class D extends S{}class F extends S{writeUint8Array(t){this.size+=t.length}}class T extends D{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((r,i)=>{n.onload=t=>r(new Uint8Array(t.target.result)),n.onerror=i,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class W extends F{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class C extends D{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(),j(this.url)&&!this.preventHeadRequest){const t=await B(R,this.url,this.options);if(this.size=Number(t.headers.get(v)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(E)!=I)throw new Error(U);void 0===this.size&&await M(this,this.options)}else await M(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await B(z,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(U);return new Uint8Array(await n.arrayBuffer())}return this.data||await M(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function M(t,e){const n=await B(z,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function B(t,e,n,r){r=Object.assign({},n.headers,r);const i=await fetch(e,Object.assign({},n,{method:t,headers:r}));if(i.status<400)return i;throw new Error(A+(i.statusText||i.status))}class H extends D{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),j(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>O(R,this.url,(n=>{this.size=Number(n.getResponseHeader(v)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(E)==I?t():e(new Error(U)):void 0===this.size?V(this,this.url).then((()=>t())).catch(e):t()}),e)));await V(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await V(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,r)=>O(z,this.url,(t=>n(new Uint8Array(t.response))),r,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(U)}}function V(t,e){return new Promise(((n,r)=>O(z,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),r)))}function O(t,e,n,r,i=[]){const s=new XMLHttpRequest;return s.addEventListener("load",(()=>{s.status<400?n(s):r(A+(s.statusText||s.status))}),!1),s.addEventListener("error",r,!1),s.open(t,e),i.forEach((t=>s.setRequestHeader(t[0],t[1]))),s.responseType="arraybuffer",s.send(),s}class P extends D{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new H(t,e):this.reader=new C(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 j(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 q=4294967295,N=65535,L=67324752,K=134695760,Z=new Date(2107,11,31),X=new Date(1980,0,1),Y=[];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;Y[t]=e}class G{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,r=0|t.length;n>>8^Y[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const J="Invalid pasword",Q=16,$="raw",tt={name:"PBKDF2"},et={name:"HMAC"},nt="SHA-1",rt={name:"AES-CTR"},it=Object.assign({hash:et},tt),st=Object.assign({iterations:1e3,hash:{name:nt}},tt),at=Object.assign({hash:nt},et),ot=Object.assign({length:Q},rt),ct=["deriveBits"],lt=["sign"],ht=[8,12,16],dt=[16,24,32],ut=10,ft=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],pt=crypto.subtle;class wt{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(i=0)=>{if(i+Q<=r.length-ut){const t=r.subarray(i,i+Q),s=await pt.decrypt(Object.assign({counter:this.counter},ot),this.keys.key,t);return _t(this.counter),n.set(new Uint8Array(s),i),e(i+Q)}return this.pendingInput=r.subarray(i),this.signed&&(this.input=bt(this.input,t)),n};if(this.password){const e=t.subarray(0,ht[this.strength]+2);await async function(t,e,n){await gt(t,n,e.subarray(0,ht[t.strength]),["decrypt"]);const r=e.subarray(ht[t.strength]),i=t.keys.passwordVerification;if(i[0]!=r[0]||i[1]!=r[1])throw new Error(J)}(this,e,this.password),this.password=null,t=t.subarray(ht[this.strength]+2)}let n=new Uint8Array(t.length-ut-(t.length-ut)%Q),r=t;return this.pendingInput.length&&(r=bt(this.pendingInput,t),n=mt(n,r.length-ut-(r.length-ut)%Q)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-ut),r=t.subarray(t.length-ut);let i=new Uint8Array(0);if(n.length){const t=await pt.decrypt(Object.assign({counter:this.counter},ot),e.key,n);i=new Uint8Array(t)}let s=!0;if(this.signed){const t=await pt.sign(et,e.authentication,this.input.subarray(0,this.input.length-ut)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(i+Q<=t.length){const s=t.subarray(i,i+Q),a=await pt.encrypt(Object.assign({counter:this.counter},ot),this.keys.key,s);return _t(this.counter),r.set(new Uint8Array(a),i+n.length),e(i+Q)}return this.pendingInput=t.subarray(i),this.output=bt(this.output,r),r};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(ht[t.strength]));return await gt(t,e,n,["encrypt"]),bt(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let r=new Uint8Array(n.length+t.length-t.length%Q);return r.set(n,0),this.pendingInput.length&&(t=bt(this.pendingInput,t),r=mt(r,t.length-t.length%Q)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await pt.encrypt(Object.assign({counter:this.counter},ot),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=bt(this.output,t)}const e=await pt.sign(et,this.keys.authentication,this.output.subarray(ht[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,ut);return{data:bt(t,n),signature:n}}}async function gt(t,e,n,r){t.counter=new Uint8Array(ft);const i=(new TextEncoder).encode(e),s=await pt.importKey($,i,it,!1,ct),a=await pt.deriveBits(Object.assign({salt:n},st),s,8*(2*dt[t.strength]+2)),o=new Uint8Array(a);t.keys={key:await pt.importKey($,o.subarray(0,dt[t.strength]),rt,!0,r),authentication:await pt.importKey($,o.subarray(dt[t.strength],2*dt[t.strength]),at,!1,lt),passwordVerification:o.subarray(2*dt[t.strength])}}function _t(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function bt(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 mt(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const xt=12;class At{constructor(t,e){this.password=t,this.passwordVerification=e,Et(this,t)}async append(t){if(this.password){const e=kt(this,t.subarray(0,xt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(J);t=t.subarray(xt)}return kt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class Ut{constructor(t,e){this.passwordVerification=e,this.password=t,Et(this,t)}async append(t){let e,n;if(this.password){this.password=null;const r=crypto.getRandomValues(new Uint8Array(xt));r[11]=this.passwordVerification,e=new Uint8Array(t.length+r.length),e.set(vt(this,r),0),n=xt}else e=new Uint8Array(t.length),n=0;return e.set(vt(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function kt(t,e){const n=new Uint8Array(e.length);for(let r=0;r>>24]),t.keys[2]=~t.crcKey2.get()}function zt(t){const e=2|t.keys[2];return It(Math.imul(e,1^e)>>>8)}function It(t){return 255&t}function St(t){return 4294967295&t}const Dt="deflate",Ft="Invalid signature";class Tt{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new G,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new At(e.password,e.passwordVerification):new wt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(Ft);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(Ft)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Wt{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new G,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new Ut(e.password,e.passwordVerification):new yt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const r=new Uint8Array(e.length+n.data.length);r.set(e,0),r.set(n.data,e.length),e=r}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Ct="init",Mt="append",Bt="flush",Ht="message";var Vt=(t,e,n,r,i,s)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=s,t.webWorker=i,t.onTaskFinished=()=>{t.busy=!1;r(t)&&t.worker&&t.worker.terminate()},i?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-deflate.min.js",document.baseURI).href)),t.worker.addEventListener(Ht,i,!1),t.interface={append:t=>n({type:Mt,data:t}),flush:()=>n({type:Bt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await r({scripts:n,type:Ct,options:e})}return r(n)}function r(n){const r=t.worker,i=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,r.postMessage(n,[n.data])}catch(t){r.postMessage(n)}else r.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return i}function i(n){const r=n.data;if(e){const n=r.error,i=r.type;if(n){const r=new Error(n.message);r.stack=n.stack,e.reject(r),e=null,t.onTaskFinished()}else if(i==Ct||i==Bt||i==Mt){const n=r.data;i==Bt?(e.resolve({data:new Uint8Array(n),signature:r.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(Dt)?new Wt(t,e):e.codecType.startsWith("inflate")?new Tt(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Ot=[],Pt=[];function jt(t){const e=!Pt.length;if(e)Ot=Ot.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:r,webWorker:i,scripts:s}]=Pt.splice(0,1);e(Vt(t,n,r,jt,i,s))}return e}async function qt(t,e){return e.length&&await t.writeUint8Array(e),e.length}const Nt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Lt{constructor(t){Nt.forEach((e=>this[e]=t[e]))}}const Kt="File already exists",Zt="Zip file comment exceeds 64KB",Xt="File entry comment exceeds 64KB",Yt="File entry name exceeds 64KB",Gt="Version exceeds 65535",Jt="The modification date must be between 1/1/1980 and 12/31/2107",Qt="The strength must equal 1, 2, or 3",$t="Extra field type exceeds 65535",te="Extra field data exceeds 64KB",ee=new Uint8Array([7,0,2,0,65,69,3,0,0]);function ne(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function re(t,e,n){t.setUint8(e,n)}function ie(t,e,n){t.setUint16(e,n,!0)}function se(t,e,n){t.setUint32(e,n,!0)}function ae(t,e,n){t.setBigUint64(e,n,!0)}x({Deflate:function(t){const e=new _,n=512,r=new Uint8Array(n);let i=t?t.level:-1;void 0===i&&(i=-1),e.deflateInit(i),e.next_out=r,this.append=function(t,i){let s,a,o=0,c=0,l=0;const h=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,s=e.deflate(0),0!=s)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?h.push(new Uint8Array(r)):h.push(new Uint8Array(r.subarray(0,e.next_out_index)))),l+=e.next_out_index,i&&e.next_in_index>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 a=new Uint8Array(l),h.forEach((function(t){a.set(t,c),c+=t.length})),a}},this.flush=function(){let t,i,s=0,a=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(new Uint8Array(r.subarray(0,e.next_out_index))),a+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),i=new Uint8Array(a),o.forEach((function(t){i.set(t,s),s+=t.length})),i}}}),t.BlobReader=T,t.BlobWriter=W,t.Data64URIReader=class extends D{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),r=4*Math.floor(t/3),i=atob(this.dataURI.substring(r+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),s=t-3*Math.floor(r/4);for(let t=s;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_DUPLICATED_NAME=Kt,t.ERR_HTTP_RANGE=U,t.ERR_INVALID_COMMENT=Zt,t.ERR_INVALID_DATE=Jt,t.ERR_INVALID_ENCRYPTION_STRENGTH=Qt,t.ERR_INVALID_ENTRY_COMMENT=Xt,t.ERR_INVALID_ENTRY_NAME=Yt,t.ERR_INVALID_EXTRAFIELD_DATA=te,t.ERR_INVALID_EXTRAFIELD_TYPE=$t,t.ERR_INVALID_VERSION=Gt,t.HttpRangeReader=class extends P{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=P,t.Reader=D,t.TextReader=class extends D{constructor(t){super(),this.blobReader=new T(new Blob([t],{type:k}))}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 F{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:k})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:k})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends D{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 F{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=F,t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=m,this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith("/")?t+="/":n.directory=t.endsWith("/"),this.files.has(t))throw new Error(Kt);const r=(new TextEncoder).encode(t);if(r.length>N)throw new Error(Yt);const i=n.comment||"",s=(new TextEncoder).encode(i);if(s.length>N)throw new Error(Xt);const a=this.options.version||n.version||0;if(a>N)throw new Error(Gt);const o=n.lastModDate||new Date;if(oZ)throw new Error(Jt);const c=ne(this,n,"password"),l=ne(this,n,"encryptionStrength")||3,h=ne(this,n,"zipCrypto");if(void 0!==c&&void 0!==l&&(l<1||l>3))throw new Error(Qt);e&&!e.initialized&&await e.init();let d=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),d=new Uint8Array(t),u.forEach(((t,n)=>{if(n>N)throw new Error($t);if(t.length>N)throw new Error(te);d.set(new Uint16Array([n]),e),d.set(new Uint16Array([t.length]),e+2),d.set(t,e+4),e+=4+t.length}))}const f=e?1.05*e.size:0,p=n.zip64||this.options.zip64||this.offset>=q||f>=q||this.offset+f>=q,w=ne(this,n,"level"),y=ne(this,n,"useWebWorkers"),g=ne(this,n,"bufferedWrite"),_=ne(this,n,"keepOrder"),b=await async function(t,e,n,r){const i=t.files,s=t.writer;let a,o,c;i.set(e,null);try{let l,h;try{r.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>c=t))),r.bufferedWrite||t.lockWrite?(l=new W,await l.init()):(t.lockWrite=new Promise((t=>a=t)),s.initialized||await s.init(),l=s),h=await async function(t,e,n,r){const i=r.rawFilename,s=r.lastModDate,a=r.password,o=Boolean(a&&a.length),c=r.level,l=0!==c&&!r.directory,h=r.zip64;let d,u;if(o&&!r.zipCrypto){d=new Uint8Array(ee.length+2);const t=new DataView(d.buffer);ie(t,0,39169),d.set(ee,2),u=r.encryptionStrength,re(t,8,u)}else d=new Uint8Array(0);const f={version:r.version||20,zip64:h,directory:Boolean(r.directory),filenameUTF8:!0,rawFilename:i,commentUTF8:!0,rawComment:r.rawComment,rawExtraFieldZip64:h?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:d,rawExtraField:r.rawExtraField};let p=2056,w=0;l&&(w=8);h&&(f.version=f.version>45?f.version:45);o&&(p|=1,r.zipCrypto||(f.version=f.version>51?f.version:51,w=99,l&&(f.rawExtraFieldAES[9]=8)));const y=f.headerArray=new Uint8Array(26),g=new DataView(y.buffer);ie(g,0,f.version),ie(g,2,p),ie(g,4,w);const _=new Uint32Array(1),b=new DataView(_.buffer);ie(b,0,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2),ie(b,2,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate());const m=_[0];se(g,6,m),ie(g,22,i.length),ie(g,24,0);const x=new Uint8Array(30+i.length);let A;se(new DataView(x.buffer),0,L),x.set(y,4),x.set(i,30);let U=0,k=0;if(t){U=t.size;const i=await function(t,e,n){const r=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),i=r&&n.workerScripts?n.workerScripts[e.codecType]:[];if(Ot.length!t.busy));return n?Vt(n,t,e,jt,r,i):new Promise((n=>Pt.push({resolve:n,codecConstructor:t,options:e,webWorker:r,scripts:i})))}}(n.Deflate,{codecType:Dt,level:c,password:a,encryptionStrength:u,zipCrypto:o&&r.zipCrypto,passwordVerification:o&&r.zipCrypto&&m>>8&255,signed:!0,compressed:l,encrypted:o,useWebWorkers:r.useWebWorkers},n);await e.writeUint8Array(x),A=await async function(t,e,n,r,i,s,a){const o=Math.max(s.chunkSize,64);return async function s(c=0,l=0){if(c{n.onload=e=>t(e.target.result),n.onerror=r,n.readAsArrayBuffer(e)}));await Promise.all([t.lockWrite,o]),await s.writeUint8Array(new Uint8Array(r))}if(h.offset=t.offset,h.zip64){ae(new DataView(h.rawExtraFieldZip64.buffer),20,BigInt(h.offset))}return t.offset+=h.length,h}finally{c&&c(),a&&(t.lockWrite=null,a())}}(this,t,e,Object.assign({},n,{rawFilename:r,rawComment:s,version:a,lastModDate:o,rawExtraField:d,zip64:p,password:c,level:w,useWebWorkers:y,encryptionStrength:l,zipCrypto:h,bufferedWrite:g,keepOrder:_}));return Object.assign(b,{name:t,comment:i,extraField:u}),new Lt(b)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let r=0,i=0,s=this.offset,a=n.size;for(const[,t]of n)i+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||s>=q||i>=q||a>=N,c=new Uint8Array(i+(o?98:22)),l=new DataView(c.buffer);if(t.length){if(!(t.length<=N))throw new Error(Zt);ie(l,r+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,i=t.rawExtraFieldAES,s=n.length+i.length+t.rawExtraField.length;se(l,r,33639248),ie(l,r+4,t.version),c.set(t.headerArray,r+6),ie(l,r+30,s),ie(l,r+32,t.rawComment.length),t.directory&&re(l,r+38,16),t.zip64?se(l,r+42,q):se(l,r+42,t.offset),c.set(e,r+46),c.set(n,r+46+e.length),c.set(i,r+46+e.length+n.length),c.set(t.rawExtraField,46+e.length+n.length+i.length),c.set(t.rawComment,r+46+e.length+s),r+=46+e.length+s+t.rawComment.length}return o&&(se(l,r,101075792),ae(l,r+4,BigInt(44)),ie(l,r+12,45),ie(l,r+14,45),ae(l,r+24,BigInt(a)),ae(l,r+32,BigInt(a)),ae(l,r+40,BigInt(i)),ae(l,r+48,BigInt(s)),se(l,r+56,117853008),ae(l,r+64,BigInt(s)+BigInt(i)),se(l,r+72,1),a=N,s=q,i=q,r+=76),se(l,r,101010256),ie(l,r+8,a),ie(l,r+10,a),se(l,r+12,i),se(l,r+16,s),await e.writeUint8Array(c),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=x,t.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/zip-no-worker-inflate.min.js b/dist/zip-no-worker-inflate.min.js index 8f186231..816711ac 100644 --- a/dist/zip-no-worker-inflate.min.js +++ b/dist/zip-no-worker-inflate.min.js @@ -1 +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=-2,n=-3,i=-5,r=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],a=[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],s=[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],o=[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],d=[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],l=[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],c=[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],u=15;function h(){let t,e,r,a,s,h;function f(t,e,o,d,l,c,f,w,_,p,y){let b,g,x,m,k,v,A,U,R,E,F,S,D,z,T;E=0,k=o;do{r[t[e+E]]++,E++,k--}while(0!==k);if(r[0]==o)return f[0]=-1,w[0]=0,0;for(U=w[0],v=1;v<=u&&0===r[v];v++);for(A=v,Uk&&(U=k),w[0]=U,z=1<S+U;){if(m++,S+=U,T=x-S,T=T>U?U:T,(g=1<<(v=A-S))>b+1&&(g-=b+1,D=A,v1440)return n;s[m]=F=p[0],p[0]+=T,0!==m?(h[m]=k,a[0]=v,a[1]=U,v=k>>>S-U,a[2]=F-s[m-1]-v,_.set(a,3*(s[m-1]+v))):f[0]=F}for(a[1]=A-S,E>=o?a[0]=192:y[E]>>S;v>>=1)k^=v;for(k^=v,R=(1<257?(g==n?b.msg="oversubscribed distance tree":g==i?(b.msg="incomplete distance tree",g=n):-4!=g&&(b.msg="empty distance tree with lengths",g=n),g):0)}}h.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=a,i[0]=s,0};function f(){const t=this;let i,a,s,o,d=0,l=0,c=0,u=0,h=0,f=0,w=0,_=0,p=0,y=0;function b(t,e,i,a,s,o,d,l){let c,u,h,f,w,_,p,y,b,g,x,m,k,v,A,U;p=l.next_in_index,y=l.avail_in,w=d.bitb,_=d.bitk,b=d.write,g=b>=u[U+1],_-=u[U+1],0!=(16&f)){for(f&=15,k=u[U+2]+(w&r[f]),w>>=f,_-=f;_<15;)y--,w|=(255&l.read_byte(p++))<<_,_+=8;for(c=w&m,u=s,h=o,U=3*(h+c),f=u[U];;){if(w>>=u[U+1],_-=u[U+1],0!=(16&f)){for(f&=15;_>=f,_-=f,g-=k,b>=v)A=b-v,b-A>0&&2>b-A?(d.window[b++]=d.window[A++],d.window[b++]=d.window[A++],k-=2):(d.window.set(d.window.subarray(A,A+2),b),b+=2,A+=2,k-=2);else{A=b-v;do{A+=d.end}while(A<0);if(f=d.end-A,k>f){if(k-=f,b-A>0&&f>b-A)do{d.window[b++]=d.window[A++]}while(0!=--f);else d.window.set(d.window.subarray(A,A+f),b),b+=f,A+=f,f=0;A=0}}if(b-A>0&&k>b-A)do{d.window[b++]=d.window[A++]}while(0!=--k);else d.window.set(d.window.subarray(A,A+k),b),b+=k,A+=k,k=0;break}if(0!=(64&f))return l.msg="invalid distance code",k=l.avail_in-y,k=_>>3>3:k,y+=k,p-=k,_-=k<<3,d.bitb=w,d.bitk=_,l.avail_in=y,l.total_in+=p-l.next_in_index,l.next_in_index=p,d.write=b,n;c+=u[U+2],c+=w&r[f],U=3*(h+c),f=u[U]}break}if(0!=(64&f))return 0!=(32&f)?(k=l.avail_in-y,k=_>>3>3:k,y+=k,p-=k,_-=k<<3,d.bitb=w,d.bitk=_,l.avail_in=y,l.total_in+=p-l.next_in_index,l.next_in_index=p,d.write=b,1):(l.msg="invalid literal/length code",k=l.avail_in-y,k=_>>3>3:k,y+=k,p-=k,_-=k<<3,d.bitb=w,d.bitk=_,l.avail_in=y,l.total_in+=p-l.next_in_index,l.next_in_index=p,d.write=b,n);if(c+=u[U+2],c+=w&r[f],U=3*(h+c),0===(f=u[U])){w>>=u[U+1],_-=u[U+1],d.window[b++]=u[U+2],g--;break}}else w>>=u[U+1],_-=u[U+1],d.window[b++]=u[U+2],g--}while(g>=258&&y>=10);return k=l.avail_in-y,k=_>>3>3:k,y+=k,p-=k,_-=k<<3,d.bitb=w,d.bitk=_,l.avail_in=y,l.total_in+=p-l.next_in_index,l.next_in_index=p,d.write=b,0}t.init=function(t,e,n,r,d,l){i=0,w=t,_=e,s=n,p=r,o=d,y=l,a=null},t.proc=function(t,g,x){let m,k,v,A,U,R,E,F=0,S=0,D=0;for(D=g.next_in_index,A=g.avail_in,F=t.bitb,S=t.bitk,U=t.write,R=U=258&&A>=10&&(t.bitb=F,t.bitk=S,g.avail_in=A,g.total_in+=D-g.next_in_index,g.next_in_index=D,t.write=U,x=b(w,_,s,p,o,y,t,g),D=g.next_in_index,A=g.avail_in,F=t.bitb,S=t.bitk,U=t.write,R=U>>=a[k+1],S-=a[k+1],v=a[k],0===v){u=a[k+2],i=6;break}if(0!=(16&v)){h=15&v,d=a[k+2],i=2;break}if(0==(64&v)){c=v,l=k/3+a[k+2];break}if(0!=(32&v)){i=7;break}return i=9,g.msg="invalid literal/length code",x=n,t.bitb=F,t.bitk=S,g.avail_in=A,g.total_in+=D-g.next_in_index,g.next_in_index=D,t.write=U,t.inflate_flush(g,x);case 2:for(m=h;S>=m,S-=m,c=_,a=o,l=y,i=3;case 3:for(m=c;S>=a[k+1],S-=a[k+1],v=a[k],0!=(16&v)){h=15&v,f=a[k+2],i=4;break}if(0==(64&v)){c=v,l=k/3+a[k+2];break}return i=9,g.msg="invalid distance code",x=n,t.bitb=F,t.bitk=S,g.avail_in=A,g.total_in+=D-g.next_in_index,g.next_in_index=D,t.write=U,t.inflate_flush(g,x);case 4:for(m=h;S>=m,S-=m,i=5;case 5:for(E=U-f;E<0;)E+=t.end;for(;0!==d;){if(0===R&&(U==t.end&&0!==t.read&&(U=0,R=U7&&(S-=8,A++,D--),t.write=U,x=t.inflate_flush(g,x),U=t.write,R=Ut.avail_out&&(n=t.avail_out),0!==n&&e==i&&(e=0),t.avail_out-=n,t.total_out+=n,t.next_out.set(s.window.subarray(a,a+n),r),r+=n,a+=n,a==s.end&&(a=0,s.write==s.end&&(s.write=0),n=s.write-a,n>t.avail_out&&(n=t.avail_out),0!==n&&e==i&&(e=0),t.avail_out-=n,t.total_out+=n,t.next_out.set(s.window.subarray(a,a+n),r),r+=n,a+=n),t.next_out_index=r,s.read=a,e},s.proc=function(t,i){let a,f,m,k,v,A,U,R;for(k=t.next_in_index,v=t.avail_in,f=s.bitb,m=s.bitk,A=s.write,U=A>>1){case 0:f>>>=3,m-=3,a=7&m,f>>>=a,m-=a,d=1;break;case 1:E=[],F=[],S=[[]],D=[[]],h.inflate_trees_fixed(E,F,S,D),y.init(E[0],F[0],S[0],0,D[0],0),f>>>=3,m-=3,d=6;break;case 2:f>>>=3,m-=3,d=3;break;case 3:return f>>>=3,m-=3,d=9,t.msg="invalid block type",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i)}break;case 1:for(;m<32;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<>>16&65535)!=(65535&f))return d=9,t.msg="invalid stored block lengths",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);l=65535&f,f=m=0,d=0!==l?2:0!==b?7:0;break;case 2:if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);if(0===U&&(A==s.end&&0!==s.read&&(A=0,U=Av&&(a=v),a>U&&(a=U),s.window.set(t.read_buf(k,a),A),k+=a,v-=a,A+=a,U-=a,0!=(l-=a))break;d=0!==b?7:0;break;case 3:for(;m<14;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<29||(a>>5&31)>29)return d=9,t.msg="too many length or distance symbols",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);if(a=258+(31&a)+(a>>5&31),!o||o.length>>=14,m-=14,u=0,d=4;case 4:for(;u<4+(c>>>10);){for(;m<3;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<>>=3,m-=3}for(;u<19;)o[w[u++]]=0;if(_[0]=7,a=x.inflate_trees_bits(o,_,p,g,t),0!=a)return(i=a)==n&&(o=null,d=9),s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);u=0,d=5;case 5:for(;a=c,!(u>=258+(31&a)+(a>>5&31));){let e,l;for(a=_[0];m>>=a,m-=a,o[u++]=l;else{for(R=18==l?7:l-14,e=18==l?11:3;m>>=a,m-=a,e+=f&r[R],f>>>=R,m-=R,R=u,a=c,R+e>258+(31&a)+(a>>5&31)||16==l&&R<1)return o=null,d=9,t.msg="invalid bit length repeat",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);l=16==l?o[R-1]:0;do{o[R++]=l}while(0!=--e);u=R}}if(p[0]=-1,z=[],T=[],C=[],I=[],z[0]=9,T[0]=6,a=c,a=x.inflate_trees_dynamic(257+(31&a),1+(a>>5&31),o,z,T,C,I,g,t),0!=a)return a==n&&(o=null,d=9),i=a,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);y.init(z[0],T[0],g,C[0],g,I[0]),d=6;case 6:if(s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,1!=(i=y.proc(s,t,i)))return s.inflate_flush(t,i);if(i=0,y.free(t),k=t.next_in_index,v=t.avail_in,f=s.bitb,m=s.bitk,A=s.write,U=A15?(t.inflateEnd(n),e):(t.wbits=i,n.istate.blocks=new _(n,1<>4)>o.wbits){o.mode=p,t.msg="invalid window size",o.marker=5;break}o.mode=1;case 1:if(0===t.avail_in)return a;if(a=r,t.avail_in--,t.total_in++,s=255&t.read_byte(t.next_in_index++),((o.method<<8)+s)%31!=0){o.mode=p,t.msg="incorrect header check",o.marker=5;break}if(0==(32&s)){o.mode=7;break}o.mode=2;case 2:if(0===t.avail_in)return a;a=r,t.avail_in--,t.total_in++,o.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,o.mode=3;case 3:if(0===t.avail_in)return a;a=r,t.avail_in--,t.total_in++,o.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,o.mode=4;case 4:if(0===t.avail_in)return a;a=r,t.avail_in--,t.total_in++,o.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,o.mode=5;case 5:return 0===t.avail_in?a:(a=r,t.avail_in--,t.total_in++,o.need+=255&t.read_byte(t.next_in_index++),o.mode=6,2);case 6:return o.mode=p,t.msg="need dictionary",o.marker=0,e;case 7:if(a=o.blocks.proc(t,a),a==n){o.mode=p,o.marker=0;break}if(0==a&&(a=r),1!=a)return a;a=r,o.blocks.reset(t,o.was),o.mode=12;case 12:return 1;case p:return n;default:return e}},t.inflateSetDictionary=function(t,n,i){let r=0,a=i;if(!t||!t.istate||6!=t.istate.mode)return e;const s=t.istate;return a>=1<?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const E=[];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;E[t]=e}class F{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^E[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const S="Invalid pasword",D=16,z="raw",T={name:"PBKDF2"},C={name:"HMAC"},I="SHA-1",O={name:"AES-CTR"},L=Object.assign({hash:C},T),M=Object.assign({iterations:1e3,hash:{name:I}},T),W=Object.assign({hash:I},C),H=Object.assign({length:D},O),V=["deriveBits"],N=["sign"],P=[8,12,16],j=[16,24,32],B=10,q=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],K=crypto.subtle;class Z{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+D<=i.length-B){const t=i.subarray(r,r+D),a=await K.decrypt(Object.assign({counter:this.counter},H),this.keys.key,t);return Y(this.counter),n.set(new Uint8Array(a),r),e(r+D)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=J(this.input,t)),n};if(this.password){const e=t.subarray(0,P[this.strength]+2);await async function(t,e,n){await X(t,n,e.subarray(0,P[t.strength]),["decrypt"]);const i=e.subarray(P[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(S)}(this,e,this.password),this.password=null,t=t.subarray(P[this.strength]+2)}let n=new Uint8Array(t.length-B-(t.length-B)%D),i=t;return this.pendingInput.length&&(i=J(this.pendingInput,t),n=Q(n,i.length-B-(i.length-B)%D)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-B),i=t.subarray(t.length-B);let r=new Uint8Array(0);if(n.length){const t=await K.decrypt(Object.assign({counter:this.counter},H),e.key,n);r=new Uint8Array(t)}let a=!0;if(this.signed){const t=await K.sign(C,e.authentication,this.input.subarray(0,this.input.length-B)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(r+D<=t.length){const a=t.subarray(r,r+D),s=await K.encrypt(Object.assign({counter:this.counter},H),this.keys.key,a);return Y(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+D)}return this.pendingInput=t.subarray(r),this.output=J(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(P[t.strength]));return await X(t,e,n,["encrypt"]),J(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%D);return i.set(n,0),this.pendingInput.length&&(t=J(this.pendingInput,t),i=Q(i,t.length-t.length%D)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await K.encrypt(Object.assign({counter:this.counter},H),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=J(this.output,t)}const e=await K.sign(C,this.keys.authentication,this.output.subarray(P[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,B);return{data:J(t,n),signature:n}}}async function X(t,e,n,i){t.counter=new Uint8Array(q);const r=(new TextEncoder).encode(e),a=await K.importKey(z,r,L,!1,V),s=await K.deriveBits(Object.assign({salt:n},M),a,8*(2*j[t.strength]+2)),o=new Uint8Array(s);t.keys={key:await K.importKey(z,o.subarray(0,j[t.strength]),O,!0,i),authentication:await K.importKey(z,o.subarray(j[t.strength],2*j[t.strength]),W,!1,N),passwordVerification:o.subarray(2*j[t.strength])}}function Y(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function J(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 Q(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const $=12;class tt{constructor(t,e){this.password=t,this.passwordVerification=e,rt(this,t)}async append(t){if(this.password){const e=nt(this,t.subarray(0,$));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(S);t=t.subarray($)}return nt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class et{constructor(t,e){this.passwordVerification=e,this.password=t,rt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array($));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(it(this,i),0),n=$}else e=new Uint8Array(t.length),n=0;return e.set(it(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function nt(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function st(t){const e=2|t.keys[2];return ot(Math.imul(e,1^e)>>>8)}function ot(t){return 255&t}function dt(t){return 4294967295&t}const lt="inflate",ct="Invalid signature";class ut{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new F,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new tt(e.password,e.passwordVerification):new Z(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(ct);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(ct)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class ht{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new F,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new et(e.password,e.passwordVerification):new G(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const ft="init",wt="append",_t="flush",pt="message";var yt=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-inflate.min.js",document.baseURI).href)),t.worker.addEventListener(pt,r,!1),t.interface={append:t=>n({type:wt,data:t}),flush:()=>n({type:_t})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:ft,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==ft||r==_t||r==wt){const n=i.data;r==_t?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith("deflate")?new ht(t,e):e.codecType.startsWith(lt)?new ut(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let bt=[],gt=[];function xt(t){const e=!gt.length;if(e)bt=bt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=gt.splice(0,1);e(yt(t,n,i,xt,r,a))}return e}async function mt(t,e){return e.length&&await t.writeUint8Array(e),e.length}const kt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class vt{constructor(t){kt.forEach((e=>this[e]=t[e]))}}const At="File format is not recognized",Ut="End of central directory not found",Rt="End of Zip64 central directory not found",Et="End of Zip64 central directory locator not found",Ft="Central directory header not found",St="Local file header not found",Dt="Zip64 extra field not found",zt="File contains encrypted entry",Tt="Encryption method not supported",Ct="Compression method not supported",It="utf-8",Ot=["uncompressedSize","compressedSize","offset"];class Lt{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=Vt(this,e,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error(Ct);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error(Ct);if(67324752!=Bt(r,0))throw new Error(St);const s=this.localDirectory={};Mt(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),Wt(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,d=this.bitFlag.encrypted&&s.bitFlag.encrypted,l=d&&!this.extraFieldAES;if(d){if(!l&&void 0===this.extraFieldAES.strength)throw new Error(Tt);if(!a)throw new Error(zt)}const c=await function(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(bt.length!t.busy));return n?yt(n,t,e,xt,i,r):new Promise((n=>gt.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}(this.config.Inflate,{codecType:lt,password:a,zipCrypto:l,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:Vt(this,e,"checkSignature"),passwordVerification:l&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:d,useWebWorkers:Vt(this,e,"useWebWorkers")},this.config);return t.initialized||await t.init(),await async function(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(d=0,l=0){if(d>1,dataDescriptor:8==(8&i),languageEncodingFlag:2048==(2048&i)},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=Bt(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>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){}}(t.rawLastModDate),t.filenameLength=jt(e,n+22),t.extraFieldLength=jt(e,n+24)}function Wt(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==v));for(let e=0;e{if(e[n]==v){if(!t||void 0===t[n])throw new Error(Dt);e[n]=t[n]}}))}(l,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Ht(c,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&Ht(u,"comment","rawComment",e,t);const h=e.extraFieldAES=a.get(39169);h?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=Pt(i,0),t.vendorId=Pt(i,2);const r=Pt(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=jt(i,5)}else e.compressionMethod=n}(h,e,d):e.compressionMethod=d,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Ht(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=Pt(a,0),t.signature=Bt(a,1);const s=new F;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==Bt(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Vt(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Nt(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class re extends ee{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(),ue(this.url)&&!this.preventHeadRequest){const t=await se(Jt,this.url,this.options);if(this.size=Number(t.headers.get(Xt)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(Yt)!=$t)throw new Error(Zt);void 0===this.size&&await ae(this,this.options)}else await ae(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await se(Qt,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(Zt);return new Uint8Array(await n.arrayBuffer())}return this.data||await ae(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function ae(t,e){const n=await se(Qt,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function se(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(Kt+(r.statusText||r.status))}class oe extends ee{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),ue(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>le(Jt,this.url,(n=>{this.size=Number(n.getResponseHeader(Xt)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(Yt)==$t?t():e(new Error(Zt)):void 0===this.size?de(this,this.url).then((()=>t())).catch(e):t()}),e)));await de(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await de(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>le(Qt,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(Zt)}}function de(t,e){return new Promise(((n,i)=>le(Qt,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function le(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(Kt+(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 ce extends ee{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new oe(t,e):this.reader=new re(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 ue(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)}k({Inflate:function(){const t=new g,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(r,a){const s=[];let o,d,l=0,c=0,u=0;if(0!==r.length){t.next_in_index=0,t.next_in=r,t.avail_in=r.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),o=t.inflate(0),n&&o===i){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==o&&1!==o)throw new Error("inflating: "+t.msg);if((n||1===o)&&t.avail_in===r.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?s.push(new Uint8Array(e)):s.push(new Uint8Array(e.subarray(0,t.next_out_index)))),u+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d=new Uint8Array(u),s.forEach((function(t){d.set(t,c),c+=t.length})),d}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=ie,t.BlobWriter=class extends ne{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}},t.Data64URIReader=class extends ee{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_BAD_FORMAT=At,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Ft,t.ERR_ENCRYPTED=zt,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Et,t.ERR_EOCDR_NOT_FOUND=Ut,t.ERR_EOCDR_ZIP64_NOT_FOUND=Rt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Dt,t.ERR_HTTP_RANGE=Zt,t.ERR_INVALID_PASSWORD=S,t.ERR_INVALID_SIGNATURE=ct,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=St,t.ERR_UNSUPPORTED_COMPRESSION=Ct,t.ERR_UNSUPPORTED_ENCRYPTION=Tt,t.HttpRangeReader=class extends ce{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=ce,t.Reader=ee,t.TextReader=class extends ee{constructor(t){super(),this.blobReader=new ie(new Blob([t],{type:Gt}))}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 ne{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:Gt})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:Gt})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends ee{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 ne{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=ne,t.ZipReader=class extends class{constructor(t,e={},n={}){this.reader=t,this.options=e,this.config=n}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(At);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,101010256,22,1048560);if(!n)throw new Error(Ut);const i=new DataView(n.buffer);let r=Bt(i,12),a=Bt(i,16),s=jt(i,8),o=0;if(a==v||r==v||65535==s){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(117853008!=Bt(i,0))throw new Error(Rt);a=qt(i,8);let d=await e.readUint8Array(a,56),l=new DataView(d.buffer);const c=n.offset-20-56;if(Bt(l,0)!=U&&a!=c){const t=a;a=c,o=a-t,d=await e.readUint8Array(a,56),l=new DataView(d.buffer)}if(Bt(l,0)!=U)throw new Error(Et);s=qt(l,24),r=qt(i,4),a-=qt(l,40)}if(a<0||a>=e.size)throw new Error(At);let d=0,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer);const u=n.offset-r;if(Bt(c,d)!=A&&a!=u){const t=a;a=u,o=a-t,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer)}if(a<0||a>=e.size)throw new Error(At);const h=[];for(let e=0;ee.getData(t,n),h.push(r),d+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return h}async close(){}}{constructor(t,e){super(t,e,m)}},t.configure=k,t.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(t,"__esModule",{value:!0})})); +!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=-2,n=-3,i=-5,r=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],a=[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],s=[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],o=[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],d=[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],l=[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],c=[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],u=15;function h(){let t,e,r,a,s,h;function f(t,e,o,d,l,c,f,w,_,p,y){let b,g,x,m,k,v,A,U,R,E,F,S,D,z,T;E=0,k=o;do{r[t[e+E]]++,E++,k--}while(0!==k);if(r[0]==o)return f[0]=-1,w[0]=0,0;for(U=w[0],v=1;v<=u&&0===r[v];v++);for(A=v,Uk&&(U=k),w[0]=U,z=1<S+U;){if(m++,S+=U,T=x-S,T=T>U?U:T,(g=1<<(v=A-S))>b+1&&(g-=b+1,D=A,v1440)return n;s[m]=F=p[0],p[0]+=T,0!==m?(h[m]=k,a[0]=v,a[1]=U,v=k>>>S-U,a[2]=F-s[m-1]-v,_.set(a,3*(s[m-1]+v))):f[0]=F}for(a[1]=A-S,E>=o?a[0]=192:y[E]>>S;v>>=1)k^=v;for(k^=v,R=(1<257?(g==n?b.msg="oversubscribed distance tree":g==i?(b.msg="incomplete distance tree",g=n):-4!=g&&(b.msg="empty distance tree with lengths",g=n),g):0)}}h.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=a,i[0]=s,0};function f(){const t=this;let i,a,s,o,d=0,l=0,c=0,u=0,h=0,f=0,w=0,_=0,p=0,y=0;function b(t,e,i,a,s,o,d,l){let c,u,h,f,w,_,p,y,b,g,x,m,k,v,A,U;p=l.next_in_index,y=l.avail_in,w=d.bitb,_=d.bitk,b=d.write,g=b>=u[U+1],_-=u[U+1],0!=(16&f)){for(f&=15,k=u[U+2]+(w&r[f]),w>>=f,_-=f;_<15;)y--,w|=(255&l.read_byte(p++))<<_,_+=8;for(c=w&m,u=s,h=o,U=3*(h+c),f=u[U];;){if(w>>=u[U+1],_-=u[U+1],0!=(16&f)){for(f&=15;_>=f,_-=f,g-=k,b>=v)A=b-v,b-A>0&&2>b-A?(d.window[b++]=d.window[A++],d.window[b++]=d.window[A++],k-=2):(d.window.set(d.window.subarray(A,A+2),b),b+=2,A+=2,k-=2);else{A=b-v;do{A+=d.end}while(A<0);if(f=d.end-A,k>f){if(k-=f,b-A>0&&f>b-A)do{d.window[b++]=d.window[A++]}while(0!=--f);else d.window.set(d.window.subarray(A,A+f),b),b+=f,A+=f,f=0;A=0}}if(b-A>0&&k>b-A)do{d.window[b++]=d.window[A++]}while(0!=--k);else d.window.set(d.window.subarray(A,A+k),b),b+=k,A+=k,k=0;break}if(0!=(64&f))return l.msg="invalid distance code",k=l.avail_in-y,k=_>>3>3:k,y+=k,p-=k,_-=k<<3,d.bitb=w,d.bitk=_,l.avail_in=y,l.total_in+=p-l.next_in_index,l.next_in_index=p,d.write=b,n;c+=u[U+2],c+=w&r[f],U=3*(h+c),f=u[U]}break}if(0!=(64&f))return 0!=(32&f)?(k=l.avail_in-y,k=_>>3>3:k,y+=k,p-=k,_-=k<<3,d.bitb=w,d.bitk=_,l.avail_in=y,l.total_in+=p-l.next_in_index,l.next_in_index=p,d.write=b,1):(l.msg="invalid literal/length code",k=l.avail_in-y,k=_>>3>3:k,y+=k,p-=k,_-=k<<3,d.bitb=w,d.bitk=_,l.avail_in=y,l.total_in+=p-l.next_in_index,l.next_in_index=p,d.write=b,n);if(c+=u[U+2],c+=w&r[f],U=3*(h+c),0===(f=u[U])){w>>=u[U+1],_-=u[U+1],d.window[b++]=u[U+2],g--;break}}else w>>=u[U+1],_-=u[U+1],d.window[b++]=u[U+2],g--}while(g>=258&&y>=10);return k=l.avail_in-y,k=_>>3>3:k,y+=k,p-=k,_-=k<<3,d.bitb=w,d.bitk=_,l.avail_in=y,l.total_in+=p-l.next_in_index,l.next_in_index=p,d.write=b,0}t.init=function(t,e,n,r,d,l){i=0,w=t,_=e,s=n,p=r,o=d,y=l,a=null},t.proc=function(t,g,x){let m,k,v,A,U,R,E,F=0,S=0,D=0;for(D=g.next_in_index,A=g.avail_in,F=t.bitb,S=t.bitk,U=t.write,R=U=258&&A>=10&&(t.bitb=F,t.bitk=S,g.avail_in=A,g.total_in+=D-g.next_in_index,g.next_in_index=D,t.write=U,x=b(w,_,s,p,o,y,t,g),D=g.next_in_index,A=g.avail_in,F=t.bitb,S=t.bitk,U=t.write,R=U>>=a[k+1],S-=a[k+1],v=a[k],0===v){u=a[k+2],i=6;break}if(0!=(16&v)){h=15&v,d=a[k+2],i=2;break}if(0==(64&v)){c=v,l=k/3+a[k+2];break}if(0!=(32&v)){i=7;break}return i=9,g.msg="invalid literal/length code",x=n,t.bitb=F,t.bitk=S,g.avail_in=A,g.total_in+=D-g.next_in_index,g.next_in_index=D,t.write=U,t.inflate_flush(g,x);case 2:for(m=h;S>=m,S-=m,c=_,a=o,l=y,i=3;case 3:for(m=c;S>=a[k+1],S-=a[k+1],v=a[k],0!=(16&v)){h=15&v,f=a[k+2],i=4;break}if(0==(64&v)){c=v,l=k/3+a[k+2];break}return i=9,g.msg="invalid distance code",x=n,t.bitb=F,t.bitk=S,g.avail_in=A,g.total_in+=D-g.next_in_index,g.next_in_index=D,t.write=U,t.inflate_flush(g,x);case 4:for(m=h;S>=m,S-=m,i=5;case 5:for(E=U-f;E<0;)E+=t.end;for(;0!==d;){if(0===R&&(U==t.end&&0!==t.read&&(U=0,R=U7&&(S-=8,A++,D--),t.write=U,x=t.inflate_flush(g,x),U=t.write,R=Ut.avail_out&&(n=t.avail_out),0!==n&&e==i&&(e=0),t.avail_out-=n,t.total_out+=n,t.next_out.set(s.window.subarray(a,a+n),r),r+=n,a+=n,a==s.end&&(a=0,s.write==s.end&&(s.write=0),n=s.write-a,n>t.avail_out&&(n=t.avail_out),0!==n&&e==i&&(e=0),t.avail_out-=n,t.total_out+=n,t.next_out.set(s.window.subarray(a,a+n),r),r+=n,a+=n),t.next_out_index=r,s.read=a,e},s.proc=function(t,i){let a,f,m,k,v,A,U,R;for(k=t.next_in_index,v=t.avail_in,f=s.bitb,m=s.bitk,A=s.write,U=A>>1){case 0:f>>>=3,m-=3,a=7&m,f>>>=a,m-=a,d=1;break;case 1:E=[],F=[],S=[[]],D=[[]],h.inflate_trees_fixed(E,F,S,D),y.init(E[0],F[0],S[0],0,D[0],0),f>>>=3,m-=3,d=6;break;case 2:f>>>=3,m-=3,d=3;break;case 3:return f>>>=3,m-=3,d=9,t.msg="invalid block type",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i)}break;case 1:for(;m<32;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<>>16&65535)!=(65535&f))return d=9,t.msg="invalid stored block lengths",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);l=65535&f,f=m=0,d=0!==l?2:0!==b?7:0;break;case 2:if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);if(0===U&&(A==s.end&&0!==s.read&&(A=0,U=Av&&(a=v),a>U&&(a=U),s.window.set(t.read_buf(k,a),A),k+=a,v-=a,A+=a,U-=a,0!=(l-=a))break;d=0!==b?7:0;break;case 3:for(;m<14;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<29||(a>>5&31)>29)return d=9,t.msg="too many length or distance symbols",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);if(a=258+(31&a)+(a>>5&31),!o||o.length>>=14,m-=14,u=0,d=4;case 4:for(;u<4+(c>>>10);){for(;m<3;){if(0===v)return s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);i=0,v--,f|=(255&t.read_byte(k++))<>>=3,m-=3}for(;u<19;)o[w[u++]]=0;if(_[0]=7,a=x.inflate_trees_bits(o,_,p,g,t),0!=a)return(i=a)==n&&(o=null,d=9),s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);u=0,d=5;case 5:for(;a=c,!(u>=258+(31&a)+(a>>5&31));){let e,l;for(a=_[0];m>>=a,m-=a,o[u++]=l;else{for(R=18==l?7:l-14,e=18==l?11:3;m>>=a,m-=a,e+=f&r[R],f>>>=R,m-=R,R=u,a=c,R+e>258+(31&a)+(a>>5&31)||16==l&&R<1)return o=null,d=9,t.msg="invalid bit length repeat",i=n,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);l=16==l?o[R-1]:0;do{o[R++]=l}while(0!=--e);u=R}}if(p[0]=-1,z=[],T=[],C=[],I=[],z[0]=9,T[0]=6,a=c,a=x.inflate_trees_dynamic(257+(31&a),1+(a>>5&31),o,z,T,C,I,g,t),0!=a)return a==n&&(o=null,d=9),i=a,s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,s.inflate_flush(t,i);y.init(z[0],T[0],g,C[0],g,I[0]),d=6;case 6:if(s.bitb=f,s.bitk=m,t.avail_in=v,t.total_in+=k-t.next_in_index,t.next_in_index=k,s.write=A,1!=(i=y.proc(s,t,i)))return s.inflate_flush(t,i);if(i=0,y.free(t),k=t.next_in_index,v=t.avail_in,f=s.bitb,m=s.bitk,A=s.write,U=A15?(t.inflateEnd(n),e):(t.wbits=i,n.istate.blocks=new _(n,1<>4)>o.wbits){o.mode=p,t.msg="invalid window size",o.marker=5;break}o.mode=1;case 1:if(0===t.avail_in)return a;if(a=r,t.avail_in--,t.total_in++,s=255&t.read_byte(t.next_in_index++),((o.method<<8)+s)%31!=0){o.mode=p,t.msg="incorrect header check",o.marker=5;break}if(0==(32&s)){o.mode=7;break}o.mode=2;case 2:if(0===t.avail_in)return a;a=r,t.avail_in--,t.total_in++,o.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,o.mode=3;case 3:if(0===t.avail_in)return a;a=r,t.avail_in--,t.total_in++,o.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,o.mode=4;case 4:if(0===t.avail_in)return a;a=r,t.avail_in--,t.total_in++,o.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,o.mode=5;case 5:return 0===t.avail_in?a:(a=r,t.avail_in--,t.total_in++,o.need+=255&t.read_byte(t.next_in_index++),o.mode=6,2);case 6:return o.mode=p,t.msg="need dictionary",o.marker=0,e;case 7:if(a=o.blocks.proc(t,a),a==n){o.mode=p,o.marker=0;break}if(0==a&&(a=r),1!=a)return a;a=r,o.blocks.reset(t,o.was),o.mode=12;case 12:return 1;case p:return n;default:return e}},t.inflateSetDictionary=function(t,n,i){let r=0,a=i;if(!t||!t.istate||6!=t.istate.mode)return e;const s=t.istate;return a>=1<{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class O extends T{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(),P(this.url)&&!this.preventHeadRequest){const t=await M(F,this.url,this.options);if(this.size=Number(t.headers.get(R)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(E)!=D)throw new Error(A);void 0===this.size&&await L(this,this.options)}else await L(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await M(S,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(A);return new Uint8Array(await n.arrayBuffer())}return this.data||await L(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function L(t,e){const n=await M(S,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function M(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(v+(r.statusText||r.status))}class W extends T{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),P(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>V(F,this.url,(n=>{this.size=Number(n.getResponseHeader(R)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(E)==D?t():e(new Error(A)):void 0===this.size?H(this,this.url).then((()=>t())).catch(e):t()}),e)));await H(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await H(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>V(S,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(A)}}function H(t,e){return new Promise(((n,i)=>V(S,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function V(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(v+(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 N extends T{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new W(t,e):this.reader=new O(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 P(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 j=4294967295,B=33639248,q=101075792,K="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Z=[];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;Z[t]=e}class G{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^Z[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const X="Invalid pasword",Y=16,J="raw",Q={name:"PBKDF2"},$={name:"HMAC"},tt="SHA-1",et={name:"AES-CTR"},nt=Object.assign({hash:$},Q),it=Object.assign({iterations:1e3,hash:{name:tt}},Q),rt=Object.assign({hash:tt},$),at=Object.assign({length:Y},et),st=["deriveBits"],ot=["sign"],dt=[8,12,16],lt=[16,24,32],ct=10,ut=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ht=crypto.subtle;class ft{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+Y<=i.length-ct){const t=i.subarray(r,r+Y),a=await ht.decrypt(Object.assign({counter:this.counter},at),this.keys.key,t);return pt(this.counter),n.set(new Uint8Array(a),r),e(r+Y)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=yt(this.input,t)),n};if(this.password){const e=t.subarray(0,dt[this.strength]+2);await async function(t,e,n){await _t(t,n,e.subarray(0,dt[t.strength]),["decrypt"]);const i=e.subarray(dt[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(X)}(this,e,this.password),this.password=null,t=t.subarray(dt[this.strength]+2)}let n=new Uint8Array(t.length-ct-(t.length-ct)%Y),i=t;return this.pendingInput.length&&(i=yt(this.pendingInput,t),n=bt(n,i.length-ct-(i.length-ct)%Y)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-ct),i=t.subarray(t.length-ct);let r=new Uint8Array(0);if(n.length){const t=await ht.decrypt(Object.assign({counter:this.counter},at),e.key,n);r=new Uint8Array(t)}let a=!0;if(this.signed){const t=await ht.sign($,e.authentication,this.input.subarray(0,this.input.length-ct)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(r+Y<=t.length){const a=t.subarray(r,r+Y),s=await ht.encrypt(Object.assign({counter:this.counter},at),this.keys.key,a);return pt(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+Y)}return this.pendingInput=t.subarray(r),this.output=yt(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(dt[t.strength]));return await _t(t,e,n,["encrypt"]),yt(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%Y);return i.set(n,0),this.pendingInput.length&&(t=yt(this.pendingInput,t),i=bt(i,t.length-t.length%Y)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await ht.encrypt(Object.assign({counter:this.counter},at),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=yt(this.output,t)}const e=await ht.sign($,this.keys.authentication,this.output.subarray(dt[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,ct);return{data:yt(t,n),signature:n}}}async function _t(t,e,n,i){t.counter=new Uint8Array(ut);const r=(new TextEncoder).encode(e),a=await ht.importKey(J,r,nt,!1,st),s=await ht.deriveBits(Object.assign({salt:n},it),a,8*(2*lt[t.strength]+2)),o=new Uint8Array(s);t.keys={key:await ht.importKey(J,o.subarray(0,lt[t.strength]),et,!0,i),authentication:await ht.importKey(J,o.subarray(lt[t.strength],2*lt[t.strength]),rt,!1,ot),passwordVerification:o.subarray(2*lt[t.strength])}}function pt(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function yt(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 bt(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const gt=12;class xt{constructor(t,e){this.password=t,this.passwordVerification=e,At(this,t)}async append(t){if(this.password){const e=kt(this,t.subarray(0,gt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(X);t=t.subarray(gt)}return kt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class mt{constructor(t,e){this.passwordVerification=e,this.password=t,At(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(gt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(vt(this,i),0),n=gt}else e=new Uint8Array(t.length),n=0;return e.set(vt(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function kt(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function Rt(t){const e=2|t.keys[2];return Et(Math.imul(e,1^e)>>>8)}function Et(t){return 255&t}function Ft(t){return 4294967295&t}const St="inflate",Dt="Invalid signature";class zt{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new G,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new xt(e.password,e.passwordVerification):new ft(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(Dt);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(Dt)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Tt{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new G,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new mt(e.password,e.passwordVerification):new wt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Ct="init",It="append",Ot="flush",Lt="message";var Mt=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-inflate.min.js",document.baseURI).href)),t.worker.addEventListener(Lt,r,!1),t.interface={append:t=>n({type:It,data:t}),flush:()=>n({type:Ot})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:Ct,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==Ct||r==Ot||r==It){const n=i.data;r==Ot?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith("deflate")?new Tt(t,e):e.codecType.startsWith(St)?new zt(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Wt=[],Ht=[];function Vt(t){const e=!Ht.length;if(e)Wt=Wt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Ht.splice(0,1);e(Mt(t,n,i,Vt,r,a))}return e}async function Nt(t,e){return e.length&&await t.writeUint8Array(e),e.length}const Pt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class jt{constructor(t){Pt.forEach((e=>this[e]=t[e]))}}const Bt="File format is not recognized",qt="End of central directory not found",Kt="End of Zip64 central directory not found",Zt="End of Zip64 central directory locator not found",Gt="Central directory header not found",Xt="Local file header not found",Yt="Zip64 extra field not found",Jt="File contains encrypted entry",Qt="Encryption method not supported",$t="Compression method not supported",te="utf-8",ee=["uncompressedSize","compressedSize","offset"];class ne{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=se(this,e,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error($t);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error($t);if(67324752!=ce(r,0))throw new Error(Xt);const s=this.localDirectory={};ie(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),re(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,d=this.bitFlag.encrypted&&s.bitFlag.encrypted,l=d&&!this.extraFieldAES;if(d){if(!l&&void 0===this.extraFieldAES.strength)throw new Error(Qt);if(!a)throw new Error(Jt)}const c=await function(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(Wt.length!t.busy));return n?Mt(n,t,e,Vt,i,r):new Promise((n=>Ht.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}(this.config.Inflate,{codecType:St,password:a,zipCrypto:l,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:se(this,e,"checkSignature"),passwordVerification:l&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:d,useWebWorkers:se(this,e,"useWebWorkers")},this.config);return t.initialized||await t.init(),await async function(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(d=0,l=0){if(d>1,dataDescriptor:8==(8&i),languageEncodingFlag:2048==(2048&i)},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=ce(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>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){}}(t.rawLastModDate),t.filenameLength=le(e,n+22),t.extraFieldLength=le(e,n+24)}function re(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==j));for(let e=0;e{if(e[n]==j){if(!t||void 0===t[n])throw new Error(Yt);e[n]=t[n]}}))}(l,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&ae(c,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&ae(u,"comment","rawComment",e,t);const h=e.extraFieldAES=a.get(39169);h?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=de(i,0),t.vendorId=de(i,2);const r=de(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=le(i,5)}else e.compressionMethod=n}(h,e,d):e.compressionMethod=d,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function ae(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=de(a,0),t.signature=ce(a,1);const s=new G;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==ce(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function se(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function oe(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n0&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d=new Uint8Array(u),s.forEach((function(t){d.set(t,c),c+=t.length})),d}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=I,t.BlobWriter=class extends C{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}},t.Data64URIReader=class extends T{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_BAD_FORMAT=Bt,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Gt,t.ERR_ENCRYPTED=Jt,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Zt,t.ERR_EOCDR_NOT_FOUND=qt,t.ERR_EOCDR_ZIP64_NOT_FOUND=Kt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Yt,t.ERR_HTTP_RANGE=A,t.ERR_INVALID_PASSWORD=X,t.ERR_INVALID_SIGNATURE=Dt,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Xt,t.ERR_UNSUPPORTED_COMPRESSION=$t,t.ERR_UNSUPPORTED_ENCRYPTION=Qt,t.HttpRangeReader=class extends N{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=N,t.Reader=T,t.TextReader=class extends T{constructor(t){super(),this.blobReader=new I(new Blob([t],{type:U}))}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 C{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:U})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:U})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends T{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 C{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=C,t.ZipReader=class{constructor(t,e={}){this.reader=t,this.options=e,this.config=m}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Bt);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,101010256,22,1048560);if(!n)throw new Error(qt);const i=new DataView(n.buffer);let r=ce(i,12),a=ce(i,16),s=le(i,8),o=0;if(a==j||r==j||65535==s){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(117853008!=ce(i,0))throw new Error(Kt);a=ue(i,8);let d=await e.readUint8Array(a,56),l=new DataView(d.buffer);const c=n.offset-20-56;if(ce(l,0)!=q&&a!=c){const t=a;a=c,o=a-t,d=await e.readUint8Array(a,56),l=new DataView(d.buffer)}if(ce(l,0)!=q)throw new Error(Zt);s=ue(l,24),r=ue(i,4),a-=ue(l,40)}if(a<0||a>=e.size)throw new Error(Bt);let d=0,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer);const u=n.offset-r;if(ce(c,d)!=B&&a!=u){const t=a;a=u,o=a-t,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer)}if(a<0||a>=e.size)throw new Error(Bt);const h=[];for(let e=0;ee.getData(t,n),h.push(r),d+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return h}async close(){}},t.configure=k,t.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/zip-no-worker.min.js b/dist/zip-no-worker.min.js index 320498d7..6d598e86 100644 --- a/dist/zip-no-worker.min.js +++ b/dist/zip-no-worker.min.js @@ -1 +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=256,n=256,i=-2,r=-5;function a(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const s=[0,1,2,3].concat(...a([[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 o(){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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,c,u,f,h=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,h++),n[2*l+1]=c,l>t.max_code||(e.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],e.opt_len+=f*(c+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==h){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,h-=2}while(h>0);for(c=s;0!==c;c--)for(l=e.bl_count[c];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=c&&(e.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function l(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[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]])),o.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],o.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],o.d_code=function(t){return t<256?s[t]:s[256+(t>>>7)]},o.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],o.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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.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,o.extra_lbits,257,286,15),l.static_d_desc=new l(l.static_dtree,o.extra_dbits,0,30,15),l.static_bl_desc=new l(null,o.extra_blbits,0,19,7);function d(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new d(0,0,0,0,0),new d(4,4,8,4,1),new d(4,5,16,8,1),new d(4,6,32,32,1),new d(4,4,16,16,2),new d(8,16,32,32,2),new d(8,16,128,128,2),new d(8,32,128,256,2),new d(32,128,258,1024,2),new d(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],f=113,h=666,_=258,w=262;function p(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function lt(t,e){let n;const i=e;it>16-i?(n=t,nt|=n<>>16-it,it+=i-16):(nt|=t<=8&&(st(255&nt),nt>>>=8,it-=8)}function ft(n,i){let r,a,s;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[G+Q]=255&i,Q++,0===n?j[2*i]++:(tt++,n--,j[2*(o._length_code[i]+e+1)]++,q[2*o.d_code(n)]++),0==(8191&Q)&&N>2){for(r=8*Q,a=C-z,s=0;s<30;s++)r+=q[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,tt8?ot(nt):it>0&&st(255&nt),nt=0,it=0}function wt(e,n,i){lt(0+(i?1:0),3),function(e,n,i){_t(),et=8,i&&(ot(n),ot(~n)),t.pending_buf.set(m.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function pt(e,n,i){let r,a,s=0;N>0?(K.build_tree(t),Y.build_tree(t),s=function(){let e;for(at(j,K.max_code),at(q,Y.max_code),X.build_tree(t),e=18;e>=3&&0===Z[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?wt(e,n,i):a==r?(lt(2+(i?1:0),3),ht(l.static_ltree,l.static_dtree)):(lt(4+(i?1:0),3),function(t,e,n){let i;for(lt(t-257,5),lt(e-1,5),lt(n-4,4),i=0;i=0?z:-1,C-z,t),z=C,a.flush_pending()}function yt(){let t,e,n,i;do{if(i=k-W-C,0===i&&0===C&&0===W)i=y;else if(-1==i)i--;else if(C>=y+y-w){m.set(m.subarray(y,y+y),0),M-=y,C-=y,z-=y,t=U,n=t;do{e=65535&A[--n],A[n]=e>=y?e-y:0}while(0!=--t);t=y,n=t;do{e=65535&v[--n],v[n]=e>=y?e-y:0}while(0!=--t);i+=y}if(0===a.avail_in)return;t=a.read_buf(m,C+W,i),W+=t,W>=3&&(E=255&m[C],E=(E<y-w?C-(y-w):0;let o=H;const l=x,d=C+_;let c=m[r+a-1],u=m[r+a];L>=P&&(i>>=2),o>W&&(o=W);do{if(e=t,m[e+a]==u&&m[e+a-1]==c&&m[e]==m[r]&&m[++e]==m[r+1]){r+=2,e++;do{}while(m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&ra){if(M=t,a=n,n>=o)break;c=m[r+a-1],u=m[r+a]}}}while((t=65535&v[t&l])>s&&0!=--i);return a<=W?a:W}function xt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,s=f,g=0,K.dyn_tree=j,K.stat_desc=l.static_l_desc,Y.dyn_tree=q,Y.stat_desc=l.static_d_desc,X.dyn_tree=Z,X.stat_desc=l.static_bl_desc,nt=0,it=0,et=8,rt(),function(){k=2*y,A[U-1]=0;for(let t=0;t9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(e.dstate=t,b=r,y=1<9||n<0||n>2?i:(c[N].func!=c[e].func&&0!==t.total_in&&(r=t.deflate(1)),N!=e&&(N=e,V=c[N].max_lazy,P=c[N].good_length,H=c[N].nice_length,O=c[N].max_chain),B=n,r)},t.deflateSetDictionary=function(t,e,n){let r,a=n,o=0;if(!e||42!=s)return i;if(a<3)return 0;for(a>y-w&&(a=y-w,o=n-a),m.set(e.subarray(o,o+a),0),C=a,z=a,E=255&m[0],E=(E<4||o<0)return i;if(!e.next_out||!e.next_in&&0!==e.avail_in||s==h&&4!=o)return e.msg=u[4],i;if(0===e.avail_out)return e.msg=u[7],r;var P;if(a=e,R=g,g=o,42==s&&(p=8+(b-8<<4)<<8,k=(N-1&255)>>1,k>3&&(k=3),p|=k<<6,0!==C&&(p|=32),p+=31-p%31,s=f,st((P=p)>>8&255),st(255&P)),0!==t.pending){if(a.flush_pending(),0===a.avail_out)return g=-1,0}else if(0===a.avail_in&&o<=R&&4!=o)return a.msg=u[7],r;if(s==h&&0!==a.avail_in)return e.msg=u[7],r;if(0!==a.avail_in||0!==W||0!=o&&s!=h){switch(O=-1,c[N].func){case 0:O=function(t){let e,n=65535;for(n>d-5&&(n=d-5);;){if(W<=1){if(yt(),0===W&&0==t)return 0;if(0===W)break}if(C+=W,W=0,e=z+n,(0===C||C>=e)&&(W=C-e,C=e,gt(!1),0===a.avail_out))return 0;if(C-z>=y-w&&(gt(!1),0===a.avail_out))return 0}return gt(4==t),0===a.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:O=function(t){let e,n=0;for(;;){if(W=3&&(E=(E<=3)if(e=ft(C-M,S-3),W-=S,S<=V&&W>=3){S--;do{C++,E=(E<=3&&(E=(E<4096)&&(S=2)),L>=3&&S<=L){n=C+W-3,e=ft(C-1-I,L-3),W-=L-1,L-=2;do{++C<=n&&(E=(E<n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 b=-2,x=-3,m=-5,k=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],v=[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],A=[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],E=[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],U=[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],R=[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],D=[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],F=15;function z(){let t,e,n,i,r,a;function s(t,e,s,o,l,d,c,u,f,h,_){let w,p,g,y,b,k,v,A,E,U,R,D,z,S,I;U=0,b=s;do{n[t[e+U]]++,U++,b--}while(0!==b);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(A=u[0],k=1;k<=F&&0===n[k];k++);for(v=k,Ab&&(A=b),u[0]=A,S=1<D+A;){if(y++,D+=A,I=g-D,I=I>A?A:I,(p=1<<(k=v-D))>w+1&&(p-=w+1,z=v,k1440)return x;r[y]=R=h[0],h[0]+=I,0!==y?(a[y]=b,i[0]=k,i[1]=A,k=b>>>D-A,i[2]=R-r[y-1]-k,f.set(i,3*(r[y-1]+k))):c[0]=R}for(i[1]=v-D,U>=s?i[0]=192:_[U]>>D;k>>=1)b^=k;for(b^=k,E=(1<257?(h==x?f.msg="oversubscribed distance tree":h==m?(f.msg="incomplete distance tree",h=x):-4!=h&&(f.msg="empty distance tree with lengths",h=x),h):0)}}z.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=v,i[0]=A,0};function S(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,h=0,_=0;function w(t,e,n,i,r,a,s,o){let l,d,c,u,f,h,_,w,p,g,y,b,m,v,A,E;_=o.next_in_index,w=o.avail_in,f=s.bitb,h=s.bitk,p=s.write,g=p>=d[E+1],h-=d[E+1],0!=(16&u)){for(u&=15,m=d[E+2]+(f&k[u]),f>>=u,h-=u;h<15;)w--,f|=(255&o.read_byte(_++))<>=d[E+1],h-=d[E+1],0!=(16&u)){for(u&=15;h>=u,h-=u,g-=m,p>=v)A=p-v,p-A>0&&2>p-A?(s.window[p++]=s.window[A++],s.window[p++]=s.window[A++],m-=2):(s.window.set(s.window.subarray(A,A+2),p),p+=2,A+=2,m-=2);else{A=p-v;do{A+=s.end}while(A<0);if(u=s.end-A,m>u){if(m-=u,p-A>0&&u>p-A)do{s.window[p++]=s.window[A++]}while(0!=--u);else s.window.set(s.window.subarray(A,A+u),p),p+=u,A+=u,u=0;A=0}}if(p-A>0&&m>p-A)do{s.window[p++]=s.window[A++]}while(0!=--m);else s.window.set(s.window.subarray(A,A+m),p),p+=m,A+=m,m=0;break}if(0!=(64&u))return o.msg="invalid distance code",m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,x;l+=d[E+2],l+=f&k[u],E=3*(c+l),u=d[E]}break}if(0!=(64&u))return 0!=(32&u)?(m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,1):(o.msg="invalid literal/length code",m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,x);if(l+=d[E+2],l+=f&k[u],E=3*(c+l),0===(u=d[E])){f>>=d[E+1],h-=d[E+1],s.window[p++]=d[E+2],g--;break}}else f>>=d[E+1],h-=d[E+1],s.window[p++]=d[E+2],g--}while(g>=258&&w>=10);return m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,0}t.init=function(t,a,s,o,l,d){e=0,u=t,f=a,i=s,h=o,r=l,_=d,n=null},t.proc=function(t,p,g){let y,m,v,A,E,U,R,D=0,F=0,z=0;for(z=p.next_in_index,A=p.avail_in,D=t.bitb,F=t.bitk,E=t.write,U=E=258&&A>=10&&(t.bitb=D,t.bitk=F,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=E,g=w(u,f,i,h,r,_,t,p),z=p.next_in_index,A=p.avail_in,D=t.bitb,F=t.bitk,E=t.write,U=E>>=n[m+1],F-=n[m+1],v=n[m],0===v){l=n[m+2],e=6;break}if(0!=(16&v)){d=15&v,a=n[m+2],e=2;break}if(0==(64&v)){o=v,s=m/3+n[m+2];break}if(0!=(32&v)){e=7;break}return e=9,p.msg="invalid literal/length code",g=x,t.bitb=D,t.bitk=F,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=E,t.inflate_flush(p,g);case 2:for(y=d;F>=y,F-=y,o=f,n=r,s=_,e=3;case 3:for(y=o;F>=n[m+1],F-=n[m+1],v=n[m],0!=(16&v)){d=15&v,c=n[m+2],e=4;break}if(0==(64&v)){o=v,s=m/3+n[m+2];break}return e=9,p.msg="invalid distance code",g=x,t.bitb=D,t.bitk=F,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=E,t.inflate_flush(p,g);case 4:for(y=d;F>=y,F-=y,e=5;case 5:for(R=E-c;R<0;)R+=t.end;for(;0!==a;){if(0===U&&(E==t.end&&0!==t.read&&(E=0,U=E7&&(F-=8,A++,z--),t.write=E,g=t.inflate_flush(p,g),E=t.write,U=Et.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let _,w,p,g,y,m,v,A;for(g=t.next_in_index,y=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,v=m>>1){case 0:w>>>=3,p-=3,_=7&p,w>>>=_,p-=_,r=1;break;case 1:E=[],U=[],R=[[]],D=[[]],z.inflate_trees_fixed(E,U,R,D),c.init(E[0],U[0],R[0],0,D[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,t.msg="invalid block type",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(g++))<>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);if(0===v&&(m==n.end&&0!==n.read&&(m=0,v=my&&(_=y),_>v&&(_=v),n.window.set(t.read_buf(g,_),m),g+=_,y-=_,m+=_,v-=_,0!=(a-=_))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(g++))<29||(_>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);if(_=258+(31&_)+(_>>5&31),!i||i.length<_)i=[];else for(A=0;A<_;A++)i[A]=0;w>>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(g++))<>>=3,p-=3}for(;o<19;)i[I[o++]]=0;if(l[0]=7,_=h.inflate_trees_bits(i,l,d,f,t),0!=_)return(e=_)==x&&(i=null,r=9),n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);o=0,r=5;case 5:for(;_=s,!(o>=258+(31&_)+(_>>5&31));){let a,c;for(_=l[0];p<_;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(g++))<>>=_,p-=_,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;p<_+A;){if(0===y)return n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(g++))<>>=_,p-=_,a+=w&k[A],w>>>=A,p-=A,A=o,_=s,A+a>258+(31&_)+(_>>5&31)||16==c&&A<1)return i=null,r=9,t.msg="invalid bit length repeat",e=x,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(d[0]=-1,F=[],S=[],T=[],C=[],F[0]=9,S[0]=6,_=s,_=h.inflate_trees_dynamic(257+(31&_),1+(_>>5&31),i,F,S,T,C,f,t),0!=_)return _==x&&(i=null,r=9),e=_,n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);c.init(F[0],S[0],f,T[0],f,C[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),g=t.next_in_index,y=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,v=m15?(t.inflateEnd(n),b):(t.wbits=i,n.istate.blocks=new T(n,1<>4)>r.wbits){r.mode=C,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=C,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=C,t.msg="need dictionary",r.marker=0,b;case 7:if(n=r.blocks.proc(t,n),n==x){r.mode=C,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case C:return x;default:return b}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return b;const a=t.istate;return r>=1<{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)};if(this.codec=new t(Object.assign({},e,n)),typeof this.codec.onData==P)this.codec.onData=i;else{if(typeof this.codec.on!=P)throw new Error("Cannot register the callback function");this.codec.on("data",i)}}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const j="HTTP error ",q="HTTP Range not supported",Z="text/plain",K="Content-Length",Y="Accept-Ranges",X="HEAD",G="GET",J="bytes";class Q{constructor(){this.size=0}init(){this.initialized=!0}}class $ extends Q{}class tt extends Q{writeUint8Array(t){this.size+=t.length}}class et extends ${constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class nt extends ${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(),ct(this.url)&&!this.preventHeadRequest){const t=await rt(X,this.url,this.options);if(this.size=Number(t.headers.get(K)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(Y)!=J)throw new Error(q);void 0===this.size&&await it(this,this.options)}else await it(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await rt(G,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(q);return new Uint8Array(await n.arrayBuffer())}return this.data||await it(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function it(t,e){const n=await rt(G,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function rt(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(j+(r.statusText||r.status))}class at extends ${constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),ct(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>ot(X,this.url,(n=>{this.size=Number(n.getResponseHeader(K)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(Y)==J?t():e(new Error(q)):void 0===this.size?st(this,this.url).then((()=>t())).catch(e):t()}),e)));await st(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await st(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>ot(G,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(q)}}function st(t,e){return new Promise(((n,i)=>ot(G,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function ot(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(j+(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 lt extends ${constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new at(t,e):this.reader=new nt(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)}}class dt extends tt{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}}function ct(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 ut=4294967295,ft=65535,ht=67324752,_t=134695760,wt=33639248,pt=101010256,gt=101075792,yt=117853008,bt=39169,xt=2048,mt="/",kt=new Date(2107,11,31),vt=new Date(1980,0,1),At="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Et=[];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;Et[t]=e}class Ut{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^Et[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Rt="Invalid pasword",Dt=16,Ft="raw",zt={name:"PBKDF2"},St={name:"HMAC"},It="SHA-1",Tt={name:"AES-CTR"},Ct=Object.assign({hash:St},zt),Mt=Object.assign({iterations:1e3,hash:{name:It}},zt),Wt=Object.assign({hash:It},St),Lt=Object.assign({length:Dt},Tt),Ot=["deriveBits"],Vt=["sign"],Nt=[8,12,16],Bt=[16,24,32],Pt=10,Ht=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],jt=crypto.subtle;class qt{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+Dt<=i.length-Pt){const t=i.subarray(r,r+Dt),a=await jt.decrypt(Object.assign({counter:this.counter},Lt),this.keys.key,t);return Yt(this.counter),n.set(new Uint8Array(a),r),e(r+Dt)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=Xt(this.input,t)),n};if(this.password){const e=t.subarray(0,Nt[this.strength]+2);await async function(t,e,n){await Kt(t,n,e.subarray(0,Nt[t.strength]),["decrypt"]);const i=e.subarray(Nt[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(Rt)}(this,e,this.password),this.password=null,t=t.subarray(Nt[this.strength]+2)}let n=new Uint8Array(t.length-Pt-(t.length-Pt)%Dt),i=t;return this.pendingInput.length&&(i=Xt(this.pendingInput,t),n=Gt(n,i.length-Pt-(i.length-Pt)%Dt)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-Pt),i=t.subarray(t.length-Pt);let r=new Uint8Array(0);if(n.length){const t=await jt.decrypt(Object.assign({counter:this.counter},Lt),e.key,n);r=new Uint8Array(t)}let a=!0;if(this.signed){const t=await jt.sign(St,e.authentication,this.input.subarray(0,this.input.length-Pt)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(r+Dt<=t.length){const a=t.subarray(r,r+Dt),s=await jt.encrypt(Object.assign({counter:this.counter},Lt),this.keys.key,a);return Yt(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+Dt)}return this.pendingInput=t.subarray(r),this.output=Xt(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(Nt[t.strength]));return await Kt(t,e,n,["encrypt"]),Xt(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%Dt);return i.set(n,0),this.pendingInput.length&&(t=Xt(this.pendingInput,t),i=Gt(i,t.length-t.length%Dt)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await jt.encrypt(Object.assign({counter:this.counter},Lt),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=Xt(this.output,t)}const e=await jt.sign(St,this.keys.authentication,this.output.subarray(Nt[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,Pt);return{data:Xt(t,n),signature:n}}}async function Kt(t,e,n,i){t.counter=new Uint8Array(Ht);const r=(new TextEncoder).encode(e),a=await jt.importKey(Ft,r,Ct,!1,Ot),s=await jt.deriveBits(Object.assign({salt:n},Mt),a,8*(2*Bt[t.strength]+2)),o=new Uint8Array(s);t.keys={key:await jt.importKey(Ft,o.subarray(0,Bt[t.strength]),Tt,!0,i),authentication:await jt.importKey(Ft,o.subarray(Bt[t.strength],2*Bt[t.strength]),Wt,!1,Vt),passwordVerification:o.subarray(2*Bt[t.strength])}}function Yt(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function Xt(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 Gt(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const Jt=12;class Qt{constructor(t,e){this.password=t,this.passwordVerification=e,ne(this,t)}async append(t){if(this.password){const e=te(this,t.subarray(0,Jt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(Rt);t=t.subarray(Jt)}return te(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class $t{constructor(t,e){this.passwordVerification=e,this.password=t,ne(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(Jt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(ee(this,i),0),n=Jt}else e=new Uint8Array(t.length),n=0;return e.set(ee(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function te(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function re(t){const e=2|t.keys[2];return ae(Math.imul(e,1^e)>>>8)}function ae(t){return 255&t}function se(t){return 4294967295&t}const oe="deflate",le="inflate",de="Invalid signature";class ce{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Ut,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new Qt(e.password,e.passwordVerification):new qt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(de);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(de)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class ue{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Ut,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new $t(e.password,e.passwordVerification):new Zt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const fe="init",he="append",_e="flush",we="message";var pe=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker.min.js",document.baseURI).href)),t.worker.addEventListener(we,r,!1),t.interface={append:t=>n({type:he,data:t}),flush:()=>n({type:_e})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:fe,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==fe||r==_e||r==he){const n=i.data;r==_e?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(oe)?new ue(t,e):e.codecType.startsWith(le)?new ce(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let ge=[],ye=[];function be(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(ge.length!t.busy));return n?pe(n,t,e,xe,i,r):new Promise((n=>ye.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function xe(t){const e=!ye.length;if(e)ge=ge.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=ye.splice(0,1);e(pe(t,n,i,xe,r,a))}return e}async function me(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(l=0,d=0){if(lthis[e]=t[e]))}}const Ee="File format is not recognized",Ue="End of central directory not found",Re="End of Zip64 central directory not found",De="End of Zip64 central directory locator not found",Fe="Central directory header not found",ze="Local file header not found",Se="Zip64 extra field not found",Ie="File contains encrypted entry",Te="Encryption method not supported",Ce="Compression method not supported",Me="utf-8",We=["uncompressedSize","compressedSize","offset"];class Le{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=Be(this,e,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error(Ce);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error(Ce);if(qe(r,0)!=ht)throw new Error(ze);const s=this.localDirectory={};Oe(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),Ve(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,l=this.bitFlag.encrypted&&s.bitFlag.encrypted,d=l&&!this.extraFieldAES;if(l){if(!d&&void 0===this.extraFieldAES.strength)throw new Error(Te);if(!a)throw new Error(Ie)}const c=await be(this.config.Inflate,{codecType:le,password:a,zipCrypto:d,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:Be(this,e,"checkSignature"),passwordVerification:d&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:l,useWebWorkers:Be(this,e,"useWebWorkers")},this.config);return t.initialized||await t.init(),await me(c,n,t,o,this.compressedSize,this.config,{onprogress:e.onprogress}),t.getData()}}function Oe(t,e,n){t.version=je(e,n);const i=t.rawBitFlag=je(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&xt)==xt},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=qe(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>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){}}(t.rawLastModDate),t.filenameLength=je(e,n+22),t.extraFieldLength=je(e,n+24)}function Ve(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==ut));for(let e=0;e{if(e[n]==ut){if(!t||void 0===t[n])throw new Error(Se);e[n]=t[n]}}))}(d,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Ne(c,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&Ne(u,"comment","rawComment",e,t);const f=e.extraFieldAES=a.get(39169);f?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=He(i,0),t.vendorId=He(i,2);const r=He(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=je(i,5)}else e.compressionMethod=n}(f,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Ne(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=He(a,0),t.signature=qe(a,1);const s=new Ut;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==qe(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Be(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Pe(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),c.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}},Inflate:function(){const t=new L,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,r){const a=[];let s,o,l=0,d=0,c=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===m){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?a.push(new Uint8Array(e)):a.push(new Uint8Array(e.subarray(0,t.next_out_index)))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=et,t.BlobWriter=class extends tt{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}},t.Data64URIReader=class extends ${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_BAD_FORMAT=Ee,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Fe,t.ERR_DUPLICATED_NAME=Ke,t.ERR_ENCRYPTED=Ie,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=De,t.ERR_EOCDR_NOT_FOUND=Ue,t.ERR_EOCDR_ZIP64_NOT_FOUND=Re,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Se,t.ERR_HTTP_RANGE=q,t.ERR_INVALID_COMMENT=Ye,t.ERR_INVALID_DATE=Qe,t.ERR_INVALID_ENCRYPTION_STRENGTH=$e,t.ERR_INVALID_ENTRY_COMMENT=Xe,t.ERR_INVALID_ENTRY_NAME=Ge,t.ERR_INVALID_EXTRAFIELD_DATA=en,t.ERR_INVALID_EXTRAFIELD_TYPE=tn,t.ERR_INVALID_PASSWORD=Rt,t.ERR_INVALID_SIGNATURE=de,t.ERR_INVALID_VERSION=Je,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=ze,t.ERR_UNSUPPORTED_COMPRESSION=Ce,t.ERR_UNSUPPORTED_ENCRYPTION=Te,t.HttpRangeReader=class extends lt{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=lt,t.Reader=$,t.TextReader=class extends ${constructor(t){super(),this.blobReader=new et(new Blob([t],{type:Z}))}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 tt{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:Z})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:Z})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends ${constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=dt,t.Writer=tt,t.ZipReader=class extends class{constructor(t,e={},n={}){this.reader=t,this.options=e,this.config=n}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Ee);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,pt,22,1048560);if(!n)throw new Error(Ue);const i=new DataView(n.buffer);let r=qe(i,12),a=qe(i,16),s=je(i,8),o=0;if(a==ut||r==ut||s==ft){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(qe(i,0)!=yt)throw new Error(Re);a=Ze(i,8);let l=await e.readUint8Array(a,56),d=new DataView(l.buffer);const c=n.offset-20-56;if(qe(d,0)!=gt&&a!=c){const t=a;a=c,o=a-t,l=await e.readUint8Array(a,56),d=new DataView(l.buffer)}if(qe(d,0)!=gt)throw new Error(De);s=Ze(d,24),r=Ze(i,4),a-=Ze(d,40)}if(a<0||a>=e.size)throw new Error(Ee);let l=0,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer);const u=n.offset-r;if(qe(c,l)!=wt&&a!=u){const t=a;a=u,o=a-t,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer)}if(a<0||a>=e.size)throw new Error(Ee);const f=[];for(let e=0;ee.getData(t,n),f.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return f}async close(){}}{constructor(t,e){super(t,e,N())}},t.ZipWriter=class extends class{constructor(t,e={},n={}){this.writer=t,this.options=e,this.config=n,this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(mt)?t+=mt:n.directory=t.endsWith(mt),this.files.has(t))throw new Error(Ke);const i=(new TextEncoder).encode(t);if(i.length>ft)throw new Error(Ge);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>ft)throw new Error(Xe);const s=this.options.version||n.version||0;if(s>ft)throw new Error(Je);const o=n.lastModDate||new Date;if(okt)throw new Error(Qe);const l=rn(this,n,"password"),d=rn(this,n,"encryptionStrength")||3,c=rn(this,n,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error($e);e&&!e.initialized&&await e.init();let u=new Uint8Array(0);const f=n.extraField;if(f){let t=0,e=0;f.forEach((e=>t+=4+e.length)),u=new Uint8Array(t),f.forEach(((t,n)=>{if(n>ft)throw new Error(tn);if(t.length>ft)throw new Error(en);u.set(new Uint16Array([n]),e),u.set(new Uint16Array([t.length]),e+2),u.set(t,e+4),e+=4+t.length}))}const h=e?1.05*e.size:0,_=n.zip64||this.options.zip64||this.offset>=ut||h>=ut||this.offset+h>=ut,w=rn(this,n,"level"),p=rn(this,n,"useWebWorkers"),g=rn(this,n,"bufferedWrite"),y=rn(this,n,"keepOrder"),b=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,l;r.set(e,null);try{let d,c;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>l=t))),i.bufferedWrite||t.lockWrite?(d=new dt,await d.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),d=a),c=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),l=i.level,d=0!==l&&!i.directory,c=i.zip64;let u,f;if(o&&!i.zipCrypto){u=new Uint8Array(nn.length+2);const t=new DataView(u.buffer);sn(t,0,bt),u.set(nn,2),f=i.encryptionStrength,an(t,8,f)}else u=new Uint8Array(0);const h={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let _=2056,w=0;d&&(w=8);c&&(h.version=h.version>45?h.version:45);o&&(_|=1,i.zipCrypto||(h.version=h.version>51?h.version:51,w=99,d&&(h.rawExtraFieldAES[9]=8)));const p=h.headerArray=new Uint8Array(26),g=new DataView(p.buffer);sn(g,0,h.version),sn(g,2,_),sn(g,4,w);const y=new Uint32Array(1),b=new DataView(y.buffer);sn(b,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),sn(b,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=y[0];on(g,6,x),sn(g,22,r.length),sn(g,24,0);const m=new Uint8Array(30+r.length);let k;on(new DataView(m.buffer),0,ht),m.set(p,4),m.set(r,30);let v=0,A=0;if(t){v=t.size;const r=await be(n.Deflate,{codecType:oe,level:l,password:s,encryptionStrength:f,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:d,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),k=await me(r,t,e,0,v,n,{onprogress:i.onprogress}),A=k.length}else await e.writeUint8Array(m);const E=new Uint8Array(c?24:16),U=new DataView(E.buffer);if(on(U,0,_t),t)if(o&&!i.zipCrypto||void 0===k.signature||(on(g,10,k.signature),on(U,4,k.signature),h.signature=k.signature),c){const t=new DataView(h.rawExtraFieldZip64.buffer);sn(t,0,1),sn(t,2,24),on(g,14,ut),ln(U,8,BigInt(A)),ln(t,12,BigInt(A)),on(g,18,ut),ln(U,16,BigInt(v)),ln(t,4,BigInt(v))}else on(g,14,A),on(U,8,A),on(g,18,v),on(U,12,v);await e.writeUint8Array(E);const R=m.length+(k?k.length:0)+E.length;return Object.assign(h,{compressedSize:A,uncompressedSize:v,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),h}(n,d,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,c),d!=a&&(t.lockWrite&&await t.lockWrite,o&&await o,await a.writeUint8Array(d.getData())),c.offset=t.offset,c.zip64){ln(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return t.offset+=c.length,c}finally{l&&l(),s&&(t.lockWrite=null,s())}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:u,zip64:_,password:l,level:w,useWebWorkers:p,encryptionStrength:d,zipCrypto:c,bufferedWrite:g,keepOrder:y}));return Object.assign(b,{name:t,comment:r,extraField:f}),new Ae(b)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=ut||r>=ut||s>=ft,l=new Uint8Array(r+(o?98:22)),d=new DataView(l.buffer);if(t.length){if(!(t.length<=ft))throw new Error(Ye);sn(d,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;on(d,i,wt),sn(d,i+4,t.version),l.set(t.headerArray,i+6),sn(d,i+30,a),sn(d,i+32,t.rawComment.length),t.directory&&an(d,i+38,16),t.zip64?on(d,i+42,ut):on(d,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(on(d,i,gt),ln(d,i+4,BigInt(44)),sn(d,i+12,45),sn(d,i+14,45),ln(d,i+24,BigInt(s)),ln(d,i+32,BigInt(s)),ln(d,i+40,BigInt(r)),ln(d,i+48,BigInt(a)),on(d,i+56,yt),ln(d,i+64,BigInt(a)+BigInt(r)),on(d,i+72,1),s=ft,a=ut,r=ut,i+=76),on(d,i,pt),sn(d,i+8,s),sn(d,i+10,s),on(d,i+12,r),on(d,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}}{constructor(t,e){super(t,e,N())}},t.configure=B,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={})=>({Deflate:H(t.Deflate,e.deflate),Inflate:H(t.Inflate,e.inflate)}),Object.defineProperty(t,"__esModule",{value:!0})})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})}(this,(function(e){"use strict";const t=256,n=256,i=-2,r=-5;function a(e){return e.map((([e,t])=>new Array(e).fill(t,0,e))).flat()}const s=[0,1,2,3].concat(...a([[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 o(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=function(n){const i=e.dyn_tree,r=e.stat_desc.static_tree,a=e.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;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(t){const n=e.dyn_tree,i=e.stat_desc.static_tree,r=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,s=e.stat_desc.max_length;let o,l,d,c,u,f,h=0;for(c=0;c<=15;c++)t.bl_count[c]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;o<573;o++)l=t.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,h++),n[2*l+1]=c,l>e.max_code||(t.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],t.opt_len+=f*(c+u),i&&(t.static_len+=f*(i[2*l+1]+u)));if(0!==h){do{for(c=s-1;0===t.bl_count[c];)c--;t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[s]--,h-=2}while(h>0);for(c=s;0!==c;c--)for(l=t.bl_count[c];0!==l;)d=t.heap[--o],d>e.max_code||(n[2*d+1]!=c&&(t.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(e,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=e[2*s+1],0!==o&&(e[2*s]=t(r[o]++,o))}(i,e.max_code,n.bl_count)}}function l(e,t,n,i,r){const a=this;a.static_tree=e,a.extra_bits=t,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[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]])),o.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],o.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],o.d_code=function(e){return e<256?s[e]:s[256+(e>>>7)]},o.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],o.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],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.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,o.extra_lbits,257,286,15),l.static_d_desc=new l(l.static_dtree,o.extra_dbits,0,30,15),l.static_bl_desc=new l(null,o.extra_blbits,0,19,7);function d(e,t,n,i,r){const a=this;a.good_length=e,a.max_lazy=t,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new d(0,0,0,0,0),new d(4,4,8,4,1),new d(4,5,16,8,1),new d(4,6,32,32,1),new d(4,4,16,16,2),new d(8,16,32,32,2),new d(8,16,128,128,2),new d(8,32,128,256,2),new d(32,128,258,1024,2),new d(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],f=113,h=666,_=258,w=262;function p(e,t,n,i){const r=e[2*t],a=e[2*n];return r>>8&255)}function le(e,t){let n;const i=t;ie>16-i?(n=e,ne|=n<>>16-ie,ie+=i-16):(ne|=e<=8&&(se(255&ne),ne>>>=8,ie-=8)}function fe(n,i){let r,a,s;if(e.pending_buf[$+2*Q]=n>>>8&255,e.pending_buf[$+2*Q+1]=255&n,e.pending_buf[G+Q]=255&i,Q++,0===n?j[2*i]++:(ee++,n--,j[2*(o._length_code[i]+t+1)]++,q[2*o.d_code(n)]++),0==(8191&Q)&&N>2){for(r=8*Q,a=C-z,s=0;s<30;s++)r+=q[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,ee8?oe(ne):ie>0&&se(255&ne),ne=0,ie=0}function we(t,n,i){le(0+(i?1:0),3),function(t,n,i){_e(),te=8,i&&(oe(n),oe(~n)),e.pending_buf.set(m.subarray(t,t+n),e.pending),e.pending+=n}(t,n,!0)}function pe(t,n,i){let r,a,s=0;N>0?(K.build_tree(e),Y.build_tree(e),s=function(){let t;for(ae(j,K.max_code),ae(q,Y.max_code),X.build_tree(e),t=18;t>=3&&0===Z[2*o.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(),r=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=t?we(t,n,i):a==r?(le(2+(i?1:0),3),he(l.static_ltree,l.static_dtree)):(le(4+(i?1:0),3),function(e,t,n){let i;for(le(e-257,5),le(t-1,5),le(n-4,4),i=0;i=0?z:-1,C-z,e),z=C,a.flush_pending()}function ye(){let e,t,n,i;do{if(i=v-L-C,0===i&&0===C&&0===L)i=y;else if(-1==i)i--;else if(C>=y+y-w){m.set(m.subarray(y,y+y),0),M-=y,C-=y,z-=y,e=U,n=e;do{t=65535&A[--n],A[n]=t>=y?t-y:0}while(0!=--e);e=y,n=e;do{t=65535&k[--n],k[n]=t>=y?t-y:0}while(0!=--e);i+=y}if(0===a.avail_in)return;e=a.read_buf(m,C+L,i),L+=e,L>=3&&(E=255&m[C],E=(E<y-w?C-(y-w):0;let o=H;const l=x,d=C+_;let c=m[r+a-1],u=m[r+a];W>=P&&(i>>=2),o>L&&(o=L);do{if(t=e,m[t+a]==u&&m[t+a-1]==c&&m[t]==m[r]&&m[++t]==m[r+1]){r+=2,t++;do{}while(m[++r]==m[++t]&&m[++r]==m[++t]&&m[++r]==m[++t]&&m[++r]==m[++t]&&m[++r]==m[++t]&&m[++r]==m[++t]&&m[++r]==m[++t]&&m[++r]==m[++t]&&ra){if(M=e,a=n,n>=o)break;c=m[r+a-1],u=m[r+a]}}}while((e=65535&k[e&l])>s&&0!=--i);return a<=L?a:L}function xe(t){return t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,s=f,g=0,K.dyn_tree=j,K.stat_desc=l.static_l_desc,Y.dyn_tree=q,Y.stat_desc=l.static_d_desc,X.dyn_tree=Z,X.stat_desc=l.static_bl_desc,ne=0,ie=0,te=8,re(),function(){v=2*y,A[U-1]=0;for(let e=0;e9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(t.dstate=e,b=r,y=1<9||n<0||n>2?i:(c[N].func!=c[t].func&&0!==e.total_in&&(r=e.deflate(1)),N!=t&&(N=t,V=c[N].max_lazy,P=c[N].good_length,H=c[N].nice_length,O=c[N].max_chain),B=n,r)},e.deflateSetDictionary=function(e,t,n){let r,a=n,o=0;if(!t||42!=s)return i;if(a<3)return 0;for(a>y-w&&(a=y-w,o=n-a),m.set(t.subarray(o,o+a),0),C=a,z=a,E=255&m[0],E=(E<4||o<0)return i;if(!t.next_out||!t.next_in&&0!==t.avail_in||s==h&&4!=o)return t.msg=u[4],i;if(0===t.avail_out)return t.msg=u[7],r;var P;if(a=t,R=g,g=o,42==s&&(p=8+(b-8<<4)<<8,v=(N-1&255)>>1,v>3&&(v=3),p|=v<<6,0!==C&&(p|=32),p+=31-p%31,s=f,se((P=p)>>8&255),se(255&P)),0!==e.pending){if(a.flush_pending(),0===a.avail_out)return g=-1,0}else if(0===a.avail_in&&o<=R&&4!=o)return a.msg=u[7],r;if(s==h&&0!==a.avail_in)return t.msg=u[7],r;if(0!==a.avail_in||0!==L||0!=o&&s!=h){switch(O=-1,c[N].func){case 0:O=function(e){let t,n=65535;for(n>d-5&&(n=d-5);;){if(L<=1){if(ye(),0===L&&0==e)return 0;if(0===L)break}if(C+=L,L=0,t=z+n,(0===C||C>=t)&&(L=C-t,C=t,ge(!1),0===a.avail_out))return 0;if(C-z>=y-w&&(ge(!1),0===a.avail_out))return 0}return ge(4==e),0===a.avail_out?4==e?2:0:4==e?3:1}(o);break;case 1:O=function(e){let t,n=0;for(;;){if(L=3&&(E=(E<=3)if(t=fe(C-M,S-3),L-=S,S<=V&&L>=3){S--;do{C++,E=(E<=3&&(E=(E<4096)&&(S=2)),W>=3&&S<=W){n=C+L-3,t=fe(C-1-I,W-3),L-=W-1,W-=2;do{++C<=n&&(E=(E<n&&(r=n),0===r?0:(i.avail_in-=r,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),t),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const b=-2,x=-3,m=-5,v=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=[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],A=[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],E=[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],U=[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],R=[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],F=[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],D=15;function z(){let e,t,n,i,r,a;function s(e,t,s,o,l,d,c,u,f,h,_){let w,p,g,y,b,v,k,A,E,U,R,F,z,S,I;U=0,b=s;do{n[e[t+U]]++,U++,b--}while(0!==b);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(A=u[0],v=1;v<=D&&0===n[v];v++);for(k=v,Ab&&(A=b),u[0]=A,S=1<F+A;){if(y++,F+=A,I=g-F,I=I>A?A:I,(p=1<<(v=k-F))>w+1&&(p-=w+1,z=k,v1440)return x;r[y]=R=h[0],h[0]+=I,0!==y?(a[y]=b,i[0]=v,i[1]=A,v=b>>>F-A,i[2]=R-r[y-1]-v,f.set(i,3*(r[y-1]+v))):c[0]=R}for(i[1]=k-F,U>=s?i[0]=192:_[U]>>F;v>>=1)b^=v;for(b^=v,E=(1<257?(h==x?f.msg="oversubscribed distance tree":h==m?(f.msg="incomplete distance tree",h=x):-4!=h&&(f.msg="empty distance tree with lengths",h=x),h):0)}}z.inflate_trees_fixed=function(e,t,n,i){return e[0]=9,t[0]=5,n[0]=k,i[0]=A,0};function S(){const e=this;let t,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,h=0,_=0;function w(e,t,n,i,r,a,s,o){let l,d,c,u,f,h,_,w,p,g,y,b,m,k,A,E;_=o.next_in_index,w=o.avail_in,f=s.bitb,h=s.bitk,p=s.write,g=p>=d[E+1],h-=d[E+1],0!=(16&u)){for(u&=15,m=d[E+2]+(f&v[u]),f>>=u,h-=u;h<15;)w--,f|=(255&o.read_byte(_++))<>=d[E+1],h-=d[E+1],0!=(16&u)){for(u&=15;h>=u,h-=u,g-=m,p>=k)A=p-k,p-A>0&&2>p-A?(s.window[p++]=s.window[A++],s.window[p++]=s.window[A++],m-=2):(s.window.set(s.window.subarray(A,A+2),p),p+=2,A+=2,m-=2);else{A=p-k;do{A+=s.end}while(A<0);if(u=s.end-A,m>u){if(m-=u,p-A>0&&u>p-A)do{s.window[p++]=s.window[A++]}while(0!=--u);else s.window.set(s.window.subarray(A,A+u),p),p+=u,A+=u,u=0;A=0}}if(p-A>0&&m>p-A)do{s.window[p++]=s.window[A++]}while(0!=--m);else s.window.set(s.window.subarray(A,A+m),p),p+=m,A+=m,m=0;break}if(0!=(64&u))return o.msg="invalid distance code",m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,x;l+=d[E+2],l+=f&v[u],E=3*(c+l),u=d[E]}break}if(0!=(64&u))return 0!=(32&u)?(m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,1):(o.msg="invalid literal/length code",m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,x);if(l+=d[E+2],l+=f&v[u],E=3*(c+l),0===(u=d[E])){f>>=d[E+1],h-=d[E+1],s.window[p++]=d[E+2],g--;break}}else f>>=d[E+1],h-=d[E+1],s.window[p++]=d[E+2],g--}while(g>=258&&w>=10);return m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,0}e.init=function(e,a,s,o,l,d){t=0,u=e,f=a,i=s,h=o,r=l,_=d,n=null},e.proc=function(e,p,g){let y,m,k,A,E,U,R,F=0,D=0,z=0;for(z=p.next_in_index,A=p.avail_in,F=e.bitb,D=e.bitk,E=e.write,U=E=258&&A>=10&&(e.bitb=F,e.bitk=D,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,e.write=E,g=w(u,f,i,h,r,_,e,p),z=p.next_in_index,A=p.avail_in,F=e.bitb,D=e.bitk,E=e.write,U=E>>=n[m+1],D-=n[m+1],k=n[m],0===k){l=n[m+2],t=6;break}if(0!=(16&k)){d=15&k,a=n[m+2],t=2;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}if(0!=(32&k)){t=7;break}return t=9,p.msg="invalid literal/length code",g=x,e.bitb=F,e.bitk=D,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,e.write=E,e.inflate_flush(p,g);case 2:for(y=d;D>=y,D-=y,o=f,n=r,s=_,t=3;case 3:for(y=o;D>=n[m+1],D-=n[m+1],k=n[m],0!=(16&k)){d=15&k,c=n[m+2],t=4;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}return t=9,p.msg="invalid distance code",g=x,e.bitb=F,e.bitk=D,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,e.write=E,e.inflate_flush(p,g);case 4:for(y=d;D>=y,D-=y,t=5;case 5:for(R=E-c;R<0;)R+=e.end;for(;0!==a;){if(0===U&&(E==e.end&&0!==e.read&&(E=0,U=E7&&(D-=8,A++,z--),e.write=E,g=e.inflate_flush(p,g),E=e.write,U=Ee.avail_out&&(i=e.avail_out),0!==i&&t==m&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==m&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),e.next_out_index=r,n.read=a,t},n.proc=function(e,t){let _,w,p,g,y,m,k,A;for(g=e.next_in_index,y=e.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m>>1){case 0:w>>>=3,p-=3,_=7&p,w>>>=_,p-=_,r=1;break;case 1:E=[],U=[],R=[[]],F=[[]],z.inflate_trees_fixed(E,U,R,F),c.init(E[0],U[0],R[0],0,F[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,e.msg="invalid block type",t=x,n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t)}break;case 1:for(;p<32;){if(0===y)return n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t);t=0,y--,w|=(255&e.read_byte(g++))<>>16&65535)!=(65535&w))return r=9,e.msg="invalid stored block lengths",t=x,n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===y)return n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t);if(0===k&&(m==n.end&&0!==n.read&&(m=0,k=my&&(_=y),_>k&&(_=k),n.window.set(e.read_buf(g,_),m),g+=_,y-=_,m+=_,k-=_,0!=(a-=_))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===y)return n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t);t=0,y--,w|=(255&e.read_byte(g++))<29||(_>>5&31)>29)return r=9,e.msg="too many length or distance symbols",t=x,n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t);if(_=258+(31&_)+(_>>5&31),!i||i.length<_)i=[];else for(A=0;A<_;A++)i[A]=0;w>>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===y)return n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t);t=0,y--,w|=(255&e.read_byte(g++))<>>=3,p-=3}for(;o<19;)i[I[o++]]=0;if(l[0]=7,_=h.inflate_trees_bits(i,l,d,f,e),0!=_)return(t=_)==x&&(i=null,r=9),n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t);o=0,r=5;case 5:for(;_=s,!(o>=258+(31&_)+(_>>5&31));){let a,c;for(_=l[0];p<_;){if(0===y)return n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t);t=0,y--,w|=(255&e.read_byte(g++))<>>=_,p-=_,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;p<_+A;){if(0===y)return n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t);t=0,y--,w|=(255&e.read_byte(g++))<>>=_,p-=_,a+=w&v[A],w>>>=A,p-=A,A=o,_=s,A+a>258+(31&_)+(_>>5&31)||16==c&&A<1)return i=null,r=9,e.msg="invalid bit length repeat",t=x,n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(d[0]=-1,D=[],S=[],T=[],C=[],D[0]=9,S[0]=6,_=s,_=h.inflate_trees_dynamic(257+(31&_),1+(_>>5&31),i,D,S,T,C,f,e),0!=_)return _==x&&(i=null,r=9),t=_,n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,n.inflate_flush(e,t);c.init(D[0],S[0],f,T[0],f,C[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,e.avail_in=y,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=m,1!=(t=c.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,c.free(e),g=e.next_in_index,y=e.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m15?(e.inflateEnd(n),b):(e.wbits=i,n.istate.blocks=new T(n,1<>4)>r.wbits){r.mode=C,e.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=C,e.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,r.need+=255&e.read_byte(e.next_in_index++),r.mode=6,2);case 6:return r.mode=C,e.msg="need dictionary",r.marker=0,b;case 7:if(n=r.blocks.proc(e,n),n==x){r.mode=C,r.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,r.blocks.reset(e,r.was),r.mode=12;case 12:return 1;case C:return x;default:return b}},e.inflateSetDictionary=function(e,t,n){let i=0,r=n;if(!e||!e.istate||6!=e.istate.mode)return b;const a=e.istate;return r>=1<{n.onload=e=>i(new Uint8Array(e.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(e,e+t))}))}}class ee extends Q{constructor(e){super(),this.offset=0,this.contentType=e,this.blob=new Blob([],{type:e})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class te extends J{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests,this.options=Object.assign({},t),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),le(this.url)&&!this.preventHeadRequest){const e=await ie(K,this.url,this.options);if(this.size=Number(e.headers.get(q)),!this.forceRangeRequests&&this.useRangeHeader&&e.headers.get(Z)!=X)throw new Error(H);void 0===this.size&&await ne(this,this.options)}else await ne(this,this.options)}async readUint8Array(e,t){if(this.useRangeHeader){const n=await ie(Y,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+e+"-"+(e+t-1)}));if(206!=n.status)throw new Error(H);return new Uint8Array(await n.arrayBuffer())}return this.data||await ne(this,this.options),new Uint8Array(this.data.subarray(e,e+t))}}async function ne(e,t){const n=await ie(Y,e.url,t);e.data=new Uint8Array(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function ie(e,t,n,i){i=Object.assign({},n.headers,i);const r=await fetch(t,Object.assign({},n,{method:e,headers:i}));if(r.status<400)return r;throw new Error(P+(r.statusText||r.status))}class re extends J{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests}async init(){if(super.init(),le(this.url)&&!this.preventHeadRequest)return new Promise(((e,t)=>se(K,this.url,(n=>{this.size=Number(n.getResponseHeader(q)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(Z)==X?e():t(new Error(H)):void 0===this.size?ae(this,this.url).then((()=>e())).catch(t):e()}),t)));await ae(this,this.url)}async readUint8Array(e,t){if(!this.useRangeHeader)return this.data||await ae(this,this.url),new Uint8Array(this.data.subarray(e,e+t));if(206!=(await new Promise(((n,i)=>se(Y,this.url,(e=>n(new Uint8Array(e.response))),i,[["Range","bytes="+e+"-"+(e+t-1)]])))).status)throw new Error(H)}}function ae(e,t){return new Promise(((n,i)=>se(Y,t,(t=>{e.data=new Uint8Array(t.response),e.size||(e.size=e.data.length),n()}),i)))}function se(e,t,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(P+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(e,t),r.forEach((e=>a.setRequestHeader(e[0],e[1]))),a.responseType="arraybuffer",a.send(),a}class oe extends J{constructor(e,t={}){super(),this.url=e,t.useXHR?this.reader=new re(e,t):this.reader=new te(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}function le(e){if("undefined"!=typeof document){const t=document.createElement("a");return t.href=e,"http:"==t.protocol||"https:"==t.protocol}return/^https?:\/\//i.test(e)}const de=4294967295,ce=65535,ue=67324752,fe=134695760,he=33639248,_e=101010256,we=101075792,pe=117853008,ge=39169,ye=2048,be="/",xe=new Date(2107,11,31),me=new Date(1980,0,1),ve="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const ke=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;ke[e]=t}class Ae{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;n>>8^ke[255&(t^e[n])];this.crc=t}get(){return~this.crc}}const Ee="Invalid pasword",Ue=16,Re="raw",Fe={name:"PBKDF2"},De={name:"HMAC"},ze="SHA-1",Se={name:"AES-CTR"},Ie=Object.assign({hash:De},Fe),Te=Object.assign({iterations:1e3,hash:{name:ze}},Fe),Ce=Object.assign({hash:ze},De),Me=Object.assign({length:Ue},Se),Le=["deriveBits"],We=["sign"],Oe=[8,12,16],Ve=[16,24,32],Ne=10,Be=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Pe=crypto.subtle;class He{constructor(e,t,n){this.password=e,this.signed=t,this.strength=n-1,this.input=t&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(e){const t=async(r=0)=>{if(r+Ue<=i.length-Ne){const e=i.subarray(r,r+Ue),a=await Pe.decrypt(Object.assign({counter:this.counter},Me),this.keys.key,e);return Ze(this.counter),n.set(new Uint8Array(a),r),t(r+Ue)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=Ke(this.input,e)),n};if(this.password){const t=e.subarray(0,Oe[this.strength]+2);await async function(e,t,n){await qe(e,n,t.subarray(0,Oe[e.strength]),["decrypt"]);const i=t.subarray(Oe[e.strength]),r=e.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(Ee)}(this,t,this.password),this.password=null,e=e.subarray(Oe[this.strength]+2)}let n=new Uint8Array(e.length-Ne-(e.length-Ne)%Ue),i=e;return this.pendingInput.length&&(i=Ke(this.pendingInput,e),n=Ye(n,i.length-Ne-(i.length-Ne)%Ue)),t()}async flush(){const e=this.pendingInput,t=this.keys,n=e.subarray(0,e.length-Ne),i=e.subarray(e.length-Ne);let r=new Uint8Array(0);if(n.length){const e=await Pe.decrypt(Object.assign({counter:this.counter},Me),t.key,n);r=new Uint8Array(e)}let a=!0;if(this.signed){const e=await Pe.sign(De,t.authentication,this.input.subarray(0,this.input.length-Ne)),n=new Uint8Array(e);this.input=null;for(let e=0;e{if(r+Ue<=e.length){const a=e.subarray(r,r+Ue),s=await Pe.encrypt(Object.assign({counter:this.counter},Me),this.keys.key,a);return Ze(this.counter),i.set(new Uint8Array(s),r+n.length),t(r+Ue)}return this.pendingInput=e.subarray(r),this.output=Ke(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(e,t){const n=crypto.getRandomValues(new Uint8Array(Oe[e.strength]));return await qe(e,t,n,["encrypt"]),Ke(n,e.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+e.length-e.length%Ue);return i.set(n,0),this.pendingInput.length&&(e=Ke(this.pendingInput,e),i=Ye(i,e.length-e.length%Ue)),t()}async flush(){let e=new Uint8Array(0);if(this.pendingInput.length){const t=await Pe.encrypt(Object.assign({counter:this.counter},Me),this.keys.key,this.pendingInput);e=new Uint8Array(t),this.output=Ke(this.output,e)}const t=await Pe.sign(De,this.keys.authentication,this.output.subarray(Oe[this.strength]+2));this.output=null;const n=new Uint8Array(t).subarray(0,Ne);return{data:Ke(e,n),signature:n}}}async function qe(e,t,n,i){e.counter=new Uint8Array(Be);const r=(new TextEncoder).encode(t),a=await Pe.importKey(Re,r,Ie,!1,Le),s=await Pe.deriveBits(Object.assign({salt:n},Te),a,8*(2*Ve[e.strength]+2)),o=new Uint8Array(s);e.keys={key:await Pe.importKey(Re,o.subarray(0,Ve[e.strength]),Se,!0,i),authentication:await Pe.importKey(Re,o.subarray(Ve[e.strength],2*Ve[e.strength]),Ce,!1,We),passwordVerification:o.subarray(2*Ve[e.strength])}}function Ze(e){for(let t=0;t<16;t++){if(255!=e[t]){e[t]++;break}e[t]=0}}function Ke(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Ye(e,t){if(t&&t>e.length){const n=e;(e=new Uint8Array(t)).set(n,0)}return e}const Xe=12;class Ge{constructor(e,t){this.password=e,this.passwordVerification=t,et(this,e)}async append(e){if(this.password){const t=Qe(this,e.subarray(0,Xe));if(this.password=null,t[11]!=this.passwordVerification)throw new Error(Ee);e=e.subarray(Xe)}return Qe(this,e)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class Je{constructor(e,t){this.passwordVerification=t,this.password=e,et(this,e)}async append(e){let t,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(Xe));i[11]=this.passwordVerification,t=new Uint8Array(e.length+i.length),t.set($e(this,i),0),n=Xe}else t=new Uint8Array(e.length),n=0;return t.set($e(this,e),n),t}async flush(){return{data:new Uint8Array(0)}}}function Qe(e,t){const n=new Uint8Array(t.length);for(let i=0;i>>24]),e.keys[2]=~e.crcKey2.get()}function nt(e){const t=2|e.keys[2];return it(Math.imul(t,1^t)>>>8)}function it(e){return 255&e}function rt(e){return 4294967295&e}const at="deflate",st="inflate",ot="Invalid signature";class lt{constructor(e,t){this.signature=t.signature,this.encrypted=Boolean(t.password),this.signed=t.signed,this.compressed=t.compressed,this.inflate=t.compressed&&new e,this.crc32=t.signed&&new Ae,this.zipCrypto=t.zipCrypto,this.decrypt=this.encrypted&&t.zipCrypto?new Ge(t.password,t.passwordVerification):new He(t.password,t.signed,t.encryptionStrength)}async append(e){return this.encrypted&&e.length&&(e=await this.decrypt.append(e)),this.compressed&&e.length&&(e=await this.inflate.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&e.length&&this.crc32.append(e),e}async flush(){let e,t=new Uint8Array(0);if(this.encrypted){const e=await this.decrypt.flush();if(!e.valid)throw new Error(ot);t=e.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const t=new DataView(new Uint8Array(4).buffer);if(e=this.crc32.get(),t.setUint32(0,e),this.signature!=t.getUint32(0,!1))throw new Error(ot)}return this.compressed&&(t=await this.inflate.append(t)||new Uint8Array(0),await this.inflate.flush()),{data:t,signature:e}}}class dt{constructor(e,t){this.encrypted=t.encrypted,this.signed=t.signed,this.compressed=t.compressed,this.deflate=t.compressed&&new e({level:t.level||5}),this.crc32=t.signed&&new Ae,this.zipCrypto=t.zipCrypto,this.encrypt=this.encrypted&&t.zipCrypto?new Je(t.password,t.passwordVerification):new je(t.password,t.encryptionStrength)}async append(e){let t=e;return this.compressed&&e.length&&(t=await this.deflate.append(e)),this.encrypted&&t.length&&(t=await this.encrypt.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&e.length&&this.crc32.append(e),t}async flush(){let e,t=new Uint8Array(0);if(this.compressed&&(t=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){t=await this.encrypt.append(t);const n=await this.encrypt.flush();e=n.signature;const i=new Uint8Array(t.length+n.data.length);i.set(t,0),i.set(n.data,t.length),t=i}return this.encrypted&&!this.zipCrypto||!this.signed||(e=this.crc32.get()),{data:t,signature:e}}}const ct="init",ut="append",ft="flush",ht="message";var _t=(e,t,n,i,r,a)=>(e.busy=!0,e.codecConstructor=t,e.options=Object.assign({},n),e.scripts=a,e.webWorker=r,e.onTaskFinished=()=>{e.busy=!1;i(e)&&e.worker&&e.worker.terminate()},r?function(e){let t;e.interface||(e.worker=new Worker(new URL(e.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker.min.js",document.baseURI).href)),e.worker.addEventListener(ht,r,!1),e.interface={append:e=>n({type:ut,data:e}),flush:()=>n({type:ft})});return e.interface;async function n(n){if(!t){const t=e.options,n=e.scripts.slice(1);await i({scripts:n,type:ct,options:t})}return i(n)}function i(n){const i=e.worker,r=new Promise(((e,n)=>t={resolve:e,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(e){i.postMessage(n)}else i.postMessage(n)}catch(n){t.reject(n),t=null,e.onTaskFinished()}return r}function r(n){const i=n.data;if(t){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,t.reject(i),t=null,e.onTaskFinished()}else if(r==ct||r==ft||r==ut){const n=i.data;r==ft?(t.resolve({data:new Uint8Array(n),signature:i.signature}),t=null,e.onTaskFinished()):t.resolve(n&&new Uint8Array(n))}}}}(e):function(e){const t=function(e,t){return t.codecType.startsWith(at)?new dt(e,t):t.codecType.startsWith(st)?new lt(e,t):void 0}(e.codecConstructor,e.options);return{async append(n){try{return await t.append(n)}catch(t){throw e.onTaskFinished(),t}},async flush(){try{return await t.flush()}finally{e.onTaskFinished()}}}}(e));let wt=[],pt=[];function gt(e,t,n){const i=!(!t.compressed&&!t.signed&&!t.encrypted)&&(t.useWebWorkers||void 0===t.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[t.codecType]:[];if(wt.length!e.busy));return n?_t(n,e,t,yt,i,r):new Promise((n=>pt.push({resolve:n,codecConstructor:e,options:t,webWorker:i,scripts:r})))}}function yt(e){const t=!pt.length;if(t)wt=wt.filter((t=>t!=e));else{const[{resolve:t,codecConstructor:n,options:i,webWorker:r,scripts:a}]=pt.splice(0,1);t(_t(e,n,i,yt,r,a))}return t}async function bt(e,t,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(l=0,d=0){if(lthis[t]=e[t]))}}const kt="File format is not recognized",At="End of central directory not found",Et="End of Zip64 central directory not found",Ut="End of Zip64 central directory locator not found",Rt="Central directory header not found",Ft="Local file header not found",Dt="Zip64 extra field not found",zt="File contains encrypted entry",St="Encryption method not supported",It="Compression method not supported",Tt="utf-8",Ct=["uncompressedSize","compressedSize","offset"];class Mt{constructor(e,t,n){this.reader=e,this.config=t,this.options=n}async getData(e,t={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=Vt(this,t,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error(It);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error(It);if(Ht(r,0)!=ue)throw new Error(Ft);const s=this.localDirectory={};Lt(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),Wt(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,l=this.bitFlag.encrypted&&s.bitFlag.encrypted,d=l&&!this.extraFieldAES;if(l){if(!d&&void 0===this.extraFieldAES.strength)throw new Error(St);if(!a)throw new Error(zt)}const c=await gt(this.config.Inflate,{codecType:st,password:a,zipCrypto:d,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:Vt(this,t,"checkSignature"),passwordVerification:d&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:l,useWebWorkers:Vt(this,t,"useWebWorkers")},this.config);return e.initialized||await e.init(),await bt(c,n,e,o,this.compressedSize,this.config,{onprogress:t.onprogress}),e.getData()}}function Lt(e,t,n){e.version=Pt(t,n);const i=e.rawBitFlag=Pt(t,n+2);e.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&ye)==ye},e.encrypted=e.bitFlag.encrypted,e.rawLastModDate=Ht(t,n+6),e.lastModDate=function(e){const t=(4294901760&e)>>16,n=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}(e.rawLastModDate),e.filenameLength=Pt(t,n+22),e.extraFieldLength=Pt(t,n+24)}function Wt(e,t,n,i){const r=t.rawExtraField,a=t.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;ot[e]==de));for(let t=0;t{if(t[n]==de){if(!e||void 0===e[n])throw new Error(Dt);t[n]=e[n]}}))}(d,t);const c=t.extraFieldUnicodePath=a.get(28789);c&&Ot(c,"filename","rawFilename",t,e);const u=t.extraFieldUnicodeComment=a.get(25461);u&&Ot(u,"comment","rawComment",t,e);const f=t.extraFieldAES=a.get(39169);f?function(e,t,n){if(e){const i=new DataView(e.data.buffer);e.vendorVersion=Bt(i,0),e.vendorId=Bt(i,2);const r=Bt(i,4);e.strength=r,e.originalCompressionMethod=n,t.compressionMethod=e.compressionMethod=Pt(i,5)}else t.compressionMethod=n}(f,t,l):t.compressionMethod=l,8==t.compressionMethod&&(t.bitFlag.enhancedDeflating=16!=(16&t.rawBitFlag))}function Ot(e,t,n,i,r){const a=new DataView(e.data.buffer);e.version=Bt(a,0),e.signature=Ht(a,1);const s=new Ae;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),e[t]=(new TextDecoder).decode(e.data.subarray(5)),e.valid=!r.bitFlag.languageEncodingFlag&&e.signature==Ht(o,0),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function Vt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function Nt(e,t){return t&&"cp437"!=t.trim().toLowerCase()?new TextDecoder(t).decode(e):(e=>{let t="";for(let n=0;n0&&t.next_in_index!=o&&(r(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return s=new Uint8Array(d),c.forEach((function(e){s.set(e,l),l+=e.length})),s}},this.flush=function(){let e,r,a=0,s=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new Error("deflating: "+t.msg);n-t.avail_out>0&&o.push(new Uint8Array(i.subarray(0,t.next_out_index))),s+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new Uint8Array(s),o.forEach((function(e){r.set(e,a),a+=e.length})),r}},Inflate:function(){const e=new W,t=new Uint8Array(512);let n=!1;e.inflateInit(),e.next_out=t,this.append=function(i,r){const a=[];let s,o,l=0,d=0,c=0;if(0!==i.length){e.next_in_index=0,e.next_in=i,e.avail_in=i.length;do{if(e.next_out_index=0,e.avail_out=512,0!==e.avail_in||n||(e.next_in_index=0,n=!0),s=e.inflate(0),n&&s===m){if(0!==e.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+e.msg);if((n||1===s)&&e.avail_in===i.length)throw new Error("inflating: bad input");e.next_out_index&&(512===e.next_out_index?a.push(new Uint8Array(t)):a.push(new Uint8Array(t.subarray(0,e.next_out_index)))),c+=e.next_out_index,r&&e.next_in_index>0&&e.next_in_index!=l&&(r(e.next_in_index),l=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return o=new Uint8Array(c),a.forEach((function(e){o.set(e,d),d+=e.length})),o}},this.flush=function(){e.inflateEnd()}}}),e.BlobReader=$,e.BlobWriter=ee,e.Data64URIReader=class extends J{constructor(e){super(),this.dataURI=e;let t=e.length;for(;"="==e.charAt(t-1);)t--;this.dataStart=e.indexOf(",")+1,this.size=Math.floor(.75*(t-this.dataStart))}async readUint8Array(e,t){const n=new Uint8Array(t),i=4*Math.floor(e/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((e+t)/3)+this.dataStart)),a=e-3*Math.floor(i/4);for(let e=a;e2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},e.ERR_BAD_FORMAT=kt,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Rt,e.ERR_DUPLICATED_NAME=qt,e.ERR_ENCRYPTED=zt,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Ut,e.ERR_EOCDR_NOT_FOUND=At,e.ERR_EOCDR_ZIP64_NOT_FOUND=Et,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Dt,e.ERR_HTTP_RANGE=H,e.ERR_INVALID_COMMENT=Zt,e.ERR_INVALID_DATE=Gt,e.ERR_INVALID_ENCRYPTION_STRENGTH=Jt,e.ERR_INVALID_ENTRY_COMMENT=Kt,e.ERR_INVALID_ENTRY_NAME=Yt,e.ERR_INVALID_EXTRAFIELD_DATA=$t,e.ERR_INVALID_EXTRAFIELD_TYPE=Qt,e.ERR_INVALID_PASSWORD=Ee,e.ERR_INVALID_SIGNATURE=ot,e.ERR_INVALID_VERSION=Xt,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Ft,e.ERR_UNSUPPORTED_COMPRESSION=It,e.ERR_UNSUPPORTED_ENCRYPTION=St,e.HttpRangeReader=class extends oe{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=oe,e.Reader=J,e.TextReader=class extends J{constructor(e){super(),this.blobReader=new $(new Blob([e],{type:j}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends Q{constructor(e){super(),this.encoding=e,this.blob=new Blob([],{type:j})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:j})}getData(){const e=new FileReader;return new Promise(((t,n)=>{e.onload=e=>t(e.target.result),e.onerror=n,e.readAsText(this.blob,this.encoding)}))}},e.Uint8ArrayReader=class extends J{constructor(e){super(),this.array=e,this.size=e.length}async readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends Q{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(e){super.writeUint8Array(e);const t=this.array;this.array=new Uint8Array(t.length+e.length),this.array.set(t),this.array.set(e,t.length)}getData(){return this.array}},e.Writer=Q,e.ZipReader=class{constructor(e,t={}){this.reader=e,this.options=t,this.config=N()}async getEntries(e={}){const t=this.reader;if(t.initialized||await t.init(),t.size<22)throw new Error(kt);const n=await async function(e,t,n,i){const r=new Uint8Array(4);!function(e,t,n){e.setUint32(t,n,!0)}(new DataView(r.buffer),0,t);const a=n+i;return await s(n)||await s(Math.min(a,e.size));async function s(t){const i=e.size-t,a=await e.readUint8Array(i,t);for(let e=a.length-n;e>=0;e--)if(a[e]==r[0]&&a[e+1]==r[1]&&a[e+2]==r[2]&&a[e+3]==r[3])return{offset:i+e,buffer:a.slice(e,e+n).buffer}}}(t,_e,22,1048560);if(!n)throw new Error(At);const i=new DataView(n.buffer);let r=Ht(i,12),a=Ht(i,16),s=Pt(i,8),o=0;if(a==de||r==de||s==ce){const e=await t.readUint8Array(n.offset-20,20),i=new DataView(e.buffer);if(Ht(i,0)!=pe)throw new Error(Et);a=jt(i,8);let l=await t.readUint8Array(a,56),d=new DataView(l.buffer);const c=n.offset-20-56;if(Ht(d,0)!=we&&a!=c){const e=a;a=c,o=a-e,l=await t.readUint8Array(a,56),d=new DataView(l.buffer)}if(Ht(d,0)!=we)throw new Error(Ut);s=jt(d,24),r=jt(i,4),a-=jt(d,40)}if(a<0||a>=t.size)throw new Error(kt);let l=0,d=await t.readUint8Array(a,t.size-a),c=new DataView(d.buffer);const u=n.offset-r;if(Ht(c,l)!=he&&a!=u){const e=a;a=u,o=a-e,d=await t.readUint8Array(a,t.size-a),c=new DataView(d.buffer)}if(a<0||a>=t.size)throw new Error(kt);const f=[];for(let t=0;tt.getData(e,n),f.push(r),l+=46+t.filenameLength+t.extraFieldLength+t.commentLength}return f}async close(){}},e.ZipWriter=class{constructor(e,t={}){this.writer=e,this.options=t,this.config=N(),this.files=new Map,this.offset=e.size}async add(e="",t,n={}){if(e=e.trim(),n.directory&&!e.endsWith(be)?e+=be:n.directory=e.endsWith(be),this.files.has(e))throw new Error(qt);const i=(new TextEncoder).encode(e);if(i.length>ce)throw new Error(Yt);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>ce)throw new Error(Kt);const s=this.options.version||n.version||0;if(s>ce)throw new Error(Xt);const o=n.lastModDate||new Date;if(oxe)throw new Error(Gt);const l=tn(this,n,"password"),d=tn(this,n,"encryptionStrength")||3,c=tn(this,n,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error(Jt);t&&!t.initialized&&await t.init();let u=new Uint8Array(0);const f=n.extraField;if(f){let e=0,t=0;f.forEach((t=>e+=4+t.length)),u=new Uint8Array(e),f.forEach(((e,n)=>{if(n>ce)throw new Error(Qt);if(e.length>ce)throw new Error($t);u.set(new Uint16Array([n]),t),u.set(new Uint16Array([e.length]),t+2),u.set(e,t+4),t+=4+e.length}))}const h=t?1.05*t.size:0,_=n.zip64||this.options.zip64||this.offset>=de||h>=de||this.offset+h>=de,w=tn(this,n,"level"),p=tn(this,n,"useWebWorkers"),g=tn(this,n,"bufferedWrite"),y=tn(this,n,"keepOrder"),b=await async function(e,t,n,i){const r=e.files,a=e.writer;let s,o,l;r.set(t,null);try{let d,c;try{i.keepOrder&&(o=e.lockPreviousFile,e.lockPreviousFile=new Promise((e=>l=e))),i.bufferedWrite||e.lockWrite?(d=new ee,await d.init()):(e.lockWrite=new Promise((e=>s=e)),a.initialized||await a.init(),d=a),c=await async function(e,t,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),l=i.level,d=0!==l&&!i.directory,c=i.zip64;let u,f;if(o&&!i.zipCrypto){u=new Uint8Array(en.length+2);const e=new DataView(u.buffer);rn(e,0,ge),u.set(en,2),f=i.encryptionStrength,nn(e,8,f)}else u=new Uint8Array(0);const h={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let _=2056,w=0;d&&(w=8);c&&(h.version=h.version>45?h.version:45);o&&(_|=1,i.zipCrypto||(h.version=h.version>51?h.version:51,w=99,d&&(h.rawExtraFieldAES[9]=8)));const p=h.headerArray=new Uint8Array(26),g=new DataView(p.buffer);rn(g,0,h.version),rn(g,2,_),rn(g,4,w);const y=new Uint32Array(1),b=new DataView(y.buffer);rn(b,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),rn(b,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=y[0];an(g,6,x),rn(g,22,r.length),rn(g,24,0);const m=new Uint8Array(30+r.length);let v;an(new DataView(m.buffer),0,ue),m.set(p,4),m.set(r,30);let k=0,A=0;if(e){k=e.size;const r=await gt(n.Deflate,{codecType:at,level:l,password:s,encryptionStrength:f,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:d,encrypted:o,useWebWorkers:i.useWebWorkers},n);await t.writeUint8Array(m),v=await bt(r,e,t,0,k,n,{onprogress:i.onprogress}),A=v.length}else await t.writeUint8Array(m);const E=new Uint8Array(c?24:16),U=new DataView(E.buffer);if(an(U,0,fe),e)if(o&&!i.zipCrypto||void 0===v.signature||(an(g,10,v.signature),an(U,4,v.signature),h.signature=v.signature),c){const e=new DataView(h.rawExtraFieldZip64.buffer);rn(e,0,1),rn(e,2,24),an(g,14,de),sn(U,8,BigInt(A)),sn(e,12,BigInt(A)),an(g,18,de),sn(U,16,BigInt(k)),sn(e,4,BigInt(k))}else an(g,14,A),an(U,8,A),an(g,18,k),an(U,12,k);await t.writeUint8Array(E);const R=m.length+(v?v.length:0)+E.length;return Object.assign(h,{compressedSize:A,uncompressedSize:k,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),h}(n,d,e.config,i)}catch(e){throw r.delete(t),e}if(r.set(t,c),d!=a){const t=d.getData(),n=new FileReader,i=await new Promise(((e,i)=>{n.onload=t=>e(t.target.result),n.onerror=i,n.readAsArrayBuffer(t)}));await Promise.all([e.lockWrite,o]),await a.writeUint8Array(new Uint8Array(i))}if(c.offset=e.offset,c.zip64){sn(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return e.offset+=c.length,c}finally{l&&l(),s&&(e.lockWrite=null,s())}}(this,e,t,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:u,zip64:_,password:l,level:w,useWebWorkers:p,encryptionStrength:d,zipCrypto:c,bufferedWrite:g,keepOrder:y}));return Object.assign(b,{name:e,comment:r,extraField:f}),new vt(b)}async close(e=new Uint8Array(0)){const t=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,e]of n)r+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraField.length;const o=this.options.zip64||a>=de||r>=de||s>=ce,l=new Uint8Array(r+(o?98:22)),d=new DataView(l.buffer);if(e.length){if(!(e.length<=ce))throw new Error(Zt);rn(d,i+20,e.length)}for(const[,e]of n){const t=e.rawFilename,n=e.rawExtraFieldZip64,r=e.rawExtraFieldAES,a=n.length+r.length+e.rawExtraField.length;an(d,i,he),rn(d,i+4,e.version),l.set(e.headerArray,i+6),rn(d,i+30,a),rn(d,i+32,e.rawComment.length),e.directory&&nn(d,i+38,16),e.zip64?an(d,i+42,de):an(d,i+42,e.offset),l.set(t,i+46),l.set(n,i+46+t.length),l.set(r,i+46+t.length+n.length),l.set(e.rawExtraField,46+t.length+n.length+r.length),l.set(e.rawComment,i+46+t.length+a),i+=46+t.length+a+e.rawComment.length}return o&&(an(d,i,we),sn(d,i+4,BigInt(44)),rn(d,i+12,45),rn(d,i+14,45),sn(d,i+24,BigInt(s)),sn(d,i+32,BigInt(s)),sn(d,i+40,BigInt(r)),sn(d,i+48,BigInt(a)),an(d,i+56,pe),sn(d,i+64,BigInt(a)+BigInt(r)),an(d,i+72,1),s=ce,a=de,r=de,i+=76),an(d,i,_e),rn(d,i+8,s),rn(d,i+10,s),an(d,i+12,r),an(d,i+16,a),await t.writeUint8Array(l),e.length&&await t.writeUint8Array(e),t.getData()}},e.configure=B,e.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/dist/zip.js b/dist/zip.js index 5c084afe..288f4107 100644 --- a/dist/zip.js +++ b/dist/zip.js @@ -85,6 +85,38 @@ var configureWebWorker = ()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const 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={name:"PBKDF2"},i={name:"HMAC"},a={name:"AES-CTR"},r=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},a),d=["deriveBits"],_=["sign"],u=[8,12,16],f=[16,24,32],c=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await h.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return x(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=y(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await p(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2);}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=y(this.pendingInput,t),n=g(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},l),e.key,n);r=new Uint8Array(t);}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=a[t]&&(s=!1);}return {valid:s,data:r}}}class b{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,r);return x(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=y(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await p(t,e,n,["encrypt"]),y(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=y(this.pendingInput,t),i=g(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=y(this.output,t);}const e=await h.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return {data:y(t,n),signature:n}}}async function p(t,e,n,i){t.counter=new Uint8Array(c);const l=(new TextEncoder).encode(e),u=await h.importKey("raw",l,r,!1,d),w=await h.deriveBits(Object.assign({salt:n},s),u,8*(2*f[t.strength]+2)),b=new Uint8Array(w);t.keys={key:await h.importKey("raw",b.subarray(0,f[t.strength]),a,!0,i),authentication:await h.importKey("raw",b.subarray(f[t.strength],2*f[t.strength]),o,!1,_),passwordVerification:b.subarray(2*f[t.strength])};}function x(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0;}}function y(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 g(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t);}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return k(this,t)}async flush(){return {valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t);}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12;}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return {data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function E(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function C(t){return 4294967295&t}class z{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength);}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new b(n.password,n.encryptionStrength);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const M={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),V=function(t,e){return e.codecType.startsWith("deflate")?new j(t,e):e.codecType.startsWith("inflate")?new z(t,e):void 0}(n,e);},append:async t=>({data:await V.append(t.data)}),flush:()=>V.flush()};let V;function O(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=M[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}});}}));const D=[0,1,2,3].concat(...O([[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 K(){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,d=-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,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],_=n[2*n[2*l+1]+1]+1,_>s&&(_=s,c++),n[2*l+1]=_,l>t.max_code||(e.bl_count[_]++,u=0,l>=r&&(u=a[l-r]),f=n[2*l],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(_=s;0!==_;_--)for(l=e.bl_count[_];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),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 R(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;}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;}K._length_code=[0,1,2,3,4,5,6,7].concat(...O([[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]])),K.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],K.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],K.d_code=function(t){return t<256?D[t]:D[256+(t>>>7)]},K.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],K.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],K.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R.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],R.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],R.static_l_desc=new R(R.static_ltree,K.extra_lbits,257,286,15),R.static_d_desc=new R(R.static_dtree,K.extra_dbits,0,30,15),R.static_bl_desc=new R(null,K.extra_blbits,0,19,7);const B=[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)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function P(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[F+2*H]=e>>>8&255,t.pending_buf[F+2*H+1]=255&e,t.pending_buf[q+H]=255&n,H++,0===e?j[2*n]++:(G++,e--,j[2*(K._length_code[n]+256+1)]++,M[2*K.d_code(e)]++),0==(8191&H)&&E>2){for(i=8*H,a=m-p,r=0;r<30;r++)i+=M[2*r]*(5+K.extra_dbits[r]);if(i>>>=3,G8?$(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,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n;}(e,n);}function lt(e,n,i){let a,r,s=0;E>0?(O.build_tree(t),D.build_tree(t),s=function(){let e;for(Y(j,O.max_code),Y(M,D.max_code),T.build_tree(t),e=18;e>=3&&0===V[2*K.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(R.static_ltree,R.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 _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){l.set(l.subarray(r,r+r),0),v-=r,m-=r,p-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(l,m+k,a),k+=t,k>=3&&(f=255&l[m],f=(f<r-262?m-(r-262):0;let u=z;const f=o,c=m+258;let h=l[a+s-1],w=l[a+s];A>=C&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&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(v=t,s=n,n>=u)break;h=l[a+s-1],w=l[a+s];}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}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,O.dyn_tree=j,O.stat_desc=R.static_l_desc,D.dyn_tree=M,D.stat_desc=R.static_d_desc,T.dyn_tree=V,T.stat_desc=R.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||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:(B[E].func!=B[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=B[E].max_lazy,C=B[E].good_length,z=B[E].nice_length,U=B[E].max_chain),S=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,p=s,f=255&l[0],f=(f<4||h<0)return -2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=L[4],-2;if(0===d.avail_out)return d.msg=L[7],-5;var V;if(e=d,j=a,a=h,42==n&&(C=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),C|=z<<6,0!==m&&(C|=32),C+=31-C%31,n=113,Z((V=C)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=j&&4!=h)return e.msg=L[7],-5;if(666==n&&0!==e.avail_in)return d.msg=L[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,B[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=p+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-p>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(a(e.next_in_index),o=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,l),l+=t.length;})),s}},this.flush=function(){let t,a,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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),o.forEach((function(t){a.set(t,r),r+=t.length;})),a};}W.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new q,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 F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],G=[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],J=[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],N=[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],Q=[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],X=[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],Y=[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 Z(){let t,e,n,i,a,r;function s(t,e,s,o,l,d,_,u,f,c,h){let w,b,p,x,y,g,m,v,k,A,U,I,E,S,C;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,S=1<I+v;){if(x++,I+=v,C=p-I,C=C>v?v:C,(b=1<<(g=m-I))>w+1&&(b-=w+1,E=m,g1440)return -3;a[x]=U=c[0],c[0]+=C,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U;}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}function $(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,d=0,_=0,u=0,f=0,c=0,h=0;function w(t,e,n,i,a,r,s,o){let l,d,_,u,f,c,h,w,b,p,x,y,g,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,c=s.bitk,b=s.write,p=b>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)w--,f|=(255&o.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,p-=g,b>=m)v=b-m,b-v>0&&2>b-v?(s.window[b++]=s.window[v++],s.window[b++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),b),b+=2,v+=2,g-=2);else {v=b-m;do{v+=s.end;}while(v<0);if(u=s.end-v,g>u){if(g-=u,b-v>0&&u>b-v)do{s.window[b++]=s.window[v++];}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),b),b+=u,v+=u,u=0;v=0;}}if(b-v>0&&g>b-v)do{s.window[b++]=s.window[v++];}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),b),b+=g,v+=g,g=0;break}if(0!=(64&u))return o.msg="invalid distance code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3;l+=d[k+2],l+=f&F[u],k=3*(_+l),u=d[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,1):(o.msg="invalid literal/length code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3);if(l+=d[k+2],l+=f&F[u],k=3*(_+l),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;break}}else f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;}while(p>=258&&w>=10);return g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,0}t.init=function(t,r,s,o,l,d){e=0,u=t,f=r,i=s,c=o,a=l,h=d,n=null;},t.proc=function(t,b,p){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,p=w(u,f,i,c,a,h,t,b),E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){l=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,b.msg="invalid literal/length code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 2:for(x=d;I>=x,I-=x,o=f,n=a,s=h,e=3;case 3:for(x=o;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}return e=9,b.msg="invalid distance code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,p=t.inflate_flush(b,p),v=t.write,k=vt.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,w,b,p,x,y,g,m;for(p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y>>1){case 0:w>>>=3,b-=3,h=7&b,w>>>=h,b-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],Z.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,b-=3,a=6;break;case 2:w>>>=3,b-=3,a=3;break;case 3:return w>>>=3,b-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;b<32;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>16&65535)!=(65535&w))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);r=65535&w,w=b=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(p,h),y),p+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;b<14;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(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=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,b-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;b<3;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>=3,b-=3;}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,h=c.inflate_trees_bits(i,l,d,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,_;for(h=l[0];b>>=h,b-=h,i[o++]=_;else {for(m=18==_?7:_-14,r=18==_?11:3;b>>=h,b-=h,r+=w&F[m],w>>>=m,b-=m,m=o,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_;}while(0!=--r);o=m;}}if(d[0]=-1,I=[],E=[],S=[],C=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,C,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,S[0],f,C[0]),a=6;case 6:if(n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(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&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(_),r.forEach((function(t){o.set(t,d),d+=t.length;})),o}},this.flush=function(){t.inflateEnd();};}at.prototype={inflateInit:function(t){const e=this;return e.istate=new it,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.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=rt;};}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));configure({workerScripts:{inflate:[n],deflate:[n]}});}}; + /* + Copyright (c) 2021 Gildas Lormeau. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + + 3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, + INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + function getMimeType() { + return "application/octet-stream"; + } + const FUNCTION_TYPE = "function"; var streamCodecShim = (library, options = {}) => { @@ -1587,10 +1619,10 @@ class ZipReader { - constructor(reader, options = {}, config = {}) { + constructor(reader, options = {}) { this.reader = reader; this.options = options; - this.config = config; + this.config = getConfiguration(); } async getEntries(options = {}) { @@ -1926,41 +1958,6 @@ view.setUint32(offset, value, true); } - /* - Copyright (c) 2021 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - class ZipReader$1 extends ZipReader { - - constructor(reader, options) { - super(reader, options, getConfiguration()); - } - } - /* Copyright (c) 2021 Gildas Lormeau. All rights reserved. @@ -2004,10 +2001,10 @@ class ZipWriter { - constructor(writer, options = {}, config = {}) { + constructor(writer, options = {}) { this.writer = writer; this.options = options; - this.config = config; + this.config = getConfiguration(); this.files = new Map(); this.offset = writer.size; } @@ -2175,7 +2172,7 @@ zipWriter.lockPreviousFile = new Promise(resolve => resolveLockPreviousFile = resolve); } if (options.bufferedWrite || zipWriter.lockWrite) { - fileWriter = new Uint8ArrayWriter(); + fileWriter = new BlobWriter(); await fileWriter.init(); } else { zipWriter.lockWrite = new Promise(resolve => resolveLockWrite = resolve); @@ -2191,13 +2188,15 @@ } files.set(name, fileEntry); if (fileWriter != writer) { - if (zipWriter.lockWrite) { - await zipWriter.lockWrite; - } - if (lockPreviousFile) { - await lockPreviousFile; - } - await writer.writeUint8Array(fileWriter.getData()); + const blob = fileWriter.getData(); + const fileReader = new FileReader(); + const arrayBuffer = await new Promise((resolve, reject) => { + fileReader.onload = event => resolve(event.target.result); + fileReader.onerror = reject; + fileReader.readAsArrayBuffer(blob); + }); + await Promise.all([zipWriter.lockWrite, lockPreviousFile]); + await writer.writeUint8Array(new Uint8Array(arrayBuffer)); } fileEntry.offset = zipWriter.offset; if (fileEntry.zip64) { @@ -2360,73 +2359,6 @@ view.setBigUint64(offset, value, true); } - /* - Copyright (c) 2021 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - class ZipWriter$1 extends ZipWriter { - - constructor(writer, options) { - super(writer, options, getConfiguration()); - } - } - - /* - Copyright (c) 2021 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - function getMimeType() { - return "application/octet-stream"; - } - /* Copyright (c) 2021 Gildas Lormeau. All rights reserved. @@ -2491,8 +2423,8 @@ exports.Uint8ArrayReader = Uint8ArrayReader; exports.Uint8ArrayWriter = Uint8ArrayWriter; exports.Writer = Writer; - exports.ZipReader = ZipReader$1; - exports.ZipWriter = ZipWriter$1; + exports.ZipReader = ZipReader; + exports.ZipWriter = ZipWriter; exports.configure = configure; exports.getMimeType = getMimeType; exports.initShimAsyncCodec = streamCodecShim; diff --git a/dist/zip.min.js b/dist/zip.min.js index cc153ae5..df7245f6 100644 --- a/dist/zip.min.js +++ b/dist/zip.min.js @@ -1 +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,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.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}}}const a="function";function s(t,e){return class{constructor(n){const i=t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)};if(this.codec=new t(Object.assign({},e,n)),typeof this.codec.onData==a)this.codec.onData=i;else{if(typeof this.codec.on!=a)throw new Error("Cannot register the callback function");this.codec.on("data",i)}}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const o="HTTP error ",c="HTTP Range not supported",l="text/plain",d="Content-Length",u="Accept-Ranges",h="HEAD",f="GET",w="bytes";class p{constructor(){this.size=0}init(){this.initialized=!0}}class _ extends p{}class y extends p{writeUint8Array(t){this.size+=t.length}}class g extends _{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class b extends _{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(),R(this.url)&&!this.preventHeadRequest){const t=await m(h,this.url,this.options);if(this.size=Number(t.headers.get(d)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(u)!=w)throw new Error(c);void 0===this.size&&await x(this,this.options)}else await x(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await m(f,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(c);return new Uint8Array(await n.arrayBuffer())}return this.data||await x(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function x(t,e){const n=await m(f,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function m(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(o+(r.statusText||r.status))}class k extends _{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),R(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>v(h,this.url,(n=>{this.size=Number(n.getResponseHeader(d)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(u)==w?t():e(new Error(c)):void 0===this.size?A(this,this.url).then((()=>t())).catch(e):t()}),e)));await A(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await A(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>v(f,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(c)}}function A(t,e){return new Promise(((n,i)=>v(f,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function v(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(o+(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 U extends _{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new k(t,e):this.reader=new b(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)}}class E extends y{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}}function R(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 D=4294967295,F=65535,I=67324752,z=134695760,S=33639248,C=101010256,T=101075792,O=117853008,M=39169,V=2048,L="/",W=new Date(2107,11,31),N=new Date(1980,0,1),B="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const H=[];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;H[t]=e}class j{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^H[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const P="Invalid pasword",K=16,q="raw",Z={name:"PBKDF2"},Y={name:"HMAC"},X="SHA-1",G={name:"AES-CTR"},J=Object.assign({hash:Y},Z),Q=Object.assign({iterations:1e3,hash:{name:X}},Z),$=Object.assign({hash:X},Y),tt=Object.assign({length:K},G),et=["deriveBits"],nt=["sign"],it=[8,12,16],rt=[16,24,32],at=10,st=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ot=crypto.subtle;class ct{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+K<=i.length-at){const t=i.subarray(r,r+K),a=await ot.decrypt(Object.assign({counter:this.counter},tt),this.keys.key,t);return ut(this.counter),n.set(new Uint8Array(a),r),e(r+K)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=ht(this.input,t)),n};if(this.password){const e=t.subarray(0,it[this.strength]+2);await async function(t,e,n){await dt(t,n,e.subarray(0,it[t.strength]),["decrypt"]);const i=e.subarray(it[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(P)}(this,e,this.password),this.password=null,t=t.subarray(it[this.strength]+2)}let n=new Uint8Array(t.length-at-(t.length-at)%K),i=t;return this.pendingInput.length&&(i=ht(this.pendingInput,t),n=ft(n,i.length-at-(i.length-at)%K)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-at),i=t.subarray(t.length-at);let r=new Uint8Array(0);if(n.length){const t=await ot.decrypt(Object.assign({counter:this.counter},tt),e.key,n);r=new Uint8Array(t)}let a=!0;if(this.signed){const t=await ot.sign(Y,e.authentication,this.input.subarray(0,this.input.length-at)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(r+K<=t.length){const a=t.subarray(r,r+K),s=await ot.encrypt(Object.assign({counter:this.counter},tt),this.keys.key,a);return ut(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+K)}return this.pendingInput=t.subarray(r),this.output=ht(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(it[t.strength]));return await dt(t,e,n,["encrypt"]),ht(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%K);return i.set(n,0),this.pendingInput.length&&(t=ht(this.pendingInput,t),i=ft(i,t.length-t.length%K)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await ot.encrypt(Object.assign({counter:this.counter},tt),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=ht(this.output,t)}const e=await ot.sign(Y,this.keys.authentication,this.output.subarray(it[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,at);return{data:ht(t,n),signature:n}}}async function dt(t,e,n,i){t.counter=new Uint8Array(st);const r=(new TextEncoder).encode(e),a=await ot.importKey(q,r,J,!1,et),s=await ot.deriveBits(Object.assign({salt:n},Q),a,8*(2*rt[t.strength]+2)),o=new Uint8Array(s);t.keys={key:await ot.importKey(q,o.subarray(0,rt[t.strength]),G,!0,i),authentication:await ot.importKey(q,o.subarray(rt[t.strength],2*rt[t.strength]),$,!1,nt),passwordVerification:o.subarray(2*rt[t.strength])}}function ut(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function ht(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 ft(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const wt=12;class pt{constructor(t,e){this.password=t,this.passwordVerification=e,bt(this,t)}async append(t){if(this.password){const e=yt(this,t.subarray(0,wt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(P);t=t.subarray(wt)}return yt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class _t{constructor(t,e){this.passwordVerification=e,this.password=t,bt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(wt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(gt(this,i),0),n=wt}else e=new Uint8Array(t.length),n=0;return e.set(gt(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function yt(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function mt(t){const e=2|t.keys[2];return kt(Math.imul(e,1^e)>>>8)}function kt(t){return 255&t}function At(t){return 4294967295&t}const vt="deflate",Ut="inflate",Et="Invalid signature";class Rt{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new j,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new pt(e.password,e.passwordVerification):new ct(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(Et);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(Et)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Dt{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new j,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new _t(e.password,e.passwordVerification):new lt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Ft="init",It="append",zt="flush",St="message";var Ct=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip.min.js",document.baseURI).href)),t.worker.addEventListener(St,r,!1),t.interface={append:t=>n({type:It,data:t}),flush:()=>n({type:zt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:Ft,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==Ft||r==zt||r==It){const n=i.data;r==zt?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(vt)?new Dt(t,e):e.codecType.startsWith(Ut)?new Rt(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Tt=[],Ot=[];function Mt(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(Tt.length!t.busy));return n?Ct(n,t,e,Vt,i,r):new Promise((n=>Ot.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Vt(t){const e=!Ot.length;if(e)Tt=Tt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Ot.splice(0,1);e(Ct(t,n,i,Vt,r,a))}return e}async function Lt(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(c=0,l=0){if(cthis[e]=t[e]))}}const Ht="File format is not recognized",jt="End of central directory not found",Pt="End of Zip64 central directory not found",Kt="End of Zip64 central directory locator not found",qt="Central directory header not found",Zt="Local file header not found",Yt="Zip64 extra field not found",Xt="File contains encrypted entry",Gt="Encryption method not supported",Jt="Compression method not supported",Qt="utf-8",$t=["uncompressedSize","compressedSize","offset"];class te{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=re(this,e,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error(Jt);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error(Jt);if(ce(r,0)!=I)throw new Error(Zt);const s=this.localDirectory={};ee(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),ne(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,c=this.bitFlag.encrypted&&s.bitFlag.encrypted,l=c&&!this.extraFieldAES;if(c){if(!l&&void 0===this.extraFieldAES.strength)throw new Error(Gt);if(!a)throw new Error(Xt)}const d=await Mt(this.config.Inflate,{codecType:Ut,password:a,zipCrypto:l,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:re(this,e,"checkSignature"),passwordVerification:l&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:c,useWebWorkers:re(this,e,"useWebWorkers")},this.config);return t.initialized||await t.init(),await Lt(d,n,t,o,this.compressedSize,this.config,{onprogress:e.onprogress}),t.getData()}}function ee(t,e,n){t.version=oe(e,n);const i=t.rawBitFlag=oe(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&V)==V},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=ce(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>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){}}(t.rawLastModDate),t.filenameLength=oe(e,n+22),t.extraFieldLength=oe(e,n+24)}function ne(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==D));for(let e=0;e{if(e[n]==D){if(!t||void 0===t[n])throw new Error(Yt);e[n]=t[n]}}))}(l,e);const d=e.extraFieldUnicodePath=a.get(28789);d&&ie(d,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&ie(u,"comment","rawComment",e,t);const h=e.extraFieldAES=a.get(39169);h?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=se(i,0),t.vendorId=se(i,2);const r=se(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=oe(i,5)}else e.compressionMethod=n}(h,e,c):e.compressionMethod=c,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function ie(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=se(a,0),t.signature=ce(a,1);const s=new j;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==ce(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function re(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function ae(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n{if("function"==typeof URL.createObjectURL){const t=(()=>{const 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,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),c=Object.assign({length:16},r),l=["deriveBits"],d=["sign"],u=[8,12,16],h=[16,24,32],f=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=crypto.subtle;class p{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await w.decrypt(Object.assign({counter:this.counter},c),this.keys.key,t);return g(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=b(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await y(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=b(this.pendingInput,t),n=x(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await w.decrypt(Object.assign({counter:this.counter},c),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await w.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class _{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await w.encrypt(Object.assign({counter:this.counter},c),this.keys.key,a);return g(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=b(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await y(t,e,n,["encrypt"]),b(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=b(this.pendingInput,t),i=x(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await w.encrypt(Object.assign({counter:this.counter},c),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=b(this.output,t)}const e=await w.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:b(t,n),signature:n}}}async function y(t,e,n,i){t.counter=new Uint8Array(f);const c=(new TextEncoder).encode(e),u=await w.importKey("raw",c,a,!1,l),p=await w.deriveBits(Object.assign({salt:n},s),u,8*(2*h[t.strength]+2)),_=new Uint8Array(p);t.keys={key:await w.importKey("raw",_.subarray(0,h[t.strength]),r,!0,i),authentication:await w.importKey("raw",_.subarray(h[t.strength],2*h[t.strength]),o,!1,d),passwordVerification:_.subarray(2*h[t.strength])}}function g(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function b(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 x(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return A(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(v(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(v(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function R(t){const e=2|t.keys[2];return D(Math.imul(e,1^e)>>>8)}function D(t){return 255&t}function F(t){return 4294967295&t}class I{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new p(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class z{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new _(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const S={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),C=function(t,e){return e.codecType.startsWith("deflate")?new z(t,e):e.codecType.startsWith("inflate")?new I(t,e):void 0}(n,e)},append:async t=>({data:await C.append(t.data)}),flush:()=>C.flush()};let C;function T(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=S[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}})}}));const O=[0,1,2,3].concat(...T([[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 M(){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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,c,l=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);c=a;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*c]=i[2*s]+i[2*o],n.depth[c]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=c,n.heap[1]=c++,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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,c,l,d,u,h,f=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++)c=e.heap[o],d=n[2*n[2*c+1]+1]+1,d>s&&(d=s,f++),n[2*c+1]=d,c>t.max_code||(e.bl_count[d]++,u=0,c>=a&&(u=r[c-a]),h=n[2*c],e.opt_len+=h*(d+u),i&&(e.static_len+=h*(i[2*c+1]+u)));if(0!==f){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]--,f-=2}while(f>0);for(d=s;0!==d;d--)for(c=e.bl_count[d];0!==c;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=d&&(e.opt_len+=(d-n[2*l+1])*n[2*l],n[2*l+1]=d),c--)}}(n),function(t,n,i){const r=[];let a,s,o,c=0;for(a=1;a<=15;a++)r[a]=c=c+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function V(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function L(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}M._length_code=[0,1,2,3,4,5,6,7].concat(...T([[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]])),M.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],M.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],M.d_code=function(t){return t<256?O[t]:O[256+(t>>>7)]},M.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],M.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],M.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],M.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],V.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],V.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],V.static_l_desc=new V(V.static_ltree,M.extra_lbits,257,286,15),V.static_d_desc=new V(V.static_dtree,M.extra_dbits,0,30,15),V.static_bl_desc=new V(null,M.extra_blbits,0,19,7);const W=[new L(0,0,0,0,0),new L(4,4,8,4,1),new L(4,5,16,8,1),new L(4,6,32,32,1),new L(4,4,16,16,2),new L(8,16,32,32,2),new L(8,16,128,128,2),new L(8,32,128,256,2),new L(32,128,258,1024,2),new L(32,258,258,4096,2)],N=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function B(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;X>16-i?(n=t,Y|=n<>>16-X,X+=i-16):(Y|=t<=8&&(Q(255&Y),Y>>>=8,X-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[K+2*P]=e>>>8&255,t.pending_buf[K+2*P+1]=255&e,t.pending_buf[H+P]=255&n,P++,0===e?z[2*n]++:(q++,e--,z[2*(M._length_code[n]+256+1)]++,S[2*M.d_code(e)]++),0==(8191&P)&&R>2){for(i=8*P,r=m-y,a=0;a<30;a++)i+=S[2*a]*(5+M.extra_dbits[a]);if(i>>>=3,q8?$(Y):X>0&&Q(255&Y),Y=0,X=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),Z=8,$(n),$(~n),t.pending_buf.set(c.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function ct(e,n,i){let r,a,s=0;R>0?(T.build_tree(t),O.build_tree(t),s=function(){let e;for(J(z,T.max_code),J(S,O.max_code),L.build_tree(t),e=18;e>=3&&0===C[2*M.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(V.static_ltree,V.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?y:-1,m-y,t),y=m,e.flush_pending()}function dt(){let t,n,i,r;do{if(r=l-A-m,0===r&&0===m&&0===A)r=a;else if(-1==r)r--;else if(m>=a+a-262){c.set(c.subarray(a,a+a),0),k-=a,m-=a,y-=a,t=f,i=t;do{n=65535&u[--i],u[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&d[--i],d[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(c,m+A,r),A+=t,A>=3&&(h=255&c[m],h=(h<<_^255&c[m+1])&p)}while(A<262&&0!==e.avail_in)}function ut(t){let e,n,i=U,r=m,s=v;const l=m>a-262?m-(a-262):0;let u=I;const h=o,f=m+258;let w=c[r+s-1],p=c[r+s];v>=F&&(i>>=2),u>A&&(u=A);do{if(e=t,c[e+s]==p&&c[e+s-1]==w&&c[e]==c[r]&&c[++e]==c[r+1]){r+=2,e++;do{}while(c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&c[++r]==c[++e]&&rs){if(k=t,s=n,n>=u)break;w=c[r+s-1],p=c[r+s]}}}while((t=65535&d[t&h])>l&&0!=--i);return s<=A?s:A}function ht(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,T.dyn_tree=z,T.stat_desc=V.static_l_desc,O.dyn_tree=S,O.stat_desc=V.static_d_desc,L.dyn_tree=C,L.stat_desc=V.static_bl_desc,Y=0,X=0,Z=8,G(),function(){l=2*a,u[f-1]=0;for(let t=0;t9||8!=l||r<9||r>15||n<0||n>9||y<0||y>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(W[R].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=W[R].max_lazy,F=W[R].good_length,I=W[R].nice_length,U=W[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,l=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,l=i-s),c.set(e.subarray(l,l+s),0),m=s,y=s,h=255&c[0],h=(h<<_^255&c[1])&p,r=0;r<=s-3;r++)h=(h<<_^255&c[r+2])&p,d[r&o]=u[h],u[h]=r;return 0},t.deflate=function(l,w){let U,F,I,z,S;if(w>4||w<0)return-2;if(!l.next_out||!l.next_in&&0!==l.avail_in||666==n&&4!=w)return l.msg=N[4],-2;if(0===l.avail_out)return l.msg=N[7],-5;var C;if(e=l,z=r,r=w,42==n&&(F=8+(s-8<<4)<<8,I=(R-1&255)>>1,I>3&&(I=3),F|=I<<6,0!==m&&(F|=32),F+=31-F%31,n=113,Q((C=F)>>8&255),Q(255&C)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&w<=z&&4!=w)return e.msg=N[7],-5;if(666==n&&0!==e.avail_in)return l.msg=N[7],-5;if(0!==e.avail_in||0!==A||0!=w&&666!=n){switch(S=-1,W[R].func){case 0:S=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(A<=1){if(dt(),0===A&&0==t)return 0;if(0===A)break}if(m+=A,A=0,n=y+r,(0===m||m>=n)&&(A=m-n,m=n,lt(!1),0===e.avail_out))return 0;if(m-y>=a-262&&(lt(!1),0===e.avail_out))return 0}return lt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(w);break;case 1:S=function(t){let n,i=0;for(;;){if(A<262){if(dt(),A<262&&0==t)return 0;if(0===A)break}if(A>=3&&(h=(h<<_^255&c[m+2])&p,i=65535&u[h],d[m&o]=u[h],u[h]=m),0!==i&&(m-i&65535)<=a-262&&2!=D&&(g=ut(i)),g>=3)if(n=rt(m-k,g-3),A-=g,g<=E&&A>=3){g--;do{m++,h=(h<<_^255&c[m+2])&p,i=65535&u[h],d[m&o]=u[h],u[h]=m}while(0!=--g);m++}else m+=g,g=0,h=255&c[m],h=(h<<_^255&c[m+1])&p;else n=rt(0,255&c[m]),A--,m++;if(n&&(lt(!1),0===e.avail_out))return 0}return lt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(w);break;case 2:S=function(t){let n,i,r=0;for(;;){if(A<262){if(dt(),A<262&&0==t)return 0;if(0===A)break}if(A>=3&&(h=(h<<_^255&c[m+2])&p,r=65535&u[h],d[m&o]=u[h],u[h]=m),v=g,b=k,g=2,0!==r&&v4096)&&(g=2)),v>=3&&g<=v){i=m+A-3,n=rt(m-1-b,v-3),A-=v-1,v-=2;do{++m<=i&&(h=(h<<_^255&c[m+2])&p,r=65535&u[h],d[m&o]=u[h],u[h]=m)}while(0!=--v);if(x=0,g=2,m++,n&&(lt(!1),0===e.avail_out))return 0}else if(0!==x){if(n=rt(0,255&c[m-1]),n&<(!1),m++,A--,0===e.avail_out)return 0}else x=1,m++,A--}return 0!==x&&(n=rt(0,255&c[m-1]),x=0),lt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(w)}if(2!=S&&3!=S||(n=666),0==S||2==S)return 0===e.avail_out&&(r=-1),0;if(1==S){if(1==w)tt(2,3),et(256,V.static_ltree),it(),1+Z+10-X<9&&(tt(2,3),et(256,V.static_ltree),it()),Z=7;else if(ot(0,0,!1),3==w)for(U=0;U0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(l),d.forEach((function(t){s.set(t,c),c+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}j.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new H,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 r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 K=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],q=[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],Y=[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],X=[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],G=[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],J=[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 Q(){let t,e,n,i,r,a;function s(t,e,s,o,c,l,d,u,h,f,w){let p,_,y,g,b,x,m,k,A,v,U,E,R,D,F;v=0,b=s;do{n[t[e+v]]++,v++,b--}while(0!==b);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(k=u[0],x=1;x<=15&&0===n[x];x++);for(m=x,kb&&(k=b),u[0]=k,D=1<E+k;){if(g++,E+=k,F=y-E,F=F>k?k:F,(_=1<<(x=m-E))>p+1&&(_-=p+1,R=m,x1440)return-3;r[g]=U=f[0],f[0]+=F,0!==g?(a[g]=b,i[0]=x,i[1]=k,x=b>>>E-k,i[2]=U-r[g-1]-x,h.set(i,3*(r[g-1]+x))):d[0]=U}for(i[1]=m-E,v>=s?i[0]=192:w[v]>>E;x>>=1)b^=x;for(b^=x,A=(1<257?(-3==f?h.msg="oversubscribed distance tree":-5==f?(h.msg="incomplete distance tree",f=-3):-4!=f&&(h.msg="empty distance tree with lengths",f=-3),f):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,c=0,l=0,d=0,u=0,h=0,f=0,w=0;function p(t,e,n,i,r,a,s,o){let c,l,d,u,h,f,w,p,_,y,g,b,x,m,k,A;w=o.next_in_index,p=o.avail_in,h=s.bitb,f=s.bitk,_=s.write,y=_>=l[A+1],f-=l[A+1],0!=(16&u)){for(u&=15,x=l[A+2]+(h&K[u]),h>>=u,f-=u;f<15;)p--,h|=(255&o.read_byte(w++))<>=l[A+1],f-=l[A+1],0!=(16&u)){for(u&=15;f>=u,f-=u,y-=x,_>=m)k=_-m,_-k>0&&2>_-k?(s.window[_++]=s.window[k++],s.window[_++]=s.window[k++],x-=2):(s.window.set(s.window.subarray(k,k+2),_),_+=2,k+=2,x-=2);else{k=_-m;do{k+=s.end}while(k<0);if(u=s.end-k,x>u){if(x-=u,_-k>0&&u>_-k)do{s.window[_++]=s.window[k++]}while(0!=--u);else s.window.set(s.window.subarray(k,k+u),_),_+=u,k+=u,u=0;k=0}}if(_-k>0&&x>_-k)do{s.window[_++]=s.window[k++]}while(0!=--x);else s.window.set(s.window.subarray(k,k+x),_),_+=x,k+=x,x=0;break}if(0!=(64&u))return o.msg="invalid distance code",x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=h,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=_,-3;c+=l[A+2],c+=h&K[u],A=3*(d+c),u=l[A]}break}if(0!=(64&u))return 0!=(32&u)?(x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=h,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=_,1):(o.msg="invalid literal/length code",x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=h,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=_,-3);if(c+=l[A+2],c+=h&K[u],A=3*(d+c),0===(u=l[A])){h>>=l[A+1],f-=l[A+1],s.window[_++]=l[A+2],y--;break}}else h>>=l[A+1],f-=l[A+1],s.window[_++]=l[A+2],y--}while(y>=258&&p>=10);return x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=h,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=_,0}t.init=function(t,a,s,o,c,l){e=0,u=t,h=a,i=s,f=o,r=c,w=l,n=null},t.proc=function(t,_,y){let g,b,x,m,k,A,v,U=0,E=0,R=0;for(R=_.next_in_index,m=_.avail_in,U=t.bitb,E=t.bitk,k=t.write,A=k=258&&m>=10&&(t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=k,y=p(u,h,i,f,r,w,t,_),R=_.next_in_index,m=_.avail_in,U=t.bitb,E=t.bitk,k=t.write,A=k>>=n[b+1],E-=n[b+1],x=n[b],0===x){c=n[b+2],e=6;break}if(0!=(16&x)){l=15&x,a=n[b+2],e=2;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}if(0!=(32&x)){e=7;break}return e=9,_.msg="invalid literal/length code",y=-3,t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=k,t.inflate_flush(_,y);case 2:for(g=l;E>=g,E-=g,o=h,n=r,s=w,e=3;case 3:for(g=o;E>=n[b+1],E-=n[b+1],x=n[b],0!=(16&x)){l=15&x,d=n[b+2],e=4;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}return e=9,_.msg="invalid distance code",y=-3,t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=k,t.inflate_flush(_,y);case 4:for(g=l;E>=g,E-=g,e=5;case 5:for(v=k-d;v<0;)v+=t.end;for(;0!==a;){if(0===A&&(k==t.end&&0!==t.read&&(k=0,A=k7&&(E-=8,m++,R--),t.write=k,y=t.inflate_flush(_,y),k=t.write,A=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(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,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(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let w,p,_,y,g,b,x,m;for(y=t.next_in_index,g=t.avail_in,p=n.bitb,_=n.bitk,b=n.write,x=b>>1){case 0:p>>>=3,_-=3,w=7&_,p>>>=w,_-=w,r=1;break;case 1:k=[],A=[],v=[[]],U=[[]],Q.inflate_trees_fixed(k,A,v,U),d.init(k[0],A[0],v[0],0,U[0],0),p>>>=3,_-=3,r=6;break;case 2:p>>>=3,_-=3,r=3;break;case 3:return p>>>=3,_-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e)}break;case 1:for(;_<32;){if(0===g)return n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,p|=(255&t.read_byte(y++))<<_,_+=8}if((~p>>>16&65535)!=(65535&p))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);a=65535&p,p=_=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===g)return n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(0===x&&(b==n.end&&0!==n.read&&(b=0,x=bg&&(w=g),w>x&&(w=x),n.window.set(t.read_buf(y,w),b),y+=w,g-=w,b+=w,x-=w,0!=(a-=w))break;r=0!==u?7:0;break;case 3:for(;_<14;){if(0===g)return n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,p|=(255&t.read_byte(y++))<<_,_+=8}if(s=w=16383&p,(31&w)>29||(w>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(w=258+(31&w)+(w>>5&31),!i||i.length>>=14,_-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;_<3;){if(0===g)return n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,p|=(255&t.read_byte(y++))<<_,_+=8}i[tt[o++]]=7&p,p>>>=3,_-=3}for(;o<19;)i[tt[o++]]=0;if(c[0]=7,w=f.inflate_trees_bits(i,c,l,h,t),0!=w)return-3==(e=w)&&(i=null,r=9),n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);o=0,r=5;case 5:for(;w=s,!(o>=258+(31&w)+(w>>5&31));){let a,d;for(w=c[0];_>>=w,_-=w,i[o++]=d;else{for(m=18==d?7:d-14,a=18==d?11:3;_>>=w,_-=w,a+=p&K[m],p>>>=m,_-=m,m=o,w=s,m+a>258+(31&w)+(w>>5&31)||16==d&&m<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);d=16==d?i[m-1]:0;do{i[m++]=d}while(0!=--a);o=m}}if(l[0]=-1,E=[],R=[],D=[],F=[],E[0]=9,R[0]=6,w=s,w=f.inflate_trees_dynamic(257+(31&w),1+(w>>5&31),i,E,R,D,F,h,t),0!=w)return-3==w&&(i=null,r=9),e=w,n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);d.init(E[0],R[0],h,D[0],h,F[0]),r=6;case 6:if(n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),y=t.next_in_index,g=t.avail_in,p=n.bitb,_=n.bitk,b=n.write,x=b15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=c&&(r(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(d),a.forEach((function(t){o.set(t,l),l+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,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.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=P,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));r({workerScripts:{inflate:[e],deflate:[e]}})}})(),t.BlobReader=g,t.BlobWriter=class extends y{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}},t.Data64URIReader=class extends _{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_BAD_FORMAT=Ht,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=qt,t.ERR_DUPLICATED_NAME=de,t.ERR_ENCRYPTED=Xt,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Kt,t.ERR_EOCDR_NOT_FOUND=jt,t.ERR_EOCDR_ZIP64_NOT_FOUND=Pt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Yt,t.ERR_HTTP_RANGE=c,t.ERR_INVALID_COMMENT=ue,t.ERR_INVALID_DATE=pe,t.ERR_INVALID_ENCRYPTION_STRENGTH=_e,t.ERR_INVALID_ENTRY_COMMENT=he,t.ERR_INVALID_ENTRY_NAME=fe,t.ERR_INVALID_EXTRAFIELD_DATA=ge,t.ERR_INVALID_EXTRAFIELD_TYPE=ye,t.ERR_INVALID_PASSWORD=P,t.ERR_INVALID_SIGNATURE=Et,t.ERR_INVALID_VERSION=we,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Zt,t.ERR_UNSUPPORTED_COMPRESSION=Jt,t.ERR_UNSUPPORTED_ENCRYPTION=Gt,t.HttpRangeReader=class extends U{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=U,t.Reader=_,t.TextReader=class extends _{constructor(t){super(),this.blobReader=new g(new Blob([t],{type:l}))}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 y{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:l})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:l})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends _{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=E,t.Writer=y,t.ZipReader=class extends class{constructor(t,e={},n={}){this.reader=t,this.options=e,this.config=n}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Ht);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,C,22,1048560);if(!n)throw new Error(jt);const i=new DataView(n.buffer);let r=ce(i,12),a=ce(i,16),s=oe(i,8),o=0;if(a==D||r==D||s==F){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(ce(i,0)!=O)throw new Error(Pt);a=le(i,8);let c=await e.readUint8Array(a,56),l=new DataView(c.buffer);const d=n.offset-20-56;if(ce(l,0)!=T&&a!=d){const t=a;a=d,o=a-t,c=await e.readUint8Array(a,56),l=new DataView(c.buffer)}if(ce(l,0)!=T)throw new Error(Kt);s=le(l,24),r=le(i,4),a-=le(l,40)}if(a<0||a>=e.size)throw new Error(Ht);let c=0,l=await e.readUint8Array(a,e.size-a),d=new DataView(l.buffer);const u=n.offset-r;if(ce(d,c)!=S&&a!=u){const t=a;a=u,o=a-t,l=await e.readUint8Array(a,e.size-a),d=new DataView(l.buffer)}if(a<0||a>=e.size)throw new Error(Ht);const h=[];for(let e=0;ee.getData(t,n),h.push(r),c+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return h}async close(){}}{constructor(t,e){super(t,e,i())}},t.ZipWriter=class extends class{constructor(t,e={},n={}){this.writer=t,this.options=e,this.config=n,this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(L)?t+=L:n.directory=t.endsWith(L),this.files.has(t))throw new Error(de);const i=(new TextEncoder).encode(t);if(i.length>F)throw new Error(fe);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>F)throw new Error(he);const s=this.options.version||n.version||0;if(s>F)throw new Error(we);const o=n.lastModDate||new Date;if(oW)throw new Error(pe);const c=xe(this,n,"password"),l=xe(this,n,"encryptionStrength")||3,d=xe(this,n,"zipCrypto");if(void 0!==c&&void 0!==l&&(l<1||l>3))throw new Error(_e);e&&!e.initialized&&await e.init();let u=new Uint8Array(0);const h=n.extraField;if(h){let t=0,e=0;h.forEach((e=>t+=4+e.length)),u=new Uint8Array(t),h.forEach(((t,n)=>{if(n>F)throw new Error(ye);if(t.length>F)throw new Error(ge);u.set(new Uint16Array([n]),e),u.set(new Uint16Array([t.length]),e+2),u.set(t,e+4),e+=4+t.length}))}const f=e?1.05*e.size:0,w=n.zip64||this.options.zip64||this.offset>=D||f>=D||this.offset+f>=D,p=xe(this,n,"level"),_=xe(this,n,"useWebWorkers"),y=xe(this,n,"bufferedWrite"),g=xe(this,n,"keepOrder"),b=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,c;r.set(e,null);try{let l,d;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>c=t))),i.bufferedWrite||t.lockWrite?(l=new E,await l.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),l=a),d=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),c=i.level,l=0!==c&&!i.directory,d=i.zip64;let u,h;if(o&&!i.zipCrypto){u=new Uint8Array(be.length+2);const t=new DataView(u.buffer);ke(t,0,M),u.set(be,2),h=i.encryptionStrength,me(t,8,h)}else u=new Uint8Array(0);const f={version:i.version||20,zip64:d,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:d?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let w=2056,p=0;l&&(p=8);d&&(f.version=f.version>45?f.version:45);o&&(w|=1,i.zipCrypto||(f.version=f.version>51?f.version:51,p=99,l&&(f.rawExtraFieldAES[9]=8)));const _=f.headerArray=new Uint8Array(26),y=new DataView(_.buffer);ke(y,0,f.version),ke(y,2,w),ke(y,4,p);const g=new Uint32Array(1),b=new DataView(g.buffer);ke(b,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),ke(b,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=g[0];Ae(y,6,x),ke(y,22,r.length),ke(y,24,0);const m=new Uint8Array(30+r.length);let k;Ae(new DataView(m.buffer),0,I),m.set(_,4),m.set(r,30);let A=0,v=0;if(t){A=t.size;const r=await Mt(n.Deflate,{codecType:vt,level:c,password:s,encryptionStrength:h,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:l,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),k=await Lt(r,t,e,0,A,n,{onprogress:i.onprogress}),v=k.length}else await e.writeUint8Array(m);const U=new Uint8Array(d?24:16),E=new DataView(U.buffer);if(Ae(E,0,z),t)if(o&&!i.zipCrypto||void 0===k.signature||(Ae(y,10,k.signature),Ae(E,4,k.signature),f.signature=k.signature),d){const t=new DataView(f.rawExtraFieldZip64.buffer);ke(t,0,1),ke(t,2,24),Ae(y,14,D),ve(E,8,BigInt(v)),ve(t,12,BigInt(v)),Ae(y,18,D),ve(E,16,BigInt(A)),ve(t,4,BigInt(A))}else Ae(y,14,v),Ae(E,8,v),Ae(y,18,A),Ae(E,12,A);await e.writeUint8Array(U);const R=m.length+(k?k.length:0)+U.length;return Object.assign(f,{compressedSize:v,uncompressedSize:A,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),f}(n,l,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,d),l!=a&&(t.lockWrite&&await t.lockWrite,o&&await o,await a.writeUint8Array(l.getData())),d.offset=t.offset,d.zip64){ve(new DataView(d.rawExtraFieldZip64.buffer),20,BigInt(d.offset))}return t.offset+=d.length,d}finally{c&&c(),s&&(t.lockWrite=null,s())}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:u,zip64:w,password:c,level:p,useWebWorkers:_,encryptionStrength:l,zipCrypto:d,bufferedWrite:y,keepOrder:g}));return Object.assign(b,{name:t,comment:r,extraField:h}),new Bt(b)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=D||r>=D||s>=F,c=new Uint8Array(r+(o?98:22)),l=new DataView(c.buffer);if(t.length){if(!(t.length<=F))throw new Error(ue);ke(l,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;Ae(l,i,S),ke(l,i+4,t.version),c.set(t.headerArray,i+6),ke(l,i+30,a),ke(l,i+32,t.rawComment.length),t.directory&&me(l,i+38,16),t.zip64?Ae(l,i+42,D):Ae(l,i+42,t.offset),c.set(e,i+46),c.set(n,i+46+e.length),c.set(r,i+46+e.length+n.length),c.set(t.rawExtraField,46+e.length+n.length+r.length),c.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(Ae(l,i,T),ve(l,i+4,BigInt(44)),ke(l,i+12,45),ke(l,i+14,45),ve(l,i+24,BigInt(s)),ve(l,i+32,BigInt(s)),ve(l,i+40,BigInt(r)),ve(l,i+48,BigInt(a)),Ae(l,i+56,O),ve(l,i+64,BigInt(a)+BigInt(r)),Ae(l,i+72,1),s=F,a=D,r=D,i+=76),Ae(l,i,C),ke(l,i+8,s),ke(l,i+10,s),Ae(l,i+12,r),Ae(l,i+16,a),await e.writeUint8Array(c),t.length&&await e.writeUint8Array(t),e.getData()}}{constructor(t,e){super(t,e,i())}},t.configure=r,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={})=>({Deflate:s(t.Deflate,e.deflate),Inflate:s(t.Inflate,e.inflate)}),Object.defineProperty(t,"__esModule",{value:!0})})); +!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,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.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}}}const a="function";function s(t,e){return class{constructor(n){const i=t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)};if(this.codec=new t(Object.assign({},e,n)),typeof this.codec.onData==a)this.codec.onData=i;else{if(typeof this.codec.on!=a)throw new Error("Cannot register the callback function");this.codec.on("data",i)}}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const o="HTTP error ",l="HTTP Range not supported",c="text/plain",d="Content-Length",u="Accept-Ranges",h="HEAD",f="GET",w="bytes";class p{constructor(){this.size=0}init(){this.initialized=!0}}class _ extends p{}class y extends p{writeUint8Array(t){this.size+=t.length}}class g extends _{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class b extends y{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class x extends _{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(),R(this.url)&&!this.preventHeadRequest){const t=await k(h,this.url,this.options);if(this.size=Number(t.headers.get(d)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(u)!=w)throw new Error(l);void 0===this.size&&await m(this,this.options)}else await m(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await k(f,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(l);return new Uint8Array(await n.arrayBuffer())}return this.data||await m(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function m(t,e){const n=await k(f,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function k(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(o+(r.statusText||r.status))}class A extends _{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),R(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>U(h,this.url,(n=>{this.size=Number(n.getResponseHeader(d)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(u)==w?t():e(new Error(l)):void 0===this.size?v(this,this.url).then((()=>t())).catch(e):t()}),e)));await v(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await v(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>U(f,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(l)}}function v(t,e){return new Promise(((n,i)=>U(f,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function U(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(o+(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 E extends _{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new A(t,e):this.reader=new x(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 R(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 D=4294967295,F=65535,I=67324752,z=134695760,S=33639248,C=101010256,T=101075792,O=117853008,M=39169,V=2048,L="/",W=new Date(2107,11,31),N=new Date(1980,0,1),B="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const P=[];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;P[t]=e}class H{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^P[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const j="Invalid pasword",K=16,q="raw",Z={name:"PBKDF2"},Y={name:"HMAC"},X="SHA-1",G={name:"AES-CTR"},J=Object.assign({hash:Y},Z),Q=Object.assign({iterations:1e3,hash:{name:X}},Z),$=Object.assign({hash:X},Y),tt=Object.assign({length:K},G),et=["deriveBits"],nt=["sign"],it=[8,12,16],rt=[16,24,32],at=10,st=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ot=crypto.subtle;class lt{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+K<=i.length-at){const t=i.subarray(r,r+K),a=await ot.decrypt(Object.assign({counter:this.counter},tt),this.keys.key,t);return ut(this.counter),n.set(new Uint8Array(a),r),e(r+K)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=ht(this.input,t)),n};if(this.password){const e=t.subarray(0,it[this.strength]+2);await async function(t,e,n){await dt(t,n,e.subarray(0,it[t.strength]),["decrypt"]);const i=e.subarray(it[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error(j)}(this,e,this.password),this.password=null,t=t.subarray(it[this.strength]+2)}let n=new Uint8Array(t.length-at-(t.length-at)%K),i=t;return this.pendingInput.length&&(i=ht(this.pendingInput,t),n=ft(n,i.length-at-(i.length-at)%K)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-at),i=t.subarray(t.length-at);let r=new Uint8Array(0);if(n.length){const t=await ot.decrypt(Object.assign({counter:this.counter},tt),e.key,n);r=new Uint8Array(t)}let a=!0;if(this.signed){const t=await ot.sign(Y,e.authentication,this.input.subarray(0,this.input.length-at)),n=new Uint8Array(t);this.input=null;for(let t=0;t{if(r+K<=t.length){const a=t.subarray(r,r+K),s=await ot.encrypt(Object.assign({counter:this.counter},tt),this.keys.key,a);return ut(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+K)}return this.pendingInput=t.subarray(r),this.output=ht(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(it[t.strength]));return await dt(t,e,n,["encrypt"]),ht(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%K);return i.set(n,0),this.pendingInput.length&&(t=ht(this.pendingInput,t),i=ft(i,t.length-t.length%K)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await ot.encrypt(Object.assign({counter:this.counter},tt),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=ht(this.output,t)}const e=await ot.sign(Y,this.keys.authentication,this.output.subarray(it[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,at);return{data:ht(t,n),signature:n}}}async function dt(t,e,n,i){t.counter=new Uint8Array(st);const r=(new TextEncoder).encode(e),a=await ot.importKey(q,r,J,!1,et),s=await ot.deriveBits(Object.assign({salt:n},Q),a,8*(2*rt[t.strength]+2)),o=new Uint8Array(s);t.keys={key:await ot.importKey(q,o.subarray(0,rt[t.strength]),G,!0,i),authentication:await ot.importKey(q,o.subarray(rt[t.strength],2*rt[t.strength]),$,!1,nt),passwordVerification:o.subarray(2*rt[t.strength])}}function ut(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function ht(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 ft(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const wt=12;class pt{constructor(t,e){this.password=t,this.passwordVerification=e,bt(this,t)}async append(t){if(this.password){const e=yt(this,t.subarray(0,wt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(j);t=t.subarray(wt)}return yt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class _t{constructor(t,e){this.passwordVerification=e,this.password=t,bt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(wt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(gt(this,i),0),n=wt}else e=new Uint8Array(t.length),n=0;return e.set(gt(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function yt(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function mt(t){const e=2|t.keys[2];return kt(Math.imul(e,1^e)>>>8)}function kt(t){return 255&t}function At(t){return 4294967295&t}const vt="deflate",Ut="inflate",Et="Invalid signature";class Rt{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new H,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new pt(e.password,e.passwordVerification):new lt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(Et);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(Et)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Dt{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new H,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new _t(e.password,e.passwordVerification):new ct(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Ft="init",It="append",zt="flush",St="message";var Ct=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip.min.js",document.baseURI).href)),t.worker.addEventListener(St,r,!1),t.interface={append:t=>n({type:It,data:t}),flush:()=>n({type:zt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:Ft,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==Ft||r==zt||r==It){const n=i.data;r==zt?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(vt)?new Dt(t,e):e.codecType.startsWith(Ut)?new Rt(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Tt=[],Ot=[];function Mt(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(Tt.length!t.busy));return n?Ct(n,t,e,Vt,i,r):new Promise((n=>Ot.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Vt(t){const e=!Ot.length;if(e)Tt=Tt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Ot.splice(0,1);e(Ct(t,n,i,Vt,r,a))}return e}async function Lt(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(l=0,c=0){if(lthis[e]=t[e]))}}const Pt="File format is not recognized",Ht="End of central directory not found",jt="End of Zip64 central directory not found",Kt="End of Zip64 central directory locator not found",qt="Central directory header not found",Zt="Local file header not found",Yt="Zip64 extra field not found",Xt="File contains encrypted entry",Gt="Encryption method not supported",Jt="Compression method not supported",Qt="utf-8",$t=["uncompressedSize","compressedSize","offset"];class te{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=await n.readUint8Array(this.offset,30),r=new DataView(i.buffer);let a=re(this,e,"password");if(a=a&&a.length&&a,this.extraFieldAES&&99!=this.extraFieldAES.originalCompressionMethod)throw new Error(Jt);if(0!=this.compressionMethod&&8!=this.compressionMethod)throw new Error(Jt);if(le(r,0)!=I)throw new Error(Zt);const s=this.localDirectory={};ee(s,r,4),s.rawExtraField=i.subarray(this.offset+30+s.filenameLength,this.offset+30+s.filenameLength+s.extraFieldLength),ne(this,s,r,4);const o=this.offset+30+s.filenameLength+s.extraFieldLength,l=this.bitFlag.encrypted&&s.bitFlag.encrypted,c=l&&!this.extraFieldAES;if(l){if(!c&&void 0===this.extraFieldAES.strength)throw new Error(Gt);if(!a)throw new Error(Xt)}const d=await Mt(this.config.Inflate,{codecType:Ut,password:a,zipCrypto:c,encryptionStrength:this.extraFieldAES&&this.extraFieldAES.strength,signed:re(this,e,"checkSignature"),passwordVerification:c&&(this.bitFlag.dataDescriptor?this.rawLastModDate>>>8&255:this.signature>>>24&255),signature:this.signature,compressed:0!=this.compressionMethod,encrypted:l,useWebWorkers:re(this,e,"useWebWorkers")},this.config);return t.initialized||await t.init(),await Lt(d,n,t,o,this.compressedSize,this.config,{onprogress:e.onprogress}),t.getData()}}function ee(t,e,n){t.version=oe(e,n);const i=t.rawBitFlag=oe(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&V)==V},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=le(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>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){}}(t.rawLastModDate),t.filenameLength=oe(e,n+22),t.extraFieldLength=oe(e,n+24)}function ne(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==D));for(let e=0;e{if(e[n]==D){if(!t||void 0===t[n])throw new Error(Yt);e[n]=t[n]}}))}(c,e);const d=e.extraFieldUnicodePath=a.get(28789);d&&ie(d,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&ie(u,"comment","rawComment",e,t);const h=e.extraFieldAES=a.get(39169);h?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=se(i,0),t.vendorId=se(i,2);const r=se(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=oe(i,5)}else e.compressionMethod=n}(h,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function ie(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=se(a,0),t.signature=le(a,1);const s=new H;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==le(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function re(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function ae(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n{if("function"==typeof URL.createObjectURL){const t=(()=>{const 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,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},r),c=["deriveBits"],d=["sign"],u=[8,12,16],h=[16,24,32],f=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=crypto.subtle;class p{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await w.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return g(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=b(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await y(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=b(this.pendingInput,t),n=x(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await w.decrypt(Object.assign({counter:this.counter},l),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await w.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class _{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await w.encrypt(Object.assign({counter:this.counter},l),this.keys.key,a);return g(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=b(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await y(t,e,n,["encrypt"]),b(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=b(this.pendingInput,t),i=x(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await w.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=b(this.output,t)}const e=await w.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:b(t,n),signature:n}}}async function y(t,e,n,i){t.counter=new Uint8Array(f);const l=(new TextEncoder).encode(e),u=await w.importKey("raw",l,a,!1,c),p=await w.deriveBits(Object.assign({salt:n},s),u,8*(2*h[t.strength]+2)),_=new Uint8Array(p);t.keys={key:await w.importKey("raw",_.subarray(0,h[t.strength]),r,!0,i),authentication:await w.importKey("raw",_.subarray(h[t.strength],2*h[t.strength]),o,!1,d),passwordVerification:_.subarray(2*h[t.strength])}}function g(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function b(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 x(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return A(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(v(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(v(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function R(t){const e=2|t.keys[2];return D(Math.imul(e,1^e)>>>8)}function D(t){return 255&t}function F(t){return 4294967295&t}class I{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new p(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class z{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new _(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const S={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),C=function(t,e){return e.codecType.startsWith("deflate")?new z(t,e):e.codecType.startsWith("inflate")?new I(t,e):void 0}(n,e)},append:async t=>({data:await C.append(t.data)}),flush:()=>C.flush()};let C;function T(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=S[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}})}}));const O=[0,1,2,3].concat(...T([[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 M(){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,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,c=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;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,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,c,d,u,h,f=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,f++),n[2*l+1]=d,l>t.max_code||(e.bl_count[d]++,u=0,l>=a&&(u=r[l-a]),h=n[2*l],e.opt_len+=h*(d+u),i&&(e.static_len+=h*(i[2*l+1]+u)));if(0!==f){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]--,f-=2}while(f>0);for(d=s;0!==d;d--)for(l=e.bl_count[d];0!==l;)c=e.heap[--o],c>t.max_code||(n[2*c+1]!=d&&(e.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function V(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function L(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}M._length_code=[0,1,2,3,4,5,6,7].concat(...T([[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]])),M.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],M.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],M.d_code=function(t){return t<256?O[t]:O[256+(t>>>7)]},M.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],M.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],M.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],M.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],V.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],V.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],V.static_l_desc=new V(V.static_ltree,M.extra_lbits,257,286,15),V.static_d_desc=new V(V.static_dtree,M.extra_dbits,0,30,15),V.static_bl_desc=new V(null,M.extra_blbits,0,19,7);const W=[new L(0,0,0,0,0),new L(4,4,8,4,1),new L(4,5,16,8,1),new L(4,6,32,32,1),new L(4,4,16,16,2),new L(8,16,32,32,2),new L(8,16,128,128,2),new L(8,32,128,256,2),new L(32,128,258,1024,2),new L(32,258,258,4096,2)],N=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function B(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;X>16-i?(n=t,Y|=n<>>16-X,X+=i-16):(Y|=t<=8&&(Q(255&Y),Y>>>=8,X-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[K+2*j]=e>>>8&255,t.pending_buf[K+2*j+1]=255&e,t.pending_buf[P+j]=255&n,j++,0===e?z[2*n]++:(q++,e--,z[2*(M._length_code[n]+256+1)]++,S[2*M.d_code(e)]++),0==(8191&j)&&R>2){for(i=8*j,r=m-y,a=0;a<30;a++)i+=S[2*a]*(5+M.extra_dbits[a]);if(i>>>=3,q8?$(Y):X>0&&Q(255&Y),Y=0,X=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),Z=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let r,a,s=0;R>0?(T.build_tree(t),O.build_tree(t),s=function(){let e;for(J(z,T.max_code),J(S,O.max_code),L.build_tree(t),e=18;e>=3&&0===C[2*M.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(V.static_ltree,V.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?y:-1,m-y,t),y=m,e.flush_pending()}function dt(){let t,n,i,r;do{if(r=c-A-m,0===r&&0===m&&0===A)r=a;else if(-1==r)r--;else if(m>=a+a-262){l.set(l.subarray(a,a+a),0),k-=a,m-=a,y-=a,t=f,i=t;do{n=65535&u[--i],u[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&d[--i],d[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(l,m+A,r),A+=t,A>=3&&(h=255&l[m],h=(h<<_^255&l[m+1])&p)}while(A<262&&0!==e.avail_in)}function ut(t){let e,n,i=U,r=m,s=v;const c=m>a-262?m-(a-262):0;let u=I;const h=o,f=m+258;let w=l[r+s-1],p=l[r+s];v>=F&&(i>>=2),u>A&&(u=A);do{if(e=t,l[e+s]==p&&l[e+s-1]==w&&l[e]==l[r]&&l[++e]==l[r+1]){r+=2,e++;do{}while(l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&rs){if(k=t,s=n,n>=u)break;w=l[r+s-1],p=l[r+s]}}}while((t=65535&d[t&h])>c&&0!=--i);return s<=A?s:A}function ht(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,T.dyn_tree=z,T.stat_desc=V.static_l_desc,O.dyn_tree=S,O.stat_desc=V.static_d_desc,L.dyn_tree=C,L.stat_desc=V.static_bl_desc,Y=0,X=0,Z=8,G(),function(){c=2*a,u[f-1]=0;for(let t=0;t9||8!=c||r<9||r>15||n<0||n>9||y<0||y>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(W[R].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=W[R].max_lazy,F=W[R].good_length,I=W[R].nice_length,U=W[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,c=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,c=i-s),l.set(e.subarray(c,c+s),0),m=s,y=s,h=255&l[0],h=(h<<_^255&l[1])&p,r=0;r<=s-3;r++)h=(h<<_^255&l[r+2])&p,d[r&o]=u[h],u[h]=r;return 0},t.deflate=function(c,w){let U,F,I,z,S;if(w>4||w<0)return-2;if(!c.next_out||!c.next_in&&0!==c.avail_in||666==n&&4!=w)return c.msg=N[4],-2;if(0===c.avail_out)return c.msg=N[7],-5;var C;if(e=c,z=r,r=w,42==n&&(F=8+(s-8<<4)<<8,I=(R-1&255)>>1,I>3&&(I=3),F|=I<<6,0!==m&&(F|=32),F+=31-F%31,n=113,Q((C=F)>>8&255),Q(255&C)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&w<=z&&4!=w)return e.msg=N[7],-5;if(666==n&&0!==e.avail_in)return c.msg=N[7],-5;if(0!==e.avail_in||0!==A||0!=w&&666!=n){switch(S=-1,W[R].func){case 0:S=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(A<=1){if(dt(),0===A&&0==t)return 0;if(0===A)break}if(m+=A,A=0,n=y+r,(0===m||m>=n)&&(A=m-n,m=n,ct(!1),0===e.avail_out))return 0;if(m-y>=a-262&&(ct(!1),0===e.avail_out))return 0}return ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(w);break;case 1:S=function(t){let n,i=0;for(;;){if(A<262){if(dt(),A<262&&0==t)return 0;if(0===A)break}if(A>=3&&(h=(h<<_^255&l[m+2])&p,i=65535&u[h],d[m&o]=u[h],u[h]=m),0!==i&&(m-i&65535)<=a-262&&2!=D&&(g=ut(i)),g>=3)if(n=rt(m-k,g-3),A-=g,g<=E&&A>=3){g--;do{m++,h=(h<<_^255&l[m+2])&p,i=65535&u[h],d[m&o]=u[h],u[h]=m}while(0!=--g);m++}else m+=g,g=0,h=255&l[m],h=(h<<_^255&l[m+1])&p;else n=rt(0,255&l[m]),A--,m++;if(n&&(ct(!1),0===e.avail_out))return 0}return ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(w);break;case 2:S=function(t){let n,i,r=0;for(;;){if(A<262){if(dt(),A<262&&0==t)return 0;if(0===A)break}if(A>=3&&(h=(h<<_^255&l[m+2])&p,r=65535&u[h],d[m&o]=u[h],u[h]=m),v=g,b=k,g=2,0!==r&&v4096)&&(g=2)),v>=3&&g<=v){i=m+A-3,n=rt(m-1-b,v-3),A-=v-1,v-=2;do{++m<=i&&(h=(h<<_^255&l[m+2])&p,r=65535&u[h],d[m&o]=u[h],u[h]=m)}while(0!=--v);if(x=0,g=2,m++,n&&(ct(!1),0===e.avail_out))return 0}else if(0!==x){if(n=rt(0,255&l[m-1]),n&&ct(!1),m++,A--,0===e.avail_out)return 0}else x=1,m++,A--}return 0!==x&&(n=rt(0,255&l[m-1]),x=0),ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(w)}if(2!=S&&3!=S||(n=666),0==S||2==S)return 0===e.avail_out&&(r=-1),0;if(1==S){if(1==w)tt(2,3),et(256,V.static_ltree),it(),1+Z+10-X<9&&(tt(2,3),et(256,V.static_ltree),it()),Z=7;else if(ot(0,0,!1),3==w)for(U=0;U0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(c),d.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=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(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}H.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new P,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 r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},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 K=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],q=[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],Y=[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],X=[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],G=[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],J=[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 Q(){let t,e,n,i,r,a;function s(t,e,s,o,l,c,d,u,h,f,w){let p,_,y,g,b,x,m,k,A,v,U,E,R,D,F;v=0,b=s;do{n[t[e+v]]++,v++,b--}while(0!==b);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(k=u[0],x=1;x<=15&&0===n[x];x++);for(m=x,kb&&(k=b),u[0]=k,D=1<E+k;){if(g++,E+=k,F=y-E,F=F>k?k:F,(_=1<<(x=m-E))>p+1&&(_-=p+1,R=m,x1440)return-3;r[g]=U=f[0],f[0]+=F,0!==g?(a[g]=b,i[0]=x,i[1]=k,x=b>>>E-k,i[2]=U-r[g-1]-x,h.set(i,3*(r[g-1]+x))):d[0]=U}for(i[1]=m-E,v>=s?i[0]=192:w[v]>>E;x>>=1)b^=x;for(b^=x,A=(1<257?(-3==f?h.msg="oversubscribed distance tree":-5==f?(h.msg="incomplete distance tree",f=-3):-4!=f&&(h.msg="empty distance tree with lengths",f=-3),f):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,c=0,d=0,u=0,h=0,f=0,w=0;function p(t,e,n,i,r,a,s,o){let l,c,d,u,h,f,w,p,_,y,g,b,x,m,k,A;w=o.next_in_index,p=o.avail_in,h=s.bitb,f=s.bitk,_=s.write,y=_>=c[A+1],f-=c[A+1],0!=(16&u)){for(u&=15,x=c[A+2]+(h&K[u]),h>>=u,f-=u;f<15;)p--,h|=(255&o.read_byte(w++))<>=c[A+1],f-=c[A+1],0!=(16&u)){for(u&=15;f>=u,f-=u,y-=x,_>=m)k=_-m,_-k>0&&2>_-k?(s.window[_++]=s.window[k++],s.window[_++]=s.window[k++],x-=2):(s.window.set(s.window.subarray(k,k+2),_),_+=2,k+=2,x-=2);else{k=_-m;do{k+=s.end}while(k<0);if(u=s.end-k,x>u){if(x-=u,_-k>0&&u>_-k)do{s.window[_++]=s.window[k++]}while(0!=--u);else s.window.set(s.window.subarray(k,k+u),_),_+=u,k+=u,u=0;k=0}}if(_-k>0&&x>_-k)do{s.window[_++]=s.window[k++]}while(0!=--x);else s.window.set(s.window.subarray(k,k+x),_),_+=x,k+=x,x=0;break}if(0!=(64&u))return o.msg="invalid distance code",x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=h,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=_,-3;l+=c[A+2],l+=h&K[u],A=3*(d+l),u=c[A]}break}if(0!=(64&u))return 0!=(32&u)?(x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=h,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=_,1):(o.msg="invalid literal/length code",x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=h,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=_,-3);if(l+=c[A+2],l+=h&K[u],A=3*(d+l),0===(u=c[A])){h>>=c[A+1],f-=c[A+1],s.window[_++]=c[A+2],y--;break}}else h>>=c[A+1],f-=c[A+1],s.window[_++]=c[A+2],y--}while(y>=258&&p>=10);return x=o.avail_in-p,x=f>>3>3:x,p+=x,w-=x,f-=x<<3,s.bitb=h,s.bitk=f,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=_,0}t.init=function(t,a,s,o,l,c){e=0,u=t,h=a,i=s,f=o,r=l,w=c,n=null},t.proc=function(t,_,y){let g,b,x,m,k,A,v,U=0,E=0,R=0;for(R=_.next_in_index,m=_.avail_in,U=t.bitb,E=t.bitk,k=t.write,A=k=258&&m>=10&&(t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=k,y=p(u,h,i,f,r,w,t,_),R=_.next_in_index,m=_.avail_in,U=t.bitb,E=t.bitk,k=t.write,A=k>>=n[b+1],E-=n[b+1],x=n[b],0===x){l=n[b+2],e=6;break}if(0!=(16&x)){c=15&x,a=n[b+2],e=2;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}if(0!=(32&x)){e=7;break}return e=9,_.msg="invalid literal/length code",y=-3,t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=k,t.inflate_flush(_,y);case 2:for(g=c;E>=g,E-=g,o=h,n=r,s=w,e=3;case 3:for(g=o;E>=n[b+1],E-=n[b+1],x=n[b],0!=(16&x)){c=15&x,d=n[b+2],e=4;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}return e=9,_.msg="invalid distance code",y=-3,t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=k,t.inflate_flush(_,y);case 4:for(g=c;E>=g,E-=g,e=5;case 5:for(v=k-d;v<0;)v+=t.end;for(;0!==a;){if(0===A&&(k==t.end&&0!==t.read&&(k=0,A=k7&&(E-=8,m++,R--),t.write=k,y=t.inflate_flush(_,y),k=t.write,A=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(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,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(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let w,p,_,y,g,b,x,m;for(y=t.next_in_index,g=t.avail_in,p=n.bitb,_=n.bitk,b=n.write,x=b>>1){case 0:p>>>=3,_-=3,w=7&_,p>>>=w,_-=w,r=1;break;case 1:k=[],A=[],v=[[]],U=[[]],Q.inflate_trees_fixed(k,A,v,U),d.init(k[0],A[0],v[0],0,U[0],0),p>>>=3,_-=3,r=6;break;case 2:p>>>=3,_-=3,r=3;break;case 3:return p>>>=3,_-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e)}break;case 1:for(;_<32;){if(0===g)return n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,p|=(255&t.read_byte(y++))<<_,_+=8}if((~p>>>16&65535)!=(65535&p))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);a=65535&p,p=_=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===g)return n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(0===x&&(b==n.end&&0!==n.read&&(b=0,x=bg&&(w=g),w>x&&(w=x),n.window.set(t.read_buf(y,w),b),y+=w,g-=w,b+=w,x-=w,0!=(a-=w))break;r=0!==u?7:0;break;case 3:for(;_<14;){if(0===g)return n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,p|=(255&t.read_byte(y++))<<_,_+=8}if(s=w=16383&p,(31&w)>29||(w>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(w=258+(31&w)+(w>>5&31),!i||i.length>>=14,_-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;_<3;){if(0===g)return n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,p|=(255&t.read_byte(y++))<<_,_+=8}i[tt[o++]]=7&p,p>>>=3,_-=3}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,w=f.inflate_trees_bits(i,l,c,h,t),0!=w)return-3==(e=w)&&(i=null,r=9),n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);o=0,r=5;case 5:for(;w=s,!(o>=258+(31&w)+(w>>5&31));){let a,d;for(w=l[0];_>>=w,_-=w,i[o++]=d;else{for(m=18==d?7:d-14,a=18==d?11:3;_>>=w,_-=w,a+=p&K[m],p>>>=m,_-=m,m=o,w=s,m+a>258+(31&w)+(w>>5&31)||16==d&&m<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);d=16==d?i[m-1]:0;do{i[m++]=d}while(0!=--a);o=m}}if(c[0]=-1,E=[],R=[],D=[],F=[],E[0]=9,R[0]=6,w=s,w=f.inflate_trees_dynamic(257+(31&w),1+(w>>5&31),i,E,R,D,F,h,t),0!=w)return-3==w&&(i=null,r=9),e=w,n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);d.init(E[0],R[0],h,D[0],h,F[0]),r=6;case 6:if(n.bitb=p,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),y=t.next_in_index,g=t.avail_in,p=n.bitb,_=n.bitk,b=n.write,x=b15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.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++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(d),a.forEach((function(t){o.set(t,c),c+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,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.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=j,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));r({workerScripts:{inflate:[e],deflate:[e]}})}})(),t.BlobReader=g,t.BlobWriter=b,t.Data64URIReader=class extends _{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_BAD_FORMAT=Pt,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=qt,t.ERR_DUPLICATED_NAME=de,t.ERR_ENCRYPTED=Xt,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Kt,t.ERR_EOCDR_NOT_FOUND=Ht,t.ERR_EOCDR_ZIP64_NOT_FOUND=jt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Yt,t.ERR_HTTP_RANGE=l,t.ERR_INVALID_COMMENT=ue,t.ERR_INVALID_DATE=pe,t.ERR_INVALID_ENCRYPTION_STRENGTH=_e,t.ERR_INVALID_ENTRY_COMMENT=he,t.ERR_INVALID_ENTRY_NAME=fe,t.ERR_INVALID_EXTRAFIELD_DATA=ge,t.ERR_INVALID_EXTRAFIELD_TYPE=ye,t.ERR_INVALID_PASSWORD=j,t.ERR_INVALID_SIGNATURE=Et,t.ERR_INVALID_VERSION=we,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Zt,t.ERR_UNSUPPORTED_COMPRESSION=Jt,t.ERR_UNSUPPORTED_ENCRYPTION=Gt,t.HttpRangeReader=class extends E{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=E,t.Reader=_,t.TextReader=class extends _{constructor(t){super(),this.blobReader=new g(new Blob([t],{type:c}))}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 y{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:c})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:c})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends _{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 y{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=y,t.ZipReader=class{constructor(t,e={}){this.reader=t,this.options=e,this.config=i()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Pt);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,C,22,1048560);if(!n)throw new Error(Ht);const i=new DataView(n.buffer);let r=le(i,12),a=le(i,16),s=oe(i,8),o=0;if(a==D||r==D||s==F){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(le(i,0)!=O)throw new Error(jt);a=ce(i,8);let l=await e.readUint8Array(a,56),c=new DataView(l.buffer);const d=n.offset-20-56;if(le(c,0)!=T&&a!=d){const t=a;a=d,o=a-t,l=await e.readUint8Array(a,56),c=new DataView(l.buffer)}if(le(c,0)!=T)throw new Error(Kt);s=ce(c,24),r=ce(i,4),a-=ce(c,40)}if(a<0||a>=e.size)throw new Error(Pt);let l=0,c=await e.readUint8Array(a,e.size-a),d=new DataView(c.buffer);const u=n.offset-r;if(le(d,l)!=S&&a!=u){const t=a;a=u,o=a-t,c=await e.readUint8Array(a,e.size-a),d=new DataView(c.buffer)}if(a<0||a>=e.size)throw new Error(Pt);const h=[];for(let e=0;ee.getData(t,n),h.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return h}async close(){}},t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=i(),this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(L)?t+=L:n.directory=t.endsWith(L),this.files.has(t))throw new Error(de);const i=(new TextEncoder).encode(t);if(i.length>F)throw new Error(fe);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>F)throw new Error(he);const s=this.options.version||n.version||0;if(s>F)throw new Error(we);const o=n.lastModDate||new Date;if(oW)throw new Error(pe);const l=xe(this,n,"password"),c=xe(this,n,"encryptionStrength")||3,d=xe(this,n,"zipCrypto");if(void 0!==l&&void 0!==c&&(c<1||c>3))throw new Error(_e);e&&!e.initialized&&await e.init();let u=new Uint8Array(0);const h=n.extraField;if(h){let t=0,e=0;h.forEach((e=>t+=4+e.length)),u=new Uint8Array(t),h.forEach(((t,n)=>{if(n>F)throw new Error(ye);if(t.length>F)throw new Error(ge);u.set(new Uint16Array([n]),e),u.set(new Uint16Array([t.length]),e+2),u.set(t,e+4),e+=4+t.length}))}const f=e?1.05*e.size:0,w=n.zip64||this.options.zip64||this.offset>=D||f>=D||this.offset+f>=D,p=xe(this,n,"level"),_=xe(this,n,"useWebWorkers"),y=xe(this,n,"bufferedWrite"),g=xe(this,n,"keepOrder"),x=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,l;r.set(e,null);try{let c,d;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>l=t))),i.bufferedWrite||t.lockWrite?(c=new b,await c.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),c=a),d=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),l=i.level,c=0!==l&&!i.directory,d=i.zip64;let u,h;if(o&&!i.zipCrypto){u=new Uint8Array(be.length+2);const t=new DataView(u.buffer);ke(t,0,M),u.set(be,2),h=i.encryptionStrength,me(t,8,h)}else u=new Uint8Array(0);const f={version:i.version||20,zip64:d,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:d?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let w=2056,p=0;c&&(p=8);d&&(f.version=f.version>45?f.version:45);o&&(w|=1,i.zipCrypto||(f.version=f.version>51?f.version:51,p=99,c&&(f.rawExtraFieldAES[9]=8)));const _=f.headerArray=new Uint8Array(26),y=new DataView(_.buffer);ke(y,0,f.version),ke(y,2,w),ke(y,4,p);const g=new Uint32Array(1),b=new DataView(g.buffer);ke(b,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),ke(b,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=g[0];Ae(y,6,x),ke(y,22,r.length),ke(y,24,0);const m=new Uint8Array(30+r.length);let k;Ae(new DataView(m.buffer),0,I),m.set(_,4),m.set(r,30);let A=0,v=0;if(t){A=t.size;const r=await Mt(n.Deflate,{codecType:vt,level:l,password:s,encryptionStrength:h,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:c,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),k=await Lt(r,t,e,0,A,n,{onprogress:i.onprogress}),v=k.length}else await e.writeUint8Array(m);const U=new Uint8Array(d?24:16),E=new DataView(U.buffer);if(Ae(E,0,z),t)if(o&&!i.zipCrypto||void 0===k.signature||(Ae(y,10,k.signature),Ae(E,4,k.signature),f.signature=k.signature),d){const t=new DataView(f.rawExtraFieldZip64.buffer);ke(t,0,1),ke(t,2,24),Ae(y,14,D),ve(E,8,BigInt(v)),ve(t,12,BigInt(v)),Ae(y,18,D),ve(E,16,BigInt(A)),ve(t,4,BigInt(A))}else Ae(y,14,v),Ae(E,8,v),Ae(y,18,A),Ae(E,12,A);await e.writeUint8Array(U);const R=m.length+(k?k.length:0)+U.length;return Object.assign(f,{compressedSize:v,uncompressedSize:A,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),f}(n,c,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,d),c!=a){const e=c.getData(),n=new FileReader,i=await new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)}));await Promise.all([t.lockWrite,o]),await a.writeUint8Array(new Uint8Array(i))}if(d.offset=t.offset,d.zip64){ve(new DataView(d.rawExtraFieldZip64.buffer),20,BigInt(d.offset))}return t.offset+=d.length,d}finally{l&&l(),s&&(t.lockWrite=null,s())}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:u,zip64:w,password:l,level:p,useWebWorkers:_,encryptionStrength:c,zipCrypto:d,bufferedWrite:y,keepOrder:g}));return Object.assign(x,{name:t,comment:r,extraField:h}),new Bt(x)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=D||r>=D||s>=F,l=new Uint8Array(r+(o?98:22)),c=new DataView(l.buffer);if(t.length){if(!(t.length<=F))throw new Error(ue);ke(c,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;Ae(c,i,S),ke(c,i+4,t.version),l.set(t.headerArray,i+6),ke(c,i+30,a),ke(c,i+32,t.rawComment.length),t.directory&&me(c,i+38,16),t.zip64?Ae(c,i+42,D):Ae(c,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(Ae(c,i,T),ve(c,i+4,BigInt(44)),ke(c,i+12,45),ke(c,i+14,45),ve(c,i+24,BigInt(s)),ve(c,i+32,BigInt(s)),ve(c,i+40,BigInt(r)),ve(c,i+48,BigInt(a)),Ae(c,i+56,O),ve(c,i+64,BigInt(a)+BigInt(r)),Ae(c,i+72,1),s=F,a=D,r=D,i+=76),Ae(c,i,C),ke(c,i+8,s),ke(c,i+10,s),Ae(c,i+12,r),Ae(c,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=r,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={})=>({Deflate:s(t.Deflate,e.deflate),Inflate:s(t.Inflate,e.inflate)}),Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/package.json b/package.json index 302b8e9e..33e17df8 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "A JavaScript library to zip and unzip files in the browser", "author": "Gildas Lormeau", "license": "BSD-3-Clause", - "version": "2.2.16", + "version": "2.2.17", "type": "module", "keywords": [ "zip",