Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zip.js/zip.js

Package Overview
Dependencies
Maintainers
2
Versions
275
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zip.js/zip.js - npm Package Compare versions

Comparing version 2.7.25 to 2.7.26

2

dist/zip-no-worker-deflate.min.js

@@ -1,1 +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,Number:s,BigInt:a,Math:i,Date:o,Map:l,Set:c,Response:d,URL:u,Error:f,Uint8Array:p,Uint16Array:h,Uint32Array:w,DataView:g,Blob:m,Promise:_,TextEncoder:y,TextDecoder:b,document:x,crypto:S,btoa:z,TransformStream:k,ReadableStream:v,WritableStream:E,CompressionStream:D,DecompressionStream:R,navigator:T,Worker:F}="undefined"!=typeof globalThis?globalThis:this||self,A=-2;function C(e){return W(e.map((([e,n])=>new t(e).fill(n,0,e))))}function W(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?W(n):n)),[])}const N=[0,1,2,3].concat(...C([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function U(){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,a=e.stat_desc.elems;let o,l,c,d=-1;for(n.heap_len=0,n.heap_max=573,o=0;a>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=i.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=a;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]=i.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,f,p=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,p++),n[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,u=0,a>l||(u=s[l-a]),f=n[2*l],t.opt_len+=f*(d+u),r&&(t.static_len+=f*(r[2*l+1]+u)));if(0!==p){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]--,p-=2}while(p>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 I(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}U._length_code=[0,1,2,3,4,5,6,7].concat(...C([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),U.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],U.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],U.d_code=e=>256>e?N[e]:N[256+(e>>>7)],U.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],U.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],U.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const O=C([[144,8],[112,9],[24,7],[8,8]]);I.static_ltree=W([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,O[t]])));const H=C([[30,5]]);function L(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}I.static_dtree=W([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]]))),I.static_l_desc=new I(I.static_ltree,U.extra_lbits,257,286,15),I.static_d_desc=new I(I.static_dtree,U.extra_dbits,0,30,15),I.static_bl_desc=new I(null,U.extra_blbits,0,19,7);const M=[new L(0,0,0,0,0),new L(4,4,8,4,1),new L(4,5,16,8,1),new L(4,6,32,32,1),new L(4,4,16,16,2),new L(8,16,32,32,2),new L(8,16,128,128,2),new L(8,32,128,256,2),new L(32,128,258,1024,2),new L(32,258,258,4096,2)],B=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],q=113,P=666,V=262;function Z(e,t,n,r){const s=e[2*t],a=e[2*n];return a>s||s==a&&r[t]<=r[n]}function K(){const e=this;let t,n,r,s,a,o,l,c,d,u,f,w,g,m,_,y,b,x,S,z,k,v,E,D,R,T,F,C,W,N,O,H,L;const K=new U,j=new U,X=new U;let Y,G,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)O[2*t]=0;for(t=0;30>t;t++)H[2*t]=0;for(t=0;19>t;t++)L[2*t]=0;O[512]=1,e.opt_len=e.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?L[2*n]+=a:0!==n?(n!=r&&L[2*n]++,L[32]++):a>10?L[36]++:L[34]++,a=0,r=n,0===s?(i=138,o=3):n==s?(i=6,o=3):(i=7,o=4))}function re(t){e.pending_buf[e.pending++]=t}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,L)}while(0!=--i);else 0!==r?(r!=s&&(ie(r,L),i--),ie(16,L),ae(i-3,2)):i>10?(ie(18,L),ae(i-11,7)):(ie(17,L),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(t,n){let r,s,a;if(e.dist_buf[G]=t,e.lc_buf[G]=255&n,G++,0===t?O[2*n]++:(J++,t--,O[2*(U._length_code[n]+256+1)]++,H[2*U.d_code(t)]++),0==(8191&G)&&F>2){for(r=8*G,s=k-b,a=0;30>a;a++)r+=H[2*a]*(5+U.extra_dbits[a]);if(r>>>=3,J<i.floor(G/2)&&r<i.floor(s/2))return!0}return G==Y-1}function de(t,n){let r,s,a,i,o=0;if(0!==G)do{r=e.dist_buf[o],s=e.lc_buf[o],o++,0===r?ie(s,t):(a=U._length_code[s],ie(a+256+1,t),i=U.extra_lbits[a],0!==i&&(s-=U.base_length[a],ae(s,i)),r--,a=U.d_code(r),ie(a,n),i=U.extra_dbits[a],0!==i&&(r-=U.base_dist[a],ae(r,i)))}while(G>o);ie(256,t),Q=t[513]}function ue(){ee>8?se($):ee>0&&re(255&$),$=0,ee=0}function fe(t,n,r){ae(0+(r?1:0),3),((t,n)=>{ue(),Q=8,se(n),se(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function pe(n){((t,n,r)=>{let s,a,i=0;F>0?(K.build_tree(e),j.build_tree(e),i=(()=>{let t;for(ne(O,K.max_code),ne(H,j.max_code),X.build_tree(e),t=18;t>=3&&0===L[2*U.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),s=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a>s||(s=a)):s=a=n+5,n+4>s||-1==t?a==s?(ae(2+(r?1:0),3),de(I.static_ltree,I.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(L[2*U.bl_order[r]+1],3);oe(O,e-1),oe(H,t-1)})(K.max_code+1,j.max_code+1,i+1),de(O,H)):fe(t,n,r),te(),r&&ue()})(0>b?-1:b,k-b,n),b=k,t.flush_pending()}function he(){let e,n,r,s;do{if(s=d-E-k,0===s&&0===k&&0===E)s=a;else if(-1==s)s--;else if(k>=a+a-V){c.set(c.subarray(a,a+a),0),v-=a,k-=a,b-=a,e=g,r=e;do{n=65535&f[--r],f[r]=a>n?0:n-a}while(0!=--e);e=a,r=e;do{n=65535&u[--r],u[r]=a>n?0:n-a}while(0!=--e);s+=a}if(0===t.avail_in)return;e=t.read_buf(c,k+E,s),E+=e,3>E||(w=255&c[k],w=(w<<y^255&c[k+1])&_)}while(V>E&&0!==t.avail_in)}function we(e){let t,n,r=R,s=k,i=D;const o=k>a-V?k-(a-V):0;let d=N;const f=l,p=k+258;let h=c[s+i-1],w=c[s+i];W>D||(r>>=2),d>E&&(d=E);do{if(t=e,c[t+i]==w&&c[t+i-1]==h&&c[t]==c[s]&&c[++t]==c[s+1]){s+=2,t++;do{}while(c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&p>s);if(n=258-(p-s),s=p-258,n>i){if(v=e,i=n,n>=d)break;h=c[s+i-1],w=c[s+i]}}}while((e=65535&u[e&f])>o&&0!=--r);return i>E?E:i}e.depth=[],e.bl_count=[],e.heap=[],O=[],H=[],L=[],e.pqdownheap=(t,n)=>{const r=e.heap,s=r[n];let a=n<<1;for(;a<=e.heap_len&&(a<e.heap_len&&Z(t,r[a+1],r[a],e.depth)&&a++,!Z(t,s,r[a],e.depth));)r[n]=r[a],n=a,a<<=1;r[n]=s},e.deflateInit=(t,S,v,U,B,P)=>(U||(U=8),B||(B=8),P||(P=0),t.msg=null,-1==S&&(S=6),1>B||B>9||8!=U||9>v||v>15||0>S||S>9||0>P||P>2?A:(t.dstate=e,o=v,a=1<<o,l=a-1,m=B+7,g=1<<m,_=g-1,y=i.floor((m+3-1)/3),c=new p(2*a),u=[],f=[],Y=1<<B+6,e.pending_buf=new p(4*Y),r=4*Y,e.dist_buf=new h(Y),e.lc_buf=new p(Y),F=S,C=P,(t=>(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=q,s=0,K.dyn_tree=O,K.stat_desc=I.static_l_desc,j.dyn_tree=H,j.stat_desc=I.static_d_desc,X.dyn_tree=L,X.stat_desc=I.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{d=2*a,f[g-1]=0;for(let e=0;g-1>e;e++)f[e]=0;T=M[F].max_lazy,W=M[F].good_length,N=M[F].nice_length,R=M[F].max_chain,k=0,b=0,E=0,x=D=2,z=0,w=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=q&&n!=P?A:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,f=null,u=null,c=null,e.dstate=null,n==q?-3:0),e.deflateParams=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?A:(M[F].func!=M[t].func&&0!==e.total_in&&(r=e.deflate(1)),F!=t&&(F=t,T=M[F].max_lazy,W=M[F].good_length,N=M[F].nice_length,R=M[F].max_chain),C=n,r)},e.deflateSetDictionary=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return A;if(3>i)return 0;for(i>a-V&&(i=a-V,o=r-i),c.set(t.subarray(o,o+i),0),k=i,b=i,w=255&c[0],w=(w<<y^255&c[1])&_,s=0;i-3>=s;s++)w=(w<<y^255&c[s+2])&_,u[s&l]=f[w],f[w]=s;return 0},e.deflate=(i,d)=>{let p,h,m,R,W;if(d>4||0>d)return A;if(!i.next_out||!i.next_in&&0!==i.avail_in||n==P&&4!=d)return i.msg=B[4],A;if(0===i.avail_out)return i.msg=B[7],-5;var N;if(t=i,R=s,s=d,42==n&&(h=8+(o-8<<4)<<8,m=(F-1&255)>>1,m>3&&(m=3),h|=m<<6,0!==k&&(h|=32),h+=31-h%31,n=q,re((N=h)>>8&255),re(255&N)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return s=-1,0}else if(0===t.avail_in&&R>=d&&4!=d)return t.msg=B[7],-5;if(n==P&&0!==t.avail_in)return i.msg=B[7],-5;if(0!==t.avail_in||0!==E||0!=d&&n!=P){switch(W=-1,M[F].func){case 0:W=(e=>{let n,s=65535;for(s>r-5&&(s=r-5);;){if(1>=E){if(he(),0===E&&0==e)return 0;if(0===E)break}if(k+=E,E=0,n=b+s,(0===k||k>=n)&&(E=k-n,k=n,pe(!1),0===t.avail_out))return 0;if(k-b>=a-V&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 1:W=(e=>{let n,r=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<<y^255&c[k+2])&_,r=65535&f[w],u[k&l]=f[w],f[w]=k),0===r||(k-r&65535)>a-V||2!=C&&(x=we(r)),3>x)n=ce(0,255&c[k]),E--,k++;else if(n=ce(k-v,x-3),E-=x,x>T||3>E)k+=x,x=0,w=255&c[k],w=(w<<y^255&c[k+1])&_;else{x--;do{k++,w=(w<<y^255&c[k+2])&_,r=65535&f[w],u[k&l]=f[w],f[w]=k}while(0!=--x);k++}if(n&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 2:W=(e=>{let n,r,s=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<<y^255&c[k+2])&_,s=65535&f[w],u[k&l]=f[w],f[w]=k),D=x,S=v,x=2,0!==s&&T>D&&a-V>=(k-s&65535)&&(2!=C&&(x=we(s)),5>=x&&(1==C||3==x&&k-v>4096)&&(x=2)),3>D||x>D)if(0!==z){if(n=ce(0,255&c[k-1]),n&&pe(!1),k++,E--,0===t.avail_out)return 0}else z=1,k++,E--;else{r=k+E-3,n=ce(k-1-S,D-3),E-=D-1,D-=2;do{++k>r||(w=(w<<y^255&c[k+2])&_,s=65535&f[w],u[k&l]=f[w],f[w]=k)}while(0!=--D);if(z=0,x=2,k++,n&&(pe(!1),0===t.avail_out))return 0}}return 0!==z&&(n=ce(0,255&c[k-1]),z=0),pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d)}if(2!=W&&3!=W||(n=P),0==W||2==W)return 0===t.avail_out&&(s=-1),0;if(1==W){if(1==d)ae(2,3),ie(256,I.static_ltree),le(),9>1+Q+10-ee&&(ae(2,3),ie(256,I.static_ltree),le()),Q=7;else if(fe(0,0,!1),3==d)for(p=0;g>p;p++)f[p]=0;if(t.flush_pending(),0===t.avail_out)return s=-1,0}}return 4!=d?0:1}}function j(){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}j.prototype={deflateInit(e,t){const n=this;return n.dstate=new K,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):A},deflateEnd(){const e=this;if(!e.dstate)return A;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):A},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):A},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))}};const X=4294967295,Y=65535,G=new o(2107,11,31),J=new o(1980,0,1),Q=void 0,$="undefined",ee="function";class te{constructor(e){return class extends k{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let ne=2;try{typeof T!=$&&T.hardwareConcurrency&&(ne=T.hardwareConcurrency)}catch(e){}const re={chunkSize:524288,maxWorkers:ne,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Q,CompressionStreamNative:typeof D!=$&&D,DecompressionStreamNative:typeof R!=$&&R},se=n.assign({},re);function ae(){return se}function ie(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:a,useCompressionStream:i,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:p}=e;if(oe("baseURL",n),oe("chunkSize",r),oe("maxWorkers",s),oe("terminateWorkerTimeout",a),oe("useCompressionStream",i),oe("useWebWorkers",o),l&&(se.CompressionStream=new te(l)),c&&(se.DecompressionStream=new te(c)),oe("CompressionStream",d),oe("DecompressionStream",u),p!==Q){const{deflate:e,inflate:n}=p;if((e||n)&&(se.workerScripts||(se.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");se.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");se.workerScripts.inflate=n}}}function oe(e,t){t!==Q&&(se[e]=t)}const le=[];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;le[e]=t}class ce{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^le[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class de extends k{constructor(){let e;const t=new ce;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new p(4);new g(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function ue(e){if(void 0===y){const t=new p((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new y).encode(e)}const fe={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=fe.getPartial(n);return 32===r?e.concat(t):fe._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)+fe.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,i.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=fe.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=>i.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=fe.getPartial(s);return r.push(fe.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},pe={bytes:{fromBits(e){const t=fe.bitLength(e)/8,n=new p(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(fe.partial(8*(3&n),r)),t}}},he=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=pe.utf8String.toBits(e));const n=t._buffer=fe.concat(t._buffer,e),r=t._length,s=t._length=r+fe.bitLength(e);if(s>9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new w(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=fe.concat(t,[fe.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(i.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return 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){return 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 a=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,a)+n._f(e,o,l,c)+d+s[e]+n._key[i.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=a,a=t}r[0]=r[0]+a|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}},we={getRandomValues(e){const t=new w(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)*(i.random()>.5?1:-1))};for(let r,s=0;s<e.length;s+=4){const e=n(4294967296*(r||i.random()));r=987654071*e(),t[s/4]=4294967296*e()|0}return e}},ge={importKey:e=>new ge.hmacSha1(pe.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new f("invalid params to pbkdf2");const s=1+(r>>5)<<2;let a,i,o,l,c;const d=new ArrayBuffer(s),u=new g(d);let p=0;const h=fe;for(t=pe.bytes.toBits(t),c=1;(s||1)>p;c++){for(a=i=e.encrypt(h.concat(t,[c])),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++)u.setInt32(p,a[o]),p+=4}return d.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=he,r=[[],[]];t._baseHash=[new n,new n];const s=t._baseHash[0].blockSize/32;e.length>s&&(e=(new n).update(e).finalize());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 f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},me=void 0!==S&&"function"==typeof S.getRandomValues,_e="Invalid password",ye="Invalid signature",be="zipjs-abort-check-password";function xe(e){return me?S.getRandomValues(e):we.getRandomValues(e)}const Se=16,ze={name:"PBKDF2"},ke=n.assign({hash:{name:"HMAC"}},ze),ve=n.assign({iterations:1e3,hash:{name:"SHA-1"}},ze),Ee=["deriveBits"],De=[8,12,16],Re=[16,24,32],Te=10,Fe=[0,0,0,0],Ae="undefined",Ce="function",We=typeof S!=Ae,Ne=We&&S.subtle,Ue=We&&typeof Ne!=Ae,Ie=pe.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 f("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,f=257*s[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 f("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],c=a[3],d=a[4];let u,p,h,w=e[0]^n[0],g=e[t?3:1]^n[1],m=e[2]^n[2],_=e[t?1:3]^n[3],y=4;for(let e=0;r>e;e++)u=i[w>>>24]^o[g>>16&255]^l[m>>8&255]^c[255&_]^n[y],p=i[g>>>24]^o[m>>16&255]^l[_>>8&255]^c[255&w]^n[y+1],h=i[m>>>24]^o[_>>16&255]^l[w>>8&255]^c[255&g]^n[y+2],_=i[_>>>24]^o[w>>16&255]^l[g>>8&255]^c[255&m]^n[y+3],y+=4,w=u,g=p,m=h;for(let e=0;4>e;e++)s[t?3&-e:e]=d[w>>>24]<<24^d[g>>16&255]<<16^d[m>>8&255]<<8^d[255&_]^n[y++],u=w,w=g,g=m,m=_,_=u;return s}},He=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=fe.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 fe.clamp(t,s)}},Le=ge.hmacSha1;let Me=We&&Ue&&typeof Ne.importKey==Ce,Be=We&&Ue&&typeof Ne.deriveBits==Ce;class qe extends k{constructor({password:e,signed:t,encryptionStrength:r,checkPasswordOnly:s}){super({start(){n.assign(this,{ready:new _((e=>this.resolveReady=e)),password:e,signed:t,strength:r-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:a,resolveReady:i,ready:o}=n;r?(await(async(e,t,n,r)=>{const s=await Ze(e,t,n,je(r,0,De[t])),a=je(r,De[t]);if(s[0]!=a[0]||s[1]!=a[1])throw new f(_e)})(n,a,r,je(e,0,De[a]+2)),e=je(e,De[a]+2),s?t.error(new f(be)):i()):await o;const l=new p(e.length-Te-(e.length-Te)%Se);t.enqueue(Ve(n,e,l,0,Te,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:s,ready:a}=this;await a;const i=je(s,0,s.length-Te),o=je(s,s.length-Te);let l=new p;if(i.length){const e=Ye(Ie,i);r.update(e);const t=n.update(e);l=Xe(Ie,t)}if(t){const e=je(Xe(Ie,r.digest()),0,Te);for(let t=0;Te>t;t++)if(e[t]!=o[t])throw new f(ye)}e.enqueue(l)}})}}class Pe extends k{constructor({password:e,encryptionStrength:t}){let r;super({start(){n.assign(this,{ready:new _((e=>this.resolveReady=e)),password:e,strength:t-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:a,ready:i}=n;let o=new p;r?(o=await(async(e,t,n)=>{const r=xe(new p(De[t]));return Ke(r,await Ze(e,t,n,r))})(n,s,r),a()):await i;const l=new p(o.length+e.length-e.length%Se);l.set(o,0),t.enqueue(Ve(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:s,ready:a}=this;await a;let i=new p;if(s.length){const e=t.update(Ye(Ie,s));n.update(e),i=Xe(Ie,e)}r.signature=Xe(Ie,n.digest()).slice(0,Te),e.enqueue(Ke(i,r.signature))}}),r=this}}function Ve(e,t,n,r,s,a){const{ctr:i,hmac:o,pending:l}=e,c=t.length-s;let d;for(l.length&&(t=Ke(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new p(t)).set(n,0)}return e})(n,c-c%Se)),d=0;c-Se>=d;d+=Se){const e=Ye(Ie,je(t,d,d+Se));a&&o.update(e);const s=i.update(e);a||o.update(s),n.set(Xe(Ie,s),d+r)}return e.pending=je(t,d),n}async function Ze(e,r,s,a){e.password=null;const i=ue(s),o=await(async(e,t,n,r,s)=>{if(!Me)return ge.importKey(t);try{return await Ne.importKey("raw",t,n,!1,s)}catch(e){return Me=!1,ge.importKey(t)}})(0,i,ke,0,Ee),l=await(async(e,t,n)=>{if(!Be)return ge.pbkdf2(t,e.salt,ve.iterations,n);try{return await Ne.deriveBits(e,t,n)}catch(r){return Be=!1,ge.pbkdf2(t,e.salt,ve.iterations,n)}})(n.assign({salt:a},ve),o,8*(2*Re[r]+2)),c=new p(l),d=Ye(Ie,je(c,0,Re[r])),u=Ye(Ie,je(c,Re[r],2*Re[r])),f=je(c,2*Re[r]);return n.assign(e,{keys:{key:d,authentication:u,passwordVerification:f},ctr:new He(new Oe(d),t.from(Fe)),hmac:new Le(u)}),f}function Ke(e,t){let n=e;return e.length+t.length&&(n=new p(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function je(e,t,n){return e.subarray(t,n)}function Xe(e,t){return e.fromBits(t)}function Ye(e,t){return e.toBits(t)}class Ge extends k{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;if(n.password){const t=Qe(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new f(_e);e=e.subarray(12)}r?t.error(new f(be)):t.enqueue(Qe(n,e))}})}}class Je extends k{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=xe(new p(12));t[11]=n.passwordVerification,r=new p(e.length+t.length),r.set($e(n,t),0),s=12}else r=new p(e.length),s=0;r.set($e(n,e),s),t.enqueue(r)}})}}function Qe(e,t){const n=new p(t.length);for(let r=0;r<t.length;r++)n[r]=nt(e)^t[r],tt(e,n[r]);return n}function $e(e,t){const n=new p(t.length);for(let r=0;r<t.length;r++)n[r]=nt(e)^t[r],tt(e,t[r]);return n}function et(e,t){const r=[305419896,591751049,878082192];n.assign(e,{keys:r,crcKey0:new ce(r[0]),crcKey2:new ce(r[2])});for(let n=0;n<t.length;n++)tt(e,t.charCodeAt(n))}function tt(e,t){let[n,r,s]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=st(i.imul(st(r+rt(n)),134775813)+1),e.crcKey2.append([r>>>24]),s=~e.crcKey2.get(),e.keys=[n,r,s]}function nt(e){const t=2|e.keys[2];return rt(i.imul(t,1^t)>>>8)}function rt(e){return 255&e}function st(e){return 4294967295&e}const at="deflate-raw";class it extends k{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:a,useCompressionStream:i,zipCrypto:o,signed:l,level:c}=e,d=this;let u,f,p=lt(super.readable);a&&!o||!l||(u=new de,p=ut(p,u)),s&&(p=dt(p,i,{level:c,chunkSize:t},r,n)),a&&(o?p=ut(p,new Je(e)):(f=new Pe(e),p=ut(p,f))),ct(d,p,(()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new g(u.value.buffer).getUint32(0)),d.signature=e}))}}class ot extends k{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:s,encrypted:a,signed:i,signature:o,compressed:l,useCompressionStream:c}=e;let d,u,p=lt(super.readable);a&&(s?p=ut(p,new Ge(e)):(u=new qe(e),p=ut(p,u))),l&&(p=dt(p,c,{chunkSize:t},r,n)),a&&!s||!i||(d=new de,p=ut(p,d)),ct(this,p,(()=>{if((!a||s)&&i){const e=new g(d.value.buffer);if(o!=e.getUint32(0,!1))throw new f(ye)}}))}}function lt(e){return ut(e,new k({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ct(e,t,r){t=ut(t,new k({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function dt(e,t,n,r,s){try{e=ut(e,new(t&&r?r:s)(at,n))}catch(r){if(!t)throw r;e=ut(e,new s(at,n))}return e}function ut(e,t){return e.pipeThrough(t)}const ft="data",pt="deflate";class ht extends k{constructor(e,t){super({});const r=this,{codecType:s}=e;let a;s.startsWith(pt)?a=it:s.startsWith("inflate")&&(a=ot);let i=0;const o=new a(e,t),l=super.readable,c=new k({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){const{signature:e}=o;n.assign(r,{signature:e,size:i})}});n.defineProperty(r,"readable",{get:()=>l.pipeThrough(o).pipeThrough(c)})}}const wt=typeof F!=$;class gt{constructor(e,{readable:t,writable:r},{options:s,config:a,streamOptions:i,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:u}=i;return n.assign(e,{busy:!0,readable:t.pipeThrough(new mt(t,i,a),{signal:u}),writable:r,options:n.assign({},s),scripts:c,transferStreams:l,terminate(){const{worker:t,busy:n}=e;t&&!n&&(t.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,d(e)}}),(o&&wt?bt:yt)(e,a)}}class mt extends k{constructor(e,{onstart:t,onprogress:n,size:r,onend:s},{chunkSize:a}){let i=0;super({start(){t&&_t(t,r)},async transform(e,t){i+=e.length,n&&await _t(n,i,r),t.enqueue(e)},flush(){e.size=i,s&&_t(s,i)}},{highWaterMark:1,size:()=>a})}}async function _t(e,...t){try{await e(...t)}catch(e){}}function yt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},s)=>{const a=new ht(e,s);try{await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:e,size:s}=a;return{signature:e,size:s}}finally{r()}})(e,t)}}function bt(e,{baseURL:t,chunkSize:r}){return e.interface||n.assign(e,{worker:zt(e.scripts[0],t,e),interface:{run:()=>(async(e,t)=>{let r,s;const a=new _(((e,t)=>{r=e,s=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:s,result:a});const{readable:i,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{const t=e.getWriter();let n;const r=new _((e=>n=e));return{writable:new E({async write(e){await t.ready,await t.write(e)},close(){t.releaseLock(),n()},abort:e=>t.abort(e)}),closed:r}})(e.writable);kt({type:"start",scripts:l.slice(1),options:o,config:t,readable:i,writable:c},e)||n.assign(e,{reader:i.getReader(),writer:c.getWriter()});const u=await a;try{await c.getWriter().close()}catch(e){}return await d,u})(e,{chunkSize:r})}}),e.interface}let xt=!0,St=!0;function zt(e,t,r){const s={type:"module"};let a,i;typeof e==ee&&(e=e());try{a=new u(e,t)}catch(t){a=e}if(xt)try{i=new F(a)}catch(e){xt=!1,i=new F(a,s)}else i=new F(a,s);return i.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:s,messageId:a,result:i,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:h}=t;try{if(o){const{message:e,stack:t,code:r,name:s}=o,a=new f(e);n.assign(a,{stack:t,code:r,name:s}),w(a)}else{if("pull"==r){const{value:e,done:n}=await l.read();kt({type:ft,value:e,done:n,messageId:a},t)}r==ft&&(await c.ready,await c.write(new p(s)),kt({type:"ack",messageId:a},t)),"close"==r&&w(null,i)}}catch(o){w(o)}function w(e,t){e?u(e):d(t),c&&c.releaseLock(),h()}})(e,r))),i}function kt(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:s}){try{let{value:n,readable:r,writable:a}=e;const i=[];if(n&&(e.value=n.buffer,i.push(e.value)),s&&St?(r&&i.push(r),a&&i.push(a)):e.readable=e.writable=null,i.length)try{return t.postMessage(e,i),!0}catch(n){St=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),r(),e}}let vt=[];const Et=[];let Dt=0;function Rt(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Tt="HTTP error ",Ft="HTTP Range not supported",At="Writer iterator completed too soon",Ct="GET",Wt="bytes",Nt=65536,Ut="writable";class It{constructor(){this.size=0}init(){this.initialized=!0}}class Ot extends It{get readable(){const e=this,{chunkSize:t=Nt}=e,n=new v({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:a,diskNumberStart:o}=n,{chunkOffset:l}=this;r.enqueue(await on(e,s+l,i.min(t,a-l),o)),l+t>a?r.close():this.chunkOffset+=t}});return n}}class Ht extends It{constructor(){super();const e=this,t=new E({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Ut,{get:()=>t})}writeUint8Array(){}}class Lt extends Ot{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,s=e||r<n.size?n.blob.slice(e,r):n.blob;let a=await s.arrayBuffer();return a.byteLength>t&&(a=a.slice(e,r)),new p(a)}}class Mt extends It{constructor(e){super();const t=new k,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,Ut,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:r}).blob()}getData(){return this.blob}}class Bt extends Ot{constructor(e,t){super(),Pt(this,e,t)}async init(){await Vt(this,Qt,Xt),super.init()}readUint8Array(e,t){return Zt(this,e,t,Qt,Xt)}}class qt extends Ot{constructor(e,t){super(),Pt(this,e,t)}async init(){await Vt(this,$t,Yt),super.init()}readUint8Array(e,t){return Zt(this,e,t,$t,Yt)}}function Pt(e,t,r){const{preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i})}async function Vt(e,t,n){const{url:r,useRangeHeader:a,forceRangeRequests:i}=e;if((e=>{const{baseURL:t}=ae(),{protocol:n}=new u(e,t);return"http:"==n||"https:"==n})(r)&&(a||i)){const{headers:r}=await t(Ct,e,Kt(e));if(!i&&r.get("Accept-Ranges")!=Wt)throw new f(Ft);{let a;const i=r.get("Content-Range");if(i){const e=i.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=s(t))}}a===Q?await Jt(e,t,n):e.size=a}}else await Jt(e,t,n)}async function Zt(e,t,n,r,s){const{useRangeHeader:a,forceRangeRequests:i,options:o}=e;if(a||i){const s=await r(Ct,e,Kt(e,t,n));if(206!=s.status)throw new f(Ft);return new p(await s.arrayBuffer())}{const{data:r}=e;return r||await s(e,o),new p(e.data.subarray(t,t+n))}}function Kt(e,t=0,r=1){return n.assign({},jt(e),{Range:Wt+"="+t+"-"+(t+r-1)})}function jt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Xt(e){await Gt(e,Qt)}async function Yt(e){await Gt(e,$t)}async function Gt(e,t){const n=await t(Ct,e,jt(e));e.data=new p(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Jt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,jt(e))).headers.get("Content-Length");r?e.size=s(r):await n(e,e.options)}}async function Qt(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 f(Ft):new f(Tt+(a.statusText||a.status))}function $t(e,{url:t},r){return new _(((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 l(e)})}else a(416==i.status?new f(Ft):new f(Tt+(i.statusText||i.status)))}),!1),i.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network 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 en extends Ot{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new qt(e,t):new Bt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class tn extends Ot{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await _.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:s}=this;let a,o=n;-1==o&&(o=s.length-1);let l=e;for(;l>=s[o].size;)l-=s[o].size,o++;const c=s[o],d=c.size;if(l+t>d){const s=d-l;a=new p(t),a.set(await on(c,l,s)),a.set(await r.readUint8Array(e+s,t-s,n),s)}else a=await on(c,l,t);return r.lastDiskNumber=i.max(o,r.lastDiskNumber),a}}class nn extends It{constructor(e,t=4294967295){super();const r=this;let s,a,i;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new E({async write(t){const{availableSize:n}=r;if(i)t.length<n?await l(t):(await l(t.slice(0,n)),await c(),r.diskOffset+=s.size,r.diskNumber++,i=null,await this.write(t.slice(n)));else{const{value:n,done:o}=await e.next();if(o&&!n)throw new f(At);s=n,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await rn(s),a=n.writable,i=a.getWriter(),await this.write(t)}},async close(){await i.ready,await c()}});async function l(e){const t=e.length;t&&(await i.ready,await i.write(e),s.size+=t,r.size+=t,r.availableSize-=t)}async function c(){a.size=s.size,await i.close()}n.defineProperty(r,Ut,{get:()=>o})}}async function rn(e,t){e.init&&!e.initialized&&await e.init(t)}function sn(e){return t.isArray(e)&&(e=new tn(e)),e instanceof v&&(e={readable:e}),e}function an(e){e.writable===Q&&typeof e.next==ee&&(e=new nn(e)),e instanceof E&&(e={writable:e});const{writable:t}=e;return t.size===Q&&(t.size=0),e instanceof nn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function on(e,t,n,r){return e.readUint8Array(t,n,r)}const ln=tn,cn=nn,dn="diskNumberStart",un="lastModDate",fn="lastAccessDate",pn="creationDate",hn="internalFileAttribute",wn="externalFileAttribute",gn="msDosCompatible",mn="zip64",_n=["filename","rawFilename","compressedSize","uncompressedSize",un,"rawLastModDate","comment","rawComment",fn,pn,"offset",dn,dn,hn,wn,gn,mn,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class yn{constructor(e){_n.forEach((t=>this[t]=e[t]))}}const bn="File already exists",xn="Zip file comment exceeds 64KB",Sn="File entry comment exceeds 64KB",zn="File entry name exceeds 64KB",kn="Version exceeds 65535",vn="The strength must equal 1, 2, or 3",En="Extra field type exceeds 65535",Dn="Extra field data exceeds 64KB",Rn="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Tn=new p([7,0,2,0,65,69,3,0,0]);let Fn=0;const An=[];async function Cn(e,t){const n=e.getWriter();await n.ready,e.size+=Bn(t),await n.write(t),n.releaseLock()}function Wn(e){if(e)return(a(e.getTime())+a(116444736e5))*a(1e4)}function Nn(e,t,n,r){const s=t[n]===Q?e.options[n]:t[n];return s===Q?r:s}function Un(e,t,n){e.setUint8(t,n)}function In(e,t,n){e.setUint16(t,n,!0)}function On(e,t,n){e.setUint32(t,n,!0)}function Hn(e,t,n){e.setBigUint64(t,n,!0)}function Ln(e,t,n){e.set(t,n)}function Mn(e){return new g(e.buffer)}function Bn(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}ie({Deflate:function(e){const t=new j,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(i.floor(r/16383)+1);var r;const s=new p(n);let a=e?e.level:-1;void 0===a&&(a=-1),t.deflateInit(a),t.next_out=s,this.append=(e,r)=>{let a,i,o=0,l=0,c=0;const d=[];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 f("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?d.push(new p(s)):d.push(s.subarray(0,t.next_out_index))),c+=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 d.length>1?(i=new p(c),d.forEach((e=>{i.set(e,l),l+=e.length}))):i=d[0]?new p(d[0]):new p,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 f("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 p(i),o.forEach((e=>{r.set(e,a),a+=e.length})),r}}}),e.BlobReader=Lt,e.BlobWriter=Mt,e.Data64URIReader=class extends Ot{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:i.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,s=new p(t),a=4*i.floor(e/3),o=atob(r.substring(a+n,4*i.ceil((e+t)/3)+n)),l=e-3*i.floor(a/4);for(let e=l;l+t>e;e++)s[e-l]=o.charCodeAt(e);return s}},e.Data64URIWriter=class extends Ht{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,s=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*i.floor((a+e.length)/3)-a;n++)s+=r.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=r.fromCharCode(e[n]);s.length>2?t.data+=z(s):t.pending=s}getData(){return this.data+z(this.pending)}},e.ERR_DUPLICATED_NAME=bn,e.ERR_HTTP_RANGE=Ft,e.ERR_INVALID_COMMENT=xn,e.ERR_INVALID_ENCRYPTION_STRENGTH=vn,e.ERR_INVALID_ENTRY_COMMENT=Sn,e.ERR_INVALID_ENTRY_NAME=zn,e.ERR_INVALID_EXTRAFIELD_DATA=Dn,e.ERR_INVALID_EXTRAFIELD_TYPE=En,e.ERR_INVALID_VERSION=kn,e.ERR_ITERATOR_COMPLETED_TOO_SOON=At,e.ERR_UNSUPPORTED_FORMAT=Rn,e.HttpRangeReader=class extends en{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=en,e.Reader=Ot,e.SplitDataReader=tn,e.SplitDataWriter=nn,e.SplitZipReader=ln,e.SplitZipWriter=cn,e.TextReader=class extends Lt{constructor(e){super(new m([e],{type:"text/plain"}))}},e.TextWriter=class extends Mt{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new _(((s,a)=>{n.assign(t,{onload:({target:e})=>s(e.result),onerror:()=>a(t.error)}),t.readAsText(r,e)}))}}},e.Uint8ArrayReader=class extends Ot{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends Ht{init(e=0){n.assign(this,{offset:0,array:new p(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new p(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=Ht,e.ZipWriter=class{constructor(e,t={}){e=an(e),n.assign(this,{writer:e,addSplitZipSignature:e instanceof nn,options:t,config:ae(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",r,l={}){const c=this,{pendingAddFileCalls:d,config:u}=c;let m;Fn<u.maxWorkers?Fn++:await new _((e=>An.push(e)));try{if(e=e.trim(),c.filenames.has(e))throw new f(bn);return c.filenames.add(e),m=(async(e,r,l,c)=>{r=r.trim(),c.directory&&!r.endsWith("/")?r+="/":c.directory=r.endsWith("/");const d=ue(r);if(Bn(d)>Y)throw new f(zn);const u=c.comment||"",m=ue(u);if(Bn(m)>Y)throw new f(Sn);const y=Nn(e,c,"version",20);if(y>Y)throw new f(kn);const b=Nn(e,c,"versionMadeBy",20);if(b>Y)throw new f(kn);const x=Nn(e,c,un,new o),S=Nn(e,c,fn),z=Nn(e,c,pn),k=Nn(e,c,gn,!0),v=Nn(e,c,hn,0),E=Nn(e,c,wn,0),D=Nn(e,c,"password"),R=Nn(e,c,"encryptionStrength",3),T=Nn(e,c,"zipCrypto"),F=Nn(e,c,"extendedTimestamp",!0),A=Nn(e,c,"keepOrder",!0),C=Nn(e,c,"level"),W=Nn(e,c,"useWebWorkers"),N=Nn(e,c,"bufferedWrite"),U=Nn(e,c,"dataDescriptorSignature",!1),I=Nn(e,c,"signal"),O=Nn(e,c,"useCompressionStream");let H=Nn(e,c,"dataDescriptor",!0),L=Nn(e,c,mn);if(D!==Q&&R!==Q&&(1>R||R>3))throw new f(vn);let M=new p;const{extraField:B}=c;if(B){let e=0,t=0;B.forEach((t=>e+=4+Bn(t))),M=new p(e),B.forEach(((e,n)=>{if(n>Y)throw new f(En);if(Bn(e)>Y)throw new f(Dn);Ln(M,new h([n]),t),Ln(M,new h([Bn(e)]),t+2),Ln(M,e,t+4),t+=4+Bn(e)}))}let q=0,P=0,V=0;const Z=!0===L;l&&(l=sn(l),await rn(l),l.size===Q?(H=!0,(L||L===Q)&&(L=!0,V=q=X)):(V=l.size,q=(e=>e+5*(i.floor(e/16383)+1))(V)));const{diskOffset:K,diskNumber:j,maxSize:$}=e.writer,ee=Z||V>=X,te=Z||q>=X,ne=Z||e.offset+e.pendingEntriesSize-K>=X,re=Nn(e,c,"supportZip64SplitFile",!0)&&Z||j+i.ceil(e.pendingEntriesSize/$)>=Y;if(ne||ee||te||re){if(!1===L||!A)throw new f(Rn);L=!0}L=L||!1;const se=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:s,password:a,level:o,zip64:l,zipCrypto:c,dataDescriptor:d,directory:u,rawExtraField:f,encryptionStrength:h,extendedTimestamp:g}=e,m=0!==o&&!u,_=!(!a||!Bn(a));let y,b,x,S,z=e.version;if(_&&!c){y=new p(Bn(Tn)+2);const e=Mn(y);In(e,0,39169),Ln(y,Tn,2),Un(e,8,h)}else y=new p;if(g){x=new p(9+(r?4:0)+(s?4:0));const e=Mn(x);In(e,0,21589),In(e,2,Bn(x)-4),S=1+(r?2:0)+(s?4:0),Un(e,4,S);let t=5;On(e,t,i.floor(n.getTime()/1e3)),t+=4,r&&(On(e,t,i.floor(r.getTime()/1e3)),t+=4),s&&On(e,t,i.floor(s.getTime()/1e3));try{b=new p(36);const e=Mn(b),t=Wn(n);In(e,0,10),In(e,2,32),In(e,8,1),In(e,10,24),Hn(e,12,t),Hn(e,20,Wn(r)||t),Hn(e,28,Wn(s)||t)}catch(e){b=new p}}else b=x=new p;let k=2048;d&&(k|=8);let v=0;m&&(v=8),l&&(z=z>45?z:45),_&&(k|=1,c||(z=z>51?z:51,v=99,m&&(y[9]=8)));const E=new p(26),D=Mn(E);In(D,0,z),In(D,2,k),In(D,4,v);const R=new w(1),T=Mn(R);let F;F=J>n?J:n>G?G:n,In(T,0,(F.getHours()<<6|F.getMinutes())<<5|F.getSeconds()/2),In(T,2,(F.getFullYear()-1980<<4|F.getMonth()+1)<<5|F.getDate());const A=R[0];On(D,6,A),In(D,22,Bn(t));const C=Bn(y,x,b,f);In(D,24,C);const W=new p(30+Bn(t)+C);return On(Mn(W),0,67324752),Ln(W,E,4),Ln(W,t,30),Ln(W,y,30+Bn(t)),Ln(W,x,30+Bn(t,y)),Ln(W,b,30+Bn(t,y,x)),Ln(W,f,30+Bn(t,y,x,b)),{localHeaderArray:W,headerArray:E,headerView:D,lastModDate:n,rawLastModDate:A,encrypted:_,compressed:m,version:z,compressionMethod:v,extraFieldExtendedTimestampFlag:S,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:b,rawExtraFieldAES:y,extraFieldLength:C}})(c=n.assign({},c,{rawFilename:d,rawComment:m,version:y,versionMadeBy:b,lastModDate:x,lastAccessDate:S,creationDate:z,rawExtraField:M,zip64:L,zip64UncompressedSize:ee,zip64CompressedSize:te,zip64Offset:ne,zip64DiskNumberStart:re,password:D,level:C,useWebWorkers:W,encryptionStrength:R,extendedTimestamp:F,zipCrypto:T,bufferedWrite:N,keepOrder:A,dataDescriptor:H,dataDescriptorSignature:U,signal:I,msDosCompatible:k,internalFileAttribute:v,externalFileAttribute:E,useCompressionStream:O})),ae=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let s,a=new p,i=0;return n&&(a=new p(t?r?24:20:r?16:12),s=Mn(a),r&&(i=4,On(s,0,134695760))),{dataDescriptorArray:a,dataDescriptorView:s,dataDescriptorOffset:i}})(c),ie=Bn(se.localHeaderArray,ae.dataDescriptorArray);let oe;P=ie+q,e.options.usdz&&(P+=P+64),e.pendingEntriesSize+=P;try{oe=await(async(e,r,o,l,c)=>{const{files:d,writer:u}=e,{keepOrder:h,dataDescriptor:w,signal:m}=c,{headerInfo:y}=l,{usdz:b}=e.options,x=t.from(d.values()).pop();let S,z,k,v,E,D,R={};d.set(r,R);try{let t;h&&(t=x&&x.lock,R.lock=new _((e=>k=e))),!(c.bufferedWrite||e.writerLocked||e.bufferedWrites&&h)&&w||b?(D=u,await T()):(D=new Mt,D.writable.size=0,S=!0,e.bufferedWrites++,await rn(u)),await rn(D);const{writable:y}=u;let{diskOffset:A}=u;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new p(4);On(Mn(t),0,134695760),await Cn(y,t),e.offset+=4}S||(await t,await F(y));const{diskNumber:C}=u;if(E=!0,R.diskNumberStart=C,b&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:s}=n,a=Mn(r),i=64-(t+r.length)%64;4>i&&(i+=64);const o=new p(i),l=Mn(o);In(l,0,6534),In(l,2,i-2);const c=r;n.localHeaderArray=r=new p(c.length+i),Ln(r,c),Ln(r,o,c.length),a=Mn(r),In(a,28,s+i),e.metadataSize+=i})(l,e.offset),R=await(async(e,t,{diskNumberStart:r,lock:o},l,c,d)=>{const{headerInfo:u,dataDescriptorInfo:f,metadataSize:h}=l,{localHeaderArray:w,headerArray:g,lastModDate:m,rawLastModDate:y,encrypted:b,compressed:x,version:S,compressionMethod:z,rawExtraFieldExtendedTimestamp:k,extraFieldExtendedTimestampFlag:v,rawExtraFieldNTFS:E,rawExtraFieldAES:D}=u,{dataDescriptorArray:R}=f,{rawFilename:T,lastAccessDate:F,creationDate:A,password:C,level:W,zip64:N,zip64UncompressedSize:U,zip64CompressedSize:I,zip64Offset:O,zip64DiskNumberStart:H,zipCrypto:L,dataDescriptor:M,directory:B,versionMadeBy:q,rawComment:P,rawExtraField:V,useWebWorkers:Z,onstart:K,onprogress:j,onend:Y,signal:G,encryptionStrength:J,extendedTimestamp:$,msDosCompatible:ee,internalFileAttribute:te,externalFileAttribute:ne,useCompressionStream:re}=d,se={lock:o,versionMadeBy:q,zip64:N,directory:!!B,filenameUTF8:!0,rawFilename:T,commentUTF8:!0,rawComment:P,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:E,rawExtraFieldAES:D,rawExtraField:V,extendedTimestamp:$,msDosCompatible:ee,internalFileAttribute:te,externalFileAttribute:ne,diskNumberStart:r};let ae,ie=0,oe=0;const{writable:le}=t;if(e){e.chunkSize=(e=>i.max(e.chunkSize,64))(c),await Cn(le,w);const t=e.readable,n=t.size=e.size,r={options:{codecType:pt,level:W,password:C,encryptionStrength:J,zipCrypto:b&&L,passwordVerification:b&&L&&y>>8&255,signed:!0,compressed:x,encrypted:b,useWebWorkers:Z,useCompressionStream:re,transferStreams:!1},config:c,streamOptions:{signal:G,size:n,onstart:K,onprogress:j,onend:Y}},a=await(async(e,t)=>{const{options:n,config:r}=t,{transferStreams:a,useWebWorkers:i,useCompressionStream:o,codecType:l,compressed:c,signed:d,encrypted:u}=n,{workerScripts:f,maxWorkers:p,terminateWorkerTimeout:h}=r;t.transferStreams=a||a===Q;const w=!(c||d||u||t.transferStreams);let g;t.useWebWorkers=!w&&(i||i===Q&&r.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[l]:[],n.useCompressionStream=o||o===Q&&r.useCompressionStream;const m=vt.find((e=>!e.busy));if(m)Rt(m),g=new gt(m,e,t,y);else if(vt.length<p){const n={indexWorker:Dt};Dt++,vt.push(n),g=new gt(n,e,t,y)}else g=await new _((n=>Et.push({resolve:n,stream:e,workerOptions:t})));return g.run();function y(e){if(Et.length){const[{resolve:t,stream:n,workerOptions:r}]=Et.splice(0,1);t(new gt(e,n,r,y))}else e.worker?(Rt(e),s.isFinite(h)&&h>=0&&(e.terminateTimeout=setTimeout((()=>{vt=vt.filter((t=>t!=e)),e.terminate()}),h))):vt=vt.filter((t=>t!=e))}})({readable:t,writable:le},r);le.size+=a.size,ae=a.signature,oe=e.size=t.size,ie=a.size}else await Cn(le,w);let ce;if(N){let e=4;U&&(e+=8),I&&(e+=8),O&&(e+=8),H&&(e+=4),ce=new p(e)}else ce=new p;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:i,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:u,dataDescriptorOffset:f}=l,{zip64:p,zip64UncompressedSize:h,zip64CompressedSize:w,zipCrypto:g,dataDescriptor:m}=t;if(d&&!g||n===Q||(On(c,10,n),m&&On(u,f,n)),p){const e=Mn(r);In(e,0,1),In(e,2,r.length-4);let t=4;h&&(On(c,18,X),Hn(e,t,a(i)),t+=8),w&&(On(c,14,X),Hn(e,t,a(s))),m&&(Hn(u,f+4,a(s)),Hn(u,f+12,a(i)))}else On(c,14,s),On(c,18,i),m&&(On(u,f+4,s),On(u,f+8,i))})({signature:ae,rawExtraFieldZip64:ce,compressedSize:ie,uncompressedSize:oe,headerInfo:u,dataDescriptorInfo:f},d),M&&await Cn(le,R),n.assign(se,{uncompressedSize:oe,compressedSize:ie,lastModDate:m,rawLastModDate:y,creationDate:A,lastAccessDate:F,encrypted:b,length:h+ie,compressionMethod:z,version:S,headerArray:g,signature:ae,rawExtraFieldZip64:ce,extraFieldExtendedTimestampFlag:v,zip64UncompressedSize:U,zip64CompressedSize:I,zip64Offset:O,zip64DiskNumberStart:H}),se})(o,D,R,l,e.config,c),E=!1,d.set(r,R),R.filename=r,S){await D.writable.getWriter().close();let e=await D.getData();await t,await T(),v=!0,w||(e=await(async(e,t,n,{zipCrypto:r})=>{let s;s=await t.slice(0,26).arrayBuffer(),26!=s.byteLength&&(s=s.slice(0,26));const a=new g(s);return e.encrypted&&!r||On(a,14,e.signature),e.zip64?(On(a,18,X),On(a,22,X)):(On(a,18,e.compressedSize),On(a,22,e.uncompressedSize)),await Cn(n,new p(s)),t.slice(s.byteLength)})(R,e,y,c)),await F(y),R.diskNumberStart=u.diskNumber,A=u.diskOffset,await e.stream().pipeTo(y,{preventClose:!0,preventAbort:!0,signal:m}),y.size+=e.size,v=!1}if(R.offset=e.offset-A,R.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:s}=e,{zip64UncompressedSize:i,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,d=Mn(n);let u=4;i&&(u+=8),o&&(u+=8),l&&(Hn(d,u,a(r)),u+=8),c&&On(d,u,s)})(R,c);else if(R.offset>=X)throw new f(Rn);return e.offset+=R.length,R}catch(t){if(S&&v||!S&&E){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}S?e.offset+=D.writable.size:e.offset=D.writable.size}throw d.delete(r),t}finally{S&&e.bufferedWrites--,k&&k(),z&&z()}async function T(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new _((t=>z=()=>{e.writerLocked=!1,t()})),await t}async function F(e){y.localHeaderArray.length>u.availableSize&&(u.availableSize=0,await Cn(e,new p))}})(e,r,l,{headerInfo:se,dataDescriptorInfo:ae,metadataSize:ie},c)}finally{e.pendingEntriesSize-=P}return n.assign(oe,{name:r,comment:u,extraField:B}),new yn(oe)})(c,e,r,l),d.add(m),await m}catch(t){throw c.filenames.delete(e),t}finally{d.delete(m);const e=An.shift();e?e():Fn--}}async close(e=new p,n={}){const{pendingAddFileCalls:r,writer:s}=this,{writable:o}=s;for(;r.size;)await _.all(t.from(r));return await(async(e,n,r)=>{const{files:s,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:d}=o,u=0,h=0,w=e.offset-l,g=s.size;for(const[,e]of s){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:s,rawExtraFieldNTFS:a,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:d}=e;let u;if(l){u=new p(9);const e=Mn(u);In(e,0,21589),In(e,2,5),Un(e,4,c),On(e,5,i.floor(d.getTime()/1e3))}else u=new p;e.rawExtraFieldCDExtendedTimestamp=u,h+=46+Bn(t,s,n,r,a,u,o)}const m=new p(h),_=Mn(m);await rn(o);let y=0;for(const[e,n]of t.from(s.values()).entries()){const{offset:t,rawFilename:a,rawExtraFieldZip64:i,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:d,rawExtraFieldNTFS:f,rawExtraField:p,rawComment:h,versionMadeBy:w,headerArray:g,directory:b,zip64:x,zip64UncompressedSize:S,zip64CompressedSize:z,zip64DiskNumberStart:k,zip64Offset:v,msDosCompatible:E,internalFileAttribute:D,externalFileAttribute:R,diskNumberStart:T,uncompressedSize:F,compressedSize:A}=n,C=Bn(i,l,d,f,p);On(_,u,33639248),In(_,u+4,w);const W=Mn(g);S||On(W,18,F),z||On(W,14,A),Ln(m,g,u+6),In(_,u+30,C),In(_,u+32,Bn(h)),In(_,u+34,x&&k?Y:T),In(_,u+36,D),R?On(_,u+38,R):b&&E&&Un(_,u+38,16),On(_,u+42,x&&v?X:t),Ln(m,a,u+46),Ln(m,i,u+46+Bn(a)),Ln(m,l,u+46+Bn(a,i)),Ln(m,d,u+46+Bn(a,i,l)),Ln(m,f,u+46+Bn(a,i,l,d)),Ln(m,p,u+46+Bn(a,i,l,d,f)),Ln(m,h,u+46+Bn(a)+C);const N=46+Bn(a,h)+C;if(u-y>o.availableSize&&(o.availableSize=0,await Cn(c,m.slice(y,u)),y=u),u+=N,r.onprogress)try{await r.onprogress(e+1,s.size,new yn(n))}catch(e){}}await Cn(c,y?m.slice(y):m);let b=o.diskNumber;const{availableSize:x}=o;22>x&&b++;let S=Nn(e,r,"zip64");if(!(X>w&&X>h&&Y>g&&Y>b)){if(!1===S)throw new f(Rn);S=!0}const z=new p(S?98:22),k=Mn(z);u=0,S&&(On(k,0,101075792),Hn(k,4,a(44)),In(k,12,45),In(k,14,45),On(k,16,b),On(k,20,d),Hn(k,24,a(g)),Hn(k,32,a(g)),Hn(k,40,a(h)),Hn(k,48,a(w)),On(k,56,117853008),Hn(k,64,a(w)+a(h)),On(k,72,b+1),Nn(e,r,"supportZip64SplitFile",!0)&&(b=Y,d=Y),g=Y,w=X,h=X,u+=76),On(k,u,101010256),In(k,u+4,b),In(k,u+6,d),In(k,u+8,g),In(k,u+10,g),On(k,u+12,h),On(k,u+16,w);const v=Bn(n);if(v){if(v>Y)throw new f(xn);In(k,u+20,v)}await Cn(c,z),v&&await Cn(c,n)})(this,e,n),Nn(this,n,"preventClose")||await o.getWriter().close(),s.getData?s.getData():o}},e.configure=ie,e.getMimeType=()=>"application/octet-stream",e.initReader=sn,e.initStream=rn,e.initWriter=an,e.readUint8Array=on,e.terminateWorkers=()=>{vt.forEach((e=>{Rt(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})}));
((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,Number:s,BigInt:a,Math:i,Date:o,Map:l,Set:c,Response:d,URL:u,Error:f,Uint8Array:p,Uint16Array:h,Uint32Array:w,DataView:g,Blob:m,Promise:_,TextEncoder:y,TextDecoder:b,document:x,crypto:S,btoa:z,TransformStream:k,ReadableStream:v,WritableStream:E,CompressionStream:D,DecompressionStream:R,navigator:T,Worker:F}="undefined"!=typeof globalThis?globalThis:this||self,A=-2;function C(e){return W(e.map((([e,n])=>new t(e).fill(n,0,e))))}function W(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?W(n):n)),[])}const N=[0,1,2,3].concat(...C([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function U(){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,a=e.stat_desc.elems;let o,l,c,d=-1;for(n.heap_len=0,n.heap_max=573,o=0;a>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=i.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=a;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]=i.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,f,p=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,p++),n[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,u=0,a>l||(u=s[l-a]),f=n[2*l],t.opt_len+=f*(d+u),r&&(t.static_len+=f*(r[2*l+1]+u)));if(0!==p){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]--,p-=2}while(p>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 I(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}U._length_code=[0,1,2,3,4,5,6,7].concat(...C([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),U.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],U.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],U.d_code=e=>256>e?N[e]:N[256+(e>>>7)],U.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],U.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],U.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const O=C([[144,8],[112,9],[24,7],[8,8]]);I.static_ltree=W([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,O[t]])));const H=C([[30,5]]);function L(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}I.static_dtree=W([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]]))),I.static_l_desc=new I(I.static_ltree,U.extra_lbits,257,286,15),I.static_d_desc=new I(I.static_dtree,U.extra_dbits,0,30,15),I.static_bl_desc=new I(null,U.extra_blbits,0,19,7);const M=[new L(0,0,0,0,0),new L(4,4,8,4,1),new L(4,5,16,8,1),new L(4,6,32,32,1),new L(4,4,16,16,2),new L(8,16,32,32,2),new L(8,16,128,128,2),new L(8,32,128,256,2),new L(32,128,258,1024,2),new L(32,258,258,4096,2)],B=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],q=113,P=666,V=262;function Z(e,t,n,r){const s=e[2*t],a=e[2*n];return a>s||s==a&&r[t]<=r[n]}function K(){const e=this;let t,n,r,s,a,o,l,c,d,u,f,w,g,m,_,y,b,x,S,z,k,v,E,D,R,T,F,C,W,N,O,H,L;const K=new U,j=new U,X=new U;let Y,G,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)O[2*t]=0;for(t=0;30>t;t++)H[2*t]=0;for(t=0;19>t;t++)L[2*t]=0;O[512]=1,e.opt_len=e.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?L[2*n]+=a:0!==n?(n!=r&&L[2*n]++,L[32]++):a>10?L[36]++:L[34]++,a=0,r=n,0===s?(i=138,o=3):n==s?(i=6,o=3):(i=7,o=4))}function re(t){e.pending_buf[e.pending++]=t}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,L)}while(0!=--i);else 0!==r?(r!=s&&(ie(r,L),i--),ie(16,L),ae(i-3,2)):i>10?(ie(18,L),ae(i-11,7)):(ie(17,L),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(t,n){let r,s,a;if(e.dist_buf[G]=t,e.lc_buf[G]=255&n,G++,0===t?O[2*n]++:(J++,t--,O[2*(U._length_code[n]+256+1)]++,H[2*U.d_code(t)]++),0==(8191&G)&&F>2){for(r=8*G,s=k-b,a=0;30>a;a++)r+=H[2*a]*(5+U.extra_dbits[a]);if(r>>>=3,J<i.floor(G/2)&&r<i.floor(s/2))return!0}return G==Y-1}function de(t,n){let r,s,a,i,o=0;if(0!==G)do{r=e.dist_buf[o],s=e.lc_buf[o],o++,0===r?ie(s,t):(a=U._length_code[s],ie(a+256+1,t),i=U.extra_lbits[a],0!==i&&(s-=U.base_length[a],ae(s,i)),r--,a=U.d_code(r),ie(a,n),i=U.extra_dbits[a],0!==i&&(r-=U.base_dist[a],ae(r,i)))}while(G>o);ie(256,t),Q=t[513]}function ue(){ee>8?se($):ee>0&&re(255&$),$=0,ee=0}function fe(t,n,r){ae(0+(r?1:0),3),((t,n)=>{ue(),Q=8,se(n),se(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function pe(n){((t,n,r)=>{let s,a,i=0;F>0?(K.build_tree(e),j.build_tree(e),i=(()=>{let t;for(ne(O,K.max_code),ne(H,j.max_code),X.build_tree(e),t=18;t>=3&&0===L[2*U.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),s=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a>s||(s=a)):s=a=n+5,n+4>s||-1==t?a==s?(ae(2+(r?1:0),3),de(I.static_ltree,I.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(L[2*U.bl_order[r]+1],3);oe(O,e-1),oe(H,t-1)})(K.max_code+1,j.max_code+1,i+1),de(O,H)):fe(t,n,r),te(),r&&ue()})(0>b?-1:b,k-b,n),b=k,t.flush_pending()}function he(){let e,n,r,s;do{if(s=d-E-k,0===s&&0===k&&0===E)s=a;else if(-1==s)s--;else if(k>=a+a-V){c.set(c.subarray(a,a+a),0),v-=a,k-=a,b-=a,e=g,r=e;do{n=65535&f[--r],f[r]=a>n?0:n-a}while(0!=--e);e=a,r=e;do{n=65535&u[--r],u[r]=a>n?0:n-a}while(0!=--e);s+=a}if(0===t.avail_in)return;e=t.read_buf(c,k+E,s),E+=e,3>E||(w=255&c[k],w=(w<<y^255&c[k+1])&_)}while(V>E&&0!==t.avail_in)}function we(e){let t,n,r=R,s=k,i=D;const o=k>a-V?k-(a-V):0;let d=N;const f=l,p=k+258;let h=c[s+i-1],w=c[s+i];W>D||(r>>=2),d>E&&(d=E);do{if(t=e,c[t+i]==w&&c[t+i-1]==h&&c[t]==c[s]&&c[++t]==c[s+1]){s+=2,t++;do{}while(c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&p>s);if(n=258-(p-s),s=p-258,n>i){if(v=e,i=n,n>=d)break;h=c[s+i-1],w=c[s+i]}}}while((e=65535&u[e&f])>o&&0!=--r);return i>E?E:i}e.depth=[],e.bl_count=[],e.heap=[],O=[],H=[],L=[],e.pqdownheap=(t,n)=>{const r=e.heap,s=r[n];let a=n<<1;for(;a<=e.heap_len&&(a<e.heap_len&&Z(t,r[a+1],r[a],e.depth)&&a++,!Z(t,s,r[a],e.depth));)r[n]=r[a],n=a,a<<=1;r[n]=s},e.deflateInit=(t,S,v,U,B,P)=>(U||(U=8),B||(B=8),P||(P=0),t.msg=null,-1==S&&(S=6),1>B||B>9||8!=U||9>v||v>15||0>S||S>9||0>P||P>2?A:(t.dstate=e,o=v,a=1<<o,l=a-1,m=B+7,g=1<<m,_=g-1,y=i.floor((m+3-1)/3),c=new p(2*a),u=[],f=[],Y=1<<B+6,e.pending_buf=new p(4*Y),r=4*Y,e.dist_buf=new h(Y),e.lc_buf=new p(Y),F=S,C=P,(t=>(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=q,s=0,K.dyn_tree=O,K.stat_desc=I.static_l_desc,j.dyn_tree=H,j.stat_desc=I.static_d_desc,X.dyn_tree=L,X.stat_desc=I.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{d=2*a,f[g-1]=0;for(let e=0;g-1>e;e++)f[e]=0;T=M[F].max_lazy,W=M[F].good_length,N=M[F].nice_length,R=M[F].max_chain,k=0,b=0,E=0,x=D=2,z=0,w=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=q&&n!=P?A:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,f=null,u=null,c=null,e.dstate=null,n==q?-3:0),e.deflateParams=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?A:(M[F].func!=M[t].func&&0!==e.total_in&&(r=e.deflate(1)),F!=t&&(F=t,T=M[F].max_lazy,W=M[F].good_length,N=M[F].nice_length,R=M[F].max_chain),C=n,r)},e.deflateSetDictionary=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return A;if(3>i)return 0;for(i>a-V&&(i=a-V,o=r-i),c.set(t.subarray(o,o+i),0),k=i,b=i,w=255&c[0],w=(w<<y^255&c[1])&_,s=0;i-3>=s;s++)w=(w<<y^255&c[s+2])&_,u[s&l]=f[w],f[w]=s;return 0},e.deflate=(i,d)=>{let p,h,m,R,W;if(d>4||0>d)return A;if(!i.next_out||!i.next_in&&0!==i.avail_in||n==P&&4!=d)return i.msg=B[4],A;if(0===i.avail_out)return i.msg=B[7],-5;var N;if(t=i,R=s,s=d,42==n&&(h=8+(o-8<<4)<<8,m=(F-1&255)>>1,m>3&&(m=3),h|=m<<6,0!==k&&(h|=32),h+=31-h%31,n=q,re((N=h)>>8&255),re(255&N)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return s=-1,0}else if(0===t.avail_in&&R>=d&&4!=d)return t.msg=B[7],-5;if(n==P&&0!==t.avail_in)return i.msg=B[7],-5;if(0!==t.avail_in||0!==E||0!=d&&n!=P){switch(W=-1,M[F].func){case 0:W=(e=>{let n,s=65535;for(s>r-5&&(s=r-5);;){if(1>=E){if(he(),0===E&&0==e)return 0;if(0===E)break}if(k+=E,E=0,n=b+s,(0===k||k>=n)&&(E=k-n,k=n,pe(!1),0===t.avail_out))return 0;if(k-b>=a-V&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 1:W=(e=>{let n,r=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<<y^255&c[k+2])&_,r=65535&f[w],u[k&l]=f[w],f[w]=k),0===r||(k-r&65535)>a-V||2!=C&&(x=we(r)),3>x)n=ce(0,255&c[k]),E--,k++;else if(n=ce(k-v,x-3),E-=x,x>T||3>E)k+=x,x=0,w=255&c[k],w=(w<<y^255&c[k+1])&_;else{x--;do{k++,w=(w<<y^255&c[k+2])&_,r=65535&f[w],u[k&l]=f[w],f[w]=k}while(0!=--x);k++}if(n&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 2:W=(e=>{let n,r,s=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<<y^255&c[k+2])&_,s=65535&f[w],u[k&l]=f[w],f[w]=k),D=x,S=v,x=2,0!==s&&T>D&&a-V>=(k-s&65535)&&(2!=C&&(x=we(s)),5>=x&&(1==C||3==x&&k-v>4096)&&(x=2)),3>D||x>D)if(0!==z){if(n=ce(0,255&c[k-1]),n&&pe(!1),k++,E--,0===t.avail_out)return 0}else z=1,k++,E--;else{r=k+E-3,n=ce(k-1-S,D-3),E-=D-1,D-=2;do{++k>r||(w=(w<<y^255&c[k+2])&_,s=65535&f[w],u[k&l]=f[w],f[w]=k)}while(0!=--D);if(z=0,x=2,k++,n&&(pe(!1),0===t.avail_out))return 0}}return 0!==z&&(n=ce(0,255&c[k-1]),z=0),pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d)}if(2!=W&&3!=W||(n=P),0==W||2==W)return 0===t.avail_out&&(s=-1),0;if(1==W){if(1==d)ae(2,3),ie(256,I.static_ltree),le(),9>1+Q+10-ee&&(ae(2,3),ie(256,I.static_ltree),le()),Q=7;else if(fe(0,0,!1),3==d)for(p=0;g>p;p++)f[p]=0;if(t.flush_pending(),0===t.avail_out)return s=-1,0}}return 4!=d?0:1}}function j(){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}j.prototype={deflateInit(e,t){const n=this;return n.dstate=new K,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):A},deflateEnd(){const e=this;if(!e.dstate)return A;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):A},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):A},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))}};const X=4294967295,Y=65535,G=new o(2107,11,31),J=new o(1980,0,1),Q=void 0,$="undefined",ee="function";class te{constructor(e){return class extends k{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let ne=2;try{typeof T!=$&&T.hardwareConcurrency&&(ne=T.hardwareConcurrency)}catch(e){}const re={chunkSize:524288,maxWorkers:ne,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Q,CompressionStreamNative:typeof D!=$&&D,DecompressionStreamNative:typeof R!=$&&R},se=n.assign({},re);function ae(){return se}function ie(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:a,useCompressionStream:i,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:p}=e;if(oe("baseURL",n),oe("chunkSize",r),oe("maxWorkers",s),oe("terminateWorkerTimeout",a),oe("useCompressionStream",i),oe("useWebWorkers",o),l&&(se.CompressionStream=new te(l)),c&&(se.DecompressionStream=new te(c)),oe("CompressionStream",d),oe("DecompressionStream",u),p!==Q){const{deflate:e,inflate:n}=p;if((e||n)&&(se.workerScripts||(se.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");se.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");se.workerScripts.inflate=n}}}function oe(e,t){t!==Q&&(se[e]=t)}const le=[];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;le[e]=t}class ce{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^le[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class de extends k{constructor(){let e;const t=new ce;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new p(4);new g(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function ue(e){if(void 0===y){const t=new p((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new y).encode(e)}const fe={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=fe.getPartial(n);return 32===r?e.concat(t):fe._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)+fe.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,i.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=fe.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=>i.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=fe.getPartial(s);return r.push(fe.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},pe={bytes:{fromBits(e){const t=fe.bitLength(e)/8,n=new p(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(fe.partial(8*(3&n),r)),t}}},he=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=pe.utf8String.toBits(e));const n=t._buffer=fe.concat(t._buffer,e),r=t._length,s=t._length=r+fe.bitLength(e);if(s>9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new w(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=fe.concat(t,[fe.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(i.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return 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){return 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 a=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,a)+n._f(e,o,l,c)+d+s[e]+n._key[i.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=a,a=t}r[0]=r[0]+a|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}},we={getRandomValues(e){const t=new w(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)*(i.random()>.5?1:-1))};for(let r,s=0;s<e.length;s+=4){const e=n(4294967296*(r||i.random()));r=987654071*e(),t[s/4]=4294967296*e()|0}return e}},ge={importKey:e=>new ge.hmacSha1(pe.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new f("invalid params to pbkdf2");const s=1+(r>>5)<<2;let a,i,o,l,c;const d=new ArrayBuffer(s),u=new g(d);let p=0;const h=fe;for(t=pe.bytes.toBits(t),c=1;(s||1)>p;c++){for(a=i=e.encrypt(h.concat(t,[c])),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++)u.setInt32(p,a[o]),p+=4}return d.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=he,r=[[],[]];t._baseHash=[new n,new n];const s=t._baseHash[0].blockSize/32;e.length>s&&(e=(new n).update(e).finalize());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 f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},me=void 0!==S&&"function"==typeof S.getRandomValues,_e="Invalid password",ye="Invalid signature",be="zipjs-abort-check-password";function xe(e){return me?S.getRandomValues(e):we.getRandomValues(e)}const Se=16,ze={name:"PBKDF2"},ke=n.assign({hash:{name:"HMAC"}},ze),ve=n.assign({iterations:1e3,hash:{name:"SHA-1"}},ze),Ee=["deriveBits"],De=[8,12,16],Re=[16,24,32],Te=10,Fe=[0,0,0,0],Ae="undefined",Ce="function",We=typeof S!=Ae,Ne=We&&S.subtle,Ue=We&&typeof Ne!=Ae,Ie=pe.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 f("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,f=257*s[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 f("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],c=a[3],d=a[4];let u,p,h,w=e[0]^n[0],g=e[t?3:1]^n[1],m=e[2]^n[2],_=e[t?1:3]^n[3],y=4;for(let e=0;r>e;e++)u=i[w>>>24]^o[g>>16&255]^l[m>>8&255]^c[255&_]^n[y],p=i[g>>>24]^o[m>>16&255]^l[_>>8&255]^c[255&w]^n[y+1],h=i[m>>>24]^o[_>>16&255]^l[w>>8&255]^c[255&g]^n[y+2],_=i[_>>>24]^o[w>>16&255]^l[g>>8&255]^c[255&m]^n[y+3],y+=4,w=u,g=p,m=h;for(let e=0;4>e;e++)s[t?3&-e:e]=d[w>>>24]<<24^d[g>>16&255]<<16^d[m>>8&255]<<8^d[255&_]^n[y++],u=w,w=g,g=m,m=_,_=u;return s}},He=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=fe.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 fe.clamp(t,s)}},Le=ge.hmacSha1;let Me=We&&Ue&&typeof Ne.importKey==Ce,Be=We&&Ue&&typeof Ne.deriveBits==Ce;class qe extends k{constructor({password:e,signed:t,encryptionStrength:r,checkPasswordOnly:s}){super({start(){n.assign(this,{ready:new _((e=>this.resolveReady=e)),password:e,signed:t,strength:r-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:a,resolveReady:i,ready:o}=n;r?(await(async(e,t,n,r)=>{const s=await Ze(e,t,n,je(r,0,De[t])),a=je(r,De[t]);if(s[0]!=a[0]||s[1]!=a[1])throw new f(_e)})(n,a,r,je(e,0,De[a]+2)),e=je(e,De[a]+2),s?t.error(new f(be)):i()):await o;const l=new p(e.length-Te-(e.length-Te)%Se);t.enqueue(Ve(n,e,l,0,Te,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:s,ready:a}=this;await a;const i=je(s,0,s.length-Te),o=je(s,s.length-Te);let l=new p;if(i.length){const e=Ye(Ie,i);r.update(e);const t=n.update(e);l=Xe(Ie,t)}if(t){const e=je(Xe(Ie,r.digest()),0,Te);for(let t=0;Te>t;t++)if(e[t]!=o[t])throw new f(ye)}e.enqueue(l)}})}}class Pe extends k{constructor({password:e,encryptionStrength:t}){let r;super({start(){n.assign(this,{ready:new _((e=>this.resolveReady=e)),password:e,strength:t-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:a,ready:i}=n;let o=new p;r?(o=await(async(e,t,n)=>{const r=xe(new p(De[t]));return Ke(r,await Ze(e,t,n,r))})(n,s,r),a()):await i;const l=new p(o.length+e.length-e.length%Se);l.set(o,0),t.enqueue(Ve(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:s,ready:a}=this;await a;let i=new p;if(s.length){const e=t.update(Ye(Ie,s));n.update(e),i=Xe(Ie,e)}r.signature=Xe(Ie,n.digest()).slice(0,Te),e.enqueue(Ke(i,r.signature))}}),r=this}}function Ve(e,t,n,r,s,a){const{ctr:i,hmac:o,pending:l}=e,c=t.length-s;let d;for(l.length&&(t=Ke(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new p(t)).set(n,0)}return e})(n,c-c%Se)),d=0;c-Se>=d;d+=Se){const e=Ye(Ie,je(t,d,d+Se));a&&o.update(e);const s=i.update(e);a||o.update(s),n.set(Xe(Ie,s),d+r)}return e.pending=je(t,d),n}async function Ze(e,r,s,a){e.password=null;const i=ue(s),o=await(async(e,t,n,r,s)=>{if(!Me)return ge.importKey(t);try{return await Ne.importKey("raw",t,n,!1,s)}catch(e){return Me=!1,ge.importKey(t)}})(0,i,ke,0,Ee),l=await(async(e,t,n)=>{if(!Be)return ge.pbkdf2(t,e.salt,ve.iterations,n);try{return await Ne.deriveBits(e,t,n)}catch(r){return Be=!1,ge.pbkdf2(t,e.salt,ve.iterations,n)}})(n.assign({salt:a},ve),o,8*(2*Re[r]+2)),c=new p(l),d=Ye(Ie,je(c,0,Re[r])),u=Ye(Ie,je(c,Re[r],2*Re[r])),f=je(c,2*Re[r]);return n.assign(e,{keys:{key:d,authentication:u,passwordVerification:f},ctr:new He(new Oe(d),t.from(Fe)),hmac:new Le(u)}),f}function Ke(e,t){let n=e;return e.length+t.length&&(n=new p(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function je(e,t,n){return e.subarray(t,n)}function Xe(e,t){return e.fromBits(t)}function Ye(e,t){return e.toBits(t)}class Ge extends k{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;if(n.password){const t=Qe(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new f(_e);e=e.subarray(12)}r?t.error(new f(be)):t.enqueue(Qe(n,e))}})}}class Je extends k{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),et(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=xe(new p(12));t[11]=n.passwordVerification,r=new p(e.length+t.length),r.set($e(n,t),0),s=12}else r=new p(e.length),s=0;r.set($e(n,e),s),t.enqueue(r)}})}}function Qe(e,t){const n=new p(t.length);for(let r=0;r<t.length;r++)n[r]=nt(e)^t[r],tt(e,n[r]);return n}function $e(e,t){const n=new p(t.length);for(let r=0;r<t.length;r++)n[r]=nt(e)^t[r],tt(e,t[r]);return n}function et(e,t){const r=[305419896,591751049,878082192];n.assign(e,{keys:r,crcKey0:new ce(r[0]),crcKey2:new ce(r[2])});for(let n=0;n<t.length;n++)tt(e,t.charCodeAt(n))}function tt(e,t){let[n,r,s]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=st(i.imul(st(r+rt(n)),134775813)+1),e.crcKey2.append([r>>>24]),s=~e.crcKey2.get(),e.keys=[n,r,s]}function nt(e){const t=2|e.keys[2];return rt(i.imul(t,1^t)>>>8)}function rt(e){return 255&e}function st(e){return 4294967295&e}const at="deflate-raw";class it extends k{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:a,useCompressionStream:i,zipCrypto:o,signed:l,level:c}=e,d=this;let u,f,p=lt(super.readable);a&&!o||!l||(u=new de,p=ut(p,u)),s&&(p=dt(p,i,{level:c,chunkSize:t},r,n)),a&&(o?p=ut(p,new Je(e)):(f=new Pe(e),p=ut(p,f))),ct(d,p,(()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new g(u.value.buffer).getUint32(0)),d.signature=e}))}}class ot extends k{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:s,encrypted:a,signed:i,signature:o,compressed:l,useCompressionStream:c}=e;let d,u,p=lt(super.readable);a&&(s?p=ut(p,new Ge(e)):(u=new qe(e),p=ut(p,u))),l&&(p=dt(p,c,{chunkSize:t},r,n)),a&&!s||!i||(d=new de,p=ut(p,d)),ct(this,p,(()=>{if((!a||s)&&i){const e=new g(d.value.buffer);if(o!=e.getUint32(0,!1))throw new f(ye)}}))}}function lt(e){return ut(e,new k({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ct(e,t,r){t=ut(t,new k({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function dt(e,t,n,r,s){try{e=ut(e,new(t&&r?r:s)(at,n))}catch(r){if(!t)throw r;e=ut(e,new s(at,n))}return e}function ut(e,t){return e.pipeThrough(t)}const ft="data",pt="deflate";class ht extends k{constructor(e,t){super({});const r=this,{codecType:s}=e;let a;s.startsWith(pt)?a=it:s.startsWith("inflate")&&(a=ot);let i=0;const o=new a(e,t),l=super.readable,c=new k({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){const{signature:e}=o;n.assign(r,{signature:e,size:i})}});n.defineProperty(r,"readable",{get:()=>l.pipeThrough(o).pipeThrough(c)})}}const wt=typeof F!=$;class gt{constructor(e,{readable:t,writable:r},{options:s,config:a,streamOptions:i,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:u}=i;return n.assign(e,{busy:!0,readable:t.pipeThrough(new mt(t,i,a),{signal:u}),writable:r,options:n.assign({},s),scripts:c,transferStreams:l,terminate(){const{worker:t,busy:n}=e;t&&!n&&(t.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,d(e)}}),(o&&wt?bt:yt)(e,a)}}class mt extends k{constructor(e,{onstart:t,onprogress:n,size:r,onend:s},{chunkSize:a}){let i=0;super({start(){t&&_t(t,r)},async transform(e,t){i+=e.length,n&&await _t(n,i,r),t.enqueue(e)},flush(){e.size=i,s&&_t(s,i)}},{highWaterMark:1,size:()=>a})}}async function _t(e,...t){try{await e(...t)}catch(e){}}function yt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},s)=>{const a=new ht(e,s);try{await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:e,size:s}=a;return{signature:e,size:s}}finally{r()}})(e,t)}}function bt(e,{baseURL:t,chunkSize:r}){return e.interface||n.assign(e,{worker:zt(e.scripts[0],t,e),interface:{run:()=>(async(e,t)=>{let r,s;const a=new _(((e,t)=>{r=e,s=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:s,result:a});const{readable:i,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{const t=e.getWriter();let n;const r=new _((e=>n=e));return{writable:new E({async write(e){await t.ready,await t.write(e)},close(){t.releaseLock(),n()},abort:e=>t.abort(e)}),closed:r}})(e.writable);kt({type:"start",scripts:l.slice(1),options:o,config:t,readable:i,writable:c},e)||n.assign(e,{reader:i.getReader(),writer:c.getWriter()});const u=await a;try{await c.getWriter().close()}catch(e){}return await d,u})(e,{chunkSize:r})}}),e.interface}let xt=!0,St=!0;function zt(e,t,r){const s={type:"module"};let a,i;typeof e==ee&&(e=e());try{a=new u(e,t)}catch(t){a=e}if(xt)try{i=new F(a)}catch(e){xt=!1,i=new F(a,s)}else i=new F(a,s);return i.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:s,messageId:a,result:i,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:h}=t;try{if(o){const{message:e,stack:t,code:r,name:s}=o,a=new f(e);n.assign(a,{stack:t,code:r,name:s}),w(a)}else{if("pull"==r){const{value:e,done:n}=await l.read();kt({type:ft,value:e,done:n,messageId:a},t)}r==ft&&(await c.ready,await c.write(new p(s)),kt({type:"ack",messageId:a},t)),"close"==r&&w(null,i)}}catch(o){w(o)}function w(e,t){e?u(e):d(t),c&&c.releaseLock(),h()}})(e,r))),i}function kt(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:s}){try{let{value:n,readable:r,writable:a}=e;const i=[];if(n&&(e.value=n.buffer,i.push(e.value)),s&&St?(r&&i.push(r),a&&i.push(a)):e.readable=e.writable=null,i.length)try{return t.postMessage(e,i),!0}catch(n){St=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),r(),e}}let vt=[];const Et=[];let Dt=0;function Rt(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Tt="HTTP error ",Ft="HTTP Range not supported",At="Writer iterator completed too soon",Ct="GET",Wt="bytes",Nt=65536,Ut="writable";class It{constructor(){this.size=0}init(){this.initialized=!0}}class Ot extends It{get readable(){const e=this,{chunkSize:t=Nt}=e,n=new v({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:a,diskNumberStart:o}=n,{chunkOffset:l}=this;r.enqueue(await on(e,s+l,i.min(t,a-l),o)),l+t>a?r.close():this.chunkOffset+=t}});return n}}class Ht extends It{constructor(){super();const e=this,t=new E({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Ut,{get:()=>t})}writeUint8Array(){}}class Lt extends Ot{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,s=e||r<n.size?n.blob.slice(e,r):n.blob;let a=await s.arrayBuffer();return a.byteLength>t&&(a=a.slice(e,r)),new p(a)}}class Mt extends It{constructor(e){super();const t=new k,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,Ut,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:r}).blob()}getData(){return this.blob}}class Bt extends Ot{constructor(e,t){super(),Pt(this,e,t)}async init(){await Vt(this,Qt,Xt),super.init()}readUint8Array(e,t){return Zt(this,e,t,Qt,Xt)}}class qt extends Ot{constructor(e,t){super(),Pt(this,e,t)}async init(){await Vt(this,$t,Yt),super.init()}readUint8Array(e,t){return Zt(this,e,t,$t,Yt)}}function Pt(e,t,r){const{preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i})}async function Vt(e,t,n){const{url:r,useRangeHeader:a,forceRangeRequests:i}=e;if((e=>{const{baseURL:t}=ae(),{protocol:n}=new u(e,t);return"http:"==n||"https:"==n})(r)&&(a||i)){const{headers:r}=await t(Ct,e,Kt(e));if(!i&&r.get("Accept-Ranges")!=Wt)throw new f(Ft);{let a;const i=r.get("Content-Range");if(i){const e=i.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=s(t))}}a===Q?await Jt(e,t,n):e.size=a}}else await Jt(e,t,n)}async function Zt(e,t,n,r,s){const{useRangeHeader:a,forceRangeRequests:i,options:o}=e;if(a||i){const s=await r(Ct,e,Kt(e,t,n));if(206!=s.status)throw new f(Ft);return new p(await s.arrayBuffer())}{const{data:r}=e;return r||await s(e,o),new p(e.data.subarray(t,t+n))}}function Kt(e,t=0,r=1){return n.assign({},jt(e),{Range:Wt+"="+t+"-"+(t+r-1)})}function jt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Xt(e){await Gt(e,Qt)}async function Yt(e){await Gt(e,$t)}async function Gt(e,t){const n=await t(Ct,e,jt(e));e.data=new p(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Jt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,jt(e))).headers.get("Content-Length");r?e.size=s(r):await n(e,e.options)}}async function Qt(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 f(Ft):new f(Tt+(a.statusText||a.status))}function $t(e,{url:t},r){return new _(((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 l(e)})}else a(416==i.status?new f(Ft):new f(Tt+(i.statusText||i.status)))}),!1),i.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network 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 en extends Ot{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new qt(e,t):new Bt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class tn extends Ot{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await _.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:s}=this;let a,o=n;-1==o&&(o=s.length-1);let l=e;for(;l>=s[o].size;)l-=s[o].size,o++;const c=s[o],d=c.size;if(l+t>d){const s=d-l;a=new p(t),a.set(await on(c,l,s)),a.set(await r.readUint8Array(e+s,t-s,n),s)}else a=await on(c,l,t);return r.lastDiskNumber=i.max(o,r.lastDiskNumber),a}}class nn extends It{constructor(e,t=4294967295){super();const r=this;let s,a,i;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new E({async write(t){const{availableSize:n}=r;if(i)t.length<n?await l(t):(await l(t.slice(0,n)),await c(),r.diskOffset+=s.size,r.diskNumber++,i=null,await this.write(t.slice(n)));else{const{value:n,done:o}=await e.next();if(o&&!n)throw new f(At);s=n,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await rn(s),a=n.writable,i=a.getWriter(),await this.write(t)}},async close(){await i.ready,await c()}});async function l(e){const t=e.length;t&&(await i.ready,await i.write(e),s.size+=t,r.size+=t,r.availableSize-=t)}async function c(){a.size=s.size,await i.close()}n.defineProperty(r,Ut,{get:()=>o})}}async function rn(e,t){e.init&&!e.initialized&&await e.init(t)}function sn(e){return t.isArray(e)&&(e=new tn(e)),e instanceof v&&(e={readable:e}),e}function an(e){e.writable===Q&&typeof e.next==ee&&(e=new nn(e)),e instanceof E&&(e={writable:e});const{writable:t}=e;return t.size===Q&&(t.size=0),e instanceof nn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function on(e,t,n,r){return e.readUint8Array(t,n,r)}const ln=tn,cn=nn,dn="diskNumberStart",un="lastModDate",fn="lastAccessDate",pn="creationDate",hn="internalFileAttribute",wn="externalFileAttribute",gn="msDosCompatible",mn="zip64",_n=["filename","rawFilename","compressedSize","uncompressedSize",un,"rawLastModDate","comment","rawComment",fn,pn,"offset",dn,dn,hn,wn,gn,mn,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class yn{constructor(e){_n.forEach((t=>this[t]=e[t]))}}const bn="File already exists",xn="Zip file comment exceeds 64KB",Sn="File entry comment exceeds 64KB",zn="File entry name exceeds 64KB",kn="Version exceeds 65535",vn="The strength must equal 1, 2, or 3",En="Extra field type exceeds 65535",Dn="Extra field data exceeds 64KB",Rn="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Tn=new p([7,0,2,0,65,69,3,0,0]);let Fn=0;const An=[];async function Cn(e,t){const n=e.getWriter();await n.ready,e.size+=Bn(t),await n.write(t),n.releaseLock()}function Wn(e){if(e)return(a(e.getTime())+a(116444736e5))*a(1e4)}function Nn(e,t,n,r){const s=t[n]===Q?e.options[n]:t[n];return s===Q?r:s}function Un(e,t,n){e.setUint8(t,n)}function In(e,t,n){e.setUint16(t,n,!0)}function On(e,t,n){e.setUint32(t,n,!0)}function Hn(e,t,n){e.setBigUint64(t,n,!0)}function Ln(e,t,n){e.set(t,n)}function Mn(e){return new g(e.buffer)}function Bn(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}ie({Deflate:function(e){const t=new j,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(i.floor(r/16383)+1);var r;const s=new p(n);let a=e?e.level:-1;void 0===a&&(a=-1),t.deflateInit(a),t.next_out=s,this.append=(e,r)=>{let a,i,o=0,l=0,c=0;const d=[];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 f("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?d.push(new p(s)):d.push(s.subarray(0,t.next_out_index))),c+=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 d.length>1?(i=new p(c),d.forEach((e=>{i.set(e,l),l+=e.length}))):i=d[0]?new p(d[0]):new p,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 f("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 p(i),o.forEach((e=>{r.set(e,a),a+=e.length})),r}}}),e.BlobReader=Lt,e.BlobWriter=Mt,e.Data64URIReader=class extends Ot{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:i.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,s=new p(t),a=4*i.floor(e/3),o=atob(r.substring(a+n,4*i.ceil((e+t)/3)+n)),l=e-3*i.floor(a/4);for(let e=l;l+t>e;e++)s[e-l]=o.charCodeAt(e);return s}},e.Data64URIWriter=class extends Ht{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,s=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*i.floor((a+e.length)/3)-a;n++)s+=r.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=r.fromCharCode(e[n]);s.length>2?t.data+=z(s):t.pending=s}getData(){return this.data+z(this.pending)}},e.ERR_DUPLICATED_NAME=bn,e.ERR_HTTP_RANGE=Ft,e.ERR_INVALID_COMMENT=xn,e.ERR_INVALID_ENCRYPTION_STRENGTH=vn,e.ERR_INVALID_ENTRY_COMMENT=Sn,e.ERR_INVALID_ENTRY_NAME=zn,e.ERR_INVALID_EXTRAFIELD_DATA=Dn,e.ERR_INVALID_EXTRAFIELD_TYPE=En,e.ERR_INVALID_VERSION=kn,e.ERR_ITERATOR_COMPLETED_TOO_SOON=At,e.ERR_UNSUPPORTED_FORMAT=Rn,e.HttpRangeReader=class extends en{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=en,e.Reader=Ot,e.SplitDataReader=tn,e.SplitDataWriter=nn,e.SplitZipReader=ln,e.SplitZipWriter=cn,e.TextReader=class extends Lt{constructor(e){super(new m([e],{type:"text/plain"}))}},e.TextWriter=class extends Mt{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new _(((s,a)=>{n.assign(t,{onload:({target:e})=>s(e.result),onerror:()=>a(t.error)}),t.readAsText(r,e)}))}}},e.Uint8ArrayReader=class extends Ot{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends Ht{init(e=0){n.assign(this,{offset:0,array:new p(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new p(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=Ht,e.ZipWriter=class{constructor(e,t={}){e=an(e),n.assign(this,{writer:e,addSplitZipSignature:e instanceof nn,options:t,config:ae(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",r,l={}){const c=this,{pendingAddFileCalls:d,config:u}=c;let m;Fn<u.maxWorkers?Fn++:await new _((e=>An.push(e)));try{if(e=e.trim(),c.filenames.has(e))throw new f(bn);return c.filenames.add(e),m=(async(e,r,l,c)=>{r=r.trim(),c.directory&&!r.endsWith("/")?r+="/":c.directory=r.endsWith("/");const d=ue(r);if(Bn(d)>Y)throw new f(zn);const u=c.comment||"",m=ue(u);if(Bn(m)>Y)throw new f(Sn);const y=Nn(e,c,"version",20);if(y>Y)throw new f(kn);const b=Nn(e,c,"versionMadeBy",20);if(b>Y)throw new f(kn);const x=Nn(e,c,un,new o),S=Nn(e,c,fn),z=Nn(e,c,pn),k=Nn(e,c,gn,!0),v=Nn(e,c,hn,0),E=Nn(e,c,wn,0),D=Nn(e,c,"password"),R=Nn(e,c,"encryptionStrength",3),T=Nn(e,c,"zipCrypto"),F=Nn(e,c,"extendedTimestamp",!0),A=Nn(e,c,"keepOrder",!0),C=Nn(e,c,"level"),W=Nn(e,c,"useWebWorkers"),N=Nn(e,c,"bufferedWrite"),U=Nn(e,c,"dataDescriptorSignature",!1),I=Nn(e,c,"signal"),O=Nn(e,c,"useCompressionStream");let H=Nn(e,c,"dataDescriptor",!0),L=Nn(e,c,mn);if(D!==Q&&R!==Q&&(1>R||R>3))throw new f(vn);let M=new p;const{extraField:B}=c;if(B){let e=0,t=0;B.forEach((t=>e+=4+Bn(t))),M=new p(e),B.forEach(((e,n)=>{if(n>Y)throw new f(En);if(Bn(e)>Y)throw new f(Dn);Ln(M,new h([n]),t),Ln(M,new h([Bn(e)]),t+2),Ln(M,e,t+4),t+=4+Bn(e)}))}let q=0,P=0,V=0;const Z=!0===L;l&&(l=sn(l),await rn(l),l.size===Q?(H=!0,(L||L===Q)&&(L=!0,V=q=X)):(V=l.size,q=(e=>e+5*(i.floor(e/16383)+1))(V)));const{diskOffset:K,diskNumber:j,maxSize:$}=e.writer,ee=Z||V>=X,te=Z||q>=X,ne=Z||e.offset+e.pendingEntriesSize-K>=X,re=Nn(e,c,"supportZip64SplitFile",!0)&&Z||j+i.ceil(e.pendingEntriesSize/$)>=Y;if(ne||ee||te||re){if(!1===L||!A)throw new f(Rn);L=!0}L=L||!1;const se=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:s,password:a,level:o,zip64:l,zipCrypto:c,dataDescriptor:d,directory:u,rawExtraField:f,encryptionStrength:h,extendedTimestamp:g}=e,m=0!==o&&!u,_=!(!a||!Bn(a));let y,b,x,S,z=e.version;if(_&&!c){y=new p(Bn(Tn)+2);const e=Mn(y);In(e,0,39169),Ln(y,Tn,2),Un(e,8,h)}else y=new p;if(g){x=new p(9+(r?4:0)+(s?4:0));const e=Mn(x);In(e,0,21589),In(e,2,Bn(x)-4),S=1+(r?2:0)+(s?4:0),Un(e,4,S);let t=5;On(e,t,i.floor(n.getTime()/1e3)),t+=4,r&&(On(e,t,i.floor(r.getTime()/1e3)),t+=4),s&&On(e,t,i.floor(s.getTime()/1e3));try{b=new p(36);const e=Mn(b),t=Wn(n);In(e,0,10),In(e,2,32),In(e,8,1),In(e,10,24),Hn(e,12,t),Hn(e,20,Wn(r)||t),Hn(e,28,Wn(s)||t)}catch(e){b=new p}}else b=x=new p;let k=2048;d&&(k|=8);let v=0;m&&(v=8),l&&(z=z>45?z:45),_&&(k|=1,c||(z=z>51?z:51,v=99,m&&(y[9]=8)));const E=new p(26),D=Mn(E);In(D,0,z),In(D,2,k),In(D,4,v);const R=new w(1),T=Mn(R);let F;F=J>n?J:n>G?G:n,In(T,0,(F.getHours()<<6|F.getMinutes())<<5|F.getSeconds()/2),In(T,2,(F.getFullYear()-1980<<4|F.getMonth()+1)<<5|F.getDate());const A=R[0];On(D,6,A),In(D,22,Bn(t));const C=Bn(y,x,b,f);In(D,24,C);const W=new p(30+Bn(t)+C);return On(Mn(W),0,67324752),Ln(W,E,4),Ln(W,t,30),Ln(W,y,30+Bn(t)),Ln(W,x,30+Bn(t,y)),Ln(W,b,30+Bn(t,y,x)),Ln(W,f,30+Bn(t,y,x,b)),{localHeaderArray:W,headerArray:E,headerView:D,lastModDate:n,rawLastModDate:A,encrypted:_,compressed:m,version:z,compressionMethod:v,extraFieldExtendedTimestampFlag:S,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:b,rawExtraFieldAES:y,extraFieldLength:C}})(c=n.assign({},c,{rawFilename:d,rawComment:m,version:y,versionMadeBy:b,lastModDate:x,lastAccessDate:S,creationDate:z,rawExtraField:M,zip64:L,zip64UncompressedSize:ee,zip64CompressedSize:te,zip64Offset:ne,zip64DiskNumberStart:re,password:D,level:C,useWebWorkers:W,encryptionStrength:R,extendedTimestamp:F,zipCrypto:T,bufferedWrite:N,keepOrder:A,dataDescriptor:H,dataDescriptorSignature:U,signal:I,msDosCompatible:k,internalFileAttribute:v,externalFileAttribute:E,useCompressionStream:O})),ae=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let s,a=new p,i=0;return n&&(a=new p(t?r?24:20:r?16:12),s=Mn(a),r&&(i=4,On(s,0,134695760))),{dataDescriptorArray:a,dataDescriptorView:s,dataDescriptorOffset:i}})(c),ie=Bn(se.localHeaderArray,ae.dataDescriptorArray);let oe;P=ie+q,e.options.usdz&&(P+=P+64),e.pendingEntriesSize+=P;try{oe=await(async(e,r,o,l,c)=>{const{files:d,writer:u}=e,{keepOrder:h,dataDescriptor:w,signal:m}=c,{headerInfo:y}=l,{usdz:b}=e.options,x=t.from(d.values()).pop();let S,z,k,v,E,D,R={};d.set(r,R);try{let t;h&&(t=x&&x.lock,R.lock=new _((e=>k=e))),!(c.bufferedWrite||e.writerLocked||e.bufferedWrites&&h)&&w||b?(D=u,await T()):(D=new Mt,D.writable.size=0,S=!0,e.bufferedWrites++,await rn(u)),await rn(D);const{writable:y}=u;let{diskOffset:A}=u;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new p(4);On(Mn(t),0,134695760),await Cn(y,t),e.offset+=4}S||(await t,await F(y));const{diskNumber:C}=u;if(E=!0,R.diskNumberStart=C,b&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:s}=n,a=Mn(r),i=64-(t+r.length)%64;4>i&&(i+=64);const o=new p(i),l=Mn(o);In(l,0,6534),In(l,2,i-2);const c=r;n.localHeaderArray=r=new p(c.length+i),Ln(r,c),Ln(r,o,c.length),a=Mn(r),In(a,28,s+i),e.metadataSize+=i})(l,e.offset-A),R=await(async(e,t,{diskNumberStart:r,lock:o},l,c,d)=>{const{headerInfo:u,dataDescriptorInfo:f,metadataSize:h}=l,{localHeaderArray:w,headerArray:g,lastModDate:m,rawLastModDate:y,encrypted:b,compressed:x,version:S,compressionMethod:z,rawExtraFieldExtendedTimestamp:k,extraFieldExtendedTimestampFlag:v,rawExtraFieldNTFS:E,rawExtraFieldAES:D}=u,{dataDescriptorArray:R}=f,{rawFilename:T,lastAccessDate:F,creationDate:A,password:C,level:W,zip64:N,zip64UncompressedSize:U,zip64CompressedSize:I,zip64Offset:O,zip64DiskNumberStart:H,zipCrypto:L,dataDescriptor:M,directory:B,versionMadeBy:q,rawComment:P,rawExtraField:V,useWebWorkers:Z,onstart:K,onprogress:j,onend:Y,signal:G,encryptionStrength:J,extendedTimestamp:$,msDosCompatible:ee,internalFileAttribute:te,externalFileAttribute:ne,useCompressionStream:re}=d,se={lock:o,versionMadeBy:q,zip64:N,directory:!!B,filenameUTF8:!0,rawFilename:T,commentUTF8:!0,rawComment:P,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:E,rawExtraFieldAES:D,rawExtraField:V,extendedTimestamp:$,msDosCompatible:ee,internalFileAttribute:te,externalFileAttribute:ne,diskNumberStart:r};let ae,ie=0,oe=0;const{writable:le}=t;if(e){e.chunkSize=(e=>i.max(e.chunkSize,64))(c),await Cn(le,w);const t=e.readable,n=t.size=e.size,r={options:{codecType:pt,level:W,password:C,encryptionStrength:J,zipCrypto:b&&L,passwordVerification:b&&L&&y>>8&255,signed:!0,compressed:x,encrypted:b,useWebWorkers:Z,useCompressionStream:re,transferStreams:!1},config:c,streamOptions:{signal:G,size:n,onstart:K,onprogress:j,onend:Y}},a=await(async(e,t)=>{const{options:n,config:r}=t,{transferStreams:a,useWebWorkers:i,useCompressionStream:o,codecType:l,compressed:c,signed:d,encrypted:u}=n,{workerScripts:f,maxWorkers:p,terminateWorkerTimeout:h}=r;t.transferStreams=a||a===Q;const w=!(c||d||u||t.transferStreams);let g;t.useWebWorkers=!w&&(i||i===Q&&r.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[l]:[],n.useCompressionStream=o||o===Q&&r.useCompressionStream;const m=vt.find((e=>!e.busy));if(m)Rt(m),g=new gt(m,e,t,y);else if(vt.length<p){const n={indexWorker:Dt};Dt++,vt.push(n),g=new gt(n,e,t,y)}else g=await new _((n=>Et.push({resolve:n,stream:e,workerOptions:t})));return g.run();function y(e){if(Et.length){const[{resolve:t,stream:n,workerOptions:r}]=Et.splice(0,1);t(new gt(e,n,r,y))}else e.worker?(Rt(e),s.isFinite(h)&&h>=0&&(e.terminateTimeout=setTimeout((()=>{vt=vt.filter((t=>t!=e)),e.terminate()}),h))):vt=vt.filter((t=>t!=e))}})({readable:t,writable:le},r);le.size+=a.size,ae=a.signature,oe=e.size=t.size,ie=a.size}else await Cn(le,w);let ce;if(N){let e=4;U&&(e+=8),I&&(e+=8),O&&(e+=8),H&&(e+=4),ce=new p(e)}else ce=new p;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:i,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:u,dataDescriptorOffset:f}=l,{zip64:p,zip64UncompressedSize:h,zip64CompressedSize:w,zipCrypto:g,dataDescriptor:m}=t;if(d&&!g||n===Q||(On(c,10,n),m&&On(u,f,n)),p){const e=Mn(r);In(e,0,1),In(e,2,r.length-4);let t=4;h&&(On(c,18,X),Hn(e,t,a(i)),t+=8),w&&(On(c,14,X),Hn(e,t,a(s))),m&&(Hn(u,f+4,a(s)),Hn(u,f+12,a(i)))}else On(c,14,s),On(c,18,i),m&&(On(u,f+4,s),On(u,f+8,i))})({signature:ae,rawExtraFieldZip64:ce,compressedSize:ie,uncompressedSize:oe,headerInfo:u,dataDescriptorInfo:f},d),M&&await Cn(le,R),n.assign(se,{uncompressedSize:oe,compressedSize:ie,lastModDate:m,rawLastModDate:y,creationDate:A,lastAccessDate:F,encrypted:b,length:h+ie,compressionMethod:z,version:S,headerArray:g,signature:ae,rawExtraFieldZip64:ce,extraFieldExtendedTimestampFlag:v,zip64UncompressedSize:U,zip64CompressedSize:I,zip64Offset:O,zip64DiskNumberStart:H}),se})(o,D,R,l,e.config,c),E=!1,d.set(r,R),R.filename=r,S){await D.writable.getWriter().close();let e=await D.getData();await t,await T(),v=!0,w||(e=await(async(e,t,n,{zipCrypto:r})=>{let s;s=await t.slice(0,26).arrayBuffer(),26!=s.byteLength&&(s=s.slice(0,26));const a=new g(s);return e.encrypted&&!r||On(a,14,e.signature),e.zip64?(On(a,18,X),On(a,22,X)):(On(a,18,e.compressedSize),On(a,22,e.uncompressedSize)),await Cn(n,new p(s)),t.slice(s.byteLength)})(R,e,y,c)),await F(y),R.diskNumberStart=u.diskNumber,A=u.diskOffset,await e.stream().pipeTo(y,{preventClose:!0,preventAbort:!0,signal:m}),y.size+=e.size,v=!1}if(R.offset=e.offset-A,R.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:s}=e,{zip64UncompressedSize:i,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,d=Mn(n);let u=4;i&&(u+=8),o&&(u+=8),l&&(Hn(d,u,a(r)),u+=8),c&&On(d,u,s)})(R,c);else if(R.offset>=X)throw new f(Rn);return e.offset+=R.length,R}catch(t){if(S&&v||!S&&E){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}S?e.offset+=D.writable.size:e.offset=D.writable.size}throw d.delete(r),t}finally{S&&e.bufferedWrites--,k&&k(),z&&z()}async function T(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new _((t=>z=()=>{e.writerLocked=!1,t()})),await t}async function F(e){y.localHeaderArray.length>u.availableSize&&(u.availableSize=0,await Cn(e,new p))}})(e,r,l,{headerInfo:se,dataDescriptorInfo:ae,metadataSize:ie},c)}finally{e.pendingEntriesSize-=P}return n.assign(oe,{name:r,comment:u,extraField:B}),new yn(oe)})(c,e,r,l),d.add(m),await m}catch(t){throw c.filenames.delete(e),t}finally{d.delete(m);const e=An.shift();e?e():Fn--}}async close(e=new p,n={}){const{pendingAddFileCalls:r,writer:s}=this,{writable:o}=s;for(;r.size;)await _.all(t.from(r));return await(async(e,n,r)=>{const{files:s,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:d}=o,u=0,h=0,w=e.offset-l,g=s.size;for(const[,e]of s){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:s,rawExtraFieldNTFS:a,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:d}=e;let u;if(l){u=new p(9);const e=Mn(u);In(e,0,21589),In(e,2,5),Un(e,4,c),On(e,5,i.floor(d.getTime()/1e3))}else u=new p;e.rawExtraFieldCDExtendedTimestamp=u,h+=46+Bn(t,s,n,r,a,u,o)}const m=new p(h),_=Mn(m);await rn(o);let y=0;for(const[e,n]of t.from(s.values()).entries()){const{offset:t,rawFilename:a,rawExtraFieldZip64:i,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:d,rawExtraFieldNTFS:f,rawExtraField:p,rawComment:h,versionMadeBy:w,headerArray:g,directory:b,zip64:x,zip64UncompressedSize:S,zip64CompressedSize:z,zip64DiskNumberStart:k,zip64Offset:v,msDosCompatible:E,internalFileAttribute:D,externalFileAttribute:R,diskNumberStart:T,uncompressedSize:F,compressedSize:A}=n,C=Bn(i,l,d,f,p);On(_,u,33639248),In(_,u+4,w);const W=Mn(g);S||On(W,18,F),z||On(W,14,A),Ln(m,g,u+6),In(_,u+30,C),In(_,u+32,Bn(h)),In(_,u+34,x&&k?Y:T),In(_,u+36,D),R?On(_,u+38,R):b&&E&&Un(_,u+38,16),On(_,u+42,x&&v?X:t),Ln(m,a,u+46),Ln(m,i,u+46+Bn(a)),Ln(m,l,u+46+Bn(a,i)),Ln(m,d,u+46+Bn(a,i,l)),Ln(m,f,u+46+Bn(a,i,l,d)),Ln(m,p,u+46+Bn(a,i,l,d,f)),Ln(m,h,u+46+Bn(a)+C);const N=46+Bn(a,h)+C;if(u-y>o.availableSize&&(o.availableSize=0,await Cn(c,m.slice(y,u)),y=u),u+=N,r.onprogress)try{await r.onprogress(e+1,s.size,new yn(n))}catch(e){}}await Cn(c,y?m.slice(y):m);let b=o.diskNumber;const{availableSize:x}=o;22>x&&b++;let S=Nn(e,r,"zip64");if(!(X>w&&X>h&&Y>g&&Y>b)){if(!1===S)throw new f(Rn);S=!0}const z=new p(S?98:22),k=Mn(z);u=0,S&&(On(k,0,101075792),Hn(k,4,a(44)),In(k,12,45),In(k,14,45),On(k,16,b),On(k,20,d),Hn(k,24,a(g)),Hn(k,32,a(g)),Hn(k,40,a(h)),Hn(k,48,a(w)),On(k,56,117853008),Hn(k,64,a(w)+a(h)),On(k,72,b+1),Nn(e,r,"supportZip64SplitFile",!0)&&(b=Y,d=Y),g=Y,w=X,h=X,u+=76),On(k,u,101010256),In(k,u+4,b),In(k,u+6,d),In(k,u+8,g),In(k,u+10,g),On(k,u+12,h),On(k,u+16,w);const v=Bn(n);if(v){if(v>Y)throw new f(xn);In(k,u+20,v)}await Cn(c,z),v&&await Cn(c,n)})(this,e,n),Nn(this,n,"preventClose")||await o.getWriter().close(),s.getData?s.getData():o}},e.configure=ie,e.getMimeType=()=>"application/octet-stream",e.initReader=sn,e.initStream=rn,e.initWriter=an,e.readUint8Array=on,e.terminateWorkers=()=>{vt.forEach((e=>{Rt(e),e.terminate()}))},n.defineProperty(e,"__esModule",{value:!0})}));

@@ -395,3 +395,3 @@ /*

if (usdz) {
appendExtraFieldUSDZ(entryInfo, zipWriter.offset);
appendExtraFieldUSDZ(entryInfo, zipWriter.offset - diskOffset);
}

@@ -398,0 +398,0 @@ fileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);

@@ -6,3 +6,3 @@ {

"license": "BSD-3-Clause",
"version": "2.7.25",
"version": "2.7.26",
"type": "module",

@@ -9,0 +9,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc