@zip.js/zip.js 2.19.0 → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- const t=4294967295,e=65535,r=255,n=67324752,o=134695760,a=o,i=84233040,s=33639248,c=101010256,u=101075792,l=117853008,f=46,d=22,w=20,p=56,m=39169,h=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,x=1024,z="/",D=30,F=new Date(2107,11,31,23,59,58),O=new Date(1980,0,1),U=void 0,I=1/0,T="undefined",k="function",C="object",v="string",M="boolean",N=new Uint8Array,_=Symbol.asyncDispose||Symbol(),j="password",P="rawPassword",B="passThrough",L="signal",W="useWebWorkers",Z="useCompressionStream",V="preventClose",H="level",G="useUnicodeFileNames",q="dataDescriptor",Y="offset",K="usdz",X="maxAppendedDataSize",$="signCentralDirectory",J="entry",Q="filename",tt="comment",et="strict",rt="balanced",nt="tolerant",ot="compressed",at="Invalid option (must be a function)",it="Invalid signal (must be an AbortSignal instance)",st="Invalid password (password must be a string, rawPassword must be a Uint8Array)",ct="Invalid passThrough option (must be a boolean or 'compressed')",ut="The operation was aborted";function lt(t){if(t&&typeof t!=k)throw new Error(at);return t}function ft(t){if(t&&(typeof t.addEventListener!=k||typeof t.aborted!=M))throw new Error(it);return t||U}function dt(t){if(t&&t.aborted)throw t.reason===U?new DOMException(ut,"AbortError"):t.reason}function wt(t,e){if(t&&typeof t!=v||e&&!(e instanceof Uint8Array))throw new Error(st)}function pt(t){if(t!==U&&typeof t!=M&&t!==ot)throw new Error(ct);return t}function mt(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function ht(t,e,r){t!==U&&mt(t,e,r)}function yt(t){return typeof t==v&&t.trim()?Number(t):t}const bt=262144,Et="Invalid maxWorkers (must be an integer greater than 0)",St="Invalid baseURI (must be a string)",gt="Invalid URI (must be a string or a function returning a string)";let At=2;try{typeof navigator!=T&&navigator.hardwareConcurrency&&(At=navigator.hardwareConcurrency)}catch{}const Rt={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:bt,maxWorkers:At,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=T&&CompressionStream,DecompressionStream:typeof DecompressionStream!=T&&DecompressionStream},xt="maxWorkers",zt="baseURI",Dt=["wasmURI","workerURI"],Ft=["chunkSize",xt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],Ot=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],Ut=[zt,...Dt,"useCompressionStream","useWebWorkers","transferStreams",...Ft,...Ot],It={...Rt};function Tt(){return It}function kt(t){return Ct(t.chunkSize)}function Ct(t){return t=yt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):bt}function vt(t){Object.assign(It,Mt(_t(t)))}function Mt(t){const e={};for(const r of Ut){const n=t[r];n!==U&&(e[r]=Nt(r,n))}return e}function Nt(t,e){if(Ft.includes(t)){if(e=yt(e),t==xt&&(!Number.isInteger(e)||e<1))throw new Error(Et)}else if(Ot.includes(t))lt(e);else if(t==zt){if(e&&typeof e!=v)throw new Error(St)}else if(Dt.includes(t)&&e&&typeof e!=v&&typeof e!=k)throw new Error(gt);return e}function _t(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===U&&r===U)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===U&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===U&&(n.DecompressionStreamFallback=r),n}function jt(t){const e=Mt(_t(t));Object.assign(Rt,e),Object.assign(It,e)}function Pt(){for(const t of Ut)delete It[t];Object.assign(It,Rt)}function Bt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Lt(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Wt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Zt(t){return Boolean(t)&&"object"==typeof t}const Vt=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;Vt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Vt[e-1][t];Vt[e][t]=r>>>8^Vt[0][255&r]}const[Ht,Gt,qt,Yt,Kt,Xt,$t,Jt]=Vt;class Qt{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),a=r-8;for(;n<=a;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=Jt[255&t]^$t[t>>>8&255]^Xt[t>>>16&255]^Kt[t>>>24&255]^Yt[255&r]^qt[r>>>8&255]^Gt[r>>>16&255]^Ht[r>>>24&255]}}for(;n<r;n++)e=e>>>8^Ht[255&(e^t[n])];this.o=e}get(){return~this.o}}class te extends TransformStream{constructor(){let t;const e=new Qt;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function ee(t){if(typeof TextEncoder==T){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const re=64,ne=20,oe=new Uint8Array([128]),ae=new Uint8Array(1),ie=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),se=new Uint8Array(256),ce=new Int32Array(256),ue=new Int32Array(256),le=new Int32Array(256),fe=new Int32Array(256);let de=!1;function we(t,e){!function(){if(!de){let t=1,e=1;do{t=255&(t^t<<1^(128&t?27:0)),e=255&(e^e<<1),e=255&(e^e<<2),e=255&(e^e<<4),128&e&&(e^=9),se[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);se[0]=99;for(let t=0;t<256;t++){const e=se[t],r=ye(e),n=r<<24|e<<16|e<<8|r^e;ce[t]=n,ue[t]=n>>>8|n<<24,le[t]=n>>>16|n<<16,fe[t]=n>>>24|n<<8}de=!0}}();const r=new Int32Array(60),n=function(t,e){const r=t.length>>2,n=r+6,o=4*(n+1);let a=1;for(let n=0;n<r;n++)e[n]=t[4*n]<<24|t[4*n+1]<<16|t[4*n+2]<<8|t[4*n+3];for(let t=r;t<o;t++){let n=e[t-1];t%r==0?(n=me(n<<8|n>>>24)^a<<24,a=ye(a)):r>6&&t%r==4&&(n=me(n)),e[t]=e[t-r]^n}return n}(t,r),o=new Int32Array(4),a=pe(e);let i=0,s=0,c=0,u=0;return{process(t,e){e&&a.update(t,0,t.length),function(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=t.length;let n=0;for(;n+16<=r;n+=16)l(),e.setInt32(n,e.getInt32(n)^o[0]),e.setInt32(n+4,e.getInt32(n+4)^o[1]),e.setInt32(n+8,e.getInt32(n+8)^o[2]),e.setInt32(n+12,e.getInt32(n+12)^o[3]);if(n<r){l();for(let e=0;n<r;n++,e++)t[n]^=o[e>>2]>>>24-8*(3&e)}}(t),e||a.update(t,0,t.length)},digest:()=>a.digest()};function l(){i=i+1|0,i||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=he(i)^r[0],e=he(s)^r[1],a=he(c)^r[2],l=he(u)^r[3],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[4],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[5],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[6],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[7];t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[8],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[9],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[10],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[11],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[12],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[13],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[14],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[15],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[16],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[17],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[18],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[19],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[20],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[21],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[22],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[23],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[24],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[25],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[26],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[27],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[28],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[29],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[30],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[31],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[32],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[33],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[34],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[35],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[36],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[37],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[38],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[39];let m=40;n>10&&(t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[40],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[41],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[42],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[43],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[44],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[45],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[46],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[47],m=48),n>12&&(t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[48],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[49],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[50],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[51],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[52],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[53],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[54],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[55],m=56),o[0]=(se[f>>>24]<<24|se[d>>>16&255]<<16|se[w>>>8&255]<<8|se[255&p])^r[m],o[1]=(se[d>>>24]<<24|se[w>>>16&255]<<16|se[p>>>8&255]<<8|se[255&f])^r[m+1],o[2]=(se[w>>>24]<<24|se[p>>>16&255]<<16|se[f>>>8&255]<<8|se[255&d])^r[m+2],o[3]=(se[p>>>24]<<24|se[f>>>16&255]<<16|se[d>>>8&255]<<8|se[255&w])^r[m+3]}}function pe(t){const e=function(){const t=new Int32Array(ie),e=new Int32Array(16),r=new Uint8Array(re),n=new DataView(r.buffer),o=new Uint8Array(8);let a=0,i=0;return{update:s,digest:function(){const e=8*i,r=Math.floor(e/4294967296),n=e>>>0;for(s(oe,0,1);56!=a;)s(ae,0,1);o[0]=r>>>24,o[1]=r>>>16,o[2]=r>>>8,o[3]=r,o[4]=n>>>24,o[5]=n>>>16,o[6]=n>>>8,o[7]=n,s(o,0,8);const c=new Uint8Array(ne),u=new DataView(c.buffer);for(let e=0;e<t.length;e++)u.setInt32(4*e,t[e]);return t.set(ie),a=0,i=0,c}};function s(t,e,o){const s=e+o;if(i+=o,a){for(;e<s&&a<re;)r[a++]=t[e++];a==re&&(c(n,0),a=0)}if(e+re<=s){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;e+re<=s;e+=re)c(r,e)}for(;e<s;)r[a++]=t[e++]}function c(r,n){for(let t=0;t<16;t++)e[t]=r.getInt32(n+4*t);let o,a=t[0],i=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(a<<5|a>>>27)+((s^c)&i^c)+u+1518500249+e[t]|0,i=i<<30|i>>>2,c=(u<<5|u>>>27)+((i^s)&a^s)+c+1518500249+e[t+1]|0,a=a<<30|a>>>2,s=(c<<5|c>>>27)+((a^i)&u^i)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,i=(s<<5|s>>>27)+((u^a)&c^a)+i+1518500249+e[t+3]|0,c=c<<30|c>>>2,a=(i<<5|i>>>27)+((c^u)&s^u)+a+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(a<<5|a>>>27)+((s^c)&i^c)+u+1518500249+e[15]|0,i=i<<30|i>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((i^s)&a^s)+c+1518500249+o|0,a=a<<30|a>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((a^i)&u^i)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,i=(s<<5|s>>>27)+((u^a)&c^a)+i+1518500249+o|0,c=c<<30|c>>>2,o=e[0]^e[11]^e[5]^e[3],o=o<<1|o>>>31,e[3]=o,a=(i<<5|i>>>27)+((c^u)&s^u)+a+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i^s^c)+u+1859775393+o|0,i=i<<30|i>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(a^i^s)+c+1859775393+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^a^i)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c^u^a)+i+1859775393+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,a=(i<<5|i>>>27)+(s^c^u)+a+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i&s|(i|s)&c)+u+2400959708+o|0,i=i<<30|i>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(a&i|(a|i)&s)+c+2400959708+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&a|(u|a)&i)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c&u|(c|u)&a)+i+2400959708+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,a=(i<<5|i>>>27)+(s&c|(s|c)&u)+a+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i^s^c)+u+3395469782+o|0,i=i<<30|i>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(a^i^s)+c+3395469782+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^a^i)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c^u^a)+i+3395469782+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,a=(i<<5|i>>>27)+(s^c^u)+a+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+a|0,t[1]=t[1]+i|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),r=new Uint8Array(re),n=new Uint8Array(re);t.length>re&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<re;e++){const o=e<t.length?t[e]:0;r[e]=54^o,n[e]=92^o}return e.update(r,0,re),{update(t,r,n){e.update(t,r,n)},digest(){const t=e.digest();e.update(n,0,re),e.update(t,0,ne);const o=e.digest();return e.update(r,0,re),o}}}function me(t){return se[t>>>24]<<24|se[t>>>16&255]<<16|se[t>>>8&255]<<8|se[255&t]}function he(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function ye(t){return 255&(t<<1^27*(t>>7))}const be=typeof crypto!=T&&typeof crypto.getRandomValues==k,Ee="Invalid password",Se="Invalid authentication code",ge="zipjs-abort-check-password",Ae="Crypto API not supported";function Re(t){if(be)return crypto.getRandomValues(t);throw new Error(Ae)}const xe={name:"PBKDF2"},ze=Object.assign({hash:{name:"HMAC"}},xe),De=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},xe),Fe=["deriveBits"],Oe=[8,12,16],Ue=[16,24,32],Ie=10,Te=typeof crypto!=T,ke=Te&&crypto.subtle;let Ce=Te&&typeof ke!=T&&typeof ke.importKey==k&&typeof ke.deriveBits==k,ve=we;class Me extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){const a={};super({start(){_e(a,t,e,r)},async transform(t,e){const{password:r,strength:o,l:i,ready:s}=a;if(r?(await async function(t,e,r,n){const o=await Le(t,e,r,Ze(n,0,Oe[e])),a=Ze(n,Oe[e]);if(o[0]!=a[0]||o[1]!=a[1])throw Be(t),new Error(Ee)}(a,o,r,Ze(t,0,Oe[o]+2)),t=Ze(t,Oe[o]+2),n?(Be(a),e.error(new Error(ge))):i()):await s,a.m)return;const c=new Uint8Array(t.length-Ie-(t.length-Ie)%16);e.enqueue(Pe(a,t,c,0,Ie,!0))},async flush(t){const{h:e,S:r,ready:n}=a;if(e){if(await n,a.m)return;const i=Ze(r,r.length-Ie),s=new Uint8Array(Ze(r,0,r.length-Ie));e.process(s,!0);const c=e.digest();let u=r.length<Ie?1:0;for(let t=0;t<Ie;t++)u|=c[t]^i[t];if(u&&o)return void t.error(new Error(Se));t.enqueue(s)}}}),je(this,a)}}class Ne extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){const n={};super({start(){_e(n,t,e,r)},async transform(t,e){const{password:r,strength:o,l:a,ready:i}=n;let s=N;if(r?(s=await async function(t,e,r){const n=Re(new Uint8Array(Oe[e]));return Bt(n,await Le(t,e,r,n))}(n,o,r),a()):await i,n.m)return;const c=new Uint8Array(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(Pe(n,t,c,s.length,0,!1))},async flush(t){const{h:e,S:r,ready:o}=n;if(e){if(await o,n.m)return;const a=new Uint8Array(r);e.process(a,!1);const i=Ze(e.digest(),0,Ie);t.enqueue(Bt(a,i))}}}),je(this,n)}}function _e(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.l=e),password:We(e,r),strength:n-1,S:N,m:!1})}function je(t,e){const r=t.readable.getReader(),n=new ReadableStream({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw Be(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(Be(e),r.cancel(t))});Object.defineProperty(t,"readable",{get:()=>n})}function Pe(t,e,r,n,o,a){const{h:i,S:s}=t;s.length&&(e=Bt(s,e));const c=e.length-o,u=c-c%16;if(r=function(t,e){if(e&&e>t.length){const r=t;(t=new Uint8Array(e)).set(r,0)}return t}(r,n+u),u){const t=Ze(r,n,n+u);t.set(Ze(e,0,u)),i.process(t,a)}return t.S=Ze(e,u),r}function Be(t){const{h:e}=t;t.m=!0,e&&e.dispose&&e.dispose()}async function Le(t,e,r,n){t.password=null;const o=Ue[e],a=await async function(t,e,r){if(Ce)try{const n=await ke.importKey("raw",t,ze,!1,Fe);return new Uint8Array(await ke.deriveBits(Object.assign({salt:e},De),n,8*r))}catch{Ce=!1}return function(t,e,r,n){const o=pe(t),a=new Uint8Array(n),i=new Uint8Array(e.length+4),s=new DataView(i.buffer);i.set(e);for(let t=1,r=0;r<n;t++,r+=ne){s.setUint32(e.length,t),o.update(i,0,i.length);let c=o.digest();const u=c.slice();for(let t=1;t<1e3;t++){o.update(c,0,ne),c=o.digest();for(let t=0;t<ne;t++)u[t]^=c[t]}a.set(u.subarray(0,Math.min(ne,n-r)),r)}return a}(t,e,0,r)}(r,n,2*o+2);return t.h=ve(Ze(a,0,o),Ze(a,o,2*o)),t.m&&Be(t),Ze(a,2*o)}function We(t,e){return e===U?ee(t):e}function Ze(t,e,r){return t.subarray(e,r)}class Ve extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){Ge(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=qe(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(Ee);t=t.subarray(12)}n?e.error(new Error(ge)):e.enqueue(qe(r,t))}})}}class He extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){Ge(this,t,e,r)},transform(t,e){const r=this;let n,o;if(r.password||r.rawPassword){r.password=r.rawPassword=null;const e=Re(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Ye(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Ye(r,t),o),e.enqueue(n)}})}}function Ge(t,e,r,n){Object.assign(t,{password:e,rawPassword:r,passwordVerification:n}),function(t,e,r){const n=[305419896,591751049,878082192];if(Object.assign(t,{A:n,R:new Qt(n[0]),D:new Qt(n[2])}),r)for(let e=0;e<r.length;e++)Ke(t,r[e]);else for(let r=0;r<e.length;r++)Ke(t,e.charCodeAt(r))}(t,e,r)}function qe(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Xe(t)^e[n],Ke(t,r[n]);return r}function Ye(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Xe(t)^e[n],Ke(t,e[n]);return r}function Ke(t,e){let[,r]=t.A;t.R.append([e]);const n=~t.R.get();r=Je(Math.imul(Je(r+$e(n)),134775813)+1),t.D.append([r>>>24]);const o=~t.D.get();t.A=[n,r,o]}function Xe(t){const e=2|t.A[2];return $e(Math.imul(e,1^e)>>>8)}function $e(t){return 255&t}function Je(t){return 4294967295&t}function Qe(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){try{const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function tr(t,e){t=Qe(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=k||new Blob([]).stream()instanceof ReadableStream)return new Response(t).blob().then(t=>e?new Blob([t],r):t);const n=[];return t.pipeTo(new WritableStream({write(t){n.push(t)}})).then(()=>new Blob(n,r))}function er(t){if(t instanceof WritableStream)return t;const e=t.getWriter();return new WritableStream({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const rr="Invalid codec definition",nr="Reserved compression method",or="Invalid codec module",ar="Compression method not supported",ir=[0,8,9,99],sr=new Map,cr=new Map;function ur(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:a,DecompressionStream:i,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=v||!n.length)throw new Error(rr);if(ir.includes(r))throw new Error(nr);const c=typeof a==k||typeof i==k;if(!(c||typeof o==v&&o.length))throw new Error(rr);sr.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&pr(n,{CompressionStream:a,DecompressionStream:i})}function lr(t){const e=sr.get(t);if(e){let r;sr.delete(t),sr.forEach(t=>r=r||t.format==e.format),r||cr.delete(e.format)}}function fr(t){return sr.get(t)}function dr(){return Array.from(sr.values(),t=>Object.assign({},t,cr.get(t.format)))}function wr(t){return cr.get(t)}function pr(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=k&&typeof n!=k)throw new Error(or);cr.set(t,{CompressionStream:r,DecompressionStream:n})}const mr="Invalid uncompressed size",hr="Invalid compressed data",yr="Codec out of memory",br="Invalid CRC32",Er="deflate-raw",Sr="deflate64-raw",gr="gzip",Ar=[31,139,8];class Rr extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:a,useCompressionStream:i,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let m,h,y,b=super.readable;const E=f&&wr(f),S=Tr(i,n,r),g=c&&o&&!l&&!E&&(!a||s)&&Boolean(S);if(a&&!s||!c||g||(m=new te,b=Cr(b,m)),o)if(E)b=vr(b,Ir(E.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(g)y=new xr,b=vr(b,new S(gr,{level:u,chunkSize:e})),b=Cr(b,y);else try{b=kr(b,i,{level:u,chunkSize:e},n,r)}catch(t){if(!i&&r)throw Pr(t);let e;try{e=new n(gr)}catch{throw Pr(t)}b=vr(b,e),b=Cr(b,new xr)}a&&(s?b=Cr(b,new He(t)):(h=new Ne(t),b=Cr(b,h))),Ur(p,b,()=>{a&&!s||!c||(p.crc32=g?y.crc32:new DataView(m.value.buffer).getUint32(0))})}}class xr extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=Bt(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(Bt(r.subarray(0,i),t.subarray(0,a-i))),r=Bt(r.subarray(i),t.subarray(a-i))},flush(){const e=Wt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class zr extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:a,checkCrc32:i,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:d,rawBitFlag:w,outputSize:p}=t;let m,h,y,b=super.readable;if(a&&(o?b=Cr(b,new Ve(t)):(h=new Me(t),b=Cr(b,h))),c){const t=new Set,o=f&&wr(f);let a;if(o)b=vr(b,Ir(o.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:p}),t);else{const o=Tr(u,n,r);if(i&&!l&&s!==U&&p!==U&&o)try{a=new o(gr,{chunkSize:e})}catch{a=U}if(!a)try{b=kr(b,u,{chunkSize:e,deflate64:l},n,r,t)}catch(t){if(l||p===U||!u&&r)throw Pr(t);try{a=new n(gr)}catch{throw Pr(t)}}}a?(y=!0,b=function(t,e,r,n,o){const a=e.writable.getWriter(),i=e.readable.getReader(),s=n===U?new Qt:U;let c,u,l=0,f=!1,d=!1;const w=new ReadableStream({start(t){u=t},pull(){h()},cancel:t=>(d=!0,h(),i.cancel(t))});return async function(){const e=t.getReader();try{const t=new Uint8Array(10);for(t.set(Ar),await a.write(t);;){await m(),await a.ready;const{value:t,done:r}=await _r(e,o);if(r)break;await a.write(t)}s&&await a.write(new Uint8Array(0));const i=new Uint8Array(8),c=Wt(i);c.setUint32(0,s?s.get():n,!0),c.setUint32(4,r,!0),f=!0,await a.write(i),await a.close()}catch(t){await Mr(a,t),await Nr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await p();if(e)break;if(l+=t.length,l>r)throw new Error(mr);s&&s.append(t),u.enqueue(t)}d||(d=!0,u.close())}catch(t){!function(t){d||(d=!0,u.error(t),h())}(t),await Nr(i,t)}}(),w;function p(){return i.read().catch(t=>{if(f){if(!s)throw Lr(t,br);if(l!=r)throw Lr(t,mr);return{done:!0}}throw jr(t,o)})}function m(){if(!d&&u.desiredSize<=0)return new Promise(t=>c=t)}function h(){if(c){const t=c;c=U,t()}}}(b,a,p,s,t)):b=function(t,e){const r=t.getReader();return new ReadableStream({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw await Nr(r,t),jr(t,e)}},cancel:t=>r.cancel(t)})}(b,t)}i&&!y&&(m=new te,b=Cr(b,m)),Ur(this,b,()=>{if(m){const t=new DataView(m.value.buffer).getUint32(0,!1);if(s!=t)throw new Error(br)}})}}const Dr=new Map;function Fr(t,e){if(!t)return!1;let r=Dr.get(t);r||(r=new Map,Dr.set(t,r));let n=r.get(e);if(n===U){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function Or(t){return Fr(t,Er)}function Ur(t,e,r){e=Cr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function Ir(t,e,r){if(!t)throw new Error(ar);return new t(e,r)}function Tr(t,e,r){return t&&e?e:r&&r.requiresModule?r:void 0}function kr(t,e,r,n,o,a){const i=e&&n?n:o||n,s=r.deflate64?Sr:Er;let c;try{c=new i(s,r)}catch(t){if(!e||!o||i==o)throw t;c=new o(s,r)}return vr(t,c,a)}function Cr(t,e){return Qe(t).pipeThrough(e)}function vr(t,e,r){const n=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await n.ready;const t=await _r(o,r);if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await Mr(n,t),await Nr(o,t)}}(),e.readable}async function Mr(t,e){try{await t.abort(e)}catch{}}async function Nr(t,e){try{await t.cancel(e)}catch{}}function _r(t,e){const r=t.read();return e?r.catch(t=>{throw e.add(t),t}):r}function jr(t,e){return e.has(t)?t:Lr(t,Br(t)?yr:hr)}function Pr(t){return Br(t)?Lr(t,yr):t}function Br(t){return Zt(t)&&"Z_MEM_ERROR"==t.code}function Lr(t,e){const r=new Error(e);return r.cause=t,r}const Wr="data",Zr="deflate",Vr="inflate";class Hr extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(Zr)?o=Rr:n.startsWith(Vr)&&(o=zr),r.outputSize=0;let a=0;const i=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:a})}}),u=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==U&&r.outputSize>t.outputSize))throw new Error(mr)},flush(){const{crc32:t}=i;Object.assign(r,{crc32:t,inputSize:a})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(i).pipeThrough(u)})}}class Gr extends TransformStream{constructor(t){const e=[];let r=0,n=0;function o(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],a=t-o;r.length<=a?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,a),o),e[0]=r.subarray(a),o+=a)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=262144),super({transform(a,i){for(e.push(a),r+=a.length;r>t;)n+=t,i.enqueue(o())},flush(t){r&&(n+=r,t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r)))}}),Object.defineProperty(this,"outputSize",{get:()=>n})}}const qr="Worker startup timeout";let Yr,Kr,Xr,$r=()=>{};async function Jr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;return!(!r||r.requiresModule)||!(!Or(e)&&(n=e,!Fr(n,gr)))||!!r&&await Qr(t);var n}async function Qr(t){if($r)try{return await $r(t),!0}catch{}return!1}function tn(t){t.createWorker?Kr=!0:Yr=!1}class en{constructor(t,{readable:e,writable:r},n,o){const{options:a,config:i,F:s,useWebWorkers:c,workerURI:u}=n;let{createWorker:l}=n;const{signal:f}=s;return Kr&&(l=U),Object.assign(t,{O:!0,U:(t.U||0)+1,readable:e.pipeThrough(new Gr(kt(i))).pipeThrough(new rn(s),{signal:f}),writable:r,options:Object.assign({},a),I:n,workerURI:u,createWorker:l,terminate:()=>new Promise(e=>{const{T:r,O:n}=t;n?(t.C=t.C||[],t.C.push(e)):(r&&(r.terminate(),t.T=null),e()),t.v=null}),M(){if(t.O){const{C:e,T:r}=t;e&&(t.C=null,r&&(t.N=!0,r.terminate())),t.O=!1;const n=o(t);e&&e.forEach(t=>t(n))}}}),Yr===U&&(Yr=typeof Worker!=T),(c&&Xr&&(Yr&&u||l)?Xr:on)(t,i)}}class rn extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await nn(t,r)},async transform(t,n){o+=t.length,e&&await nn(e,o,r),n.enqueue(t)},async flush(){n&&await nn(n,o)}})}}async function nn(t,...e){try{await t(...e)}catch{}}function on(t,e){return{run:()=>an(t,e)}}async function an({options:t,readable:e,writable:r,M:n,I:o},a){let i,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Zr),r=e?a.CompressionStreamFallback:a.DecompressionStreamFallback,n=e?a.CompressionStream:a.DecompressionStream;t.useCompressionStream?r&&r.requiresModule&&!Or(n)&&await u():await u()||r&&!r.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),i=new Hr(t,a),s=new Gr(kt(a));const{signal:n}=o.F;await e.pipeThrough(i).pipeThrough(s).pipeTo(r,{preventClose:!0,preventAbort:!0,signal:n});const{crc32:c,inputSize:l,outputSize:f}=i;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(i){const e=s?s.outputSize:0;if(o.outputSize=e,Zt(t))try{t.outputSize=e}catch{}}throw t}finally{n()}function u(){return c||(c=Qr(a)),c}}const sn={type:"module"},cn="error",un="abort";let ln,fn,dn;var wn;function pn(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function mn(t){const{T:e}=t;if(e)try{e.terminate()}catch{}t.v=null}function hn(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if(fn===U||ln!==t){const a=typeof t==k;s=a?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===U&&(n=!1),n&&(c=sn);try{i=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(a&&l)return hn(t,e,r,n,!1);if(n)throw o;return hn(t,e,r,!0,!1)}}else{n===U&&(n=!0),n&&(c=sn);try{s=new URL(s,e)}catch{}try{i=new Worker(s,c)}catch(a){if(n)return hn(t,e,r,!1,o);throw a}}ln=t,fn=s,dn=c}else i=new Worker(fn,dn);return i.addEventListener("message",t=>{r._=!0,yn(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i,errorValue:s}=t,{reader:c,writer:u,j:l,P:f,M:d,U:w}=e,p=()=>e.U!=w;try{if(i)m(function(t,e){const{message:r,stack:n,code:o,name:a,outputSize:i,cause:s,codecImportFailed:c}=t;let u;if(u=e?e.value:Object.assign(new Error(r),{stack:n,code:o,name:a}),Zt(u))try{i!==U&&(u.outputSize=i),c&&(u.codecImportFailed=!0),s&&(Zt(u.cause)||(u.cause=Object.assign(new Error(s.message),{name:s.name})),s.code!==U&&u.cause.code!==s.code&&(u.cause.code=s.code)),e&&(u.name!==a&&(u.name=a),u.code!==o&&(u.code=o))}catch{}return u}(i,s));else{if("pull"==r){const{value:t,done:r}=await c.read();p()||En({type:Wr,value:t,done:r,messageId:o},e)}if(r==Wr){const t=new Uint8Array(n);await u.ready,await u.write(t),p()||En({type:"ack",messageId:o},e)}"close"==r&&function(t){p()||(l(t),h(),d())}(a)}}catch(i){p()||(mn(e),m(i))}function m(t){p()||(f(t),h(),Zt(t)&&t.codecImportFailed||d())}function h(){u&&u.releaseLock()}}(t,r)}),i.addEventListener(cn,t=>bn(t,r)),i.addEventListener("messageerror",t=>bn(t,r)),i}function yn(t){const{B:e}=t;e&&(clearTimeout(e),t.B=null)}function bn(t,e){t.preventDefault&&t.preventDefault(),yn(e);const{_:r,P:n,writer:o,M:a}=e;mn(e),r||(e.T=null);let i=t.error||new Error(t.message||cn);r||(i=Object.assign(new Error(i.message||cn),{L:!0}),e.W=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function En(t,{T:e,writer:r}){try{const{value:r}=t;if(r){t.value=Lt(r);try{e.postMessage(t,[t.value.buffer])}catch{e.postMessage(t)}}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}wn=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.v){let i;typeof a==k&&(a=a());try{i=hn(t.workerURI,r,t)}catch{return tn(t),on(t,e)}Object.assign(t,{T:i,_:!1,N:!1,W:null,v:{run:async()=>{try{return await async function(t,e){if(!t.T){const{W:e}=t;t.W=null;const r=e||new Error(qr);throw r.L=!0,r}let r,n;const o=new Promise((e,o)=>{r=e,n=e=>{const{outputSize:r,I:n}=t;if(n.outputSize=r,Zt(e))try{e.outputSize=r}catch{}o(e)}});Object.assign(t,{reader:null,writer:null,outputSize:0,Z:!1,V:null,j:r,P:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,H:u}=function(t,e){const r=new AbortController;let n;const{writable:o,readable:a}=new TransformStream({transform(t,r){e.outputSize+=t.length,r.enqueue(t)}}),i=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});i.catch(t=>{n||Object.assign(e,{Z:!0,V:t})});const{signal:s}=e.I.F;if(s){const t=()=>r.abort(s.reason),e=()=>s.removeEventListener(un,t);s.addEventListener(un,t),i.then(e,e)}return{writable:o,closed:i,H:()=>{n=!0,r.abort()}}}(t.writable,t);try{En({type:"start",options:i,config:e},t)}catch(e){u();try{await c}catch{}throw t.M(),e}Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:l}=e;!t._&&Number.isFinite(l)&&l>=0&&(t.B=setTimeout(()=>function(t){if(t.B=null,t._)return;const{P:e,writer:r}=t;if(mn(t),t.T=null,e){const t=new Error(qr);t.L=!0,e(t),r&&r.releaseLock()}}(t),l));try{const t=await o;return await f(),await c,t}catch(e){await f(),u();try{await c}catch{}const{outputSize:r,I:n,Z:o,V:a}=t;n.outputSize=r;const i=Zt(e)&&(e.codecImportFailed||e.L),s=o&&!i?a:e;if(Zt(s))try{s.outputSize=r}catch{}throw s}async function f(){if(!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:a,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.L)return tn(t),pn(t),an(t,e);if(r&&r.codecImportFailed){if(t.reader)return pn(t),an(t,e);t.M()}throw r}}}})}return t.v},Xr=wn;let Sn=[];const gn=[];let An,Rn,xn=0;async function zn(t,e){const{options:r,config:n}=e,{useWebWorkers:o,useCompressionStream:a,compressed:i,checkCrc32:s,computeCrc32:c,encrypted:u,format:l,codecURI:f}=r,{workerURI:d,createWorker:w,maxWorkers:p}=n;l&&(f&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(f,n.baseURI)),await async function(t,e){!cr.has(t)&&e&&pr(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(l,r.codecURI));const m=!(i||s||c||u),h=l===U||Boolean(r.codecURI);return e.useWebWorkers=!m&&h&&(o||o===U&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&d?d:U,e.createWorker=e.useWebWorkers&&w?w:U,r.useCompressionStream=a||a===U&&n.useCompressionStream,(await async function(){const r=Sn.find(t=>!t.O);if(r)return kn(r),new en(r,t,e,y);if(Sn.length<p){const r={G:xn};return xn++,Sn.push(r),new en(r,t,e,y)}return new Promise(r=>{gn.push({resolve:r,stream:t,I:e}),Rn=n.workerStarvationTimeout,Dn()})}()).run();function y(t){if(Fn(),t.N)return t.N=!1,Un();if(gn.length){const[{resolve:e,stream:r,I:n}]=gn.splice(0,1);e(new en(t,r,n,y)),Dn()}else t.T?(kn(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.Y=setTimeout(async()=>{Sn=Sn.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):Sn=Sn.filter(e=>e!=t)}}function Dn(){!An&&gn.length&&Number.isFinite(Rn)&&Rn>=0&&(An=setTimeout(On,Rn))}function Fn(){An&&(clearTimeout(An),An=null)}function On(){if(An=null,gn.length){const[{resolve:t,stream:e,I:r}]=gn.splice(0,1);t(new en({},e,In(r),Tn)),Dn()}}function Un(){const t=gn.splice(0).map(({resolve:t,stream:e,I:r})=>new Promise(n=>{t(new en({},e,In(r),()=>{Tn(),n()}))}));return Fn(),Promise.all(t)}function In(t){return Object.assign({},t,{useWebWorkers:!1,workerURI:U,createWorker:U})}function Tn(){Fn(),Dn()}function kn(t){const{Y:e}=t;e&&(clearTimeout(e),t.Y=null)}const Cn="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function vn(t,e){return Nn(t,e,!0)}function Mn(t){if(!t.some(t=>t>127))return!1;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function Nn(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=Cn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const _n="HTTP error ",jn="HTTP Range not supported",Pn="HTTP resource changed",Bn="Writer iterator completed too soon",Ln="Writer not initialized",Wn="Invalid writer (size must be writable)",Zn="Content-Range",Vn="Range",Hn="GET",Gn="bytes",qn=16777216,Yn="writable",Kn=Symbol();class Xn{constructor(){this.size=0}init(){this.initialized=!0}}class $n extends Xn{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=kt(Tt())}={}){const n=this;let o=0;return r=Ct(r),new ReadableStream({async pull(a){const i=e===U?r:Math.min(r,e-o),s=await jo(n,t+o,i);s.length&&(a.enqueue(s),o+=s.length),(e!==U&&o>=e||!s.length&&i)&&a.close()}})}}class Jn extends Xn{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(Ln);return t.writeUint8Array(Lt(e))}});Object.defineProperty(t,Yn,{get:()=>e})}writeUint8Array(){}}class Qn extends $n{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{K:t,X:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{X:r,K:n}=this,o=new Uint8Array(e),a=4*Math.floor(t/3),i=atob(n.substring(a+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(a/4);let c=0;for(let t=s;t<s+e&&t<i.length;t++)o[t-s]=i.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class to extends Jn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let r,n=e.$;const o=e.$.length;for(e.$="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.$+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.$=n+e.$}getData(){return this.data+btoa(this.$)}}let eo,ro;class no extends $n{constructor(t){super(),Object.assign(this,{J:t,size:t.size}),ro||(ro=(async()=>{try{const t=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader();let e=0,r=await t.read();for(;!r.done;)e+=r.value.length,r=await t.read();eo=1==e}catch{eo=!1}})())}createReadable(t){const{J:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};if(typeof e.stream==k){if(!n&&o>=r)return Qe(e.stream());if(eo)return Qe(e.slice(n,n+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.J:r.J.slice(t,n);let a=await o.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,n)),new Uint8Array(a)}}class oo extends Xn{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,Yn,{get:()=>r.writable}),e.contentType=t,e.et=tr(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class ao extends no{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function io(t){let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);n<128?e+=1:n<2048?e+=2:n<55296||n>=57344?e+=3:n<56320&&56320==(64512&t.charCodeAt(r+1))?(e+=4,r++):e+=3}return e}class so extends oo{constructor(t){super(),Object.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return Nn(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class co extends $n{constructor(t,e){super(),lo(this,t,e)}async init(){await fo(this,zo,go),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o,ot:a}=e;if((r||n)&&o!==U){const{offset:r=0,size:n=o-r}=t||{},i=a&&r>=o-a.length;if(n>0&&r<o&&!i)return function(t,e,r){let n,o=e,a=0,i=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(jn);const o=e.length>a?e.subarray(0,a):e;a-=o.length,i-=o.length,o.length&&t.enqueue(o),a||(await async function(){const t=n;n=U,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await zo(Hn,t,Eo(t,o,e));if(206!=r.status)throw new Error(jn);const s=po(r);if(s!==U&&s!=o)throw new Error(jn);bo(t,r),yo(t,r),o+=e,a=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return wo(this,t,e,zo,go)}}class uo extends $n{constructor(t,e){super(),lo(this,t,e)}async init(){await fo(this,Do,Ao),super.init()}readUint8Array(t,e){return wo(this,t,e,Do,Ao)}}function lo(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=qn,fetch:u}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s,maximumRangeSize:c,fetch:u})}async function fo(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Tt(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==T||o)){const n=await e(Hn,t,Eo(t,s?-65557:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==Gn))throw new Error(jn);{let o;s&&206==n.status&&(o=new Uint8Array(await n.arrayBuffer())),yo(t,n);const a=mo(n);a===U?await xo(t,e,r):t.size=a,o&&o.length&&po(n)===t.size-o.length&&(t.ot=o)}}else await xo(t,e,r)}async function wo(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,ot:s,size:c,options:u}=t;if(a||i){if(e>=c||0===r)return N;{if(e+r>c&&(r=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+r)}const o=await n(Hn,t,Eo(t,e,r));if(206!=o.status)throw new Error(jn);const a=po(o);if(a!==U&&a!=e)throw new Error(jn);bo(t,o),yo(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(jn);return i}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function po(t){const e=t.headers.get(Zn);if(e){const t=Number(e.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t))return t}}function mo(t){const e=t.headers.get(Zn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function ho({headers:t}){return{it:t.get("Etag")||U,lastModified:t.get("Last-Modified")||U}}function yo(t,e){const{checkResourceChanges:r,st:n}=t;r&&!n&&206==e.status&&(t.st=ho(e))}function bo(t,e){const{checkResourceChanges:r,st:n,size:o}=t;if(r){const t=mo(e);if(t!==U&&o!==U&&t!=o)throw new Error(Pn);if(n){const t=ho(e);if(Object.entries(n).some(([e,r])=>r!==U&&t[e]!==U&&r!=t[e]))throw new Error(Pn)}}}function Eo(t,e=0,r=1){return Object.assign({},So(t),{[Vn]:Gn+"="+(e<0?e:e+"-"+(e+r-1))})}function So({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function go(t){await Ro(t,zo)}async function Ao(t){await Ro(t,Do)}async function Ro(t,e){const r=await e(Hn,t,So(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function xo(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,So(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function zo(t,{fetch:e=fetch,options:r,url:n},o){const a=await e(n,Object.assign({},r,{method:t,headers:o}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new Error(jn):new Error(_n+(a.statusText||a.status))}function Do(t,{url:e},r){return new Promise((n,o)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status>=200&&a.status<=299){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:a.status,arrayBuffer:()=>a.response,headers:new Map(t)})}else o(416==a.status?new Error(jn):new Error(_n+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),a.open(t,e),r)for(const t of Object.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class Fo extends $n{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new uo(t,e):new co(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}createReadable(t){return this.reader.createReadable(t)}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class Oo extends Fo{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class Uo extends $n{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class Io extends Jn{constructor(t){super(),this.ut=t||262144}init(t=0){Object.assign(this,{offset:0,ct:new Uint8Array(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<r;)t*=2;const n=e.ct;e.ct=new Uint8Array(t),e.ct.set(n)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class To extends $n{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await Promise.all(t.lt.map(_o));t.wt=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}ht(t){const{wt:e,size:r}=this,n=e[t];return n===U?r:n}async readUint8Array(t,e){const r=this,{lt:n}=this;let o,a=0,i=t;for(;n[a]&&i>=n[a].size;)i-=n[a].size,a++;const s=n[a];if(s){const n=s.size;if(i+e<=n)o=await jo(s,i,e);else{const a=n-i;o=Bt(await jo(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=N;return r.ft=Math.max(a,r.ft),o}}class ko extends Xn{constructor(t,e=4294967295){super();const r=this;let n,o,a;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const i=new WritableStream({async write(e){if(e===Kn)return void(a&&await c());const{availableSize:i}=r;if(a)e.length>=i?(await s(e.subarray(0,i)),await c(),e.length>i&&await this.write(e.subarray(i))):await s(e);else{const{value:i,done:s}=await t.next();if(s&&!i)throw new Error(Bn);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await No(n),o=i.writable,a=o.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await u())},async abort(t){a&&await a.abort(t)}});async function s(t){const e=t.length;e&&(await a.ready,await a.write(t),n.size+=e,r.availableSize-=e)}async function c(){await u(),r.diskOffset+=n.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function u(){await a.close()}Object.defineProperty(r,Yn,{get:()=>i})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Kn)}finally{t.releaseLock()}}}class Co{constructor(t){return Array.isArray(t)&&(t=new To(t)),(t instanceof ReadableStream||typeof t.getReader==k)&&(t={readable:Qe(t)}),t}}class vo{constructor(t){t.writable===U&&typeof t.next==k&&(t=new ko(t)),(t instanceof WritableStream||typeof t.getWriter==k)&&(t={writable:er(t)});try{t.size=t.size===U?0:t.size}catch{throw new Error(Wn)}return t}}function Mo(t){return Boolean(t&&t.getData)}async function No(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function _o(t){return t=new Co(t),await No(t),t.size!==U&&t.readUint8Array||(t=new no(await tr(t.readable)),await No(t)),t}function jo(t,e,r){return t.readUint8Array(e,r)}function Po(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?$n.prototype.createReadable.call(t,e):t.readable}function Bo(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==U&&(n.filename=r),t.push(n)}}const Lo="filename",Wo="rawFilename",Zo="comment",Vo="rawComment",Ho="uncompressedSize",Go="compressedSize",qo="offset",Yo="diskNumberStart",Ko="lastModDate",Xo="rawLastModDate",$o="lastAccessDate",Jo="rawLastAccessDate",Qo="creationDate",ta="rawCreationDate",ea="internalFileAttributes",ra="externalFileAttributes",na="msdosAttributesRaw",oa="msdosAttributes",aa="msDosCompatible",ia="zip64",sa="encrypted",ca="version",ua="versionMadeBy",la="zipCrypto",fa="directory",da="executable",wa="compressionMethod",pa="signature",ma="extraField",ha="unixMode",ya="setuid",ba="setgid",Ea="sticky",Sa=[Lo,Wo,Ho,Go,Ko,Xo,Zo,Vo,$o,Jo,Qo,ta,qo,Yo,ea,ra,na,oa,aa,ia,sa,ca,ua,la,fa,da,"symlink",wa,pa,"crc32",ma,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",ha,"unixExternalUpper",ya,ba,Ea,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class ga{constructor(t){Sa.forEach(e=>this[e]=t[e])}}const Aa=new Set([1,m,10,h,28789,25461,y,b,E,22613,13]);function Ra(t,e,r){return t?e?12:16+4*r:0}const xa="File format is not recognized",za="End of central directory not found",Da="End of Zip64 central directory locator not found",Fa="Central directory header not found",Oa="Local file header not found",Ua="Zip64 extra field not found",Ia="File contains encrypted entry",Ta="Encryption method not supported",ka="Split zip file",Ca="Overlapping entry found",va="Entry data out of bounds",Ma="Ambiguous archive",Na="Encrypted central directory is not supported",_a="Unsafe filename",ja="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Pa="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",Ba="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",La="64-bit value exceeds Number.MAX_SAFE_INTEGER",Wa="unsorted central directory",Za="unknown version needed to extract",Va="compressed patched data",Ha="malformed extra field",Ga="unknown zip64 extensible data",qa="wrapped entries count",Ya="appended data",Ka="prepended data",Xa="prepended central directory",$a="trailing central directory data",Ja="duplicate filename",Qa="mismatched zip64 end of central directory record",ti="multiple end of central directory records",ei="mismatched local file header (filename)",ri="mismatched local file header (general purpose bit flag)",ni="mismatched local file header (compression method)",oi="mismatched local file header (crc32 or sizes)",ai=/^[a-zA-Z]:/,ii=/(^|[\\/])\.\.([\\/]|$)/,si="utf-8",ci="cp437",ui=[[Ho,t],[Go,t],[qo,t],[Yo,e]],li={[e]:{yt:Yi,bytes:4},[t]:{yt:Ki,bytes:8}},fi=BigInt(Number.MAX_SAFE_INTEGER);class di{constructor(t,e={}){Object.assign(this,{reader:new Co(t),options:e,bt:{Et:new Set,St:[],gt:[]}})}async*getEntriesGenerator(n={}){const a=this;let{reader:i}=a;if(await No(i),i.size!==U&&i.readUint8Array||(i=new no(await tr(i.readable)),await No(i)),i.size<d)throw new Error(xa);const c=a.warnings=[],m=Ti(n,a.options),h=m==et,y=m!=nt,b=vi(Wi(a,n,X),m),E=function(t,e){if(t===U)return e;if(!Ii(t))throw new Error(Pa);return t}(Wi(a,n,"filenameValidation"),m),S=Wi(a,n,"normalizeFilename"),{At:D,Rt:F}=await Mi(i,y,b);if(!D)throw await async function(t){return await Ui(t)==o}(i)?new Error(ka):new Error(za);y&&F>1&&Li(ti);const O=Wt(D);let I=Yi(O,12),T=Yi(O,16);const k=D.offset,C=qi(O,20),v=k+d+C,M=i.size-v;M>b&&Li(Ya),M>0&&Bo(c,Ya);let _=qi(O,4);const j=i.ft||0;let P,B,L,W,Z,V=qi(O,6),H=qi(O,10),G=0,q=p;const Y=T==t||I==t||H==e||V==e;if(T!=t&&V!=e&&(T+=Oi(i,V)),Y){const r=D.offset>=w?await jo(i,D.offset-w,w):N,n=Wt(r);if(r.length==w&&Yi(n,0)==l){T=Oi(i,Yi(n,4))+Ki(n,8);let r=await jo(i,T,p),o=Wt(r);const a=D.offset-w-p;if((r.length<p||Yi(o,0)!=u)&&T!=a&&a>=0){const t=T;T=a,T>t&&(G=T-t),r=await jo(i,T,p),o=Wt(r)}if(r.length<p||Yi(o,0)!=u)throw new Error(Da);if(L=!0,W=Ki(o,4)>44,W){const t=Math.min(Ki(o,4)-44,i.size-T-p);t>0&&(q+=t,Z=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Wt(t),n=qi(r,26);Object.assign(e,{compressionMethod:qi(r,0),compressedSize:Ki(r,2),uncompressedSize:Ki(r,10),encryptionAlgorithm:qi(r,18),bitLength:qi(r,20),flags:qi(r,22),hashAlgorithm:qi(r,24),hashData:t.subarray(28,28+n)})}return e}(await jo(i,T+p,t)))}_==e?_=Yi(o,16):_!=Yi(o,16)&&Bi(h,c,Qa),V==e?V=Yi(o,20):V!=Yi(o,20)&&Bi(h,c,Qa),H==e?H=Ki(o,32):H!=Ki(o,32)&&Bi(h,c,Qa),I==t?I=Ki(o,40):I!=Ki(o,40)&&Bi(h,c,Qa),T=Oi(i,V)+Ki(o,48)+G}}let K=I;const $=D.offset-(L?q+w:0);if(T>=i.size&&(G=i.size-T-I-d,T=i.size-I-d),j!=_)throw new Error(ka);if(T<0)throw new Error(xa);let J=0,rt=await jo(i,T,I),ot=Wt(rt);if(I){if(rt.length<4)throw new Error(xa);const t=$-I;if(T!=t&&V==_){const e=Yi(ot,J)==s||Boolean(Z&&Z.compressedSize)||hi(ot);let r=!e;if(!r&&t>=0&&t+4<=i.size&&(r=Yi(Wt(await jo(i,t,4)),0)==s),r){const r=T;T=t,T>r&&(G+=T-r,P=e),rt=await jo(i,T,I),ot=Wt(rt)}}}const at=$-T;if(I!=at&&at>=0&&V==_&&(I=at,rt=await jo(i,T,I),ot=Wt(rt)),T<0||T>=i.size)throw new Error(xa);a.directoryOffset=T,a.directoryLength=K;const it=Zi(a,n,"decryptCentralDirectory");let st,ct;if(it&&H&&rt.length>=4&&Yi(ot,0)!=s&&(W||hi(ot))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(Z,K,rt.length);ct=rt.subarray(t),rt=await it(rt.subarray(0,t),Z),ot=Wt(rt),K=rt.length,st=!0}Z&&!st&&(rt.length<4||Yi(ot,0)==s)&&Bo(c,Ga),B=T;const ut=Wi(a,n,"filenameEncoding"),lt=Wi(a,n,"commentEncoding"),ft=new Set;let dt,wt=-1;const pt=!h&&!L;!H&&pt&&(H=yi(ot,rt,J),H&&Bo(c,qa));for(let t=0;t<H;t++){const o=new mi(i,a.options);if(J+f>rt.length||Yi(ot,J)!=s){if(0==t&&!st&&(W||hi(ot)))throw new Error(Na);throw new Error(Fa)}Ei(o,ot,J+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=J+f,d=l+o.filenameLength+o.extraFieldLength,w=qi(ot,J+4),p=!(w>>8),m=w>>8==3,h=qi(ot,J+32),y=d+h,b=new Uint8Array(rt.subarray(l,y)),D=b.subarray(0,o.filenameLength),F=b.subarray(o.filenameLength+o.extraFieldLength),O=u||!ut&&Mn(D),I=u||!lt&&Mn(F),T=Yi(ot,J+38),k=T&r,C={readOnly:Boolean(1&k),hidden:Boolean(2&k),system:Boolean(4&k),directory:Boolean(16&k),archive:Boolean(32&k)},v=Yi(ot,J+42),M=Zi(a,n,"decodeText")||vn,N=O?si:ut||ci,_=I?si:lt||ci;let j=M(D,N,Q);j===U&&(j=vn(D,N));let P=M(F,_,tt);P===U&&(P=vn(F,_)),Object.assign(o,{index:t,xt:st,versionMadeBy:w,msDosCompatible:p,zip64:!1,compressedSize:0,uncompressedSize:0,zt:h,offset:v,diskNumberStart:qi(ot,J+34),internalFileAttributes:qi(ot,J+36),externalFileAttributes:T,msdosAttributesRaw:k,msdosAttributes:C,rawFilename:D,filenameUTF8:O,commentUTF8:I,rawExtraField:b.subarray(o.filenameLength,o.filenameLength+o.extraFieldLength),rawComment:F,filename:j,comment:P});const L=Si(o,o,ot,J+6);if(j=o.filename,S){const t=S(j);t!==U&&(j=o.filename=t)}if(Ci(j,E)){const t=new Error(_a);throw t.filename=j,t}L&&Bo(c,Ha,j),o.offset+=G;const Z=Oi(i,o.diskNumberStart)+o.offset;B=Math.min(Z,B),Z<wt&&Bo(c,Wa,j),wt=Z,(o.version&r)>63&&Bo(c,Za,j),32&~o.rawBitFlag||Bo(c,Va,j),ft.has(o.filename)&&(dt=!0),ft.add(o.filename);const V=o.externalFileAttributes>>16&e;o.unixMode===U&&16877&V&&(o.unixMode=V);const q=Boolean(o.unixMode&R),Y=Boolean(o.unixMode&x),K=Boolean(512&o.unixMode),X=40960==((o.unixMode===U?V:o.unixMode)&g),$=!X&&(o.unixMode!==U?!!(73&o.unixMode):m&&!!(73&V)),et=o.unixMode!==U&&(o.unixMode&g)==A,nt=(V&g)==A;Object.assign(o,{setuid:q,setgid:Y,sticky:K,symlink:X,unixExternalUpper:V,executable:$,directory:et||nt||p&&C.directory||o.filename.endsWith(z),zipCrypto:o.encrypted&&!o.extraFieldAES});const at=new ga(o);if(at.getData=(t,e)=>o.getData(t,at,a.bt,e),at.arrayBuffer=async t=>{const e=new TransformStream,r=tr(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,at,a.bt,Object.assign({},t,{preventClose:!1})),r},J=y,t==H-1&&pt){const t=yi(ot,rt,J);t&&(H+=t,Bo(c,qa))}const{onprogress:it}=n;if(it)try{await it(t+1,H,new ga(o))}catch{}yield at}let mt=J,ht=bi(rt.subarray(J))||(st?bi(ct):U);if(!ht&&!st){const t=T+J,e=Math.min($-t,65541);e>=6&&(ht=bi(await jo(i,t,e)))}ht&&(a.digitalSignature=ht,mt=J+6+ht.length),(J!=K&&mt!=K||!st&&J!=I&&mt!=I)&&Bi(h,c,$a),dt&&Bi(h,c,Ja);const yt=Wi(a,n,"extractPrependedData"),bt=Wi(a,n,"extractAppendedData"),Et=(h||yt)&&H&&4==B&&await async function(t){const e=await Ui(t);return e==o||808471376==e}(i)?4:0;return h&&(G||H&&B>Et)&&Li(Ka),(G||H&&B>4)&&Bo(c,Ka),P&&Bo(c,Xa),yt&&(a.prependedData=B>Et?await jo(i,Et,B-Et):N),a.comment=C?await jo(i,k+d,C):N,bt&&(a.appendedData=v<i.size?await jo(i,v,i.size-v):N),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[_](){return this.close()}}class wi{constructor(t={}){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}}),o=new di(r,t),a=o.getEntriesGenerator(),i=new Set;this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await a.next();if(e)return t.close();const n=function(t,e){const{readable:r,writable:n}=new TransformStream;let o;const a={cancel:async t=>{e.delete(a),await(o?o.cancel(t):r.cancel(t))}};return a.readable=new ReadableStream({async pull(i){o||(o=r.getReader(),e.add(a),async function(){try{await t.getData(n,{preventClose:!1})}catch(t){try{await n.abort(t)}catch{}}finally{e.delete(a)}}());const{done:s,value:c}=await o.read();s?i.close():i.enqueue(c)},cancel:t=>a.cancel(t)},{highWaterMark:0}),a}(r,i),o={...r,readable:n.readable};delete o.getData,Object.defineProperties(o,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(o)},async cancel(t){const r=Array.from(i);i.clear(),e.error(t),await Promise.allSettled(r.map(e=>e.cancel(t))),await Promise.allSettled([a.return(),o.close()])}}),this.writable=n}}async function pi(t,e={}){if(t=new Co(t),await No(t),t.size!==U&&t.readUint8Array||(t=new no(await tr(t.readable)),await No(t)),t.size<d)return!1;const r=Ti(e,{}),n=r!=nt,o=vi(e[X],r),{At:a,Rt:i}=await Mi(t,n,o);if(!a||r==et&&i>1)return!1;const s=qi(Wt(a),20),c=a.offset+d+s;return t.size-c<=o}let mi=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,a={}){const i=this,s=Tt(),{reader:c,index:u,offset:l,diskNumberStart:f,extraFieldAES:d,extraFieldZip64:w,compressionMethod:p,bitFlag:m,rawBitFlag:h,crc32:y,rawLastModDate:b,uncompressedSize:E,compressedSize:S}=i,{dataDescriptor:g}=m,A=e.localDirectory={},R=e.warnings=[],x=Oi(c,f)+l,z=await jo(c,x,D),F=Wt(z);let O=Wi(i,a,j),I=Wi(i,a,P);const T=pt(Wi(i,a,B)),k=Boolean(T),C=!0===T;if(wt(O,I),O=O&&O.length?O:U,I=I&&I.length?I:U,d&&99!=d.originalCompressionMethod)throw new Error(ar);if(z.length<D||Yi(F,0)!=n)throw new Error(Oa);Ei(A,F,4);const{extraFieldLength:v,filenameLength:M}=A,_=A.dataOffset=x+D+M+v,H=Wi(i,a,"checkLocalDirectory"),G=Ti(a,i.options),q=function(t,e){return t===U?e!=nt:Boolean(t)}(H,G),Y=Wi(i,a,"checkLocalFilename"),K=function(t,e){return t===U?e==et:Boolean(t)}(Y===U?H:Y,G);let X=N;if(K&&(M||v)){const t=await jo(c,x+D,M+v);X=t.subarray(0,M),A.rawExtraField=t.subarray(M)}else A.rawExtraField=v?await jo(c,x+D+M,v):N;K&&(A.rawFilename=X),Si(i,A,F,4,!0)&&Bo(R,Ha),function(t,e,r,n,o){const{rawFilename:a}=t,i=!o,s=t.xt&&!(8192&~e.rawBitFlag);!n||s||r.length==a.length&&!r.some((t,e)=>t!=a[e])||Bi(i,o,ei),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&Bi(i,o,ri),e.compressionMethod!=t.compressionMethod&&Bi(i,o,ni),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Bi(i,o,oi)}(i,A,X,K,q?U:R);const{lastAccessDate:$,creationDate:J,uid:Q,gid:tt}=A;$&&(e.lastAccessDate=$),J&&(e.creationDate=J),Q!==U&&e.uid===U&&(e.uid=Q),tt!==U&&e.gid===U&&(e.gid=tt);const rt=Wi(i,a,"checkPasswordOnly"),ot=i.encrypted&&(!C||rt),at=ot&&!d;if(C||(e.zipCrypto=at),ot&&!(64&~i.rawBitFlag))throw new Error(Ta);const it=k?U:fr(p);if(0!=p&&8!=p&&9!=p&&!it&&!k)throw new Error(ar);if(ot){if(!at&&(d.strength<1||d.strength>3))throw new Error(Ta);if(!O&&!I)throw new Error(Ia)}if(_+S>c.size)throw new Error(va);const st=S,ct=ft(Wi(i,a,L));dt(ct);let ut=Wi(i,a,"checkOverlappingEntry");const lt=Wi(i,a,"checkOverlappingEntryOnly");lt&&(ut=!0);const{onstart:mt,onprogress:ht,onend:yt}=a,bt=0!=p&&!k,Et=k?S-Ra(ot,at,d&&d.strength):E,St=9==p;let gt=Wi(i,a,Z);St&&(gt=!1);const At=Wi(i,a,"checkCrc32"),Rt=(At===U?Wi(i,a,"checkSignature"):At)&&!k&&(!ot||at||d&&1==d.vendorVersion),xt={options:{codecType:Vr,password:O,rawPassword:I,zipCrypto:at,encryptionStrength:d&&d.strength,checkCrc32:Rt,checkAuthenticationCode:Wi(i,a,"checkAuthenticationCode"),passwordVerification:at&&(g?b>>>8&r:y>>>24&r),outputSize:Et,crc32:y,compressed:bt,encrypted:ot,useWebWorkers:Wi(i,a,W),useCompressionStream:gt,deflate64:St,format:it?it.format:U,codecURI:it?it.codecURI:U,compressionMethod:p,rawBitFlag:h,checkPasswordOnly:rt},config:s,F:{signal:ct,size:st,onstart:mt,onprogress:ht,onend:yt}};let zt,Dt,Ft;ut&&await async function({reader:t,Dt:e,index:r,offset:n,crc32:o,compressedSize:a,uncompressedSize:i,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,bt:l}){let f=0;if(c){const r=Boolean(u),n=Wt(await jo(t,s+a,24)),c=[[r,!0],[r,!1],[!r,!0],[!r,!1]].map(([t,e])=>Di(n,t,e)).filter(t=>t&&t.compressedSize==a&&t.uncompressedSize==i),l=c.find(t=>t.crc32==o)||c[0]||Di(n,r,!0)||Di(n,r,!1);l?(e.localDirectory.dataDescriptor=l,f=Fi(l.zip64,l.signature)):f=Fi(r,!1)}const d={start:n,end:s+a+f,Dt:e},{Et:w,St:p,gt:m}=l;if(!w.has(r)){const t=function(t,e){let r=0,n=t.length;for(;r<n;){const o=r+n>>>1;t[o].start<e.start?r=o+1:n=o}const o=t[r-1],a=t[r];return o&&zi(e,o)?o:a&&zi(e,a)?a:void 0}(p,d)||m.find(t=>zi(d,t));if(t){const e=new Error(Ca);throw e.overlappingEntry=t.Dt,e}w.add(r),m.push(d),m.length*m.length>p.length&&(m.sort((t,e)=>t.start-e.start),l.St=function(t,e){const r=[];let n=0,o=0;for(;n<t.length||o<e.length;)o==e.length||n<t.length&&t[n].start<e[o].start?r.push(t[n++]):r.push(e[o++]);return r}(p,m),m.length=0)}}({reader:c,Dt:e,index:u,offset:x,crc32:y,compressedSize:S,uncompressedSize:E,dataOffset:_,dataDescriptor:g||A.bitFlag.dataDescriptor,extraFieldZip64:w||A.extraFieldZip64,bt:o});try{if(!lt){rt&&(t=new WritableStream),t=new vo(t),await No(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(Et,S,bt)),({writable:zt}=t);const e=Qe(c.createReadable({offset:_,size:st})),{outputSize:r}=await zn({readable:e,writable:zt},xt);if(dt(ct),r!=Et)throw Object.assign(new Error(mr),{outputSize:r});t.size+=r}}catch(e){const{outputSize:r}=xt;if(r!==U?t.size+=r:Zt(e)&&e.outputSize!==U&&(t.size+=e.outputSize),!rt||!Zt(e)||e.message!=ge)throw Dt=e,Ft=!0,e}finally{if((Mo(t)||!Wi(i,a,V))&&zt&&!zt.locked){const t=zt.getWriter();if(Ft)try{await t.abort(Dt)}catch{}else await t.close()}}return rt||lt?U:t.getData?t.getData():zt}};function hi(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==Yi(t,r))return!0;return!1}function yi(t,e,r){let n=0;for(;r+f<=e.length&&Yi(t,r)==s;)r+=f+qi(t,r+28)+qi(t,r+30)+qi(t,r+32),n++;return n%65536?0:n}function bi(t){if(t.length>=6){const e=Wt(t);if(Yi(e,0)==i){const r=qi(e,4);if(6+r<=t.length)return new Uint8Array(t.subarray(6,6+r))}}}function Ei(t,e,r){const n=t.rawBitFlag=qi(e,r+2),o=!(1&~n),a=Yi(e,r+6);Object.assign(t,{encrypted:o,version:qi(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:a,lastModDate:Vi(a),filenameLength:qi(e,r+22),extraFieldLength:qi(e,r+24)})}function Si(t,e,r,n,o){const{rawExtraField:a}=e,i=e.extraField=new Map,s=Wt(a);let c=0,u=!1;try{for(;c<a.length;){const t=qi(s,c),e=qi(s,c+2);i.set(t,{type:t,data:a.slice(c+4,c+4+e)}),c+=4+e}}catch{u=!0}c>a.length&&(u=!0);const l=qi(r,n+4);Object.assign(e,{signature:Yi(r,n+10),crc32:Yi(r,n+10),compressedSize:Yi(r,n+14),uncompressedSize:Yi(r,n+18)});const f=i.get(1);if(f)(function(t,e,r){e.zip64=!0;const n=Wt(t.data),o=ui.filter(([t,r])=>e[t]==r),a=o.reduce((t,[,e])=>t+li[e].bytes,0);if(t.data.length<a){if(r)return!1;throw new Error(Ua)}const i=[];try{for(let t=0,e=0;t<o.length;t++){const[,r]=o[t],a=li[r];i.push(a.yt(n,e)),e+=a.bytes}}catch(t){if(r)return!1;throw t}return o.forEach(([r],n)=>{e[r]=t[r]=i[n]}),!0})(f,e,o)||(u=!0),e.extraFieldZip64=f;else if(ui.some(([t,r])=>e[t]==r)){if(!o)throw new Error(Ua);u=!0}const d=i.get(28789);d&&(gi(d,Lo,Wo,e,t),e.extraFieldUnicodePath=d);const w=i.get(25461);w&&(gi(w,Zo,Vo,e,t),e.extraFieldUnicodeComment=w);const p=i.get(m);p&&(99==l||e.encrypted)&&p.data.length>=7?(function(t,e,r){const n=Wt(t.data),o=Gi(n,4);Object.assign(t,{vendorVersion:Gi(n,0),vendorId:Gi(n,2),strength:o,originalCompressionMethod:r,compressionMethod:qi(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=U)}(p,e,l),e.extraFieldAES=p):(p&&(u=!0),e.compressionMethod=l);const S=i.get(13);S&&(Ai(S,e),e.extraFieldPkwareUnix=S);const g=i.get(22613);g&&(Ai(g,e),e.extraFieldUnixType1=g);const A=i.get(10);A&&(function(t,e){const r=Wt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=qi(r,o),a=qi(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+a)),o+=4+a}}catch{}if(n&&24==n.length){const r=Wt(n),o=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),i=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:a,rawCreationDate:i});const s={lastModDate:Hi(o),lastAccessDate:Hi(a),creationDate:Hi(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(A,e),e.extraFieldNTFS=A);const R=i.get(b);let x;R&&(x=Ri(R,e,!0),e.extraFieldInfoZip=R);const z=i.get(E);z&&(Ri(z,x?{}:e,!1),e.extraFieldUnix=z);const D=i.get(h);D&&(function(t,e,r){if(!t.data.length)return;const n=Wt(t.data),o=Gi(n,0),a=[],i=[];r?(1&~o||(a.push(Ko),i.push(Xo)),2&~o||(a.push($o),i.push(Jo)),4&~o||(a.push(Qo),i.push(ta))):t.data.length>=5&&(a.push(Ko),i.push(Xo));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=Yi(n,s);e[r]=t[r]=new Date(1e3*(0|a));const c=i[o];t[c]=a}s+=4})}(D,e,o),e.extraFieldExtendedTimestamp=D);const F=i.get(y);return F&&(e.extraFieldUSDZ=F),u}function gi(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=Wt(t.data),i=new Qt;i.append(o[r]);const s=Wt(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=Yi(a,1),u=Gi(a,0);Object.assign(t,{version:u,[e]:vn(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==Yi(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function Ai(t,e){if(t.data.length<8)return;const r=Wt(t.data),n={lastAccessDate:new Date(1e3*(0|Yi(r,0))),lastModDate:new Date(1e3*(0|Yi(r,4)))};t.data.length>=12&&(n.uid=qi(r,8),n.gid=qi(r,10)),Object.assign(t,n),Object.assign(e,n)}function Ri(t,e,r){try{const n=Wt(t.data);let o,a;if(r){let e=0;const r=Gi(n,e++),i=Gi(n,e++);o=xi(t.data.subarray(e,e+i)),e+=i;const s=Gi(n,e++);a=xi(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=qi(n,0),a=qi(n,2),Object.assign(t,{uid:o,gid:a}));return o!==U&&(e.uid=o),a!==U&&(e.gid=a),o!==U||a!==U}catch{}}function xi(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function zi(t,e){return t.start<e.end&&e.start<t.end}function Di(t,e,r){const n=r?4:0;if(t.byteLength<Fi(e,r)||r&&Yi(t,0)!=a)return U;const o=Yi(t,n);let i,s;try{e?(i=Ki(t,n+4),s=Ki(t,n+12)):(i=Yi(t,n+4),s=Yi(t,n+8))}catch{return U}return{signature:r,zip64:e,crc32:o,compressedSize:i,uncompressedSize:s}}function Fi(t,e){return(t?20:12)+(e?4:0)}function Oi(t,e){return t.ht?t.ht(e):0}async function Ui(t){return Yi(Wt(await jo(t,0,4)))}function Ii(t){return t===et||t===rt||t===nt}function Ti(t,e){return ki(t,ki(e,rt))}function ki(t,e){const r=t.strictness;if(r!==U){if(!Ii(r))throw new Error(ja);return r}const n=t.checkAmbiguity;return n===U?e:n?et:e==nt?nt:rt}function Ci(t,e){if(e==nt)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(ii.test(t)||t.startsWith("/")||t.startsWith("\\")||ai.test(t))||e==et&&(r.includes(".")||r.includes("")||t.includes("\0"))}function vi(t,r){if(t!==U){const e=yt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(Ba);return e}return r==et?0:r==nt?1/0:e}async function Mi(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={Ft:64};let i,s,c=0;for await(const[r,u,l,f,w]of Ni(t,o)){const o=qi(r,f+20);if(w+d+o==n){const o=await ji(t,r,u,f,w,n,a);if(2==o){if(i||(i=_i(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=_i(l,f,w))}}return i||(i=s),i||(i=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let a,i;for await(const[e,s,c,u,l]of Ni(t,o)){const o=_i(c,u,l);a||(a=o);const f=await ji(t,e,s,u,l,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{At:i,Rt:c}}async function*Ni(t,e){const r=t.size-e,n=await jo(t,r,e),o=Wt(n);for(let t=n.length-d;t>=0;t--)Yi(o,t)==c&&(yield[o,r,n,t,r+t])}function _i(t,e,r){return{offset:r,buffer:new Uint8Array(t.subarray(e,e+d)).buffer}}async function ji(r,n,o,a,i,c,u){const f=qi(n,a+10),d=Yi(n,a+12),p=Yi(n,a+16);if(f==e||d==t||p==t)return await Pi(r,n,o,i-w,c,u)==l?2:0;if(!f&&!d)return 1;const m=qi(n,a+6);for(const t of[i-d,Oi(r,m)+p])if(await Pi(r,n,o,t,c,u)==s)return 2;return 0}async function Pi(t,e,r,n,o,a){return n<0||n+4>o?U:n>=r?Yi(e,n-r):a.Ft>0?(a.Ft--,Yi(Wt(await jo(t,n,4)),0)):U}function Bi(t,e,r){t?Li(r):Bo(e,r)}function Li(t){const e=new Error(Ma);throw e.reason=t,e}function Wi(t,e,r){return e[r]===U?t.options[r]:e[r]}function Zi(t,e,r){return lt(Wi(t,e,r))}function Vi(t){const r=(4294901760&t)>>16,n=t&e,o=new Date(1980+((65024&r)>>9),((480&r)>>5)-1,31&r,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return o<O?O:o}function Hi(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function Gi(t,e){return t.getUint8(e)}function qi(t,e){return t.getUint16(e,!0)}function Yi(t,e){return t.getUint32(e,!0)}function Ki(t,e){const r=t.getBigUint64(e,!0);if(r>fi)throw new Error(La);return Number(r)}var Xi=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Ma,ERR_BAD_FORMAT:xa,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Fa,ERR_CODEC_OUT_OF_MEMORY:yr,ERR_ENCRYPTED:Ia,ERR_ENCRYPTED_CENTRAL_DIRECTORY:Na,ERR_ENTRY_DATA_OUT_OF_BOUNDS:va,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Da,ERR_EOCDR_NOT_FOUND:za,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Ua,ERR_INVALID_AUTHENTICATION_CODE:Se,ERR_INVALID_COMPRESSED_DATA:hr,ERR_INVALID_CRC32:br,ERR_INVALID_FILENAME_VALIDATION:Pa,ERR_INVALID_MAX_APPENDED_DATA_SIZE:Ba,ERR_INVALID_PASSWORD:Ee,ERR_INVALID_STRICTNESS:ja,ERR_INVALID_UNCOMPRESSED_SIZE:mr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Oa,ERR_OVERLAPPING_ENTRY:Ca,ERR_SPLIT_ZIP_FILE:ka,ERR_UNSAFE_FILENAME:_a,ERR_UNSUPPORTED_COMPRESSION:ar,ERR_UNSUPPORTED_ENCRYPTION:Ta,ERR_UNSUPPORTED_UINT64:La,ERR_WORKER_STARTUP_TIMEOUT:qr,WARNING_APPENDED_DATA:Ya,WARNING_COMPRESSED_PATCHED_DATA:Va,WARNING_DUPLICATE_FILENAME:Ja,WARNING_MALFORMED_EXTRA_FIELD:Ha,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:ri,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:ni,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:oi,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:ei,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:Qa,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:ti,WARNING_PREPENDED_CENTRAL_DIRECTORY:Xa,WARNING_PREPENDED_DATA:Ka,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:$a,WARNING_UNKNOWN_VERSION:Za,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Ga,WARNING_UNSORTED_CENTRAL_DIRECTORY:Wa,WARNING_WRAPPED_ENTRIES_COUNT:qa,ZipReader:di,ZipReaderStream:wi,isZipFile:pi});const $i="File already exists",Ji="Zip file comment exceeds 64KB",Qi="Invalid zip file comment (must be a Uint8Array)",ts="File entry comment exceeds 64KB",es="Invalid file entry comment (must be a string)",rs="Invalid date (must be a valid Date instance)",ns="File entry name exceeds 64KB",os="Version exceeds 65535",as="The strength must equal 1, 2, or 3",is="Encryption is not supported in USDZ files",ss="Split zip files are not supported in USDZ files",cs="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",us="Invalid extra field (must be a Map)",ls="Invalid extra field type (must be integer 0..65535)",fs="Invalid extra field data (must be a Uint8Array)",ds="Extra field data exceeds 64KB",ws=-2147483648,ps=2147483647,ms=BigInt(0),hs=BigInt("0x7fffffffffffffff"),ys="Zip64 is not supported (set the 'zip64' option to 'true')",bs="Undefined uncompressed size",Es="Undefined compression method",Ss="Undefined CRC32",gs="Undetermined size",As="Undefined reader",Rs="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",xs="Zip file not empty",zs="Invalid uid (must be integer 0..2^32-1)",Ds="Invalid gid (must be integer 0..2^32-1)",Fs="Invalid UNIX mode (must be integer 0..65535)",Os="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",Us="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Is="Invalid msdosAttributesRaw (must be integer 0..255)",Ts="Invalid msdosAttributes (must be an object with boolean flags)",ks="Invalid level (must be integer 0..9)",Cs="Signature data exceeds 64KB",vs="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Ms="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",Ns="compression unavailable",_s="clamped last modification date",js=new Uint8Array([7,0,2,0,65,69,3,0,0]),Ps="infozip",Bs="unix",Ls=[8,9,5,3];let Ws=0;const Zs=[];class Vs{constructor(t,e={}){t=new vo(t);const{availableSize:r=I,maxSize:n=I}=t,o=r>0&&r!==I&&n>0&&n!==I;if(o&&e[K])throw new Error(ss);Object.assign(this,{writer:t,Ot:o,options:e,Ut:new Map,It:new Set,offset:e[Y]===U?t.size||t.writable.size||0:e[Y],Tt:e[Y]===U?0:e[Y]-(t.size||t.writable.size||0),kt:new Set,Ct:[],warnings:[],vt:0,Mt:0,Nt:U,_t:!1})}prependZip(t){return Ys(this,async function(t,e){if(t.It.size)throw new Error(xs);await t.jt(e)}(this,t))}appendZip(t){return Ys(this,this.jt(t))}async jt(t){const e=this,{kt:r,It:n,Ut:a}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let i;const s=new Promise(t=>i=t);r.add(s);const c=[];let u;try{t=new Co(t),await No(t),t.size!==U&&t.readUint8Array||(t=new no(await tr(t.readable)),await No(t));const{ZipReader:r}=await Promise.resolve().then(function(){return Xi}),i=new r(t),s=await i.getEntries();await i.close(),await No(e.writer);const{directoryOffset:l}=i;s.forEach(({filename:t})=>{if(n.has(t))throw new Error($i);n.add(t),c.push(t)}),e.Pt=!0;const{Bt:f}=e;e.Bt=new Promise(t=>u=()=>{e.Pt=!1,t()}),await f,e.Ot&&(delete e.Ot,await async function(t){return Wt(await jo(t,0,4)).getUint32(0,!0)==o}(t)||(await Ec(e.writer,yc()),e.offset+=4));const d=await async function(t,e,r,n){const{writer:o}=t,a=new Map;if(o.closeDisk){const i=Array.from(r).sort((t,r)=>hc(e,t)-hc(e,r));let s=0;for(const r of i){const n=hc(e,r);await pc(t,e,s,n-s),fc(o,await mc(e,n))&&await o.closeDisk(),a.set(r,{offset:dc(t,o),diskNumberStart:uc(o)}),s=n}await pc(t,e,s,n-s)}else{const o=t.offset;await pc(t,e,0,n),r.forEach(t=>a.set(t,{offset:o+hc(e,t),diskNumberStart:0}))}return a}(e,t,s,l);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:i,uncompressedSize:s,compressedSize:c,extraFieldZip64:u}=t;let{compressionMethod:l,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:m}=o;f=wc(f||N),t.extraFieldAES&&(l=99);const h=Mc(f),y=Boolean(u)&&u.uncompressedSize!==U,b=Boolean(u)&&u.compressedSize!==U,E=-7&jc(w,p,m,i,l)|w<<1,{Lt:S,Wt:g}=Nc({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,Zt:b,Vt:y,extraFieldLength:h}),{crc32:A}=t;A!==U&&kc(g,10,A);const{offset:R,diskNumberStart:x}=d.get(t);Object.assign(t,{Ht:!0,Vt:y,Zt:b,offset:R,diskNumberStart:x,Gt:!1,qt:N,Yt:N,Kt:N,Xt:N,$t:N,Jt:N,rawExtraField:f,Qt:N,Lt:S,Wt:g}),a.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{i(),r.delete(s),u&&u()}}add(e="",n,o={}){const a=this,{kt:i}=a,s=async function(e,n,o,a){const i=(a=Object.assign({},a))[J];if(i!==U){const{te:t,ee:r}=$s(i,pt(xc(e,a,B)),xc(e,a,Ko));delete a[J],a=Object.assign(t,r,a)}if(xc(e,a,fa)&&!n.endsWith(z)&&(n+=z),e.It.has(n))throw new Error($i);e.It.add(n),Ws<Tt().maxWorkers?Ws++:await new Promise(t=>Zs.push(t));try{return await async function(e,n,o,a){const i=Js(e,n,a);({name:n}=i);const s=Qs(e,n,a),{comment:c}=s,u=a[ma];e.Ut.set(n,U);const l=e.Nt,f={};let d,w;s.re.keepOrder&&(f.ne=new Promise(t=>d=t)),e.Nt=f;try{const{re:c}=s;0==c.level||c.compressionMethod!==U||c.oe||await Jr(Tt())||(c.level=0,Bo(e.warnings,Ns,n));const u=await async function(t,e,{re:r},n){if(r.oe&&!e&&!xc(t,n,fa))throw new Error(As);let o;if(e){if(e=new Co(e),await No(e),!e.readUint8Array&&!e.readable)throw new Error(Rs);({size:o}=e)}return Object.assign({reader:e},ec(t,Boolean(e),o,r,n))}(e,o,s,a);({reader:o}=u);const p=lc(e.writer),m=uc(e.writer);let h=a.crc32===U?a[pa]:a.crc32;const y=u.re.encrypted&&!c.zipCrypto;if(c.oe&&!c.ae&&y&&(h=U),c.oe&&o&&!y&&h===U)throw new Error(Ss);const b=nc(a=Object.assign({},a,i.re,s.re,u.re,{signature:a[pa],crc32:h,offset:e.offset-p,diskNumberStart:m,[K]:e.options[K]}));b.ie&&Bo(e.warnings,_s,n);const E=ic(a),S=Mc(b.se,E.ce);w=await async function(e,n,o,a,i){const{Ut:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,ue:f,signal:d}=i,{le:w,Dt:p,fe:m,de:h}=a,y=e.options[K];let b,E,S,g,A,R,x,z=p,F=0;const O=u&&m?m.ne:U;s.set(n,z);try{i.bufferedWrite||!u||e.Pt||e.vt||e.Mt||!l&&!f?(b=!0,e.vt++,x=i.createTempStream?await i.createTempStream():new TransformStream(U,U,{highWaterMark:I}),x.size=0,await No(c)):(E=!0,e.Mt++,x=c,await O,await T()),await No(x);const p=lc(c);e.Ot&&!b&&await bc(e,c),y&&!b&&oc(a,e.offset-p);const{se:m}=w;b||await k();const h=uc(c),S=dc(e,c);if(z.diskNumberStart=h,b||(A=!0,R=c.size,await Ec(x,m)),z=await async function(e,n,{diskNumberStart:o,ne:a},i,s,c){const{le:u,we:l,pe:f}=i,{Lt:d,Wt:w,lastModDate:p,rawLastModDate:m,encrypted:h,compressed:y,version:b,compressionMethod:E,qt:S,me:g,Kt:A,he:R,ye:x,Xt:z,$t:D,Jt:F,Yt:O}=u,{ce:I}=l,{rawFilename:T,lastAccessDate:k,creationDate:C,password:v,rawPassword:M,level:N,useUnicodeFileNames:_,zip64:j,Ht:P,Vt:B,Zt:L,zipCrypto:W,dataDescriptor:Z,directory:V,executable:H,versionMadeBy:G,rawComment:q,rawExtraField:Y,Qt:K,useWebWorkers:X,onstart:$,onprogress:J,onend:Q,signal:tt,encryptionStrength:et,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,uid:it,gid:st,unixMode:ct,symlink:ut,setuid:lt,setgid:ft,sticky:wt,unixExternalUpper:pt,msdosAttributesRaw:mt,msdosAttributes:ht,useCompressionStream:yt,oe:bt,ae:Et,format:St,codecURI:gt}=c,At={ne:a,versionMadeBy:G,zip64:j,Ht:P,directory:Boolean(V),executable:Boolean(H),filenameUTF8:Boolean(_),rawFilename:T,commentUTF8:Boolean(_),rawComment:q,qt:S,me:g,Kt:A,Xt:z,$t:D,Jt:F,Yt:O,rawExtraField:Y,Qt:K,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,diskNumberStart:o,uid:it,gid:st,unixMode:ct,symlink:Boolean(ut),setuid:lt,setgid:ft,sticky:wt,unixExternalUpper:pt,msdosAttributesRaw:mt,msdosAttributes:ht};let{crc32:Rt,uncompressedSize:xt}=c,zt=0;bt||(xt=0);const{writable:Dt}=n;if(e){const o=e.size,a=Qe(Po(e,{size:o})),i={options:{codecType:Zr,inputSize:o,level:N,rawPassword:M,password:v,encryptionStrength:et,zipCrypto:h&&W,passwordVerification:h&&W&&m>>8&r,computeCrc32:!bt,compressed:y&&!bt,encrypted:h&&!Et,useWebWorkers:X,useCompressionStream:yt,format:St,codecURI:gt,compressionMethod:E},config:s,F:{signal:tt,size:o,onstart:$,onprogress:J,onend:Q}};try{const e=await zn({readable:a,writable:Dt},i);if(zt=e.outputSize,n.size+=zt,dt(tt),bt||(xt=e.inputSize,h&&!W||(Rt=e.crc32)),!L&&zt>=t||!B&&xt>=t)throw new Error(ys)}catch(t){const{outputSize:e}=i;throw e!==U?n.size+=e:Zt(t)&&t.outputSize!==U&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,le:n,we:o},{zip64:a,zipCrypto:i,oe:s,dataDescriptor:c}){const{Wt:u,encrypted:l}=n,{be:f,Ee:d}=o;l&&!i&&!s||t===U||(kc(u,10,t),c&&kc(f,d,t)),a?c&&(Cc(f,d+4,BigInt(e)),Cc(f,d+12,BigInt(r))):(kc(u,14,e),kc(u,18,r),c&&(kc(f,d+4,e),kc(f,d+8,r)))}({crc32:Rt,compressedSize:zt,uncompressedSize:xt,le:u,we:l},c),Z&&await Ec(n,I),Object.assign(At,{uncompressedSize:xt,compressedSize:zt,lastModDate:p,rawLastModDate:m,creationDate:C,lastAccessDate:k,encrypted:Boolean(h),zipCrypto:Boolean(W),size:f+zt,compressionMethod:E,version:b,Lt:d,Wt:w,signature:Rt,crc32:!h||W||bt?Rt:U,he:R,ye:x,Vt:B,Zt:L}),At}(o,x,z,a,Tt(),i),b||(A=!1),s.set(n,z),z.filename=n,b){if(await Promise.all([x.writable.getWriter().close(),O]),await T(),e.Ot&&await bc(e,c),g=!0,R=c.size,await k(),z.diskNumberStart=uc(c),z.offset=dc(e,c),y){const t=a.pe;oc(a,e.offset-lc(c)),z.size+=a.pe-t}!function({rawFilename:t,encrypted:e,zip64:r,me:n,crc32:o,compressedSize:a,uncompressedSize:i,Vt:s,Zt:c},u,{dataDescriptor:l,oe:f}){if(l||((!e||f&&o!==U)&&kc(u,14,o),c||kc(u,18,a),s||kc(u,22,i)),r&&n){const e=D+Mc(t)+4;Cc(u,e,BigInt(i)),Cc(u,e+8,BigInt(a))}}(z,w.Se,i),await Ec(c,w.se),await Sc(x.readable,c,d,t=>F+=t),c.size+=x.size,g=!1}else z.diskNumberStart=h,z.offset=S;return e.offset+=z.size,z}catch(t){if(g||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,b&&(e.offset+=F)}throw s.delete(n),t}finally{if(b&&e.vt--,E&&e.Mt--,h&&h(O),S&&S(),b&&x&&x.dispose)try{await x.dispose()}catch{}}async function T(){e.Pt=!0;const{Bt:t}=e;e.Bt=new Promise(t=>S=()=>{e.Pt=!1,t()}),await t}async function k(){fc(c,Mc(w.se))&&await c.closeDisk()}}(e,n,o,{le:b,we:E,pe:S,Dt:f,fe:l,de:d},a)}catch(t){throw e.Ut.delete(n),t}finally{d&&d(l&&l.ne)}return Object.assign(w,{name:n,comment:c,extraField:u}),new ga(w)}(e,n,o,a)}catch(t){throw e.It.delete(n),t}finally{const t=Zs.shift();t?t():Ws--}}(a,e,n,o);i.add(s);const c=()=>i.delete(s);return Promise.prototype.then.call(s,c,c),Ys(a,s)}remove(t){const{It:e,Ut:r}=this;if(typeof t==v&&(t=r.get(t)),t&&t.filename!==U){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=N,n={}){const o=this,{kt:a,writer:w}=this,{writable:p}=w;if(o._t)return qs(w);if(!(r instanceof Uint8Array))throw new Error(Qi);if(Mc(r)>e)throw new Error(Ji);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.Ct.map(t=>t.ge));const m=o.Ct.filter(t=>t.Ae&&!t.Re);if(m.length){const t=m.map(t=>t.error);m.forEach(t=>t.Re=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{xe:a,ze:w}=sc(r.Ut),{De:p,Fe:m,Oe:h}=await async function(r,n,o){const{Ut:a,writer:i}=r,c=new Uint8Array(n);await No(i);let u=0,l=0,d=uc(i),w=lc(i),p=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:m,rawFilename:h,qt:y,Yt:b,Kt:E,Xt:S,Jt:g,rawExtraField:A,Qt:R,rawComment:x,versionMadeBy:z,Lt:D,Wt:F,Vt:O,Zt:U,Gt:I,Ue:T,internalFileAttributes:k,externalFileAttributes:C,diskNumberStart:v,uncompressedSize:M,compressedSize:N}=n,_=Mc(y,b,E,S,g,A,R),j=f+Mc(h,x)+_;fc(i,u+j-l)&&(await Ec(i,c.slice(l,u)),l=u,p=0,await i.closeDisk()),0==r&&(d=uc(i),w=lc(i)),O||kc(F,18,M),U||kc(F,14,N),(T||I)&&n.version<45&&Tc(F,0,45);const P=cc(j);if(P.Ie(s),P.Te(z),P.ke(D.subarray(0,24)),P.Te(_),P.Te(Mc(x)),P.Te(I?e:v),P.Te(k),P.Ie(C),P.Ie(T?t:m),P.ke(h),P.ke(y),P.ke(b),P.ke(E),P.ke(S),P.ke(g),P.ke(A),P.ke(R),P.ke(x),vc(c,P.ct,u),u+=j,p++,o.onprogress)try{await o.onprogress(r+1,a.size,new ga(n))}catch{}}return await Ec(i,l?c.slice(l):c),{De:{diskNumber:d,diskOffset:w},Fe:{diskNumber:uc(i),Ce:p},Oe:c}}(r,a,o),y=await async function(t,r,n){const o=Dc(t,n,$);if(o){const n=await o(r),a=Mc(n);if(a>e)throw new Error(Cs);const s=cc(6+a);s.Ie(i),s.Te(a),s.ke(n);const{writer:c}=t;return fc(c,Mc(s.ct))&&await c.closeDisk(),await Ec(c,s.ct),6+a}return 0}(r,h,o);await async function(r,n,o,a){const{writer:i}=r,{De:s,Fe:f,ve:w,ze:p}=a;let{xe:m}=a,h=r.Ut.size,y=s.diskNumber,b=dc(r,s);const E=Mc(n);if(E>e)throw new Error(Ji);let S=xc(r,o,ia),g=uc(i);if(fc(i,(S?98:d)+E)&&g++,b>=t||m>=t||h>=e||g>=e){if(!1===S)throw new Error(ys);S=!0}else S===U&&p&&(S=!0);const A=cc(S?98:d);fc(i,Mc(A.ct)+E)&&await i.closeDisk(),g=uc(i);let R=g==f.diskNumber?f.Ce:0;S&&(A.Ie(u),A.Me(44),A.Te(45),A.Te(45),A.Ie(g),A.Ie(y),A.Me(R),A.Me(h),A.Me(m),A.Me(b),A.Ie(l),A.Ie(g),A.Me(BigInt(dc(r,i))+BigInt(m)+BigInt(w)),A.Ie(g+1),xc(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,h=e,b=t,m=t),A.Ie(c),A.Te(g),A.Te(y),A.Te(R),A.Te(h),A.Ie(m),A.Ie(b),A.Te(E),await Ec(i,A.ct),E&&await Ec(i,n)}(r,n,o,{De:p,Fe:m,xe:a,ve:y,ze:w})}(o,r,n),o._t=!0,!Mo(w)&&xc(o,n,V)||await p.getWriter().close(),qs(w)}[_](){return this.close()}}class Hs{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new Vs(r,t),this.kt=new Set}transform(t){const e=this.zipWriter;let r;const{readable:n,writable:o}=new TransformStream({start(t){r=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Ks(e,t)}}()}});return Xs(this,this.zipWriter.add(t,n),t=>r.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}});return Xs(this,this.zipWriter.add(t,r),t=>e.error(t)),n}async close(t,e={}){const{zipWriter:r}=this,n=(await Promise.allSettled(Array.from(this.kt))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await Ks(r,t),t}try{return await r.close(t,e)}catch(t){throw await Ks(r,t),t}}}class Gs extends Promise{then(t,e){const{Ne:r}=this;return r&&(r.Re=!0),super.then(t,e)}}function qs(t){return t.getData?t.getData():t.writable}function Ys(t,e){const r=new Gs((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.Ne=n,n.ge=Promise.prototype.then.call(r,U,t=>Object.assign(n,{Ae:!0,error:t})),t.Ct.push(n),r}async function Ks(t,e){try{await t.writer.writable.abort(e)}catch{}}function Xs(t,e,r){t.kt.add(e),e.catch(t=>{try{r(t)}catch{}})}function $s(t,e,n){if(null===t||typeof t!=C||Array.isArray(t))throw new Error(vs);const{externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,rawLastModDate:c,creationDate:u,lastAccessDate:l,uncompressedSize:f,encrypted:d,zipCrypto:w,crc32:p,compressionMethod:m,extraFieldAES:h,extraFieldUnix:y,internalFileAttributes:b,extraField:E,bitFlag:S,directory:g,uid:A,gid:R}=t,x={externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,creationDate:u,lastAccessDate:l,internalFileAttributes:b,directory:g};S&&S.languageEncodingFlag&&(x[G]=!0);const z=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{Aa.has(r)||e.set(r,t.data)}),e.size)return e}}(E);z&&(x[ma]=z),A===U&&R===U||Object.assign(x,{uid:A,gid:R,unixExtraFieldType:y?Bs:Ps});const D={};if(e&&!g)if(Object.assign(D,{uncompressedSize:f,crc32:p,compressionMethod:m}),e!==ot&&Object.assign(D,{encrypted:d,zipCrypto:w,encryptionStrength:h?h.strength:U}),S&&(D.dataDescriptor=S.dataDescriptor,D[H]=Ls[S.level]),n===U)D.rawLastModDate=c;else if(e!==ot&&w&&(!S||S.dataDescriptor)&&n instanceof Date&&function(t){let e=new Date(2e3*Math.ceil(Math.floor(t.getTime()/1e3)/2));return e<O?e=O:e>F&&(e=F),(e.getHours()<<3|e.getMinutes()>>3)&r}(n)!=(c>>>8&r))throw new Error(Ms);return{te:x,ee:D}}function Js(n,o,a){let i=xc(n,a,aa),s=xc(n,a,ua,i?20:768);const c=xc(n,a,da),u=Fc(n,a,"uid"),l=Fc(n,a,"gid");let f=Fc(n,a,ha),d=xc(n,a,"unixExtraFieldType"),w=xc(n,a,ya),p=xc(n,a,ba),m=xc(n,a,Ea);if(ht(u,t,zs),ht(l,t,Ds),ht(f,e,Fs),d!==U&&d!==Ps&&d!==Bs)throw new Error(Os);if(d===Bs&&(u!==U&&u>e||l!==U&&l>e))throw new Error(Us);d!==U||u===U&&l===U||(d=Ps);let h=Fc(n,a,na),y=xc(n,a,oa);const b=h!==U||y!==U;if(u!==U||l!==U||f!==U||d||c?(i=!1,s=s&r|768):b&&(i=!0,s&=r),ht(h,r,Is),y&&(typeof y!==C||Array.isArray(y)))throw new Error(Ts);if(s>e)throw new Error(os);let E=xc(n,a,ra);const S=E!==U;S||(E=0),!a[fa]&&o.endsWith(z)&&(a[fa]=!0);const D=xc(n,a,fa);if(D?(o.endsWith(z)||(o+=z),S||(E=16,i||(E|=16877<<16))):i||S||(E=c?493<<16:27525120),!i){const t=f!==U||Boolean(w||p||m);f=f===U?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),p?f|=x:p=Boolean(f&x),m?f|=512:m=Boolean(512&f),S&&!t||(D?f=-61441&f|A:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:h,msdosAttributes:y}=function(t,e){if(t!==U)t&=r;else if(e!==U){const{readOnly:n,hidden:o,system:a,directory:i,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),a&&(c|=4),i&&(c|=16),s&&(c|=32),t=c&r}return e===U&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,y)),b&&(E=E&t|h&r);const F=E>>16&e,O=f!==U&&40960==(f&g);return{name:o,re:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:E,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:O,setuid:w,setgid:p,sticky:m,msdosAttributesRaw:h,msdosAttributes:y}}}function Qs(t,r,n){const o=Dc(t,n,"encodeText")||ee;let a=o(r,Q);if(a===U&&(a=ee(r)),Mc(a)>e)throw new Error(ns);const i=n[Zo]||"";if(typeof i!=v)throw new Error(es);let s=o(i,tt);if(s===U&&(s=ee(i)),Mc(s)>e)throw new Error(ts);const c=xc(t,n,ca);if(c!==U&&c>e)throw new Error(os);const u=zc(t,n,Ko,new Date),l=xc(t,n,Xo),f=zc(t,n,$o),d=zc(t,n,Qo),w=xc(t,n,ea,0),p=pt(xc(t,n,B)),m=Boolean(p),h=!0===p;let y=xc(t,n,j),b=xc(t,n,P);wt(y,b),y=y&&y.length?y:U,b=b&&b.length?b:U;const E=Fc(t,n,"encryptionStrength",3),S=xc(t,n,la),g=xc(t,n,"extendedTimestamp",!0),A=xc(t,n,"ntfsTimestamp"),R=xc(t,n,"keepOrder",!0),x=xc(t,n,W),z=xc(t,n,"bufferedWrite"),D=Dc(t,n,"createTempStream"),F=xc(t,n,"dataDescriptorSignature",!0),O=ft(xc(t,n,L));dt(O);const I=xc(t,n,G,!_c(a)||!_c(s)),T=xc(t,n,wa),k=m||T===U?U:fr(T);if(!m&&T!==U&&0!==T&&8!==T&&!k)throw new Error(ar);let C=Fc(t,n,H);if(ht(C,9,ks),t.options[K]){if(y!==U||b!==U)throw new Error(is);C===U&&T===U&&(C=0)}m&&(C=yt(n[H]));let M=xc(t,n,Z),N=xc(t,n,q);z&&N===U&&(N=!1),(N===U||S&&!h)&&(N=!0),C!==U&&6!=C&&(M=!1);const _=xc(t,n,ia);if(!(S||y===U&&b===U||Number.isInteger(E)&&E>=1&&E<=3))throw new Error(as);const V=tc(n[ma]),Y=tc(n.localExtraField),X=tc(n.centralExtraField);return{comment:i,re:{rawFilename:a,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,oe:m,ae:h,password:y,rawPassword:b,encryptionStrength:E,zipCrypto:S,extendedTimestamp:g,ntfsTimestamp:A,keepOrder:R,useWebWorkers:x,bufferedWrite:z,createTempStream:D,dataDescriptorSignature:F,signal:O,useUnicodeFileNames:I,compressionMethod:T,format:k?k.format:U,codecURI:k?k.codecURI:U,_e:k?k.versionNeeded:U,level:C,useCompressionStream:M,dataDescriptor:N,zip64:_,rawExtraField:V,je:Y,Qt:X}}}function tc(t){if(!t)return N;if(!(t instanceof Map))throw new Error(us);let r=0,n=0;t.forEach((t,n)=>{if(mt(n,e,ls),!(t instanceof Uint8Array))throw new Error(fs);if(Mc(t)>e)throw new Error(ds);r+=4+Mc(t)});const o=new Uint8Array(r),a=Wt(o);return t.forEach((t,e)=>{Tc(a,n,e),Tc(a,n+2,Mc(t)),vc(o,t,n+4),n+=4+Mc(t)}),o}function ec(e,r,n,o,a){const{oe:i,ae:s,zipCrypto:c,password:u,rawPassword:l,encryptionStrength:f}=o;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:m}=o,h=0,y=0,b=!1;if(i&&r){if(y=a[Ho],y===U)throw new Error(bs);if(m===U)throw new Error(Es)}const E=!0===w,S=xc(e,a,sa);if(r&&s&&!S&&Mc(u,l))throw new Error(cs);const g=r&&(Boolean(u&&Mc(u)||l&&Mc(l))||s&&S);r||(p=0,m=0);const A=Ra(g,c,f);r&&(i?(a.uncompressedSize=y,h=n===U?Oc(y)+A:n+(s?0:A)):n===U?(d=!0,(w||w===U)&&(w=b=!0,h=4294967296)):(a.uncompressedSize=y=n,h=(Uc(m,p)?Oc(y):y)+A));const R=!(g||r&&(0!==n||i)||Uc(m,p));R&&xc(e,a,q)===U&&(d=!1);const x=E||b||y>=t,z=E||h>=t;if(x||z){if(!1===w)throw new Error(ys);w=!0}return w=w||!1,{Pe:h,re:{dataDescriptor:d,ue:R,zip64:w,Ht:E,Be:b,Vt:x,Zt:z,uncompressedSize:y,level:p,compressionMethod:m,encrypted:g}}}function rc(e,r,n){const o=e.slice().sort((t,e)=>n?e-t:t-e);let a=r,i=0;for(const e of o){if(a>=t)break;a+=e,i++}return i}function nc(t){const{rawFilename:r,lastModDate:o,rawLastModDate:a,lastAccessDate:i,creationDate:s,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:d,directory:w,rawExtraField:p,je:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,oe:R,encrypted:x,Vt:z,Zt:I,uncompressedSize:T,Be:k,crc32:C}=t;let{version:v,compressionMethod:M}=t;const _=!w&&Uc(M,c);let j;const P=R||!_,B=u&&(t.bufferedWrite||!d||!z&&!I||P&&!k),L=B||u&&d&&(z||I);if(u&&(z||I)){const t=20,e=cc(t);if(e.Te(1),e.Te(t-4),j=e.ct,B&&(e.Me(T),P)){const t=Ra(x,l,S);e.Me(R?0:T+t)}}else j=N;let W,Z,V,H,G;if(x&&!l){const t=cc(Mc(js)+2);t.Te(m),t.ke(js),W=t.ct,W[8]=S}else W=N;if(g){const t=Ac(o),e=(q=t)>=ws&&q<=ps;if(e){const e=9+(i?4:0)+(s?4:0),r=cc(e);H=1+(i?2:0)+(s?4:0),G=t,r.Te(h),r.Te(e-4),r.Le(H),r.Ie(t),i&&r.Ie(Rc(Ac(i))),s&&r.Ie(Rc(Ac(s))),V=r.ct}else V=N;if(A===U?!e||Boolean(i||s):A)try{const t=gc(o),e=cc(36);e.Te(10),e.Te(32),e.We(4),e.Te(1),e.Te(24),e.Me(t),e.Me(i?gc(i):t),e.Me(s?gc(s):t),Z=e.ct}catch{Z=N}else Z=N}else Z=V=N;var q;let Y,X;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=Ps||r===U&&n===U)if(o!=Bs||r===U&&n===U)Y=X=N;else{const t=cc(8);t.Te(E),t.Te(4),t.Te((r===U?0:r)&e),t.Te((n===U?0:n)&e),Y=t.ct;const o=cc(4);o.Te(E),o.Te(0),X=o.ct}else{const t=ac(r===U?0:r),e=ac(n===U?0:n),o=3+t.length+e.length,a=cc(4+o);a.Te(b),a.Te(o),a.Le(1),a.Le(t.length),a.ke(t),a.Le(e.length),a.ke(e),Y=X=a.ct}}catch{Y=X=N}M===U&&(M=_?8:0),v===U&&(v=0!=M||w||x?20:10);const{_e:$}=t;_&&$!==U&&(v=v>$?v:$),u&&(v=v>45?v:45),x&&!l&&(v=v>51?v:51,R&&C!==U&&(W[4]=1),Tc(Wt(W),9,M),M=99);const J=L?Mc(j):0,Q=J+Mc(W,V,Z,Y,p,y);if(Q+(t[K]?67:0)>e)throw new Error(ds);const tt=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),et=tt<O?O:tt>F?F:tt,rt=Mc(V)?new Date(1e3*Ac(o)):Mc(Z)?o:et,{Lt:nt,Wt:ot,rawLastModDate:at}=Nc({version:v,bitFlag:jc(c,f,d,x,M),compressionMethod:M,uncompressedSize:T,lastModDate:et,rawLastModDate:a,rawFilename:r,Zt:I,Vt:z,extraFieldLength:Q}),it=cc(D+Mc(r)+Q),st=it.ct,ct=Wt(st);return it.Ie(n),it.ke(nt),it.ke(r),L&&it.ke(j),it.ke(W),it.ke(V),it.ke(Z),it.ke(Y),it.ke(p),it.ke(y),d&&(I||kc(ct,18,0),z||kc(ct,22,0)),{se:st,Se:ct,Lt:nt,Wt:ot,lastModDate:rt,ie:rt===et&&tt.getTime()!=et.getTime(),rawLastModDate:at,encrypted:x,compressed:_,version:v,compressionMethod:M,he:H,ye:G,qt:N,me:J,Kt:V,Xt:Z,$t:Y,Jt:X,Yt:W,extraFieldLength:Q}}function oc(t,e){const{le:r}=t;let{se:n,extraFieldLength:o}=r,a=64-(e+Mc(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=Wt(i);Tc(s,0,y),Tc(s,2,a-4);const c=n;r.se=n=new Uint8Array(Mc(c)+a),vc(n,c),vc(n,i,Mc(c));const u=Wt(n);Tc(u,28,o+a),r.Se=u,t.pe+=a}function ac(t){const e=new Uint8Array(4);Wt(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function ic({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=N,i=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Wt(o),r&&(i=4,kc(n,0,a))),{ce:o,be:n,Ee:i}}function sc(r){let n=0,o=!1;for(const[,a]of r){const{rawFilename:r,Yt:i,rawComment:s,Xt:c,Jt:u,rawExtraField:l,Qt:d,he:w,ye:p,Ht:m,uncompressedSize:y,compressedSize:b}=a;let{Vt:E,Zt:S}=a;m||(E&&y<t&&(E=a.Vt=!1),S&&b<t&&(S=a.Zt=!1)),o=o||E||S;const g=a.offset>=t,A=a.diskNumberStart>=e;let R,x;if(g||A||E||S){const t=4+(E?8:0)+(S?8:0)+(g?8:0)+(A?4:0),e=cc(t);e.Te(1),e.Te(t-4),E&&e.Me(y),S&&e.Me(b),g&&e.Me(a.offset),A&&e.Ie(a.diskNumberStart),R=e.ct}else R=N;if(a.qt=R,a.Ue=g,a.Gt=A,p===U)x=N;else{const t=cc(9);t.Te(h),t.Te(5),t.Le(w),t.Ie(p),x=t.ct}a.Kt=x;const z=Mc(R,i,c,u,x,l,d);if(z>e)throw new Error(ds);n+=f+Mc(r,s)+z}return{xe:n,ze:o}}function cc(t){const e=new Uint8Array(t),r=Wt(e);let n=0;return{ct:e,Le:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},Te:t=>{Tc(r,n,t),n+=2},Ie:t=>{kc(r,n,t),n+=4},Me:t=>{Cc(r,n,BigInt(t)),n+=8},ke:t=>{vc(e,t,n),n+=Mc(t)},We:t=>n+=t}}function uc(t){const{diskNumber:e=0}=t;return e}function lc(t){const{diskOffset:e=0}=t;return e}function fc(t,e){const{availableSize:r=I}=t;return e>r}function dc(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.Tt:0)}function wc(t){const e=Wt(t);let r=0;for(;r+4<=Mc(t);){const n=4+Ic(e,r+2);if(1==Ic(e,r))return wc(Bt(t.subarray(0,r),t.subarray(Math.min(r+n,Mc(t)))));r+=n}return t}async function pc(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await Sc(Po(e,{offset:r,size:n}),o,U,t=>a+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=a,t.offset+=a}}}async function mc(t,e){const r=await jo(t,e,D);if(Mc(r)<D)return D;const n=Wt(r);return D+Ic(n,26)+Ic(n,28)}function hc(t,{offset:e,diskNumberStart:r}){return e+(t.ht?t.ht(r):0)}function yc(){const t=new Uint8Array(4);return kc(Wt(t),0,o),t}async function bc(t,e){delete t.Ot,await Ec(e,yc()),t.offset+=4}async function Ec(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Mc(e),await n.write(e)}finally{n.releaseLock()}}async function Sc(t,e,r,n){const o=e.writable.getWriter();try{await t.pipeTo(new WritableStream({async write(t){await o.ready,await o.write(t),n(Mc(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function gc(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<ms?ms:e>hs?hs:e}}function Ac(t){return Math.floor(t.getTime()/1e3)}function Rc(t){return Math.min(ps,Math.max(ws,t))}function xc(t,e,r,n){const o=e[r]===U?t.options[r]:e[r];return o===U?n:o}function zc(t,e,r,n){const o=xc(t,e,r,n);if(null===o)return n;if(o!==U&&(typeof o.getTime!=k||Number.isNaN(o.getTime())))throw new Error(rs);return o}function Dc(t,e,r){return lt(xc(t,e,r))}function Fc(t,e,r,n){return yt(xc(t,e,r,n))}function Oc(t){return t+5*(Math.floor(t/16383)+1)}function Uc(t,e){return t===U?e===U||e>0:0!==t}function Ic(t,e){return t.getUint16(e,!0)}function Tc(t,e,r){t.setUint16(e,r,!0)}function kc(t,e,r){t.setUint32(e,r,!0)}function Cc(t,e,r){t.setBigUint64(e,r,!0)}function vc(t,e,r){t.set(e,r)}function Mc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Nc({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:a,lastModDate:i,rawLastModDate:s,rawFilename:c,Zt:u,Vt:l,extraFieldLength:f}){const d=cc(26),w=d.ct,p=Wt(w);if(d.Te(e),d.Te(r),d.Te(n),s===U){const t=new Uint32Array(1),e=Wt(t);Tc(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),Tc(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return d.Ie(s),d.We(4),u||a!==U?d.Ie(u?t:a):d.We(4),l||o!==U?d.Ie(l?t:o):d.We(4),d.Te(Mc(c)),d.Te(f),{Lt:w,Wt:p,rawLastModDate:s}}function _c(t){return t.every(t=>t>=32&&t<=126)}function jc(t,e,r,n,o){let a=0;return e&&(a|=S),r&&(a|=8),8!=o&&9!=o||(t>=0&&t<=3&&(a|=6),t>3&&t<=5&&(a|=4),9==t&&(a|=2)),n&&(a|=1),a}function Pc(){return"application/octet-stream"}function Bc(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=Tt(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Lc(r,Er)||Lc(t,Er)||Lc(t,gr),decompression:Lc(n,Er)||Lc(e,Er)||Lc(e,gr),registered:!1},{compressionMethod:9,compression:!1,decompression:Lc(n,Sr)||Lc(e,Sr),registered:!1}];for(const t of dr()){const e=wr(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==k:U,decompression:e?typeof e.DecompressionStream==k:U,registered:!0})}return o}function Lc(t,e){if(!t)return!1;const{supportedFormats:r}=t;return r?r.includes(e):Fr(t,e)}const Wc="2.19.0",Zc=1048576,Vc=".zip.js-temp";function Hc(t={}){const{thresholdBytes:e=Zc,directoryName:r=Vc,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function a(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,i,s=0,c=!1;const u=new WritableStream({async write(i){c?await o.write(i):(t.push(i),s+=i.length,s>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let l=0;return{writable:u,readable:new ReadableStream({async pull(e){if(c){if(!i){const t=await n.getFile();i=t.stream().getReader()}const{value:t,done:r}=await i.read();r?e.close():e.enqueue(t)}else l<t.length?e.enqueue(t[l++]):e.close()},async cancel(t){i&&await i.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const Gc=1048576;function qc(t={}){const{thresholdBytes:e=Gc}=t;return function(){const t=[];let r,n,o,a=0,i=!1;const s=new WritableStream({async write(o){i?await r.write(o):(t.push(o),a+=o.length,a>e&&await async function(){const e=new TransformStream;n=tr(e.readable),r=e.writable.getWriter(),i=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(i){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const Yc=1048576,Kc=".zip.js-temp",Xc="createSyncAccessHandle is only available in dedicated workers";function $c(t={}){const{thresholdBytes:e=Yc,directoryName:r=Kc,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(Xc);const o=n||(()=>navigator.storage.getDirectory());let a;function i(){return a||(a=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),a}return function(){const t=[];let r,n,o=0,a=!1,s=0,c=0;const u=new WritableStream({async write(c){a?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),a=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let l=0;const f=new ReadableStream({pull(e){if(a){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else l<t.length?e.enqueue(t[l++]):e.close()}},{highWaterMark:0});return{writable:u,readable:f,dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{jt({baseURI:import.meta.url})}catch{}const Jc="deflate",Qc="deflate-raw",tu="deflate64-raw",eu="gzip",ru=[Jc,Qc,eu],nu=[Jc,Qc,eu,tu];let ou,au,iu,su,cu;function uu(t,e){return-4===e&&(t.code="Z_MEM_ERROR"),t}function lu(t,e,r={}){if(!(t?ru:nu).includes(e))throw new TypeError("Unsupported format: "+e);if(!ou){const t=new Error("WASM module not loaded");throw t.cause=cu,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,a="number"==typeof r.inBufferSize?r.inBufferSize:65536,i={Ze:0,in:0,inBufferSize:0,Ve:0,He:!1};let s,c,u,l,f=!0,d=!1;return function(){try{let r;if(i.Ze=au(o),i.in=au(a),i.inBufferSize=a,!i.Ze||!i.in)throw uu(new Error("allocation failed"),-4);if(t?(i.Ge=ou.deflate_process,i.qe=ou.deflate_last_consumed,i.Ye=ou.deflate_end,i.Ve=ou.deflate_new(),r=e===eu?ou.deflate_init_gzip(i.Ve,n):e===Qc?ou.deflate_init_raw(i.Ve,n):ou.deflate_init(i.Ve,n)):e===tu?(i.Ge=ou.inflate9_process,i.qe=ou.inflate9_last_consumed,i.Ye=ou.inflate9_end,i.Ve=ou.inflate9_new(),r=ou.inflate9_init_raw(i.Ve)):(i.Ge=ou.inflate_process,i.qe=ou.inflate_last_consumed,i.Ye=ou.inflate_end,i.Ve=ou.inflate_new(),r=e===Qc?ou.inflate_init_raw(i.Ve):e===eu?ou.inflate_init_gzip(i.Ve):ou.inflate_init(i.Ve)),0!==r)throw uu(new Error("init failed:"+r),r)}catch(t){throw m(i),t}}(),{readable:new ReadableStream({start(t){s=t},pull(){f=!1,p()},cancel(t){d=!0,l=t,m(i),c.error(t),p()}},{highWaterMark:0}),writable:new WritableStream({start(t){c=t},async write(t){if(f&&await new Promise(t=>u=t),d)throw l;try{!function(t){const e=new Uint8Array(su.buffer),r=i.Ge,n=i.qe,a=i.Ze;let s=0;for(;s<t.length;){if(i.He)throw new Error("trailing data after the end of the stream");const c=Math.min(t.length-s,32768);if((!i.in||i.inBufferSize<c)&&(i.in&&iu&&(iu(i.in),i.in=0),i.in=au(c),i.inBufferSize=c,!i.in))throw uu(new Error("allocation failed"),-4);e.set(t.subarray(s,s+c),i.in);const u=r(i.Ve,i.in,c,a,o,0),l=u>>24&255,f=128&l?l-256:l;if(f<0)throw uu(new Error("process error:"+f),f);const d=16777215&u;d&&w(e.slice(a,a+d));const p=n(i.Ve);if(1===l)i.He=!0;else if(0===p&&0===d)break;s+=p}}(t)}catch(t){throw m(i),s.error(t),t}},close(){if(d)return;try{!function(){const t=new Uint8Array(su.buffer),e=i.Ge,r=i.Ze;for(;;){const n=e(i.Ve,0,0,r,o,4),a=n>>24&255,s=128&a?a-256:a;if(s<0)throw uu(new Error("process error:"+s),s);const c=16777215&n;if(c&&w(t.slice(r,r+c)),1===a||0===c)break}}()}catch(t){throw m(i),s.error(t),t}const t=m(i);if(0!==t){const e=uu(new Error("end error:"+t),t);throw s.error(e),e}s.close()},abort(t){m(i),s.error(t)}},{highWaterMark:1})};function w(t){f=!0,s.enqueue(t)}function p(){if(u){const t=u;u=null,t()}}function m(t){let e=0;return t.Ve&&t.Ye&&(e=t.Ye(t.Ve)),t.Ve=0,t.in&&iu&&iu(t.in),t.in=0,t.Ze&&iu&&iu(t.Ze),t.Ze=0,e}}class fu{constructor(t=Jc,e){return lu(!0,t,e)}}class du{constructor(t=Jc,e){return lu(!1,t,e)}}fu.requiresModule=!0,du.requiresModule=!0,fu.supportedFormats=ru,du.supportedFormats=nu;const wu=65536;let pu,mu;function hu(t){return new Uint8Array(t.memory.buffer)}let yu,bu=!1;var Eu;async function Su(){await async function(){await Promise.allSettled([Un(),...Sn.map(t=>(kn(t),t.terminate()))]),Yr=U,Kr=!1}(),yu=null,bu=!1,ou=au=iu=su=cu=null,pu=null,mu=0}Eu=function(t,e){const r=pu;let n=r?function(t,e,r){mu||(mu=t.malloc(wu));const n=mu?t.aes_hmac_new():0;if(n){const o=hu(t);if(o.set(e,mu),o.set(r,mu+e.length),t.aes_hmac_init(n,mu,e.length,mu+e.length,r.length))return t.aes_hmac_end(n,0),0}return n}(r,t,e):0;if(!n)return we(t,e);const o=mu;return{process(t,e){for(let a=0;a<t.length;a+=wu){const i=t.subarray(a,a+wu),s=hu(r);s.set(i,o),r.aes_hmac_process(n,o,i.length,e?1:0),i.set(s.subarray(o,o+i.length))}},digest:()=>(r.aes_hmac_end(n,o),n=0,hu(r).slice(o,o+20)),dispose(){n&&(r.aes_hmac_end(n,0),n=0)}}},ve=Eu||we,function({Ke:t}){$r=t}({Ke:t=>{if(!yu){let{wasmURI:e}=t;typeof e==k&&(e=e()),yu=async function(t,{baseURI:e}){if(!bu)try{await async function(t,e){let r,n;try{try{n=new URL(t,e)}catch{}const o=await fetch(n);r=await o.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;r=function(t){const e=t.split(",")[1],r=atob(e),n=r.length,o=new Uint8Array(n);for(let t=0;t<n;++t)o[t]=r.charCodeAt(t);return o.buffer}(t)}const o=await WebAssembly.instantiate(r);var a;(function(t){if(ou=t,({malloc:au,free:iu,memory:su}=ou),"function"!=typeof au||"function"!=typeof iu||!su)throw ou=au=iu=su=null,new Error("Invalid WASM module")})(o.instance.exports),typeof(a=o.instance.exports).aes_hmac_new==k&&(pu=a,mu=0)}(t,e),bu=!0}catch(t){throw function(t){cu=t}(t),t}}(e,t).catch(t=>{throw yu=null,t})}return yu}}),jt({CompressionStreamFallback:fu,DecompressionStreamFallback:du}),jt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const gu="Entry filename already exists",Au="Duplicate entry filename in the imported zip file",Ru='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',xu="Entry is an ancestor of target entry",zu="Root directory cannot be moved",Du="Target entry is not a directory",Fu="Parent entry is not a directory",Ou="Readable stream already consumed",Uu="throw",Iu="keep-first",Tu="keep-last",ku=new Set([Uu,Iu,Tu]),Cu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",vu="Invalid readerOptions (must be an object)",Mu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",Nu="Invalid passwords option (must be an array of strings)",_u="Invalid requestPassword option (must be a function returning a string or undefined)",ju="zipjs-abort-export",Pu=new Uint8Array(0),Bu=new Set([br,mr,hr]);class Lu{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(gu);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.Xe++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,$e:r.$e||r.uncompressedSize===U,passThrough:r.passThrough,Je:r.Je||new Date}),!n&&t.root||(t.entries[o.id]=o),n&&o.parent.children.push(o)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,r=this.parent;for(;r&&r!=t;)e=(r.name?r.name+"/":"")+e,r=r.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let r=e.parent;if(r){const n=El(t);n&&(t=n.pop(),r=Sl(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(gu);r!=e.parent&&(Qu(e),e.parent=r,r.children.push(e),yl(e.fs,e))}e.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==U))}}class Wu extends Lu{constructor(t,e,r,n){super(t,e,r,n);const o=this;o.Reader=r.Reader,o.Writer=r.Writer,r.getData&&(o.getData=r.getData)}clone(){return new Wu(this.fs,this.name,this)}async getData(t,e={}){const r=this;if(!t||t.constructor==r.Writer&&r.data&&function(t,e){const{contentType:r}=t;return r===U||(t.constructor==oo?e.type==r:t.constructor!=to||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=$u(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([No(n),No(t,o)]);const a=ft(e.signal),i=function(t,e,r,n){const{onstart:o,onprogress:a,onend:i}=r,{readable:s}=e;return t.data instanceof ga||!o&&!a&&!i?s:Qe(s).pipeThrough(new rn({onstart:o,onprogress:a,onend:i,size:e.size}),{signal:n})}(r,n,e,a),s=!Mo(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Qe(i).pipeTo(er(t.writable),{signal:a,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,Object.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Zt(t)&&t.message==Ee)return!1;throw t}}getText(t,e){return this.getData(new so(t),e)}getBlob(t,e){return this.getData(new oo(t),e)}getData64URI(t,e){return this.getData(new to(t),e)}getUint8Array(t){return this.getData(new Io,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Lt(await this.getUint8Array(t)).buffer}replaceBlob(t){ul(this,{data:t,Reader:no,Writer:oo,uncompressedSize:t.size})}replaceText(t){ul(this,{data:t,Reader:ao,Writer:so,uncompressedSize:io(t)})}replaceData64URI(t){ul(this,{data:t,Reader:Qn,Writer:to,uncompressedSize:ll(t)})}replaceUint8Array(t){ul(this,{data:t,Reader:Uo,Writer:Io,uncompressedSize:t.length})}replaceReadable(t){ul(this,{data:null,Reader:Ku(t),Writer:null,uncompressedSize:U})}}class Zu extends Lu{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new Zu(e.fs,e.name,e);return t&&(r.children=e.children.map(e=>{const n=e.clone(t);return n.parent=r,n})),r}addDirectory(t,e){return bl(this,t,{options:e},!0)}addText(t,e,r={}){return bl(this,t,{data:e,Reader:ao,Writer:so,options:r,uncompressedSize:io(e)})}addBlob(t,e,r={}){return bl(this,t,{data:e,Reader:no,Writer:oo,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return bl(this,t,{data:e,Reader:Qn,Writer:to,options:r,uncompressedSize:ll(e)})}addUint8Array(t,e,r={}){return bl(this,t,{data:e,Reader:Uo,Writer:Io,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return bl(this,t,{data:e,Reader:class extends Fo{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return bl(this,t,{Reader:Ku(e),options:r})}addFileSystemEntry(t,e={}){return wl(this,t,e)}addFileSystemHandle(t,e={}){return wl(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),bl(this,t.name,{data:t,Reader:function(){return{readable:t.stream(),size:t.size}},options:e,uncompressedSize:t.size})}importBlob(t,e){return this.importZip(new no(t),e)}importData64URI(t,e){return this.importZip(new Qn(t),e)}importUint8Array(t,e){return this.importZip(new Uo(t),e)}importHttpContent(t,e){return this.importZip(new Fo(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new oo(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new to(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new Io,t)}async exportWritable(t=new WritableStream,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:n,onprogress:o,onend:a}=r;cl(r.passThrough),ol(r);const i=nl(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!ft(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const r=()=>e.abort(t.reason);return t.addEventListener("abort",r,{once:!0}),()=>t.removeEventListener("abort",r)}(r.signal,s),l=Object.assign({},r,i,{signal:c,onstart:U,onprogress:U,onend:U,preventClose:!1}),f=Gu([t],t=>Yu(t,l.passThrough)),d=[];let w=!1,p=0;try{n&&await nn(n,f),await h(t,e),a&&await nn(a,p)}catch(t){try{t.exportedEntryNames=d}catch{}throw t}finally{u()}return e;function m(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),p+=t.length,o&&await nn(o,p,f)},close:()=>e.close(),abort:t=>e.abort(t)})}async function h(t,e){if(r.concurrent){const r=(await Promise.allSettled(t.children.map(t=>y(t,e)))).filter(t=>"rejected"==t.status);if(r.length){const t=r.filter(t=>!tl(t.reason));throw function(t){const[e]=t,r=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(r.length)try{e.entryErrors=[...e.entryErrors||[],...r]}catch{}return e}((t.length?t:r).map(t=>t.reason))}}else for(const r of t.children)await y(r,e)}async function y(e,r){if(c.aborted){if(w||tl(c.reason))return;dt(c)}try{if(e.directory){const t=await r.getDirectoryHandle(e.name,{create:!0});await h(e,t)}else{const n=await r.getFileHandle(e.name,{create:!0}),o=await n.createWritable();try{await e.getData({writable:m(o)},l)}catch(t){throw w?new Error(ju):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(ju));try{r.entryName===U&&(r.entryName=e.getRelativeName(t),r.entryId=e.id)}catch{}throw r}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==k?(r=t,e=Object.assign({},r.options,e)):(await No(t),r=new di(t,e)),cl(e.passThrough),ol(e);const n=function(t){if(t===U)return Uu;if(ku.has(t))return t;throw new Error(Ru)}(e.duplicates),o=[],a={Qe:[]},i=await r.getEntries(e);for(const t of i){let r=this;try{const i=t.filename.split("/").filter(t=>""!=t&&"."!=t),s=i.pop();let c=!1;for(const t of i){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==Iu){c=!0;break}if(n!=Tu)throw new Error(Au);this.fs.remove(r),r=new Zu(this.fs,t,{data:null},e),o.push(r)}}else r=new Zu(this.fs,t,{data:null},e),o.push(r)}if(c)continue;if(t.directory){let e=r;if(s){if(e=r.getChildByName(s),e&&(!e.directory||e.data)){if(n==Iu)continue;if(n!=Tu)throw new Error(Au);e.directory?e.data=t:(this.fs.remove(e),e=U)}e||(e=new Zu(this.fs,s,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const i=r.getChildByName(s);if(i){if(n==Iu)continue;if(n!=Tu)throw new Error(Au);this.fs.remove(i)}o.push(bl(r,s,{data:t,Reader:Xu(Object.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){o.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return o}async exportZip(t,e={}){const r=this,n=Boolean(t)&&typeof t.add==k;e=Object.assign({},e),n||e.bufferedWrite!==U||(e.bufferedWrite=!0);const[o]=await Promise.all([Ju(r,nl(e.readerOptions)),n?U:No(t)]),a=n?t:new Vs(t,e);return await async function(t,e,r,n,o){const{onstart:a,onprogress:i,onend:s,onentryprogress:c}=n,u=e,l=Gu(e.children,t=>dl(t)?0:1);let f=0,d=0;if(a&&await nn(a,r),n.bufferedWrite)await async function t(e){const r=(await Promise.allSettled(e.children.map(async e=>{await w(e),await t(e)}))).find(t=>"rejected"==t.status);if(r)throw r.reason}(e);else for(const t of e.getChildren({recursive:!0}))await w(t);async function w(e){if(dl(e))return;const{name:a,te:s}=el(e,u,n);let w=0;const p=await t.add(a,o.get(e),Object.assign(s,{onstart:U,onend:U,onprogress:async t=>{f+=t-w,w=t,i&&await nn(i,f,r)}}));d++,c&&await nn(c,d,l,p)}s&&await nn(s,f)}(a,r,Gu([r],qu),e,o),n?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(r={}){const n=this;nl((r=Object.assign({},r)).readerOptions),r.bufferedWrite===U&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),a=o.filter(t=>!dl(t)).map(t=>{const{name:e,te:o}=el(t,n,r);return{name:e,size:t.directory?0:rl(t,fl(t,r)),options:o}}),i=!r.bufferedWrite||a.every(t=>!1!==t.options.keepOrder)&&o.every(t=>dl(t)||!t.children.length);return await async function(r,n,o,a){const i={options:r};if(lt(r[$]))throw new Error(gs);if(a!==U&&!(a instanceof Uint8Array))throw new Error(Qi);const s=Mc(a);if(s>e)throw new Error(Ji);const c=r[K],u=new Map,l=r[Y]===U?0:r[Y];let f=l,w=I;const p=[],m=new Set;for(const e of n){let{name:r}=e;const{size:n}=e,o=Object.assign({},e.options);xc(i,o,fa)&&!r.endsWith(z)&&(r+=z);const a=Js(i,r,o);({name:r}=a);const{re:s}=Qs(i,r,o);0==s.level||s.compressionMethod!==U||s.oe||await Jr(Tt())||(s.level=0);const l=!xc(i,o,fa);if(l&&n===U)throw new Error(gs);const{Pe:d,re:h}=ec(i,l,n,s,o);if(l&&!s.oe&&Uc(h.compressionMethod,h.level))throw new Error(gs);const y=Object.assign({},o,a.re,s,h,{[K]:c}),b=nc(y),E=ic(y),S={le:b,pe:Mc(b.se,E.ce)};c&&oc(S,f);const g=l?d:0;u.set(r,Object.assign({},y,b,{offset:f,diskNumberStart:0,compressedSize:g}));const A=S.pe+g;p.push(A),m.add(Boolean(y.Ht||y.uncompressedSize>=t||g>=t)),w=Math.min(w,A),f+=A}if(u.size>1&&(c||f-w>=t&&(m.size>1||rc(p,l,!0)!=rc(p,l,!1)))&&!o)throw new Error(gs);const{xe:h,ze:y}=sc(u);let b=xc(i,r,ia);if(f>=t||h>=t||u.size>=e){if(!1===b)throw new Error(ys);b=!0}else b===U&&y&&(b=!0);return f-l+h+s+(b?98:d)}(r,a,i,r.globalComment)}getChildByName(t){const e=this.children;for(let r=0;r<e.length;r++){const n=e[r];if(n.name==t)return n}}getChildren(t={}){return function(t,e){const r=[],n=[t];let o=0;for(;o<n.length;)for(const t of n[o++].children)r.push(t),e&&n.push(t);return r}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const r=this.children;return!(await Promise.all(r.map(r=>r.checkPassword(t,e)))).includes(!1)}}class Vu{constructor(){ml(this)}get children(){return this.root.children}remove(t){Qu(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const r of t.children)e.push(r)}t.parent=U}move(t,e){if(t==this.root)throw new Error(zu);if(!e.directory)throw new Error(Du);if(e.isDescendantOf(t))throw new Error(xu);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(gu)}else Qu(t),t.parent=e,e.children.push(t),yl(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.directory?r.getChildByName(e[t]):U;return r||(r=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),r}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,r){return this.root.addText(t,e,r)}addBlob(t,e,r){return this.root.addBlob(t,e,r)}addData64URI(t,e,r){return this.root.addData64URI(t,e,r)}addUint8Array(t,e,r){return this.root.addUint8Array(t,e,r)}addHttpContent(t,e,r){return this.root.addHttpContent(t,e,r)}addReadable(t,e,r){return this.root.addReadable(t,e,r)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return hl(this,r=>r.importBlob(t,e))}importData64URI(t,e){return hl(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return hl(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return hl(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return hl(this,r=>r.importReadable(t,e))}importZip(t,e){return hl(this,r=>r.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const Hu={FS:Vu,ZipDirectoryEntry:Zu,ZipFileEntry:Wu};function Gu(t,e){let r=0;const n=Array.from(t);for(;n.length;){const t=n.pop();r+=e(t)||0;for(const e of t.children)n.push(e)}return r}function qu(t){return t.uncompressedSize}function Yu(t,e){const{data:r}=t;return e&&r instanceof ga?r.compressedSize:t.uncompressedSize}function Ku(t){let e;return function(){if(e)throw new Error(Ou);return e=!0,{readable:t}}}function Xu(t,e){return class extends $n{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,n=Object.assign({},t,r.options),{checkOverlappingEntry:o,checkOverlappingEntryOnly:a}=n,i=await async function(t,e,r){ol(e);const{passwords:n,requestPassword:o,signal:a}=e;if(delete(e=Object.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!n&&!o)return t.getData(new oo,e);const i=new Set;let s;for(;;){for(const t of il(e,r,n))if(!i.has(t.key)){const e=await u(t);if(e.done)return e.data;s=e.error}if(!o)break;if(r.er){await r.er;continue}let a;r.er=new Promise(t=>a=t);try{const e=await o(t,s);if(e===U||null===e)break;if(typeof e!=v)throw new Error(_u);const r=await u(sl(e));if(r.done)return r.data;s=r.error}finally{r.er=U,a()}}if(!i.size)throw new Error(Ia);const c=new Error(Ee);throw c.cause=s,c;async function u(n){i.add(n.key);const o=Object.assign({},e,n.options);if(t.zipCrypto){o.checkCrc32=!0;try{await t.getData(null,Object.assign({},o,{checkPasswordOnly:!0}))}catch(t){if(al(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new oo,o);return function(t,e){const{Qe:r}=t,n=r.findIndex(t=>t.key===e.key);-1!=n&&r.splice(n,1),r.unshift(e)}(r,n),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Zt(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return al(t)||e.zipCrypto&&Zt(t)&&Bu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,Object.assign(n,{checkPasswordOnly:!1,checkOverlappingEntry:a||o,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=i,r.rr=new no(i),r.size=i.size,super.init()}readUint8Array(t,e){return this.rr.readUint8Array(t,e)}}}function $u(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function Ju(t,e){const r=[],n=[t],o=new Map;for(;n.length;){const t=n.pop();for(const e of t.children)e.directory?n.push(e):r.push(e)}return await Promise.all(r.map(async r=>{const n=r.reader=$u(r.Reader,r.data,e);o.set(r,n);try{await No(n)}catch(e){try{e.entry=r,e.entryId=r.id,e.entryName=r.getRelativeName(t)}catch{}throw e}n.size!==U&&(r.uncompressedSize=n.size,r.$e=!1)})),o}function Qu(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function tl(t){return Boolean(t)&&t.message==ju}function el(t,e,r){const n=r.relativePath?t.getRelativeName(e):t.getFullname(),o=t.options||{};let a={},i={};if(t.data instanceof ga){const e=fl(t,r),n=o.lastModDate===U?r.lastModDate:o.lastModDate;({te:a,ee:i}=$s(t.data,e,n)),e&&(i.passThrough=!0)}const s=Object.assign({lastModDate:t.Je},a,r,o,i,{directory:t.directory});if(!t.directory&&s.passThrough&&s.uncompressedSize===U)throw new Error(Cu);return{name:n,te:s}}function rl(t,e){const{reader:r}=t;return r&&r.size!==U?r.size:t.$e?U:Yu(t,e)}function nl(t){if(t&&(typeof t!=C||Array.isArray(t)))throw new Error(vu);return t&&(cl(t.passThrough),ol(t)),t}function ol(t){const{passwords:e,requestPassword:r}=t;if(e&&(!Array.isArray(e)||e.some(t=>typeof t!=v)))throw new Error(Nu);if(r&&typeof r!=k)throw new Error(_u)}function al(t){return Zt(t)&&t.message==Ee}function il(t,e,r){const n=[],{password:o,rawPassword:a}=t;return a&&a.length&&n.push({key:a,options:{password:"",rawPassword:a}}),o&&n.push(sl(o)),n.push(...e.Qe),r&&n.push(...r.filter(t=>t).map(sl)),n}function sl(t){return{key:t,options:{password:t,rawPassword:Pu}}}function cl(t){if(pt(t)===ot)throw new Error(Mu)}function ul(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:U,uncompressedSize:r===U?0:r,$e:r===U})}function ll(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function fl(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function dl(t){return t.directory&&null===t.data}function wl(t,e,r){return async function t(e,n,o,a=""){if(n){const i=a?a+"/"+n.name:n.name;try{if((n.isFile||n.isDirectory)&&(n=await pl(n)),"file"==n.kind){const t=await n.getFile();o.push(bl(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:Object.assign({},{lastModDate:new Date(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==n.kind){const a=e.addDirectory(n.name,r);o.push(a);for await(const e of n.values())await t(a,e,o,i)}}catch(t){try{t.entryName===U&&(t.entryName=i)}catch{}throw t}}return o}(t,e,[])}async function pl(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new Promise((e,r)=>t.file(e,r))),t.isDirectory){e.kind="directory";const r=await async function(t){const e=[];function r(t,n,o){t.readEntries(async a=>{if(a.length){for(const t of a)e.push(await pl(t));r(t,n,o)}else n(e)},o)}return await new Promise((e,n)=>r(t.createReader(),e,n)),{[Symbol.iterator](){let t=0;return{next(){const r={value:e[t],done:t==e.length};return t++,r}}}}}(t);e.values=()=>r}return e}function ml(t){t.entries=[],t.Xe=0,t.root=new Zu(t)}function hl(t,e){const{entries:r,Xe:n,root:o}=t;return ml(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,Xe:n,root:o}),e})}function yl(t,e){const r=[e];for(;r.length;){const e=r.pop();t.entries[e.id]=e;for(const t of e.children)r.push(t)}}function bl(t,e,r,n){if(t.directory){const o=El(e);return o&&(e=o.pop(),t=Sl(t,o)),n?new Zu(t.fs,e,r,t):new Wu(t.fs,e,r,t)}throw new Error(Fu)}function El(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Sl(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(gu);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(xu)}else t=new Zu(n.fs,e,{data:null},n)}),t}export{no as BlobReader,oo as BlobWriter,Qn as Data64URIReader,to as Data64URIWriter,ut as ERR_ABORTED,Ma as ERR_AMBIGUOUS_ARCHIVE,xu as ERR_ANCESTOR_ENTRY,xa as ERR_BAD_FORMAT,Fa as ERR_CENTRAL_DIRECTORY_NOT_FOUND,yr as ERR_CODEC_OUT_OF_MEMORY,$i as ERR_DUPLICATED_NAME,Au as ERR_DUPLICATE_IMPORTED_ENTRY,Ia as ERR_ENCRYPTED,Na as ERR_ENCRYPTED_CENTRAL_DIRECTORY,va as ERR_ENTRY_DATA_OUT_OF_BOUNDS,gu as ERR_ENTRY_EXISTS,Da as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,za as ERR_EOCDR_NOT_FOUND,Ua as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,jn as ERR_HTTP_RANGE,Pn as ERR_HTTP_RESOURCE_CHANGED,_n as ERR_HTTP_STATUS,Se as ERR_INVALID_AUTHENTICATION_CODE,St as ERR_INVALID_BASE_URI,rr as ERR_INVALID_CODEC_DEFINITION,or as ERR_INVALID_CODEC_MODULE,Ji as ERR_INVALID_COMMENT,Qi as ERR_INVALID_COMMENT_TYPE,hr as ERR_INVALID_COMPRESSED_DATA,br as ERR_INVALID_CRC32,rs as ERR_INVALID_DATE,Ru as ERR_INVALID_DUPLICATES,as as ERR_INVALID_ENCRYPTION_STRENGTH,vs as ERR_INVALID_ENTRY,ts as ERR_INVALID_ENTRY_COMMENT,es as ERR_INVALID_ENTRY_COMMENT_TYPE,ns as ERR_INVALID_ENTRY_NAME,us as ERR_INVALID_EXTRAFIELD,ds as ERR_INVALID_EXTRAFIELD_DATA,fs as ERR_INVALID_EXTRAFIELD_DATA_TYPE,ls as ERR_INVALID_EXTRAFIELD_TYPE,Pa as ERR_INVALID_FILENAME_VALIDATION,at as ERR_INVALID_FUNCTION_OPTION,Ds as ERR_INVALID_GID,ks as ERR_INVALID_LEVEL,Ba as ERR_INVALID_MAX_APPENDED_DATA_SIZE,Et as ERR_INVALID_MAX_WORKERS,Is as ERR_INVALID_MSDOS_ATTRIBUTES,Ts as ERR_INVALID_MSDOS_DATA,Ee as ERR_INVALID_PASSWORD,Nu as ERR_INVALID_PASSWORDS,st as ERR_INVALID_PASSWORD_TYPE,Cu as ERR_INVALID_PASS_THROUGH,ct as ERR_INVALID_PASS_THROUGH_VALUE,Rs as ERR_INVALID_READER,vu as ERR_INVALID_READER_OPTIONS,_u as ERR_INVALID_REQUEST_PASSWORD,it as ERR_INVALID_SIGNAL,Cs as ERR_INVALID_SIGNATURE_DATA,ja as ERR_INVALID_STRICTNESS,zs as ERR_INVALID_UID,mr as ERR_INVALID_UNCOMPRESSED_SIZE,Os as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,Us as ERR_INVALID_UNIX_ID_SIZE,Fs as ERR_INVALID_UNIX_MODE,gt as ERR_INVALID_URI,os as ERR_INVALID_VERSION,Bn as ERR_ITERATOR_COMPLETED_TOO_SOON,Oa as ERR_LOCAL_FILE_HEADER_NOT_FOUND,Ca as ERR_OVERLAPPING_ENTRY,Fu as ERR_PARENT_NOT_DIRECTORY,Ou as ERR_READABLE_CONSUMED,nr as ERR_RESERVED_COMPRESSION_METHOD,zu as ERR_ROOT_DIRECTORY_NOT_MOVABLE,ka as ERR_SPLIT_ZIP_FILE,Du as ERR_TARGET_NOT_DIRECTORY,Es as ERR_UNDEFINED_COMPRESSION_METHOD,Ss as ERR_UNDEFINED_CRC32,As as ERR_UNDEFINED_READER,bs as ERR_UNDEFINED_UNCOMPRESSED_SIZE,gs as ERR_UNDETERMINED_SIZE,_a as ERR_UNSAFE_FILENAME,ar as ERR_UNSUPPORTED_COMPRESSION,Xc as ERR_UNSUPPORTED_CONTEXT,Ae as ERR_UNSUPPORTED_CRYPTO_API,Ta as ERR_UNSUPPORTED_ENCRYPTION,cs as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,is as ERR_UNSUPPORTED_ENCRYPTION_USDZ,ys as ERR_UNSUPPORTED_FORMAT,Mu as ERR_UNSUPPORTED_PASS_THROUGH_VALUE,ss as ERR_UNSUPPORTED_SPLIT_USDZ,La as ERR_UNSUPPORTED_UINT64,qr as ERR_WORKER_STARTUP_TIMEOUT,Ln as ERR_WRITER_NOT_INITIALIZED,Wn as ERR_WRITER_SIZE_NOT_WRITABLE,Ms as ERR_ZIP_CRYPTO_LAST_MOD_DATE,xs as ERR_ZIP_NOT_EMPTY,Oo as HttpRangeReader,Fo as HttpReader,$n as Reader,To as SplitDataReader,ko as SplitDataWriter,ao as TextReader,so as TextWriter,Uo as Uint8ArrayReader,Io as Uint8ArrayWriter,Wc as VERSION,Ya as WARNING_APPENDED_DATA,_s as WARNING_CLAMPED_LAST_MODIFICATION_DATE,Va as WARNING_COMPRESSED_PATCHED_DATA,Ns as WARNING_COMPRESSION_UNAVAILABLE,Ja as WARNING_DUPLICATE_FILENAME,Ha as WARNING_MALFORMED_EXTRA_FIELD,ri as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,ni as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,oi as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,ei as WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,Qa as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,ti as WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,Xa as WARNING_PREPENDED_CENTRAL_DIRECTORY,Ka as WARNING_PREPENDED_DATA,$a as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,Za as WARNING_UNKNOWN_VERSION,Ga as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,Wa as WARNING_UNSORTED_CENTRAL_DIRECTORY,qa as WARNING_WRAPPED_ENTRIES_COUNT,Jn as Writer,Zu as ZipDirectoryEntry,Lu as ZipEntry,Vu as ZipFS,Wu as ZipFileEntry,di as ZipReader,wi as ZipReaderStream,Vs as ZipWriter,Hs as ZipWriterStream,vt as configure,qc as createBlobTempStream,Hc as createOPFSTempStream,$c as createSyncAccessHandleTempStream,Hu as fs,Pc as getMimeType,dr as getRegisteredCodecs,Bc as getSupportedCompressionMethods,pi as isZipFile,ur as registerCodec,Pt as resetConfiguration,Su as terminateWorkers,lr as unregisterCodec};
1
+ const t=4294967295,e=65535,r=255,n=67324752,o=134695760,a=o,i=84233040,s=33639248,c=101010256,u=101075792,l=117853008,f=46,w=22,d=20,p=56,h=39169,m=21589,y=6534,E=30837,b=30805,S=2048,g=8192,A=61440,R=16384,z=2048,x=1024,D="/",F=30,O=new Date(2107,11,31,23,59,58),I=new Date(1980,0,1),U=void 0,T=1/0,k="Local file header not found",C="Overlapping entry found",M="Zip64 extra field not found",v="undefined",N="function",_="object",j="string",P="boolean",B=new Uint8Array,L=Symbol.asyncDispose||Symbol(),W="password",Z="rawPassword",V="passThrough",H="signal",G="checkAmbiguity",q="useWebWorkers",Y="useCompressionStream",K="preventClose",X="level",$="useUnicodeFileNames",J="dataDescriptor",Q="offset",tt="usdz",et="strictness",rt="maxAppendedDataSize",nt="signCentralDirectory",ot="entry",at="filename",it="comment",st="strict",ct="balanced",ut="tolerant",lt="compressed",ft="Invalid option (must be a function)",wt="Invalid signal (must be an AbortSignal instance)",dt="Invalid password (password must be a string, rawPassword must be a Uint8Array)",pt="Invalid passThrough option (must be a boolean or 'compressed')",ht="The operation was aborted";function mt(t){if(t&&typeof t!=N)throw new Error(ft);return t}function yt(t){if(t&&(typeof t.addEventListener!=N||typeof t.aborted!=P))throw new Error(wt);return t||U}function Et(t){if(t&&t.aborted)throw t.reason===U?new DOMException(ht,"AbortError"):t.reason}function bt(t,e){if(t&&typeof t!=j||e&&!(e instanceof Uint8Array))throw new Error(dt)}function St(t){if(t!==U&&typeof t!=P&&t!==lt)throw new Error(pt);return t}function gt(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function At(t,e,r){t!==U&&gt(t,e,r)}function Rt(t){return typeof t==j&&t.trim()?Number(t):t}const zt=262144,xt="Invalid maxWorkers (must be an integer greater than 0)",Dt="Invalid baseURI (must be a string)",Ft="Invalid URI (must be a string or a function returning a string)";let Ot=2;try{typeof navigator!=v&&navigator.hardwareConcurrency&&(Ot=navigator.hardwareConcurrency)}catch{}const It={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:zt,maxWorkers:Ot,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=v&&CompressionStream,DecompressionStream:typeof DecompressionStream!=v&&DecompressionStream},Ut="maxWorkers",Tt="baseURI",kt=["wasmURI","workerURI"],Ct=["chunkSize",Ut,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],Mt=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],vt=[Tt,...kt,"useCompressionStream","useWebWorkers","transferStreams",...Ct,...Mt],Nt={...It};function _t(){return Nt}function jt(t){return Pt(t.chunkSize)}function Pt(t){return t=Rt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):zt}function Bt(t){Object.assign(Nt,Lt(Zt(t)))}function Lt(t){const e={};for(const r of vt){const n=t[r];n!==U&&(e[r]=Wt(r,n))}return e}function Wt(t,e){if(Ct.includes(t)){if(e=Rt(e),t==Ut&&(!Number.isInteger(e)||e<1))throw new Error(xt)}else if(Mt.includes(t))mt(e);else if(t==Tt){if(e&&typeof e!=j)throw new Error(Dt)}else if(kt.includes(t)&&e&&typeof e!=j&&typeof e!=N)throw new Error(Ft);return e}function Zt(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===U&&r===U)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===U&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===U&&(n.DecompressionStreamFallback=r),n}function Vt(t){const e=Lt(Zt(t));Object.assign(It,e),Object.assign(Nt,e)}function Ht(){for(const t of vt)delete Nt[t];Object.assign(Nt,It)}function Gt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function qt(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Yt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Kt(t){return Boolean(t)&&"object"==typeof t}const Xt=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;Xt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Xt[e-1][t];Xt[e][t]=r>>>8^Xt[0][255&r]}const[$t,Jt,Qt,te,ee,re,ne,oe]=Xt;class ae{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),a=r-8;for(;n<=a;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=oe[255&t]^ne[t>>>8&255]^re[t>>>16&255]^ee[t>>>24&255]^te[255&r]^Qt[r>>>8&255]^Jt[r>>>16&255]^$t[r>>>24&255]}}for(;n<r;n++)e=e>>>8^$t[255&(e^t[n])];this.o=e}get(){return~this.o}}class ie extends TransformStream{constructor(){let t;const e=new ae;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function se(t){if(typeof TextEncoder==v){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const ce=64,ue=20,le=new Uint8Array([128]),fe=new Uint8Array(1),we=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),de=new Uint8Array(256),pe=new Int32Array(256),he=new Int32Array(256),me=new Int32Array(256),ye=new Int32Array(256);let Ee=!1;function be(t,e){!function(){if(!Ee){let t=1,e=1;do{t=255&(t^t<<1^(128&t?27:0)),e=255&(e^e<<1),e=255&(e^e<<2),e=255&(e^e<<4),128&e&&(e^=9),de[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);de[0]=99;for(let t=0;t<256;t++){const e=de[t],r=Re(e),n=r<<24|e<<16|e<<8|r^e;pe[t]=n,he[t]=n>>>8|n<<24,me[t]=n>>>16|n<<16,ye[t]=n>>>24|n<<8}Ee=!0}}();const r=new Int32Array(60),n=function(t,e){const r=t.length>>2,n=r+6,o=4*(n+1);let a=1;for(let n=0;n<r;n++)e[n]=t[4*n]<<24|t[4*n+1]<<16|t[4*n+2]<<8|t[4*n+3];for(let t=r;t<o;t++){let n=e[t-1];t%r==0?(n=ge(n<<8|n>>>24)^a<<24,a=Re(a)):r>6&&t%r==4&&(n=ge(n)),e[t]=e[t-r]^n}return n}(t,r),o=new Int32Array(4),a=Se(e);let i=0,s=0,c=0,u=0;return{process(t,e){e&&a.update(t,0,t.length),function(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=t.length;let n=0;for(;n+16<=r;n+=16)l(),e.setInt32(n,e.getInt32(n)^o[0]),e.setInt32(n+4,e.getInt32(n+4)^o[1]),e.setInt32(n+8,e.getInt32(n+8)^o[2]),e.setInt32(n+12,e.getInt32(n+12)^o[3]);if(n<r){l();for(let e=0;n<r;n++,e++)t[n]^=o[e>>2]>>>24-8*(3&e)}}(t),e||a.update(t,0,t.length)},digest:()=>a.digest()};function l(){i=i+1|0,i||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=Ae(i)^r[0],e=Ae(s)^r[1],a=Ae(c)^r[2],l=Ae(u)^r[3],f=pe[t>>>24]^he[e>>>16&255]^me[a>>>8&255]^ye[255&l]^r[4],w=pe[e>>>24]^he[a>>>16&255]^me[l>>>8&255]^ye[255&t]^r[5],d=pe[a>>>24]^he[l>>>16&255]^me[t>>>8&255]^ye[255&e]^r[6],p=pe[l>>>24]^he[t>>>16&255]^me[e>>>8&255]^ye[255&a]^r[7];t=pe[f>>>24]^he[w>>>16&255]^me[d>>>8&255]^ye[255&p]^r[8],e=pe[w>>>24]^he[d>>>16&255]^me[p>>>8&255]^ye[255&f]^r[9],a=pe[d>>>24]^he[p>>>16&255]^me[f>>>8&255]^ye[255&w]^r[10],l=pe[p>>>24]^he[f>>>16&255]^me[w>>>8&255]^ye[255&d]^r[11],f=pe[t>>>24]^he[e>>>16&255]^me[a>>>8&255]^ye[255&l]^r[12],w=pe[e>>>24]^he[a>>>16&255]^me[l>>>8&255]^ye[255&t]^r[13],d=pe[a>>>24]^he[l>>>16&255]^me[t>>>8&255]^ye[255&e]^r[14],p=pe[l>>>24]^he[t>>>16&255]^me[e>>>8&255]^ye[255&a]^r[15],t=pe[f>>>24]^he[w>>>16&255]^me[d>>>8&255]^ye[255&p]^r[16],e=pe[w>>>24]^he[d>>>16&255]^me[p>>>8&255]^ye[255&f]^r[17],a=pe[d>>>24]^he[p>>>16&255]^me[f>>>8&255]^ye[255&w]^r[18],l=pe[p>>>24]^he[f>>>16&255]^me[w>>>8&255]^ye[255&d]^r[19],f=pe[t>>>24]^he[e>>>16&255]^me[a>>>8&255]^ye[255&l]^r[20],w=pe[e>>>24]^he[a>>>16&255]^me[l>>>8&255]^ye[255&t]^r[21],d=pe[a>>>24]^he[l>>>16&255]^me[t>>>8&255]^ye[255&e]^r[22],p=pe[l>>>24]^he[t>>>16&255]^me[e>>>8&255]^ye[255&a]^r[23],t=pe[f>>>24]^he[w>>>16&255]^me[d>>>8&255]^ye[255&p]^r[24],e=pe[w>>>24]^he[d>>>16&255]^me[p>>>8&255]^ye[255&f]^r[25],a=pe[d>>>24]^he[p>>>16&255]^me[f>>>8&255]^ye[255&w]^r[26],l=pe[p>>>24]^he[f>>>16&255]^me[w>>>8&255]^ye[255&d]^r[27],f=pe[t>>>24]^he[e>>>16&255]^me[a>>>8&255]^ye[255&l]^r[28],w=pe[e>>>24]^he[a>>>16&255]^me[l>>>8&255]^ye[255&t]^r[29],d=pe[a>>>24]^he[l>>>16&255]^me[t>>>8&255]^ye[255&e]^r[30],p=pe[l>>>24]^he[t>>>16&255]^me[e>>>8&255]^ye[255&a]^r[31],t=pe[f>>>24]^he[w>>>16&255]^me[d>>>8&255]^ye[255&p]^r[32],e=pe[w>>>24]^he[d>>>16&255]^me[p>>>8&255]^ye[255&f]^r[33],a=pe[d>>>24]^he[p>>>16&255]^me[f>>>8&255]^ye[255&w]^r[34],l=pe[p>>>24]^he[f>>>16&255]^me[w>>>8&255]^ye[255&d]^r[35],f=pe[t>>>24]^he[e>>>16&255]^me[a>>>8&255]^ye[255&l]^r[36],w=pe[e>>>24]^he[a>>>16&255]^me[l>>>8&255]^ye[255&t]^r[37],d=pe[a>>>24]^he[l>>>16&255]^me[t>>>8&255]^ye[255&e]^r[38],p=pe[l>>>24]^he[t>>>16&255]^me[e>>>8&255]^ye[255&a]^r[39];let h=40;n>10&&(t=pe[f>>>24]^he[w>>>16&255]^me[d>>>8&255]^ye[255&p]^r[40],e=pe[w>>>24]^he[d>>>16&255]^me[p>>>8&255]^ye[255&f]^r[41],a=pe[d>>>24]^he[p>>>16&255]^me[f>>>8&255]^ye[255&w]^r[42],l=pe[p>>>24]^he[f>>>16&255]^me[w>>>8&255]^ye[255&d]^r[43],f=pe[t>>>24]^he[e>>>16&255]^me[a>>>8&255]^ye[255&l]^r[44],w=pe[e>>>24]^he[a>>>16&255]^me[l>>>8&255]^ye[255&t]^r[45],d=pe[a>>>24]^he[l>>>16&255]^me[t>>>8&255]^ye[255&e]^r[46],p=pe[l>>>24]^he[t>>>16&255]^me[e>>>8&255]^ye[255&a]^r[47],h=48),n>12&&(t=pe[f>>>24]^he[w>>>16&255]^me[d>>>8&255]^ye[255&p]^r[48],e=pe[w>>>24]^he[d>>>16&255]^me[p>>>8&255]^ye[255&f]^r[49],a=pe[d>>>24]^he[p>>>16&255]^me[f>>>8&255]^ye[255&w]^r[50],l=pe[p>>>24]^he[f>>>16&255]^me[w>>>8&255]^ye[255&d]^r[51],f=pe[t>>>24]^he[e>>>16&255]^me[a>>>8&255]^ye[255&l]^r[52],w=pe[e>>>24]^he[a>>>16&255]^me[l>>>8&255]^ye[255&t]^r[53],d=pe[a>>>24]^he[l>>>16&255]^me[t>>>8&255]^ye[255&e]^r[54],p=pe[l>>>24]^he[t>>>16&255]^me[e>>>8&255]^ye[255&a]^r[55],h=56),o[0]=(de[f>>>24]<<24|de[w>>>16&255]<<16|de[d>>>8&255]<<8|de[255&p])^r[h],o[1]=(de[w>>>24]<<24|de[d>>>16&255]<<16|de[p>>>8&255]<<8|de[255&f])^r[h+1],o[2]=(de[d>>>24]<<24|de[p>>>16&255]<<16|de[f>>>8&255]<<8|de[255&w])^r[h+2],o[3]=(de[p>>>24]<<24|de[f>>>16&255]<<16|de[w>>>8&255]<<8|de[255&d])^r[h+3]}}function Se(t){const e=function(){const t=new Int32Array(we),e=new Int32Array(16),r=new Uint8Array(ce),n=new DataView(r.buffer),o=new Uint8Array(8);let a=0,i=0;return{update:s,digest:function(){const e=8*i,r=Math.floor(e/4294967296),n=e>>>0;for(s(le,0,1);56!=a;)s(fe,0,1);o[0]=r>>>24,o[1]=r>>>16,o[2]=r>>>8,o[3]=r,o[4]=n>>>24,o[5]=n>>>16,o[6]=n>>>8,o[7]=n,s(o,0,8);const c=new Uint8Array(ue),u=new DataView(c.buffer);for(let e=0;e<t.length;e++)u.setInt32(4*e,t[e]);return t.set(we),a=0,i=0,c}};function s(t,e,o){const s=e+o;if(i+=o,a){for(;e<s&&a<ce;)r[a++]=t[e++];a==ce&&(c(n,0),a=0)}if(e+ce<=s){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;e+ce<=s;e+=ce)c(r,e)}for(;e<s;)r[a++]=t[e++]}function c(r,n){for(let t=0;t<16;t++)e[t]=r.getInt32(n+4*t);let o,a=t[0],i=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(a<<5|a>>>27)+((s^c)&i^c)+u+1518500249+e[t]|0,i=i<<30|i>>>2,c=(u<<5|u>>>27)+((i^s)&a^s)+c+1518500249+e[t+1]|0,a=a<<30|a>>>2,s=(c<<5|c>>>27)+((a^i)&u^i)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,i=(s<<5|s>>>27)+((u^a)&c^a)+i+1518500249+e[t+3]|0,c=c<<30|c>>>2,a=(i<<5|i>>>27)+((c^u)&s^u)+a+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(a<<5|a>>>27)+((s^c)&i^c)+u+1518500249+e[15]|0,i=i<<30|i>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((i^s)&a^s)+c+1518500249+o|0,a=a<<30|a>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((a^i)&u^i)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,i=(s<<5|s>>>27)+((u^a)&c^a)+i+1518500249+o|0,c=c<<30|c>>>2,o=e[0]^e[11]^e[5]^e[3],o=o<<1|o>>>31,e[3]=o,a=(i<<5|i>>>27)+((c^u)&s^u)+a+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i^s^c)+u+1859775393+o|0,i=i<<30|i>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(a^i^s)+c+1859775393+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^a^i)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c^u^a)+i+1859775393+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,a=(i<<5|i>>>27)+(s^c^u)+a+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i&s|(i|s)&c)+u+2400959708+o|0,i=i<<30|i>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(a&i|(a|i)&s)+c+2400959708+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&a|(u|a)&i)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c&u|(c|u)&a)+i+2400959708+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,a=(i<<5|i>>>27)+(s&c|(s|c)&u)+a+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i^s^c)+u+3395469782+o|0,i=i<<30|i>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(a^i^s)+c+3395469782+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^a^i)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c^u^a)+i+3395469782+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,a=(i<<5|i>>>27)+(s^c^u)+a+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+a|0,t[1]=t[1]+i|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),r=new Uint8Array(ce),n=new Uint8Array(ce);t.length>ce&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<ce;e++){const o=e<t.length?t[e]:0;r[e]=54^o,n[e]=92^o}return e.update(r,0,ce),{update(t,r,n){e.update(t,r,n)},digest(){const t=e.digest();e.update(n,0,ce),e.update(t,0,ue);const o=e.digest();return e.update(r,0,ce),o}}}function ge(t){return de[t>>>24]<<24|de[t>>>16&255]<<16|de[t>>>8&255]<<8|de[255&t]}function Ae(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function Re(t){return 255&(t<<1^27*(t>>7))}const ze=typeof crypto!=v&&typeof crypto.getRandomValues==N,xe="Invalid password",De="Invalid authentication code",Fe="zipjs-abort-check-password",Oe="Crypto API not supported";function Ie(t){if(ze)return crypto.getRandomValues(t);throw new Error(Oe)}const Ue={name:"PBKDF2"},Te=Object.assign({hash:{name:"HMAC"}},Ue),ke=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},Ue),Ce=["deriveBits"],Me=[8,12,16],ve=[16,24,32],Ne=10,_e=typeof crypto!=v,je=_e&&crypto.subtle;let Pe=_e&&typeof je!=v&&typeof je.importKey==N&&typeof je.deriveBits==N,Be=be;class Le extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){const a={};super({start(){Ze(a,t,e,r)},async transform(t,e){const{password:r,strength:o,l:i,ready:s}=a;if(r?(await async function(t,e,r,n){const o=await qe(t,e,r,Ke(n,0,Me[e])),a=Ke(n,Me[e]);if(o[0]!=a[0]||o[1]!=a[1])throw Ge(t),new Error(xe)}(a,o,r,Ke(t,0,Me[o]+2)),t=Ke(t,Me[o]+2),n?(Ge(a),e.error(new Error(Fe))):i()):await s,a.h)return;const c=new Uint8Array(t.length-Ne-(t.length-Ne)%16);e.enqueue(He(a,t,c,0,Ne,!0))},async flush(t){const{m:e,S:r,ready:n}=a;if(e){if(await n,a.h)return;const i=Ke(r,r.length-Ne),s=new Uint8Array(Ke(r,0,r.length-Ne));e.process(s,!0);const c=e.digest();let u=r.length<Ne?1:0;for(let t=0;t<Ne;t++)u|=c[t]^i[t];if(u&&o)return void t.error(new Error(De));t.enqueue(s)}}}),Ve(this,a)}}class We extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){const n={};super({start(){Ze(n,t,e,r)},async transform(t,e){const{password:r,strength:o,l:a,ready:i}=n;let s=B;if(r?(s=await async function(t,e,r){const n=Ie(new Uint8Array(Me[e]));return Gt(n,await qe(t,e,r,n))}(n,o,r),a()):await i,n.h)return;const c=new Uint8Array(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(He(n,t,c,s.length,0,!1))},async flush(t){const{m:e,S:r,ready:o}=n;if(e){if(await o,n.h)return;const a=new Uint8Array(r);e.process(a,!1);const i=Ke(e.digest(),0,Ne);t.enqueue(Gt(a,i))}}}),Ve(this,n)}}function Ze(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.l=e),password:Ye(e,r),strength:n-1,S:B,h:!1})}function Ve(t,e){const r=t.readable.getReader(),n=new ReadableStream({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw Ge(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(Ge(e),r.cancel(t))});Object.defineProperty(t,"readable",{get:()=>n})}function He(t,e,r,n,o,a){const{m:i,S:s}=t;s.length&&(e=Gt(s,e));const c=e.length-o,u=c-c%16;if(r=function(t,e){if(e&&e>t.length){const r=t;(t=new Uint8Array(e)).set(r,0)}return t}(r,n+u),u){const t=Ke(r,n,n+u);t.set(Ke(e,0,u)),i.process(t,a)}return t.S=Ke(e,u),r}function Ge(t){const{m:e}=t;t.h=!0,e&&e.dispose&&e.dispose()}async function qe(t,e,r,n){t.password=null;const o=ve[e],a=await async function(t,e,r){if(Pe)try{const n=await je.importKey("raw",t,Te,!1,Ce);return new Uint8Array(await je.deriveBits(Object.assign({salt:e},ke),n,8*r))}catch{Pe=!1}return function(t,e,r,n){const o=Se(t),a=new Uint8Array(n),i=new Uint8Array(e.length+4),s=new DataView(i.buffer);i.set(e);for(let t=1,r=0;r<n;t++,r+=ue){s.setUint32(e.length,t),o.update(i,0,i.length);let c=o.digest();const u=c.slice();for(let t=1;t<1e3;t++){o.update(c,0,ue),c=o.digest();for(let t=0;t<ue;t++)u[t]^=c[t]}a.set(u.subarray(0,Math.min(ue,n-r)),r)}return a}(t,e,0,r)}(r,n,2*o+2);return t.m=Be(Ke(a,0,o),Ke(a,o,2*o)),t.h&&Ge(t),Ke(a,2*o)}function Ye(t,e){return e===U?se(t):e}function Ke(t,e,r){return t.subarray(e,r)}class Xe extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){Je(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=Qe(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(xe);t=t.subarray(12)}n?e.error(new Error(Fe)):e.enqueue(Qe(r,t))}})}}class $e extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){Je(this,t,e,r)},transform(t,e){const r=this;let n,o;if(r.password||r.rawPassword){r.password=r.rawPassword=null;const e=Ie(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(tr(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(tr(r,t),o),e.enqueue(n)}})}}function Je(t,e,r,n){Object.assign(t,{password:e,rawPassword:r,passwordVerification:n}),function(t,e,r){const n=[305419896,591751049,878082192];if(Object.assign(t,{A:n,R:new ae(n[0]),D:new ae(n[2])}),r)for(let e=0;e<r.length;e++)er(t,r[e]);else for(let r=0;r<e.length;r++)er(t,e.charCodeAt(r))}(t,e,r)}function Qe(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=rr(t)^e[n],er(t,r[n]);return r}function tr(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=rr(t)^e[n],er(t,e[n]);return r}function er(t,e){let[,r]=t.A;t.R.append([e]);const n=~t.R.get();r=or(Math.imul(or(r+nr(n)),134775813)+1),t.D.append([r>>>24]);const o=~t.D.get();t.A=[n,r,o]}function rr(t){const e=2|t.A[2];return nr(Math.imul(e,1^e)>>>8)}function nr(t){return 255&t}function or(t){return 4294967295&t}function ar(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){try{const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function ir(t,e){t=ar(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=N||new Blob([]).stream()instanceof ReadableStream)return new Response(t).blob().then(t=>e?new Blob([t],r):t);const n=[];return t.pipeTo(new WritableStream({write(t){n.push(t)}})).then(()=>new Blob(n,r))}function sr(t){if(t instanceof WritableStream)return t;const e=t.getWriter();return new WritableStream({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const cr="Invalid codec definition",ur="Reserved compression method",lr="Invalid codec module",fr="Compression method not supported",wr=[0,8,9,99],dr=new Map,pr=new Map;function hr(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:a,DecompressionStream:i,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=j||!n.length)throw new Error(cr);if(wr.includes(r))throw new Error(ur);const c=typeof a==N||typeof i==N;if(!(c||typeof o==j&&o.length))throw new Error(cr);dr.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&Sr(n,{CompressionStream:a,DecompressionStream:i})}function mr(t){const e=dr.get(t);if(e){let r;dr.delete(t),dr.forEach(t=>r=r||t.format==e.format),r||pr.delete(e.format)}}function yr(t){return dr.get(t)}function Er(){return Array.from(dr.values(),t=>Object.assign({},t,pr.get(t.format)))}function br(t){return pr.get(t)}function Sr(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=N&&typeof n!=N)throw new Error(lr);pr.set(t,{CompressionStream:r,DecompressionStream:n})}const gr="Invalid uncompressed size",Ar="Invalid compressed data",Rr="Codec out of memory",zr="Invalid CRC32",xr="deflate-raw",Dr="deflate64-raw",Fr="gzip",Or=[31,139,8];class Ir extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:a,useCompressionStream:i,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:w,inputSize:d}=t,p=this;let h,m,y,E=super.readable;const b=f&&br(f),S=_r(i,n,r),g=c&&o&&!l&&!b&&(!a||s)&&Boolean(S);if(a&&!s||!c||g||(h=new ie,E=Pr(E,h)),o)if(b)E=Br(E,Nr(b.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:w,uncompressedSize:d}));else if(g)y=new Ur,E=Br(E,new S(Fr,{level:u,chunkSize:e})),E=Pr(E,y);else try{E=jr(E,i,{level:u,chunkSize:e},n,r)}catch(t){if(!i&&r)throw Hr(t);let e;try{e=new n(Fr)}catch{throw Hr(t)}E=Br(E,e),E=Pr(E,new Ur)}a&&(s?E=Pr(E,new $e(t)):(m=new We(t),E=Pr(E,m))),vr(p,E,()=>{a&&!s||!c||(p.crc32=g?y.crc32:new DataView(h.value.buffer).getUint32(0))})}}class Ur extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=Gt(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(Gt(r.subarray(0,i),t.subarray(0,a-i))),r=Gt(r.subarray(i),t.subarray(a-i))},flush(){const e=Yt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Tr extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:a,checkCrc32:i,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:w,rawBitFlag:d,outputSize:p}=t;let h,m,y,E=super.readable;if(a&&(o?E=Pr(E,new Xe(t)):(m=new Le(t),E=Pr(E,m))),c){const t=new Set,o=f&&br(f);let a;if(o)E=Br(E,Nr(o.DecompressionStream,f,{chunkSize:e,compressionMethod:w,rawBitFlag:d,uncompressedSize:p}),t);else{const o=_r(u,n,r);if(i&&!l&&s!==U&&p!==U&&o)try{a=new o(Fr,{chunkSize:e})}catch{a=U}if(!a)try{E=jr(E,u,{chunkSize:e,deflate64:l},n,r,t)}catch(t){if(l||p===U||!u&&r)throw Hr(t);try{a=new n(Fr)}catch{throw Hr(t)}}}a?(y=!0,E=function(t,e,r,n,o){const a=e.writable.getWriter(),i=e.readable.getReader(),s=n===U?new ae:U;let c,u,l=0,f=!1,w=!1;const d=new ReadableStream({start(t){u=t},pull(){m()},cancel:t=>(w=!0,m(),i.cancel(t))});return async function(){const e=t.getReader();try{const t=new Uint8Array(10);for(t.set(Or),await a.write(t);;){await h(),await a.ready;const{value:t,done:r}=await Zr(e,o);if(r)break;await a.write(t)}s&&await a.write(new Uint8Array(0));const i=new Uint8Array(8),c=Yt(i);c.setUint32(0,s?s.get():n,!0),c.setUint32(4,r,!0),f=!0,await a.write(i),await a.close()}catch(t){await Lr(a,t),await Wr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await p();if(e)break;if(l+=t.length,l>r)throw new Error(gr);s&&s.append(t),u.enqueue(t)}w||(w=!0,u.close())}catch(t){!function(t){w||(w=!0,u.error(t),m())}(t),await Wr(i,t)}}(),d;function p(){return i.read().catch(t=>{if(f){if(!s)throw qr(t,zr);if(l!=r)throw qr(t,gr);return{done:!0}}throw Vr(t,o)})}function h(){if(!w&&u.desiredSize<=0)return new Promise(t=>c=t)}function m(){if(c){const t=c;c=U,t()}}}(E,a,p,s,t)):E=function(t,e){const r=t.getReader();return new ReadableStream({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw await Wr(r,t),Vr(t,e)}},cancel:t=>r.cancel(t)})}(E,t)}i&&!y&&(h=new ie,E=Pr(E,h)),vr(this,E,()=>{if(h){const t=new DataView(h.value.buffer).getUint32(0,!1);if(s!=t)throw new Error(zr)}})}}const kr=new Map;function Cr(t,e){if(!t)return!1;let r=kr.get(t);r||(r=new Map,kr.set(t,r));let n=r.get(e);if(n===U){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function Mr(t){return Cr(t,xr)}function vr(t,e,r){e=Pr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function Nr(t,e,r){if(!t)throw new Error(fr);return new t(e,r)}function _r(t,e,r){return t&&e?e:r&&r.requiresModule?r:void 0}function jr(t,e,r,n,o,a){const i=e&&n?n:o||n,s=r.deflate64?Dr:xr;let c;try{c=new i(s,r)}catch(t){if(!e||!o||i==o)throw t;c=new o(s,r)}return Br(t,c,a)}function Pr(t,e){return ar(t).pipeThrough(e)}function Br(t,e,r){const n=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await n.ready;const t=await Zr(o,r);if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await Lr(n,t),await Wr(o,t)}}(),e.readable}async function Lr(t,e){try{await t.abort(e)}catch{}}async function Wr(t,e){try{await t.cancel(e)}catch{}}function Zr(t,e){const r=t.read();return e?r.catch(t=>{throw e.add(t),t}):r}function Vr(t,e){return e.has(t)?t:qr(t,Gr(t)?Rr:Ar)}function Hr(t){return Gr(t)?qr(t,Rr):t}function Gr(t){return Kt(t)&&"Z_MEM_ERROR"==t.code}function qr(t,e){const r=new Error(e);return r.cause=t,r}const Yr="data",Kr="deflate",Xr="inflate";class $r extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(Kr)?o=Ir:n.startsWith(Xr)&&(o=Tr),r.outputSize=0;let a=0;const i=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:a})}}),u=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==U&&r.outputSize>t.outputSize))throw new Error(gr)},flush(){const{crc32:t}=i;Object.assign(r,{crc32:t,inputSize:a})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(i).pipeThrough(u)})}}class Jr extends TransformStream{constructor(t){const e=[];let r=0,n=0;function o(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],a=t-o;r.length<=a?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,a),o),e[0]=r.subarray(a),o+=a)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=262144),super({transform(a,i){for(e.push(a),r+=a.length;r>t;)n+=t,i.enqueue(o())},flush(t){r&&(n+=r,t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r)))}}),Object.defineProperty(this,"outputSize",{get:()=>n})}}const Qr="Worker startup timeout";let tn,en,rn,nn=()=>{};async function on(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;return!(!r||r.requiresModule)||!(!Mr(e)&&(n=e,!Cr(n,Fr)))||!!r&&await an(t);var n}async function an(t){if(nn)try{return await nn(t),!0}catch{}return!1}function sn(t){t.createWorker?en=!0:tn=!1}class cn{constructor(t,{readable:e,writable:r},n,o){const{options:a,config:i,F:s,useWebWorkers:c,workerURI:u}=n;let{createWorker:l}=n;const{signal:f}=s;return en&&(l=U),Object.assign(t,{O:!0,I:(t.I||0)+1,readable:e.pipeThrough(new Jr(jt(i))).pipeThrough(new un(s),{signal:f}),writable:r,options:Object.assign({},a),U:n,workerURI:u,createWorker:l,terminate:()=>new Promise(e=>{const{T:r,O:n}=t;n?(t.C=t.C||[],t.C.push(e)):(r&&(r.terminate(),t.T=null),e()),t.M=null}),v(){if(t.O){const{C:e,T:r}=t;e&&(t.C=null,r&&(t.N=!0,r.terminate())),t.O=!1;const n=o(t);e&&e.forEach(t=>t(n))}}}),tn===U&&(tn=typeof Worker!=v),(c&&rn&&(tn&&u||l)?rn:fn)(t,i)}}class un extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await ln(t,r)},async transform(t,n){o+=t.length,e&&await ln(e,o,r),n.enqueue(t)},async flush(){n&&await ln(n,o)}})}}async function ln(t,...e){try{await t(...e)}catch{}}function fn(t,e){return{run:()=>wn(t,e)}}async function wn({options:t,readable:e,writable:r,v:n,U:o},a){let i,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Kr),r=e?a.CompressionStreamFallback:a.DecompressionStreamFallback,n=e?a.CompressionStream:a.DecompressionStream;t.useCompressionStream?r&&r.requiresModule&&!Mr(n)&&await u():await u()||r&&!r.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),i=new $r(t,a),s=new Jr(jt(a));const{signal:n}=o.F;await e.pipeThrough(i).pipeThrough(s).pipeTo(r,{preventClose:!0,preventAbort:!0,signal:n});const{crc32:c,inputSize:l,outputSize:f}=i;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(i){const e=s?s.outputSize:0;if(o.outputSize=e,Kt(t))try{t.outputSize=e}catch{}}throw t}finally{n()}function u(){return c||(c=an(a)),c}}const dn={type:"module"},pn="error",hn="abort";let mn,yn,En;var bn;function Sn(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function gn(t){const{T:e}=t;if(e)try{e.terminate()}catch{}t.M=null}function An(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if(yn===U||mn!==t){const a=typeof t==N;s=a?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===U&&(n=!1),n&&(c=dn);try{i=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(a&&l)return An(t,e,r,n,!1);if(n)throw o;return An(t,e,r,!0,!1)}}else{n===U&&(n=!0),n&&(c=dn);try{s=new URL(s,e)}catch{}try{i=new Worker(s,c)}catch(a){if(n)return An(t,e,r,!1,o);throw a}}mn=t,yn=s,En=c}else i=new Worker(yn,En);return i.addEventListener("message",t=>{r._=!0,Rn(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i,errorValue:s}=t,{reader:c,writer:u,j:l,P:f,v:w,I:d}=e,p=()=>e.I!=d;try{if(i)h(function(t,e){const{message:r,stack:n,code:o,name:a,outputSize:i,cause:s,codecImportFailed:c}=t;let u;if(u=e?e.value:Object.assign(new Error(r),{stack:n,code:o,name:a}),Kt(u))try{i!==U&&(u.outputSize=i),c&&(u.codecImportFailed=!0),s&&(Kt(u.cause)||(u.cause=Object.assign(new Error(s.message),{name:s.name})),s.code!==U&&u.cause.code!==s.code&&(u.cause.code=s.code)),e&&(u.name!==a&&(u.name=a),u.code!==o&&(u.code=o))}catch{}return u}(i,s));else{if("pull"==r){const{value:t,done:r}=await c.read();p()||xn({type:Yr,value:t,done:r,messageId:o},e)}if(r==Yr){const t=new Uint8Array(n);await u.ready,await u.write(t),p()||xn({type:"ack",messageId:o},e)}"close"==r&&function(t){p()||(l(t),m(),w())}(a)}}catch(i){p()||(gn(e),h(i))}function h(t){p()||(f(t),m(),Kt(t)&&t.codecImportFailed||w())}function m(){u&&u.releaseLock()}}(t,r)}),i.addEventListener(pn,t=>zn(t,r)),i.addEventListener("messageerror",t=>zn(t,r)),i}function Rn(t){const{B:e}=t;e&&(clearTimeout(e),t.B=null)}function zn(t,e){t.preventDefault&&t.preventDefault(),Rn(e);const{_:r,P:n,writer:o,v:a}=e;gn(e),r||(e.T=null);let i=t.error||new Error(t.message||pn);r||(i=Object.assign(new Error(i.message||pn),{L:!0}),e.W=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function xn(t,{T:e,writer:r}){try{const{value:r}=t;if(r){t.value=qt(r);try{e.postMessage(t,[t.value.buffer])}catch{e.postMessage(t)}}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}bn=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.M){let i;typeof a==N&&(a=a());try{i=An(t.workerURI,r,t)}catch{return sn(t),fn(t,e)}Object.assign(t,{T:i,_:!1,N:!1,W:null,M:{run:async()=>{try{return await async function(t,e){if(!t.T){const{W:e}=t;t.W=null;const r=e||new Error(Qr);throw r.L=!0,r}let r,n;const o=new Promise((e,o)=>{r=e,n=e=>{const{outputSize:r,U:n}=t;if(n.outputSize=r,Kt(e))try{e.outputSize=r}catch{}o(e)}});Object.assign(t,{reader:null,writer:null,outputSize:0,Z:!1,V:null,j:r,P:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,H:u}=function(t,e){const r=new AbortController;let n;const{writable:o,readable:a}=new TransformStream({transform(t,r){e.outputSize+=t.length,r.enqueue(t)}}),i=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});i.catch(t=>{n||Object.assign(e,{Z:!0,V:t})});const{signal:s}=e.U.F;if(s){const t=()=>r.abort(s.reason),e=()=>s.removeEventListener(hn,t);s.addEventListener(hn,t),i.then(e,e)}return{writable:o,closed:i,H:()=>{n=!0,r.abort()}}}(t.writable,t);try{xn({type:"start",options:i,config:e},t)}catch(e){u();try{await c}catch{}throw t.v(),e}Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:l}=e;!t._&&Number.isFinite(l)&&l>=0&&(t.B=setTimeout(()=>function(t){if(t.B=null,t._)return;const{P:e,writer:r}=t;if(gn(t),t.T=null,e){const t=new Error(Qr);t.L=!0,e(t),r&&r.releaseLock()}}(t),l));try{const t=await o;return await f(),await c,t}catch(e){await f(),u();try{await c}catch{}const{outputSize:r,U:n,Z:o,V:a}=t;n.outputSize=r;const i=Kt(e)&&(e.codecImportFailed||e.L),s=o&&!i?a:e;if(Kt(s))try{s.outputSize=r}catch{}throw s}async function f(){if(!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:a,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.L)return sn(t),Sn(t),wn(t,e);if(r&&r.codecImportFailed){if(t.reader)return Sn(t),wn(t,e);t.v()}throw r}}}})}return t.M},rn=bn;let Dn=[];const Fn=[];let On,In,Un=0;async function Tn(t,e){const{options:r,config:n}=e,{useWebWorkers:o,useCompressionStream:a,compressed:i,checkCrc32:s,computeCrc32:c,encrypted:u,format:l,codecURI:f}=r,{workerURI:w,createWorker:d,maxWorkers:p}=n;l&&(f&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(f,n.baseURI)),await async function(t,e){!pr.has(t)&&e&&Sr(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(l,r.codecURI));const h=!(i||s||c||u),m=l===U||Boolean(r.codecURI);return e.useWebWorkers=!h&&m&&(o||o===U&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:U,e.createWorker=e.useWebWorkers&&d?d:U,r.useCompressionStream=a||a===U&&n.useCompressionStream,(await async function(){const r=Dn.find(t=>!t.O);if(r)return jn(r),new cn(r,t,e,y);if(Dn.length<p){const r={G:Un};return Un++,Dn.push(r),new cn(r,t,e,y)}return new Promise(r=>{Fn.push({resolve:r,stream:t,U:e}),In=n.workerStarvationTimeout,kn()})}()).run();function y(t){if(Cn(),t.N)return t.N=!1,vn();if(Fn.length){const[{resolve:e,stream:r,U:n}]=Fn.splice(0,1);e(new cn(t,r,n,y)),kn()}else t.T?(jn(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.Y=setTimeout(async()=>{Dn=Dn.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):Dn=Dn.filter(e=>e!=t)}}function kn(){!On&&Fn.length&&Number.isFinite(In)&&In>=0&&(On=setTimeout(Mn,In))}function Cn(){On&&(clearTimeout(On),On=null)}function Mn(){if(On=null,Fn.length){const[{resolve:t,stream:e,U:r}]=Fn.splice(0,1);t(new cn({},e,Nn(r),_n)),kn()}}function vn(){const t=Fn.splice(0).map(({resolve:t,stream:e,U:r})=>new Promise(n=>{t(new cn({},e,Nn(r),()=>{_n(),n()}))}));return Cn(),Promise.all(t)}function Nn(t){return Object.assign({},t,{useWebWorkers:!1,workerURI:U,createWorker:U})}function _n(){Cn(),kn()}function jn(t){const{Y:e}=t;e&&(clearTimeout(e),t.Y=null)}const Pn="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function Bn(t,e){return Wn(t,e,!0)}function Ln(t){if(!t.some(t=>t>127))return!1;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function Wn(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=Pn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const Zn="HTTP error ",Vn="HTTP Range not supported",Hn="HTTP resource changed",Gn="Writer iterator completed too soon",qn="Writer not initialized",Yn="Invalid writer (size must be writable)",Kn="Content-Range",Xn="Range",$n="GET",Jn="bytes",Qn=16777216,to="writable",eo=Symbol();class ro{constructor(){this.size=0}init(){this.initialized=!0}}class no extends ro{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=jt(_t())}={}){const n=this;let o=0;return r=Pt(r),new ReadableStream({async pull(a){const i=e===U?r:Math.min(r,e-o),s=await Vo(n,t+o,i);s.length&&(a.enqueue(s),o+=s.length),(e!==U&&o>=e||!s.length&&i)&&a.close()}})}}class oo extends ro{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(qn);return t.writeUint8Array(qt(e))}});Object.defineProperty(t,to,{get:()=>e})}writeUint8Array(){}}class ao extends no{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{K:t,X:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{X:r,K:n}=this,o=new Uint8Array(e),a=4*Math.floor(t/3),i=atob(n.substring(a+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(a/4);let c=0;for(let t=s;t<s+e&&t<i.length;t++)o[t-s]=i.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class io extends oo{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let r,n=e.$;const o=e.$.length;for(e.$="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.$+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.$=n+e.$}getData(){return this.data+btoa(this.$)}}let so,co;class uo extends no{constructor(t){super(),Object.assign(this,{J:t,size:t.size}),co||(co=(async()=>{try{const t=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader();let e=0,r=await t.read();for(;!r.done;)e+=r.value.length,r=await t.read();so=1==e}catch{so=!1}})())}createReadable(t){const{J:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};if(typeof e.stream==N){if(!n&&o>=r)return ar(e.stream());if(so)return ar(e.slice(n,n+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.J:r.J.slice(t,n);let a=await o.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,n)),new Uint8Array(a)}}class lo extends ro{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,to,{get:()=>r.writable}),e.contentType=t,e.et=ir(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class fo extends uo{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function wo(t){let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);n<128?e+=1:n<2048?e+=2:n<55296||n>=57344?e+=3:n<56320&&56320==(64512&t.charCodeAt(r+1))?(e+=4,r++):e+=3}return e}class po extends lo{constructor(t){super(),Object.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return Wn(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class ho extends no{constructor(t,e){super(),yo(this,t,e)}async init(){await Eo(this,To,Fo),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o,ot:a}=e;if((r||n)&&o!==U){const{offset:r=0,size:n=o-r}=t||{},i=a&&r>=o-a.length;if(n>0&&r<o&&!i)return function(t,e,r){let n,o=e,a=0,i=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(Vn);const o=e.length>a?e.subarray(0,a):e;a-=o.length,i-=o.length,o.length&&t.enqueue(o),a||(await async function(){const t=n;n=U,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await To($n,t,xo(t,o,e));if(206!=r.status)throw new Error(Vn);const s=So(r);if(s!==U&&s!=o)throw new Error(Vn);zo(t,r),Ro(t,r),o+=e,a=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return bo(this,t,e,To,Fo)}}class mo extends no{constructor(t,e){super(),yo(this,t,e)}async init(){await Eo(this,ko,Oo),super.init()}readUint8Array(t,e){return bo(this,t,e,ko,Oo)}}function yo(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=Qn,fetch:u}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s,maximumRangeSize:c,fetch:u})}async function Eo(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=_t(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==v||o)){const n=await e($n,t,xo(t,s?-65557:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==Jn))throw new Error(Vn);{let o;s&&206==n.status&&(o=new Uint8Array(await n.arrayBuffer())),Ro(t,n);const a=go(n);a===U?await Uo(t,e,r):t.size=a,o&&o.length&&So(n)===t.size-o.length&&(t.ot=o)}}else await Uo(t,e,r)}async function bo(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,ot:s,size:c,options:u}=t;if(a||i){if(e>=c||0===r)return B;{if(e+r>c&&(r=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+r)}const o=await n($n,t,xo(t,e,r));if(206!=o.status)throw new Error(Vn);const a=So(o);if(a!==U&&a!=e)throw new Error(Vn);zo(t,o),Ro(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(Vn);return i}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function So(t){const e=t.headers.get(Kn);if(e){const t=Number(e.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t))return t}}function go(t){const e=t.headers.get(Kn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function Ao({headers:t}){return{it:t.get("Etag")||U,lastModified:t.get("Last-Modified")||U}}function Ro(t,e){const{checkResourceChanges:r,st:n}=t;r&&!n&&206==e.status&&(t.st=Ao(e))}function zo(t,e){const{checkResourceChanges:r,st:n,size:o}=t;if(r){const t=go(e);if(t!==U&&o!==U&&t!=o)throw new Error(Hn);if(n){const t=Ao(e);if(Object.entries(n).some(([e,r])=>r!==U&&t[e]!==U&&r!=t[e]))throw new Error(Hn)}}}function xo(t,e=0,r=1){return Object.assign({},Do(t),{[Xn]:Jn+"="+(e<0?e:e+"-"+(e+r-1))})}function Do({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function Fo(t){await Io(t,To)}async function Oo(t){await Io(t,ko)}async function Io(t,e){const r=await e($n,t,Do(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function Uo(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,Do(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function To(t,{fetch:e=fetch,options:r,url:n},o){const a=await e(n,Object.assign({},r,{method:t,headers:o}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new Error(Vn):new Error(Zn+(a.statusText||a.status))}function ko(t,{url:e},r){return new Promise((n,o)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status>=200&&a.status<=299){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:a.status,arrayBuffer:()=>a.response,headers:new Map(t)})}else o(416==a.status?new Error(Vn):new Error(Zn+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),a.open(t,e),r)for(const t of Object.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class Co extends no{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new mo(t,e):new ho(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}createReadable(t){return this.reader.createReadable(t)}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class Mo extends Co{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class vo extends no{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class No extends oo{constructor(t){super(),this.ut=t||262144}init(t=0){Object.assign(this,{offset:0,ct:new Uint8Array(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<r;)t*=2;const n=e.ct;e.ct=new Uint8Array(t),e.ct.set(n)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class _o extends no{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await Promise.all(t.lt.map(Zo));t.wt=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}ht(t){const{wt:e,size:r}=this,n=e[t];return n===U?r:n}async readUint8Array(t,e){const r=this,{lt:n}=this;let o,a=0,i=t;for(;n[a]&&i>=n[a].size;)i-=n[a].size,a++;const s=n[a];if(s){const n=s.size;if(i+e<=n)o=await Vo(s,i,e);else{const a=n-i;o=Gt(await Vo(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=B;return r.ft=Math.max(a,r.ft),o}}class jo extends ro{constructor(t,e=4294967295){super();const r=this;let n,o,a;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const i=new WritableStream({async write(e){if(e===eo)return void(a&&await c());const{availableSize:i}=r;if(a)e.length>=i?(await s(e.subarray(0,i)),await c(),e.length>i&&await this.write(e.subarray(i))):await s(e);else{const{value:i,done:s}=await t.next();if(s&&!i)throw new Error(Gn);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await Wo(n),o=i.writable,a=o.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await u())},async abort(t){a&&await a.abort(t)}});async function s(t){const e=t.length;e&&(await a.ready,await a.write(t),n.size+=e,r.availableSize-=e)}async function c(){await u(),r.diskOffset+=n.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function u(){await a.close()}Object.defineProperty(r,to,{get:()=>i})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(eo)}finally{t.releaseLock()}}}class Po{constructor(t){return Array.isArray(t)&&(t=new _o(t)),(t instanceof ReadableStream||typeof t.getReader==N)&&(t={readable:ar(t)}),t}}class Bo{constructor(t){t.writable===U&&typeof t.next==N&&(t=new jo(t)),(t instanceof WritableStream||typeof t.getWriter==N)&&(t={writable:sr(t)});try{t.size=t.size===U?0:t.size}catch{throw new Error(Yn)}return t}}function Lo(t){return Boolean(t&&t.getData)}async function Wo(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function Zo(t){return t=new Po(t),await Wo(t),t.size!==U&&t.readUint8Array||(t=new uo(await ir(t.readable)),await Wo(t)),t}function Vo(t,e,r){return t.readUint8Array(e,r)}function Ho(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?no.prototype.createReadable.call(t,e):t.readable}function Go(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==U&&(n.filename=r),t.push(n)}}const qo="filename",Yo="rawFilename",Ko="comment",Xo="rawComment",$o="uncompressedSize",Jo="compressedSize",Qo="offset",ta="diskNumberStart",ea="lastModDate",ra="rawLastModDate",na="lastAccessDate",oa="rawLastAccessDate",aa="creationDate",ia="rawCreationDate",sa="internalFileAttributes",ca="externalFileAttributes",ua="msdosAttributesRaw",la="msdosAttributes",fa="msDosCompatible",wa="zip64",da="encrypted",pa="version",ha="versionMadeBy",ma="zipCrypto",ya="directory",Ea="executable",ba="compressionMethod",Sa="signature",ga="extraField",Aa="unixMode",Ra="setuid",za="setgid",xa="sticky",Da=[qo,Yo,$o,Jo,ea,ra,Ko,Xo,na,oa,aa,ia,Qo,ta,sa,ca,ua,la,fa,wa,da,pa,ha,ma,ya,Ea,"symlink",ba,Sa,"crc32",ga,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Aa,"unixExternalUpper",Ra,za,xa,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Fa{constructor(t){Da.forEach(e=>this[e]=t[e])}}const Oa=new Set([1,h,10,m,28789,25461,y,E,b,22613,13]);function Ia(t,e,r){return t?e?12:16+4*r:0}const Ua="File format is not recognized",Ta="End of central directory not found",ka="End of Zip64 central directory locator not found",Ca="Central directory header not found",Ma="File contains encrypted entry",va="Encryption method not supported",Na="Split zip file",_a="Entry data out of bounds",ja="Ambiguous archive",Pa="Encrypted central directory is not supported",Ba="Unsafe filename",La="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Wa="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",Za="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Va="64-bit value exceeds Number.MAX_SAFE_INTEGER",Ha="unsorted central directory",Ga="unknown version needed to extract",qa="compressed patched data",Ya="malformed extra field",Ka="unknown zip64 extensible data",Xa="wrapped entries count",$a="appended data",Ja="prepended data",Qa="prepended central directory",ti="trailing central directory data",ei="mismatched central directory offset",ri="missing zip64 extra field",ni="duplicate filename",oi="mismatched zip64 end of central directory record",ai="multiple end of central directory records",ii="mismatched local file header (filename)",si="mismatched local file header (general purpose bit flag)",ci="mismatched local file header (compression method)",ui="mismatched local file header (crc32 or sizes)",li=/^[a-zA-Z]:/,fi=/(^|[\\/])\.\.([\\/]|$)/,wi="utf-8",di="cp437",pi=[[$o,t],[Jo,t],[Qo,t],[ta,e]],hi={[e]:{yt:rs,bytes:4},[t]:{yt:ns,bytes:8}},mi=BigInt(Number.MAX_SAFE_INTEGER);class yi{constructor(t,e={}){Object.assign(this,{reader:new Po(t),options:e,Et:{bt:new Set,St:[],gt:[]},At:new WeakSet})}async*getEntriesGenerator(a={}){const c=this;let{reader:h}=c;if(await Wo(h),h.size!==U&&h.readUint8Array||(h=new uo(await ir(h.readable)),await Wo(h)),h.size<w)throw new Error(Ua);const m=c.warnings=[],y=Pi(a,c.options),E=y==st,b=y!=ut,S=Wi(Xi(c,a,rt),y),g=function(t,e){if(t===U)return e;if(!ji(t))throw new Error(Wa);return t}(Xi(c,a,"filenameValidation"),y),F=Xi(c,a,"normalizeFilename"),{Rt:O,zt:I}=await Zi(h,b,S);if(!O)throw await async function(t){return await _i(t)==o}(h)?new Error(Na):new Error(Ta);b&&I>1&&Ki(ai);const T=Yt(O);let k=rs(T,12),C=rs(T,16);const v=O.offset,N=es(T,20),_=v+w+N,j=h.size-_;j>S&&Ki($a),j>0&&Go(m,$a);let P=es(T,4);const L=h.ft||0;let W,Z,V,H,q,Y=es(T,6),K=es(T,10),X=0,$=p;const J=C==t||k==t||K==e||Y==e;if(C!=t&&Y!=e&&(C+=Ni(h,Y)),J){const r=O.offset>=d?await Vo(h,O.offset-d,d):B,n=Yt(r);if(r.length==d&&rs(n,0)==l){C=Ni(h,rs(n,4))+ns(n,8);let r=await Vo(h,C,p),o=Yt(r);if(r.length<p||rs(o,0)!=u){const t=O.offset-d;let e=t-p;if(await zi(h,e,u)||(e=await async function(t,e){const r=Math.max(0,e-65591),n=await Vo(t,r,e-r),o=Yt(n);for(let t=n.length-p;t>=0;t--)if(rs(o,t)==u&&t+12+Number(o.getBigUint64(t+4,!0))==n.length)return r+t}(h,t)),e!==U&&e>=0&&C!=e){const t=C;C=e,C>t&&(X=C-t),r=await Vo(h,C,p),o=Yt(r)}}if(r.length<p||rs(o,0)!=u)throw new Error(ka);if(V=!0,H=ns(o,4)>44,H){const t=Math.min(ns(o,4)-44,h.size-C-p);t>0&&($+=t,q=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Yt(t),n=es(r,26);Object.assign(e,{compressionMethod:es(r,0),compressedSize:ns(r,2),uncompressedSize:ns(r,10),encryptionAlgorithm:es(r,18),bitLength:es(r,20),flags:es(r,22),hashAlgorithm:es(r,24),hashData:t.subarray(28,28+n)})}return e}(await Vo(h,C+p,t)))}P==e?P=rs(o,16):P!=rs(o,16)&&Yi(E,m,oi),Y==e?Y=rs(o,20):Y!=rs(o,20)&&Yi(E,m,oi),K==e?K=ns(o,32):K!=ns(o,32)&&Yi(E,m,oi),k==t?k=ns(o,40):k!=ns(o,40)&&Yi(E,m,oi),C=Ni(h,Y)+ns(o,48)+X}else if(C==t||k==t||Y==e)throw new Error(ka)}let Q=k;const tt=O.offset-(V?$+d:0);if(L!=P)throw new Error(Na);if(C<0)throw new Error(Ua);let nt=0,ot=C<h.size?await Vo(h,C,k):B,ct=Yt(ot);if(k){let e=tt-k;if(C!=e&&Y==P){const r=ot.length>=4&&(rs(ct,nt)==s||Boolean(q&&q.compressedSize)||gi(ct));if(!r&&e<0)throw new Error(Ua);let o=!r;if(e>=0&&e+4<=h.size){let t=await Ri(h,e);if(!t){const r=await async function(t,e){const r=Math.max(0,e-65541),n=await Vo(t,r,e-r),o=Yt(n);for(let t=n.length-6;t>=0;t--)if(rs(o,t)==i&&t+6+es(o,t+4)==n.length)return r+t}(h,tt),n=r-k;r!==U&&n>=0&&await Ri(h,n)&&(e=n,t=!0)}r&&(o=t)}if(o&&e!=C){const o=C;C=e,ot=await Vo(h,C,k),ct=Yt(ot);const a=C-o,i=function(e,r){if(e.length<f)return U;const n=rs(r,42);if(n!=t)return n;let o=f+es(r,28);const a=Math.min(o+es(r,30),e.length);for(;o+4<=a;){const e=es(r,o),n=es(r,o+2);if(1==e){let e=o+4;return rs(r,24)==t&&(e+=8),rs(r,20)==t&&(e+=8),e+8<=a?ns(r,e):U}o+=4+n}return U}(ot,ct),s=i!==U&&await zi(h,i,n),c=i!==U&&await zi(h,i+a,n);a>0&&(!s||c)?(X+=a,W=r):(Yi(E,m,ei),a<0&&!s&&c&&(X+=a))}}if(ot.length<4)throw new Error(Ua)}else!K&&C<tt&&Y==P&&(X+=tt-C,C=tt);const lt=tt-C;if(k!=lt&&lt>=0&&Y==P&&(k=lt,ot=await Vo(h,C,k),ct=Yt(ot)),C<0||C>=h.size)throw new Error(Ua);c.directoryOffset=C,c.directoryLength=Q;const ft=$i(c,a,"decryptCentralDirectory");let wt,dt;if(ft&&K&&ot.length>=4&&rs(ct,0)!=s&&(H||gi(ct))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(q,Q,ot.length);dt=ot.subarray(t),ot=await ft(ot.subarray(0,t),q),ct=Yt(ot),Q=ot.length,wt=!0}q&&!wt&&(ot.length<4||rs(ct,0)==s)&&Go(m,Ka),Z=C;const pt=Xi(c,a,"filenameEncoding"),ht=Xi(c,a,"commentEncoding"),mt=new Set;let yt,Et=-1;const bt=!E&&!V;!K&&bt&&(K=Ai(ct,ot,nt),K&&Go(m,Xa));const St=Object.assign({},c.options,a,{[et]:y});delete St[G];for(let n=0;n<K;n++){const o=new Si(h,St);if(nt+f>ot.length||rs(ct,nt)!=s){if(0==n&&!wt&&(H||gi(ct)))throw new Error(Pa);throw new Error(Ca)}Di(o,ct,nt+6);const i=Boolean(o.bitFlag.languageEncodingFlag),u=nt+f,l=u+o.filenameLength+o.extraFieldLength,w=es(ct,nt+4),d=!(w>>8),p=w>>8==3,y=es(ct,nt+32),b=l+y,S=new Uint8Array(ot.subarray(u,b)),O=S.subarray(0,o.filenameLength),I=S.subarray(o.filenameLength+o.extraFieldLength),T=i||!pt&&Ln(O),k=i||!ht&&Ln(I),C=rs(ct,nt+38),v=C&r,N={readOnly:Boolean(1&v),hidden:Boolean(2&v),system:Boolean(4&v),directory:Boolean(16&v),archive:Boolean(32&v)},_=rs(ct,nt+42),j=$i(c,a,"decodeText")||Bn,P=T?wi:pt||di,B=k?wi:ht||di;let L=j(O,P,at);L===U&&(L=Bn(O,P));let W,V=j(I,B,it);V===U&&(V=Bn(I,B)),Object.assign(o,{index:n,xt:wt,versionMadeBy:w,msDosCompatible:d,zip64:!1,compressedSize:0,uncompressedSize:0,Dt:y,offset:_,diskNumberStart:es(ct,nt+34),internalFileAttributes:es(ct,nt+36),externalFileAttributes:C,msdosAttributesRaw:v,msdosAttributes:N,rawFilename:O,filenameUTF8:T,commentUTF8:k,rawExtraField:S.subarray(o.filenameLength,o.filenameLength+o.extraFieldLength),rawComment:I,filename:L,comment:V});try{W=Fi(o,o,ct,nt+6)}catch(t){if(E||t.message!=M)throw t;o.Ft=!0,Go(m,ri,o.filename)}if(L=o.filename,F){const t=F(L);t!==U&&(L=o.filename=t)}if(Li(L,g)){const t=new Error(Ba);throw t.filename=L,t}if(W&&Go(m,Ya,L),o.Ft&&o.offset==t)Z=0;else{o.offset+=X;const t=Ni(h,o.diskNumberStart)+o.offset;Z=Math.min(t,Z),t<Et&&Go(m,Ha,L),Et=t}(o.version&r)>63&&Go(m,Ga,L),32&~o.rawBitFlag||Go(m,qa,L),mt.has(o.filename)&&(yt=!0),mt.add(o.filename);const G=o.externalFileAttributes>>16&e;o.unixMode===U&&16877&G&&(o.unixMode=G);const q=Boolean(o.unixMode&z),Y=Boolean(o.unixMode&x),$=Boolean(512&o.unixMode),J=40960==((o.unixMode===U?G:o.unixMode)&A),Q=o.unixMode!==U&&(o.unixMode&A)==R||(G&A)==R||d&&N.directory||o.filename.endsWith(D),tt=!J&&!Q&&(o.unixMode!==U?!!(73&o.unixMode):p&&!!(73&G));Object.assign(o,{setuid:q,setgid:Y,sticky:$,symlink:J,unixExternalUpper:G,executable:tt,directory:Q,zipCrypto:o.encrypted&&!o.extraFieldAES});const et=new Fa(o);if(o.Ft&&c.At.add(et),et.getData=(t,e)=>o.getData(t,et,c,e),et.arrayBuffer=async t=>{const e=new TransformStream,r=ir(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,et,c,Object.assign({},t,{preventClose:!1})),r},nt=b,n==K-1&&bt){const t=Ai(ct,ot,nt);t&&(K+=t,Go(m,Xa))}const{onprogress:rt}=a;if(rt)try{await rt(n+1,K,new Fa(o))}catch{}yield et}let gt=nt,At=xi(ot.subarray(nt))||(wt?xi(dt):U);if(!At&&!wt){const t=C+nt,e=Math.min(tt-t,65541);e>=6&&(At=xi(await Vo(h,t,e)))}At&&(c.digitalSignature=At,gt=nt+6+At.length),(nt!=Q&&gt!=Q||!wt&&nt!=k&&gt!=k)&&Yi(E,m,ti),yt&&Yi(E,m,ni);const Rt=Xi(c,a,"extractPrependedData"),zt=Xi(c,a,"extractAppendedData"),xt=(E||Rt)&&K&&4==Z&&await async function(t){const e=await _i(t);return e==o||808471376==e}(h)?4:0;return E&&(X>0||K&&Z>xt)&&Ki(Ja),(X>0||K&&Z>4)&&Go(m,Ja),W&&Go(m,Qa),Rt&&(c.prependedData=Z>xt?await Vo(h,xt,Z-xt):B),c.comment=N?await Vo(h,v+w,N):B,zt&&(c.appendedData=_<h.size?await Vo(h,_,h.size-_):B),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[L](){return this.close()}}class Ei{constructor(t={}){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}}),o=new yi(r,t),a=o.getEntriesGenerator(),i=new Set;this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await a.next();if(e)return t.close();const n=function(t,e){const{readable:r,writable:n}=new TransformStream;let o;const a={cancel:async t=>{e.delete(a),await(o?o.cancel(t):r.cancel(t))}};return a.readable=new ReadableStream({async pull(i){o||(o=r.getReader(),e.add(a),async function(){try{await t.getData(n,{preventClose:!1})}catch(t){try{await n.abort(t)}catch{}}finally{e.delete(a)}}());const{done:s,value:c}=await o.read();s?i.close():i.enqueue(c)},cancel:t=>a.cancel(t)},{highWaterMark:0}),a}(r,i),o={...r,readable:n.readable};delete o.getData,Object.defineProperties(o,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(o)},async cancel(t){const r=Array.from(i);i.clear(),e.error(t),await Promise.allSettled(r.map(e=>e.cancel(t))),await Promise.allSettled([a.return(),o.close()])}}),this.writable=n}}async function bi(t,e={}){if(t=new Po(t),await Wo(t),t.size!==U&&t.readUint8Array||(t=new uo(await ir(t.readable)),await Wo(t)),t.size<w)return!1;const r=Pi(e,{}),n=r!=ut,o=Wi(e[rt],r),{Rt:a,zt:i}=await Zi(t,n,o);if(!a||r==st&&i>1)return!1;const s=es(Yt(a),20),c=a.offset+w+s;return t.size-c<=o}let Si=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,a={}){const i=this,{Et:s,directoryOffset:c}=o;if(i.Ft)throw new Error(M);const u=_t(),{reader:l,index:f,offset:w,diskNumberStart:d,extraFieldAES:p,extraFieldZip64:h,compressionMethod:m,bitFlag:y,rawBitFlag:E,crc32:b,rawLastModDate:S,uncompressedSize:A,compressedSize:R}=i,{dataDescriptor:z}=y,x=e.localDirectory={},D=e.warnings=[],O=Ni(l,d)+w,I=await Vo(l,O,F),T=Yt(I);let v=Xi(i,a,W),N=Xi(i,a,Z);const _=St(Xi(i,a,V)),j=Boolean(_),P=!0===_;if(bt(v,N),v=v&&v.length?v:U,N=N&&N.length?N:U,p&&99!=p.originalCompressionMethod)throw new Error(fr);if(I.length<F||rs(T,0)!=n)throw new Error(k);Di(x,T,4);const{extraFieldLength:L,filenameLength:G}=x,X=x.dataOffset=O+F+G+L,$=Xi(i,a,"checkLocalDirectory"),J=Pi(a,i.options),Q=function(t,e){return t===U?e!=ut:Boolean(t)}($,J),tt=Xi(i,a,"checkLocalFilename"),et=function(t,e){return t===U?e==st:Boolean(t)}(tt===U?$:tt,J);let rt=B;if(et&&(G||L)){const t=await Vo(l,O+F,G+L);rt=t.subarray(0,G),x.rawExtraField=t.subarray(G)}else x.rawExtraField=L?await Vo(l,O+F+G,L):B;et&&(x.rawFilename=rt),Fi(i,x,T,4,!0)&&Go(D,Ya),function(t,e,r,n,o){const{rawFilename:a}=t,i=!o,s=t.xt&&(e.rawBitFlag&g)==g;!n||s||r.length==a.length&&!r.some((t,e)=>t!=a[e])||Yi(i,o,ii),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&Yi(i,o,si),e.compressionMethod!=t.compressionMethod&&Yi(i,o,ci),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Yi(i,o,ui)}(i,x,rt,et,Q?U:D);const{lastAccessDate:nt,creationDate:ot,uid:at,gid:it}=x;nt&&e.lastAccessDate===U&&(e.lastAccessDate=nt),ot&&e.creationDate===U&&(e.creationDate=ot),at!==U&&e.uid===U&&(e.uid=at),it!==U&&e.gid===U&&(e.gid=it);const ct=Xi(i,a,"checkPasswordOnly"),lt=i.encrypted&&(!P||ct),ft=lt&&!p;if(P||(e.zipCrypto=ft),lt&&!(64&~i.rawBitFlag))throw new Error(va);const wt=j?U:yr(m);if(0!=m&&8!=m&&9!=m&&!wt&&!j)throw new Error(fr);if(lt){if(!ft&&(p.strength<1||p.strength>3))throw new Error(va);if(!v&&!N)throw new Error(Ma)}if(X+R>Math.min(l.size,c))throw new Error(_a);const dt=R,pt=yt(Xi(i,a,H));Et(pt);let ht=Xi(i,a,"checkOverlappingEntry");const mt=Xi(i,a,"checkOverlappingEntryOnly");mt&&(ht=!0);const{onstart:gt,onprogress:At,onend:Rt}=a,zt=0!=m&&!j,xt=j?R-Ia(lt,ft,p&&p.strength):A,Dt=9==m;let Ft=Xi(i,a,Y);Dt&&(Ft=!1);const Ot=Xi(i,a,"checkCrc32"),It=(Ot===U?Xi(i,a,"checkSignature"):Ot)&&!j&&(!lt||ft||p&&1==p.vendorVersion),Ut={options:{codecType:Xr,password:v,rawPassword:N,zipCrypto:ft,encryptionStrength:p&&p.strength,checkCrc32:It,checkAuthenticationCode:Xi(i,a,"checkAuthenticationCode"),passwordVerification:ft&&(z?S>>>8&r:b>>>24&r),outputSize:xt,crc32:b,compressed:zt,encrypted:lt,useWebWorkers:Xi(i,a,q),useCompressionStream:Ft,deflate64:Dt,format:wt?wt.format:U,codecURI:wt?wt.codecURI:U,compressionMethod:m,rawBitFlag:E,checkPasswordOnly:ct},config:u,F:{signal:pt,size:dt,onstart:gt,onprogress:At,onend:Rt}};let Tt,kt,Ct;ht&&(await async function({reader:t,Ot:e,index:r,offset:n,crc32:o,compressedSize:a,uncompressedSize:i,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,Et:l}){let f=0;if(c){const r=Boolean(u),n=await Ci(t,s+a,{crc32:o,compressedSize:a,uncompressedSize:i,zip64:r});n?(e.localDirectory.dataDescriptor=n,f=vi(n.zip64,n.signature)):f=vi(r,!1)}const w={start:n,end:s+a+f,Ot:e},{bt:d,St:p,gt:h}=l;if(!d.has(r)){const t=function(t,e){let r=0,n=t.length;for(;r<n;){const o=r+n>>>1;t[o].start<e.start?r=o+1:n=o}const o=t[r-1],a=t[r];return o&&ki(e,o)?o:a&&ki(e,a)?a:void 0}(p,w)||h.find(t=>ki(w,t));if(t){const e=new Error(C);throw e.overlappingEntry=t.Ot,e}d.add(r),h.push(w),h.length*h.length>p.length&&(h.sort((t,e)=>t.start-e.start),l.St=function(t,e){const r=[];let n=0,o=0;for(;n<t.length||o<e.length;)o==e.length||n<t.length&&t[n].start<e[o].start?r.push(t[n++]):r.push(e[o++]);return r}(p,h),h.length=0)}}({reader:l,Ot:e,index:f,offset:O,crc32:b,compressedSize:R,uncompressedSize:A,dataOffset:X,dataDescriptor:z||x.bitFlag.dataDescriptor,extraFieldZip64:h||x.extraFieldZip64,Et:s}),function(t,e,r){const{dataDescriptor:n}=e,o=t.xt&&(e.rawBitFlag&g)==g;n&&!o&&(t.crc32!==U&&n.crc32!=t.crc32||n.compressedSize!=t.compressedSize||n.uncompressedSize!=t.uncompressedSize)&&Yi(!r,r,ui)}(i,x,Q?U:D));try{if(!mt){ct&&(t=new WritableStream),t=new Bo(t),await Wo(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(xt,R,zt)),({writable:Tt}=t);const e=ar(l.createReadable({offset:X,size:dt})),{outputSize:r}=await Tn({readable:e,writable:Tt},Ut);if(Et(pt),r!=xt)throw Object.assign(new Error(gr),{outputSize:r});t.size+=r}}catch(e){if(Kt(e)&&e.outputSize!==U&&(t.size+=e.outputSize),!ct||!Kt(e)||e.message!=Fe)throw kt=e,Ct=!0,e}finally{if((Lo(t)||!Xi(i,a,K))&&Tt&&!Tt.locked){const t=Tt.getWriter();if(Ct)try{await t.abort(kt)}catch{}else await t.close()}}return ct||mt?U:t.getData?t.getData():Tt}};function gi(t){return t.byteLength>=4&&134630224==rs(t,0)}function Ai(t,e,r){let n=0;for(;r+f<=e.length&&rs(t,r)==s;)r+=f+es(t,r+28)+es(t,r+30)+es(t,r+32),n++;return n%65536?0:n}function Ri(t,e){return zi(t,e,s)}async function zi(t,e,r){return!(e<0||e+4>t.size)&&rs(Yt(await Vo(t,e,4)),0)==r}function xi(t){if(t.length>=6){const e=Yt(t);if(rs(e,0)==i){const r=es(e,4);if(6+r<=t.length)return new Uint8Array(t.subarray(6,6+r))}}}function Di(t,e,r){const n=t.rawBitFlag=es(e,r+2),o=!(1&~n),a=rs(e,r+6);Object.assign(t,{encrypted:o,version:es(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:a,lastModDate:Ji(a),filenameLength:es(e,r+22),extraFieldLength:es(e,r+24)})}function Fi(t,e,r,n,o){const{rawExtraField:a}=e,i=e.extraField=new Map,s=Yt(a);let c=0,u=!1;try{for(;c<a.length;){const t=es(s,c),e=es(s,c+2);i.set(t,{type:t,data:a.slice(c+4,c+4+e)}),c+=4+e}}catch{u=!0}c>a.length&&(u=!0);const l=es(r,n+4);Object.assign(e,{signature:rs(r,n+10),crc32:rs(r,n+10),compressedSize:rs(r,n+14),uncompressedSize:rs(r,n+18)});const f=i.get(1);let w;f?(function(t,e,r){e.zip64=!0;const n=Yt(t.data),o=pi.filter(([t,r])=>e[t]==r),a=o.reduce((t,[,e])=>t+hi[e].bytes,0);if(t.data.length<a){if(r)return!1;throw new Error(M)}const i=[];try{for(let t=0,e=0;t<o.length;t++){const[,r]=o[t],a=hi[r];i.push(a.yt(n,e)),e+=a.bytes}}catch(t){if(r)return!1;throw t}return o.forEach(([r],n)=>{e[r]=t[r]=i[n]}),!0}(f,e,o)||(u=!0),e.extraFieldZip64=f):pi.some(([t,r])=>e[t]==r)&&(o?u=!0:w=!0);const d=i.get(28789);d&&(Oi(d,qo,Yo,e,t),e.extraFieldUnicodePath=d);const p=i.get(25461);p&&(Oi(p,Ko,Xo,e,t),e.extraFieldUnicodeComment=p);const S=i.get(h);S&&(99==l||e.encrypted)&&S.data.length>=7?(function(t,e,r){const n=Yt(t.data),o=ts(n,4);Object.assign(t,{vendorVersion:ts(n,0),vendorId:ts(n,2),strength:o,originalCompressionMethod:r,compressionMethod:es(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=U)}(S,e,l),e.extraFieldAES=S):(S&&(u=!0),e.compressionMethod=l);const g=i.get(13);g&&(Ii(g,e),e.extraFieldPkwareUnix=g);const A=i.get(22613);A&&(Ii(A,e),e.extraFieldUnixType1=A);const R=i.get(m);R&&(function(t,e,r){if(!t.data.length)return;const n=Yt(t.data),o=ts(n,0),a=[],i=[];r?(1&~o||(a.push(ea),i.push(ra)),2&~o||(a.push(na),i.push(oa)),4&~o||(a.push(aa),i.push(ia))):t.data.length>=5&&(a.push(ea),i.push(ra));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=rs(n,s);e[r]=t[r]=new Date(1e3*(0|a));const c=i[o];t[c]=a}s+=4})}(R,e,o),e.extraFieldExtendedTimestamp=R);const z=i.get(10);z&&(function(t,e){const r=Yt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=es(r,o),a=es(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+a)),o+=4+a}}catch{}if(n&&24==n.length){const r=Yt(n),o=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),i=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:a,rawCreationDate:i});const s={lastModDate:Qi(o),lastAccessDate:Qi(a),creationDate:Qi(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(z,e),e.extraFieldNTFS=z);const x=i.get(E);let D;x&&(D=Ui(x,e,!0),e.extraFieldInfoZip=x);const F=i.get(b);F&&(Ui(F,D?{}:e,!1),e.extraFieldUnix=F);const O=i.get(y);if(O&&(e.extraFieldUSDZ=O),w)throw new Error(M);return u}function Oi(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=Yt(t.data),i=new ae;i.append(o[r]);const s=Yt(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=rs(a,1),u=ts(a,0);Object.assign(t,{version:u,[e]:Bn(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==rs(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function Ii(t,e){if(t.data.length<8)return;const r=Yt(t.data),n={lastAccessDate:new Date(1e3*(0|rs(r,0))),lastModDate:new Date(1e3*(0|rs(r,4)))};t.data.length>=12&&(n.uid=es(r,8),n.gid=es(r,10)),Object.assign(t,n),Object.assign(e,n)}function Ui(t,e,r){try{const n=Yt(t.data);let o,a;if(r){let e=0;const r=ts(n,e++),i=ts(n,e++);o=Ti(t.data.subarray(e,e+i)),e+=i;const s=ts(n,e++);a=Ti(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=es(n,0),a=es(n,2),Object.assign(t,{uid:o,gid:a}));return o!==U&&(e.uid=o),a!==U&&(e.gid=a),o!==U||a!==U}catch{}}function Ti(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function ki(t,e){return t.start<e.end&&e.start<t.end}async function Ci(t,e,{crc32:r,compressedSize:n,uncompressedSize:o,zip64:a}){const i=Math.min(24,Math.max(0,t.size-e)),s=Yt(i?await Vo(t,e,i):B),c=[[a,!0],[a,!1],[!a,!0],[!a,!1]].map(([t,e])=>Mi(s,t,e)).filter(t=>t&&t.compressedSize==n&&t.uncompressedSize==o);return c.find(t=>t.crc32==r)||c[0]||Mi(s,a,!0)||Mi(s,a,!1)}function Mi(t,e,r){const n=r?4:0;if(t.byteLength<vi(e,r)||r&&rs(t,0)!=a)return U;const o=rs(t,n);let i,s;try{e?(i=ns(t,n+4),s=ns(t,n+12)):(i=rs(t,n+4),s=rs(t,n+8))}catch{return U}return{signature:r,zip64:e,crc32:o,compressedSize:i,uncompressedSize:s}}function vi(t,e){return(t?20:12)+(e?4:0)}function Ni(t,e){return t.ht?t.ht(e):0}async function _i(t){return rs(Yt(await Vo(t,0,4)))}function ji(t){return t===st||t===ct||t===ut}function Pi(t,e){return Bi(t,Bi(e,ct))}function Bi(t,e){const r=t[et];if(r!==U){if(!ji(r))throw new Error(La);return r}const n=t[G];return n===U?e:n?st:e==ut?ut:ct}function Li(t,e){if(e==ut)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(fi.test(t)||t.startsWith("/")||t.startsWith("\\")||li.test(t))||e==st&&(r.includes(".")||r.includes("")||t.includes("\0"))}function Wi(t,r){if(t!==U){const e=Rt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(Za);return e}return r==st?0:r==ut?1/0:e}async function Zi(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={It:64};let i,s,c=0;for await(const[r,u,l,f,d]of Vi(t,o)){const o=es(r,f+20);if(d+w+o==n){const o=await Gi(t,r,u,f,d,n,a);if(2==o){if(i||(i=Hi(l,f,d)),c++,!e||c>1)break}else 1!=o||s||(s=Hi(l,f,d))}}return i||(i=s),i||(i=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let a,i;for await(const[e,s,c,u,l]of Vi(t,o)){const o=Hi(c,u,l);a||(a=o);const f=await Gi(t,e,s,u,l,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{Rt:i,zt:c}}async function*Vi(t,e){const r=t.size-e,n=await Vo(t,r,e),o=Yt(n);for(let t=n.length-w;t>=0;t--)rs(o,t)==c&&(yield[o,r,n,t,r+t])}function Hi(t,e,r){return{offset:r,buffer:new Uint8Array(t.subarray(e,e+w)).buffer}}async function Gi(r,n,o,a,i,c,u){const f=es(n,a+10),w=rs(n,a+12),p=rs(n,a+16);if(f==e||w==t||p==t)return await qi(r,n,o,i-d,c,u)==l?2:0;if(!f&&!w)return 1;const h=es(n,a+6);for(const t of[i-w,Ni(r,h)+p])if(await qi(r,n,o,t,c,u)==s)return 2;return 0}async function qi(t,e,r,n,o,a){return n<0||n+4>o?U:n>=r?rs(e,n-r):a.It>0?(a.It--,rs(Yt(await Vo(t,n,4)),0)):U}function Yi(t,e,r){t?Ki(r):Go(e,r)}function Ki(t){const e=new Error(ja);throw e.reason=t,e}function Xi(t,e,r){return e[r]===U?t.options[r]:e[r]}function $i(t,e,r){return mt(Xi(t,e,r))}function Ji(t){const r=(4294901760&t)>>16,n=t&e,o=new Date(1980+((65024&r)>>9),((480&r)>>5)-1,31&r,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return o<I?I:o}function Qi(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function ts(t,e){return t.getUint8(e)}function es(t,e){return t.getUint16(e,!0)}function rs(t,e){return t.getUint32(e,!0)}function ns(t,e){const r=t.getBigUint64(e,!0);if(r>mi)throw new Error(Va);return Number(r)}var os=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:ja,ERR_BAD_FORMAT:Ua,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Ca,ERR_CODEC_OUT_OF_MEMORY:Rr,ERR_ENCRYPTED:Ma,ERR_ENCRYPTED_CENTRAL_DIRECTORY:Pa,ERR_ENTRY_DATA_OUT_OF_BOUNDS:_a,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:ka,ERR_EOCDR_NOT_FOUND:Ta,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:M,ERR_INVALID_AUTHENTICATION_CODE:De,ERR_INVALID_COMPRESSED_DATA:Ar,ERR_INVALID_CRC32:zr,ERR_INVALID_FILENAME_VALIDATION:Wa,ERR_INVALID_MAX_APPENDED_DATA_SIZE:Za,ERR_INVALID_PASSWORD:xe,ERR_INVALID_STRICTNESS:La,ERR_INVALID_UNCOMPRESSED_SIZE:gr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:k,ERR_OVERLAPPING_ENTRY:C,ERR_SPLIT_ZIP_FILE:Na,ERR_UNSAFE_FILENAME:Ba,ERR_UNSUPPORTED_COMPRESSION:fr,ERR_UNSUPPORTED_ENCRYPTION:va,ERR_UNSUPPORTED_UINT64:Va,ERR_WORKER_STARTUP_TIMEOUT:Qr,WARNING_APPENDED_DATA:$a,WARNING_COMPRESSED_PATCHED_DATA:qa,WARNING_DUPLICATE_FILENAME:ni,WARNING_MALFORMED_EXTRA_FIELD:Ya,WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET:ei,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:si,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:ci,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:ui,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:ii,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:oi,WARNING_MISSING_ZIP64_EXTRA_FIELD:ri,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:ai,WARNING_PREPENDED_CENTRAL_DIRECTORY:Qa,WARNING_PREPENDED_DATA:Ja,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:ti,WARNING_UNKNOWN_VERSION:Ga,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Ka,WARNING_UNSORTED_CENTRAL_DIRECTORY:Ha,WARNING_WRAPPED_ENTRIES_COUNT:Xa,ZipReader:yi,ZipReaderStream:Ei,Ut:async function(t,e,{crc32:r,compressedSize:n,uncompressedSize:o,extraFieldZip64:a}){const i=await Ci(t,e,{crc32:r,compressedSize:n,uncompressedSize:o,zip64:Boolean(a)});if(i&&i.compressedSize==n&&i.uncompressedSize==o)return vi(i.zip64,i.signature)},isZipFile:bi});const as="File already exists",is="Zip file comment exceeds 64KB",ss="Invalid zip file comment (must be a Uint8Array)",cs="File entry comment exceeds 64KB",us="Invalid file entry comment (must be a string)",ls="Invalid date (must be a valid Date instance)",fs="File entry name exceeds 64KB",ws="Version exceeds 65535",ds="The strength must equal 1, 2, or 3",ps="Encryption is not supported in USDZ files",hs="Split zip files are not supported in USDZ files",ms="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",ys="Invalid extra field (must be a Map)",Es="Invalid extra field type (must be integer 0..65535)",bs="Invalid extra field data (must be a Uint8Array)",Ss="Extra field data exceeds 64KB",gs=-2147483648,As=2147483647,Rs=BigInt(0),zs=BigInt("0x7fffffffffffffff"),xs="Zip64 is not supported (set the 'zip64' option to 'true')",Ds="Undefined uncompressed size",Fs="Undefined compression method",Os="Undefined CRC32",Is="Undetermined size",Us="Undefined reader",Ts="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",ks="Zip file not empty",Cs="Invalid uid (must be integer 0..2^32-1)",Ms="Invalid gid (must be integer 0..2^32-1)",vs="Invalid UNIX mode (must be integer 0..65535)",Ns="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",_s="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",js="Invalid msdosAttributesRaw (must be integer 0..255)",Ps="Invalid msdosAttributes (must be an object with boolean flags)",Bs="Invalid level (must be integer 0..9)",Ls="Signature data exceeds 64KB",Ws="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Zs="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",Vs="compression unavailable",Hs="clamped last modification date",Gs=new Uint8Array([7,0,2,0,65,69,3,0,0]),qs="infozip",Ys="unix",Ks=[8,9,5,3];let Xs=0;const $s=[];class Js{constructor(t,e={}){t=new Bo(t);const{availableSize:r=T,maxSize:n=T}=t,o=r>0&&r!==T&&n>0&&n!==T;if(o&&e[tt])throw new Error(hs);Object.assign(this,{writer:t,Tt:o,options:e,kt:new Map,Ct:new Set,offset:e[Q]===U?t.size||t.writable.size||0:e[Q],Mt:e[Q]===U?0:e[Q]-(t.size||t.writable.size||0),vt:new Set,Nt:[],warnings:[],_t:0,jt:0,Pt:U,Bt:!1})}prependZip(t){return rc(this,async function(t,e){if(t.Ct.size)throw new Error(ks);await nc(t,e)}(this,t))}appendZip(t,e={}){return rc(this,nc(this,t,e))}add(e="",n,o={}){const a=this,{vt:i}=a,s=async function(e,n,o,a){const i=(a=Object.assign({},a))[ot];if(i!==U){const{Lt:t,Wt:r}=ic(i,St(Cc(e,a,V)),Cc(e,a,ea));delete a[ot],a=Object.assign(t,r,a)}if(Cc(e,a,ya)&&!n.endsWith(D)&&(n+=D),e.Ct.has(n))throw new Error(as);e.Ct.add(n),Xs<_t().maxWorkers?Xs++:await new Promise(t=>$s.push(t));try{return await async function(e,n,o,a){const i=sc(e,n,a);({name:n}=i);const s=cc(e,n,a),{comment:c}=s,u=a[ga];e.kt.set(n,U);const l=e.Pt,f={};let w,d;s.Zt.keepOrder&&(f.Vt=new Promise(t=>w=t)),e.Pt=f;try{const{Zt:c}=s;0==c.level||c.compressionMethod!==U||c.Ht||await on(_t())||(c.level=0,Go(e.warnings,Vs,n));const u=await async function(t,e,{Zt:r},n){if(r.Ht&&!e&&!Cc(t,n,ya))throw new Error(Us);let o;if(e){if(e=new Po(e),await Wo(e),!e.readUint8Array&&!e.readable)throw new Error(Ts);({size:o}=e)}return Object.assign({reader:e},lc(t,Boolean(e),o,r,n))}(e,o,s,a);({reader:o}=u);const p=bc(e.writer),h=Ec(e.writer);let m=a.crc32===U?a[Sa]:a.crc32;const y=u.Zt.encrypted&&!c.zipCrypto;if(c.Ht&&!c.Gt&&y&&(m=U),c.Ht&&o&&!y&&m===U)throw new Error(Os);const E=wc(a=Object.assign({},a,i.Zt,s.Zt,u.Zt,{signature:a[Sa],crc32:m,offset:e.offset-p,diskNumberStart:h,[tt]:e.options[tt]}));E.qt&&Go(e.warnings,Hs,n);const b=hc(a),S=Hc(E.Yt,b.Kt);d=await async function(e,n,o,a,i){const{kt:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,Xt:f,signal:w}=i,{$t:d,Ot:p,Jt:h,Qt:m}=a,y=e.options[tt];let E,b,S,g,A,R,z,x=p,D=0;const O=u&&h?h.Vt:U;s.set(n,x);try{i.bufferedWrite||!u||e.te||e._t||e.jt||!l&&!f?(E=!0,e._t++,z=i.createTempStream?await i.createTempStream():new TransformStream(U,U,{highWaterMark:T}),z.size=0,await Wo(c)):(b=!0,e.jt++,z=c,await O,await I()),await Wo(z);const p=bc(c);e.Tt&&!E&&await Fc(e,c),y&&!E&&dc(a,e.offset-p);const{Yt:h}=d;E||await k();const m=Ec(c),S=gc(e,c);if(x.diskNumberStart=m,E||(A=!0,R=c.size,await Oc(z,h)),x=await async function(e,n,{diskNumberStart:o,Vt:a},i,s,c){const{$t:u,ee:l,re:f}=i,{ne:w,oe:d,lastModDate:p,rawLastModDate:h,encrypted:m,compressed:y,version:E,compressionMethod:b,ae:S,ie:g,se:A,ce:R,ue:z,le:x,fe:D,we:F,de:O}=u,{Kt:I}=l,{rawFilename:T,lastAccessDate:k,creationDate:C,password:M,rawPassword:v,level:N,useUnicodeFileNames:_,zip64:j,pe:P,he:B,me:L,zipCrypto:W,dataDescriptor:Z,directory:V,executable:H,versionMadeBy:G,rawComment:q,rawExtraField:Y,ye:K,useWebWorkers:X,onstart:$,onprogress:J,onend:Q,signal:tt,encryptionStrength:et,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,uid:it,gid:st,unixMode:ct,symlink:ut,setuid:lt,setgid:ft,sticky:wt,unixExternalUpper:dt,msdosAttributesRaw:pt,msdosAttributes:ht,useCompressionStream:mt,Ht:yt,Gt:bt,format:St,codecURI:gt}=c,At={Vt:a,versionMadeBy:G,zip64:j,pe:P,directory:Boolean(V),executable:Boolean(H),filenameUTF8:Boolean(_),rawFilename:T,commentUTF8:Boolean(_),rawComment:q,ae:S,ie:g,se:A,le:x,fe:D,we:F,de:O,rawExtraField:Y,ye:K,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,diskNumberStart:o,uid:it,gid:st,unixMode:ct,symlink:Boolean(ut),setuid:lt,setgid:ft,sticky:wt,unixExternalUpper:dt,msdosAttributesRaw:pt,msdosAttributes:ht};let{crc32:Rt,uncompressedSize:zt}=c,xt=0;yt||(zt=0);const{writable:Dt}=n;if(e){const o=e.size,a=ar(Ho(e,{size:o})),i={options:{codecType:Kr,inputSize:o,level:N,rawPassword:v,password:M,encryptionStrength:et,zipCrypto:m&&W,passwordVerification:m&&W&&h>>8&r,computeCrc32:!yt,compressed:y&&!yt,encrypted:m&&!bt,useWebWorkers:X,useCompressionStream:mt,format:St,codecURI:gt,compressionMethod:b},config:s,F:{signal:tt,size:o,onstart:$,onprogress:J,onend:Q}};try{const e=await Tn({readable:a,writable:Dt},i);if(xt=e.outputSize,n.size+=xt,Et(tt),yt||(zt=e.inputSize,m&&!W||(Rt=e.crc32)),!L&&xt>=t||!B&&zt>=t)throw new Error(xs)}catch(t){const{outputSize:e}=i;throw e!==U?n.size+=e:Kt(t)&&t.outputSize!==U&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,$t:n,ee:o},{zip64:a,zipCrypto:i,Ht:s,dataDescriptor:c}){const{oe:u,encrypted:l}=n,{Ee:f,be:w}=o;l&&!i&&!s||t===U||(Wc(u,10,t),c&&Wc(f,w,t)),a?c&&(Zc(f,w+4,BigInt(e)),Zc(f,w+12,BigInt(r))):(Wc(u,14,e),Wc(u,18,r),c&&(Wc(f,w+4,e),Wc(f,w+8,r)))}({crc32:Rt,compressedSize:xt,uncompressedSize:zt,$t:u,ee:l},c),Z&&await Oc(n,I),Object.assign(At,{uncompressedSize:zt,compressedSize:xt,lastModDate:p,rawLastModDate:h,creationDate:C,lastAccessDate:k,encrypted:Boolean(m),zipCrypto:Boolean(W),size:f+xt,compressionMethod:b,version:E,ne:w,oe:d,signature:Rt,crc32:!m||W||yt?Rt:U,ce:R,ue:z,he:B,me:L}),At}(o,z,x,a,_t(),i),E||(A=!1),s.set(n,x),x.filename=n,E){if(await Promise.all([z.writable.getWriter().close(),O]),await I(),e.Tt&&await Fc(e,c),g=!0,R=c.size,await k(),x.diskNumberStart=Ec(c),x.offset=gc(e,c),y){const t=a.re;dc(a,e.offset-bc(c)),x.size+=a.re-t}!function({rawFilename:t,encrypted:e,zip64:r,ie:n,crc32:o,compressedSize:a,uncompressedSize:i,he:s,me:c},u,{dataDescriptor:l,Ht:f}){if(l||((!e||f&&o!==U)&&Wc(u,14,o),c||Wc(u,18,a),s||Wc(u,22,i)),r&&n){const e=F+Hc(t)+4;Zc(u,e,BigInt(i)),Zc(u,e+8,BigInt(a))}}(x,d.Se,i),await Oc(c,d.Yt),await Ic(z.readable,c,w,t=>D+=t),c.size+=z.size,g=!1}else x.diskNumberStart=m,x.offset=S;return e.offset+=x.size,x}catch(t){if(g||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,E&&(e.offset+=D)}throw s.delete(n),t}finally{if(E&&e._t--,b&&e.jt--,m&&m(O),S&&S(),E&&z&&z.dispose)try{await z.dispose()}catch{}}async function I(){e.te=!0;const{ge:t}=e;e.ge=new Promise(t=>S=()=>{e.te=!1,t()}),await t}async function k(){Sc(c,Hc(d.Yt))&&await c.closeDisk()}}(e,n,o,{$t:E,ee:b,re:S,Ot:f,Jt:l,Qt:w},a)}catch(t){throw e.kt.delete(n),t}finally{w&&w(l&&l.Vt)}return Object.assign(d,{name:n,comment:c,extraField:u}),new Fa(d)}(e,n,o,a)}catch(t){throw e.Ct.delete(n),t}finally{const t=$s.shift();t?t():Xs--}}(a,e,n,o);i.add(s);const c=()=>i.delete(s);return Promise.prototype.then.call(s,c,c),rc(a,s)}remove(t){const{Ct:e,kt:r}=this;if(typeof t==j&&(t=r.get(t)),t&&t.filename!==U){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=B,n={}){const o=this,{vt:a,writer:d}=this,{writable:p}=d;if(o.Bt)return ec(d);if(!(r instanceof Uint8Array))throw new Error(ss);if(Hc(r)>e)throw new Error(is);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.Nt.map(t=>t.Ae));const h=o.Nt.filter(t=>t.Re&&!t.ze);if(h.length){const t=h.map(t=>t.error);h.forEach(t=>t.ze=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{xe:a,De:d}=mc(r.kt),{Fe:p,Oe:h,Ie:m}=await async function(r,n,o){const{kt:a,writer:i}=r,c=new Uint8Array(n);await Wo(i);let u=0,l=0,w=Ec(i),d=bc(i),p=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:h,rawFilename:m,ae:y,de:E,se:b,le:S,we:g,rawExtraField:A,ye:R,rawComment:z,versionMadeBy:x,ne:D,oe:F,he:O,me:I,Ue:U,Te:T,internalFileAttributes:k,externalFileAttributes:C,diskNumberStart:M,uncompressedSize:v,compressedSize:N}=n,_=Hc(y,E,b,S,g,A,R),j=f+Hc(m,z)+_;Sc(i,u+j-l)&&(await Oc(i,c.slice(l,u)),l=u,p=0,await i.closeDisk()),0==r&&(w=Ec(i),d=bc(i)),O||Wc(F,18,v),I||Wc(F,14,N),(T||U)&&n.version<45&&Lc(F,0,45);const P=yc(j);if(P.ke(s),P.Ce(x),P.Me(D.subarray(0,24)),P.Ce(_),P.Ce(Hc(z)),P.Ce(U?e:M),P.Ce(k),P.ke(C),P.ke(T?t:h),P.Me(m),P.Me(y),P.Me(E),P.Me(b),P.Me(S),P.Me(g),P.Me(A),P.Me(R),P.Me(z),Vc(c,P.ct,u),u+=j,p++,o.onprogress)try{await o.onprogress(r+1,a.size,new Fa(n))}catch{}}return await Oc(i,l?c.slice(l):c),{Fe:{diskNumber:w,diskOffset:d},Oe:{diskNumber:Ec(i),ve:p},Ie:c}}(r,a,o),y=await async function(t,r,n){const o=vc(t,n,nt);if(o){const n=await o(r),a=Hc(n);if(a>e)throw new Error(Ls);const s=yc(6+a);s.ke(i),s.Ce(a),s.Me(n);const{writer:c}=t;return Sc(c,Hc(s.ct))&&await c.closeDisk(),await Oc(c,s.ct),6+a}return 0}(r,m,o);await async function(r,n,o,a){const{writer:i}=r,{Fe:s,Oe:f,Ne:d,De:p}=a;let{xe:h}=a,m=r.kt.size,y=s.diskNumber,E=gc(r,s);const b=Hc(n);if(b>e)throw new Error(is);let S=Cc(r,o,wa),g=Ec(i);if(Sc(i,(S?98:w)+b)&&g++,E>=t||h>=t||m>=e||g>=e){if(!1===S)throw new Error(xs);S=!0}else S===U&&p&&(S=!0);const A=yc(S?98:w);Sc(i,Hc(A.ct)+b)&&await i.closeDisk(),g=Ec(i);let R=g==f.diskNumber?f.ve:0;S&&(A.ke(u),A._e(44),A.Ce(45),A.Ce(45),A.ke(g),A.ke(y),A._e(R),A._e(m),A._e(h),A._e(E),A.ke(l),A.ke(g),A._e(BigInt(gc(r,i))+BigInt(h)+BigInt(d)),A.ke(g+1),Cc(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,m=e,E=t,h=t),A.ke(c),A.Ce(g),A.Ce(y),A.Ce(R),A.Ce(m),A.ke(h),A.ke(E),A.Ce(b),await Oc(i,A.ct),b&&await Oc(i,n)}(r,n,o,{Fe:p,Oe:h,xe:a,Ne:y,De:d})}(o,r,n),o.Bt=!0,!Lo(d)&&Cc(o,n,K)||await p.getWriter().close(),ec(d)}[L](){return this.close()}}class Qs{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new Js(r,t),this.vt=new Set}transform(t){const e=this.zipWriter;let r;const{readable:n,writable:o}=new TransformStream({start(t){r=t},flush:()=>{!async function(){try{await e.close()}catch(t){await oc(e,t)}}()}});return ac(this,this.zipWriter.add(t,n),t=>r.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}});return ac(this,this.zipWriter.add(t,r),t=>e.error(t)),n}async close(t,e={}){const{zipWriter:r}=this,n=(await Promise.allSettled(Array.from(this.vt))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await oc(r,t),t}try{return await r.close(t,e)}catch(t){throw await oc(r,t),t}}}class tc extends Promise{then(t,e){const{je:r}=this;return r&&(r.ze=!0),super.then(t,e)}}function ec(t){return t.getData?t.getData():t.writable}function rc(t,e){const r=new tc((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.je=n,n.Ae=Promise.prototype.then.call(r,U,t=>Object.assign(n,{Re:!0,error:t})),t.Nt.push(n),r}async function nc(t,e,r={}){const{vt:n,Ct:a,kt:i}=t,s=mt(r.filter);for(;n.size;)await Promise.allSettled(Array.from(n));let c;const u=new Promise(t=>c=t);n.add(u);const l=[];let f;try{e=new Po(e),await Wo(e),e.size!==U&&e.readUint8Array||(e=new uo(await ir(e.readable)),await Wo(e));const{ZipReader:r,Ut:n}=await Promise.resolve().then(function(){return os}),c=new r(e),u=await c.getEntries(),w=[];for(const t of u)s&&!await s(t)||w.push(t);await c.close(),await Wo(t.writer);const{directoryOffset:d,At:p}=c;w.forEach(t=>{const{filename:e}=t;if(p.has(t))throw new Error(M);if(a.has(e))throw new Error(as);a.add(e),l.push(e)}),t.te=!0;const{ge:h}=t;t.ge=new Promise(e=>f=()=>{t.te=!1,e()}),await h,t.Tt&&(delete t.Tt,!s&&await async function(t){return Bc(Yt(await Vo(t,0,4)),0)==o}(e)||(await Oc(t.writer,Dc()),t.offset+=4));const m=await async function(t,e,r,n,o,a,i){const{writer:s}=t,c=new Map;if(s.closeDisk||a){const u=Array.from(r).sort((t,r)=>xc(e,t)-xc(e,r)),l=function(t,e,r){const n=new Array(e.length);let o=r;for(let a=e.length-1;a>=0;a--){const i=xc(t,e[a]),s=e[a+1];s&&xc(t,s)>i&&(o=Math.min(xc(t,s),r)),n[a]=o}return n}(e,u,o),f=new Set(n),w=new Map;for(let t=0;t<u.length;t++){const r=u[t];if(f.has(r)){const n=xc(e,r),o=await zc(e,n);if(o===U)throw new Error(k);let a=n+o+r.compressedSize;if(r.bitFlag.dataDescriptor){const n=await i(e,a,r);a=n===U?Math.max(a,l[t]):a+n}if(a>l[t])throw new Error(C);l[t]=a,w.set(r,o)}}let d,p=0;for(let r=0;r<u.length;r++){const n=u[r];if(f.has(n)){const o=xc(e,n);o<p?c.set(n,d):(a||await Rc(t,e,p,o-p),s.closeDisk&&Sc(s,w.get(n))&&await s.closeDisk(),d={offset:gc(t,s),diskNumberStart:Ec(s)},c.set(n,d),await Rc(t,e,o,l[r]-o),p=l[r])}}a||await Rc(t,e,p,o-p)}else{const n=t.offset;await Rc(t,e,0,o),r.forEach(t=>c.set(t,{offset:n+xc(e,t),diskNumberStart:0}))}return c}(t,e,u,w,d,Boolean(s),n);w.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,rawBitFlag:o,uncompressedSize:a,compressedSize:s,extraFieldZip64:c}=t;let{compressionMethod:u,rawExtraField:l}=t;l=Ac(l||B),t.extraFieldAES&&(u=99);const f=Hc(l),w=Boolean(c)&&c.uncompressedSize!==U,d=Boolean(c)&&c.compressedSize!==U,{ne:p,oe:h}=Gc({version:e,bitFlag:o,compressionMethod:u,uncompressedSize:a,compressedSize:s,rawLastModDate:r,rawFilename:n,me:d,he:w,extraFieldLength:f}),{crc32:y}=t;y!==U&&Wc(h,10,y);const{offset:E,diskNumberStart:b}=m.get(t);Object.assign(t,{pe:!0,he:w,me:d,offset:E,diskNumberStart:b,Ue:!1,ae:B,de:B,se:B,le:B,fe:B,we:B,rawExtraField:l,ye:B,ne:p,oe:h}),i.set(t.filename,t)})}catch(t){throw l.forEach(t=>a.delete(t)),t}finally{c(),n.delete(u),f&&f()}}async function oc(t,e){try{await t.writer.writable.abort(e)}catch{}}function ac(t,e,r){t.vt.add(e),e.catch(t=>{try{r(t)}catch{}})}function ic(t,e,n){if(null===t||typeof t!=_||Array.isArray(t))throw new Error(Ws);const{externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,rawLastModDate:c,creationDate:u,lastAccessDate:l,uncompressedSize:f,encrypted:w,zipCrypto:d,crc32:p,compressionMethod:h,extraFieldAES:m,extraFieldUnix:y,internalFileAttributes:E,extraField:b,bitFlag:S,directory:g,uid:A,gid:R}=t,z={externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,creationDate:u,lastAccessDate:l,internalFileAttributes:E,directory:g};S&&S.languageEncodingFlag&&(z[$]=!0);const x=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{Oa.has(r)||e.set(r,t.data)}),e.size)return e}}(b);x&&(z[ga]=x),A===U&&R===U||Object.assign(z,{uid:A,gid:R,unixExtraFieldType:y?Ys:qs});const D={};if(e&&!g)if(Object.assign(D,{uncompressedSize:f,crc32:p,compressionMethod:h}),e!==lt&&Object.assign(D,{encrypted:w,zipCrypto:d,encryptionStrength:m?m.strength:U}),S&&(D.dataDescriptor=S.dataDescriptor,D[X]=Ks[S.level]),n===U)D.rawLastModDate=c;else if(e!==lt&&d&&(!S||S.dataDescriptor)&&n instanceof Date&&function(t){let e=new Date(2e3*Math.ceil(Math.floor(t.getTime()/1e3)/2));return e<I?e=I:e>O&&(e=O),(e.getHours()<<3|e.getMinutes()>>3)&r}(n)!=(c>>>8&r))throw new Error(Zs);return{Lt:z,Wt:D}}function sc(n,o,a){let i=Cc(n,a,fa),s=Cc(n,a,ha,i?20:768);const c=Cc(n,a,Ea),u=Nc(n,a,"uid"),l=Nc(n,a,"gid");let f=Nc(n,a,Aa),w=Cc(n,a,"unixExtraFieldType"),d=Cc(n,a,Ra),p=Cc(n,a,za),h=Cc(n,a,xa);if(At(u,t,Cs),At(l,t,Ms),At(f,e,vs),w!==U&&w!==qs&&w!==Ys)throw new Error(Ns);if(w===Ys&&(u!==U&&u>e||l!==U&&l>e))throw new Error(_s);w!==U||u===U&&l===U||(w=qs);let m=Nc(n,a,ua),y=Cc(n,a,la);const E=m!==U||y!==U;if(u!==U||l!==U||f!==U||w||c?(i=!1,s=s&r|768):E&&(i=!0,s&=r),At(m,r,js),y&&(typeof y!==_||Array.isArray(y)))throw new Error(Ps);if(s>e)throw new Error(ws);let b=Cc(n,a,ca);const S=b!==U;S||(b=0),!a[ya]&&o.endsWith(D)&&(a[ya]=!0);const g=Cc(n,a,ya);if(g?(o.endsWith(D)||(o+=D),S||(b=16,i||(b|=16877<<16))):i||S||(b=c?493<<16:27525120),!i){const t=f!==U||Boolean(d||p||h);f=f===U?b>>16&e:f&e,d?f|=z:d=Boolean(f&z),p?f|=x:p=Boolean(f&x),h?f|=512:h=Boolean(512&f),S&&!t||(g?f=-61441&f|R:f&A||(f|=32768),b=(f&e)<<16|b&e)}({msdosAttributesRaw:m,msdosAttributes:y}=function(t,e){if(t!==U)t&=r;else if(e!==U){const{readOnly:n,hidden:o,system:a,directory:i,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),a&&(c|=4),i&&(c|=16),s&&(c|=32),t=c&r}return e===U&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(m,y)),E&&(b=b&t|m&r);const F=b>>16&e,O=f!==U&&40960==(f&A);return{name:o,Zt:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:b,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:w,symlink:O,setuid:d,setgid:p,sticky:h,msdosAttributesRaw:m,msdosAttributes:y}}}function cc(t,r,n){const o=vc(t,n,"encodeText")||se;let a=o(r,at);if(a===U&&(a=se(r)),Hc(a)>e)throw new Error(fs);const i=n[Ko]||"";if(typeof i!=j)throw new Error(us);let s=o(i,it);if(s===U&&(s=se(i)),Hc(s)>e)throw new Error(cs);const c=Cc(t,n,pa);if(c!==U&&c>e)throw new Error(ws);const u=Mc(t,n,ea,new Date),l=Cc(t,n,ra),f=Mc(t,n,na),w=Mc(t,n,aa),d=Cc(t,n,sa,0),p=St(Cc(t,n,V)),h=Boolean(p),m=!0===p;let y=Cc(t,n,W),E=Cc(t,n,Z);bt(y,E),y=y&&y.length?y:U,E=E&&E.length?E:U;const b=Nc(t,n,"encryptionStrength",3),S=Cc(t,n,ma),g=Cc(t,n,"extendedTimestamp",!0),A=Cc(t,n,"ntfsTimestamp"),R=Cc(t,n,"keepOrder",!0),z=Cc(t,n,q),x=Cc(t,n,"bufferedWrite"),D=vc(t,n,"createTempStream"),F=Cc(t,n,"dataDescriptorSignature",!0),O=yt(Cc(t,n,H));Et(O);const I=Cc(t,n,$,!qc(a)||!qc(s)),T=Cc(t,n,ba),k=h||T===U?U:yr(T);if(!h&&T!==U&&0!==T&&8!==T&&!k)throw new Error(fr);let C=Nc(t,n,X);if(At(C,9,Bs),t.options[tt]){if(y!==U||E!==U)throw new Error(ps);C===U&&T===U&&(C=0)}h&&(C=Rt(n[X]));let M=Cc(t,n,Y),v=Cc(t,n,J);x&&v===U&&(v=!1),(v===U||S&&!m)&&(v=!0),C!==U&&6!=C&&(M=!1);const N=Cc(t,n,wa);if(!(S||y===U&&E===U||Number.isInteger(b)&&b>=1&&b<=3))throw new Error(ds);const _=uc(n[ga]),P=uc(n.localExtraField),B=uc(n.centralExtraField);return{comment:i,Zt:{rawFilename:a,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:w,internalFileAttributes:d,Ht:h,Gt:m,password:y,rawPassword:E,encryptionStrength:b,zipCrypto:S,extendedTimestamp:g,ntfsTimestamp:A,keepOrder:R,useWebWorkers:z,bufferedWrite:x,createTempStream:D,dataDescriptorSignature:F,signal:O,useUnicodeFileNames:I,compressionMethod:T,format:k?k.format:U,codecURI:k?k.codecURI:U,Pe:k?k.versionNeeded:U,level:C,useCompressionStream:M,dataDescriptor:v,zip64:N,rawExtraField:_,Be:P,ye:B}}}function uc(t){if(!t)return B;if(!(t instanceof Map))throw new Error(ys);let r=0,n=0;t.forEach((t,n)=>{if(gt(n,e,Es),!(t instanceof Uint8Array))throw new Error(bs);if(Hc(t)>e)throw new Error(Ss);r+=4+Hc(t)});const o=new Uint8Array(r),a=Yt(o);return t.forEach((t,e)=>{Lc(a,n,e),Lc(a,n+2,Hc(t)),Vc(o,t,n+4),n+=4+Hc(t)}),o}function lc(e,r,n,o,a){const{Ht:i,Gt:s,zipCrypto:c,password:u,rawPassword:l,encryptionStrength:f}=o;let{dataDescriptor:w,zip64:d,level:p,compressionMethod:h}=o,m=0,y=0,E=!1;if(i&&r){if(y=a[$o],y===U)throw new Error(Ds);if(h===U)throw new Error(Fs)}const b=!0===d,S=Cc(e,a,da);if(r&&s&&!S&&Hc(u,l))throw new Error(ms);const g=r&&(Boolean(u&&Hc(u)||l&&Hc(l))||s&&S);r||(p=0,h=0);const A=Ia(g,c,f);r&&(i?(a.uncompressedSize=y,m=n===U?_c(y)+A:n+(s?0:A)):n===U?(w=!0,(d||d===U)&&(d=E=!0,m=4294967296)):(a.uncompressedSize=y=n,m=(jc(h,p)?_c(y):y)+A));const R=!(g||r&&(0!==n||i)||jc(h,p));R&&Cc(e,a,J)===U&&(w=!1);const z=b||E||y>=t,x=b||m>=t;if(z||x){if(!1===d)throw new Error(xs);d=!0}return d=d||!1,{Le:m,Zt:{dataDescriptor:w,Xt:R,zip64:d,pe:b,We:E,he:z,me:x,uncompressedSize:y,level:p,compressionMethod:h,encrypted:g}}}function fc(e,r,n){const o=e.slice().sort((t,e)=>n?e-t:t-e);let a=r,i=0;for(const e of o){if(a>=t)break;a+=e,i++}return i}function wc(t){const{rawFilename:r,lastModDate:o,rawLastModDate:a,lastAccessDate:i,creationDate:s,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:w,directory:d,rawExtraField:p,Be:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,Ht:R,encrypted:z,he:x,me:D,uncompressedSize:T,We:k,crc32:C}=t;let{version:M,compressionMethod:v}=t;const N=!d&&jc(v,c);let _;const j=R||!N,P=u&&(t.bufferedWrite||!w||!x&&!D||j&&!k),L=P||u&&w&&(x||D);if(u&&(x||D)){const t=20,e=yc(t);if(e.Ce(1),e.Ce(t-4),_=e.ct,P&&(e._e(T),j)){const t=Ia(z,l,S);e._e(R?0:T+t)}}else _=B;let W,Z,V,H,G;if(z&&!l){const t=yc(Hc(Gs)+2);t.Ce(h),t.Me(Gs),W=t.ct,W[8]=S}else W=B;if(g){const t=Tc(o),e=(q=t)>=gs&&q<=As;if(e){const e=9+(i?4:0)+(s?4:0),r=yc(e);H=1+(i?2:0)+(s?4:0),G=t,r.Ce(m),r.Ce(e-4),r.Ze(H),r.ke(t),i&&r.ke(kc(Tc(i))),s&&r.ke(kc(Tc(s))),V=r.ct}else V=B;if(A===U?!e||Boolean(i||s):A)try{const t=Uc(o),e=yc(36);e.Ce(10),e.Ce(32),e.Ve(4),e.Ce(1),e.Ce(24),e._e(t),e._e(i?Uc(i):t),e._e(s?Uc(s):t),Z=e.ct}catch{Z=B}else Z=B}else Z=V=B;var q;let Y,K;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=qs||r===U&&n===U)if(o!=Ys||r===U&&n===U)Y=K=B;else{const t=yc(8);t.Ce(b),t.Ce(4),t.Ce((r===U?0:r)&e),t.Ce((n===U?0:n)&e),Y=t.ct;const o=yc(4);o.Ce(b),o.Ce(0),K=o.ct}else{const t=pc(r===U?0:r),e=pc(n===U?0:n),o=3+t.length+e.length,a=yc(4+o);a.Ce(E),a.Ce(o),a.Ze(1),a.Ze(t.length),a.Me(t),a.Ze(e.length),a.Me(e),Y=K=a.ct}}catch{Y=K=B}v===U&&(v=N?8:0),M===U&&(M=0!=v||d||z?20:10);const{Pe:X}=t;N&&X!==U&&(M=M>X?M:X),u&&(M=M>45?M:45),z&&!l&&(M=M>51?M:51,R&&C!==U&&(W[4]=1),Lc(Yt(W),9,v),v=99);const $=L?Hc(_):0,J=$+Hc(W,V,Z,Y,p,y);if(J+(t[tt]?67:0)>e)throw new Error(Ss);const Q=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),et=Q<I?I:Q>O?O:Q,rt=Hc(V)?new Date(1e3*Tc(o)):Hc(Z)?o:et,{ne:nt,oe:ot,rawLastModDate:at}=Gc({version:M,bitFlag:Yc(c,f,w,z,v),compressionMethod:v,uncompressedSize:T,lastModDate:et,rawLastModDate:a,rawFilename:r,me:D,he:x,extraFieldLength:J}),it=yc(F+Hc(r)+J),st=it.ct,ct=Yt(st);return it.ke(n),it.Me(nt),it.Me(r),L&&it.Me(_),it.Me(W),it.Me(V),it.Me(Z),it.Me(Y),it.Me(p),it.Me(y),w&&(D||Wc(ct,18,0),x||Wc(ct,22,0)),{Yt:st,Se:ct,ne:nt,oe:ot,lastModDate:rt,qt:rt===et&&Q.getTime()!=et.getTime(),rawLastModDate:at,encrypted:z,compressed:N,version:M,compressionMethod:v,ce:H,ue:G,ae:B,ie:$,se:V,le:Z,fe:Y,we:K,de:W,extraFieldLength:J}}function dc(t,e){const{$t:r}=t;let{Yt:n,extraFieldLength:o}=r,a=64-(e+Hc(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=Yt(i);Lc(s,0,y),Lc(s,2,a-4);const c=n;r.Yt=n=new Uint8Array(Hc(c)+a),Vc(n,c),Vc(n,i,Hc(c));const u=Yt(n);Lc(u,28,o+a),r.Se=u,t.re+=a}function pc(t){const e=new Uint8Array(4);Yt(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function hc({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=B,i=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Yt(o),r&&(i=4,Wc(n,0,a))),{Kt:o,Ee:n,be:i}}function mc(r){let n=0,o=!1;for(const[,a]of r){const{rawFilename:r,de:i,rawComment:s,le:c,we:u,rawExtraField:l,ye:w,ce:d,ue:p,pe:h,uncompressedSize:y,compressedSize:E}=a;let{he:b,me:S}=a;h||(b&&y<t&&(b=a.he=!1),S&&E<t&&(S=a.me=!1)),o=o||b||S;const g=a.offset>=t,A=a.diskNumberStart>=e;let R,z;if(g||A||b||S){const t=4+(b?8:0)+(S?8:0)+(g?8:0)+(A?4:0),e=yc(t);e.Ce(1),e.Ce(t-4),b&&e._e(y),S&&e._e(E),g&&e._e(a.offset),A&&e.ke(a.diskNumberStart),R=e.ct}else R=B;if(a.ae=R,a.Te=g,a.Ue=A,p===U)z=B;else{const t=yc(9);t.Ce(m),t.Ce(5),t.Ze(d),t.ke(p),z=t.ct}a.se=z;const x=Hc(R,i,c,u,z,l,w);if(x>e)throw new Error(Ss);n+=f+Hc(r,s)+x}return{xe:n,De:o}}function yc(t){const e=new Uint8Array(t),r=Yt(e);let n=0;return{ct:e,Ze:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},Ce:t=>{Lc(r,n,t),n+=2},ke:t=>{Wc(r,n,t),n+=4},_e:t=>{Zc(r,n,BigInt(t)),n+=8},Me:t=>{Vc(e,t,n),n+=Hc(t)},Ve:t=>n+=t}}function Ec(t){const{diskNumber:e=0}=t;return e}function bc(t){const{diskOffset:e=0}=t;return e}function Sc(t,e){const{availableSize:r=T}=t;return e>r}function gc(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.Mt:0)}function Ac(t){const e=Yt(t);let r=0;for(;r+4<=Hc(t);){const n=4+Pc(e,r+2);if(1==Pc(e,r))return Ac(Gt(t.subarray(0,r),t.subarray(Math.min(r+n,Hc(t)))));r+=n}return t}async function Rc(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await Ic(Ho(e,{offset:r,size:n}),o,U,t=>a+=t)}catch(e){if(a){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}}throw e}finally{o.size+=a,t.offset+=a}}}async function zc(t,e){const r=e>=0&&e+F<=t.size?await Vo(t,e,F):B;if(Hc(r)<F)return U;const o=Yt(r);return Bc(o,0)!=n?U:F+Pc(o,26)+Pc(o,28)}function xc(t,{offset:e,diskNumberStart:r}){return e+(t.ht?t.ht(r):0)}function Dc(){const t=new Uint8Array(4);return Wc(Yt(t),0,o),t}async function Fc(t,e){delete t.Tt,await Oc(e,Dc()),t.offset+=4}async function Oc(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Hc(e),await n.write(e)}finally{n.releaseLock()}}async function Ic(t,e,r,n){const o=e.writable.getWriter();try{await t.pipeTo(new WritableStream({async write(t){await o.ready,await o.write(t),n(Hc(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function Uc(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<Rs?Rs:e>zs?zs:e}}function Tc(t){return Math.floor(t.getTime()/1e3)}function kc(t){return Math.min(As,Math.max(gs,t))}function Cc(t,e,r,n){const o=e[r]===U?t.options[r]:e[r];return o===U?n:o}function Mc(t,e,r,n){const o=Cc(t,e,r,n);if(null===o)return n;if(o!==U&&(typeof o.getTime!=N||Number.isNaN(o.getTime())))throw new Error(ls);return o}function vc(t,e,r){return mt(Cc(t,e,r))}function Nc(t,e,r,n){return Rt(Cc(t,e,r,n))}function _c(t){return t+5*(Math.floor(t/16383)+1)}function jc(t,e){return t===U?e===U||e>0:0!==t}function Pc(t,e){return t.getUint16(e,!0)}function Bc(t,e){return t.getUint32(e,!0)}function Lc(t,e,r){t.setUint16(e,r,!0)}function Wc(t,e,r){t.setUint32(e,r,!0)}function Zc(t,e,r){t.setBigUint64(e,r,!0)}function Vc(t,e,r){t.set(e,r)}function Hc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Gc({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:a,lastModDate:i,rawLastModDate:s,rawFilename:c,me:u,he:l,extraFieldLength:f}){const w=yc(26),d=w.ct,p=Yt(d);if(w.Ce(e),w.Ce(r),w.Ce(n),s===U){const t=new Uint32Array(1),e=Yt(t);Lc(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),Lc(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return w.ke(s),w.Ve(4),u||a!==U?w.ke(u?t:a):w.Ve(4),l||o!==U?w.ke(l?t:o):w.Ve(4),w.Ce(Hc(c)),w.Ce(f),{ne:d,oe:p,rawLastModDate:s}}function qc(t){return t.every(t=>t>=32&&t<=126)}function Yc(t,e,r,n,o){let a=0;return e&&(a|=S),r&&(a|=8),8!=o&&9!=o||(t>=0&&t<=3&&(a|=6),t>3&&t<=5&&(a|=4),9==t&&(a|=2)),n&&(a|=1),a}function Kc(){return"application/octet-stream"}function Xc(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=_t(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:$c(r,xr)||$c(t,xr)||$c(t,Fr),decompression:$c(n,xr)||$c(e,xr)||$c(e,Fr),registered:!1},{compressionMethod:9,compression:!1,decompression:$c(n,Dr)||$c(e,Dr),registered:!1}];for(const t of Er()){const e=br(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==N:U,decompression:e?typeof e.DecompressionStream==N:U,registered:!0})}return o}function $c(t,e){if(!t)return!1;const{supportedFormats:r}=t;return r?r.includes(e):Cr(t,e)}const Jc="2.21.0",Qc=1048576,tu=".zip.js-temp";function eu(t={}){const{thresholdBytes:e=Qc,directoryName:r=tu,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function a(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,i,s=0,c=!1;const u=new WritableStream({async write(i){c?await o.write(i):(t.push(i),s+=i.length,s>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let l=0;return{writable:u,readable:new ReadableStream({async pull(e){if(c){if(!i){const t=await n.getFile();i=t.stream().getReader()}const{value:t,done:r}=await i.read();r?e.close():e.enqueue(t)}else l<t.length?e.enqueue(t[l++]):e.close()},async cancel(t){i&&await i.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const ru=1048576;function nu(t={}){const{thresholdBytes:e=ru}=t;return function(){const t=[];let r,n,o,a=0,i=!1;const s=new WritableStream({async write(o){i?await r.write(o):(t.push(o),a+=o.length,a>e&&await async function(){const e=new TransformStream;n=ir(e.readable),r=e.writable.getWriter(),i=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(i){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const ou=1048576,au=".zip.js-temp",iu="createSyncAccessHandle is only available in dedicated workers";function su(t={}){const{thresholdBytes:e=ou,directoryName:r=au,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(iu);const o=n||(()=>navigator.storage.getDirectory());let a;function i(){return a||(a=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),a}return function(){const t=[];let r,n,o=0,a=!1,s=0,c=0;const u=new WritableStream({async write(c){a?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),a=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let l=0;const f=new ReadableStream({pull(e){if(a){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else l<t.length?e.enqueue(t[l++]):e.close()}},{highWaterMark:0});return{writable:u,readable:f,dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{Vt({baseURI:import.meta.url})}catch{}const cu="deflate",uu="deflate-raw",lu="deflate64-raw",fu="gzip",wu=[cu,uu,fu],du=[cu,uu,fu,lu];let pu,hu,mu,yu,Eu;function bu(t,e){return-4===e&&(t.code="Z_MEM_ERROR"),t}function Su(t,e,r={}){if(!(t?wu:du).includes(e))throw new TypeError("Unsupported format: "+e);if(!pu){const t=new Error("WASM module not loaded");throw t.cause=Eu,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,a="number"==typeof r.inBufferSize?r.inBufferSize:65536,i={He:0,in:0,inBufferSize:0,Ge:0,qe:!1};let s,c,u,l,f=!0,w=!1;return function(){try{let r;if(i.He=hu(o),i.in=hu(a),i.inBufferSize=a,!i.He||!i.in)throw bu(new Error("allocation failed"),-4);if(t?(i.Ye=pu.deflate_process,i.Ke=pu.deflate_last_consumed,i.Xe=pu.deflate_end,i.Ge=pu.deflate_new(),r=e===fu?pu.deflate_init_gzip(i.Ge,n):e===uu?pu.deflate_init_raw(i.Ge,n):pu.deflate_init(i.Ge,n)):e===lu?(i.Ye=pu.inflate9_process,i.Ke=pu.inflate9_last_consumed,i.Xe=pu.inflate9_end,i.Ge=pu.inflate9_new(),r=pu.inflate9_init_raw(i.Ge)):(i.Ye=pu.inflate_process,i.Ke=pu.inflate_last_consumed,i.Xe=pu.inflate_end,i.Ge=pu.inflate_new(),r=e===uu?pu.inflate_init_raw(i.Ge):e===fu?pu.inflate_init_gzip(i.Ge):pu.inflate_init(i.Ge)),0!==r)throw bu(new Error("init failed:"+r),r)}catch(t){throw h(i),t}}(),{readable:new ReadableStream({start(t){s=t},pull(){f=!1,p()},cancel(t){w=!0,l=t,h(i),c.error(t),p()}},{highWaterMark:0}),writable:new WritableStream({start(t){c=t},async write(t){if(f&&await new Promise(t=>u=t),w)throw l;try{!function(t){const e=new Uint8Array(yu.buffer),r=i.Ye,n=i.Ke,a=i.He;let s=0;for(;s<t.length;){if(i.qe)throw new Error("trailing data after the end of the stream");const c=Math.min(t.length-s,32768);if((!i.in||i.inBufferSize<c)&&(i.in&&mu&&(mu(i.in),i.in=0),i.in=hu(c),i.inBufferSize=c,!i.in))throw bu(new Error("allocation failed"),-4);e.set(t.subarray(s,s+c),i.in);const u=r(i.Ge,i.in,c,a,o,0),l=u>>24&255,f=128&l?l-256:l;if(f<0)throw bu(new Error("process error:"+f),f);const w=16777215&u;w&&d(e.slice(a,a+w));const p=n(i.Ge);if(1===l)i.qe=!0;else if(0===p&&0===w)break;s+=p}}(t)}catch(t){throw h(i),s.error(t),t}},close(){if(w)return;try{!function(){const t=new Uint8Array(yu.buffer),e=i.Ye,r=i.He;for(;;){const n=e(i.Ge,0,0,r,o,4),a=n>>24&255,s=128&a?a-256:a;if(s<0)throw bu(new Error("process error:"+s),s);const c=16777215&n;if(c&&d(t.slice(r,r+c)),1===a||0===c)break}}()}catch(t){throw h(i),s.error(t),t}const t=h(i);if(0!==t){const e=bu(new Error("end error:"+t),t);throw s.error(e),e}s.close()},abort(t){h(i),s.error(t)}},{highWaterMark:1})};function d(t){f=!0,s.enqueue(t)}function p(){if(u){const t=u;u=null,t()}}function h(t){let e=0;return t.Ge&&t.Xe&&(e=t.Xe(t.Ge)),t.Ge=0,t.in&&mu&&mu(t.in),t.in=0,t.He&&mu&&mu(t.He),t.He=0,e}}class gu{constructor(t=cu,e){return Su(!0,t,e)}}class Au{constructor(t=cu,e){return Su(!1,t,e)}}gu.requiresModule=!0,Au.requiresModule=!0,gu.supportedFormats=wu,Au.supportedFormats=du;const Ru=65536;let zu,xu;function Du(t){return new Uint8Array(t.memory.buffer)}let Fu,Ou=!1;var Iu;async function Uu(){await async function(){await Promise.allSettled([vn(),...Dn.map(t=>(jn(t),t.terminate()))]),tn=U,en=!1}(),Fu=null,Ou=!1,pu=hu=mu=yu=Eu=null,zu=null,xu=0}Iu=function(t,e){const r=zu;let n=r?function(t,e,r){xu||(xu=t.malloc(Ru));const n=xu?t.aes_hmac_new():0;if(n){const o=Du(t);if(o.set(e,xu),o.set(r,xu+e.length),t.aes_hmac_init(n,xu,e.length,xu+e.length,r.length))return t.aes_hmac_end(n,0),0}return n}(r,t,e):0;if(!n)return be(t,e);const o=xu;return{process(t,e){for(let a=0;a<t.length;a+=Ru){const i=t.subarray(a,a+Ru),s=Du(r);s.set(i,o),r.aes_hmac_process(n,o,i.length,e?1:0),i.set(s.subarray(o,o+i.length))}},digest:()=>(r.aes_hmac_end(n,o),n=0,Du(r).slice(o,o+20)),dispose(){n&&(r.aes_hmac_end(n,0),n=0)}}},Be=Iu||be,function({$e:t}){nn=t}({$e:t=>{if(!Fu){let{wasmURI:e}=t;typeof e==N&&(e=e()),Fu=async function(t,{baseURI:e}){if(!Ou)try{await async function(t,e){let r,n;try{try{n=new URL(t,e)}catch{}const o=await fetch(n);r=await o.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;r=function(t){const e=t.split(",")[1],r=atob(e),n=r.length,o=new Uint8Array(n);for(let t=0;t<n;++t)o[t]=r.charCodeAt(t);return o.buffer}(t)}const o=await WebAssembly.instantiate(r);var a;(function(t){if(pu=t,({malloc:hu,free:mu,memory:yu}=pu),"function"!=typeof hu||"function"!=typeof mu||!yu)throw pu=hu=mu=yu=null,new Error("Invalid WASM module")})(o.instance.exports),typeof(a=o.instance.exports).aes_hmac_new==N&&(zu=a,xu=0)}(t,e),Ou=!0}catch(t){throw function(t){Eu=t}(t),t}}(e,t).catch(t=>{throw Fu=null,t})}return Fu}}),Vt({CompressionStreamFallback:gu,DecompressionStreamFallback:Au}),Vt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const Tu="Entry filename already exists",ku="Duplicate entry filename in the imported zip file",Cu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Mu="Entry is an ancestor of target entry",vu="Root directory cannot be moved",Nu="Target entry is not a directory",_u="Parent entry is not a directory",ju="Readable stream already consumed",Pu="throw",Bu="keep-first",Lu="keep-last",Wu=new Set([Pu,Bu,Lu]),Zu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Vu="Invalid readerOptions (must be an object)",Hu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",Gu="Invalid passwords option (must be an array of strings)",qu="Invalid requestPassword option (must be a function returning a string or undefined)",Yu="zipjs-abort-export",Ku=new Uint8Array(0),Xu=new Set([zr,gr,Ar]);class $u{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(Tu);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.Je++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,Qe:r.Qe||r.uncompressedSize===U,passThrough:r.passThrough,er:r.er||new Date}),!n&&t.root||(t.entries[o.id]=o),n&&o.parent.children.push(o)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,r=this.parent;for(;r&&r!=t;)e=(r.name?r.name+"/":"")+e,r=r.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let r=e.parent;if(r){const n=Il(t);n&&(t=n.pop(),r=Ul(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(Tu);r!=e.parent&&(ul(e),e.parent=r,r.children.push(e),Fl(e.fs,e))}e.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==U))}}class Ju extends $u{constructor(t,e,r,n){super(t,e,r,n);const o=this;o.Reader=r.Reader,o.Writer=r.Writer,r.getData&&(o.getData=r.getData)}clone(){return new Ju(this.fs,this.name,this)}async getData(t,e={}){const r=this;if(!t||t.constructor==r.Writer&&r.data&&function(t,e){const{contentType:r}=t;return r===U||(t.constructor==lo?e.type==r:t.constructor!=io||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=sl(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([Wo(n),Wo(t,o)]);const a=yt(e.signal),i=function(t,e,r,n){const{onstart:o,onprogress:a,onend:i}=r,{readable:s}=e;return t.data instanceof Fa||!o&&!a&&!i?s:ar(s).pipeThrough(new un({onstart:o,onprogress:a,onend:i,size:e.size}),{signal:n})}(r,n,e,a),s=!Lo(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await ar(i).pipeTo(sr(t.writable),{signal:a,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,Object.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Kt(t)&&t.message==xe)return!1;throw t}}getText(t,e){return this.getData(new po(t),e)}getBlob(t,e){return this.getData(new lo(t),e)}getData64URI(t,e){return this.getData(new io(t),e)}getUint8Array(t){return this.getData(new No,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return qt(await this.getUint8Array(t)).buffer}replaceBlob(t){bl(this,{data:t,Reader:uo,Writer:lo,uncompressedSize:t.size})}replaceText(t){bl(this,{data:t,Reader:fo,Writer:po,uncompressedSize:wo(t)})}replaceData64URI(t){bl(this,{data:t,Reader:ao,Writer:io,uncompressedSize:Sl(t)})}replaceUint8Array(t){bl(this,{data:t,Reader:vo,Writer:No,uncompressedSize:t.length})}replaceReadable(t){bl(this,{data:null,Reader:al(t),Writer:null,uncompressedSize:U})}}class Qu extends $u{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new Qu(e.fs,e.name,e);return t&&(r.children=e.children.map(e=>{const n=e.clone(t);return n.parent=r,n})),r}addDirectory(t,e){return Ol(this,t,{options:e},!0)}addText(t,e,r={}){return Ol(this,t,{data:e,Reader:fo,Writer:po,options:r,uncompressedSize:wo(e)})}addBlob(t,e,r={}){return Ol(this,t,{data:e,Reader:uo,Writer:lo,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return Ol(this,t,{data:e,Reader:ao,Writer:io,options:r,uncompressedSize:Sl(e)})}addUint8Array(t,e,r={}){return Ol(this,t,{data:e,Reader:vo,Writer:No,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return Ol(this,t,{data:e,Reader:class extends Co{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return Ol(this,t,{Reader:al(e),options:r})}addFileSystemEntry(t,e={}){return Rl(this,t,e)}addFileSystemHandle(t,e={}){return Rl(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),Ol(this,t.name,{data:t,Reader:function(){return{readable:t.stream(),size:t.size}},options:e,uncompressedSize:t.size})}importBlob(t,e){return this.importZip(new uo(t),e)}importData64URI(t,e){return this.importZip(new ao(t),e)}importUint8Array(t,e){return this.importZip(new vo(t),e)}importHttpContent(t,e){return this.importZip(new Co(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new lo(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new io(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new No,t)}async exportWritable(t=new WritableStream,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:n,onprogress:o,onend:a}=r;El(r.passThrough),pl(r);const i=dl(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!yt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const r=()=>e.abort(t.reason);return t.addEventListener("abort",r,{once:!0}),()=>t.removeEventListener("abort",r)}(r.signal,s),l=Object.assign({},r,i,{signal:c,onstart:U,onprogress:U,onend:U,preventClose:!1}),f=rl([t],t=>ol(t,l.passThrough)),w=[];let d=!1,p=0;try{n&&await ln(n,f),await m(t,e),a&&await ln(a,p)}catch(t){try{t.exportedEntryNames=w}catch{}throw t}finally{u()}return e;function h(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),p+=t.length,o&&await ln(o,p,f)},close:()=>e.close(),abort:t=>e.abort(t)})}async function m(t,e){if(r.concurrent){const r=(await Promise.allSettled(t.children.map(t=>y(t,e)))).filter(t=>"rejected"==t.status);if(r.length){const t=r.filter(t=>!ll(t.reason));throw function(t){const[e]=t,r=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(r.length)try{e.entryErrors=[...e.entryErrors||[],...r]}catch{}return e}((t.length?t:r).map(t=>t.reason))}}else for(const r of t.children)await y(r,e)}async function y(e,r){if(c.aborted){if(d||ll(c.reason))return;Et(c)}try{if(e.directory){const t=await r.getDirectoryHandle(e.name,{create:!0});await m(e,t)}else{const n=await r.getFileHandle(e.name,{create:!0}),o=await n.createWritable();try{await e.getData({writable:h(o)},l)}catch(t){throw d?new Error(Yu):t}w.push(e.getRelativeName(t))}}catch(r){d=!0,s.abort(new Error(Yu));try{r.entryName===U&&(r.entryName=e.getRelativeName(t),r.entryId=e.id)}catch{}throw r}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==N?(r=t,e=Object.assign({},r.options,e)):(await Wo(t),r=new yi(t,e)),El(e.passThrough),pl(e);const n=function(t){if(t===U)return Pu;if(Wu.has(t))return t;throw new Error(Cu)}(e.duplicates),o=[],a={rr:[]},i=await r.getEntries(e);for(const t of i){let r=this;try{const i=t.filename.split("/").filter(t=>""!=t&&"."!=t),s=i.pop();let c=!1;for(const t of i){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==Bu){c=!0;break}if(n!=Lu)throw new Error(ku);this.fs.remove(r),r=new Qu(this.fs,t,{data:null},e),o.push(r)}}else r=new Qu(this.fs,t,{data:null},e),o.push(r)}if(c)continue;if(t.directory){let e=r;if(s){if(e=r.getChildByName(s),e&&(!e.directory||e.data)){if(n==Bu)continue;if(n!=Lu)throw new Error(ku);e.directory?e.data=t:(this.fs.remove(e),e=U)}e||(e=new Qu(this.fs,s,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const i=r.getChildByName(s);if(i){if(n==Bu)continue;if(n!=Lu)throw new Error(ku);this.fs.remove(i)}o.push(Ol(r,s,{data:t,Reader:il(Object.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){o.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return o}async exportZip(t,e={}){const r=this,n=Boolean(t)&&typeof t.add==N;e=Object.assign({},e),n||e.bufferedWrite!==U||(e.bufferedWrite=!0);const[o]=await Promise.all([cl(r,dl(e.readerOptions)),n?U:Wo(t)]),a=n?t:new Js(t,e);return await async function(t,e,r,n,o){const{onstart:a,onprogress:i,onend:s,onentryprogress:c}=n,u=e,l=rl(e.children,t=>Al(t)?0:1);let f=0,w=0;if(a&&await ln(a,r),n.bufferedWrite)await async function t(e){const r=(await Promise.allSettled(e.children.map(async e=>{await d(e),await t(e)}))).find(t=>"rejected"==t.status);if(r)throw r.reason}(e);else for(const t of e.getChildren({recursive:!0}))await d(t);async function d(e){if(Al(e))return;const{name:a,Lt:s}=fl(e,u,n);let d=0;const p=await t.add(a,o.get(e),Object.assign(s,{onstart:U,onend:U,onprogress:async t=>{f+=t-d,d=t,i&&await ln(i,f,r)}}));w++,c&&await ln(c,w,l,p)}s&&await ln(s,f)}(a,r,rl([r],nl),e,o),n?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(r={}){const n=this;dl((r=Object.assign({},r)).readerOptions),r.bufferedWrite===U&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),a=o.filter(t=>!Al(t)).map(t=>{const{name:e,Lt:o}=fl(t,n,r);return{name:e,size:t.directory?0:wl(t,gl(t,r)),options:o}}),i=!r.bufferedWrite||a.every(t=>!1!==t.options.keepOrder)&&o.every(t=>Al(t)||!t.children.length);return await async function(r,n,o,a){const i={options:r};if(mt(r[nt]))throw new Error(Is);if(a!==U&&!(a instanceof Uint8Array))throw new Error(ss);const s=Hc(a);if(s>e)throw new Error(is);const c=r[tt],u=new Map,l=r[Q]===U?0:r[Q];let f=l,d=T;const p=[],h=new Set;for(const e of n){let{name:r}=e;const{size:n}=e,o=Object.assign({},e.options);Cc(i,o,ya)&&!r.endsWith(D)&&(r+=D);const a=sc(i,r,o);({name:r}=a);const{Zt:s}=cc(i,r,o);0==s.level||s.compressionMethod!==U||s.Ht||await on(_t())||(s.level=0);const l=!Cc(i,o,ya);if(l&&n===U)throw new Error(Is);const{Le:w,Zt:m}=lc(i,l,n,s,o);if(l&&!s.Ht&&jc(m.compressionMethod,m.level))throw new Error(Is);const y=Object.assign({},o,a.Zt,s,m,{[tt]:c}),E=wc(y),b=hc(y),S={$t:E,re:Hc(E.Yt,b.Kt)};c&&dc(S,f);const g=l?w:0;u.set(r,Object.assign({},y,E,{offset:f,diskNumberStart:0,compressedSize:g}));const A=S.re+g;p.push(A),h.add(Boolean(y.pe||y.uncompressedSize>=t||g>=t)),d=Math.min(d,A),f+=A}if(u.size>1&&(c||f-d>=t&&(h.size>1||fc(p,l,!0)!=fc(p,l,!1)))&&!o)throw new Error(Is);const{xe:m,De:y}=mc(u);let E=Cc(i,r,wa);if(f>=t||m>=t||u.size>=e){if(!1===E)throw new Error(xs);E=!0}else E===U&&y&&(E=!0);return f-l+m+s+(E?98:w)}(r,a,i,r.globalComment)}getChildByName(t){const e=this.children;for(let r=0;r<e.length;r++){const n=e[r];if(n.name==t)return n}}getChildren(t={}){return function(t,e){const r=[],n=[t];let o=0;for(;o<n.length;)for(const t of n[o++].children)r.push(t),e&&n.push(t);return r}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const r=this.children;return!(await Promise.all(r.map(r=>r.checkPassword(t,e)))).includes(!1)}}class tl{constructor(){xl(this)}get children(){return this.root.children}remove(t){ul(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const r of t.children)e.push(r)}t.parent=U}move(t,e){if(t==this.root)throw new Error(vu);if(!e.directory)throw new Error(Nu);if(e.isDescendantOf(t))throw new Error(Mu);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(Tu)}else ul(t),t.parent=e,e.children.push(t),Fl(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.directory?r.getChildByName(e[t]):U;return r||(r=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),r}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,r){return this.root.addText(t,e,r)}addBlob(t,e,r){return this.root.addBlob(t,e,r)}addData64URI(t,e,r){return this.root.addData64URI(t,e,r)}addUint8Array(t,e,r){return this.root.addUint8Array(t,e,r)}addHttpContent(t,e,r){return this.root.addHttpContent(t,e,r)}addReadable(t,e,r){return this.root.addReadable(t,e,r)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return Dl(this,r=>r.importBlob(t,e))}importData64URI(t,e){return Dl(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return Dl(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return Dl(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return Dl(this,r=>r.importReadable(t,e))}importZip(t,e){return Dl(this,r=>r.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const el={FS:tl,ZipDirectoryEntry:Qu,ZipFileEntry:Ju};function rl(t,e){let r=0;const n=Array.from(t);for(;n.length;){const t=n.pop();r+=e(t)||0;for(const e of t.children)n.push(e)}return r}function nl(t){return t.uncompressedSize}function ol(t,e){const{data:r}=t;return e&&r instanceof Fa?r.compressedSize:t.uncompressedSize}function al(t){let e;return function(){if(e)throw new Error(ju);return e=!0,{readable:t}}}function il(t,e){return class extends no{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,n=Object.assign({},t,r.options),{checkOverlappingEntry:o,checkOverlappingEntryOnly:a}=n,i=await async function(t,e,r){pl(e);const{passwords:n,requestPassword:o,signal:a}=e;if(delete(e=Object.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!n&&!o)return t.getData(new lo,e);const i=new Set;let s;for(;;){for(const t of ml(e,r,n))if(!i.has(t.key)){const e=await u(t);if(e.done)return e.data;s=e.error}if(!o)break;if(r.nr){await r.nr;continue}let a;r.nr=new Promise(t=>a=t);try{const e=await o(t,s);if(e===U||null===e)break;if(typeof e!=j)throw new Error(qu);const r=await u(yl(e));if(r.done)return r.data;s=r.error}finally{r.nr=U,a()}}if(!i.size)throw new Error(Ma);const c=new Error(xe);throw c.cause=s,c;async function u(n){i.add(n.key);const o=Object.assign({},e,n.options);if(t.zipCrypto){o.checkCrc32=!0;try{await t.getData(null,Object.assign({},o,{checkPasswordOnly:!0}))}catch(t){if(hl(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new lo,o);return function(t,e){const{rr:r}=t,n=r.findIndex(t=>t.key===e.key);-1!=n&&r.splice(n,1),r.unshift(e)}(r,n),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Kt(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return hl(t)||e.zipCrypto&&Kt(t)&&Xu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,Object.assign(n,{checkPasswordOnly:!1,checkOverlappingEntry:a||o,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=i,r.ar=new uo(i),r.size=i.size,super.init()}readUint8Array(t,e){return this.ar.readUint8Array(t,e)}}}function sl(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function cl(t,e){const r=[],n=[t],o=new Map;for(;n.length;){const t=n.pop();for(const e of t.children)e.directory?n.push(e):r.push(e)}return await Promise.all(r.map(async r=>{const n=r.reader=sl(r.Reader,r.data,e);o.set(r,n);try{await Wo(n)}catch(e){try{e.entry=r,e.entryId=r.id,e.entryName=r.getRelativeName(t)}catch{}throw e}n.size!==U&&(r.uncompressedSize=n.size,r.Qe=!1)})),o}function ul(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function ll(t){return Boolean(t)&&t.message==Yu}function fl(t,e,r){const n=r.relativePath?t.getRelativeName(e):t.getFullname(),o=t.options||{};let a={},i={};if(t.data instanceof Fa){const e=gl(t,r),n=o.lastModDate===U?r.lastModDate:o.lastModDate;({Lt:a,Wt:i}=ic(t.data,e,n)),e&&(i.passThrough=!0)}const s=Object.assign({lastModDate:t.er},a,r,o,i,{directory:t.directory});if(!t.directory&&s.passThrough&&s.uncompressedSize===U)throw new Error(Zu);return{name:n,Lt:s}}function wl(t,e){const{reader:r}=t;return r&&r.size!==U?r.size:t.Qe?U:ol(t,e)}function dl(t){if(t&&(typeof t!=_||Array.isArray(t)))throw new Error(Vu);return t&&(El(t.passThrough),pl(t)),t}function pl(t){const{passwords:e,requestPassword:r}=t;if(e&&(!Array.isArray(e)||e.some(t=>typeof t!=j)))throw new Error(Gu);if(r&&typeof r!=N)throw new Error(qu)}function hl(t){return Kt(t)&&t.message==xe}function ml(t,e,r){const n=[],{password:o,rawPassword:a}=t;return a&&a.length&&n.push({key:a,options:{password:"",rawPassword:a}}),o&&n.push(yl(o)),n.push(...e.rr),r&&n.push(...r.filter(t=>t).map(yl)),n}function yl(t){return{key:t,options:{password:t,rawPassword:Ku}}}function El(t){if(St(t)===lt)throw new Error(Hu)}function bl(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:U,uncompressedSize:r===U?0:r,Qe:r===U})}function Sl(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function gl(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function Al(t){return t.directory&&null===t.data}function Rl(t,e,r){return async function t(e,n,o,a=""){if(n){const i=a?a+"/"+n.name:n.name;try{if((n.isFile||n.isDirectory)&&(n=await zl(n)),"file"==n.kind){const t=await n.getFile();o.push(Ol(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:Object.assign({},{lastModDate:new Date(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==n.kind){const a=e.addDirectory(n.name,r);o.push(a);for await(const e of n.values())await t(a,e,o,i)}}catch(t){try{t.entryName===U&&(t.entryName=i)}catch{}throw t}}return o}(t,e,[])}async function zl(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new Promise((e,r)=>t.file(e,r))),t.isDirectory){e.kind="directory";const r=await async function(t){const e=[];function r(t,n,o){t.readEntries(async a=>{if(a.length){for(const t of a)e.push(await zl(t));r(t,n,o)}else n(e)},o)}return await new Promise((e,n)=>r(t.createReader(),e,n)),{[Symbol.iterator](){let t=0;return{next(){const r={value:e[t],done:t==e.length};return t++,r}}}}}(t);e.values=()=>r}return e}function xl(t){t.entries=[],t.Je=0,t.root=new Qu(t)}function Dl(t,e){const{entries:r,Je:n,root:o}=t;return xl(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,Je:n,root:o}),e})}function Fl(t,e){const r=[e];for(;r.length;){const e=r.pop();t.entries[e.id]=e;for(const t of e.children)r.push(t)}}function Ol(t,e,r,n){if(t.directory){const o=Il(e);return o&&(e=o.pop(),t=Ul(t,o)),n?new Qu(t.fs,e,r,t):new Ju(t.fs,e,r,t)}throw new Error(_u)}function Il(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Ul(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(Tu);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(Mu)}else t=new Qu(n.fs,e,{data:null},n)}),t}export{uo as BlobReader,lo as BlobWriter,ao as Data64URIReader,io as Data64URIWriter,ht as ERR_ABORTED,ja as ERR_AMBIGUOUS_ARCHIVE,Mu as ERR_ANCESTOR_ENTRY,Ua as ERR_BAD_FORMAT,Ca as ERR_CENTRAL_DIRECTORY_NOT_FOUND,Rr as ERR_CODEC_OUT_OF_MEMORY,as as ERR_DUPLICATED_NAME,ku as ERR_DUPLICATE_IMPORTED_ENTRY,Ma as ERR_ENCRYPTED,Pa as ERR_ENCRYPTED_CENTRAL_DIRECTORY,_a as ERR_ENTRY_DATA_OUT_OF_BOUNDS,Tu as ERR_ENTRY_EXISTS,ka as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,Ta as ERR_EOCDR_NOT_FOUND,M as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,Vn as ERR_HTTP_RANGE,Hn as ERR_HTTP_RESOURCE_CHANGED,Zn as ERR_HTTP_STATUS,De as ERR_INVALID_AUTHENTICATION_CODE,Dt as ERR_INVALID_BASE_URI,cr as ERR_INVALID_CODEC_DEFINITION,lr as ERR_INVALID_CODEC_MODULE,is as ERR_INVALID_COMMENT,ss as ERR_INVALID_COMMENT_TYPE,Ar as ERR_INVALID_COMPRESSED_DATA,zr as ERR_INVALID_CRC32,ls as ERR_INVALID_DATE,Cu as ERR_INVALID_DUPLICATES,ds as ERR_INVALID_ENCRYPTION_STRENGTH,Ws as ERR_INVALID_ENTRY,cs as ERR_INVALID_ENTRY_COMMENT,us as ERR_INVALID_ENTRY_COMMENT_TYPE,fs as ERR_INVALID_ENTRY_NAME,ys as ERR_INVALID_EXTRAFIELD,Ss as ERR_INVALID_EXTRAFIELD_DATA,bs as ERR_INVALID_EXTRAFIELD_DATA_TYPE,Es as ERR_INVALID_EXTRAFIELD_TYPE,Wa as ERR_INVALID_FILENAME_VALIDATION,ft as ERR_INVALID_FUNCTION_OPTION,Ms as ERR_INVALID_GID,Bs as ERR_INVALID_LEVEL,Za as ERR_INVALID_MAX_APPENDED_DATA_SIZE,xt as ERR_INVALID_MAX_WORKERS,js as ERR_INVALID_MSDOS_ATTRIBUTES,Ps as ERR_INVALID_MSDOS_DATA,xe as ERR_INVALID_PASSWORD,Gu as ERR_INVALID_PASSWORDS,dt as ERR_INVALID_PASSWORD_TYPE,Zu as ERR_INVALID_PASS_THROUGH,pt as ERR_INVALID_PASS_THROUGH_VALUE,Ts as ERR_INVALID_READER,Vu as ERR_INVALID_READER_OPTIONS,qu as ERR_INVALID_REQUEST_PASSWORD,wt as ERR_INVALID_SIGNAL,Ls as ERR_INVALID_SIGNATURE_DATA,La as ERR_INVALID_STRICTNESS,Cs as ERR_INVALID_UID,gr as ERR_INVALID_UNCOMPRESSED_SIZE,Ns as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,_s as ERR_INVALID_UNIX_ID_SIZE,vs as ERR_INVALID_UNIX_MODE,Ft as ERR_INVALID_URI,ws as ERR_INVALID_VERSION,Gn as ERR_ITERATOR_COMPLETED_TOO_SOON,k as ERR_LOCAL_FILE_HEADER_NOT_FOUND,C as ERR_OVERLAPPING_ENTRY,_u as ERR_PARENT_NOT_DIRECTORY,ju as ERR_READABLE_CONSUMED,ur as ERR_RESERVED_COMPRESSION_METHOD,vu as ERR_ROOT_DIRECTORY_NOT_MOVABLE,Na as ERR_SPLIT_ZIP_FILE,Nu as ERR_TARGET_NOT_DIRECTORY,Fs as ERR_UNDEFINED_COMPRESSION_METHOD,Os as ERR_UNDEFINED_CRC32,Us as ERR_UNDEFINED_READER,Ds as ERR_UNDEFINED_UNCOMPRESSED_SIZE,Is as ERR_UNDETERMINED_SIZE,Ba as ERR_UNSAFE_FILENAME,fr as ERR_UNSUPPORTED_COMPRESSION,iu as ERR_UNSUPPORTED_CONTEXT,Oe as ERR_UNSUPPORTED_CRYPTO_API,va as ERR_UNSUPPORTED_ENCRYPTION,ms as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,ps as ERR_UNSUPPORTED_ENCRYPTION_USDZ,xs as ERR_UNSUPPORTED_FORMAT,Hu as ERR_UNSUPPORTED_PASS_THROUGH_VALUE,hs as ERR_UNSUPPORTED_SPLIT_USDZ,Va as ERR_UNSUPPORTED_UINT64,Qr as ERR_WORKER_STARTUP_TIMEOUT,qn as ERR_WRITER_NOT_INITIALIZED,Yn as ERR_WRITER_SIZE_NOT_WRITABLE,Zs as ERR_ZIP_CRYPTO_LAST_MOD_DATE,ks as ERR_ZIP_NOT_EMPTY,Mo as HttpRangeReader,Co as HttpReader,no as Reader,_o as SplitDataReader,jo as SplitDataWriter,fo as TextReader,po as TextWriter,vo as Uint8ArrayReader,No as Uint8ArrayWriter,Jc as VERSION,$a as WARNING_APPENDED_DATA,Hs as WARNING_CLAMPED_LAST_MODIFICATION_DATE,qa as WARNING_COMPRESSED_PATCHED_DATA,Vs as WARNING_COMPRESSION_UNAVAILABLE,ni as WARNING_DUPLICATE_FILENAME,Ya as WARNING_MALFORMED_EXTRA_FIELD,ei as WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET,si as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,ci as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,ui as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,ii as WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,oi as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,ri as WARNING_MISSING_ZIP64_EXTRA_FIELD,ai as WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,Qa as WARNING_PREPENDED_CENTRAL_DIRECTORY,Ja as WARNING_PREPENDED_DATA,ti as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,Ga as WARNING_UNKNOWN_VERSION,Ka as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,Ha as WARNING_UNSORTED_CENTRAL_DIRECTORY,Xa as WARNING_WRAPPED_ENTRIES_COUNT,oo as Writer,Qu as ZipDirectoryEntry,$u as ZipEntry,tl as ZipFS,Ju as ZipFileEntry,yi as ZipReader,Ei as ZipReaderStream,Js as ZipWriter,Qs as ZipWriterStream,Bt as configure,nu as createBlobTempStream,eu as createOPFSTempStream,su as createSyncAccessHandleTempStream,el as fs,Kc as getMimeType,Er as getRegisteredCodecs,Xc as getSupportedCompressionMethods,bi as isZipFile,hr as registerCodec,Ht as resetConfiguration,Uu as terminateWorkers,mr as unregisterCodec};