@zip.js/zip.js 2.6.22 → 2.6.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zip-fs-full.js +15 -11
- package/dist/zip-fs-full.min.js +1 -1
- package/dist/zip-fs.js +15 -11
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-full.js +15 -11
- package/dist/zip-full.min.js +1 -1
- package/dist/zip-no-worker-deflate.min.js +1 -1
- package/dist/zip-no-worker-inflate.min.js +1 -1
- package/dist/zip-no-worker.min.js +1 -1
- package/dist/zip.js +15 -11
- package/dist/zip.min.js +1 -1
- package/lib/core/io.js +5 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
((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{Array:t,Object:n,String:r,BigInt:s,Math:a,Date:i,Map:o,URL:l,Error:c,Uint8Array:d,Uint16Array:u,Uint32Array:h,DataView:f,Blob:p,Promise:w,TextEncoder:g,TextDecoder:_,document:m,crypto:y,btoa:b,TransformStream:x,ReadableStream:k,WritableStream:v,CompressionStream:z,DecompressionStream:R,navigator:S}=globalThis,T=(()=>{const e=-2;function n(e){return r(e.map((([e,n])=>new t(e).fill(n,0,e))))}function r(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?r(n):n)),[])}const s=[0,1,2,3].concat(...n([[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 i(){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=n=>{const r=e.dyn_tree,s=e.stat_desc.static_tree,i=e.stat_desc.elems;let o,l,c,d=-1;for(n.heap_len=0,n.heap_max=573,o=0;i>o;o++)0!==r[2*o]?(n.heap[++n.heap_len]=d=o,n.depth[o]=0):r[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>d?++d:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,s&&(n.static_len-=s[2*c+1]);for(e.max_code=d,o=a.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=i;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,r[2*c]=r[2*o]+r[2*l],n.depth[c]=a.max(n.depth[o],n.depth[l])+1,r[2*o+1]=r[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,i=e.stat_desc.max_length;let o,l,c,d,u,h,f=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],d=n[2*n[2*l+1]+1]+1,d>i&&(d=i,f++),n[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,u=0,a>l||(u=s[l-a]),h=n[2*l],t.opt_len+=h*(d+u),r&&(t.static_len+=h*(r[2*l+1]+u)));if(0!==f){do{for(d=i-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[i]--,f-=2}while(f>0);for(d=i;0!==d;d--)for(l=t.bl_count[d];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=d&&(t.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}})(n),((e,n,r)=>{const s=[];let a,i,o,l=0;for(a=1;15>=a;a++)s[a]=l=l+r[a-1]<<1;for(i=0;n>=i;i++)o=e[2*i+1],0!==o&&(e[2*i]=t(s[o]++,o))})(r,e.max_code,n.bl_count)}}function o(e,t,n,r,s){const a=this;a.static_tree=e,a.extra_bits=t,a.extra_base=n,a.elems=r,a.max_length=s}i._length_code=[0,1,2,3,4,5,6,7].concat(...n([[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]])),i.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],i.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],i.d_code=e=>256>e?s[e]:s[256+(e>>>7)],i.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],i.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],i.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],i.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const l=n([[144,8],[112,9],[24,7],[8,8]]);o.static_ltree=r([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,l[t]])));const h=n([[30,5]]);function f(e,t,n,r,s){const a=this;a.good_length=e,a.max_lazy=t,a.nice_length=n,a.max_chain=r,a.func=s}o.static_dtree=r([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,h[t]]))),o.static_l_desc=new o(o.static_ltree,i.extra_lbits,257,286,15),o.static_d_desc=new o(o.static_dtree,i.extra_dbits,0,30,15),o.static_bl_desc=new o(null,i.extra_blbits,0,19,7);const p=[new f(0,0,0,0,0),new f(4,4,8,4,1),new f(4,5,16,8,1),new f(4,6,32,32,1),new f(4,4,16,16,2),new f(8,16,32,32,2),new f(8,16,128,128,2),new f(8,32,128,256,2),new f(32,128,258,1024,2),new f(32,258,258,4096,2)],w=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],g=113,_=666,m=262;function y(e,t,n,r){const s=e[2*t],a=e[2*n];return a>s||s==a&&r[t]<=r[n]}function b(){const t=this;let n,r,s,l,c,h,f,b,x,k,v,z,R,S,T,D,E,A,F,C,W,I,U,H,M,L,q,B,N,V,P,O,K;const Z=new i,X=new i,Y=new i;let j,G,J,Q,$,ee;function te(){let e;for(e=0;286>e;e++)P[2*e]=0;for(e=0;30>e;e++)O[2*e]=0;for(e=0;19>e;e++)K[2*e]=0;P[512]=1,t.opt_len=t.static_len=0,G=J=0}function ne(e,t){let n,r=-1,s=e[1],a=0,i=7,o=4;0===s&&(i=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=s,s=e[2*(l+1)+1],++a<i&&n==s||(o>a?K[2*n]+=a:0!==n?(n!=r&&K[2*n]++,K[32]++):a>10?K[36]++:K[34]++,a=0,r=n,0===s?(i=138,o=3):n==s?(i=6,o=3):(i=7,o=4))}function re(e){t.pending_buf[t.pending++]=e}function se(e){re(255&e),re(e>>>8&255)}function ae(e,t){let n;const r=t;ee>16-r?(n=e,$|=n<<ee&65535,se($),$=n>>>16-ee,ee+=r-16):($|=e<<ee&65535,ee+=r)}function ie(e,t){const n=2*e;ae(65535&t[n],65535&t[n+1])}function oe(e,t){let n,r,s=-1,a=e[1],i=0,o=7,l=4;for(0===a&&(o=138,l=3),n=0;t>=n;n++)if(r=a,a=e[2*(n+1)+1],++i>=o||r!=a){if(l>i)do{ie(r,K)}while(0!=--i);else 0!==r?(r!=s&&(ie(r,K),i--),ie(16,K),ae(i-3,2)):i>10?(ie(18,K),ae(i-11,7)):(ie(17,K),ae(i-3,3));i=0,s=r,0===a?(o=138,l=3):r==a?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(se($),$=0,ee=0):8>ee||(re(255&$),$>>>=8,ee-=8)}function ce(e,n){let r,s,o;if(t.dist_buf[G]=e,t.lc_buf[G]=255&n,G++,0===e?P[2*n]++:(J++,e--,P[2*(i._length_code[n]+256+1)]++,O[2*i.d_code(e)]++),0==(8191&G)&&q>2){for(r=8*G,s=W-E,o=0;30>o;o++)r+=O[2*o]*(5+i.extra_dbits[o]);if(r>>>=3,J<a.floor(G/2)&&r<a.floor(s/2))return!0}return G==j-1}function de(e,n){let r,s,a,o,l=0;if(0!==G)do{r=t.dist_buf[l],s=t.lc_buf[l],l++,0===r?ie(s,e):(a=i._length_code[s],ie(a+256+1,e),o=i.extra_lbits[a],0!==o&&(s-=i.base_length[a],ae(s,o)),r--,a=i.d_code(r),ie(a,n),o=i.extra_dbits[a],0!==o&&(r-=i.base_dist[a],ae(r,o)))}while(G>l);ie(256,e),Q=e[513]}function ue(){ee>8?se($):ee>0&&re(255&$),$=0,ee=0}function he(e,n,r){ae(0+(r?1:0),3),((e,n)=>{ue(),Q=8,se(n),se(~n),t.pending_buf.set(b.subarray(e,e+n),t.pending),t.pending+=n})(e,n)}function fe(e){((e,n,r)=>{let s,a,l=0;q>0?(Z.build_tree(t),X.build_tree(t),l=(()=>{let e;for(ne(P,Z.max_code),ne(O,X.max_code),Y.build_tree(t),e=18;e>=3&&0===K[2*i.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(),s=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a>s||(s=a)):s=a=n+5,n+4>s||-1==e?a==s?(ae(2+(r?1:0),3),de(o.static_ltree,o.static_dtree)):(ae(4+(r?1:0),3),((e,t,n)=>{let r;for(ae(e-257,5),ae(t-1,5),ae(n-4,4),r=0;n>r;r++)ae(K[2*i.bl_order[r]+1],3);oe(P,e-1),oe(O,t-1)})(Z.max_code+1,X.max_code+1,l+1),de(P,O)):he(e,n,r),te(),r&&ue()})(0>E?-1:E,W-E,e),E=W,n.flush_pending()}function pe(){let e,t,r,s;do{if(s=x-U-W,0===s&&0===W&&0===U)s=c;else if(-1==s)s--;else if(W>=c+c-m){b.set(b.subarray(c,c+c),0),I-=c,W-=c,E-=c,e=R,r=e;do{t=65535&v[--r],v[r]=c>t?0:t-c}while(0!=--e);e=c,r=e;do{t=65535&k[--r],k[r]=c>t?0:t-c}while(0!=--e);s+=c}if(0===n.avail_in)return;e=n.read_buf(b,W+U,s),U+=e,3>U||(z=255&b[W],z=(z<<D^255&b[W+1])&T)}while(m>U&&0!==n.avail_in)}function we(e){let t,n,r=M,s=W,a=H;const i=W>c-m?W-(c-m):0;let o=V;const l=f,d=W+258;let u=b[s+a-1],h=b[s+a];N>H||(r>>=2),o>U&&(o=U);do{if(t=e,b[t+a]==h&&b[t+a-1]==u&&b[t]==b[s]&&b[++t]==b[s+1]){s+=2,t++;do{}while(b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&d>s);if(n=258-(d-s),s=d-258,n>a){if(I=e,a=n,n>=o)break;u=b[s+a-1],h=b[s+a]}}}while((e=65535&k[e&l])>i&&0!=--r);return a>U?U:a}t.depth=[],t.bl_count=[],t.heap=[],P=[],O=[],K=[],t.pqdownheap=(e,n)=>{const r=t.heap,s=r[n];let a=n<<1;for(;a<=t.heap_len&&(a<t.heap_len&&y(e,r[a+1],r[a],t.depth)&&a++,!y(e,s,r[a],t.depth));)r[n]=r[a],n=a,a<<=1;r[n]=s},t.deflateInit=(n,i,w,_,m,y)=>(_||(_=8),m||(m=8),y||(y=0),n.msg=null,-1==i&&(i=6),1>m||m>9||8!=_||9>w||w>15||0>i||i>9||0>y||y>2?e:(n.dstate=t,h=w,c=1<<h,f=c-1,S=m+7,R=1<<S,T=R-1,D=a.floor((S+3-1)/3),b=new d(2*c),k=[],v=[],j=1<<m+6,t.pending_buf=new d(4*j),s=4*j,t.dist_buf=new u(j),t.lc_buf=new d(j),q=i,B=y,(e=>(e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,r=g,l=0,Z.dyn_tree=P,Z.stat_desc=o.static_l_desc,X.dyn_tree=O,X.stat_desc=o.static_d_desc,Y.dyn_tree=K,Y.stat_desc=o.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{x=2*c,v[R-1]=0;for(let e=0;R-1>e;e++)v[e]=0;L=p[q].max_lazy,N=p[q].good_length,V=p[q].nice_length,M=p[q].max_chain,W=0,E=0,U=0,A=H=2,C=0,z=0})(),0))(n))),t.deflateEnd=()=>42!=r&&r!=g&&r!=_?e:(t.lc_buf=null,t.dist_buf=null,t.pending_buf=null,v=null,k=null,b=null,t.dstate=null,r==g?-3:0),t.deflateParams=(t,n,r)=>{let s=0;return-1==n&&(n=6),0>n||n>9||0>r||r>2?e:(p[q].func!=p[n].func&&0!==t.total_in&&(s=t.deflate(1)),q!=n&&(q=n,L=p[q].max_lazy,N=p[q].good_length,V=p[q].nice_length,M=p[q].max_chain),B=r,s)},t.deflateSetDictionary=(t,n,s)=>{let a,i=s,o=0;if(!n||42!=r)return e;if(3>i)return 0;for(i>c-m&&(i=c-m,o=s-i),b.set(n.subarray(o,o+i),0),W=i,E=i,z=255&b[0],z=(z<<D^255&b[1])&T,a=0;i-3>=a;a++)z=(z<<D^255&b[a+2])&T,k[a&f]=v[z],v[z]=a;return 0},t.deflate=(a,i)=>{let d,u,y,x,S;if(i>4||0>i)return e;if(!a.next_out||!a.next_in&&0!==a.avail_in||r==_&&4!=i)return a.msg=w[4],e;if(0===a.avail_out)return a.msg=w[7],-5;var M;if(n=a,x=l,l=i,42==r&&(u=8+(h-8<<4)<<8,y=(q-1&255)>>1,y>3&&(y=3),u|=y<<6,0!==W&&(u|=32),u+=31-u%31,r=g,re((M=u)>>8&255),re(255&M)),0!==t.pending){if(n.flush_pending(),0===n.avail_out)return l=-1,0}else if(0===n.avail_in&&x>=i&&4!=i)return n.msg=w[7],-5;if(r==_&&0!==n.avail_in)return a.msg=w[7],-5;if(0!==n.avail_in||0!==U||0!=i&&r!=_){switch(S=-1,p[q].func){case 0:S=(e=>{let t,r=65535;for(r>s-5&&(r=s-5);;){if(1>=U){if(pe(),0===U&&0==e)return 0;if(0===U)break}if(W+=U,U=0,t=E+r,(0===W||W>=t)&&(U=W-t,W=t,fe(!1),0===n.avail_out))return 0;if(W-E>=c-m&&(fe(!1),0===n.avail_out))return 0}return fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(i);break;case 1:S=(e=>{let t,r=0;for(;;){if(m>U){if(pe(),m>U&&0==e)return 0;if(0===U)break}if(3>U||(z=(z<<D^255&b[W+2])&T,r=65535&v[z],k[W&f]=v[z],v[z]=W),0===r||(W-r&65535)>c-m||2!=B&&(A=we(r)),3>A)t=ce(0,255&b[W]),U--,W++;else if(t=ce(W-I,A-3),U-=A,A>L||3>U)W+=A,A=0,z=255&b[W],z=(z<<D^255&b[W+1])&T;else{A--;do{W++,z=(z<<D^255&b[W+2])&T,r=65535&v[z],k[W&f]=v[z],v[z]=W}while(0!=--A);W++}if(t&&(fe(!1),0===n.avail_out))return 0}return fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(i);break;case 2:S=(e=>{let t,r,s=0;for(;;){if(m>U){if(pe(),m>U&&0==e)return 0;if(0===U)break}if(3>U||(z=(z<<D^255&b[W+2])&T,s=65535&v[z],k[W&f]=v[z],v[z]=W),H=A,F=I,A=2,0!==s&&L>H&&c-m>=(W-s&65535)&&(2!=B&&(A=we(s)),5>=A&&(1==B||3==A&&W-I>4096)&&(A=2)),3>H||A>H)if(0!==C){if(t=ce(0,255&b[W-1]),t&&fe(!1),W++,U--,0===n.avail_out)return 0}else C=1,W++,U--;else{r=W+U-3,t=ce(W-1-F,H-3),U-=H-1,H-=2;do{++W>r||(z=(z<<D^255&b[W+2])&T,s=65535&v[z],k[W&f]=v[z],v[z]=W)}while(0!=--H);if(C=0,A=2,W++,t&&(fe(!1),0===n.avail_out))return 0}}return 0!==C&&(t=ce(0,255&b[W-1]),C=0),fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(i)}if(2!=S&&3!=S||(r=_),0==S||2==S)return 0===n.avail_out&&(l=-1),0;if(1==S){if(1==i)ae(2,3),ie(256,o.static_ltree),le(),9>1+Q+10-ee&&(ae(2,3),ie(256,o.static_ltree),le()),Q=7;else if(he(0,0,!1),3==i)for(d=0;R>d;d++)v[d]=0;if(n.flush_pending(),0===n.avail_out)return l=-1,0}}return 4!=i?0:1}}function x(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}return x.prototype={deflateInit(e,t){const n=this;return n.dstate=new b,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(t){const n=this;return n.dstate?n.dstate.deflate(n,t):e},deflateEnd(){const t=this;if(!t.dstate)return e;const n=t.dstate.deflateEnd();return t.dstate=null,n},deflateParams(t,n){const r=this;return r.dstate?r.dstate.deflateParams(r,t,n):e},deflateSetDictionary(t,n){const r=this;return r.dstate?r.dstate.deflateSetDictionary(r,t,n):e},read_buf(e,t,n){const r=this;let s=r.avail_in;return s>n&&(s=n),0===s?0:(r.avail_in-=s,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),t),r.next_in_index+=s,r.total_in+=s,s)},flush_pending(){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))}},function(e){const t=new x,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(a.floor(r/16383)+1);var r;const s=new d(n);let i=e?e.level:-1;void 0===i&&(i=-1),t.deflateInit(i),t.next_out=s,this.append=(e,r)=>{let a,i,o=0,l=0,u=0;const h=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,a=t.deflate(0),0!=a)throw new c("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?h.push(new d(s)):h.push(s.slice(0,t.next_out_index))),u+=t.next_out_index,r&&t.next_in_index>0&&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 h.length>1?(i=new d(u),h.forEach((e=>{i.set(e,l),l+=e.length}))):i=h[0]||new d,i}},this.flush=()=>{let e,r,a=0,i=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new c("deflating: "+t.msg);n-t.avail_out>0&&o.push(s.slice(0,t.next_out_index)),i+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new d(i),o.forEach((e=>{r.set(e,a),a+=e.length})),r}}})(),D=void 0,E={chunkSize:524288,maxWorkers:void 0!==S&&S.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},A=n.assign({},E);function F(){return A}function C(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:a,useCompressionStream:i,useWebWorkers:o,Deflate:l,Inflate:d,workerScripts:u}=e;if(n!==D&&(A.baseURL=n),r!==D&&(A.chunkSize=r),s!==D&&(A.maxWorkers=s),a!==D&&(A.terminateWorkerTimeout=a),i!==D&&(A.useCompressionStream=i),o!==D&&(A.useWebWorkers=o),l!==D&&(A.Deflate=l),d!==D&&(A.Inflate=d),u!==D){const{deflate:e,inflate:n}=u;if((e||n)&&(A.workerScripts||(A.workerScripts={})),e){if(!t.isArray(e))throw new c("workerScripts.deflate must be an array");A.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new c("workerScripts.inflate must be an array");A.workerScripts.inflate=n}}}const W=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;W[e]=t}class I{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^W[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class U extends x{constructor(){super({start(){this.crc32=new I},transform(e){this.crc32.append(e)},flush(e){const t=new d(4);new f(t.buffer).setUint32(0,this.crc32.get()),e.enqueue(t)}})}}function H(e){if(void 0===g){const t=new d((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new g).encode(e)}const M={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=M.getPartial(n);return 32===r?e.concat(t):M._shiftRight(t,r,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+M.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,a.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=M.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,a=M.getPartial(s);return r.push(M.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},L={bytes:{fromBits(e){const t=M.bitLength(e)/8,n=new d(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3==(3&n)&&(t.push(r),r=0);return 3&n&&t.push(M.partial(8*(3&n),r)),t}}},q={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};q.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=L.utf8String.toBits(e));const n=t._buffer=M.concat(t._buffer,e),r=t._length,s=t._length=r+M.bitLength(e);if(s>9007199254740991)throw new c("Cannot hash more than 2^53 - 1 bits");const a=new h(n);let i=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);s>=e;e+=t.blockSize)t._block(a.subarray(16*i,16*(i+1))),i+=1;return n.splice(0,16*i),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=M.concat(t,[M.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,_S:(e,t)=>t<<e|t>>>32-e,_block(e){const n=this,r=n._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let i=r[0],o=r[1],l=r[2],c=r[3],d=r[4];for(let e=0;79>=e;e++){16>e||(s[e]=n._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=n._S(5,i)+n._f(e,o,l,c)+d+s[e]+n._key[a.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=i,i=t}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+l|0,r[3]=r[3]+c|0,r[4]=r[4]+d|0}};const B={getRandomValues(e){const t=new h(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let r,s=0;s<e.length;s+=4){const e=n(4294967296*(r||a.random()));r=987654071*e(),t[s/4]=4294967296*e()|0}return e}},N={importKey:e=>new N.hmacSha1(L.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new c("invalid params to pbkdf2");const s=1+(r>>5)<<2;let a,i,o,l,d;const u=new ArrayBuffer(s),h=new f(u);let p=0;const w=M;for(t=L.bytes.toBits(t),d=1;(s||1)>p;d++){for(a=i=e.encrypt(w.concat(t,[d])),o=1;n>o;o++)for(i=e.encrypt(i),l=0;l<i.length;l++)a[l]^=i[l];for(o=0;(s||1)>p&&o<a.length;o++)h.setInt32(p,a[o]),p+=4}return u.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=q.sha1,r=[[],[]],s=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>s&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new c("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},V=void 0!==y&&"function"==typeof y.getRandomValues,P="Invalid password";function O(e){return V?y.getRandomValues(e):B.getRandomValues(e)}const K=16,Z={name:"PBKDF2"},X=n.assign({hash:{name:"HMAC"}},Z),Y=n.assign({iterations:1e3,hash:{name:"SHA-1"}},Z),j=["deriveBits"],G=[8,12,16],J=[16,24,32],Q=10,$=[0,0,0,0],ee="undefined",te="function",ne=typeof y!=ee,re=ne&&typeof y.subtle!=ee,se=ne&&re&&typeof y.subtle.importKey==te,ae=ne&&re&&typeof y.subtle.deriveBits==te,ie=L.bytes,oe=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],s=e.length;let a,i,o,l=1;if(4!==s&&6!==s&&8!==s)throw new c("invalid aes key size");for(t._key=[i=e.slice(0),o=[]],a=s;4*s+28>a;a++){let e=i[a-1];(a%s==0||8===s&&a%s==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%s==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[a]=i[a-s]^e}for(let e=0;a;e++,a--){const t=i[3&e?a:a-4];o[e]=4>=a||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],s=[],a=[];let i,o,l,c;for(let e=0;256>e;e++)a[(s[e]=e<<1^283*(e>>7))^e]=e;for(let d=i=0;!n[d];d^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[d]=a,r[a]=d,c=s[l=s[o=s[d]]];let u=16843009*c^65537*l^257*o^16843008*d,h=257*s[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=h=h<<24^h>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new c("invalid aes block size");const n=this._key[t],r=n.length/4-2,s=[0,0,0,0],a=this._tables[t],i=a[0],o=a[1],l=a[2],d=a[3],u=a[4];let h,f,p,w=e[0]^n[0],g=e[t?3:1]^n[1],_=e[2]^n[2],m=e[t?1:3]^n[3],y=4;for(let e=0;r>e;e++)h=i[w>>>24]^o[g>>16&255]^l[_>>8&255]^d[255&m]^n[y],f=i[g>>>24]^o[_>>16&255]^l[m>>8&255]^d[255&w]^n[y+1],p=i[_>>>24]^o[m>>16&255]^l[w>>8&255]^d[255&g]^n[y+2],m=i[m>>>24]^o[w>>16&255]^l[g>>8&255]^d[255&_]^n[y+3],y+=4,w=h,g=f,_=p;for(let e=0;4>e;e++)s[t?3&-e:e]=u[w>>>24]<<24^u[g>>16&255]<<16^u[_>>8&255]<<8^u[255&m]^n[y++],h=w,w=g,g=_,_=m,m=h;return s}},le=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const s=M.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return M.clamp(t,s)}},ce=N.hmacSha1;class de extends x{constructor(e,r,s){let a;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,signed:r,strength:s-1,pending:new d})},async transform(e,n){const r=this;if(r.password){const n=r.password;r.password=null;const s=we(e,0,G[r.strength]+2);await(async(e,t,n)=>{await fe(e,n,we(t,0,G[e.strength]));const r=we(t,G[e.strength]),s=e.keys.passwordVerification;if(s[0]!=r[0]||s[1]!=r[1])throw new c(P)})(r,s,n),r.ctr=new le(new oe(r.keys.key),t.from($)),r.hmac=new ce(r.keys.authentication),e=we(e,G[r.strength]+2),r.resolveReady()}else await r.ready;const s=new d(e.length-Q-(e.length-Q)%K);n.enqueue(he(r,e,s,0,Q,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,r=we(n,0,n.length-Q),s=we(n,n.length-Q);let i=new d;if(r.length){const e=_e(ie,r);t.hmac.update(e);const n=t.ctr.update(e);i=ge(ie,n)}if(a.valid=!0,t.signed){const e=we(ge(ie,t.hmac.digest()),0,Q);for(let t=0;Q>t;t++)e[t]!=s[t]&&(a.valid=!1)}e.enqueue(i)}}),a=this}}class ue extends x{constructor(e,r){let s;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,strength:r-1,pending:new d})},async transform(e,n){const r=this;let s=new d;if(r.password){const e=r.password;r.password=null,s=await(async(e,t)=>{const n=O(new d(G[e.strength]));return await fe(e,t,n),pe(n,e.keys.passwordVerification)})(r,e),r.ctr=new le(new oe(r.keys.key),t.from($)),r.hmac=new ce(r.keys.authentication),r.resolveReady()}else await r.ready;const a=new d(s.length+e.length-e.length%K);a.set(s,0),n.enqueue(he(r,e,a,s.length,0))},async flush(e){const t=this;await t.ready;let n=new d;if(t.pending.length){const e=t.ctr.update(_e(ie,t.pending));t.hmac.update(e),n=ge(ie,e)}s.signature=ge(ie,t.hmac.digest()).slice(0,Q),e.enqueue(pe(n,s.signature))}}),s=this}}function he(e,t,n,r,s,a){const i=t.length-s;let o;for(e.pending.length&&(t=pe(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new d(t)).set(n,0)}return e})(n,i-i%K)),o=0;i-K>=o;o+=K){const s=_e(ie,we(t,o,o+K));a&&e.hmac.update(s);const i=e.ctr.update(s);a||e.hmac.update(i),n.set(ge(ie,i),o+r)}return e.pending=we(t,o),n}async function fe(e,t,r){const s=H(t),a=await((e,t,n,r,s)=>se?y.subtle.importKey("raw",t,n,!1,s):N.importKey(t))(0,s,X,0,j),i=await(async(e,t,n)=>ae?await y.subtle.deriveBits(e,t,n):N.pbkdf2(t,e.salt,Y.iterations,n))(n.assign({salt:r},Y),a,8*(2*J[e.strength]+2)),o=new d(i);e.keys={key:_e(ie,we(o,0,J[e.strength])),authentication:_e(ie,we(o,J[e.strength],2*J[e.strength])),passwordVerification:we(o,2*J[e.strength])}}function pe(e,t){let n=e;return e.length+t.length&&(n=new d(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function we(e,t,n){return e.subarray(t,n)}function ge(e,t){return e.fromBits(t)}function _e(e,t){return e.toBits(t)}class me extends x{constructor(e,t){let r;super({start(){n.assign(this,{password:e,passwordVerification:t}),ke(this,e)},transform(e,t){const n=this;if(n.password){const t=be(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new c(P);e=e.subarray(12)}t.enqueue(be(n,e))},flush(){r.valid=!0}}),r=this}}class ye extends x{constructor(e,t){super({start(){n.assign(this,{password:e,passwordVerification:t}),ke(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=O(new d(12));t[11]=n.passwordVerification,r=new d(e.length+t.length),r.set(xe(n,t),0),s=12}else r=new d(e.length),s=0;r.set(xe(n,e),s),t.enqueue(r)},flush(){}})}}function be(e,t){const n=new d(t.length);for(let r=0;r<t.length;r++)n[r]=ze(e)^t[r],ve(e,n[r]);return n}function xe(e,t){const n=new d(t.length);for(let r=0;r<t.length;r++)n[r]=ze(e)^t[r],ve(e,t[r]);return n}function ke(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new I(e.keys[0]),e.crcKey2=new I(e.keys[2]);for(let n=0;n<t.length;n++)ve(e,t.charCodeAt(n))}function ve(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=Se(e.keys[1]+Re(e.keys[0])),e.keys[1]=Se(a.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ze(e){const t=2|e.keys[2];return Re(a.imul(t,1^t)>>>8)}function Re(e){return 255&e}function Se(e){return 4294967295&e}class Te extends x{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const De="Invalid signature",Ee="deflate-raw",Ae="undefined",Fe=typeof z==Ae,Ce=typeof R==Ae;let We=!0,Ie=!0;class Ue extends x{constructor(e,t,{chunkSize:n},...r){super({},...r);const{compressed:s,encrypted:a,useCompressionStream:i,password:o,passwordVerification:l,encryptionStrength:c,zipCrypto:d,signed:u,level:h}=t,p=this;let w,g,_=Le(super.readable);if(a&&!d||!u||([_,w]=_.tee(),w=w.pipeThrough(new U)),s)if(void 0!==i&&!i||Fe&&!Ie)_=Me(e,_,{chunkSize:n,level:h});else try{_=_.pipeThrough(new z(Ee))}catch(t){Ie=!1,_=Me(e,_,{chunkSize:n,level:h})}a&&(d?_=_.pipeThrough(new ye(o,l)):(g=new ue(o,c),_=_.pipeThrough(g))),qe(p,_,(async()=>{let e;a&&!d&&(e=g.signature),a&&!d||!u||(e=await w.getReader().read(),e=new f(e.value.buffer).getUint32(0)),p.signature=e}))}}class He extends x{constructor(e,t,{chunkSize:n},...r){super({},...r);const{zipCrypto:s,encrypted:a,password:i,passwordVerification:o,signed:l,encryptionStrength:d,compressed:u,useCompressionStream:h}=t;let p,w,g=Le(super.readable);if(a&&(s?g=g.pipeThrough(new me(i,o)):(w=new de(i,l,d),g=g.pipeThrough(w))),u)if(void 0!==h&&!h||Ce&&!We)g=Me(e,g,{chunkSize:n});else try{g=g.pipeThrough(new R(Ee))}catch(t){We=!1,g=Me(e,g,{chunkSize:n})}a&&!s||!l||([g,p]=g.tee(),p=p.pipeThrough(new U)),qe(this,g,(async()=>{if(a&&!s&&!w.valid)throw new c(De);if((!a||s)&&l){const e=await p.getReader().read(),n=new f(e.value.buffer);if(t.signature!=n.getUint32(0,!1))throw new c(De)}}))}}function Me(e,t,n){return t.pipeThrough(new Te(e,n))}function Le(e){return e.pipeThrough(new x({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function qe(e,t,r){t=t.pipeThrough(new x({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}const Be="deflate",Ne="data";class Ve{constructor(e,t,n,r,s){const{codecType:a}=r;async function i(a){const i=new a(e,r,s);await t.pipeThrough(i).pipeThrough(new x({transform(e,t){e&&e.length&&(n.size+=e.length,t.enqueue(e))}})).pipeTo(n,{preventClose:!0,preventAbort:!0});const{size:o,signature:l}=i;return{size:o,signature:l}}a.startsWith(Be)?this.run=()=>i(Ue):a.startsWith("inflate")&&(this.run=()=>i(He))}}let Pe,Oe=!0;class Ke{constructor(e,t,r,s){const{readable:a,writable:i}=t,{options:o,config:u,streamOptions:h,webWorker:f,scripts:p,codecConstructor:g}=r;n.assign(e,{busy:!0,codecConstructor:g,readable:a,writable:i,options:n.assign({},o),scripts:p,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,s(e)}});const{signal:_,onstart:m,onprogress:y,size:b,onend:k}=h;let v=0;const z={};return m&&(z.start=()=>Ze(m,b())),z.transform=async(e,t)=>{v+=e.length,y&&await Ze(y,v,b()),t.enqueue(e)},z.flush=()=>{a.size=()=>v,k&&Ze(k,v)},e.readable=a.pipeThrough(new x(z,{highWaterMark:1,size:()=>u.chunkSize}),{signal:_}),void 0===Pe&&(Pe="undefined"!=typeof Worker),f&&Pe?((e,{baseURL:t,chunkSize:r})=>{const s={type:"module"},{readable:a,writable:i}=e;if(n.assign(e,{reader:a.getReader(),writer:i.getWriter(),result:new w(((t,n)=>{e.resolveResult=t,e.rejectResult=n}))}),!e.interface){if(Oe)try{e.worker=o({})}catch(t){Oe=!1,e.worker=o(s)}else e.worker=o(s);e.worker.addEventListener("message",(async t=>{const n=t.data,{reader:r,writer:s,resolveResult:a,rejectResult:i,onTaskFinished:o}=e,{type:l,data:h,messageId:f,result:p}=n,w=n.error;try{if(w){const{message:e,stack:t}=w,n=new c(e);n.stack=t,g(n)}else{if("pull"==l){const{value:e,done:t}=await r.read();u({type:Ne,data:e,done:t,messageId:f})}l==Ne&&(await s.ready,e.writable.size+=h.byteLength,await s.write(new d(h)),u({type:"ack",messageId:f})),"close"==l&&g(null,p)}}catch(e){g(e)}function g(e,t){e?i(e):a(t),s.releaseLock(),o()}}),!1),e.interface={run(){const{options:t}=e;return u({type:"start",scripts:e.scripts.slice(1),options:t,config:{chunkSize:r}}),e.result}}}return e.interface;function o(n){let r,s;r=e.scripts[0],"function"==typeof r&&(r=r());try{s=new l(r,t)}catch(e){s=r}return new Worker(s,n)}function u(t){const{worker:n,writer:r,onTaskFinished:s}=e;try{let{data:e}=t;if(e)try{const{buffer:r,length:s}=e;s!=r.byteLength&&(e=new d(e)),t.data=e.buffer,n.postMessage(t,[t.data])}catch(e){n.postMessage(t)}else n.postMessage(t)}catch(e){throw r.releaseLock(),s(),e}}})(e,u):((e,t)=>{const n=new Ve(e.codecConstructor,e.readable,e.writable,e.options,t),{onTaskFinished:r}=e;return{async run(){try{return await n.run()}finally{r()}}}})(e,u)}}async function Ze(e,...t){try{await e(...t)}catch(e){}}let Xe=[];const Ye=[];let je=0;function Ge(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Je="HTTP error ",Qe="HTTP Range not supported",$e="text/plain",et="GET",tt=65536;class nt{constructor(){this.size=0}init(){this.initialized=!0}}class rt extends nt{get readable(){const e=this,{chunkSize:t=tt}=e,n=new k({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:i}=n,{chunkOffset:o}=this;r.enqueue(await e.readUint8Array(s+o,a.min(t,i()-o))),o+t>i()?r.close():this.chunkOffset+=t}});return n}}class st extends nt{constructor(){super();const e=this,t=new v({write:t=>e.writeUint8Array(t)});n.defineProperty(e,"writable",{get:()=>t})}writeUint8Array(){}}class at extends rt{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){return new d(await this.blob.slice(e,e+t).arrayBuffer())}}class it extends nt{constructor(e){super();const t=this;t.contentType=e,t.transformStream=new x,n.defineProperty(this,"writable",{get:()=>t.transformStream.writable})}init(){super.init();const{transformStream:e,contentType:t}=this;this.blob=new Response(e.readable).blob({type:t})}getData(){return this.blob}}class ot extends rt{constructor(e,t){super();const r=this;r.url=e,r.preventHeadRequest=t.preventHeadRequest,r.useRangeHeader=t.useRangeHeader,r.forceRangeRequests=t.forceRangeRequests,r.options=t=n.assign({},t),delete t.preventHeadRequest,delete t.useRangeHeader,delete t.forceRangeRequests,delete t.useXHR}async init(){super.init(),await ct(this,_t,ft)}readUint8Array(e,t){return dt(this,e,t,_t,ft)}}class lt extends rt{constructor(e,t){super();const n=this;n.url=e,n.preventHeadRequest=t.preventHeadRequest,n.useRangeHeader=t.useRangeHeader,n.forceRangeRequests=t.forceRangeRequests,n.options=t}async init(){super.init(),await ct(this,mt,pt)}readUint8Array(e,t){return dt(this,e,t,mt,pt)}}async function ct(e,t,n){if((e=>{const{baseURL:t}=F(),{protocol:n}=new l(e,t);return"http:"==n||"https:"==n})(e.url)&&(e.useRangeHeader||e.forceRangeRequests)){const r=await t(et,e,ut(e));if(!e.forceRangeRequests&&"bytes"!=r.headers.get("Accept-Ranges"))throw new c(Qe);{let s;const a=r.headers.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(s=Number(t))}}void 0===s?await gt(e,t,n):e.size=s}}else await gt(e,t,n)}async function dt(e,t,n,r,s){if(e.useRangeHeader||e.forceRangeRequests){const s=await r(et,e,ut(e,t,n));if(206!=s.status)throw new c(Qe);return new d(await s.arrayBuffer())}return e.data||await s(e,e.options),new d(e.data.subarray(t,t+n))}function ut(e,t=0,r=1){return n.assign({},ht(e),{Range:"bytes="+t+"-"+(t+r-1)})}function ht(e){const t=e.options.headers;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function ft(e){await wt(e,_t)}async function pt(e){await wt(e,mt)}async function wt(e,t){const n=await t(et,e,ht(e));e.data=new d(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function gt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,ht(e))).headers.get("Content-Length");r?e.size=Number(r):await n(e,e.options)}}async function _t(e,{options:t,url:r},s){const a=await fetch(r,n.assign({},t,{method:e,headers:s}));if(400>a.status)return a;throw 416==a.status?new c(Qe):new c(Je+(a.statusText||a.status))}function mt(e,{url:t},r){return new w(((s,a)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",(()=>{if(400>i.status){const e=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),s({status:i.status,arrayBuffer:()=>i.response,headers:new o(e)})}else a(416==i.status?new c(Qe):new c(Je+(i.statusText||i.status)))}),!1),i.addEventListener("error",(e=>a(e.detail.error)),!1),i.open(e,t),r)for(const e of n.entries(r))i.setRequestHeader(e[0],e[1]);i.responseType="arraybuffer",i.send()}))}class yt extends rt{constructor(e,t={}){super(),this.url=e,this.reader=t.useXHR?new lt(e,t):new ot(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}async function bt(e,t){e.init&&!e.initialized&&await e.init(t)}const xt=4294967295,kt=65535,vt=new i(2107,11,31),zt=new i(1980,0,1),Rt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class St{constructor(e){Rt.forEach((t=>this[t]=e[t]))}}const Tt="File already exists",Dt="Zip file comment exceeds 64KB",Et="File entry comment exceeds 64KB",At="File entry name exceeds 64KB",Ft="Version exceeds 65535",Ct="The strength must equal 1, 2, or 3",Wt="Extra field type exceeds 65535",It="Extra field data exceeds 64KB",Ut="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Ht=new d([7,0,2,0,65,69,3,0,0]);let Mt=0;const Lt=[];async function qt(e,t){const n=e.getWriter();await n.ready,e.size+=t.length,await n.write(t),n.releaseLock()}function Bt(e){if(e)return(s(e.getTime())+s(116444736e5))*s(1e4)}function Nt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function Vt(e,t,n){e.setUint8(t,n)}function Pt(e,t,n){e.setUint16(t,n,!0)}function Ot(e,t,n){e.setUint32(t,n,!0)}function Kt(e,t,n){e.setBigUint64(t,n,!0)}function Zt(e,t,n){e.set(t,n)}function Xt(e){return new f(e.buffer)}C({Deflate:T}),e.BlobReader=at,e.BlobWriter=it,e.Data64URIReader=class extends rt{constructor(e){super();const t=this;t.dataURI=e;let n=e.length;for(;"="==e.charAt(n-1);)n--;t.dataStart=e.indexOf(",")+1,t.size=a.floor(.75*(n-t.dataStart))}readUint8Array(e,t){const n=new d(t),r=4*a.floor(e/3),s=this.dataStart,i=atob(this.dataURI.substring(r+s,4*a.ceil((e+t)/3)+s)),o=e-3*a.floor(r/4);for(let e=o;o+t>e;e++)n[e-o]=i.charCodeAt(e);return n}},e.Data64URIWriter=class extends st{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}writeUint8Array(e){const t=this;let n=0,s=t.pending;const i=t.pending.length;for(t.pending="",n=0;n<3*a.floor((i+e.length)/3)-i;n++)s+=r.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=r.fromCharCode(e[n]);s.length>2?t.data+=b(s):t.pending=s}getData(){return this.data+b(this.pending)}},e.ERR_DUPLICATED_NAME=Tt,e.ERR_HTTP_RANGE=Qe,e.ERR_INVALID_COMMENT=Dt,e.ERR_INVALID_ENCRYPTION_STRENGTH=Ct,e.ERR_INVALID_ENTRY_COMMENT=Et,e.ERR_INVALID_ENTRY_NAME=At,e.ERR_INVALID_EXTRAFIELD_DATA=It,e.ERR_INVALID_EXTRAFIELD_TYPE=Wt,e.ERR_INVALID_VERSION=Ft,e.ERR_UNSUPPORTED_FORMAT=Ut,e.HttpRangeReader=class extends yt{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=yt,e.Reader=rt,e.TextReader=class extends rt{constructor(e){super(),this.blobReader=new at(new p([e],{type:$e}))}init(){const e=this;super.init(),e.blobReader.init(),e.size=e.blobReader.size}readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends st{constructor(e){super(),this.encoding=e,this.blob=new p([],{type:$e})}writeUint8Array(e){this.blob=new p([this.blob,e.buffer],{type:$e})}getData(){const e=this;if(e.blob.text&&(void 0===e.encoding||e.encoding&&"utf-8"==e.encoding.toLowerCase()))return e.blob.text();{const t=new FileReader;return new w(((n,r)=>{t.onload=e=>n(e.target.result),t.onerror=()=>r(t.error),t.readAsText(e.blob,e.encoding)}))}}},e.Uint8ArrayReader=class extends rt{constructor(e){super(),this.array=e,this.size=e.length}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends st{init(e=0){super.init(),this.offset=0,this.array=new d(e)}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new d(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=st,e.ZipWriter=class{constructor(e,t={}){null==e.writable.size&&(e.writable.size=0),n.assign(this,{writer:e,options:t,config:F(),files:new o,filenames:new Set,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(e="",r,o={}){const l=this,{pendingAddFileCalls:p,config:g}=l;let _;Mt<g.maxWorkers?Mt++:await new w((e=>Lt.push(e)));try{if(e=e.trim(),l.filenames.has(e))throw new c(Tt);return l.filenames.add(e),_=(async(e,r,o,l)=>{r=r.trim(),l.directory&&!r.endsWith("/")?r+="/":l.directory=r.endsWith("/");const p=H(r);if(p.length>kt)throw new c(At);const g=l.comment||"",_=H(g);if(_.length>kt)throw new c(Et);const m=e.options.version||l.version||0;if(m>kt)throw new c(Ft);const y=e.options.versionMadeBy||l.versionMadeBy||20;if(y>kt)throw new c(Ft);const b=Nt(e,l,"lastModDate")||new i,x=Nt(e,l,"lastAccessDate"),k=Nt(e,l,"creationDate"),v=Nt(e,l,"password"),z=Nt(e,l,"encryptionStrength")||3,R=Nt(e,l,"zipCrypto");if(void 0!==v&&void 0!==z&&(1>z||z>3))throw new c(Ct);let S=new d;const{extraField:T}=l;if(T){let e=0,t=0;T.forEach((t=>e+=4+t.length)),S=new d(e),T.forEach(((e,n)=>{if(n>kt)throw new c(Wt);if(e.length>kt)throw new c(It);Zt(S,new u([n]),t),Zt(S,new u([e.length]),t+2),Zt(S,e,t+4),t+=4+e.length}))}let D=Nt(e,l,"extendedTimestamp");void 0===D&&(D=!0);let E=0,A=0,F=Nt(e,l,"keepOrder");void 0===F&&(F=!0);let C=0,W=Nt(e,l,"msDosCompatible");void 0===W&&(W=!0);const I=Nt(e,l,"internalFileAttribute")||0,U=Nt(e,l,"externalFileAttribute")||0;o&&(await bt(o),void 0===o.size?l.dataDescriptor=!0:C=o.size,E=(e=>e+5*(a.floor(e/16383)+1))(C));let M=l.zip64||e.options.zip64||!1;if(e.offset+e.pendingEntriesSize>=xt||C>=xt||E>=xt){if(!1===l.zip64||!1===e.options.zip64||!F)throw new c(Ut);M=!0}const L=Nt(e,l,"level"),q=Nt(e,l,"useWebWorkers"),B=Nt(e,l,"bufferedWrite");let N=Nt(e,l,"dataDescriptor"),V=Nt(e,l,"dataDescriptorSignature");const P=Nt(e,l,"signal"),O=Nt(e,l,"useCompressionStream");void 0===N&&(N=!0),N&&void 0===V&&(V=!1);const K=(e=>{const{rawFilename:t,lastAccessDate:n,creationDate:r,password:s,level:i,zip64:o,zipCrypto:l,dataDescriptor:c,directory:u,rawExtraField:f,encryptionStrength:p,extendedTimestamp:w}=e;let g=e.version||20;const _=0!==i&&!u,m=!(!s||!s.length);let y,b,x;if(m&&!l){y=new d(Ht.length+2);const e=Xt(y);Pt(e,0,39169),Zt(y,Ht,2),Vt(e,8,p)}else y=new d;if(w){x=new d(9+(n?4:0)+(r?4:0));const t=Xt(x);Pt(t,0,21589),Pt(t,2,x.length-4),Vt(t,4,1+(n?2:0)+(r?4:0)),Ot(t,5,a.floor(e.lastModDate.getTime()/1e3)),n&&Ot(t,9,a.floor(n.getTime()/1e3)),r&&Ot(t,13,a.floor(r.getTime()/1e3));try{b=new d(36);const t=Xt(b),s=Bt(e.lastModDate);Pt(t,0,10),Pt(t,2,32),Pt(t,8,1),Pt(t,10,24),Kt(t,12,s),Kt(t,20,Bt(n)||s),Kt(t,28,Bt(r)||s)}catch(e){b=new d}}else b=x=new d;let k=2048;c&&(k|=8);let v=0;_&&(v=8),o&&(g=g>45?g:45),m&&(k|=1,l||(g=g>51?g:51,v=99,_&&(y[9]=8)));const z=new d(26),R=Xt(z);Pt(R,0,g),Pt(R,2,k),Pt(R,4,v);const S=new h(1),T=Xt(S);let D;D=e.lastModDate<zt?zt:e.lastModDate>vt?vt:e.lastModDate,Pt(T,0,(D.getHours()<<6|D.getMinutes())<<5|D.getSeconds()/2),Pt(T,2,(D.getFullYear()-1980<<4|D.getMonth()+1)<<5|D.getDate());const E=S[0];Ot(R,6,E),Pt(R,22,t.length);const A=y.length+x.length+b.length+f.length;Pt(R,24,A);const F=new d(30+t.length+A);return Ot(Xt(F),0,67324752),Zt(F,z,4),Zt(F,t,30),Zt(F,y,30+t.length),Zt(F,x,30+t.length+y.length),Zt(F,b,30+t.length+y.length+x.length),Zt(F,f,30+t.length+y.length+x.length+b.length),{localHeaderArray:F,headerArray:z,headerView:R,lastModDate:D,rawLastModDate:E,encrypted:m,compressed:_,version:g,compressionMethod:v,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:b,rawExtraFieldAES:y}})(l=n.assign({},l,{rawFilename:p,rawComment:_,version:m,versionMadeBy:y,lastModDate:b,lastAccessDate:x,creationDate:k,rawExtraField:S,zip64:M,password:v,level:L,useWebWorkers:q,encryptionStrength:z,extendedTimestamp:D,zipCrypto:R,bufferedWrite:B,keepOrder:F,dataDescriptor:N,dataDescriptorSignature:V,signal:P,msDosCompatible:W,internalFileAttribute:I,externalFileAttribute:U,useCompressionStream:O})),Z=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let s,a=new d,i=0;return n&&(a=new d(t?r?24:20:r?16:12),s=Xt(a),r&&(i=4,Ot(s,0,134695760))),{dataDescriptorArray:a,dataDescriptorView:s,dataDescriptorOffset:i}})(l);A=K.localHeaderArray.length+E+Z.dataDescriptorArray.length,e.pendingEntriesSize+=A;const X=await(async(e,r,i,o,l)=>{const{files:u,writer:h}=e,{keepOrder:p,dataDescriptor:g,zipCrypto:_,signal:m}=l,y=t.from(u.values()).pop();let b,x,k,v,z,R={};u.set(r,R);try{let t;if(p&&(t=y&&y.lock,R.lock=new w((e=>k=e))),l.bufferedWrite||e.lockWriter||!g?(z=new it,z.writable.size=0,b=!0,await bt(h)):(z=h,e.lockWriter=w.resolve(),x=()=>delete e.lockWriter),await bt(z),b||await t,R.writingData=!0,R=await(async(e,t,r,i,o,l)=>{const{localHeaderInfo:c,dataDescriptorInfo:u}=i,{localHeaderArray:h,headerArray:f,lastModDate:p,rawLastModDate:g,encrypted:_,compressed:m,version:y,compressionMethod:b,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:k,rawExtraFieldAES:v}=c,{dataDescriptorArray:z}=u,{rawFilename:R,lastAccessDate:S,creationDate:T,password:D,level:E,zip64:A,zipCrypto:F,dataDescriptor:C,directory:W,versionMadeBy:I,rawComment:U,rawExtraField:H,useWebWorkers:M,onstart:L,onprogress:q,onend:B,signal:N,encryptionStrength:V,extendedTimestamp:P,msDosCompatible:O,internalFileAttribute:K,externalFileAttribute:Z,useCompressionStream:X}=l,Y={lock:r.lock,versionMadeBy:I,zip64:A,directory:!!W,filenameUTF8:!0,rawFilename:R,commentUTF8:!0,rawComment:U,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:k,rawExtraFieldAES:v,rawExtraField:H,extendedTimestamp:P,msDosCompatible:O,internalFileAttribute:K,externalFileAttribute:Z};let j,G=0,J=0;const{writable:Q}=t;if(e){e.chunkSize=(e=>a.max(e.chunkSize,64))(o),await qt(Q,h);const t=()=>e.size,n=e.readable;n.size=t;const r={options:{codecType:Be,level:E,password:D,encryptionStrength:V,zipCrypto:_&&F,passwordVerification:_&&F&&g>>8&255,signed:!0,compressed:m,encrypted:_,useWebWorkers:M,useCompressionStream:X},config:o,streamOptions:{signal:N,size:t,onstart:L,onprogress:q,onend:B},codecConstructor:o.Deflate},s=Q.size;j=(await(async(e,t)=>{const{options:n,config:r}=t,s=!n.compressed&&!n.signed&&!n.encrypted,{useWebWorkers:a,useCompressionStream:i,codecType:o}=n,{workerScripts:l}=r;let c;if(t.webWorker=!s&&(a||void 0===a&&r.useWebWorkers),t.scripts=t.webWorker&&l?l[o]:[],n.useCompressionStream=void 0===i?r.useCompressionStream:i,Xe.length<r.maxWorkers){const n={indexWorker:je};je++,Xe.push(n),c=new Ke(n,e,t,d)}else{const n=Xe.find((e=>!e.busy));n?(Ge(n),c=new Ke(n,e,t,d)):c=await new w((n=>Ye.push({resolve:n,stream:e,workerOptions:t})))}return c.run();function d(e){if(Ye.length){const[{resolve:t,stream:n,workerOptions:r}]=Ye.splice(0,1);t(new Ke(e,n,r,d))}else if(e.worker){const{terminateWorkerTimeout:t}=r;Ge(e),Number.isFinite(t)&&t>=0&&(e.terminateTimeout=setTimeout((()=>{Xe=Xe.filter((t=>t!=e)),e.terminate()}),t))}else Xe=Xe.filter((t=>t!=e))}})({readable:n,writable:Q},r)).signature,G=e.size=n.size(),J=Q.size-s}else await qt(Q,h);const $=A?new d(28):new d;return e&&((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:a,uncompressedSize:i,localHeaderInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:u,dataDescriptorOffset:h}=l,{zip64:f,zipCrypto:p,dataDescriptor:w}=t;if(d&&!p||void 0===n||(Ot(c,10,n),w&&Ot(u,h,n)),f){const e=Xt(r);Pt(e,0,1),Pt(e,2,24),Ot(c,14,xt),Kt(e,12,s(a)),Ot(c,18,xt),Kt(e,4,s(i)),w&&(Kt(u,h+4,s(a)),Kt(u,h+12,s(i)))}else Ot(c,14,a),Ot(c,18,i),w&&(Ot(u,h+4,a),Ot(u,h+8,i))})({signature:j,rawExtraFieldZip64:$,compressedSize:J,uncompressedSize:G,localHeaderInfo:c,dataDescriptorInfo:u},l),C&&await qt(Q,z),n.assign(Y,{compressedSize:J,lastModDate:p,rawLastModDate:g,creationDate:T,lastAccessDate:S,encrypted:_,length:h.length+J+z.length,compressionMethod:b,version:y,headerArray:f,signature:j,rawExtraFieldZip64:$}),Y})(i,z,R,o,e.config,l),u.set(r,R),R.filename=r,b){await z.writable.getWriter().close();let n=await z.getData();await t,await async function t(){const{lockWriter:n}=e;if(n)return await n.then((()=>delete e.lockWriter)),t();e.lockWriter=new w((e=>x=e))}(),v=!0;const{writable:r}=h;if(!g){const e=await(e=>e.slice(0,26).arrayBuffer())(n),t=new f(e);R.encrypted&&!_||Ot(t,14,R.signature),R.zip64?(Ot(t,18,xt),Ot(t,22,xt)):(Ot(t,18,R.compressedSize),Ot(t,22,R.uncompressedSize)),await qt(r,new d(e)),n=n.slice(e.byteLength)}await n.stream().pipeTo(r,{preventClose:!0,signal:m}),v=!1}if(R.offset=e.offset,R.zip64)Kt(Xt(R.rawExtraFieldZip64),20,s(R.offset));else if(R.offset>=xt)throw new c(Ut);return e.offset+=R.length,R}catch(t){throw(b&&v||!b&&R.writingData)&&(e.hasCorruptedEntries=!0,t&&(t.corruptedEntry=!0),b?e.offset+=z.writable.size:e.offset=z.writable.size),u.delete(r),t}finally{k&&k(),x&&x()}})(e,r,o,{localHeaderInfo:K,dataDescriptorInfo:Z},l);return A&&(e.pendingEntriesSize-=A),n.assign(X,{name:r,comment:g,extraField:T}),new St(X)})(l,e,r,o),p.add(_),await _}catch(t){throw l.filenames.delete(e),t}finally{p.delete(_);const e=Lt.shift();e?e():Mt--}}async close(e=new d,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:o}=i;for(;r.size;)await w.all(t.from(r));return await(async(e,n,r)=>{const{files:i}=e;let o=0,l=0,u=e.offset,h=i.size;for(const[,e]of i)l+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraFieldExtendedTimestamp.length+e.rawExtraFieldNTFS.length+e.rawExtraField.length;let f=r.zip64||e.options.zip64||!1;if(u>=xt||l>=xt||h>=kt){if(!1===r.zip64||!1===e.options.zip64)throw new c(Ut);f=!0}const p=new d(l+(f?98:22)),w=Xt(p);for(const[e,n]of t.from(i.values()).entries()){const{rawFilename:t,rawExtraFieldZip64:s,rawExtraFieldAES:l,rawExtraField:c,rawComment:u,versionMadeBy:h,headerArray:f,directory:g,zip64:_,msDosCompatible:m,internalFileAttribute:y,externalFileAttribute:b}=n;let x,k;if(n.extendedTimestamp){k=n.rawExtraFieldNTFS,x=new d(9);const e=Xt(x);Pt(e,0,21589),Pt(e,2,x.length-4),Vt(e,4,1),Ot(e,5,a.floor(n.lastModDate.getTime()/1e3))}else k=x=new d;const v=s.length+l.length+x.length+k.length+c.length;if(Ot(w,o,33639248),Pt(w,o+4,h),Zt(p,f,o+6),Pt(w,o+30,v),Pt(w,o+32,u.length),Pt(w,o+36,y),b?Ot(w,o+38,b):g&&m&&Vt(w,o+38,16),Ot(w,o+42,_?xt:n.offset),Zt(p,t,o+46),Zt(p,s,o+46+t.length),Zt(p,l,o+46+t.length+s.length),Zt(p,x,o+46+t.length+s.length+l.length),Zt(p,k,o+46+t.length+s.length+l.length+x.length),Zt(p,c,o+46+t.length+s.length+l.length+x.length+k.length),Zt(p,u,o+46+t.length+v),o+=46+t.length+v+u.length,r.onprogress)try{await r.onprogress(e+1,i.size,new St(n))}catch(e){}}if(f&&(Ot(w,o,101075792),Kt(w,o+4,s(44)),Pt(w,o+12,45),Pt(w,o+14,45),Kt(w,o+24,s(h)),Kt(w,o+32,s(h)),Kt(w,o+40,s(l)),Kt(w,o+48,s(u)),Ot(w,o+56,117853008),Kt(w,o+64,s(u)+s(l)),Ot(w,o+72,1),h=kt,u=xt,l=xt,o+=76),Ot(w,o,101010256),Pt(w,o+8,h),Pt(w,o+10,h),Ot(w,o+12,l),Ot(w,o+16,u),n&&n.length){if(n.length>kt)throw new c(Dt);Pt(w,o+20,n.length)}const{writable:g}=e.writer;await bt(e.writer),await qt(g,p),n&&n.length&&await qt(g,n)})(this,e,n),i.preventClose||n.preventClose||await o.getWriter().close(),i.getData?i.getData():o}},e.configure=C,e.getMimeType=()=>"application/octet-stream",e.initStream=bt,e.terminateWorkers=()=>{Xe.forEach((e=>{Ge(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
((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{Array:t,Object:n,String:r,BigInt:s,Math:a,Date:i,Map:o,URL:l,Error:c,Uint8Array:d,Uint16Array:u,Uint32Array:h,DataView:f,Blob:p,Promise:w,TextEncoder:g,TextDecoder:_,document:m,crypto:y,btoa:b,TransformStream:x,ReadableStream:k,WritableStream:v,CompressionStream:z,DecompressionStream:R,navigator:S}=globalThis,T=(()=>{const e=-2;function n(e){return r(e.map((([e,n])=>new t(e).fill(n,0,e))))}function r(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?r(n):n)),[])}const s=[0,1,2,3].concat(...n([[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 i(){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=n=>{const r=e.dyn_tree,s=e.stat_desc.static_tree,i=e.stat_desc.elems;let o,l,c,d=-1;for(n.heap_len=0,n.heap_max=573,o=0;i>o;o++)0!==r[2*o]?(n.heap[++n.heap_len]=d=o,n.depth[o]=0):r[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>d?++d:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,s&&(n.static_len-=s[2*c+1]);for(e.max_code=d,o=a.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=i;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,r[2*c]=r[2*o]+r[2*l],n.depth[c]=a.max(n.depth[o],n.depth[l])+1,r[2*o+1]=r[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,i=e.stat_desc.max_length;let o,l,c,d,u,h,f=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],d=n[2*n[2*l+1]+1]+1,d>i&&(d=i,f++),n[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,u=0,a>l||(u=s[l-a]),h=n[2*l],t.opt_len+=h*(d+u),r&&(t.static_len+=h*(r[2*l+1]+u)));if(0!==f){do{for(d=i-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[i]--,f-=2}while(f>0);for(d=i;0!==d;d--)for(l=t.bl_count[d];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=d&&(t.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}})(n),((e,n,r)=>{const s=[];let a,i,o,l=0;for(a=1;15>=a;a++)s[a]=l=l+r[a-1]<<1;for(i=0;n>=i;i++)o=e[2*i+1],0!==o&&(e[2*i]=t(s[o]++,o))})(r,e.max_code,n.bl_count)}}function o(e,t,n,r,s){const a=this;a.static_tree=e,a.extra_bits=t,a.extra_base=n,a.elems=r,a.max_length=s}i._length_code=[0,1,2,3,4,5,6,7].concat(...n([[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]])),i.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],i.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],i.d_code=e=>256>e?s[e]:s[256+(e>>>7)],i.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],i.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],i.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],i.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const l=n([[144,8],[112,9],[24,7],[8,8]]);o.static_ltree=r([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,l[t]])));const h=n([[30,5]]);function f(e,t,n,r,s){const a=this;a.good_length=e,a.max_lazy=t,a.nice_length=n,a.max_chain=r,a.func=s}o.static_dtree=r([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,h[t]]))),o.static_l_desc=new o(o.static_ltree,i.extra_lbits,257,286,15),o.static_d_desc=new o(o.static_dtree,i.extra_dbits,0,30,15),o.static_bl_desc=new o(null,i.extra_blbits,0,19,7);const p=[new f(0,0,0,0,0),new f(4,4,8,4,1),new f(4,5,16,8,1),new f(4,6,32,32,1),new f(4,4,16,16,2),new f(8,16,32,32,2),new f(8,16,128,128,2),new f(8,32,128,256,2),new f(32,128,258,1024,2),new f(32,258,258,4096,2)],w=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],g=113,_=666,m=262;function y(e,t,n,r){const s=e[2*t],a=e[2*n];return a>s||s==a&&r[t]<=r[n]}function b(){const t=this;let n,r,s,l,c,h,f,b,x,k,v,z,R,S,T,D,E,A,F,C,W,I,U,M,H,L,q,B,N,V,P,O,K;const Z=new i,X=new i,Y=new i;let j,G,J,Q,$,ee;function te(){let e;for(e=0;286>e;e++)P[2*e]=0;for(e=0;30>e;e++)O[2*e]=0;for(e=0;19>e;e++)K[2*e]=0;P[512]=1,t.opt_len=t.static_len=0,G=J=0}function ne(e,t){let n,r=-1,s=e[1],a=0,i=7,o=4;0===s&&(i=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=s,s=e[2*(l+1)+1],++a<i&&n==s||(o>a?K[2*n]+=a:0!==n?(n!=r&&K[2*n]++,K[32]++):a>10?K[36]++:K[34]++,a=0,r=n,0===s?(i=138,o=3):n==s?(i=6,o=3):(i=7,o=4))}function re(e){t.pending_buf[t.pending++]=e}function se(e){re(255&e),re(e>>>8&255)}function ae(e,t){let n;const r=t;ee>16-r?(n=e,$|=n<<ee&65535,se($),$=n>>>16-ee,ee+=r-16):($|=e<<ee&65535,ee+=r)}function ie(e,t){const n=2*e;ae(65535&t[n],65535&t[n+1])}function oe(e,t){let n,r,s=-1,a=e[1],i=0,o=7,l=4;for(0===a&&(o=138,l=3),n=0;t>=n;n++)if(r=a,a=e[2*(n+1)+1],++i>=o||r!=a){if(l>i)do{ie(r,K)}while(0!=--i);else 0!==r?(r!=s&&(ie(r,K),i--),ie(16,K),ae(i-3,2)):i>10?(ie(18,K),ae(i-11,7)):(ie(17,K),ae(i-3,3));i=0,s=r,0===a?(o=138,l=3):r==a?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(se($),$=0,ee=0):8>ee||(re(255&$),$>>>=8,ee-=8)}function ce(e,n){let r,s,o;if(t.dist_buf[G]=e,t.lc_buf[G]=255&n,G++,0===e?P[2*n]++:(J++,e--,P[2*(i._length_code[n]+256+1)]++,O[2*i.d_code(e)]++),0==(8191&G)&&q>2){for(r=8*G,s=W-E,o=0;30>o;o++)r+=O[2*o]*(5+i.extra_dbits[o]);if(r>>>=3,J<a.floor(G/2)&&r<a.floor(s/2))return!0}return G==j-1}function de(e,n){let r,s,a,o,l=0;if(0!==G)do{r=t.dist_buf[l],s=t.lc_buf[l],l++,0===r?ie(s,e):(a=i._length_code[s],ie(a+256+1,e),o=i.extra_lbits[a],0!==o&&(s-=i.base_length[a],ae(s,o)),r--,a=i.d_code(r),ie(a,n),o=i.extra_dbits[a],0!==o&&(r-=i.base_dist[a],ae(r,o)))}while(G>l);ie(256,e),Q=e[513]}function ue(){ee>8?se($):ee>0&&re(255&$),$=0,ee=0}function he(e,n,r){ae(0+(r?1:0),3),((e,n)=>{ue(),Q=8,se(n),se(~n),t.pending_buf.set(b.subarray(e,e+n),t.pending),t.pending+=n})(e,n)}function fe(e){((e,n,r)=>{let s,a,l=0;q>0?(Z.build_tree(t),X.build_tree(t),l=(()=>{let e;for(ne(P,Z.max_code),ne(O,X.max_code),Y.build_tree(t),e=18;e>=3&&0===K[2*i.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(),s=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a>s||(s=a)):s=a=n+5,n+4>s||-1==e?a==s?(ae(2+(r?1:0),3),de(o.static_ltree,o.static_dtree)):(ae(4+(r?1:0),3),((e,t,n)=>{let r;for(ae(e-257,5),ae(t-1,5),ae(n-4,4),r=0;n>r;r++)ae(K[2*i.bl_order[r]+1],3);oe(P,e-1),oe(O,t-1)})(Z.max_code+1,X.max_code+1,l+1),de(P,O)):he(e,n,r),te(),r&&ue()})(0>E?-1:E,W-E,e),E=W,n.flush_pending()}function pe(){let e,t,r,s;do{if(s=x-U-W,0===s&&0===W&&0===U)s=c;else if(-1==s)s--;else if(W>=c+c-m){b.set(b.subarray(c,c+c),0),I-=c,W-=c,E-=c,e=R,r=e;do{t=65535&v[--r],v[r]=c>t?0:t-c}while(0!=--e);e=c,r=e;do{t=65535&k[--r],k[r]=c>t?0:t-c}while(0!=--e);s+=c}if(0===n.avail_in)return;e=n.read_buf(b,W+U,s),U+=e,3>U||(z=255&b[W],z=(z<<D^255&b[W+1])&T)}while(m>U&&0!==n.avail_in)}function we(e){let t,n,r=H,s=W,a=M;const i=W>c-m?W-(c-m):0;let o=V;const l=f,d=W+258;let u=b[s+a-1],h=b[s+a];N>M||(r>>=2),o>U&&(o=U);do{if(t=e,b[t+a]==h&&b[t+a-1]==u&&b[t]==b[s]&&b[++t]==b[s+1]){s+=2,t++;do{}while(b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&b[++s]==b[++t]&&d>s);if(n=258-(d-s),s=d-258,n>a){if(I=e,a=n,n>=o)break;u=b[s+a-1],h=b[s+a]}}}while((e=65535&k[e&l])>i&&0!=--r);return a>U?U:a}t.depth=[],t.bl_count=[],t.heap=[],P=[],O=[],K=[],t.pqdownheap=(e,n)=>{const r=t.heap,s=r[n];let a=n<<1;for(;a<=t.heap_len&&(a<t.heap_len&&y(e,r[a+1],r[a],t.depth)&&a++,!y(e,s,r[a],t.depth));)r[n]=r[a],n=a,a<<=1;r[n]=s},t.deflateInit=(n,i,w,_,m,y)=>(_||(_=8),m||(m=8),y||(y=0),n.msg=null,-1==i&&(i=6),1>m||m>9||8!=_||9>w||w>15||0>i||i>9||0>y||y>2?e:(n.dstate=t,h=w,c=1<<h,f=c-1,S=m+7,R=1<<S,T=R-1,D=a.floor((S+3-1)/3),b=new d(2*c),k=[],v=[],j=1<<m+6,t.pending_buf=new d(4*j),s=4*j,t.dist_buf=new u(j),t.lc_buf=new d(j),q=i,B=y,(e=>(e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,r=g,l=0,Z.dyn_tree=P,Z.stat_desc=o.static_l_desc,X.dyn_tree=O,X.stat_desc=o.static_d_desc,Y.dyn_tree=K,Y.stat_desc=o.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{x=2*c,v[R-1]=0;for(let e=0;R-1>e;e++)v[e]=0;L=p[q].max_lazy,N=p[q].good_length,V=p[q].nice_length,H=p[q].max_chain,W=0,E=0,U=0,A=M=2,C=0,z=0})(),0))(n))),t.deflateEnd=()=>42!=r&&r!=g&&r!=_?e:(t.lc_buf=null,t.dist_buf=null,t.pending_buf=null,v=null,k=null,b=null,t.dstate=null,r==g?-3:0),t.deflateParams=(t,n,r)=>{let s=0;return-1==n&&(n=6),0>n||n>9||0>r||r>2?e:(p[q].func!=p[n].func&&0!==t.total_in&&(s=t.deflate(1)),q!=n&&(q=n,L=p[q].max_lazy,N=p[q].good_length,V=p[q].nice_length,H=p[q].max_chain),B=r,s)},t.deflateSetDictionary=(t,n,s)=>{let a,i=s,o=0;if(!n||42!=r)return e;if(3>i)return 0;for(i>c-m&&(i=c-m,o=s-i),b.set(n.subarray(o,o+i),0),W=i,E=i,z=255&b[0],z=(z<<D^255&b[1])&T,a=0;i-3>=a;a++)z=(z<<D^255&b[a+2])&T,k[a&f]=v[z],v[z]=a;return 0},t.deflate=(a,i)=>{let d,u,y,x,S;if(i>4||0>i)return e;if(!a.next_out||!a.next_in&&0!==a.avail_in||r==_&&4!=i)return a.msg=w[4],e;if(0===a.avail_out)return a.msg=w[7],-5;var H;if(n=a,x=l,l=i,42==r&&(u=8+(h-8<<4)<<8,y=(q-1&255)>>1,y>3&&(y=3),u|=y<<6,0!==W&&(u|=32),u+=31-u%31,r=g,re((H=u)>>8&255),re(255&H)),0!==t.pending){if(n.flush_pending(),0===n.avail_out)return l=-1,0}else if(0===n.avail_in&&x>=i&&4!=i)return n.msg=w[7],-5;if(r==_&&0!==n.avail_in)return a.msg=w[7],-5;if(0!==n.avail_in||0!==U||0!=i&&r!=_){switch(S=-1,p[q].func){case 0:S=(e=>{let t,r=65535;for(r>s-5&&(r=s-5);;){if(1>=U){if(pe(),0===U&&0==e)return 0;if(0===U)break}if(W+=U,U=0,t=E+r,(0===W||W>=t)&&(U=W-t,W=t,fe(!1),0===n.avail_out))return 0;if(W-E>=c-m&&(fe(!1),0===n.avail_out))return 0}return fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(i);break;case 1:S=(e=>{let t,r=0;for(;;){if(m>U){if(pe(),m>U&&0==e)return 0;if(0===U)break}if(3>U||(z=(z<<D^255&b[W+2])&T,r=65535&v[z],k[W&f]=v[z],v[z]=W),0===r||(W-r&65535)>c-m||2!=B&&(A=we(r)),3>A)t=ce(0,255&b[W]),U--,W++;else if(t=ce(W-I,A-3),U-=A,A>L||3>U)W+=A,A=0,z=255&b[W],z=(z<<D^255&b[W+1])&T;else{A--;do{W++,z=(z<<D^255&b[W+2])&T,r=65535&v[z],k[W&f]=v[z],v[z]=W}while(0!=--A);W++}if(t&&(fe(!1),0===n.avail_out))return 0}return fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(i);break;case 2:S=(e=>{let t,r,s=0;for(;;){if(m>U){if(pe(),m>U&&0==e)return 0;if(0===U)break}if(3>U||(z=(z<<D^255&b[W+2])&T,s=65535&v[z],k[W&f]=v[z],v[z]=W),M=A,F=I,A=2,0!==s&&L>M&&c-m>=(W-s&65535)&&(2!=B&&(A=we(s)),5>=A&&(1==B||3==A&&W-I>4096)&&(A=2)),3>M||A>M)if(0!==C){if(t=ce(0,255&b[W-1]),t&&fe(!1),W++,U--,0===n.avail_out)return 0}else C=1,W++,U--;else{r=W+U-3,t=ce(W-1-F,M-3),U-=M-1,M-=2;do{++W>r||(z=(z<<D^255&b[W+2])&T,s=65535&v[z],k[W&f]=v[z],v[z]=W)}while(0!=--M);if(C=0,A=2,W++,t&&(fe(!1),0===n.avail_out))return 0}}return 0!==C&&(t=ce(0,255&b[W-1]),C=0),fe(4==e),0===n.avail_out?4==e?2:0:4==e?3:1})(i)}if(2!=S&&3!=S||(r=_),0==S||2==S)return 0===n.avail_out&&(l=-1),0;if(1==S){if(1==i)ae(2,3),ie(256,o.static_ltree),le(),9>1+Q+10-ee&&(ae(2,3),ie(256,o.static_ltree),le()),Q=7;else if(he(0,0,!1),3==i)for(d=0;R>d;d++)v[d]=0;if(n.flush_pending(),0===n.avail_out)return l=-1,0}}return 4!=i?0:1}}function x(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}return x.prototype={deflateInit(e,t){const n=this;return n.dstate=new b,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(t){const n=this;return n.dstate?n.dstate.deflate(n,t):e},deflateEnd(){const t=this;if(!t.dstate)return e;const n=t.dstate.deflateEnd();return t.dstate=null,n},deflateParams(t,n){const r=this;return r.dstate?r.dstate.deflateParams(r,t,n):e},deflateSetDictionary(t,n){const r=this;return r.dstate?r.dstate.deflateSetDictionary(r,t,n):e},read_buf(e,t,n){const r=this;let s=r.avail_in;return s>n&&(s=n),0===s?0:(r.avail_in-=s,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),t),r.next_in_index+=s,r.total_in+=s,s)},flush_pending(){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))}},function(e){const t=new x,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(a.floor(r/16383)+1);var r;const s=new d(n);let i=e?e.level:-1;void 0===i&&(i=-1),t.deflateInit(i),t.next_out=s,this.append=(e,r)=>{let a,i,o=0,l=0,u=0;const h=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,a=t.deflate(0),0!=a)throw new c("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?h.push(new d(s)):h.push(s.slice(0,t.next_out_index))),u+=t.next_out_index,r&&t.next_in_index>0&&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 h.length>1?(i=new d(u),h.forEach((e=>{i.set(e,l),l+=e.length}))):i=h[0]||new d,i}},this.flush=()=>{let e,r,a=0,i=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new c("deflating: "+t.msg);n-t.avail_out>0&&o.push(s.slice(0,t.next_out_index)),i+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new d(i),o.forEach((e=>{r.set(e,a),a+=e.length})),r}}})(),D=void 0,E={chunkSize:524288,maxWorkers:void 0!==S&&S.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},A=n.assign({},E);function F(){return A}function C(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:a,useCompressionStream:i,useWebWorkers:o,Deflate:l,Inflate:d,workerScripts:u}=e;if(n!==D&&(A.baseURL=n),r!==D&&(A.chunkSize=r),s!==D&&(A.maxWorkers=s),a!==D&&(A.terminateWorkerTimeout=a),i!==D&&(A.useCompressionStream=i),o!==D&&(A.useWebWorkers=o),l!==D&&(A.Deflate=l),d!==D&&(A.Inflate=d),u!==D){const{deflate:e,inflate:n}=u;if((e||n)&&(A.workerScripts||(A.workerScripts={})),e){if(!t.isArray(e))throw new c("workerScripts.deflate must be an array");A.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new c("workerScripts.inflate must be an array");A.workerScripts.inflate=n}}}const W=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;W[e]=t}class I{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^W[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class U extends x{constructor(){super({start(){this.crc32=new I},transform(e){this.crc32.append(e)},flush(e){const t=new d(4);new f(t.buffer).setUint32(0,this.crc32.get()),e.enqueue(t)}})}}function M(e){if(void 0===g){const t=new d((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new g).encode(e)}const H={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=H.getPartial(n);return 32===r?e.concat(t):H._shiftRight(t,r,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+H.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,a.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=H.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,a=H.getPartial(s);return r.push(H.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},L={bytes:{fromBits(e){const t=H.bitLength(e)/8,n=new d(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3==(3&n)&&(t.push(r),r=0);return 3&n&&t.push(H.partial(8*(3&n),r)),t}}},q={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};q.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=L.utf8String.toBits(e));const n=t._buffer=H.concat(t._buffer,e),r=t._length,s=t._length=r+H.bitLength(e);if(s>9007199254740991)throw new c("Cannot hash more than 2^53 - 1 bits");const a=new h(n);let i=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);s>=e;e+=t.blockSize)t._block(a.subarray(16*i,16*(i+1))),i+=1;return n.splice(0,16*i),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=H.concat(t,[H.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,r)=>e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r,_S:(e,t)=>t<<e|t>>>32-e,_block(e){const n=this,r=n._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let i=r[0],o=r[1],l=r[2],c=r[3],d=r[4];for(let e=0;79>=e;e++){16>e||(s[e]=n._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=n._S(5,i)+n._f(e,o,l,c)+d+s[e]+n._key[a.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=i,i=t}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+l|0,r[3]=r[3]+c|0,r[4]=r[4]+d|0}};const B={getRandomValues(e){const t=new h(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let r,s=0;s<e.length;s+=4){const e=n(4294967296*(r||a.random()));r=987654071*e(),t[s/4]=4294967296*e()|0}return e}},N={importKey:e=>new N.hmacSha1(L.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new c("invalid params to pbkdf2");const s=1+(r>>5)<<2;let a,i,o,l,d;const u=new ArrayBuffer(s),h=new f(u);let p=0;const w=H;for(t=L.bytes.toBits(t),d=1;(s||1)>p;d++){for(a=i=e.encrypt(w.concat(t,[d])),o=1;n>o;o++)for(i=e.encrypt(i),l=0;l<i.length;l++)a[l]^=i[l];for(o=0;(s||1)>p&&o<a.length;o++)h.setInt32(p,a[o]),p+=4}return u.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=q.sha1,r=[[],[]],s=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>s&&(e=n.hash(e));for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new c("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},V=void 0!==y&&"function"==typeof y.getRandomValues,P="Invalid password";function O(e){return V?y.getRandomValues(e):B.getRandomValues(e)}const K=16,Z={name:"PBKDF2"},X=n.assign({hash:{name:"HMAC"}},Z),Y=n.assign({iterations:1e3,hash:{name:"SHA-1"}},Z),j=["deriveBits"],G=[8,12,16],J=[16,24,32],Q=10,$=[0,0,0,0],ee="undefined",te="function",ne=typeof y!=ee,re=ne&&typeof y.subtle!=ee,se=ne&&re&&typeof y.subtle.importKey==te,ae=ne&&re&&typeof y.subtle.deriveBits==te,ie=L.bytes,oe=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],s=e.length;let a,i,o,l=1;if(4!==s&&6!==s&&8!==s)throw new c("invalid aes key size");for(t._key=[i=e.slice(0),o=[]],a=s;4*s+28>a;a++){let e=i[a-1];(a%s==0||8===s&&a%s==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%s==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[a]=i[a-s]^e}for(let e=0;a;e++,a--){const t=i[3&e?a:a-4];o[e]=4>=a||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],s=[],a=[];let i,o,l,c;for(let e=0;256>e;e++)a[(s[e]=e<<1^283*(e>>7))^e]=e;for(let d=i=0;!n[d];d^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[d]=a,r[a]=d,c=s[l=s[o=s[d]]];let u=16843009*c^65537*l^257*o^16843008*d,h=257*s[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=h=h<<24^h>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new c("invalid aes block size");const n=this._key[t],r=n.length/4-2,s=[0,0,0,0],a=this._tables[t],i=a[0],o=a[1],l=a[2],d=a[3],u=a[4];let h,f,p,w=e[0]^n[0],g=e[t?3:1]^n[1],_=e[2]^n[2],m=e[t?1:3]^n[3],y=4;for(let e=0;r>e;e++)h=i[w>>>24]^o[g>>16&255]^l[_>>8&255]^d[255&m]^n[y],f=i[g>>>24]^o[_>>16&255]^l[m>>8&255]^d[255&w]^n[y+1],p=i[_>>>24]^o[m>>16&255]^l[w>>8&255]^d[255&g]^n[y+2],m=i[m>>>24]^o[w>>16&255]^l[g>>8&255]^d[255&_]^n[y+3],y+=4,w=h,g=f,_=p;for(let e=0;4>e;e++)s[t?3&-e:e]=u[w>>>24]<<24^u[g>>16&255]<<16^u[_>>8&255]<<8^u[255&m]^n[y++],h=w,w=g,g=_,_=m,m=h;return s}},le=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const s=H.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return H.clamp(t,s)}},ce=N.hmacSha1;class de extends x{constructor(e,r,s){let a;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,signed:r,strength:s-1,pending:new d})},async transform(e,n){const r=this;if(r.password){const n=r.password;r.password=null;const s=we(e,0,G[r.strength]+2);await(async(e,t,n)=>{await fe(e,n,we(t,0,G[e.strength]));const r=we(t,G[e.strength]),s=e.keys.passwordVerification;if(s[0]!=r[0]||s[1]!=r[1])throw new c(P)})(r,s,n),r.ctr=new le(new oe(r.keys.key),t.from($)),r.hmac=new ce(r.keys.authentication),e=we(e,G[r.strength]+2),r.resolveReady()}else await r.ready;const s=new d(e.length-Q-(e.length-Q)%K);n.enqueue(he(r,e,s,0,Q,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,r=we(n,0,n.length-Q),s=we(n,n.length-Q);let i=new d;if(r.length){const e=_e(ie,r);t.hmac.update(e);const n=t.ctr.update(e);i=ge(ie,n)}if(a.valid=!0,t.signed){const e=we(ge(ie,t.hmac.digest()),0,Q);for(let t=0;Q>t;t++)e[t]!=s[t]&&(a.valid=!1)}e.enqueue(i)}}),a=this}}class ue extends x{constructor(e,r){let s;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,strength:r-1,pending:new d})},async transform(e,n){const r=this;let s=new d;if(r.password){const e=r.password;r.password=null,s=await(async(e,t)=>{const n=O(new d(G[e.strength]));return await fe(e,t,n),pe(n,e.keys.passwordVerification)})(r,e),r.ctr=new le(new oe(r.keys.key),t.from($)),r.hmac=new ce(r.keys.authentication),r.resolveReady()}else await r.ready;const a=new d(s.length+e.length-e.length%K);a.set(s,0),n.enqueue(he(r,e,a,s.length,0))},async flush(e){const t=this;await t.ready;let n=new d;if(t.pending.length){const e=t.ctr.update(_e(ie,t.pending));t.hmac.update(e),n=ge(ie,e)}s.signature=ge(ie,t.hmac.digest()).slice(0,Q),e.enqueue(pe(n,s.signature))}}),s=this}}function he(e,t,n,r,s,a){const i=t.length-s;let o;for(e.pending.length&&(t=pe(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new d(t)).set(n,0)}return e})(n,i-i%K)),o=0;i-K>=o;o+=K){const s=_e(ie,we(t,o,o+K));a&&e.hmac.update(s);const i=e.ctr.update(s);a||e.hmac.update(i),n.set(ge(ie,i),o+r)}return e.pending=we(t,o),n}async function fe(e,t,r){const s=M(t),a=await((e,t,n,r,s)=>se?y.subtle.importKey("raw",t,n,!1,s):N.importKey(t))(0,s,X,0,j),i=await(async(e,t,n)=>ae?await y.subtle.deriveBits(e,t,n):N.pbkdf2(t,e.salt,Y.iterations,n))(n.assign({salt:r},Y),a,8*(2*J[e.strength]+2)),o=new d(i);e.keys={key:_e(ie,we(o,0,J[e.strength])),authentication:_e(ie,we(o,J[e.strength],2*J[e.strength])),passwordVerification:we(o,2*J[e.strength])}}function pe(e,t){let n=e;return e.length+t.length&&(n=new d(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function we(e,t,n){return e.subarray(t,n)}function ge(e,t){return e.fromBits(t)}function _e(e,t){return e.toBits(t)}class me extends x{constructor(e,t){let r;super({start(){n.assign(this,{password:e,passwordVerification:t}),ke(this,e)},transform(e,t){const n=this;if(n.password){const t=be(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new c(P);e=e.subarray(12)}t.enqueue(be(n,e))},flush(){r.valid=!0}}),r=this}}class ye extends x{constructor(e,t){super({start(){n.assign(this,{password:e,passwordVerification:t}),ke(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=O(new d(12));t[11]=n.passwordVerification,r=new d(e.length+t.length),r.set(xe(n,t),0),s=12}else r=new d(e.length),s=0;r.set(xe(n,e),s),t.enqueue(r)},flush(){}})}}function be(e,t){const n=new d(t.length);for(let r=0;r<t.length;r++)n[r]=ze(e)^t[r],ve(e,n[r]);return n}function xe(e,t){const n=new d(t.length);for(let r=0;r<t.length;r++)n[r]=ze(e)^t[r],ve(e,t[r]);return n}function ke(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new I(e.keys[0]),e.crcKey2=new I(e.keys[2]);for(let n=0;n<t.length;n++)ve(e,t.charCodeAt(n))}function ve(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=Se(e.keys[1]+Re(e.keys[0])),e.keys[1]=Se(a.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ze(e){const t=2|e.keys[2];return Re(a.imul(t,1^t)>>>8)}function Re(e){return 255&e}function Se(e){return 4294967295&e}class Te extends x{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const De="Invalid signature",Ee="deflate-raw",Ae="undefined",Fe=typeof z==Ae,Ce=typeof R==Ae;let We=!0,Ie=!0;class Ue extends x{constructor(e,t,{chunkSize:n},...r){super({},...r);const{compressed:s,encrypted:a,useCompressionStream:i,password:o,passwordVerification:l,encryptionStrength:c,zipCrypto:d,signed:u,level:h}=t,p=this;let w,g,_=Le(super.readable);if(a&&!d||!u||([_,w]=_.tee(),w=w.pipeThrough(new U)),s)if(void 0!==i&&!i||Fe&&!Ie)_=He(e,_,{chunkSize:n,level:h});else try{_=_.pipeThrough(new z(Ee))}catch(t){Ie=!1,_=He(e,_,{chunkSize:n,level:h})}a&&(d?_=_.pipeThrough(new ye(o,l)):(g=new ue(o,c),_=_.pipeThrough(g))),qe(p,_,(async()=>{let e;a&&!d&&(e=g.signature),a&&!d||!u||(e=await w.getReader().read(),e=new f(e.value.buffer).getUint32(0)),p.signature=e}))}}class Me extends x{constructor(e,t,{chunkSize:n},...r){super({},...r);const{zipCrypto:s,encrypted:a,password:i,passwordVerification:o,signed:l,encryptionStrength:d,compressed:u,useCompressionStream:h}=t;let p,w,g=Le(super.readable);if(a&&(s?g=g.pipeThrough(new me(i,o)):(w=new de(i,l,d),g=g.pipeThrough(w))),u)if(void 0!==h&&!h||Ce&&!We)g=He(e,g,{chunkSize:n});else try{g=g.pipeThrough(new R(Ee))}catch(t){We=!1,g=He(e,g,{chunkSize:n})}a&&!s||!l||([g,p]=g.tee(),p=p.pipeThrough(new U)),qe(this,g,(async()=>{if(a&&!s&&!w.valid)throw new c(De);if((!a||s)&&l){const e=await p.getReader().read(),n=new f(e.value.buffer);if(t.signature!=n.getUint32(0,!1))throw new c(De)}}))}}function He(e,t,n){return t.pipeThrough(new Te(e,n))}function Le(e){return e.pipeThrough(new x({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function qe(e,t,r){t=t.pipeThrough(new x({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}const Be="deflate",Ne="data";class Ve{constructor(e,t,n,r,s){const{codecType:a}=r;async function i(a){const i=new a(e,r,s);await t.pipeThrough(i).pipeThrough(new x({transform(e,t){e&&e.length&&(n.size+=e.length,t.enqueue(e))}})).pipeTo(n,{preventClose:!0,preventAbort:!0});const{size:o,signature:l}=i;return{size:o,signature:l}}a.startsWith(Be)?this.run=()=>i(Ue):a.startsWith("inflate")&&(this.run=()=>i(Me))}}let Pe,Oe=!0;class Ke{constructor(e,t,r,s){const{readable:a,writable:i}=t,{options:o,config:u,streamOptions:h,webWorker:f,scripts:p,codecConstructor:g}=r;n.assign(e,{busy:!0,codecConstructor:g,readable:a,writable:i,options:n.assign({},o),scripts:p,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,s(e)}});const{signal:_,onstart:m,onprogress:y,size:b,onend:k}=h;let v=0;const z={};return m&&(z.start=()=>Ze(m,b())),z.transform=async(e,t)=>{v+=e.length,y&&await Ze(y,v,b()),t.enqueue(e)},z.flush=()=>{a.size=()=>v,k&&Ze(k,v)},e.readable=a.pipeThrough(new x(z,{highWaterMark:1,size:()=>u.chunkSize}),{signal:_}),void 0===Pe&&(Pe="undefined"!=typeof Worker),f&&Pe?((e,{baseURL:t,chunkSize:r})=>{const s={type:"module"},{readable:a,writable:i}=e;if(n.assign(e,{reader:a.getReader(),writer:i.getWriter(),result:new w(((t,n)=>{e.resolveResult=t,e.rejectResult=n}))}),!e.interface){if(Oe)try{e.worker=o({})}catch(t){Oe=!1,e.worker=o(s)}else e.worker=o(s);e.worker.addEventListener("message",(async t=>{const n=t.data,{reader:r,writer:s,resolveResult:a,rejectResult:i,onTaskFinished:o}=e,{type:l,data:h,messageId:f,result:p}=n,w=n.error;try{if(w){const{message:e,stack:t}=w,n=new c(e);n.stack=t,g(n)}else{if("pull"==l){const{value:e,done:t}=await r.read();u({type:Ne,data:e,done:t,messageId:f})}l==Ne&&(await s.ready,e.writable.size+=h.byteLength,await s.write(new d(h)),u({type:"ack",messageId:f})),"close"==l&&g(null,p)}}catch(e){g(e)}function g(e,t){e?i(e):a(t),s.releaseLock(),o()}}),!1),e.interface={run(){const{options:t}=e;return u({type:"start",scripts:e.scripts.slice(1),options:t,config:{chunkSize:r}}),e.result}}}return e.interface;function o(n){let r,s;r=e.scripts[0],"function"==typeof r&&(r=r());try{s=new l(r,t)}catch(e){s=r}return new Worker(s,n)}function u(t){const{worker:n,writer:r,onTaskFinished:s}=e;try{let{data:e}=t;if(e)try{const{buffer:r,length:s}=e;s!=r.byteLength&&(e=new d(e)),t.data=e.buffer,n.postMessage(t,[t.data])}catch(e){n.postMessage(t)}else n.postMessage(t)}catch(e){throw r.releaseLock(),s(),e}}})(e,u):((e,t)=>{const n=new Ve(e.codecConstructor,e.readable,e.writable,e.options,t),{onTaskFinished:r}=e;return{async run(){try{return await n.run()}finally{r()}}}})(e,u)}}async function Ze(e,...t){try{await e(...t)}catch(e){}}let Xe=[];const Ye=[];let je=0;function Ge(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Je="HTTP error ",Qe="HTTP Range not supported",$e="text/plain",et="GET",tt=65536;class nt{constructor(){this.size=0}init(){this.initialized=!0}}class rt extends nt{get readable(){const e=this,{chunkSize:t=tt}=e,n=new k({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:i}=n,{chunkOffset:o}=this;r.enqueue(await e.readUint8Array(s+o,a.min(t,i()-o))),o+t>i()?r.close():this.chunkOffset+=t}});return n}}class st extends nt{constructor(){super();const e=this,t=new v({write:t=>e.writeUint8Array(t)});n.defineProperty(e,"writable",{get:()=>t})}writeUint8Array(){}}class at extends rt{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){return new d(await this.blob.slice(e,e+t).arrayBuffer())}}class it extends nt{constructor(e){super();const t=this;t.contentType=e,t.transformStream=new x,n.defineProperty(t,"writable",{get:()=>t.transformStream.writable})}init(){super.init();const{transformStream:e,contentType:t}=this,n=[];t&&n.push(["content-type",t]),this.blob=new Response(e.readable,{headers:n}).blob()}getData(){return this.blob}}class ot extends rt{constructor(e,t){super();const r=this;r.url=e,r.preventHeadRequest=t.preventHeadRequest,r.useRangeHeader=t.useRangeHeader,r.forceRangeRequests=t.forceRangeRequests,r.options=t=n.assign({},t),delete t.preventHeadRequest,delete t.useRangeHeader,delete t.forceRangeRequests,delete t.useXHR}async init(){super.init(),await ct(this,_t,ft)}readUint8Array(e,t){return dt(this,e,t,_t,ft)}}class lt extends rt{constructor(e,t){super();const n=this;n.url=e,n.preventHeadRequest=t.preventHeadRequest,n.useRangeHeader=t.useRangeHeader,n.forceRangeRequests=t.forceRangeRequests,n.options=t}async init(){super.init(),await ct(this,mt,pt)}readUint8Array(e,t){return dt(this,e,t,mt,pt)}}async function ct(e,t,n){if((e=>{const{baseURL:t}=F(),{protocol:n}=new l(e,t);return"http:"==n||"https:"==n})(e.url)&&(e.useRangeHeader||e.forceRangeRequests)){const r=await t(et,e,ut(e));if(!e.forceRangeRequests&&"bytes"!=r.headers.get("Accept-Ranges"))throw new c(Qe);{let s;const a=r.headers.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(s=Number(t))}}void 0===s?await gt(e,t,n):e.size=s}}else await gt(e,t,n)}async function dt(e,t,n,r,s){if(e.useRangeHeader||e.forceRangeRequests){const s=await r(et,e,ut(e,t,n));if(206!=s.status)throw new c(Qe);return new d(await s.arrayBuffer())}return e.data||await s(e,e.options),new d(e.data.subarray(t,t+n))}function ut(e,t=0,r=1){return n.assign({},ht(e),{Range:"bytes="+t+"-"+(t+r-1)})}function ht(e){const t=e.options.headers;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function ft(e){await wt(e,_t)}async function pt(e){await wt(e,mt)}async function wt(e,t){const n=await t(et,e,ht(e));e.data=new d(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function gt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,ht(e))).headers.get("Content-Length");r?e.size=Number(r):await n(e,e.options)}}async function _t(e,{options:t,url:r},s){const a=await fetch(r,n.assign({},t,{method:e,headers:s}));if(400>a.status)return a;throw 416==a.status?new c(Qe):new c(Je+(a.statusText||a.status))}function mt(e,{url:t},r){return new w(((s,a)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",(()=>{if(400>i.status){const e=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),s({status:i.status,arrayBuffer:()=>i.response,headers:new o(e)})}else a(416==i.status?new c(Qe):new c(Je+(i.statusText||i.status)))}),!1),i.addEventListener("error",(e=>a(e.detail.error)),!1),i.open(e,t),r)for(const e of n.entries(r))i.setRequestHeader(e[0],e[1]);i.responseType="arraybuffer",i.send()}))}class yt extends rt{constructor(e,t={}){super(),this.url=e,this.reader=t.useXHR?new lt(e,t):new ot(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}async function bt(e,t){e.init&&!e.initialized&&await e.init(t)}const xt=4294967295,kt=65535,vt=new i(2107,11,31),zt=new i(1980,0,1),Rt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class St{constructor(e){Rt.forEach((t=>this[t]=e[t]))}}const Tt="File already exists",Dt="Zip file comment exceeds 64KB",Et="File entry comment exceeds 64KB",At="File entry name exceeds 64KB",Ft="Version exceeds 65535",Ct="The strength must equal 1, 2, or 3",Wt="Extra field type exceeds 65535",It="Extra field data exceeds 64KB",Ut="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Mt=new d([7,0,2,0,65,69,3,0,0]);let Ht=0;const Lt=[];async function qt(e,t){const n=e.getWriter();await n.ready,e.size+=t.length,await n.write(t),n.releaseLock()}function Bt(e){if(e)return(s(e.getTime())+s(116444736e5))*s(1e4)}function Nt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function Vt(e,t,n){e.setUint8(t,n)}function Pt(e,t,n){e.setUint16(t,n,!0)}function Ot(e,t,n){e.setUint32(t,n,!0)}function Kt(e,t,n){e.setBigUint64(t,n,!0)}function Zt(e,t,n){e.set(t,n)}function Xt(e){return new f(e.buffer)}C({Deflate:T}),e.BlobReader=at,e.BlobWriter=it,e.Data64URIReader=class extends rt{constructor(e){super();const t=this;t.dataURI=e;let n=e.length;for(;"="==e.charAt(n-1);)n--;t.dataStart=e.indexOf(",")+1,t.size=a.floor(.75*(n-t.dataStart))}readUint8Array(e,t){const n=new d(t),r=4*a.floor(e/3),s=this.dataStart,i=atob(this.dataURI.substring(r+s,4*a.ceil((e+t)/3)+s)),o=e-3*a.floor(r/4);for(let e=o;o+t>e;e++)n[e-o]=i.charCodeAt(e);return n}},e.Data64URIWriter=class extends st{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}writeUint8Array(e){const t=this;let n=0,s=t.pending;const i=t.pending.length;for(t.pending="",n=0;n<3*a.floor((i+e.length)/3)-i;n++)s+=r.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=r.fromCharCode(e[n]);s.length>2?t.data+=b(s):t.pending=s}getData(){return this.data+b(this.pending)}},e.ERR_DUPLICATED_NAME=Tt,e.ERR_HTTP_RANGE=Qe,e.ERR_INVALID_COMMENT=Dt,e.ERR_INVALID_ENCRYPTION_STRENGTH=Ct,e.ERR_INVALID_ENTRY_COMMENT=Et,e.ERR_INVALID_ENTRY_NAME=At,e.ERR_INVALID_EXTRAFIELD_DATA=It,e.ERR_INVALID_EXTRAFIELD_TYPE=Wt,e.ERR_INVALID_VERSION=Ft,e.ERR_UNSUPPORTED_FORMAT=Ut,e.HttpRangeReader=class extends yt{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=yt,e.Reader=rt,e.TextReader=class extends rt{constructor(e){super(),this.blobReader=new at(new p([e],{type:$e}))}init(){const e=this;super.init(),e.blobReader.init(),e.size=e.blobReader.size}readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends st{constructor(e){super(),this.encoding=e,this.blob=new p([],{type:$e})}writeUint8Array(e){this.blob=new p([this.blob,e.buffer],{type:$e})}getData(){const e=this;if(e.blob.text&&(void 0===e.encoding||e.encoding&&"utf-8"==e.encoding.toLowerCase()))return e.blob.text();{const t=new FileReader;return new w(((n,r)=>{t.onload=e=>n(e.target.result),t.onerror=()=>r(t.error),t.readAsText(e.blob,e.encoding)}))}}},e.Uint8ArrayReader=class extends rt{constructor(e){super(),this.array=e,this.size=e.length}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends st{init(e=0){super.init(),this.offset=0,this.array=new d(e)}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new d(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=st,e.ZipWriter=class{constructor(e,t={}){null==e.writable.size&&(e.writable.size=0),n.assign(this,{writer:e,options:t,config:F(),files:new o,filenames:new Set,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new Set})}async add(e="",r,o={}){const l=this,{pendingAddFileCalls:p,config:g}=l;let _;Ht<g.maxWorkers?Ht++:await new w((e=>Lt.push(e)));try{if(e=e.trim(),l.filenames.has(e))throw new c(Tt);return l.filenames.add(e),_=(async(e,r,o,l)=>{r=r.trim(),l.directory&&!r.endsWith("/")?r+="/":l.directory=r.endsWith("/");const p=M(r);if(p.length>kt)throw new c(At);const g=l.comment||"",_=M(g);if(_.length>kt)throw new c(Et);const m=e.options.version||l.version||0;if(m>kt)throw new c(Ft);const y=e.options.versionMadeBy||l.versionMadeBy||20;if(y>kt)throw new c(Ft);const b=Nt(e,l,"lastModDate")||new i,x=Nt(e,l,"lastAccessDate"),k=Nt(e,l,"creationDate"),v=Nt(e,l,"password"),z=Nt(e,l,"encryptionStrength")||3,R=Nt(e,l,"zipCrypto");if(void 0!==v&&void 0!==z&&(1>z||z>3))throw new c(Ct);let S=new d;const{extraField:T}=l;if(T){let e=0,t=0;T.forEach((t=>e+=4+t.length)),S=new d(e),T.forEach(((e,n)=>{if(n>kt)throw new c(Wt);if(e.length>kt)throw new c(It);Zt(S,new u([n]),t),Zt(S,new u([e.length]),t+2),Zt(S,e,t+4),t+=4+e.length}))}let D=Nt(e,l,"extendedTimestamp");void 0===D&&(D=!0);let E=0,A=0,F=Nt(e,l,"keepOrder");void 0===F&&(F=!0);let C=0,W=Nt(e,l,"msDosCompatible");void 0===W&&(W=!0);const I=Nt(e,l,"internalFileAttribute")||0,U=Nt(e,l,"externalFileAttribute")||0;o&&(await bt(o),void 0===o.size?l.dataDescriptor=!0:C=o.size,E=(e=>e+5*(a.floor(e/16383)+1))(C));let H=l.zip64||e.options.zip64||!1;if(e.offset+e.pendingEntriesSize>=xt||C>=xt||E>=xt){if(!1===l.zip64||!1===e.options.zip64||!F)throw new c(Ut);H=!0}const L=Nt(e,l,"level"),q=Nt(e,l,"useWebWorkers"),B=Nt(e,l,"bufferedWrite");let N=Nt(e,l,"dataDescriptor"),V=Nt(e,l,"dataDescriptorSignature");const P=Nt(e,l,"signal"),O=Nt(e,l,"useCompressionStream");void 0===N&&(N=!0),N&&void 0===V&&(V=!1);const K=(e=>{const{rawFilename:t,lastAccessDate:n,creationDate:r,password:s,level:i,zip64:o,zipCrypto:l,dataDescriptor:c,directory:u,rawExtraField:f,encryptionStrength:p,extendedTimestamp:w}=e;let g=e.version||20;const _=0!==i&&!u,m=!(!s||!s.length);let y,b,x;if(m&&!l){y=new d(Mt.length+2);const e=Xt(y);Pt(e,0,39169),Zt(y,Mt,2),Vt(e,8,p)}else y=new d;if(w){x=new d(9+(n?4:0)+(r?4:0));const t=Xt(x);Pt(t,0,21589),Pt(t,2,x.length-4),Vt(t,4,1+(n?2:0)+(r?4:0)),Ot(t,5,a.floor(e.lastModDate.getTime()/1e3)),n&&Ot(t,9,a.floor(n.getTime()/1e3)),r&&Ot(t,13,a.floor(r.getTime()/1e3));try{b=new d(36);const t=Xt(b),s=Bt(e.lastModDate);Pt(t,0,10),Pt(t,2,32),Pt(t,8,1),Pt(t,10,24),Kt(t,12,s),Kt(t,20,Bt(n)||s),Kt(t,28,Bt(r)||s)}catch(e){b=new d}}else b=x=new d;let k=2048;c&&(k|=8);let v=0;_&&(v=8),o&&(g=g>45?g:45),m&&(k|=1,l||(g=g>51?g:51,v=99,_&&(y[9]=8)));const z=new d(26),R=Xt(z);Pt(R,0,g),Pt(R,2,k),Pt(R,4,v);const S=new h(1),T=Xt(S);let D;D=e.lastModDate<zt?zt:e.lastModDate>vt?vt:e.lastModDate,Pt(T,0,(D.getHours()<<6|D.getMinutes())<<5|D.getSeconds()/2),Pt(T,2,(D.getFullYear()-1980<<4|D.getMonth()+1)<<5|D.getDate());const E=S[0];Ot(R,6,E),Pt(R,22,t.length);const A=y.length+x.length+b.length+f.length;Pt(R,24,A);const F=new d(30+t.length+A);return Ot(Xt(F),0,67324752),Zt(F,z,4),Zt(F,t,30),Zt(F,y,30+t.length),Zt(F,x,30+t.length+y.length),Zt(F,b,30+t.length+y.length+x.length),Zt(F,f,30+t.length+y.length+x.length+b.length),{localHeaderArray:F,headerArray:z,headerView:R,lastModDate:D,rawLastModDate:E,encrypted:m,compressed:_,version:g,compressionMethod:v,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:b,rawExtraFieldAES:y}})(l=n.assign({},l,{rawFilename:p,rawComment:_,version:m,versionMadeBy:y,lastModDate:b,lastAccessDate:x,creationDate:k,rawExtraField:S,zip64:H,password:v,level:L,useWebWorkers:q,encryptionStrength:z,extendedTimestamp:D,zipCrypto:R,bufferedWrite:B,keepOrder:F,dataDescriptor:N,dataDescriptorSignature:V,signal:P,msDosCompatible:W,internalFileAttribute:I,externalFileAttribute:U,useCompressionStream:O})),Z=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let s,a=new d,i=0;return n&&(a=new d(t?r?24:20:r?16:12),s=Xt(a),r&&(i=4,Ot(s,0,134695760))),{dataDescriptorArray:a,dataDescriptorView:s,dataDescriptorOffset:i}})(l);A=K.localHeaderArray.length+E+Z.dataDescriptorArray.length,e.pendingEntriesSize+=A;const X=await(async(e,r,i,o,l)=>{const{files:u,writer:h}=e,{keepOrder:p,dataDescriptor:g,zipCrypto:_,signal:m}=l,y=t.from(u.values()).pop();let b,x,k,v,z,R={};u.set(r,R);try{let t;if(p&&(t=y&&y.lock,R.lock=new w((e=>k=e))),l.bufferedWrite||e.lockWriter||!g?(z=new it,z.writable.size=0,b=!0,await bt(h)):(z=h,e.lockWriter=w.resolve(),x=()=>delete e.lockWriter),await bt(z),b||await t,R.writingData=!0,R=await(async(e,t,r,i,o,l)=>{const{headerInfo:c,dataDescriptorInfo:u}=i,{localHeaderArray:h,headerArray:f,lastModDate:p,rawLastModDate:g,encrypted:_,compressed:m,version:y,compressionMethod:b,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:k,rawExtraFieldAES:v}=c,{dataDescriptorArray:z}=u,{rawFilename:R,lastAccessDate:S,creationDate:T,password:D,level:E,zip64:A,zipCrypto:F,dataDescriptor:C,directory:W,versionMadeBy:I,rawComment:U,rawExtraField:M,useWebWorkers:H,onstart:L,onprogress:q,onend:B,signal:N,encryptionStrength:V,extendedTimestamp:P,msDosCompatible:O,internalFileAttribute:K,externalFileAttribute:Z,useCompressionStream:X}=l,Y={lock:r.lock,versionMadeBy:I,zip64:A,directory:!!W,filenameUTF8:!0,rawFilename:R,commentUTF8:!0,rawComment:U,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:k,rawExtraFieldAES:v,rawExtraField:M,extendedTimestamp:P,msDosCompatible:O,internalFileAttribute:K,externalFileAttribute:Z};let j,G=0,J=0;const{writable:Q}=t;if(e){e.chunkSize=(e=>a.max(e.chunkSize,64))(o),await qt(Q,h);const t=()=>e.size,n=e.readable;n.size=t;const r={options:{codecType:Be,level:E,password:D,encryptionStrength:V,zipCrypto:_&&F,passwordVerification:_&&F&&g>>8&255,signed:!0,compressed:m,encrypted:_,useWebWorkers:H,useCompressionStream:X},config:o,streamOptions:{signal:N,size:t,onstart:L,onprogress:q,onend:B},codecConstructor:o.Deflate},s=Q.size;j=(await(async(e,t)=>{const{options:n,config:r}=t,s=!n.compressed&&!n.signed&&!n.encrypted,{useWebWorkers:a,useCompressionStream:i,codecType:o}=n,{workerScripts:l}=r;let c;if(t.webWorker=!s&&(a||void 0===a&&r.useWebWorkers),t.scripts=t.webWorker&&l?l[o]:[],n.useCompressionStream=void 0===i?r.useCompressionStream:i,Xe.length<r.maxWorkers){const n={indexWorker:je};je++,Xe.push(n),c=new Ke(n,e,t,d)}else{const n=Xe.find((e=>!e.busy));n?(Ge(n),c=new Ke(n,e,t,d)):c=await new w((n=>Ye.push({resolve:n,stream:e,workerOptions:t})))}return c.run();function d(e){if(Ye.length){const[{resolve:t,stream:n,workerOptions:r}]=Ye.splice(0,1);t(new Ke(e,n,r,d))}else if(e.worker){const{terminateWorkerTimeout:t}=r;Ge(e),Number.isFinite(t)&&t>=0&&(e.terminateTimeout=setTimeout((()=>{Xe=Xe.filter((t=>t!=e)),e.terminate()}),t))}else Xe=Xe.filter((t=>t!=e))}})({readable:n,writable:Q},r)).signature,G=e.size=n.size(),J=Q.size-s}else await qt(Q,h);const $=A?new d(28):new d;return e&&((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:a,uncompressedSize:i,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:u,dataDescriptorOffset:h}=l,{zip64:f,zipCrypto:p,dataDescriptor:w}=t;if(d&&!p||void 0===n||(Ot(c,10,n),w&&Ot(u,h,n)),f){const e=Xt(r);Pt(e,0,1),Pt(e,2,24),Ot(c,14,xt),Kt(e,12,s(a)),Ot(c,18,xt),Kt(e,4,s(i)),w&&(Kt(u,h+4,s(a)),Kt(u,h+12,s(i)))}else Ot(c,14,a),Ot(c,18,i),w&&(Ot(u,h+4,a),Ot(u,h+8,i))})({signature:j,rawExtraFieldZip64:$,compressedSize:J,uncompressedSize:G,headerInfo:c,dataDescriptorInfo:u},l),C&&await qt(Q,z),n.assign(Y,{compressedSize:J,lastModDate:p,rawLastModDate:g,creationDate:T,lastAccessDate:S,encrypted:_,length:h.length+J+z.length,compressionMethod:b,version:y,headerArray:f,signature:j,rawExtraFieldZip64:$}),Y})(i,z,R,o,e.config,l),u.set(r,R),R.filename=r,b){await z.writable.getWriter().close();let n=await z.getData();await t,await async function t(){const{lockWriter:n}=e;if(n)return await n.then((()=>delete e.lockWriter)),t();e.lockWriter=new w((e=>x=e))}(),v=!0;const{writable:r}=h;if(!g){const e=await(e=>e.slice(0,26).arrayBuffer())(n),t=new f(e);R.encrypted&&!_||Ot(t,14,R.signature),R.zip64?(Ot(t,18,xt),Ot(t,22,xt)):(Ot(t,18,R.compressedSize),Ot(t,22,R.uncompressedSize)),await qt(r,new d(e)),n=n.slice(e.byteLength)}await n.stream().pipeTo(r,{preventClose:!0,signal:m}),v=!1}if(R.offset=e.offset,R.zip64)Kt(Xt(R.rawExtraFieldZip64),20,s(R.offset));else if(R.offset>=xt)throw new c(Ut);return e.offset+=R.length,R}catch(t){throw(b&&v||!b&&R.writingData)&&(e.hasCorruptedEntries=!0,t&&(t.corruptedEntry=!0),b?e.offset+=z.writable.size:e.offset=z.writable.size),u.delete(r),t}finally{k&&k(),x&&x()}})(e,r,o,{headerInfo:K,dataDescriptorInfo:Z},l);return A&&(e.pendingEntriesSize-=A),n.assign(X,{name:r,comment:g,extraField:T}),new St(X)})(l,e,r,o),p.add(_),await _}catch(t){throw l.filenames.delete(e),t}finally{p.delete(_);const e=Lt.shift();e?e():Ht--}}async close(e=new d,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:o}=i;for(;r.size;)await w.all(t.from(r));return await(async(e,n,r)=>{const{files:i}=e;let o=0,l=0,u=e.offset,h=i.size;for(const[,e]of i)l+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraFieldExtendedTimestamp.length+e.rawExtraFieldNTFS.length+e.rawExtraField.length;let f=r.zip64||e.options.zip64||!1;if(u>=xt||l>=xt||h>=kt){if(!1===r.zip64||!1===e.options.zip64)throw new c(Ut);f=!0}const p=new d(l+(f?98:22)),w=Xt(p);for(const[e,n]of t.from(i.values()).entries()){const{rawFilename:t,rawExtraFieldZip64:s,rawExtraFieldAES:l,rawExtraField:c,rawComment:u,versionMadeBy:h,headerArray:f,directory:g,zip64:_,msDosCompatible:m,internalFileAttribute:y,externalFileAttribute:b}=n;let x,k;if(n.extendedTimestamp){k=n.rawExtraFieldNTFS,x=new d(9);const e=Xt(x);Pt(e,0,21589),Pt(e,2,x.length-4),Vt(e,4,1),Ot(e,5,a.floor(n.lastModDate.getTime()/1e3))}else k=x=new d;const v=s.length+l.length+x.length+k.length+c.length;if(Ot(w,o,33639248),Pt(w,o+4,h),Zt(p,f,o+6),Pt(w,o+30,v),Pt(w,o+32,u.length),Pt(w,o+36,y),b?Ot(w,o+38,b):g&&m&&Vt(w,o+38,16),Ot(w,o+42,_?xt:n.offset),Zt(p,t,o+46),Zt(p,s,o+46+t.length),Zt(p,l,o+46+t.length+s.length),Zt(p,x,o+46+t.length+s.length+l.length),Zt(p,k,o+46+t.length+s.length+l.length+x.length),Zt(p,c,o+46+t.length+s.length+l.length+x.length+k.length),Zt(p,u,o+46+t.length+v),o+=46+t.length+v+u.length,r.onprogress)try{await r.onprogress(e+1,i.size,new St(n))}catch(e){}}if(f&&(Ot(w,o,101075792),Kt(w,o+4,s(44)),Pt(w,o+12,45),Pt(w,o+14,45),Kt(w,o+24,s(h)),Kt(w,o+32,s(h)),Kt(w,o+40,s(l)),Kt(w,o+48,s(u)),Ot(w,o+56,117853008),Kt(w,o+64,s(u)+s(l)),Ot(w,o+72,1),h=kt,u=xt,l=xt,o+=76),Ot(w,o,101010256),Pt(w,o+8,h),Pt(w,o+10,h),Ot(w,o+12,l),Ot(w,o+16,u),n&&n.length){if(n.length>kt)throw new c(Dt);Pt(w,o+20,n.length)}const{writable:g}=e.writer;await bt(e.writer),await qt(g,p),n&&n.length&&await qt(g,n)})(this,e,n),i.preventClose||n.preventClose||await o.getWriter().close(),i.getData?i.getData():o}},e.configure=C,e.getMimeType=()=>"application/octet-stream",e.initStream=bt,e.terminateWorkers=()=>{Xe.forEach((e=>{Ge(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
((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{Array:t,Object:n,String:i,BigInt:r,Math:a,Date:s,Map:o,URL:l,Error:c,Uint8Array:d,Uint16Array:u,Uint32Array:f,DataView:h,Blob:_,Promise:w,TextEncoder:p,TextDecoder:b,document:g,crypto:y,btoa:m,TransformStream:x,ReadableStream:k,WritableStream:v,CompressionStream:R,DecompressionStream:S,navigator:z}=globalThis,T=(()=>{const e=-2,t=-3,n=-5,i=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],r=[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],l=[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],u=[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];function h(){let e,i,r,a,s,c;function d(e,i,o,l,d,u,f,h,_,w,p){let b,g,y,m,x,k,v,R,S,z,T,D,E,A,F;z=0,x=o;do{r[e[i+z]]++,z++,x--}while(0!==x);if(r[0]==o)return f[0]=-1,h[0]=0,0;for(R=h[0],k=1;15>=k&&0===r[k];k++);for(v=k,k>R&&(R=k),x=15;0!==x&&0===r[x];x--);for(y=x,R>x&&(R=x),h[0]=R,A=1<<k;x>k;k++,A<<=1)if(0>(A-=r[k]))return t;if(0>(A-=r[x]))return t;for(r[x]+=A,c[1]=k=0,z=1,E=2;0!=--x;)c[E]=k+=r[z],E++,z++;x=0,z=0;do{0!==(k=e[i+z])&&(p[c[k]++]=x),z++}while(++x<o);for(o=c[y],c[0]=x=0,z=0,m=-1,D=-R,s[0]=0,T=0,F=0;y>=v;v++)for(b=r[v];0!=b--;){for(;v>D+R;){if(m++,D+=R,F=y-D,F=F>R?R:F,(g=1<<(k=v-D))>b+1&&(g-=b+1,E=v,F>k))for(;++k<F&&(g<<=1)>r[++E];)g-=r[E];if(F=1<<k,w[0]+F>1440)return t;s[m]=T=w[0],w[0]+=F,0!==m?(c[m]=x,a[0]=k,a[1]=R,k=x>>>D-R,a[2]=T-s[m-1]-k,_.set(a,3*(s[m-1]+k))):f[0]=T}for(a[1]=v-D,o>z?p[z]<l?(a[0]=256>p[z]?0:96,a[2]=p[z++]):(a[0]=u[p[z]-l]+16+64,a[2]=d[p[z++]-l]):a[0]=192,g=1<<v-D,k=x>>>D;F>k;k+=g)_.set(a,3*(T+k));for(k=1<<v-1;0!=(x&k);k>>>=1)x^=k;for(x^=k,S=(1<<D)-1;(x&S)!=c[m];)m--,D-=R,S=(1<<D)-1}return 0!==A&&1!=y?n:0}function h(t){let n;for(e||(e=[],i=[],r=new Int32Array(16),a=[],s=new Int32Array(15),c=new Int32Array(16)),i.length<t&&(i=[]),n=0;t>n;n++)i[n]=0;for(n=0;16>n;n++)r[n]=0;for(n=0;3>n;n++)a[n]=0;s.set(r.subarray(0,15),0),c.set(r.subarray(0,16),0)}this.inflate_trees_bits=(r,a,s,o,l)=>{let c;return h(19),e[0]=0,c=d(r,0,19,19,null,null,s,a,o,e,i),c==t?l.msg="oversubscribed dynamic bit lengths tree":c!=n&&0!==a[0]||(l.msg="incomplete dynamic bit lengths tree",c=t),c},this.inflate_trees_dynamic=(r,a,s,c,_,w,p,b,g)=>{let y;return h(288),e[0]=0,y=d(s,0,r,257,o,l,w,c,b,e,i),0!=y||0===c[0]?(y==t?g.msg="oversubscribed literal/length tree":-4!=y&&(g.msg="incomplete literal/length tree",y=t),y):(h(288),y=d(s,r,a,0,u,f,p,_,b,e,i),0!=y||0===_[0]&&r>257?(y==t?g.msg="oversubscribed distance tree":y==n?(g.msg="incomplete distance tree",y=t):-4!=y&&(g.msg="empty distance tree with lengths",y=t),y):0)}}function _(){const n=this;let r,a,s,o,l=0,c=0,d=0,u=0,f=0,h=0,_=0,w=0,p=0,b=0;function g(e,n,r,a,s,o,l,c){let d,u,f,h,_,w,p,b,g,y,m,x,k,v,R,S;p=c.next_in_index,b=c.avail_in,_=l.bitb,w=l.bitk,g=l.write,y=g<l.read?l.read-g-1:l.end-g,m=i[e],x=i[n];do{for(;20>w;)b--,_|=(255&c.read_byte(p++))<<w,w+=8;if(d=_&m,u=r,f=a,S=3*(f+d),0!==(h=u[S]))for(;;){if(_>>=u[S+1],w-=u[S+1],0!=(16&h)){for(h&=15,k=u[S+2]+(_&i[h]),_>>=h,w-=h;15>w;)b--,_|=(255&c.read_byte(p++))<<w,w+=8;for(d=_&x,u=s,f=o,S=3*(f+d),h=u[S];;){if(_>>=u[S+1],w-=u[S+1],0!=(16&h)){for(h&=15;h>w;)b--,_|=(255&c.read_byte(p++))<<w,w+=8;if(v=u[S+2]+(_&i[h]),_>>=h,w-=h,y-=k,v>g){R=g-v;do{R+=l.end}while(0>R);if(h=l.end-R,k>h){if(k-=h,g-R>0&&h>g-R)do{l.win[g++]=l.win[R++]}while(0!=--h);else l.win.set(l.win.subarray(R,R+h),g),g+=h,R+=h,h=0;R=0}}else R=g-v,g-R>0&&2>g-R?(l.win[g++]=l.win[R++],l.win[g++]=l.win[R++],k-=2):(l.win.set(l.win.subarray(R,R+2),g),g+=2,R+=2,k-=2);if(g-R>0&&k>g-R)do{l.win[g++]=l.win[R++]}while(0!=--k);else l.win.set(l.win.subarray(R,R+k),g),g+=k,R+=k,k=0;break}if(0!=(64&h))return c.msg="invalid distance code",k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,t;d+=u[S+2],d+=_&i[h],S=3*(f+d),h=u[S]}break}if(0!=(64&h))return 0!=(32&h)?(k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,1):(c.msg="invalid literal/length code",k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,t);if(d+=u[S+2],d+=_&i[h],S=3*(f+d),0===(h=u[S])){_>>=u[S+1],w-=u[S+1],l.win[g++]=u[S+2],y--;break}}else _>>=u[S+1],w-=u[S+1],l.win[g++]=u[S+2],y--}while(y>=258&&b>=10);return k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,0}n.init=(e,t,n,i,l,c)=>{r=0,_=e,w=t,s=n,p=i,o=l,b=c,a=null},n.proc=(n,y,m)=>{let x,k,v,R,S,z,T,D=0,E=0,A=0;for(A=y.next_in_index,R=y.avail_in,D=n.bitb,E=n.bitk,S=n.write,z=S<n.read?n.read-S-1:n.end-S;;)switch(r){case 0:if(z>=258&&R>=10&&(n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,m=g(_,w,s,p,o,b,n,y),A=y.next_in_index,R=y.avail_in,D=n.bitb,E=n.bitk,S=n.write,z=S<n.read?n.read-S-1:n.end-S,0!=m)){r=1==m?7:9;break}d=_,a=s,c=p,r=1;case 1:for(x=d;x>E;){if(0===R)return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(A++))<<E,E+=8}if(k=3*(c+(D&i[x])),D>>>=a[k+1],E-=a[k+1],v=a[k],0===v){u=a[k+2],r=6;break}if(0!=(16&v)){f=15&v,l=a[k+2],r=2;break}if(0==(64&v)){d=v,c=k/3+a[k+2];break}if(0!=(32&v)){r=7;break}return r=9,y.msg="invalid literal/length code",m=t,n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);case 2:for(x=f;x>E;){if(0===R)return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(A++))<<E,E+=8}l+=D&i[x],D>>=x,E-=x,d=w,a=o,c=b,r=3;case 3:for(x=d;x>E;){if(0===R)return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(A++))<<E,E+=8}if(k=3*(c+(D&i[x])),D>>=a[k+1],E-=a[k+1],v=a[k],0!=(16&v)){f=15&v,h=a[k+2],r=4;break}if(0==(64&v)){d=v,c=k/3+a[k+2];break}return r=9,y.msg="invalid distance code",m=t,n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);case 4:for(x=f;x>E;){if(0===R)return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(A++))<<E,E+=8}h+=D&i[x],D>>=x,E-=x,r=5;case 5:for(T=S-h;0>T;)T+=n.end;for(;0!==l;){if(0===z&&(S==n.end&&0!==n.read&&(S=0,z=S<n.read?n.read-S-1:n.end-S),0===z&&(n.write=S,m=n.inflate_flush(y,m),S=n.write,z=S<n.read?n.read-S-1:n.end-S,S==n.end&&0!==n.read&&(S=0,z=S<n.read?n.read-S-1:n.end-S),0===z)))return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);n.win[S++]=n.win[T++],z--,T==n.end&&(T=0),l--}r=0;break;case 6:if(0===z&&(S==n.end&&0!==n.read&&(S=0,z=S<n.read?n.read-S-1:n.end-S),0===z&&(n.write=S,m=n.inflate_flush(y,m),S=n.write,z=S<n.read?n.read-S-1:n.end-S,S==n.end&&0!==n.read&&(S=0,z=S<n.read?n.read-S-1:n.end-S),0===z)))return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);m=0,n.win[S++]=u,z--,r=0;break;case 7:if(E>7&&(E-=8,R++,A--),n.write=S,m=n.inflate_flush(y,m),S=n.write,z=S<n.read?n.read-S-1:n.end-S,n.read!=n.write)return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);r=8;case 8:return m=1,n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);case 9:return m=t,n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);default:return m=e,n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m)}},n.free=()=>{}}h.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=r,i[0]=s,0);const w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function p(r,a){const s=this;let o,l=0,c=0,u=0,f=0;const p=[0],b=[0],g=new _;let y=0,m=new Int32Array(4320);const x=new h;s.bitk=0,s.bitb=0,s.win=new d(a),s.end=a,s.read=0,s.write=0,s.reset=(e,t)=>{t&&(t[0]=0),6==l&&g.free(e),l=0,s.bitk=0,s.bitb=0,s.read=s.write=0},s.reset(r,null),s.inflate_flush=(e,t)=>{let i,r,a;return r=e.next_out_index,a=s.read,i=(a>s.write?s.end:s.write)-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==n&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(s.win.subarray(a,a+i),r),r+=i,a+=i,a==s.end&&(a=0,s.write==s.end&&(s.write=0),i=s.write-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==n&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(s.win.subarray(a,a+i),r),r+=i,a+=i),e.next_out_index=r,s.read=a,t},s.proc=(n,r)=>{let a,d,_,k,v,R,S,z;for(k=n.next_in_index,v=n.avail_in,d=s.bitb,_=s.bitk,R=s.write,S=R<s.read?s.read-R-1:s.end-R;;){let T,D,E,A,F,U,C,L;switch(l){case 0:for(;3>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}switch(a=7&d,y=1&a,a>>>1){case 0:d>>>=3,_-=3,a=7&_,d>>>=a,_-=a,l=1;break;case 1:T=[],D=[],E=[[]],A=[[]],h.inflate_trees_fixed(T,D,E,A),g.init(T[0],D[0],E[0],0,A[0],0),d>>>=3,_-=3,l=6;break;case 2:d>>>=3,_-=3,l=3;break;case 3:return d>>>=3,_-=3,l=9,n.msg="invalid block type",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r)}break;case 1:for(;32>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if((~d>>>16&65535)!=(65535&d))return l=9,n.msg="invalid stored block lengths",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);c=65535&d,d=_=0,l=0!==c?2:0!==y?7:0;break;case 2:if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(0===S&&(R==s.end&&0!==s.read&&(R=0,S=R<s.read?s.read-R-1:s.end-R),0===S&&(s.write=R,r=s.inflate_flush(n,r),R=s.write,S=R<s.read?s.read-R-1:s.end-R,R==s.end&&0!==s.read&&(R=0,S=R<s.read?s.read-R-1:s.end-R),0===S)))return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(r=0,a=c,a>v&&(a=v),a>S&&(a=S),s.win.set(n.read_buf(k,a),R),k+=a,v-=a,R+=a,S-=a,0!=(c-=a))break;l=0!==y?7:0;break;case 3:for(;14>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(u=a=16383&d,(31&a)>29||(a>>5&31)>29)return l=9,n.msg="too many length or distance symbols",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(a=258+(31&a)+(a>>5&31),!o||o.length<a)o=[];else for(z=0;a>z;z++)o[z]=0;d>>>=14,_-=14,f=0,l=4;case 4:for(;4+(u>>>10)>f;){for(;3>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}o[w[f++]]=7&d,d>>>=3,_-=3}for(;19>f;)o[w[f++]]=0;if(p[0]=7,a=x.inflate_trees_bits(o,p,b,m,n),0!=a)return(r=a)==t&&(o=null,l=9),s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);f=0,l=5;case 5:for(;a=u,258+(31&a)+(a>>5&31)>f;){let e,c;for(a=p[0];a>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(a=m[3*(b[0]+(d&i[a]))+1],c=m[3*(b[0]+(d&i[a]))+2],16>c)d>>>=a,_-=a,o[f++]=c;else{for(z=18==c?7:c-14,e=18==c?11:3;a+z>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(d>>>=a,_-=a,e+=d&i[z],d>>>=z,_-=z,z=f,a=u,z+e>258+(31&a)+(a>>5&31)||16==c&&1>z)return o=null,l=9,n.msg="invalid bit length repeat",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);c=16==c?o[z-1]:0;do{o[z++]=c}while(0!=--e);f=z}}if(b[0]=-1,F=[],U=[],C=[],L=[],F[0]=9,U[0]=6,a=u,a=x.inflate_trees_dynamic(257+(31&a),1+(a>>5&31),o,F,U,C,L,m,n),0!=a)return a==t&&(o=null,l=9),r=a,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);g.init(F[0],U[0],m,C[0],m,L[0]),l=6;case 6:if(s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,1!=(r=g.proc(s,n,r)))return s.inflate_flush(n,r);if(r=0,g.free(n),k=n.next_in_index,v=n.avail_in,d=s.bitb,_=s.bitk,R=s.write,S=R<s.read?s.read-R-1:s.end-R,0===y){l=0;break}l=7;case 7:if(s.write=R,r=s.inflate_flush(n,r),R=s.write,S=R<s.read?s.read-R-1:s.end-R,s.read!=s.write)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);l=8;case 8:return r=1,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);case 9:return r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);default:return r=e,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r)}}},s.free=e=>{s.reset(e,null),s.win=null,m=null},s.set_dictionary=(e,t,n)=>{s.win.set(e.subarray(t,t+n),0),s.read=s.write=n},s.sync_point=()=>1==l?1:0}const b=13,g=[0,0,255,255];function y(){const i=this;function r(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):e}i.mode=0,i.method=0,i.was=[0],i.need=0,i.marker=0,i.wbits=0,i.inflateEnd=e=>(i.blocks&&i.blocks.free(e),i.blocks=null,0),i.inflateInit=(t,n)=>(t.msg=null,i.blocks=null,8>n||n>15?(i.inflateEnd(t),e):(i.wbits=n,t.istate.blocks=new p(t,1<<n),r(t),0)),i.inflate=(i,r)=>{let a,s;if(!i||!i.istate||!i.next_in)return e;const o=i.istate;for(r=4==r?n:0,a=n;;)switch(o.mode){case 0:if(0===i.avail_in)return a;if(a=r,i.avail_in--,i.total_in++,8!=(15&(o.method=i.read_byte(i.next_in_index++)))){o.mode=b,i.msg="unknown compression method",o.marker=5;break}if(8+(o.method>>4)>o.wbits){o.mode=b,i.msg="invalid win size",o.marker=5;break}o.mode=1;case 1:if(0===i.avail_in)return a;if(a=r,i.avail_in--,i.total_in++,s=255&i.read_byte(i.next_in_index++),((o.method<<8)+s)%31!=0){o.mode=b,i.msg="incorrect header check",o.marker=5;break}if(0==(32&s)){o.mode=7;break}o.mode=2;case 2:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need=(255&i.read_byte(i.next_in_index++))<<24&4278190080,o.mode=3;case 3:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need+=(255&i.read_byte(i.next_in_index++))<<16&16711680,o.mode=4;case 4:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need+=(255&i.read_byte(i.next_in_index++))<<8&65280,o.mode=5;case 5:return 0===i.avail_in?a:(a=r,i.avail_in--,i.total_in++,o.need+=255&i.read_byte(i.next_in_index++),o.mode=6,2);case 6:return o.mode=b,i.msg="need dictionary",o.marker=0,e;case 7:if(a=o.blocks.proc(i,a),a==t){o.mode=b,o.marker=0;break}if(0==a&&(a=r),1!=a)return a;a=r,o.blocks.reset(i,o.was),o.mode=12;case 12:return i.avail_in=0,1;case b:return t;default:return e}},i.inflateSetDictionary=(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<<s.wbits||(a=(1<<s.wbits)-1,r=i-a),s.blocks.set_dictionary(n,r,a),s.mode=7,0},i.inflateSync=i=>{let a,s,o,l,c;if(!i||!i.istate)return e;const d=i.istate;if(d.mode!=b&&(d.mode=b,d.marker=0),0===(a=i.avail_in))return n;for(s=i.next_in_index,o=d.marker;0!==a&&4>o;)i.read_byte(s)==g[o]?o++:o=0!==i.read_byte(s)?0:4-o,s++,a--;return i.total_in+=s-i.next_in_index,i.next_in_index=s,i.avail_in=a,d.marker=o,4!=o?t:(l=i.total_in,c=i.total_out,r(i),i.total_in=l,i.total_out=c,d.mode=7,0)},i.inflateSyncPoint=t=>t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():e}function m(){}return m.prototype={inflateInit(e){const t=this;return t.istate=new y,e||(e=15),t.istate.inflateInit(t,e)},inflate(t){const n=this;return n.istate?n.istate.inflate(n,t):e},inflateEnd(){const t=this;if(!t.istate)return e;const n=t.istate.inflateEnd(t);return t.istate=null,n},inflateSync(){const t=this;return t.istate?t.istate.inflateSync(t):e},inflateSetDictionary(t,n){const i=this;return i.istate?i.istate.inflateSetDictionary(i,t,n):e},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}},function(e){const t=new m,i=e&&e.chunkSize?a.floor(2*e.chunkSize):131072,r=new d(i);let s=!1;t.inflateInit(),t.next_out=r,this.append=(e,a)=>{const o=[];let l,u,f=0,h=0,_=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=i,0!==t.avail_in||s||(t.next_in_index=0,s=!0),l=t.inflate(0),s&&l===n){if(0!==t.avail_in)throw new c("inflating: bad input")}else if(0!==l&&1!==l)throw new c("inflating: "+t.msg);if((s||1===l)&&t.avail_in===e.length)throw new c("inflating: bad input");t.next_out_index&&(t.next_out_index===i?o.push(new d(r)):o.push(r.slice(0,t.next_out_index))),_+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=f&&(a(t.next_in_index),f=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o.length>1?(u=new d(_),o.forEach((e=>{u.set(e,h),h+=e.length}))):u=o[0]||new d,u}},this.flush=()=>{t.inflateEnd()}}})(),D=void 0,E={chunkSize:524288,maxWorkers:void 0!==z&&z.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},A=n.assign({},E);function F(){return A}function U(e){const{baseURL:n,chunkSize:i,maxWorkers:r,terminateWorkerTimeout:a,useCompressionStream:s,useWebWorkers:o,Deflate:l,Inflate:d,workerScripts:u}=e;if(n!==D&&(A.baseURL=n),i!==D&&(A.chunkSize=i),r!==D&&(A.maxWorkers=r),a!==D&&(A.terminateWorkerTimeout=a),s!==D&&(A.useCompressionStream=s),o!==D&&(A.useWebWorkers=o),l!==D&&(A.Deflate=l),d!==D&&(A.Inflate=d),u!==D){const{deflate:e,inflate:n}=u;if((e||n)&&(A.workerScripts||(A.workerScripts={})),e){if(!t.isArray(e))throw new c("workerScripts.deflate must be an array");A.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new c("workerScripts.inflate must be an array");A.workerScripts.inflate=n}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class L{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^C[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class W extends x{constructor(){super({start(){this.crc32=new L},transform(e){this.crc32.append(e)},flush(e){const t=new d(4);new h(t.buffer).setUint32(0,this.crc32.get()),e.enqueue(t)}})}}const I={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=I.getPartial(n);return 32===i?e.concat(t):I._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+I.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,a.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=I.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let r=0;r<e.length;r++)i.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=I.getPartial(r);return i.push(I.partial(t+a&31,t+a>32?n:i.pop(),1)),i}},H={bytes:{fromBits(e){const t=I.bitLength(e)/8,n=new d(t);let i;for(let r=0;t>r;r++)0==(3&r)&&(i=e[r/4]),n[r]=i>>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],3==(3&n)&&(t.push(i),i=0);return 3&n&&t.push(I.partial(8*(3&n),i)),t}}},O={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};O.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=H.utf8String.toBits(e));const n=t._buffer=I.concat(t._buffer,e),i=t._length,r=t._length=i+I.bitLength(e);if(r>9007199254740991)throw new c("Cannot hash more than 2^53 - 1 bits");const a=new f(n);let s=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=I.concat(t,[I.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,i)=>e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i,_S:(e,t)=>t<<e|t>>>32-e,_block(e){const n=this,i=n._h,r=t(80);for(let t=0;16>t;t++)r[t]=e[t];let s=i[0],o=i[1],l=i[2],c=i[3],d=i[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,s)+n._f(e,o,l,c)+d+r[e]+n._key[a.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=s,s=t}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+l|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0}};const M={getRandomValues(e){const t=new f(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let i,r=0;r<e.length;r+=4){const e=n(4294967296*(i||a.random()));i=987654071*e(),t[r/4]=4294967296*e()|0}return e}},N={importKey:e=>new N.hmacSha1(H.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new c("invalid params to pbkdf2");const r=1+(i>>5)<<2;let a,s,o,l,d;const u=new ArrayBuffer(r),f=new h(u);let _=0;const w=I;for(t=H.bytes.toBits(t),d=1;(r||1)>_;d++){for(a=s=e.encrypt(w.concat(t,[d])),o=1;n>o;o++)for(s=e.encrypt(s),l=0;l<s.length;l++)a[l]^=s[l];for(o=0;(r||1)>_&&o<a.length;o++)f.setInt32(_,a[o]),_+=4}return u.slice(0,i/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=O.sha1,i=[[],[]],r=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>r&&(e=n.hash(e));for(let t=0;r>t;t++)i[0][t]=909522486^e[t],i[1][t]=1549556828^e[t];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new c("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},q=void 0!==y&&"function"==typeof y.getRandomValues,B="Invalid password";function P(e){return q?y.getRandomValues(e):M.getRandomValues(e)}const V=16,K={name:"PBKDF2"},Z=n.assign({hash:{name:"HMAC"}},K),G=n.assign({iterations:1e3,hash:{name:"SHA-1"}},K),j=["deriveBits"],X=[8,12,16],Y=[16,24,32],J=10,Q=[0,0,0,0],$="undefined",ee="function",te=typeof y!=$,ne=te&&typeof y.subtle!=$,ie=te&&ne&&typeof y.subtle.importKey==ee,re=te&&ne&&typeof y.subtle.deriveBits==ee,ae=H.bytes,se=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],r=e.length;let a,s,o,l=1;if(4!==r&&6!==r&&8!==r)throw new c("invalid aes key size");for(t._key=[s=e.slice(0),o=[]],a=r;4*r+28>a;a++){let e=s[a-1];(a%r==0||8===r&&a%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%r==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^e}for(let e=0;a;e++,a--){const t=s[3&e?a:a-4];o[e]=4>=a||4>e?t:i[0][n[t>>>24]]^i[1][n[t>>16&255]]^i[2][n[t>>8&255]]^i[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],a=[];let s,o,l,c;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new c("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],a=this._tables[t],s=a[0],o=a[1],l=a[2],d=a[3],u=a[4];let f,h,_,w=e[0]^n[0],p=e[t?3:1]^n[1],b=e[2]^n[2],g=e[t?1:3]^n[3],y=4;for(let e=0;i>e;e++)f=s[w>>>24]^o[p>>16&255]^l[b>>8&255]^d[255&g]^n[y],h=s[p>>>24]^o[b>>16&255]^l[g>>8&255]^d[255&w]^n[y+1],_=s[b>>>24]^o[g>>16&255]^l[w>>8&255]^d[255&p]^n[y+2],g=s[g>>>24]^o[w>>16&255]^l[p>>8&255]^d[255&b]^n[y+3],y+=4,w=f,p=h,b=_;for(let e=0;4>e;e++)r[t?3&-e:e]=u[w>>>24]<<24^u[p>>16&255]<<16^u[b>>8&255]<<8^u[255&g]^n[y++],f=w,w=p,p=b,b=g,g=f;return r}},oe=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const r=I.bitLength(t);for(let r=0;i>r;r+=4){this.incCounter(n);const i=e.encrypt(n);t[r]^=i[0],t[r+1]^=i[1],t[r+2]^=i[2],t[r+3]^=i[3]}return I.clamp(t,r)}},le=N.hmacSha1;class ce extends x{constructor(e,i,r){let a;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,signed:i,strength:r-1,pending:new d})},async transform(e,n){const i=this;if(i.password){const n=i.password;i.password=null;const r=_e(e,0,X[i.strength]+2);await(async(e,t,n)=>{await fe(e,n,_e(t,0,X[e.strength]));const i=_e(t,X[e.strength]),r=e.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new c(B)})(i,r,n),i.ctr=new oe(new se(i.keys.key),t.from(Q)),i.hmac=new le(i.keys.authentication),e=_e(e,X[i.strength]+2),i.resolveReady()}else await i.ready;const r=new d(e.length-J-(e.length-J)%V);n.enqueue(ue(i,e,r,0,J,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,i=_e(n,0,n.length-J),r=_e(n,n.length-J);let s=new d;if(i.length){const e=pe(ae,i);t.hmac.update(e);const n=t.ctr.update(e);s=we(ae,n)}if(a.valid=!0,t.signed){const e=_e(we(ae,t.hmac.digest()),0,J);for(let t=0;J>t;t++)e[t]!=r[t]&&(a.valid=!1)}e.enqueue(s)}}),a=this}}class de extends x{constructor(e,i){let r;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,strength:i-1,pending:new d})},async transform(e,n){const i=this;let r=new d;if(i.password){const e=i.password;i.password=null,r=await(async(e,t)=>{const n=P(new d(X[e.strength]));return await fe(e,t,n),he(n,e.keys.passwordVerification)})(i,e),i.ctr=new oe(new se(i.keys.key),t.from(Q)),i.hmac=new le(i.keys.authentication),i.resolveReady()}else await i.ready;const a=new d(r.length+e.length-e.length%V);a.set(r,0),n.enqueue(ue(i,e,a,r.length,0))},async flush(e){const t=this;await t.ready;let n=new d;if(t.pending.length){const e=t.ctr.update(pe(ae,t.pending));t.hmac.update(e),n=we(ae,e)}r.signature=we(ae,t.hmac.digest()).slice(0,J),e.enqueue(he(n,r.signature))}}),r=this}}function ue(e,t,n,i,r,a){const s=t.length-r;let o;for(e.pending.length&&(t=he(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new d(t)).set(n,0)}return e})(n,s-s%V)),o=0;s-V>=o;o+=V){const r=pe(ae,_e(t,o,o+V));a&&e.hmac.update(r);const s=e.ctr.update(r);a||e.hmac.update(s),n.set(we(ae,s),o+i)}return e.pending=_e(t,o),n}async function fe(e,t,i){const r=(e=>{if(void 0===p){const t=new d((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new p).encode(e)})(t),a=await((e,t,n,i,r)=>ie?y.subtle.importKey("raw",t,n,!1,r):N.importKey(t))(0,r,Z,0,j),s=await(async(e,t,n)=>re?await y.subtle.deriveBits(e,t,n):N.pbkdf2(t,e.salt,G.iterations,n))(n.assign({salt:i},G),a,8*(2*Y[e.strength]+2)),o=new d(s);e.keys={key:pe(ae,_e(o,0,Y[e.strength])),authentication:pe(ae,_e(o,Y[e.strength],2*Y[e.strength])),passwordVerification:_e(o,2*Y[e.strength])}}function he(e,t){let n=e;return e.length+t.length&&(n=new d(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function _e(e,t,n){return e.subarray(t,n)}function we(e,t){return e.fromBits(t)}function pe(e,t){return e.toBits(t)}class be extends x{constructor(e,t){let i;super({start(){n.assign(this,{password:e,passwordVerification:t}),xe(this,e)},transform(e,t){const n=this;if(n.password){const t=ye(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new c(B);e=e.subarray(12)}t.enqueue(ye(n,e))},flush(){i.valid=!0}}),i=this}}class ge extends x{constructor(e,t){super({start(){n.assign(this,{password:e,passwordVerification:t}),xe(this,e)},transform(e,t){const n=this;let i,r;if(n.password){n.password=null;const t=P(new d(12));t[11]=n.passwordVerification,i=new d(e.length+t.length),i.set(me(n,t),0),r=12}else i=new d(e.length),r=0;i.set(me(n,e),r),t.enqueue(i)},flush(){}})}}function ye(e,t){const n=new d(t.length);for(let i=0;i<t.length;i++)n[i]=ve(e)^t[i],ke(e,n[i]);return n}function me(e,t){const n=new d(t.length);for(let i=0;i<t.length;i++)n[i]=ve(e)^t[i],ke(e,t[i]);return n}function xe(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new L(e.keys[0]),e.crcKey2=new L(e.keys[2]);for(let n=0;n<t.length;n++)ke(e,t.charCodeAt(n))}function ke(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=Se(e.keys[1]+Re(e.keys[0])),e.keys[1]=Se(a.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ve(e){const t=2|e.keys[2];return Re(a.imul(t,1^t)>>>8)}function Re(e){return 255&e}function Se(e){return 4294967295&e}class ze extends x{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const Te="Invalid signature",De="deflate-raw",Ee="undefined",Ae=typeof R==Ee,Fe=typeof S==Ee;let Ue=!0,Ce=!0;class Le extends x{constructor(e,t,{chunkSize:n},...i){super({},...i);const{compressed:r,encrypted:a,useCompressionStream:s,password:o,passwordVerification:l,encryptionStrength:c,zipCrypto:d,signed:u,level:f}=t,_=this;let w,p,b=He(super.readable);if(a&&!d||!u||([b,w]=b.tee(),w=w.pipeThrough(new W)),r)if(void 0!==s&&!s||Ae&&!Ce)b=Ie(e,b,{chunkSize:n,level:f});else try{b=b.pipeThrough(new R(De))}catch(t){Ce=!1,b=Ie(e,b,{chunkSize:n,level:f})}a&&(d?b=b.pipeThrough(new ge(o,l)):(p=new de(o,c),b=b.pipeThrough(p))),Oe(_,b,(async()=>{let e;a&&!d&&(e=p.signature),a&&!d||!u||(e=await w.getReader().read(),e=new h(e.value.buffer).getUint32(0)),_.signature=e}))}}class We extends x{constructor(e,t,{chunkSize:n},...i){super({},...i);const{zipCrypto:r,encrypted:a,password:s,passwordVerification:o,signed:l,encryptionStrength:d,compressed:u,useCompressionStream:f}=t;let _,w,p=He(super.readable);if(a&&(r?p=p.pipeThrough(new be(s,o)):(w=new ce(s,l,d),p=p.pipeThrough(w))),u)if(void 0!==f&&!f||Fe&&!Ue)p=Ie(e,p,{chunkSize:n});else try{p=p.pipeThrough(new S(De))}catch(t){Ue=!1,p=Ie(e,p,{chunkSize:n})}a&&!r||!l||([p,_]=p.tee(),_=_.pipeThrough(new W)),Oe(this,p,(async()=>{if(a&&!r&&!w.valid)throw new c(Te);if((!a||r)&&l){const e=await _.getReader().read(),n=new h(e.value.buffer);if(t.signature!=n.getUint32(0,!1))throw new c(Te)}}))}}function Ie(e,t,n){return t.pipeThrough(new ze(e,n))}function He(e){return e.pipeThrough(new x({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Oe(e,t,i){t=t.pipeThrough(new x({flush:i})),n.defineProperty(e,"readable",{get:()=>t})}const Me="inflate",Ne="data";class qe{constructor(e,t,n,i,r){const{codecType:a}=i;async function s(a){const s=new a(e,i,r);await t.pipeThrough(s).pipeThrough(new x({transform(e,t){e&&e.length&&(n.size+=e.length,t.enqueue(e))}})).pipeTo(n,{preventClose:!0,preventAbort:!0});const{size:o,signature:l}=s;return{size:o,signature:l}}a.startsWith("deflate")?this.run=()=>s(Le):a.startsWith(Me)&&(this.run=()=>s(We))}}let Be,Pe=!0;class Ve{constructor(e,t,i,r){const{readable:a,writable:s}=t,{options:o,config:u,streamOptions:f,webWorker:h,scripts:_,codecConstructor:p}=i;n.assign(e,{busy:!0,codecConstructor:p,readable:a,writable:s,options:n.assign({},o),scripts:_,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,r(e)}});const{signal:b,onstart:g,onprogress:y,size:m,onend:k}=f;let v=0;const R={};return g&&(R.start=()=>Ke(g,m())),R.transform=async(e,t)=>{v+=e.length,y&&await Ke(y,v,m()),t.enqueue(e)},R.flush=()=>{a.size=()=>v,k&&Ke(k,v)},e.readable=a.pipeThrough(new x(R,{highWaterMark:1,size:()=>u.chunkSize}),{signal:b}),void 0===Be&&(Be="undefined"!=typeof Worker),h&&Be?((e,{baseURL:t,chunkSize:i})=>{const r={type:"module"},{readable:a,writable:s}=e;if(n.assign(e,{reader:a.getReader(),writer:s.getWriter(),result:new w(((t,n)=>{e.resolveResult=t,e.rejectResult=n}))}),!e.interface){if(Pe)try{e.worker=o({})}catch(t){Pe=!1,e.worker=o(r)}else e.worker=o(r);e.worker.addEventListener("message",(async t=>{const n=t.data,{reader:i,writer:r,resolveResult:a,rejectResult:s,onTaskFinished:o}=e,{type:l,data:f,messageId:h,result:_}=n,w=n.error;try{if(w){const{message:e,stack:t}=w,n=new c(e);n.stack=t,p(n)}else{if("pull"==l){const{value:e,done:t}=await i.read();u({type:Ne,data:e,done:t,messageId:h})}l==Ne&&(await r.ready,e.writable.size+=f.byteLength,await r.write(new d(f)),u({type:"ack",messageId:h})),"close"==l&&p(null,_)}}catch(e){p(e)}function p(e,t){e?s(e):a(t),r.releaseLock(),o()}}),!1),e.interface={run(){const{options:t}=e;return u({type:"start",scripts:e.scripts.slice(1),options:t,config:{chunkSize:i}}),e.result}}}return e.interface;function o(n){let i,r;i=e.scripts[0],"function"==typeof i&&(i=i());try{r=new l(i,t)}catch(e){r=i}return new Worker(r,n)}function u(t){const{worker:n,writer:i,onTaskFinished:r}=e;try{let{data:e}=t;if(e)try{const{buffer:i,length:r}=e;r!=i.byteLength&&(e=new d(e)),t.data=e.buffer,n.postMessage(t,[t.data])}catch(e){n.postMessage(t)}else n.postMessage(t)}catch(e){throw i.releaseLock(),r(),e}}})(e,u):((e,t)=>{const n=new qe(e.codecConstructor,e.readable,e.writable,e.options,t),{onTaskFinished:i}=e;return{async run(){try{return await n.run()}finally{i()}}}})(e,u)}}async function Ke(e,...t){try{await e(...t)}catch(e){}}let Ze=[];const Ge=[];let je=0;function Xe(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Ye="HTTP error ",Je="HTTP Range not supported",Qe="text/plain",$e="GET",et=65536;class tt{constructor(){this.size=0}init(){this.initialized=!0}}class nt extends tt{get readable(){const e=this,{chunkSize:t=et}=e,n=new k({start(){this.chunkOffset=0},async pull(i){const{offset:r=0,size:s}=n,{chunkOffset:o}=this;i.enqueue(await e.readUint8Array(r+o,a.min(t,s()-o))),o+t>s()?i.close():this.chunkOffset+=t}});return n}}class it extends tt{constructor(){super();const e=this,t=new v({write:t=>e.writeUint8Array(t)});n.defineProperty(e,"writable",{get:()=>t})}writeUint8Array(){}}class rt extends nt{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){return new d(await this.blob.slice(e,e+t).arrayBuffer())}}class at extends nt{constructor(e,t){super();const i=this;i.url=e,i.preventHeadRequest=t.preventHeadRequest,i.useRangeHeader=t.useRangeHeader,i.forceRangeRequests=t.forceRangeRequests,i.options=t=n.assign({},t),delete t.preventHeadRequest,delete t.useRangeHeader,delete t.forceRangeRequests,delete t.useXHR}async init(){super.init(),await ot(this,wt,ut)}readUint8Array(e,t){return lt(this,e,t,wt,ut)}}class st extends nt{constructor(e,t){super();const n=this;n.url=e,n.preventHeadRequest=t.preventHeadRequest,n.useRangeHeader=t.useRangeHeader,n.forceRangeRequests=t.forceRangeRequests,n.options=t}async init(){super.init(),await ot(this,pt,ft)}readUint8Array(e,t){return lt(this,e,t,pt,ft)}}async function ot(e,t,n){if((e=>{const{baseURL:t}=F(),{protocol:n}=new l(e,t);return"http:"==n||"https:"==n})(e.url)&&(e.useRangeHeader||e.forceRangeRequests)){const i=await t($e,e,ct(e));if(!e.forceRangeRequests&&"bytes"!=i.headers.get("Accept-Ranges"))throw new c(Je);{let r;const a=i.headers.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(r=Number(t))}}void 0===r?await _t(e,t,n):e.size=r}}else await _t(e,t,n)}async function lt(e,t,n,i,r){if(e.useRangeHeader||e.forceRangeRequests){const r=await i($e,e,ct(e,t,n));if(206!=r.status)throw new c(Je);return new d(await r.arrayBuffer())}return e.data||await r(e,e.options),new d(e.data.subarray(t,t+n))}function ct(e,t=0,i=1){return n.assign({},dt(e),{Range:"bytes="+t+"-"+(t+i-1)})}function dt(e){const t=e.options.headers;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function ut(e){await ht(e,wt)}async function ft(e){await ht(e,pt)}async function ht(e,t){const n=await t($e,e,dt(e));e.data=new d(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function _t(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t("HEAD",e,dt(e))).headers.get("Content-Length");i?e.size=Number(i):await n(e,e.options)}}async function wt(e,{options:t,url:i},r){const a=await fetch(i,n.assign({},t,{method:e,headers:r}));if(400>a.status)return a;throw 416==a.status?new c(Je):new c(Ye+(a.statusText||a.status))}function pt(e,{url:t},i){return new w(((r,a)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",(()=>{if(400>s.status){const e=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),r({status:s.status,arrayBuffer:()=>s.response,headers:new o(e)})}else a(416==s.status?new c(Je):new c(Ye+(s.statusText||s.status)))}),!1),s.addEventListener("error",(e=>a(e.detail.error)),!1),s.open(e,t),i)for(const e of n.entries(i))s.setRequestHeader(e[0],e[1]);s.responseType="arraybuffer",s.send()}))}class bt extends nt{constructor(e,t={}){super(),this.url=e,this.reader=t.useXHR?new st(e,t):new at(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}async function gt(e,t){e.init&&!e.initialized&&await e.init(t)}const yt=4294967295,mt=33639248,xt=101075792,kt="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function vt(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;n<e.length;n++)t+=kt[e[n]];return t}})(e):new b(t).decode(e)}const Rt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class St{constructor(e){Rt.forEach((t=>this[t]=e[t]))}}const zt="File format is not recognized",Tt="End of central directory not found",Dt="End of Zip64 central directory not found",Et="End of Zip64 central directory locator not found",At="Central directory header not found",Ft="Local file header not found",Ut="Zip64 extra field not found",Ct="File contains encrypted entry",Lt="Encryption method not supported",Wt="Compression method not supported",It="utf-8",Ht="cp437",Ot=["uncompressedSize","compressedSize","offset"];class Mt{constructor(e,t,i){n.assign(this,{reader:e,config:t,options:i})}async getData(e,t,n={}){const i=this,{reader:r,offset:a,extraFieldAES:s,compressionMethod:o,config:l,bitFlag:d,signature:u,rawLastModDate:f,uncompressedSize:h,compressedSize:_}=i,p=i.localDirectory={};let b=await Jt(r,a,30);const g=Yt(b);let y=Pt(i,n,"password");if(y=y&&y.length&&y,s&&99!=s.originalCompressionMethod)throw new c(Wt);if(0!=o&&8!=o)throw new c(Wt);if(67324752!=jt(g,0))throw new c(Ft);Nt(p,g,4),b=await Jt(r,a,30+p.filenameLength+p.extraFieldLength),p.rawExtraField=b.subarray(30+p.filenameLength),await qt(i,p,g,4),t.lastAccessDate=p.lastAccessDate,t.creationDate=p.creationDate;const m=i.encrypted&&p.encrypted,x=m&&!s;if(m){if(!x&&void 0===s.strength)throw new c(Lt);if(!y)throw new c(Ct)}const k=a+30+p.filenameLength+p.extraFieldLength,v=()=>_,R=r.readable;R.offset=k,R.size=v;const{writable:S}=e;S.size=0;const z=Pt(i,n,"signal");await gt(e,h);const{onstart:T,onprogress:D,onend:E}=n,A={options:{codecType:Me,password:y,zipCrypto:x,encryptionStrength:s&&s.strength,signed:Pt(i,n,"checkSignature"),passwordVerification:x&&(d.dataDescriptor?f>>>8&255:u>>>24&255),signature:u,compressed:0!=o,encrypted:m,useWebWorkers:Pt(i,n,"useWebWorkers"),useCompressionStream:Pt(i,n,"useCompressionStream")},config:l,streamOptions:{signal:z,size:v,onstart:T,onprogress:D,onend:E},codecConstructor:l.Inflate};return await(async(e,t)=>{const{options:n,config:i}=t,r=!n.compressed&&!n.signed&&!n.encrypted,{useWebWorkers:a,useCompressionStream:s,codecType:o}=n,{workerScripts:l}=i;let c;if(t.webWorker=!r&&(a||void 0===a&&i.useWebWorkers),t.scripts=t.webWorker&&l?l[o]:[],n.useCompressionStream=void 0===s?i.useCompressionStream:s,Ze.length<i.maxWorkers){const n={indexWorker:je};je++,Ze.push(n),c=new Ve(n,e,t,d)}else{const n=Ze.find((e=>!e.busy));n?(Xe(n),c=new Ve(n,e,t,d)):c=await new w((n=>Ge.push({resolve:n,stream:e,workerOptions:t})))}return c.run();function d(e){if(Ge.length){const[{resolve:t,stream:n,workerOptions:i}]=Ge.splice(0,1);t(new Ve(e,n,i,d))}else if(e.worker){const{terminateWorkerTimeout:t}=i;Xe(e),Number.isFinite(t)&&t>=0&&(e.terminateTimeout=setTimeout((()=>{Ze=Ze.filter((t=>t!=e)),e.terminate()}),t))}else Ze=Ze.filter((t=>t!=e))}})({readable:R,writable:S},A),Pt(i,n,"preventClose")||await S.getWriter().close(),e.getData?e.getData():S}}function Nt(e,t,i){const r=e.rawBitFlag=Gt(t,i+2),a=1==(1&r),s=jt(t,i+6);n.assign(e,{encrypted:a,version:Gt(t,i),bitFlag:{level:(6&r)>>1,dataDescriptor:8==(8&r),languageEncodingFlag:2048==(2048&r)},rawLastModDate:s,lastModDate:Vt(s),filenameLength:Gt(t,i+22),extraFieldLength:Gt(t,i+24)})}async function qt(e,t,i,r){const{rawExtraField:l}=t,u=t.extraField=new o,f=Yt(new d(l));let h=0;try{for(;h<l.length;){const e=Gt(f,h),t=Gt(f,h+2);u.set(e,{type:e,data:l.slice(h+4,h+4+t)}),h+=4+t}}catch(e){}const _=Gt(i,r+4);t.signature=jt(i,r+10),t.uncompressedSize=jt(i,r+18),t.compressedSize=jt(i,r+14);const w=u.get(1);w&&(((e,t)=>{t.zip64=!0;const n=Yt(e.data);e.values=[];for(let t=0;t<a.floor(e.data.length/8);t++)e.values.push(Xt(n,0+8*t));const i=Ot.filter((e=>t[e]==yt));for(let t=0;t<i.length;t++)e[i[t]]=e.values[t];Ot.forEach((n=>{if(t[n]==yt){if(void 0===e[n])throw new c(Ut);t[n]=e[n]}}))})(w,t),t.extraFieldZip64=w);const p=u.get(28789);p&&(await Bt(p,"filename","rawFilename",t,e),t.extraFieldUnicodePath=p);const b=u.get(25461);b&&(await Bt(b,"comment","rawComment",t,e),t.extraFieldUnicodeComment=b);const g=u.get(39169);g?(((e,t,n)=>{const i=Yt(e.data);e.vendorVersion=Zt(i,0),e.vendorId=Zt(i,2);const r=Zt(i,4);e.strength=r,e.originalCompressionMethod=n,t.compressionMethod=e.compressionMethod=Gt(i,5)})(g,t,_),t.extraFieldAES=g):t.compressionMethod=_;const y=u.get(10);y&&(((e,t)=>{const i=Yt(e.data);let r,a=4;try{for(;a<e.data.length&&!r;){const t=Gt(i,a),n=Gt(i,a+2);1==t&&(r=e.data.slice(a+4,a+4+n)),a+=4+n}}catch(e){}try{if(r&&24==r.length){const i=Yt(r),a=i.getBigUint64(0,!0),s=i.getBigUint64(8,!0),o=i.getBigUint64(16,!0);n.assign(e,{rawLastModDate:a,rawLastAccessDate:s,rawCreationDate:o});const l={lastModDate:Kt(a),lastAccessDate:Kt(s),creationDate:Kt(o)};n.assign(e,l),n.assign(t,l)}}catch(e){}})(y,t),t.extraFieldNTFS=y);const m=u.get(21589);m&&(((e,t)=>{const n=Yt(e.data),i=Zt(n,0),r=[],a=[];1==(1&i)&&(r.push("lastModDate"),a.push("rawLastModDate")),2==(2&i)&&(r.push("lastAccessDate"),a.push("rawLastAccessDate")),4==(4&i)&&(r.push("creationDate"),a.push("rawCreationDate"));let o=1;r.forEach(((i,r)=>{if(e.data.length>=o+4){const l=jt(n,o);t[i]=e[i]=new s(1e3*l);const c=a[r];e[c]=l}o+=4}))})(m,t),t.extraFieldExtendedTimestamp=m)}async function Bt(e,t,n,i,r){const a=Yt(e.data);e.version=Zt(a,0),e.signature=jt(a,1);const s=new L;s.append(r[n]);const o=Yt(new d(4));o.setUint32(0,s.get(),!0),e[t]=await vt(e.data.subarray(5)),e.valid=!r.bitFlag.languageEncodingFlag&&e.signature==jt(o,0),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function Pt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function Vt(e){const t=(4294901760&e)>>16,n=65535&e;try{return new s(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Kt(e){return new s(Number(e/r(1e4)-r(116444736e5)))}function Zt(e,t){return e.getUint8(t)}function Gt(e,t){return e.getUint16(t,!0)}function jt(e,t){return e.getUint32(t,!0)}function Xt(e,t){return Number(e.getBigUint64(t,!0))}function Yt(e){return new h(e.buffer)}function Jt(e,t,n){return e.readUint8Array(t,n)}U({Inflate:T}),e.BlobReader=rt,e.BlobWriter=class extends tt{constructor(e){super();const t=this;t.contentType=e,t.transformStream=new x,n.defineProperty(this,"writable",{get:()=>t.transformStream.writable})}init(){super.init();const{transformStream:e,contentType:t}=this;this.blob=new Response(e.readable).blob({type:t})}getData(){return this.blob}},e.Data64URIReader=class extends nt{constructor(e){super();const t=this;t.dataURI=e;let n=e.length;for(;"="==e.charAt(n-1);)n--;t.dataStart=e.indexOf(",")+1,t.size=a.floor(.75*(n-t.dataStart))}readUint8Array(e,t){const n=new d(t),i=4*a.floor(e/3),r=this.dataStart,s=atob(this.dataURI.substring(i+r,4*a.ceil((e+t)/3)+r)),o=e-3*a.floor(i/4);for(let e=o;o+t>e;e++)n[e-o]=s.charCodeAt(e);return n}},e.Data64URIWriter=class extends it{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}writeUint8Array(e){const t=this;let n=0,r=t.pending;const s=t.pending.length;for(t.pending="",n=0;n<3*a.floor((s+e.length)/3)-s;n++)r+=i.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=i.fromCharCode(e[n]);r.length>2?t.data+=m(r):t.pending=r}getData(){return this.data+m(this.pending)}},e.ERR_BAD_FORMAT=zt,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=At,e.ERR_ENCRYPTED=Ct,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Et,e.ERR_EOCDR_NOT_FOUND=Tt,e.ERR_EOCDR_ZIP64_NOT_FOUND=Dt,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Ut,e.ERR_HTTP_RANGE=Je,e.ERR_INVALID_PASSWORD=B,e.ERR_INVALID_SIGNATURE=Te,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Ft,e.ERR_UNSUPPORTED_COMPRESSION=Wt,e.ERR_UNSUPPORTED_ENCRYPTION=Lt,e.HttpRangeReader=class extends bt{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=bt,e.Reader=nt,e.TextReader=class extends nt{constructor(e){super(),this.blobReader=new rt(new _([e],{type:Qe}))}init(){const e=this;super.init(),e.blobReader.init(),e.size=e.blobReader.size}readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends it{constructor(e){super(),this.encoding=e,this.blob=new _([],{type:Qe})}writeUint8Array(e){this.blob=new _([this.blob,e.buffer],{type:Qe})}getData(){const e=this;if(e.blob.text&&(void 0===e.encoding||e.encoding&&"utf-8"==e.encoding.toLowerCase()))return e.blob.text();{const t=new FileReader;return new w(((n,i)=>{t.onload=e=>n(e.target.result),t.onerror=()=>i(t.error),t.readAsText(e.blob,e.encoding)}))}}},e.Uint8ArrayReader=class extends nt{constructor(e){super(),this.array=e,this.size=e.length}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends it{init(e=0){super.init(),this.offset=0,this.array=new d(e)}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new d(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=it,e.ZipReader=class{constructor(e,t={}){n.assign(this,{reader:e,options:t,config:F()})}async*getEntriesGenerator(e={}){const t=this;let{reader:i}=t;const{config:r}=t;if(await gt(i),void 0===i.size||!i.readUint8Array){const e=await new Response(i.readable).blob();i=new rt(e)}if(22>i.size)throw new c(zt);i.chunkSize=(e=>a.max(e.chunkSize,64))(r);const s=await(async(e,t,n)=>{const i=new d(4);return Yt(i).setUint32(0,101010256,!0),await r(22)||await r(a.min(1048582,n));async function r(t){const r=n-t,a=await Jt(e,r,t);for(let e=a.length-22;e>=0;e--)if(a[e]==i[0]&&a[e+1]==i[1]&&a[e+2]==i[2]&&a[e+3]==i[3])return{offset:r+e,buffer:a.slice(e,e+22).buffer}}})(i,0,i.size);if(!s)throw new c(Tt);const o=Yt(s);let l=jt(o,12),u=jt(o,16);const f=s.offset,h=Gt(o,20),_=f+22+h;let p=Gt(o,8),b=0,g=0;if(u==yt||l==yt||65535==p){const e=Yt(await Jt(i,s.offset-20,20));if(117853008!=jt(e,0))throw new c(Dt);u=Xt(e,8);let t=await Jt(i,u,56),n=Yt(t);const r=s.offset-20-56;if(jt(n,0)!=xt&&u!=r){const e=u;u=r,b=u-e,t=await Jt(i,u,56),n=Yt(t)}if(jt(n,0)!=xt)throw new c(Et);p=Xt(n,32),l=Xt(n,40),u-=l}if(0>u||u>=i.size)throw new c(zt);let y=0,m=await Jt(i,u,l),x=Yt(m);if(l){const e=s.offset-l;if(jt(x,y)!=mt&&u!=e){const t=u;u=e,b=u-t,m=await Jt(i,u,l),x=Yt(m)}}if(0>u||u>=i.size)throw new c(zt);const k=Pt(t,e,"filenameEncoding"),v=Pt(t,e,"commentEncoding");for(let s=0;p>s;s++){const o=new Mt(i,r,t.options);if(jt(x,y)!=mt)throw new c(At);Nt(o,x,y+6);const l=!!o.bitFlag.languageEncodingFlag,d=y+46,u=d+o.filenameLength,f=u+o.extraFieldLength,h=Gt(x,y+4),_=0==(0&h);n.assign(o,{versionMadeBy:h,msDosCompatible:_,compressedSize:0,uncompressedSize:0,commentLength:Gt(x,y+32),directory:_&&16==(16&Zt(x,y+38)),offset:jt(x,y+42)+b,internalFileAttribute:Gt(x,y+36),externalFileAttribute:jt(x,y+38),rawFilename:m.subarray(d,u),filenameUTF8:l,commentUTF8:l,rawExtraField:m.subarray(u,f)}),g=a.max(o.offset,g);const R=f+o.commentLength;o.rawComment=m.subarray(f,R);const[S,z]=await w.all([vt(o.rawFilename,o.filenameUTF8?It:k||Ht),vt(o.rawComment,o.commentUTF8?It:v||Ht)]);o.filename=S,o.comment=z,!o.directory&&o.filename.endsWith("/")&&(o.directory=!0),await qt(o,o,x,y+6);const T=new St(o);if(T.getData=(e,t)=>o.getData(e,T,t),y=R,e.onprogress)try{await e.onprogress(s+1,p,new St(o))}catch(e){}yield T}const R=Pt(t,e,"extractPrependedData"),S=Pt(t,e,"extractAppendedData");return R&&(t.prependedData=g>0?await Jt(i,0,g):new d),t.comment=h?await Jt(i,f+22,h):new d,S&&(t.appendedData=_<i.size?await Jt(i,_,i.size-_):new d),!0}async getEntries(e={}){const t=[];for await(const n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}},e.configure=U,e.getMimeType=()=>"application/octet-stream",e.initStream=gt,e.terminateWorkers=()=>{Ze.forEach((e=>{Xe(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
((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{Array:t,Object:n,String:i,BigInt:r,Math:a,Date:s,Map:o,URL:l,Error:c,Uint8Array:d,Uint16Array:u,Uint32Array:f,DataView:h,Blob:_,Promise:w,TextEncoder:p,TextDecoder:b,document:g,crypto:y,btoa:m,TransformStream:x,ReadableStream:k,WritableStream:v,CompressionStream:R,DecompressionStream:S,navigator:z}=globalThis,T=(()=>{const e=-2,t=-3,n=-5,i=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],r=[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],l=[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],u=[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];function h(){let e,i,r,a,s,c;function d(e,i,o,l,d,u,f,h,_,w,p){let b,g,y,m,x,k,v,R,S,z,T,D,E,A,F;z=0,x=o;do{r[e[i+z]]++,z++,x--}while(0!==x);if(r[0]==o)return f[0]=-1,h[0]=0,0;for(R=h[0],k=1;15>=k&&0===r[k];k++);for(v=k,k>R&&(R=k),x=15;0!==x&&0===r[x];x--);for(y=x,R>x&&(R=x),h[0]=R,A=1<<k;x>k;k++,A<<=1)if(0>(A-=r[k]))return t;if(0>(A-=r[x]))return t;for(r[x]+=A,c[1]=k=0,z=1,E=2;0!=--x;)c[E]=k+=r[z],E++,z++;x=0,z=0;do{0!==(k=e[i+z])&&(p[c[k]++]=x),z++}while(++x<o);for(o=c[y],c[0]=x=0,z=0,m=-1,D=-R,s[0]=0,T=0,F=0;y>=v;v++)for(b=r[v];0!=b--;){for(;v>D+R;){if(m++,D+=R,F=y-D,F=F>R?R:F,(g=1<<(k=v-D))>b+1&&(g-=b+1,E=v,F>k))for(;++k<F&&(g<<=1)>r[++E];)g-=r[E];if(F=1<<k,w[0]+F>1440)return t;s[m]=T=w[0],w[0]+=F,0!==m?(c[m]=x,a[0]=k,a[1]=R,k=x>>>D-R,a[2]=T-s[m-1]-k,_.set(a,3*(s[m-1]+k))):f[0]=T}for(a[1]=v-D,o>z?p[z]<l?(a[0]=256>p[z]?0:96,a[2]=p[z++]):(a[0]=u[p[z]-l]+16+64,a[2]=d[p[z++]-l]):a[0]=192,g=1<<v-D,k=x>>>D;F>k;k+=g)_.set(a,3*(T+k));for(k=1<<v-1;0!=(x&k);k>>>=1)x^=k;for(x^=k,S=(1<<D)-1;(x&S)!=c[m];)m--,D-=R,S=(1<<D)-1}return 0!==A&&1!=y?n:0}function h(t){let n;for(e||(e=[],i=[],r=new Int32Array(16),a=[],s=new Int32Array(15),c=new Int32Array(16)),i.length<t&&(i=[]),n=0;t>n;n++)i[n]=0;for(n=0;16>n;n++)r[n]=0;for(n=0;3>n;n++)a[n]=0;s.set(r.subarray(0,15),0),c.set(r.subarray(0,16),0)}this.inflate_trees_bits=(r,a,s,o,l)=>{let c;return h(19),e[0]=0,c=d(r,0,19,19,null,null,s,a,o,e,i),c==t?l.msg="oversubscribed dynamic bit lengths tree":c!=n&&0!==a[0]||(l.msg="incomplete dynamic bit lengths tree",c=t),c},this.inflate_trees_dynamic=(r,a,s,c,_,w,p,b,g)=>{let y;return h(288),e[0]=0,y=d(s,0,r,257,o,l,w,c,b,e,i),0!=y||0===c[0]?(y==t?g.msg="oversubscribed literal/length tree":-4!=y&&(g.msg="incomplete literal/length tree",y=t),y):(h(288),y=d(s,r,a,0,u,f,p,_,b,e,i),0!=y||0===_[0]&&r>257?(y==t?g.msg="oversubscribed distance tree":y==n?(g.msg="incomplete distance tree",y=t):-4!=y&&(g.msg="empty distance tree with lengths",y=t),y):0)}}function _(){const n=this;let r,a,s,o,l=0,c=0,d=0,u=0,f=0,h=0,_=0,w=0,p=0,b=0;function g(e,n,r,a,s,o,l,c){let d,u,f,h,_,w,p,b,g,y,m,x,k,v,R,S;p=c.next_in_index,b=c.avail_in,_=l.bitb,w=l.bitk,g=l.write,y=g<l.read?l.read-g-1:l.end-g,m=i[e],x=i[n];do{for(;20>w;)b--,_|=(255&c.read_byte(p++))<<w,w+=8;if(d=_&m,u=r,f=a,S=3*(f+d),0!==(h=u[S]))for(;;){if(_>>=u[S+1],w-=u[S+1],0!=(16&h)){for(h&=15,k=u[S+2]+(_&i[h]),_>>=h,w-=h;15>w;)b--,_|=(255&c.read_byte(p++))<<w,w+=8;for(d=_&x,u=s,f=o,S=3*(f+d),h=u[S];;){if(_>>=u[S+1],w-=u[S+1],0!=(16&h)){for(h&=15;h>w;)b--,_|=(255&c.read_byte(p++))<<w,w+=8;if(v=u[S+2]+(_&i[h]),_>>=h,w-=h,y-=k,v>g){R=g-v;do{R+=l.end}while(0>R);if(h=l.end-R,k>h){if(k-=h,g-R>0&&h>g-R)do{l.win[g++]=l.win[R++]}while(0!=--h);else l.win.set(l.win.subarray(R,R+h),g),g+=h,R+=h,h=0;R=0}}else R=g-v,g-R>0&&2>g-R?(l.win[g++]=l.win[R++],l.win[g++]=l.win[R++],k-=2):(l.win.set(l.win.subarray(R,R+2),g),g+=2,R+=2,k-=2);if(g-R>0&&k>g-R)do{l.win[g++]=l.win[R++]}while(0!=--k);else l.win.set(l.win.subarray(R,R+k),g),g+=k,R+=k,k=0;break}if(0!=(64&h))return c.msg="invalid distance code",k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,t;d+=u[S+2],d+=_&i[h],S=3*(f+d),h=u[S]}break}if(0!=(64&h))return 0!=(32&h)?(k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,1):(c.msg="invalid literal/length code",k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,t);if(d+=u[S+2],d+=_&i[h],S=3*(f+d),0===(h=u[S])){_>>=u[S+1],w-=u[S+1],l.win[g++]=u[S+2],y--;break}}else _>>=u[S+1],w-=u[S+1],l.win[g++]=u[S+2],y--}while(y>=258&&b>=10);return k=c.avail_in-b,k=k>w>>3?w>>3:k,b+=k,p-=k,w-=k<<3,l.bitb=_,l.bitk=w,c.avail_in=b,c.total_in+=p-c.next_in_index,c.next_in_index=p,l.write=g,0}n.init=(e,t,n,i,l,c)=>{r=0,_=e,w=t,s=n,p=i,o=l,b=c,a=null},n.proc=(n,y,m)=>{let x,k,v,R,S,z,T,D=0,E=0,A=0;for(A=y.next_in_index,R=y.avail_in,D=n.bitb,E=n.bitk,S=n.write,z=S<n.read?n.read-S-1:n.end-S;;)switch(r){case 0:if(z>=258&&R>=10&&(n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,m=g(_,w,s,p,o,b,n,y),A=y.next_in_index,R=y.avail_in,D=n.bitb,E=n.bitk,S=n.write,z=S<n.read?n.read-S-1:n.end-S,0!=m)){r=1==m?7:9;break}d=_,a=s,c=p,r=1;case 1:for(x=d;x>E;){if(0===R)return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(A++))<<E,E+=8}if(k=3*(c+(D&i[x])),D>>>=a[k+1],E-=a[k+1],v=a[k],0===v){u=a[k+2],r=6;break}if(0!=(16&v)){f=15&v,l=a[k+2],r=2;break}if(0==(64&v)){d=v,c=k/3+a[k+2];break}if(0!=(32&v)){r=7;break}return r=9,y.msg="invalid literal/length code",m=t,n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);case 2:for(x=f;x>E;){if(0===R)return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(A++))<<E,E+=8}l+=D&i[x],D>>=x,E-=x,d=w,a=o,c=b,r=3;case 3:for(x=d;x>E;){if(0===R)return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(A++))<<E,E+=8}if(k=3*(c+(D&i[x])),D>>=a[k+1],E-=a[k+1],v=a[k],0!=(16&v)){f=15&v,h=a[k+2],r=4;break}if(0==(64&v)){d=v,c=k/3+a[k+2];break}return r=9,y.msg="invalid distance code",m=t,n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);case 4:for(x=f;x>E;){if(0===R)return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);m=0,R--,D|=(255&y.read_byte(A++))<<E,E+=8}h+=D&i[x],D>>=x,E-=x,r=5;case 5:for(T=S-h;0>T;)T+=n.end;for(;0!==l;){if(0===z&&(S==n.end&&0!==n.read&&(S=0,z=S<n.read?n.read-S-1:n.end-S),0===z&&(n.write=S,m=n.inflate_flush(y,m),S=n.write,z=S<n.read?n.read-S-1:n.end-S,S==n.end&&0!==n.read&&(S=0,z=S<n.read?n.read-S-1:n.end-S),0===z)))return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);n.win[S++]=n.win[T++],z--,T==n.end&&(T=0),l--}r=0;break;case 6:if(0===z&&(S==n.end&&0!==n.read&&(S=0,z=S<n.read?n.read-S-1:n.end-S),0===z&&(n.write=S,m=n.inflate_flush(y,m),S=n.write,z=S<n.read?n.read-S-1:n.end-S,S==n.end&&0!==n.read&&(S=0,z=S<n.read?n.read-S-1:n.end-S),0===z)))return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);m=0,n.win[S++]=u,z--,r=0;break;case 7:if(E>7&&(E-=8,R++,A--),n.write=S,m=n.inflate_flush(y,m),S=n.write,z=S<n.read?n.read-S-1:n.end-S,n.read!=n.write)return n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);r=8;case 8:return m=1,n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);case 9:return m=t,n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m);default:return m=e,n.bitb=D,n.bitk=E,y.avail_in=R,y.total_in+=A-y.next_in_index,y.next_in_index=A,n.write=S,n.inflate_flush(y,m)}},n.free=()=>{}}h.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=r,i[0]=s,0);const w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function p(r,a){const s=this;let o,l=0,c=0,u=0,f=0;const p=[0],b=[0],g=new _;let y=0,m=new Int32Array(4320);const x=new h;s.bitk=0,s.bitb=0,s.win=new d(a),s.end=a,s.read=0,s.write=0,s.reset=(e,t)=>{t&&(t[0]=0),6==l&&g.free(e),l=0,s.bitk=0,s.bitb=0,s.read=s.write=0},s.reset(r,null),s.inflate_flush=(e,t)=>{let i,r,a;return r=e.next_out_index,a=s.read,i=(a>s.write?s.end:s.write)-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==n&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(s.win.subarray(a,a+i),r),r+=i,a+=i,a==s.end&&(a=0,s.write==s.end&&(s.write=0),i=s.write-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==n&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(s.win.subarray(a,a+i),r),r+=i,a+=i),e.next_out_index=r,s.read=a,t},s.proc=(n,r)=>{let a,d,_,k,v,R,S,z;for(k=n.next_in_index,v=n.avail_in,d=s.bitb,_=s.bitk,R=s.write,S=R<s.read?s.read-R-1:s.end-R;;){let T,D,E,A,F,U,C,L;switch(l){case 0:for(;3>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}switch(a=7&d,y=1&a,a>>>1){case 0:d>>>=3,_-=3,a=7&_,d>>>=a,_-=a,l=1;break;case 1:T=[],D=[],E=[[]],A=[[]],h.inflate_trees_fixed(T,D,E,A),g.init(T[0],D[0],E[0],0,A[0],0),d>>>=3,_-=3,l=6;break;case 2:d>>>=3,_-=3,l=3;break;case 3:return d>>>=3,_-=3,l=9,n.msg="invalid block type",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r)}break;case 1:for(;32>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if((~d>>>16&65535)!=(65535&d))return l=9,n.msg="invalid stored block lengths",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);c=65535&d,d=_=0,l=0!==c?2:0!==y?7:0;break;case 2:if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(0===S&&(R==s.end&&0!==s.read&&(R=0,S=R<s.read?s.read-R-1:s.end-R),0===S&&(s.write=R,r=s.inflate_flush(n,r),R=s.write,S=R<s.read?s.read-R-1:s.end-R,R==s.end&&0!==s.read&&(R=0,S=R<s.read?s.read-R-1:s.end-R),0===S)))return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(r=0,a=c,a>v&&(a=v),a>S&&(a=S),s.win.set(n.read_buf(k,a),R),k+=a,v-=a,R+=a,S-=a,0!=(c-=a))break;l=0!==y?7:0;break;case 3:for(;14>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(u=a=16383&d,(31&a)>29||(a>>5&31)>29)return l=9,n.msg="too many length or distance symbols",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);if(a=258+(31&a)+(a>>5&31),!o||o.length<a)o=[];else for(z=0;a>z;z++)o[z]=0;d>>>=14,_-=14,f=0,l=4;case 4:for(;4+(u>>>10)>f;){for(;3>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}o[w[f++]]=7&d,d>>>=3,_-=3}for(;19>f;)o[w[f++]]=0;if(p[0]=7,a=x.inflate_trees_bits(o,p,b,m,n),0!=a)return(r=a)==t&&(o=null,l=9),s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);f=0,l=5;case 5:for(;a=u,258+(31&a)+(a>>5&31)>f;){let e,c;for(a=p[0];a>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(a=m[3*(b[0]+(d&i[a]))+1],c=m[3*(b[0]+(d&i[a]))+2],16>c)d>>>=a,_-=a,o[f++]=c;else{for(z=18==c?7:c-14,e=18==c?11:3;a+z>_;){if(0===v)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);r=0,v--,d|=(255&n.read_byte(k++))<<_,_+=8}if(d>>>=a,_-=a,e+=d&i[z],d>>>=z,_-=z,z=f,a=u,z+e>258+(31&a)+(a>>5&31)||16==c&&1>z)return o=null,l=9,n.msg="invalid bit length repeat",r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);c=16==c?o[z-1]:0;do{o[z++]=c}while(0!=--e);f=z}}if(b[0]=-1,F=[],U=[],C=[],L=[],F[0]=9,U[0]=6,a=u,a=x.inflate_trees_dynamic(257+(31&a),1+(a>>5&31),o,F,U,C,L,m,n),0!=a)return a==t&&(o=null,l=9),r=a,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);g.init(F[0],U[0],m,C[0],m,L[0]),l=6;case 6:if(s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,1!=(r=g.proc(s,n,r)))return s.inflate_flush(n,r);if(r=0,g.free(n),k=n.next_in_index,v=n.avail_in,d=s.bitb,_=s.bitk,R=s.write,S=R<s.read?s.read-R-1:s.end-R,0===y){l=0;break}l=7;case 7:if(s.write=R,r=s.inflate_flush(n,r),R=s.write,S=R<s.read?s.read-R-1:s.end-R,s.read!=s.write)return s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);l=8;case 8:return r=1,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);case 9:return r=t,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r);default:return r=e,s.bitb=d,s.bitk=_,n.avail_in=v,n.total_in+=k-n.next_in_index,n.next_in_index=k,s.write=R,s.inflate_flush(n,r)}}},s.free=e=>{s.reset(e,null),s.win=null,m=null},s.set_dictionary=(e,t,n)=>{s.win.set(e.subarray(t,t+n),0),s.read=s.write=n},s.sync_point=()=>1==l?1:0}const b=13,g=[0,0,255,255];function y(){const i=this;function r(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):e}i.mode=0,i.method=0,i.was=[0],i.need=0,i.marker=0,i.wbits=0,i.inflateEnd=e=>(i.blocks&&i.blocks.free(e),i.blocks=null,0),i.inflateInit=(t,n)=>(t.msg=null,i.blocks=null,8>n||n>15?(i.inflateEnd(t),e):(i.wbits=n,t.istate.blocks=new p(t,1<<n),r(t),0)),i.inflate=(i,r)=>{let a,s;if(!i||!i.istate||!i.next_in)return e;const o=i.istate;for(r=4==r?n:0,a=n;;)switch(o.mode){case 0:if(0===i.avail_in)return a;if(a=r,i.avail_in--,i.total_in++,8!=(15&(o.method=i.read_byte(i.next_in_index++)))){o.mode=b,i.msg="unknown compression method",o.marker=5;break}if(8+(o.method>>4)>o.wbits){o.mode=b,i.msg="invalid win size",o.marker=5;break}o.mode=1;case 1:if(0===i.avail_in)return a;if(a=r,i.avail_in--,i.total_in++,s=255&i.read_byte(i.next_in_index++),((o.method<<8)+s)%31!=0){o.mode=b,i.msg="incorrect header check",o.marker=5;break}if(0==(32&s)){o.mode=7;break}o.mode=2;case 2:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need=(255&i.read_byte(i.next_in_index++))<<24&4278190080,o.mode=3;case 3:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need+=(255&i.read_byte(i.next_in_index++))<<16&16711680,o.mode=4;case 4:if(0===i.avail_in)return a;a=r,i.avail_in--,i.total_in++,o.need+=(255&i.read_byte(i.next_in_index++))<<8&65280,o.mode=5;case 5:return 0===i.avail_in?a:(a=r,i.avail_in--,i.total_in++,o.need+=255&i.read_byte(i.next_in_index++),o.mode=6,2);case 6:return o.mode=b,i.msg="need dictionary",o.marker=0,e;case 7:if(a=o.blocks.proc(i,a),a==t){o.mode=b,o.marker=0;break}if(0==a&&(a=r),1!=a)return a;a=r,o.blocks.reset(i,o.was),o.mode=12;case 12:return i.avail_in=0,1;case b:return t;default:return e}},i.inflateSetDictionary=(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<<s.wbits||(a=(1<<s.wbits)-1,r=i-a),s.blocks.set_dictionary(n,r,a),s.mode=7,0},i.inflateSync=i=>{let a,s,o,l,c;if(!i||!i.istate)return e;const d=i.istate;if(d.mode!=b&&(d.mode=b,d.marker=0),0===(a=i.avail_in))return n;for(s=i.next_in_index,o=d.marker;0!==a&&4>o;)i.read_byte(s)==g[o]?o++:o=0!==i.read_byte(s)?0:4-o,s++,a--;return i.total_in+=s-i.next_in_index,i.next_in_index=s,i.avail_in=a,d.marker=o,4!=o?t:(l=i.total_in,c=i.total_out,r(i),i.total_in=l,i.total_out=c,d.mode=7,0)},i.inflateSyncPoint=t=>t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():e}function m(){}return m.prototype={inflateInit(e){const t=this;return t.istate=new y,e||(e=15),t.istate.inflateInit(t,e)},inflate(t){const n=this;return n.istate?n.istate.inflate(n,t):e},inflateEnd(){const t=this;if(!t.istate)return e;const n=t.istate.inflateEnd(t);return t.istate=null,n},inflateSync(){const t=this;return t.istate?t.istate.inflateSync(t):e},inflateSetDictionary(t,n){const i=this;return i.istate?i.istate.inflateSetDictionary(i,t,n):e},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}},function(e){const t=new m,i=e&&e.chunkSize?a.floor(2*e.chunkSize):131072,r=new d(i);let s=!1;t.inflateInit(),t.next_out=r,this.append=(e,a)=>{const o=[];let l,u,f=0,h=0,_=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=i,0!==t.avail_in||s||(t.next_in_index=0,s=!0),l=t.inflate(0),s&&l===n){if(0!==t.avail_in)throw new c("inflating: bad input")}else if(0!==l&&1!==l)throw new c("inflating: "+t.msg);if((s||1===l)&&t.avail_in===e.length)throw new c("inflating: bad input");t.next_out_index&&(t.next_out_index===i?o.push(new d(r)):o.push(r.slice(0,t.next_out_index))),_+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=f&&(a(t.next_in_index),f=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o.length>1?(u=new d(_),o.forEach((e=>{u.set(e,h),h+=e.length}))):u=o[0]||new d,u}},this.flush=()=>{t.inflateEnd()}}})(),D=void 0,E={chunkSize:524288,maxWorkers:void 0!==z&&z.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},A=n.assign({},E);function F(){return A}function U(e){const{baseURL:n,chunkSize:i,maxWorkers:r,terminateWorkerTimeout:a,useCompressionStream:s,useWebWorkers:o,Deflate:l,Inflate:d,workerScripts:u}=e;if(n!==D&&(A.baseURL=n),i!==D&&(A.chunkSize=i),r!==D&&(A.maxWorkers=r),a!==D&&(A.terminateWorkerTimeout=a),s!==D&&(A.useCompressionStream=s),o!==D&&(A.useWebWorkers=o),l!==D&&(A.Deflate=l),d!==D&&(A.Inflate=d),u!==D){const{deflate:e,inflate:n}=u;if((e||n)&&(A.workerScripts||(A.workerScripts={})),e){if(!t.isArray(e))throw new c("workerScripts.deflate must be an array");A.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new c("workerScripts.inflate must be an array");A.workerScripts.inflate=n}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class L{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^C[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class W extends x{constructor(){super({start(){this.crc32=new L},transform(e){this.crc32.append(e)},flush(e){const t=new d(4);new h(t.buffer).setUint32(0,this.crc32.get()),e.enqueue(t)}})}}const I={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=I.getPartial(n);return 32===i?e.concat(t):I._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+I.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,a.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=I.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let r=0;r<e.length;r++)i.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=I.getPartial(r);return i.push(I.partial(t+a&31,t+a>32?n:i.pop(),1)),i}},H={bytes:{fromBits(e){const t=I.bitLength(e)/8,n=new d(t);let i;for(let r=0;t>r;r++)0==(3&r)&&(i=e[r/4]),n[r]=i>>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],3==(3&n)&&(t.push(i),i=0);return 3&n&&t.push(I.partial(8*(3&n),i)),t}}},O={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};O.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=H.utf8String.toBits(e));const n=t._buffer=I.concat(t._buffer,e),i=t._length,r=t._length=i+I.bitLength(e);if(r>9007199254740991)throw new c("Cannot hash more than 2^53 - 1 bits");const a=new f(n);let s=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t},finalize(){const e=this;let t=e._buffer;const n=e._h;t=I.concat(t,[I.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,i)=>e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i,_S:(e,t)=>t<<e|t>>>32-e,_block(e){const n=this,i=n._h,r=t(80);for(let t=0;16>t;t++)r[t]=e[t];let s=i[0],o=i[1],l=i[2],c=i[3],d=i[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,s)+n._f(e,o,l,c)+d+r[e]+n._key[a.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=s,s=t}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+l|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0}};const M={getRandomValues(e){const t=new f(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let i,r=0;r<e.length;r+=4){const e=n(4294967296*(i||a.random()));i=987654071*e(),t[r/4]=4294967296*e()|0}return e}},N={importKey:e=>new N.hmacSha1(H.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new c("invalid params to pbkdf2");const r=1+(i>>5)<<2;let a,s,o,l,d;const u=new ArrayBuffer(r),f=new h(u);let _=0;const w=I;for(t=H.bytes.toBits(t),d=1;(r||1)>_;d++){for(a=s=e.encrypt(w.concat(t,[d])),o=1;n>o;o++)for(s=e.encrypt(s),l=0;l<s.length;l++)a[l]^=s[l];for(o=0;(r||1)>_&&o<a.length;o++)f.setInt32(_,a[o]),_+=4}return u.slice(0,i/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=O.sha1,i=[[],[]],r=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>r&&(e=n.hash(e));for(let t=0;r>t;t++)i[0][t]=909522486^e[t],i[1][t]=1549556828^e[t];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new c("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},q=void 0!==y&&"function"==typeof y.getRandomValues,B="Invalid password";function P(e){return q?y.getRandomValues(e):M.getRandomValues(e)}const V=16,K={name:"PBKDF2"},Z=n.assign({hash:{name:"HMAC"}},K),G=n.assign({iterations:1e3,hash:{name:"SHA-1"}},K),j=["deriveBits"],X=[8,12,16],Y=[16,24,32],J=10,Q=[0,0,0,0],$="undefined",ee="function",te=typeof y!=$,ne=te&&typeof y.subtle!=$,ie=te&&ne&&typeof y.subtle.importKey==ee,re=te&&ne&&typeof y.subtle.deriveBits==ee,ae=H.bytes,se=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],r=e.length;let a,s,o,l=1;if(4!==r&&6!==r&&8!==r)throw new c("invalid aes key size");for(t._key=[s=e.slice(0),o=[]],a=r;4*r+28>a;a++){let e=s[a-1];(a%r==0||8===r&&a%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%r==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^e}for(let e=0;a;e++,a--){const t=s[3&e?a:a-4];o[e]=4>=a||4>e?t:i[0][n[t>>>24]]^i[1][n[t>>16&255]]^i[2][n[t>>8&255]]^i[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],a=[];let s,o,l,c;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new c("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],a=this._tables[t],s=a[0],o=a[1],l=a[2],d=a[3],u=a[4];let f,h,_,w=e[0]^n[0],p=e[t?3:1]^n[1],b=e[2]^n[2],g=e[t?1:3]^n[3],y=4;for(let e=0;i>e;e++)f=s[w>>>24]^o[p>>16&255]^l[b>>8&255]^d[255&g]^n[y],h=s[p>>>24]^o[b>>16&255]^l[g>>8&255]^d[255&w]^n[y+1],_=s[b>>>24]^o[g>>16&255]^l[w>>8&255]^d[255&p]^n[y+2],g=s[g>>>24]^o[w>>16&255]^l[p>>8&255]^d[255&b]^n[y+3],y+=4,w=f,p=h,b=_;for(let e=0;4>e;e++)r[t?3&-e:e]=u[w>>>24]<<24^u[p>>16&255]<<16^u[b>>8&255]<<8^u[255&g]^n[y++],f=w,w=p,p=b,b=g,g=f;return r}},oe=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const r=I.bitLength(t);for(let r=0;i>r;r+=4){this.incCounter(n);const i=e.encrypt(n);t[r]^=i[0],t[r+1]^=i[1],t[r+2]^=i[2],t[r+3]^=i[3]}return I.clamp(t,r)}},le=N.hmacSha1;class ce extends x{constructor(e,i,r){let a;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,signed:i,strength:r-1,pending:new d})},async transform(e,n){const i=this;if(i.password){const n=i.password;i.password=null;const r=_e(e,0,X[i.strength]+2);await(async(e,t,n)=>{await fe(e,n,_e(t,0,X[e.strength]));const i=_e(t,X[e.strength]),r=e.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new c(B)})(i,r,n),i.ctr=new oe(new se(i.keys.key),t.from(Q)),i.hmac=new le(i.keys.authentication),e=_e(e,X[i.strength]+2),i.resolveReady()}else await i.ready;const r=new d(e.length-J-(e.length-J)%V);n.enqueue(ue(i,e,r,0,J,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,i=_e(n,0,n.length-J),r=_e(n,n.length-J);let s=new d;if(i.length){const e=pe(ae,i);t.hmac.update(e);const n=t.ctr.update(e);s=we(ae,n)}if(a.valid=!0,t.signed){const e=_e(we(ae,t.hmac.digest()),0,J);for(let t=0;J>t;t++)e[t]!=r[t]&&(a.valid=!1)}e.enqueue(s)}}),a=this}}class de extends x{constructor(e,i){let r;super({start(){n.assign(this,{ready:new w((e=>this.resolveReady=e)),password:e,strength:i-1,pending:new d})},async transform(e,n){const i=this;let r=new d;if(i.password){const e=i.password;i.password=null,r=await(async(e,t)=>{const n=P(new d(X[e.strength]));return await fe(e,t,n),he(n,e.keys.passwordVerification)})(i,e),i.ctr=new oe(new se(i.keys.key),t.from(Q)),i.hmac=new le(i.keys.authentication),i.resolveReady()}else await i.ready;const a=new d(r.length+e.length-e.length%V);a.set(r,0),n.enqueue(ue(i,e,a,r.length,0))},async flush(e){const t=this;await t.ready;let n=new d;if(t.pending.length){const e=t.ctr.update(pe(ae,t.pending));t.hmac.update(e),n=we(ae,e)}r.signature=we(ae,t.hmac.digest()).slice(0,J),e.enqueue(he(n,r.signature))}}),r=this}}function ue(e,t,n,i,r,a){const s=t.length-r;let o;for(e.pending.length&&(t=he(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new d(t)).set(n,0)}return e})(n,s-s%V)),o=0;s-V>=o;o+=V){const r=pe(ae,_e(t,o,o+V));a&&e.hmac.update(r);const s=e.ctr.update(r);a||e.hmac.update(s),n.set(we(ae,s),o+i)}return e.pending=_e(t,o),n}async function fe(e,t,i){const r=(e=>{if(void 0===p){const t=new d((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new p).encode(e)})(t),a=await((e,t,n,i,r)=>ie?y.subtle.importKey("raw",t,n,!1,r):N.importKey(t))(0,r,Z,0,j),s=await(async(e,t,n)=>re?await y.subtle.deriveBits(e,t,n):N.pbkdf2(t,e.salt,G.iterations,n))(n.assign({salt:i},G),a,8*(2*Y[e.strength]+2)),o=new d(s);e.keys={key:pe(ae,_e(o,0,Y[e.strength])),authentication:pe(ae,_e(o,Y[e.strength],2*Y[e.strength])),passwordVerification:_e(o,2*Y[e.strength])}}function he(e,t){let n=e;return e.length+t.length&&(n=new d(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function _e(e,t,n){return e.subarray(t,n)}function we(e,t){return e.fromBits(t)}function pe(e,t){return e.toBits(t)}class be extends x{constructor(e,t){let i;super({start(){n.assign(this,{password:e,passwordVerification:t}),xe(this,e)},transform(e,t){const n=this;if(n.password){const t=ye(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new c(B);e=e.subarray(12)}t.enqueue(ye(n,e))},flush(){i.valid=!0}}),i=this}}class ge extends x{constructor(e,t){super({start(){n.assign(this,{password:e,passwordVerification:t}),xe(this,e)},transform(e,t){const n=this;let i,r;if(n.password){n.password=null;const t=P(new d(12));t[11]=n.passwordVerification,i=new d(e.length+t.length),i.set(me(n,t),0),r=12}else i=new d(e.length),r=0;i.set(me(n,e),r),t.enqueue(i)},flush(){}})}}function ye(e,t){const n=new d(t.length);for(let i=0;i<t.length;i++)n[i]=ve(e)^t[i],ke(e,n[i]);return n}function me(e,t){const n=new d(t.length);for(let i=0;i<t.length;i++)n[i]=ve(e)^t[i],ke(e,t[i]);return n}function xe(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new L(e.keys[0]),e.crcKey2=new L(e.keys[2]);for(let n=0;n<t.length;n++)ke(e,t.charCodeAt(n))}function ke(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=Se(e.keys[1]+Re(e.keys[0])),e.keys[1]=Se(a.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ve(e){const t=2|e.keys[2];return Re(a.imul(t,1^t)>>>8)}function Re(e){return 255&e}function Se(e){return 4294967295&e}class ze extends x{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const Te="Invalid signature",De="deflate-raw",Ee="undefined",Ae=typeof R==Ee,Fe=typeof S==Ee;let Ue=!0,Ce=!0;class Le extends x{constructor(e,t,{chunkSize:n},...i){super({},...i);const{compressed:r,encrypted:a,useCompressionStream:s,password:o,passwordVerification:l,encryptionStrength:c,zipCrypto:d,signed:u,level:f}=t,_=this;let w,p,b=He(super.readable);if(a&&!d||!u||([b,w]=b.tee(),w=w.pipeThrough(new W)),r)if(void 0!==s&&!s||Ae&&!Ce)b=Ie(e,b,{chunkSize:n,level:f});else try{b=b.pipeThrough(new R(De))}catch(t){Ce=!1,b=Ie(e,b,{chunkSize:n,level:f})}a&&(d?b=b.pipeThrough(new ge(o,l)):(p=new de(o,c),b=b.pipeThrough(p))),Oe(_,b,(async()=>{let e;a&&!d&&(e=p.signature),a&&!d||!u||(e=await w.getReader().read(),e=new h(e.value.buffer).getUint32(0)),_.signature=e}))}}class We extends x{constructor(e,t,{chunkSize:n},...i){super({},...i);const{zipCrypto:r,encrypted:a,password:s,passwordVerification:o,signed:l,encryptionStrength:d,compressed:u,useCompressionStream:f}=t;let _,w,p=He(super.readable);if(a&&(r?p=p.pipeThrough(new be(s,o)):(w=new ce(s,l,d),p=p.pipeThrough(w))),u)if(void 0!==f&&!f||Fe&&!Ue)p=Ie(e,p,{chunkSize:n});else try{p=p.pipeThrough(new S(De))}catch(t){Ue=!1,p=Ie(e,p,{chunkSize:n})}a&&!r||!l||([p,_]=p.tee(),_=_.pipeThrough(new W)),Oe(this,p,(async()=>{if(a&&!r&&!w.valid)throw new c(Te);if((!a||r)&&l){const e=await _.getReader().read(),n=new h(e.value.buffer);if(t.signature!=n.getUint32(0,!1))throw new c(Te)}}))}}function Ie(e,t,n){return t.pipeThrough(new ze(e,n))}function He(e){return e.pipeThrough(new x({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Oe(e,t,i){t=t.pipeThrough(new x({flush:i})),n.defineProperty(e,"readable",{get:()=>t})}const Me="inflate",Ne="data";class qe{constructor(e,t,n,i,r){const{codecType:a}=i;async function s(a){const s=new a(e,i,r);await t.pipeThrough(s).pipeThrough(new x({transform(e,t){e&&e.length&&(n.size+=e.length,t.enqueue(e))}})).pipeTo(n,{preventClose:!0,preventAbort:!0});const{size:o,signature:l}=s;return{size:o,signature:l}}a.startsWith("deflate")?this.run=()=>s(Le):a.startsWith(Me)&&(this.run=()=>s(We))}}let Be,Pe=!0;class Ve{constructor(e,t,i,r){const{readable:a,writable:s}=t,{options:o,config:u,streamOptions:f,webWorker:h,scripts:_,codecConstructor:p}=i;n.assign(e,{busy:!0,codecConstructor:p,readable:a,writable:s,options:n.assign({},o),scripts:_,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,r(e)}});const{signal:b,onstart:g,onprogress:y,size:m,onend:k}=f;let v=0;const R={};return g&&(R.start=()=>Ke(g,m())),R.transform=async(e,t)=>{v+=e.length,y&&await Ke(y,v,m()),t.enqueue(e)},R.flush=()=>{a.size=()=>v,k&&Ke(k,v)},e.readable=a.pipeThrough(new x(R,{highWaterMark:1,size:()=>u.chunkSize}),{signal:b}),void 0===Be&&(Be="undefined"!=typeof Worker),h&&Be?((e,{baseURL:t,chunkSize:i})=>{const r={type:"module"},{readable:a,writable:s}=e;if(n.assign(e,{reader:a.getReader(),writer:s.getWriter(),result:new w(((t,n)=>{e.resolveResult=t,e.rejectResult=n}))}),!e.interface){if(Pe)try{e.worker=o({})}catch(t){Pe=!1,e.worker=o(r)}else e.worker=o(r);e.worker.addEventListener("message",(async t=>{const n=t.data,{reader:i,writer:r,resolveResult:a,rejectResult:s,onTaskFinished:o}=e,{type:l,data:f,messageId:h,result:_}=n,w=n.error;try{if(w){const{message:e,stack:t}=w,n=new c(e);n.stack=t,p(n)}else{if("pull"==l){const{value:e,done:t}=await i.read();u({type:Ne,data:e,done:t,messageId:h})}l==Ne&&(await r.ready,e.writable.size+=f.byteLength,await r.write(new d(f)),u({type:"ack",messageId:h})),"close"==l&&p(null,_)}}catch(e){p(e)}function p(e,t){e?s(e):a(t),r.releaseLock(),o()}}),!1),e.interface={run(){const{options:t}=e;return u({type:"start",scripts:e.scripts.slice(1),options:t,config:{chunkSize:i}}),e.result}}}return e.interface;function o(n){let i,r;i=e.scripts[0],"function"==typeof i&&(i=i());try{r=new l(i,t)}catch(e){r=i}return new Worker(r,n)}function u(t){const{worker:n,writer:i,onTaskFinished:r}=e;try{let{data:e}=t;if(e)try{const{buffer:i,length:r}=e;r!=i.byteLength&&(e=new d(e)),t.data=e.buffer,n.postMessage(t,[t.data])}catch(e){n.postMessage(t)}else n.postMessage(t)}catch(e){throw i.releaseLock(),r(),e}}})(e,u):((e,t)=>{const n=new qe(e.codecConstructor,e.readable,e.writable,e.options,t),{onTaskFinished:i}=e;return{async run(){try{return await n.run()}finally{i()}}}})(e,u)}}async function Ke(e,...t){try{await e(...t)}catch(e){}}let Ze=[];const Ge=[];let je=0;function Xe(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Ye="HTTP error ",Je="HTTP Range not supported",Qe="text/plain",$e="GET",et=65536;class tt{constructor(){this.size=0}init(){this.initialized=!0}}class nt extends tt{get readable(){const e=this,{chunkSize:t=et}=e,n=new k({start(){this.chunkOffset=0},async pull(i){const{offset:r=0,size:s}=n,{chunkOffset:o}=this;i.enqueue(await e.readUint8Array(r+o,a.min(t,s()-o))),o+t>s()?i.close():this.chunkOffset+=t}});return n}}class it extends tt{constructor(){super();const e=this,t=new v({write:t=>e.writeUint8Array(t)});n.defineProperty(e,"writable",{get:()=>t})}writeUint8Array(){}}class rt extends nt{constructor(e){super(),this.blob=e,this.size=e.size}async readUint8Array(e,t){return new d(await this.blob.slice(e,e+t).arrayBuffer())}}class at extends nt{constructor(e,t){super();const i=this;i.url=e,i.preventHeadRequest=t.preventHeadRequest,i.useRangeHeader=t.useRangeHeader,i.forceRangeRequests=t.forceRangeRequests,i.options=t=n.assign({},t),delete t.preventHeadRequest,delete t.useRangeHeader,delete t.forceRangeRequests,delete t.useXHR}async init(){super.init(),await ot(this,wt,ut)}readUint8Array(e,t){return lt(this,e,t,wt,ut)}}class st extends nt{constructor(e,t){super();const n=this;n.url=e,n.preventHeadRequest=t.preventHeadRequest,n.useRangeHeader=t.useRangeHeader,n.forceRangeRequests=t.forceRangeRequests,n.options=t}async init(){super.init(),await ot(this,pt,ft)}readUint8Array(e,t){return lt(this,e,t,pt,ft)}}async function ot(e,t,n){if((e=>{const{baseURL:t}=F(),{protocol:n}=new l(e,t);return"http:"==n||"https:"==n})(e.url)&&(e.useRangeHeader||e.forceRangeRequests)){const i=await t($e,e,ct(e));if(!e.forceRangeRequests&&"bytes"!=i.headers.get("Accept-Ranges"))throw new c(Je);{let r;const a=i.headers.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(r=Number(t))}}void 0===r?await _t(e,t,n):e.size=r}}else await _t(e,t,n)}async function lt(e,t,n,i,r){if(e.useRangeHeader||e.forceRangeRequests){const r=await i($e,e,ct(e,t,n));if(206!=r.status)throw new c(Je);return new d(await r.arrayBuffer())}return e.data||await r(e,e.options),new d(e.data.subarray(t,t+n))}function ct(e,t=0,i=1){return n.assign({},dt(e),{Range:"bytes="+t+"-"+(t+i-1)})}function dt(e){const t=e.options.headers;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function ut(e){await ht(e,wt)}async function ft(e){await ht(e,pt)}async function ht(e,t){const n=await t($e,e,dt(e));e.data=new d(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function _t(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t("HEAD",e,dt(e))).headers.get("Content-Length");i?e.size=Number(i):await n(e,e.options)}}async function wt(e,{options:t,url:i},r){const a=await fetch(i,n.assign({},t,{method:e,headers:r}));if(400>a.status)return a;throw 416==a.status?new c(Je):new c(Ye+(a.statusText||a.status))}function pt(e,{url:t},i){return new w(((r,a)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",(()=>{if(400>s.status){const e=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),r({status:s.status,arrayBuffer:()=>s.response,headers:new o(e)})}else a(416==s.status?new c(Je):new c(Ye+(s.statusText||s.status)))}),!1),s.addEventListener("error",(e=>a(e.detail.error)),!1),s.open(e,t),i)for(const e of n.entries(i))s.setRequestHeader(e[0],e[1]);s.responseType="arraybuffer",s.send()}))}class bt extends nt{constructor(e,t={}){super(),this.url=e,this.reader=t.useXHR?new st(e,t):new at(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}async function gt(e,t){e.init&&!e.initialized&&await e.init(t)}const yt=4294967295,mt=33639248,xt=101075792,kt="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function vt(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;n<e.length;n++)t+=kt[e[n]];return t}})(e):new b(t).decode(e)}const Rt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class St{constructor(e){Rt.forEach((t=>this[t]=e[t]))}}const zt="File format is not recognized",Tt="End of central directory not found",Dt="End of Zip64 central directory not found",Et="End of Zip64 central directory locator not found",At="Central directory header not found",Ft="Local file header not found",Ut="Zip64 extra field not found",Ct="File contains encrypted entry",Lt="Encryption method not supported",Wt="Compression method not supported",It="utf-8",Ht="cp437",Ot=["uncompressedSize","compressedSize","offset"];class Mt{constructor(e,t,i){n.assign(this,{reader:e,config:t,options:i})}async getData(e,t,n={}){const i=this,{reader:r,offset:a,extraFieldAES:s,compressionMethod:o,config:l,bitFlag:d,signature:u,rawLastModDate:f,uncompressedSize:h,compressedSize:_}=i,p=i.localDirectory={};let b=await Jt(r,a,30);const g=Yt(b);let y=Pt(i,n,"password");if(y=y&&y.length&&y,s&&99!=s.originalCompressionMethod)throw new c(Wt);if(0!=o&&8!=o)throw new c(Wt);if(67324752!=jt(g,0))throw new c(Ft);Nt(p,g,4),b=await Jt(r,a,30+p.filenameLength+p.extraFieldLength),p.rawExtraField=b.subarray(30+p.filenameLength),await qt(i,p,g,4),t.lastAccessDate=p.lastAccessDate,t.creationDate=p.creationDate;const m=i.encrypted&&p.encrypted,x=m&&!s;if(m){if(!x&&void 0===s.strength)throw new c(Lt);if(!y)throw new c(Ct)}const k=a+30+p.filenameLength+p.extraFieldLength,v=()=>_,R=r.readable;R.offset=k,R.size=v;const{writable:S}=e;S.size=0;const z=Pt(i,n,"signal");await gt(e,h);const{onstart:T,onprogress:D,onend:E}=n,A={options:{codecType:Me,password:y,zipCrypto:x,encryptionStrength:s&&s.strength,signed:Pt(i,n,"checkSignature"),passwordVerification:x&&(d.dataDescriptor?f>>>8&255:u>>>24&255),signature:u,compressed:0!=o,encrypted:m,useWebWorkers:Pt(i,n,"useWebWorkers"),useCompressionStream:Pt(i,n,"useCompressionStream")},config:l,streamOptions:{signal:z,size:v,onstart:T,onprogress:D,onend:E},codecConstructor:l.Inflate};return await(async(e,t)=>{const{options:n,config:i}=t,r=!n.compressed&&!n.signed&&!n.encrypted,{useWebWorkers:a,useCompressionStream:s,codecType:o}=n,{workerScripts:l}=i;let c;if(t.webWorker=!r&&(a||void 0===a&&i.useWebWorkers),t.scripts=t.webWorker&&l?l[o]:[],n.useCompressionStream=void 0===s?i.useCompressionStream:s,Ze.length<i.maxWorkers){const n={indexWorker:je};je++,Ze.push(n),c=new Ve(n,e,t,d)}else{const n=Ze.find((e=>!e.busy));n?(Xe(n),c=new Ve(n,e,t,d)):c=await new w((n=>Ge.push({resolve:n,stream:e,workerOptions:t})))}return c.run();function d(e){if(Ge.length){const[{resolve:t,stream:n,workerOptions:i}]=Ge.splice(0,1);t(new Ve(e,n,i,d))}else if(e.worker){const{terminateWorkerTimeout:t}=i;Xe(e),Number.isFinite(t)&&t>=0&&(e.terminateTimeout=setTimeout((()=>{Ze=Ze.filter((t=>t!=e)),e.terminate()}),t))}else Ze=Ze.filter((t=>t!=e))}})({readable:R,writable:S},A),Pt(i,n,"preventClose")||await S.getWriter().close(),e.getData?e.getData():S}}function Nt(e,t,i){const r=e.rawBitFlag=Gt(t,i+2),a=1==(1&r),s=jt(t,i+6);n.assign(e,{encrypted:a,version:Gt(t,i),bitFlag:{level:(6&r)>>1,dataDescriptor:8==(8&r),languageEncodingFlag:2048==(2048&r)},rawLastModDate:s,lastModDate:Vt(s),filenameLength:Gt(t,i+22),extraFieldLength:Gt(t,i+24)})}async function qt(e,t,i,r){const{rawExtraField:l}=t,u=t.extraField=new o,f=Yt(new d(l));let h=0;try{for(;h<l.length;){const e=Gt(f,h),t=Gt(f,h+2);u.set(e,{type:e,data:l.slice(h+4,h+4+t)}),h+=4+t}}catch(e){}const _=Gt(i,r+4);t.signature=jt(i,r+10),t.uncompressedSize=jt(i,r+18),t.compressedSize=jt(i,r+14);const w=u.get(1);w&&(((e,t)=>{t.zip64=!0;const n=Yt(e.data);e.values=[];for(let t=0;t<a.floor(e.data.length/8);t++)e.values.push(Xt(n,0+8*t));const i=Ot.filter((e=>t[e]==yt));for(let t=0;t<i.length;t++)e[i[t]]=e.values[t];Ot.forEach((n=>{if(t[n]==yt){if(void 0===e[n])throw new c(Ut);t[n]=e[n]}}))})(w,t),t.extraFieldZip64=w);const p=u.get(28789);p&&(await Bt(p,"filename","rawFilename",t,e),t.extraFieldUnicodePath=p);const b=u.get(25461);b&&(await Bt(b,"comment","rawComment",t,e),t.extraFieldUnicodeComment=b);const g=u.get(39169);g?(((e,t,n)=>{const i=Yt(e.data);e.vendorVersion=Zt(i,0),e.vendorId=Zt(i,2);const r=Zt(i,4);e.strength=r,e.originalCompressionMethod=n,t.compressionMethod=e.compressionMethod=Gt(i,5)})(g,t,_),t.extraFieldAES=g):t.compressionMethod=_;const y=u.get(10);y&&(((e,t)=>{const i=Yt(e.data);let r,a=4;try{for(;a<e.data.length&&!r;){const t=Gt(i,a),n=Gt(i,a+2);1==t&&(r=e.data.slice(a+4,a+4+n)),a+=4+n}}catch(e){}try{if(r&&24==r.length){const i=Yt(r),a=i.getBigUint64(0,!0),s=i.getBigUint64(8,!0),o=i.getBigUint64(16,!0);n.assign(e,{rawLastModDate:a,rawLastAccessDate:s,rawCreationDate:o});const l={lastModDate:Kt(a),lastAccessDate:Kt(s),creationDate:Kt(o)};n.assign(e,l),n.assign(t,l)}}catch(e){}})(y,t),t.extraFieldNTFS=y);const m=u.get(21589);m&&(((e,t)=>{const n=Yt(e.data),i=Zt(n,0),r=[],a=[];1==(1&i)&&(r.push("lastModDate"),a.push("rawLastModDate")),2==(2&i)&&(r.push("lastAccessDate"),a.push("rawLastAccessDate")),4==(4&i)&&(r.push("creationDate"),a.push("rawCreationDate"));let o=1;r.forEach(((i,r)=>{if(e.data.length>=o+4){const l=jt(n,o);t[i]=e[i]=new s(1e3*l);const c=a[r];e[c]=l}o+=4}))})(m,t),t.extraFieldExtendedTimestamp=m)}async function Bt(e,t,n,i,r){const a=Yt(e.data);e.version=Zt(a,0),e.signature=jt(a,1);const s=new L;s.append(r[n]);const o=Yt(new d(4));o.setUint32(0,s.get(),!0),e[t]=await vt(e.data.subarray(5)),e.valid=!r.bitFlag.languageEncodingFlag&&e.signature==jt(o,0),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function Pt(e,t,n){return void 0===t[n]?e.options[n]:t[n]}function Vt(e){const t=(4294901760&e)>>16,n=65535&e;try{return new s(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Kt(e){return new s(Number(e/r(1e4)-r(116444736e5)))}function Zt(e,t){return e.getUint8(t)}function Gt(e,t){return e.getUint16(t,!0)}function jt(e,t){return e.getUint32(t,!0)}function Xt(e,t){return Number(e.getBigUint64(t,!0))}function Yt(e){return new h(e.buffer)}function Jt(e,t,n){return e.readUint8Array(t,n)}U({Inflate:T}),e.BlobReader=rt,e.BlobWriter=class extends tt{constructor(e){super();const t=this;t.contentType=e,t.transformStream=new x,n.defineProperty(t,"writable",{get:()=>t.transformStream.writable})}init(){super.init();const{transformStream:e,contentType:t}=this,n=[];t&&n.push(["content-type",t]),this.blob=new Response(e.readable,{headers:n}).blob()}getData(){return this.blob}},e.Data64URIReader=class extends nt{constructor(e){super();const t=this;t.dataURI=e;let n=e.length;for(;"="==e.charAt(n-1);)n--;t.dataStart=e.indexOf(",")+1,t.size=a.floor(.75*(n-t.dataStart))}readUint8Array(e,t){const n=new d(t),i=4*a.floor(e/3),r=this.dataStart,s=atob(this.dataURI.substring(i+r,4*a.ceil((e+t)/3)+r)),o=e-3*a.floor(i/4);for(let e=o;o+t>e;e++)n[e-o]=s.charCodeAt(e);return n}},e.Data64URIWriter=class extends it{constructor(e){super(),this.data="data:"+(e||"")+";base64,",this.pending=[]}writeUint8Array(e){const t=this;let n=0,r=t.pending;const s=t.pending.length;for(t.pending="",n=0;n<3*a.floor((s+e.length)/3)-s;n++)r+=i.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=i.fromCharCode(e[n]);r.length>2?t.data+=m(r):t.pending=r}getData(){return this.data+m(this.pending)}},e.ERR_BAD_FORMAT=zt,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=At,e.ERR_ENCRYPTED=Ct,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Et,e.ERR_EOCDR_NOT_FOUND=Tt,e.ERR_EOCDR_ZIP64_NOT_FOUND=Dt,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Ut,e.ERR_HTTP_RANGE=Je,e.ERR_INVALID_PASSWORD=B,e.ERR_INVALID_SIGNATURE=Te,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Ft,e.ERR_UNSUPPORTED_COMPRESSION=Wt,e.ERR_UNSUPPORTED_ENCRYPTION=Lt,e.HttpRangeReader=class extends bt{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=bt,e.Reader=nt,e.TextReader=class extends nt{constructor(e){super(),this.blobReader=new rt(new _([e],{type:Qe}))}init(){const e=this;super.init(),e.blobReader.init(),e.size=e.blobReader.size}readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},e.TextWriter=class extends it{constructor(e){super(),this.encoding=e,this.blob=new _([],{type:Qe})}writeUint8Array(e){this.blob=new _([this.blob,e.buffer],{type:Qe})}getData(){const e=this;if(e.blob.text&&(void 0===e.encoding||e.encoding&&"utf-8"==e.encoding.toLowerCase()))return e.blob.text();{const t=new FileReader;return new w(((n,i)=>{t.onload=e=>n(e.target.result),t.onerror=()=>i(t.error),t.readAsText(e.blob,e.encoding)}))}}},e.Uint8ArrayReader=class extends nt{constructor(e){super(),this.array=e,this.size=e.length}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends it{init(e=0){super.init(),this.offset=0,this.array=new d(e)}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new d(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=it,e.ZipReader=class{constructor(e,t={}){n.assign(this,{reader:e,options:t,config:F()})}async*getEntriesGenerator(e={}){const t=this;let{reader:i}=t;const{config:r}=t;if(await gt(i),void 0===i.size||!i.readUint8Array){const e=await new Response(i.readable).blob();i=new rt(e)}if(22>i.size)throw new c(zt);i.chunkSize=(e=>a.max(e.chunkSize,64))(r);const s=await(async(e,t,n)=>{const i=new d(4);return Yt(i).setUint32(0,101010256,!0),await r(22)||await r(a.min(1048582,n));async function r(t){const r=n-t,a=await Jt(e,r,t);for(let e=a.length-22;e>=0;e--)if(a[e]==i[0]&&a[e+1]==i[1]&&a[e+2]==i[2]&&a[e+3]==i[3])return{offset:r+e,buffer:a.slice(e,e+22).buffer}}})(i,0,i.size);if(!s)throw new c(Tt);const o=Yt(s);let l=jt(o,12),u=jt(o,16);const f=s.offset,h=Gt(o,20),_=f+22+h;let p=Gt(o,8),b=0,g=0;if(u==yt||l==yt||65535==p){const e=Yt(await Jt(i,s.offset-20,20));if(117853008!=jt(e,0))throw new c(Dt);u=Xt(e,8);let t=await Jt(i,u,56),n=Yt(t);const r=s.offset-20-56;if(jt(n,0)!=xt&&u!=r){const e=u;u=r,b=u-e,t=await Jt(i,u,56),n=Yt(t)}if(jt(n,0)!=xt)throw new c(Et);p=Xt(n,32),l=Xt(n,40),u-=l}if(0>u||u>=i.size)throw new c(zt);let y=0,m=await Jt(i,u,l),x=Yt(m);if(l){const e=s.offset-l;if(jt(x,y)!=mt&&u!=e){const t=u;u=e,b=u-t,m=await Jt(i,u,l),x=Yt(m)}}if(0>u||u>=i.size)throw new c(zt);const k=Pt(t,e,"filenameEncoding"),v=Pt(t,e,"commentEncoding");for(let s=0;p>s;s++){const o=new Mt(i,r,t.options);if(jt(x,y)!=mt)throw new c(At);Nt(o,x,y+6);const l=!!o.bitFlag.languageEncodingFlag,d=y+46,u=d+o.filenameLength,f=u+o.extraFieldLength,h=Gt(x,y+4),_=0==(0&h);n.assign(o,{versionMadeBy:h,msDosCompatible:_,compressedSize:0,uncompressedSize:0,commentLength:Gt(x,y+32),directory:_&&16==(16&Zt(x,y+38)),offset:jt(x,y+42)+b,internalFileAttribute:Gt(x,y+36),externalFileAttribute:jt(x,y+38),rawFilename:m.subarray(d,u),filenameUTF8:l,commentUTF8:l,rawExtraField:m.subarray(u,f)}),g=a.max(o.offset,g);const R=f+o.commentLength;o.rawComment=m.subarray(f,R);const[S,z]=await w.all([vt(o.rawFilename,o.filenameUTF8?It:k||Ht),vt(o.rawComment,o.commentUTF8?It:v||Ht)]);o.filename=S,o.comment=z,!o.directory&&o.filename.endsWith("/")&&(o.directory=!0),await qt(o,o,x,y+6);const T=new St(o);if(T.getData=(e,t)=>o.getData(e,T,t),y=R,e.onprogress)try{await e.onprogress(s+1,p,new St(o))}catch(e){}yield T}const R=Pt(t,e,"extractPrependedData"),S=Pt(t,e,"extractAppendedData");return R&&(t.prependedData=g>0?await Jt(i,0,g):new d),t.comment=h?await Jt(i,f+22,h):new d,S&&(t.appendedData=_<i.size?await Jt(i,_,i.size-_):new d),!0}async getEntries(e={}){const t=[];for await(const n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}},e.configure=U,e.getMimeType=()=>"application/octet-stream",e.initStream=gt,e.terminateWorkers=()=>{Ze.forEach((e=>{Xe(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})}));
|