@zip.js/zip.js 2.14.1 → 2.16.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.
Files changed (41) hide show
  1. package/BENCHMARKS.md +21 -11
  2. package/deno.json +1 -1
  3. package/dist/zip-core-external.js +217 -98
  4. package/dist/zip-core-external.min.js +1 -1
  5. package/dist/zip-core.js +217 -98
  6. package/dist/zip-core.min.js +1 -1
  7. package/dist/zip-fs-core-external.js +217 -98
  8. package/dist/zip-fs-core-external.min.js +1 -1
  9. package/dist/zip-fs-core.js +217 -98
  10. package/dist/zip-fs-core.min.js +1 -1
  11. package/dist/zip-fs-external.js +217 -98
  12. package/dist/zip-fs-external.min.js +1 -1
  13. package/dist/zip-fs-native.js +219 -100
  14. package/dist/zip-fs-native.min.js +1 -1
  15. package/dist/zip-fs.js +219 -100
  16. package/dist/zip-fs.min.js +1 -1
  17. package/dist/zip-legacy.js +219 -100
  18. package/dist/zip-legacy.min.js +1 -1
  19. package/dist/zip-native.js +219 -100
  20. package/dist/zip-native.min.js +1 -1
  21. package/dist/zip-web-worker-native.js +1 -1
  22. package/dist/zip-web-worker.js +1 -1
  23. package/dist/zip.js +219 -100
  24. package/dist/zip.min.js +1 -1
  25. package/index-native.cjs +219 -100
  26. package/index-native.min.js +1 -1
  27. package/index.cjs +219 -100
  28. package/index.d.cts +46 -13
  29. package/index.d.ts +46 -13
  30. package/index.min.js +1 -1
  31. package/lib/core/codec-pool.js +35 -19
  32. package/lib/core/codec-worker.js +4 -2
  33. package/lib/core/io.js +3 -2
  34. package/lib/core/streams/zip-entry-stream.js +151 -66
  35. package/lib/core/util/decode-text.js +15 -1
  36. package/lib/core/version.js +1 -1
  37. package/lib/core/web-worker-inline-native.js +1 -1
  38. package/lib/core/web-worker-inline-wasm.js +1 -1
  39. package/lib/core/zip-reader.js +12 -10
  40. package/lib/core/zlib-streams-inline.js +1 -1
  41. package/package.json +1 -1
@@ -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,h=39169,m=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,D=1024,x="/",z=30,F=new Date(2107,11,31,23,59,58),O=new Date(1980,0,1),I=void 0,T=1/0,U="undefined",C="function",k="object",v="string",M="boolean",N=new Uint8Array,_=Symbol.asyncDispose||Symbol(),j="password",B="rawPassword",P="passThrough",L="signal",W="useWebWorkers",Z="useCompressionStream",V="transferStreams",H="preventClose",G="level",Y="useUnicodeFileNames",q="dataDescriptor",K="offset",X="usdz",J="maxAppendedDataSize",Q="signCentralDirectory",$="entry",tt="filename",et="comment",rt="strict",nt="balanced",ot="tolerant",at="compressed",it="Invalid option (must be a function)",st="Invalid signal (must be an AbortSignal instance)",ct="Invalid password (password must be a string, rawPassword must be a Uint8Array)",ut="Invalid passThrough option (must be a boolean or 'compressed')",lt="The operation was aborted";function ft(t){if(t&&typeof t!=C)throw new Error(it);return t}function dt(t){if(t&&(typeof t.addEventListener!=C||typeof t.aborted!=M))throw new Error(st);return t||I}function wt(t){if(t&&t.aborted)throw t.reason===I?new DOMException(lt,"AbortError"):t.reason}function pt(t,e){if(t&&typeof t!=v||e&&!(e instanceof Uint8Array))throw new Error(ct)}function ht(t){if(t!==I&&typeof t!=M&&t!==at)throw new Error(ut);return t}function mt(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function yt(t,e,r){t!==I&&mt(t,e,r)}function bt(t){return typeof t==v&&t.trim()?Number(t):t}const 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!=U&&navigator.hardwareConcurrency&&(At=navigator.hardwareConcurrency)}catch{}const Rt={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:At,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=U&&CompressionStream,DecompressionStream:typeof DecompressionStream!=U&&DecompressionStream},Dt="maxWorkers",xt="baseURI",zt=["wasmURI","workerURI"],Ft=["chunkSize",Dt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],Ot=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],It=[xt,...zt,"useCompressionStream","useWebWorkers","transferStreams",...Ft,...Ot],Tt={...Rt};function Ut(){return Tt}function Ct(t){return kt(t.chunkSize)}function kt(t){return t=bt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function vt(t){Object.assign(Tt,Mt(_t(t)))}function Mt(t){const e={};for(const r of It){const n=t[r];n!==I&&(e[r]=Nt(r,n))}return e}function Nt(t,e){if(Ft.includes(t)){if(e=bt(e),t==Dt&&(!Number.isInteger(e)||e<1))throw new Error(Et)}else if(Ot.includes(t))ft(e);else if(t==xt){if(e&&typeof e!=v)throw new Error(St)}else if(zt.includes(t)&&e&&typeof e!=v&&typeof e!=C)throw new Error(gt);return e}function _t(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===I&&r===I)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===I&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===I&&(n.DecompressionStreamFallback=r),n}function jt(t){const e=Mt(_t(t));Object.assign(Rt,e),Object.assign(Tt,e)}function Bt(){for(const t of It)delete Tt[t];Object.assign(Tt,Rt)}function Pt(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,Yt,qt,Kt,Xt,Jt,Qt]=Vt;class $t{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=Qt[255&t]^Jt[t>>>8&255]^Xt[t>>>16&255]^Kt[t>>>24&255]^qt[255&r]^Yt[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 $t;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==U){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=he(n<<8|n>>>24)^a<<24,a=ye(a)):r>6&&t%r==4&&(n=he(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=me(i)^r[0],e=me(s)^r[1],a=me(c)^r[2],l=me(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 h=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],h=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],h=56),o[0]=(se[f>>>24]<<24|se[d>>>16&255]<<16|se[w>>>8&255]<<8|se[255&p])^r[h],o[1]=(se[d>>>24]<<24|se[w>>>16&255]<<16|se[p>>>8&255]<<8|se[255&f])^r[h+1],o[2]=(se[w>>>24]<<24|se[p>>>16&255]<<16|se[f>>>8&255]<<8|se[255&d])^r[h+2],o[3]=(se[p>>>24]<<24|se[f>>>16&255]<<16|se[d>>>8&255]<<8|se[255&w])^r[h+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 he(t){return se[t>>>24]<<24|se[t>>>16&255]<<16|se[t>>>8&255]<<8|se[255&t]}function me(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!=U&&typeof crypto.getRandomValues==C,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 De={name:"PBKDF2"},xe=Object.assign({hash:{name:"HMAC"}},De),ze=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},De),Fe=["deriveBits"],Oe=[8,12,16],Ie=[16,24,32],Te=10,Ue=typeof crypto!=U,Ce=Ue&&crypto.subtle;let ke=Ue&&typeof Ce!=U&&typeof Ce.importKey==C&&typeof Ce.deriveBits==C,ve=we;class Me extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){super({start(){_e(this,t,e,r)},async transform(t,e){const r=this,{password:o,strength:a,l:i,ready:s}=r;o?(await async function(t,e,r,n){const o=await Pe(t,e,r,We(n,0,Oe[e])),a=We(n,Oe[e]);if(o[0]!=a[0]||o[1]!=a[1])throw Be(t),new Error(Ee)}(r,a,o,We(t,0,Oe[a]+2)),t=We(t,Oe[a]+2),n?(Be(r),e.error(new Error(ge))):i()):await s;const c=new Uint8Array(t.length-Te-(t.length-Te)%16);e.enqueue(je(r,t,c,0,Te,!0))},async flush(t){const{h:e,m:r,ready:n}=this;if(e){await n;const a=We(r,r.length-Te),i=new Uint8Array(We(r,0,r.length-Te));e.process(i,!0);const s=e.digest();let c=r.length<Te?1:0;for(let t=0;t<Te;t++)c|=s[t]^a[t];if(c&&o)throw new Error(Se);t.enqueue(i)}},cancel(){Be(this)}})}}class Ne extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){super({start(){_e(this,t,e,r)},async transform(t,e){const r=this,{password:n,strength:o,l:a,ready:i}=r;let s=N;n?(s=await async function(t,e,r){const n=Re(new Uint8Array(Oe[e]));return Pt(n,await Pe(t,e,r,n))}(r,o,n),a()):await i;const c=new Uint8Array(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(je(r,t,c,s.length,0,!1))},async flush(t){const{h:e,m:r,ready:n}=this;if(e){await n;const o=new Uint8Array(r);e.process(o,!1);const a=We(e.digest(),0,Te);t.enqueue(Pt(o,a))}},cancel(){Be(this)}})}}function _e(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.l=e),password:Le(e,r),strength:n-1,m:N})}function je(t,e,r,n,o,a){const{h:i,m:s}=t;s.length&&(e=Pt(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=We(r,n,n+u);t.set(We(e,0,u)),i.process(t,a)}return t.m=We(e,u),r}function Be({h:t}){t&&t.dispose&&t.dispose()}async function Pe(t,e,r,n){t.password=null;const o=Ie[e],a=await async function(t,e,r){if(ke)try{const n=await Ce.importKey("raw",t,xe,!1,Fe);return new Uint8Array(await Ce.deriveBits(Object.assign({salt:e},ze),n,8*r))}catch{ke=!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(We(a,0,o),We(a,o,2*o)),We(a,2*o)}function Le(t,e){return e===I?ee(t):e}function We(t,e,r){return t.subarray(e,r)}class Ze extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){He(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=Ge(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(Ge(r,t))}})}}class Ve extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){He(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 He(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,{keys:n,S:new $t(n[0]),A:new $t(n[2])}),r)for(let e=0;e<r.length;e++)qe(t,r[e]);else for(let r=0;r<e.length;r++)qe(t,e.charCodeAt(r))}(t,e,r)}function Ge(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Ke(t)^e[n],qe(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]=Ke(t)^e[n],qe(t,e[n]);return r}function qe(t,e){let[,r]=t.keys;t.S.append([e]);const n=~t.S.get();r=Je(Math.imul(Je(r+Xe(n)),134775813)+1),t.A.append([r>>>24]);const o=~t.A.get();t.keys=[n,r,o]}function Ke(t){const e=2|t.keys[2];return Xe(Math.imul(e,1^e)>>>8)}function Xe(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){const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}function $e(t,e){t=Qe(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=C||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 tr(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 er="Invalid codec definition",rr="Reserved compression method",nr="Invalid codec module",or="Compression method not supported",ar=[0,8,9,99],ir=new Map,sr=new Map;function cr(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(er);if(ar.includes(r))throw new Error(rr);const c=typeof a==C||typeof i==C;if(!(c||typeof o==v&&o.length))throw new Error(er);ir.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&wr(n,{CompressionStream:a,DecompressionStream:i})}function ur(t){const e=ir.get(t);if(e){let r;ir.delete(t),ir.forEach(t=>r=r||t.format==e.format),r||sr.delete(e.format)}}function lr(t){return ir.get(t)}function fr(){return Array.from(ir.values(),t=>Object.assign({},t,sr.get(t.format)))}function dr(t){return sr.get(t)}function wr(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=C&&typeof n!=C)throw new Error(nr);sr.set(t,{CompressionStream:r,DecompressionStream:n})}const pr="Invalid uncompressed size",hr="Invalid compressed data",mr="Invalid CRC32",yr="deflate-raw",br="deflate64-raw",Er="gzip",Sr=[31,139,8];class gr 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 h,m,y,b=super.readable;const E=f&&dr(f),S=c&&o&&!l&&!E&&(!a||s)&&Boolean(i&&n);if(a&&!s||!c||S||(h=new te,b=Tr(b,h)),o)if(E)b=Ur(b,Or(E.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(S)y=new Ar,b=Ur(b,new n(Er)),b=Tr(b,y);else try{b=Ir(b,i,{level:u,chunkSize:e},n,r)}catch(t){let e;try{e=new n(Er)}catch{throw t}b=Ur(b,e),b=Tr(b,new Ar)}a&&(s?b=Tr(b,new Ve(t)):(m=new Ne(t),b=Tr(b,m))),Fr(p,b,()=>{a&&!s||!c||(p.crc32=S?y.crc32:new DataView(h.value.buffer).getUint32(0))})}}class Ar 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=Pt(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(Pt(r.subarray(0,i),t.subarray(0,a-i))),r=Pt(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 Rr 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 h,m,y=super.readable;if(a&&(o?y=Tr(y,new Ze(t)):(m=new Me(t),y=Tr(y,m))),c){const t=f&&dr(f);if(t)y=Ur(y,Or(t.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:p}));else try{y=Ir(y,u,{chunkSize:e,deflate64:l},n,r)}catch(t){if(l||p===I)throw t;let e;try{e=new n(Er)}catch{throw t}y=function(t,e,r){const n=new $t;let o,a,i,s=0,c=!1;const u=new Promise((t,e)=>{a=t,i=e});u.catch(()=>{}),r||a();const l=new TransformStream({start(t){const e=new Uint8Array(10);e.set(Sr),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){c=!0,d();try{await u}finally{w()}const e=new Uint8Array(8),o=Wt(e);o.setUint32(0,n.get(),!0),o.setUint32(4,r,!0),t.enqueue(e)},cancel(t){i(t)}}),f=new TransformStream({transform(t,e){n.append(t),s+=t.length,s>=r?a():c&&d(),e.enqueue(t)},cancel(t){i(t)}});return t=Tr(t,l),Tr(t=Ur(t,e),f);function d(){w(),o=setTimeout(()=>i(new Error(pr)),5e3)}function w(){clearTimeout(o)}}(y,e,p)}y=function(t){const e=t.getReader();return new ReadableStream({async pull(t){let r;try{r=await e.read()}catch(t){if(t&&t.message)throw t;const e=new Error(hr);throw e.cause=t,e}const{value:n,done:o}=r;o?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}(y)}i&&(h=new te,y=Tr(y,h)),Fr(this,y,()=>{if(i){const t=new DataView(h.value.buffer);if(s!=t.getUint32(0,!1))throw new Error(mr)}})}}const Dr=new Map;function xr(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===I){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function zr(t){return xr(t,yr)}function Fr(t,e,r){e=Tr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function Or(t,e,r){if(!t)throw new Error(or);return new t(e,r)}function Ir(t,e,r,n,o){const a=e&&n?n:o||n,i=r.deflate64?br:yr;let s;try{s=new a(i,r)}catch(t){if(!e||!o||a==o)throw t;s=new o(i,r)}return Ur(t,s)}function Tr(t,e){return Qe(t).pipeThrough(e)}function Ur(t,e){const r=e.writable.getWriter(),n=t.getReader();return async function(){try{for(;;){await r.ready;const t=await n.read();if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await async function(t,e){try{await t.abort(e)}catch{}}(r,t),await async function(t,e){try{await t.cancel(e)}catch{}}(n,t)}}(),e.readable}const Cr="data",kr="deflate",vr="inflate";class Mr extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(kr)?o=gr:n.startsWith(vr)&&(o=Rr),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!==I&&r.outputSize>t.outputSize))throw new Error(pr)},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 Nr 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=65536),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 _r="Worker startup timeout";let jr,Br,Pr,Lr=()=>{};async function Wr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;return!(!r||r.R)||!(!zr(e)&&(n=e,!xr(n,Er)))||!!r&&await Zr(t);var n}async function Zr(t){if(Lr)try{return await Lr(t),!0}catch{}return!1}function Vr(t){t.createWorker?Br=!0:jr=!1}class Hr{constructor(t,{readable:e,writable:r},n,o){const{options:a,config:i,D:s,useWebWorkers:c,transferStreams:u,workerURI:l}=n;let{createWorker:f}=n;const{signal:d}=s;return Br&&(f=I),Object.assign(t,{F:!0,O:(t.O||0)+1,readable:e.pipeThrough(new Nr(Ct(i))).pipeThrough(new Gr(s),{signal:d}),writable:r,options:Object.assign({},a),I:n,workerURI:l,createWorker:f,transferStreams:u,terminate:()=>new Promise(e=>{const{T:r,F:n}=t;n?(t.U=t.U||[],t.U.push(e)):(r&&(r.terminate(),t.T=null),e()),t.C=null}),v(){if(t.F){const{U:e,T:r}=t;e&&(t.U=null,r&&(t.M=!0,r.terminate()),e.forEach(t=>t())),t.F=!1,o(t)}}}),jr===I&&(jr=typeof Worker!=U),(c&&Pr&&(jr&&l||f)?Pr:qr)(t,i)}}class Gr extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await Yr(t,r)},async transform(t,n){o+=t.length,e&&await Yr(e,o,r),n.enqueue(t)},async flush(){n&&await Yr(n,o)}})}}async function Yr(t,...e){try{await t(...e)}catch{}}function qr(t,e){return{run:()=>Kr(t,e)}}async function Kr({options:t,readable:e,writable:r,v:n,I: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.R&&!zr(n)&&await u():await u()||r&&!r.R||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),i=new Mr(t,a),s=new Nr(Ct(a)),await e.pipeThrough(i).pipeThrough(s).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:o,outputSize:c}=i;return{crc32:n,inputSize:o,outputSize:c}}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=Zr(a)),c}}const Xr={type:"module"},Jr="error";let Qr,$r,tn,en=!0;try{en=typeof structuredClone==C&&structuredClone(new DOMException("","AbortError")).code!==I}catch{}var rn;function nn(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function on(t){const{T:e}=t;if(e)try{e.terminate()}catch{}t.C=null}function an(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if($r===I||Qr!==t){const a=typeof t==C;s=a?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===I&&(n=!1),n&&(c=Xr);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===I&&(n=!0),n&&(c=Xr);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}}Qr=t,$r=s,tn=c}else i=new Worker($r,tn);return i.addEventListener("message",t=>{r.N=!0,sn(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i,errorValue:s}=t,{reader:c,writer:u,_:l,j:f,v:d,O:w}=e,p=()=>e.O!=w;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(e?u=e.value:(u=Object.assign(new Error(r),{stack:n,code:o,name:a}),s&&(u.cause=Object.assign(new Error(s.message),{name:s.name}))),Zt(u))try{i!==I&&(u.outputSize=i),c&&(u.codecImportFailed=!0),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()||un({type:Cr,value:t,done:r,messageId:o},e)}if(r==Cr){const t=new Uint8Array(n);await u.ready,await u.write(t),p()||un({type:"ack",messageId:o},e)}"close"==r&&function(t){p()||(l(t),m(),d())}(a)}}catch(i){p()||(on(e),h(i))}function h(t){p()||(f(t),m(),Zt(t)&&t.codecImportFailed||d())}function m(){u&&u.releaseLock()}}(t,r)}),i.addEventListener(Jr,t=>cn(t,r)),i.addEventListener("messageerror",t=>cn(t,r)),i}function sn(t){const{B:e}=t;e&&(clearTimeout(e),t.B=null)}function cn(t,e){t.preventDefault&&t.preventDefault(),sn(e);const{N:r,j:n,writer:o,v:a}=e;on(e),r||(e.T=null);let i=t.error||new Error(t.message||Jr);r||(i=Object.assign(new Error(i.message||Jr),{P:!0}),e.L=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function un(t,{T:e,writer:r,transferStreams:n,N:o}){try{const{value:r,readable:a,writable:i}=t,s=[];if(r&&(t.value=Lt(r),s.push(t.value.buffer)),n&&en&&o?(a&&s.push(a),i&&s.push(i)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{en=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}rn=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.C){let i;typeof a==C&&(a=a());try{i=an(t.workerURI,r,t)}catch{return Vr(t),qr(t,e)}Object.assign(t,{T:i,N:!1,M:!1,L:null,C:{run:async()=>{try{return await async function(t,e){if(!t.T){const{L:e}=t;t.L=null;const r=e||new Error(_r);throw r.P=!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,W:!1,Z:null,_:r,j:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,V: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});return i.catch(t=>{n||Object.assign(e,{W:!0,Z:t})}),{writable:o,closed:i,V:()=>{n=!0,r.abort()}}}(t.writable,t);let l;try{l=un({type:"start",options:i,config:e,readable:a,writable:s},t)}catch(e){u();try{await c}catch{}throw t.v(),e}l||Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t.N&&Number.isFinite(f)&&f>=0&&(t.B=setTimeout(()=>function(t){if(t.B=null,t.N)return;const{j:e,writer:r}=t;if(on(t),t.T=null,e){const t=new Error(_r);t.P=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await d(),await c,t}catch(e){await d(),u();try{await c}catch{}const{outputSize:r,I:n,W:o,Z:a}=t;n.outputSize=r;const i=Zt(e)&&(e.codecImportFailed||e.P),s=o&&!i?a:e;if(Zt(s))try{s.outputSize=r}catch{}throw s}async function d(){if(!l&&!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:a,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.P)return Vr(t),nn(t),Kr(t,e);if(r&&r.codecImportFailed){if(t.reader)return nn(t),Kr(t,e);t.v()}throw r}}}})}return t.C},Pr=rn;let ln=[];const fn=[];let dn,wn,pn=0;async function hn(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:a,useCompressionStream:i,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:f,codecURI:d}=r,{workerURI:w,createWorker:p,maxWorkers:h}=n;f&&(d&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(d,n.baseURI)),await async function(t,e){!sr.has(t)&&e&&wr(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===I&&n.transferStreams);const m=!(s||c||u||l),y=f===I||Boolean(r.codecURI);return e.useWebWorkers=!m&&y&&(a||a===I&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:I,e.createWorker=e.useWebWorkers&&p?p:I,r.useCompressionStream=i||i===I&&n.useCompressionStream,(await async function(){const r=ln.find(t=>!t.F);if(r)return Sn(r),new Hr(r,t,e,b);if(ln.length<h){const r={H:pn};return pn++,ln.push(r),new Hr(r,t,e,b)}return new Promise(r=>{fn.push({resolve:r,stream:t,I:e}),wn=n.workerStarvationTimeout,mn()})}()).run();function b(t){if(yn(),fn.length){const[{resolve:e,stream:r,I:n}]=fn.splice(0,1);e(new Hr(t,r,n,b)),mn()}else t.T?(Sn(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.M?t.M=!1:t.G=setTimeout(async()=>{ln=ln.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):ln=ln.filter(e=>e!=t)}}function mn(){!dn&&fn.length&&Number.isFinite(wn)&&wn>=0&&(dn=setTimeout(bn,wn))}function yn(){dn&&(clearTimeout(dn),dn=null)}function bn(){if(dn=null,fn.length){const[{resolve:t,stream:e,I:r}]=fn.splice(0,1),n=Object.assign({},r,{useWebWorkers:!1,workerURI:I,createWorker:I});t(new Hr({},e,n,En)),mn()}}function En(){yn(),mn()}function Sn(t){const{G:e}=t;e&&(clearTimeout(e),t.G=null)}const gn="\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 An(t,e){return Rn(t,e,!0)}function Rn(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=gn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const Dn="HTTP error ",xn="HTTP Range not supported",zn="HTTP resource changed",Fn="Writer iterator completed too soon",On="Writer not initialized",In="Invalid writer (size must be writable)",Tn="Content-Range",Un="Range",Cn="GET",kn="bytes",vn=16777216,Mn="writable",Nn=Symbol();class _n{constructor(){this.size=0}init(){this.initialized=!0}}class jn extends _n{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=Ct(Ut())}={}){const n=this;let o=0;return r=kt(r),new ReadableStream({async pull(a){const i=e===I?r:Math.min(r,e-o),s=await xo(n,t+o,i);s.length&&(a.enqueue(s),o+=s.length),(e!==I&&o>=e||!s.length&&i)&&a.close()}})}}class Bn extends _n{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(On);return t.writeUint8Array(Lt(e))}});Object.defineProperty(t,Mn,{get:()=>e})}writeUint8Array(){}}class Pn extends jn{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{Y:t,K:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{K:r,Y: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 Ln extends Bn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",X:""})}writeUint8Array(t){const e=this;let r,n=e.X;const o=e.X.length;for(e.X="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.X+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.X=n+e.X}getData(){return this.data+btoa(this.X)}}let Wn,Zn;class Vn extends jn{constructor(t){super(),Object.assign(this,{J:t,size:t.size}),Zn||(Zn=(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();Wn=1==e}catch{Wn=!1}})())}createReadable(t){const{J:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};if(typeof e.stream==C){if(!n&&o>=r)return Qe(e.stream());if(Wn)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 Hn extends _n{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,Mn,{get:()=>r.writable}),e.contentType=t,e.$=$e(r.readable,t),e.$.catch(()=>{})}getData(){return this.$}}class Gn extends Vn{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function Yn(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 qn extends Hn{constructor(t){super(),Object.assign(this,{encoding:t,et:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,et:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return Rn(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class Kn extends jn{constructor(t,e){super(),Jn(this,t,e)}async init(){await Qn(this,fo,so),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o}=e;if((r||n)&&o!==I){const{offset:r=0,size:n=o-r}=t||{};if(n>0&&r<o)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(xn);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=I,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await fo(Cn,t,ao(t,o,e));if(206!=r.status)throw new Error(xn);const s=to(r);if(s!==I&&s!=o)throw new Error(xn);oo(t,r),no(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 $n(this,t,e,fo,so)}}class Xn extends jn{constructor(t,e){super(),Jn(this,t,e)}async init(){await Qn(this,wo,co),super.init()}readUint8Array(t,e){return $n(this,t,e,wo,co)}}function Jn(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=vn,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 Qn(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Ut(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==U||o)){const n=await e(Cn,t,ao(t,s?-65557:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==kn))throw new Error(xn);{let o;s&&206==n.status&&(o=new Uint8Array(await n.arrayBuffer())),no(t,n);const a=eo(n);a===I?await lo(t,e,r):t.size=a,o&&o.length&&to(n)===t.size-o.length&&(t.nt=o)}}else await lo(t,e,r)}async function $n(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,nt: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(Cn,t,ao(t,e,r));if(206!=o.status)throw new Error(xn);const a=to(o);if(a!==I&&a!=e)throw new Error(xn);oo(t,o),no(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(xn);return i}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function to(t){const e=t.headers.get(Tn);if(e){const t=Number(e.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t))return t}}function eo(t){const e=t.headers.get(Tn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function ro({headers:t}){return{ot:t.get("Etag")||I,lastModified:t.get("Last-Modified")||I}}function no(t,e){const{checkResourceChanges:r,it:n}=t;r&&!n&&206==e.status&&(t.it=ro(e))}function oo(t,e){const{checkResourceChanges:r,it:n,size:o}=t;if(r){const t=eo(e);if(t!==I&&o!==I&&t!=o)throw new Error(zn);if(n){const t=ro(e);if(Object.entries(n).some(([e,r])=>r!==I&&t[e]!==I&&r!=t[e]))throw new Error(zn)}}}function ao(t,e=0,r=1){return Object.assign({},io(t),{[Un]:kn+"="+(e<0?e:e+"-"+(e+r-1))})}function io({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function so(t){await uo(t,fo)}async function co(t){await uo(t,wo)}async function uo(t,e){const r=await e(Cn,t,io(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function lo(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,io(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function fo(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(xn):new Error(Dn+(a.statusText||a.status))}function wo(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(xn):new Error(Dn+(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 po extends jn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Xn(t,e):new Kn(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 ho extends po{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class mo extends jn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{st:t,size:t.length})}readUint8Array(t,e){return this.st.slice(t,t+e)}}class yo extends Bn{constructor(t){super(),this.ct=t||262144}init(t=0){Object.assign(this,{offset:0,st:new Uint8Array(t>0?t:this.ct)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.st.length){let t=e.st.length?2*e.st.length:e.ct;for(;t<r;)t*=2;const n=e.st;e.st=new Uint8Array(t),e.st.set(n)}e.st.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.st.length?this.st:this.st.slice(0,this.offset)}}class bo extends jn{constructor(t){super(),this.ut=t}async init(){const t=this;t.lt=0;const e=t.ut=await Promise.all(t.ut.map(Do));t.ft=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}wt(t){const{ft:e,size:r}=this,n=e[t];return n===I?r:n}async readUint8Array(t,e){const r=this,{ut: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 xo(s,i,e);else{const a=n-i;o=Pt(await xo(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=N;return r.lt=Math.max(a,r.lt),o}}class Eo extends _n{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===Nn)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(Fn);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await Ro(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,Mn,{get:()=>i})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Nn)}finally{t.releaseLock()}}}class So{constructor(t){return Array.isArray(t)&&(t=new bo(t)),(t instanceof ReadableStream||typeof t.getReader==C)&&(t={readable:Qe(t)}),t}}class go{constructor(t){t.writable===I&&typeof t.next==C&&(t=new Eo(t)),(t instanceof WritableStream||typeof t.getWriter==C)&&(t={writable:tr(t)});try{t.size=t.size===I?0:t.size}catch{throw new Error(In)}return t}}function Ao(t){return Boolean(t&&t.getData)}async function Ro(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function Do(t){return t=new So(t),await Ro(t),t.size!==I&&t.readUint8Array||(t=new Vn(await $e(t.readable)),await Ro(t)),t}function xo(t,e,r){return t.readUint8Array(e,r)}function zo(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?jn.prototype.createReadable.call(t,e):t.readable}function Fo(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==I&&(n.filename=r),t.push(n)}}const Oo="filename",Io="rawFilename",To="comment",Uo="rawComment",Co="uncompressedSize",ko="compressedSize",vo="offset",Mo="diskNumberStart",No="lastModDate",_o="rawLastModDate",jo="lastAccessDate",Bo="rawLastAccessDate",Po="creationDate",Lo="rawCreationDate",Wo="internalFileAttributes",Zo="externalFileAttributes",Vo="msdosAttributesRaw",Ho="msdosAttributes",Go="msDosCompatible",Yo="zip64",qo="encrypted",Ko="version",Xo="versionMadeBy",Jo="zipCrypto",Qo="directory",$o="executable",ta="compressionMethod",ea="signature",ra="extraField",na="unixMode",oa="setuid",aa="setgid",ia="sticky",sa=[Oo,Io,Co,ko,No,_o,To,Uo,jo,Bo,Po,Lo,vo,Mo,Wo,Zo,Vo,Ho,Go,Yo,qo,Ko,Xo,Jo,Qo,$o,"symlink",ta,ea,"crc32",ra,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",na,"unixExternalUpper",oa,aa,ia,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class ca{constructor(t){sa.forEach(e=>this[e]=t[e])}}const ua=new Set([1,h,10,m,28789,25461,y,b,E,22613,13]);function la(t,e,r){return t?e?12:16+4*r:0}const fa="File format is not recognized",da="End of central directory not found",wa="End of Zip64 central directory locator not found",pa="Central directory header not found",ha="Local file header not found",ma="Zip64 extra field not found",ya="File contains encrypted entry",ba="Encryption method not supported",Ea="Split zip file",Sa="Overlapping entry found",ga="Entry data out of bounds",Aa="Ambiguous archive",Ra="Encrypted central directory is not supported",Da="Unsafe filename",xa="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",za="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",Fa="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Oa="64-bit value exceeds Number.MAX_SAFE_INTEGER",Ia="unsorted central directory",Ta="unknown version needed to extract",Ua="compressed patched data",Ca="malformed extra field",ka="unknown zip64 extensible data",va="wrapped entries count",Ma="appended data",Na="prepended data",_a="prepended central directory",ja="trailing central directory data",Ba="duplicate filename",Pa="mismatched zip64 end of central directory record",La="multiple end of central directory records",Wa="mismatched local file header (filename)",Za="mismatched local file header (general purpose bit flag)",Va="mismatched local file header (compression method)",Ha="mismatched local file header (crc32 or sizes)",Ga=/^[a-zA-Z]:/,Ya="utf-8",qa="cp437",Ka=[[Co,t],[ko,t],[vo,t],[Mo,e]],Xa={[e]:{ht:ki,bytes:4},[t]:{ht:vi,bytes:8}},Ja=BigInt(Number.MAX_SAFE_INTEGER);class Qa{constructor(t,e={}){Object.assign(this,{reader:new So(t),options:e,yt:{bt:new Set,Et:[],St:[]}})}async*getEntriesGenerator(n={}){const a=this;let{reader:i}=a;if(await Ro(i),i.size!==I&&i.readUint8Array||(i=new Vn(await $e(i.readable)),await Ro(i)),i.size<d)throw new Error(fa);const c=a.warnings=[],h=mi(n,a.options),m=h==rt,y=h!=ot,b=Ei(Fi(a,n,J),h),E=function(t,e){if(t===I)return e;if(!hi(t))throw new Error(za);return t}(Fi(a,n,"filenameValidation"),h),S=Fi(a,n,"normalizeFilename"),{gt:z,At:F}=await Si(i,y,b);if(!z)throw await async function(t){return await pi(t)==o}(i)?new Error(Ea):new Error(da);y&&F>1&&zi(La);const O=Wt(z);let T=ki(O,12),U=ki(O,16);const C=z.offset,k=Ci(O,20),v=C+d+k,M=i.size-v;M>b&&zi(Ma),M>0&&Fo(c,Ma);let _=Ci(O,4);const j=i.lt||0;let B,P,L,W,Z,V=Ci(O,6),H=Ci(O,10),G=0,Y=p;const q=U==t||T==t||H==e||V==e;if(U!=t&&V!=e&&(U+=wi(i,V)),q){const r=z.offset>=w?await xo(i,z.offset-w,w):N,n=Wt(r);if(r.length==w&&ki(n,0)==l){U=wi(i,ki(n,4))+vi(n,8);let r=await xo(i,U,p),o=Wt(r);const a=z.offset-w-p;if((r.length<p||ki(o,0)!=u)&&U!=a&&a>=0){const t=U;U=a,U>t&&(G=U-t),r=await xo(i,U,p),o=Wt(r)}if(r.length<p||ki(o,0)!=u)throw new Error(wa);if(L=!0,W=vi(o,4)>44,W){const t=Math.min(vi(o,4)-44,i.size-U-p);t>0&&(Y+=t,Z=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Wt(t),n=Ci(r,26);Object.assign(e,{compressionMethod:Ci(r,0),compressedSize:vi(r,2),uncompressedSize:vi(r,10),encryptionAlgorithm:Ci(r,18),bitLength:Ci(r,20),flags:Ci(r,22),hashAlgorithm:Ci(r,24),hashData:t.subarray(28,28+n)})}return e}(await xo(i,U+p,t)))}_==e?_=ki(o,16):_!=ki(o,16)&&xi(m,c,Pa),V==e?V=ki(o,20):V!=ki(o,20)&&xi(m,c,Pa),H==e?H=vi(o,32):H!=vi(o,32)&&xi(m,c,Pa),T==t?T=vi(o,40):T!=vi(o,40)&&xi(m,c,Pa),U=wi(i,V)+vi(o,48)+G}}let K=T;const X=z.offset-(L?Y+w:0);if(U>=i.size&&(G=i.size-U-T-d,U=i.size-T-d),j!=_)throw new Error(Ea);if(U<0)throw new Error(fa);let Q=0,$=await xo(i,U,T),nt=Wt($);if(T){if($.length<4)throw new Error(fa);const t=X-T;if(U!=t&&V==_){const e=ki(nt,Q)==s||Boolean(Z&&Z.compressedSize)||ri(nt);let r=!e;if(!r&&t>=0&&t+4<=i.size&&(r=ki(Wt(await xo(i,t,4)),0)==s),r){const r=U;U=t,U>r&&(G+=U-r,B=e),$=await xo(i,U,T),nt=Wt($)}}}const at=X-U;if(T!=at&&at>=0&&V==_&&(T=at,$=await xo(i,U,T),nt=Wt($)),U<0||U>=i.size)throw new Error(fa);a.directoryOffset=U,a.directoryLength=K;const it=Oi(a,n,"decryptCentralDirectory");let st,ct;if(it&&H&&$.length>=4&&ki(nt,0)!=s&&(W||ri(nt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(Z,K,$.length);ct=$.subarray(t),$=await it($.subarray(0,t),Z),nt=Wt($),K=$.length,st=!0}Z&&!st&&($.length<4||ki(nt,0)==s)&&Fo(c,ka),P=U;const ut=Fi(a,n,"filenameEncoding"),lt=Fi(a,n,"commentEncoding"),ft=new Set;let dt,wt=-1;const pt=!m&&!L;!H&&pt&&(H=ni(nt,$,Q),H&&Fo(c,va));for(let t=0;t<H;t++){const o=new ei(i,a.options);if(Q+f>$.length||ki(nt,Q)!=s){if(0==t&&!st&&(W||ri(nt)))throw new Error(Ra);throw new Error(pa)}ai(o,nt,Q+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=Q+f,d=l+o.filenameLength,w=d+o.extraFieldLength,p=Ci(nt,Q+4),h=!(p>>8),m=p>>8==3,y=$.subarray(l,d),b=Ci(nt,Q+32),z=w+b,F=$.subarray(w,z),O=u,T=u,U=ki(nt,Q+38),C=U&r,k={readOnly:Boolean(1&C),hidden:Boolean(2&C),system:Boolean(4&C),directory:Boolean(16&C),archive:Boolean(32&C)},v=ki(nt,Q+42),M=Oi(a,n,"decodeText")||An,N=O?Ya:ut||qa,_=T?Ya:lt||qa;let j=M(y,N,tt);if(j===I&&(j=An(y,N)),S){const t=S(j);t!==I&&(j=t)}if(bi(j,E)){const t=new Error(Da);throw t.filename=j,t}let B=M(F,_,et);B===I&&(B=An(F,_)),Object.assign(o,{index:t,Rt:st,versionMadeBy:p,msDosCompatible:h,zip64:!1,compressedSize:0,uncompressedSize:0,Dt:b,offset:v,diskNumberStart:Ci(nt,Q+34),internalFileAttributes:Ci(nt,Q+36),externalFileAttributes:U,msdosAttributesRaw:C,msdosAttributes:k,rawFilename:y,filenameUTF8:O,commentUTF8:T,rawExtraField:$.subarray(d,w),rawComment:F,filename:j,comment:B}),ii(o,o,nt,Q+6)&&Fo(c,Ca,j),o.offset+=G;const L=wi(i,o.diskNumberStart)+o.offset;P=Math.min(L,P),L<wt&&Fo(c,Ia,j),wt=L,(o.version&r)>63&&Fo(c,Ta,j),32&~o.rawBitFlag||Fo(c,Ua,j),ft.has(o.filename)&&(dt=!0),ft.add(o.filename);const Z=o.externalFileAttributes>>16&e;o.unixMode===I&&16877&Z&&(o.unixMode=Z);const V=Boolean(o.unixMode&R),Y=Boolean(o.unixMode&D),q=Boolean(512&o.unixMode),K=40960==((o.unixMode===I?Z:o.unixMode)&g),X=!K&&(o.unixMode!==I?!!(73&o.unixMode):m&&!!(73&Z)),J=o.unixMode!==I&&(o.unixMode&g)==A,rt=(Z&g)==A;Object.assign(o,{setuid:V,setgid:Y,sticky:q,symlink:K,unixExternalUpper:Z,executable:X,directory:J||rt||h&&k.directory||o.filename.endsWith(x),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new ca(o);if(ot.getData=(t,e)=>o.getData(t,ot,a.yt,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=$e(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,a.yt,Object.assign({},t,{preventClose:!1})),r},Q=z,t==H-1&&pt){const t=ni(nt,$,Q);t&&(H+=t,Fo(c,va))}const{onprogress:at}=n;if(at)try{await at(t+1,H,new ca(o))}catch{}yield ot}let ht=Q,mt=oi($.subarray(Q))||(st?oi(ct):I);if(!mt&&!st){const t=U+Q,e=Math.min(X-t,65541);e>=6&&(mt=oi(await xo(i,t,e)))}mt&&(a.digitalSignature=mt,ht=Q+6+mt.length),(Q!=K&&ht!=K||!st&&Q!=T&&ht!=T)&&xi(m,c,ja),dt&&xi(m,c,Ba);const yt=Fi(a,n,"extractPrependedData"),bt=Fi(a,n,"extractAppendedData"),Et=(m||yt)&&H&&4==P&&await async function(t){const e=await pi(t);return e==o||808471376==e}(i)?4:0;return m&&(G||H&&P>Et)&&zi(Na),(G||H&&P>4)&&Fo(c,Na),B&&Fo(c,_a),yt&&(a.prependedData=P>Et?await xo(i,Et,P-Et):N),a.comment=k?await xo(i,C+d,k):N,bt&&(a.appendedData=v<i.size?await xo(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 $a{constructor(t={}){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}}),o=new Qa(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 ti(t,e={}){if(t=new So(t),await Ro(t),t.size!==I&&t.readUint8Array||(t=new Vn(await $e(t.readable)),await Ro(t)),t.size<d)return!1;const r=mi(e,{}),n=r!=ot,o=Ei(e[J],r),{gt:a,At:i}=await Si(t,n,o);if(!a||r==rt&&i>1)return!1;const s=Ci(Wt(a),20),c=a.offset+d+s;return t.size-c<=o}let ei=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,i={}){const s=this,c=Ut(),{reader:u,index:l,offset:f,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:b,rawLastModDate:E,uncompressedSize:S,compressedSize:g}=s,{dataDescriptor:A}=m,R=e.localDirectory={},D=e.warnings=[],x=wi(u,d)+f,F=await xo(u,x,z),O=Wt(F);let T=Fi(s,i,j),U=Fi(s,i,B);const C=ht(Fi(s,i,P)),k=Boolean(C),v=!0===C;if(pt(T,U),T=T&&T.length&&T,U=U&&U.length&&U,w&&99!=w.originalCompressionMethod)throw new Error(or);if(F.length<z||ki(O,0)!=n)throw new Error(ha);ai(R,O,4);const{extraFieldLength:M,filenameLength:_}=R,G=R.dataOffset=x+z+_+M,Y=Fi(s,i,"checkLocalDirectory"),q=mi(i,s.options),K=function(t,e){return t===I?e!=ot:Boolean(t)}(Y,q),X=Fi(s,i,"checkLocalFilename"),J=function(t,e){return t===I?e==rt:Boolean(t)}(X===I?Y:X,q);let Q=N;if(J&&(_||M)){const t=await xo(u,x+z,_+M);Q=t.subarray(0,_),R.rawExtraField=t.subarray(_)}else R.rawExtraField=M?await xo(u,x+z+_,M):N;J&&(R.rawFilename=Q),ii(s,R,O,4,!0)&&Fo(D,Ca),function(t,e,r,n,o){const{rawFilename:a}=t,i=!o,s=t.Rt&&!(8192&~e.rawBitFlag);!n||s||r.length==a.length&&!r.some((t,e)=>t!=a[e])||xi(i,o,Wa),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&xi(i,o,Za),e.compressionMethod!=t.compressionMethod&&xi(i,o,Va),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||xi(i,o,Ha)}(s,R,Q,J,K?I:D);const{lastAccessDate:$,creationDate:tt,uid:et,gid:nt}=R;$&&(e.lastAccessDate=$),tt&&(e.creationDate=tt),et!==I&&e.uid===I&&(e.uid=et),nt!==I&&e.gid===I&&(e.gid=nt);const at=Fi(s,i,"checkPasswordOnly"),it=s.encrypted&&R.encrypted&&(!v||at),st=it&&!w;if(v||(e.zipCrypto=st),it&&!(64&~R.rawBitFlag))throw new Error(ba);const ct=k?I:lr(h);if(0!=h&&8!=h&&9!=h&&!ct&&!k)throw new Error(or);if(it){if(!st&&(w.strength<1||w.strength>3))throw new Error(ba);if(!T&&!U)throw new Error(ya)}if(G+g>u.size)throw new Error(ga);const ut=g,lt=dt(Fi(s,i,L));wt(lt);let ft=Fi(s,i,"checkOverlappingEntry");const mt=Fi(s,i,"checkOverlappingEntryOnly");mt&&(ft=!0);const{onstart:yt,onprogress:bt,onend:Et}=i,St=0!=h&&!k,gt=k?g-la(it,st,w&&w.strength):S,At=9==h;let Rt=Fi(s,i,Z);At&&(Rt=!1);const Dt=Fi(s,i,"checkCrc32"),xt=(Dt===I?Fi(s,i,"checkSignature"):Dt)&&!k&&(!it||st||w&&1==w.vendorVersion),zt={options:{codecType:vr,password:T,rawPassword:U,zipCrypto:st,encryptionStrength:w&&w.strength,checkCrc32:xt,checkAuthenticationCode:Fi(s,i,"checkAuthenticationCode"),passwordVerification:st&&(A?E>>>8&r:b>>>24&r),outputSize:gt,crc32:b,compressed:St,encrypted:it,useWebWorkers:Fi(s,i,W),useCompressionStream:Rt,transferStreams:Fi(s,i,V),deflate64:At,format:ct?ct.format:I,codecURI:ct?ct.codecURI:I,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:at},config:c,D:{signal:lt,size:ut,onstart:yt,onprogress:bt,onend:Et}};let Ft,Ot,It;ft&&await async function({reader:t,xt:e,index:r,offset:n,crc32:o,compressedSize:i,uncompressedSize:s,dataOffset:c,dataDescriptor:u,extraFieldZip64:l,yt:f}){let d=0;if(u&&(d=l?20:12),d){const r=await xo(t,c+i,d+4),n=Wt(r);let u=r.length==d+4&&ki(n,0)==a;if(u){const t=di(n,4,l);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==i&&t.uncompressedSize==s?d+=4:u=!1}if(r.length>=d){const t=di(n,u?4:0,l);t.signature=u,e.localDirectory.dataDescriptor=t}}const w={start:n,end:c+i+d,xt:e},{bt:p,Et:h,St:m}=f;if(!p.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&&fi(e,o)?o:a&&fi(e,a)?a:void 0}(h,w)||m.find(t=>fi(w,t));if(t){const e=new Error(Sa);throw e.overlappingEntry=t.xt,e}p.add(r),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),f.Et=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}(h,m),m.length=0)}}({reader:u,xt:e,index:l,offset:x,crc32:b,compressedSize:g,uncompressedSize:S,dataOffset:G,dataDescriptor:A||R.bitFlag.dataDescriptor,extraFieldZip64:p||R.extraFieldZip64,yt:o});try{if(!mt){at&&(t=new WritableStream),t=new go(t),await Ro(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(gt,g,St)),({writable:Ft}=t);const e=Qe(u.createReadable({offset:G,size:ut})),{outputSize:r}=await hn({readable:e,writable:Ft},zt);if(r!=gt)throw Object.assign(new Error(pr),{outputSize:r});t.size+=r}}catch(e){const{outputSize:r}=zt;if(r!==I?t.size+=r:Zt(e)&&e.outputSize!==I&&(t.size+=e.outputSize),!at||!Zt(e)||e.message!=ge)throw Ot=e,It=!0,e}finally{if((Ao(t)||!Fi(s,i,H))&&Ft&&!Ft.locked){const t=Ft.getWriter();if(It)try{await t.abort(Ot)}catch{}else await t.close()}}return at||mt?I:t.getData?t.getData():Ft}};function ri(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==ki(t,r))return!0;return!1}function ni(t,e,r){let n=0;for(;r+f<=e.length&&ki(t,r)==s;)r+=f+Ci(t,r+28)+Ci(t,r+30)+Ci(t,r+32),n++;return n%65536?0:n}function oi(t){if(t.length>=6){const e=Wt(t);if(ki(e,0)==i){const r=Ci(e,4);if(6+r<=t.length)return t.subarray(6,6+r)}}}function ai(t,e,r){const n=t.rawBitFlag=Ci(e,r+2),o=!(1&~n),a=ki(e,r+6);Object.assign(t,{encrypted:o,version:Ci(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:a,lastModDate:Ii(a),filenameLength:Ci(e,r+22),extraFieldLength:Ci(e,r+24)})}function ii(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=Ci(s,c),e=Ci(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=Ci(r,n+4);Object.assign(e,{signature:ki(r,n+10),crc32:ki(r,n+10),compressedSize:ki(r,n+14),uncompressedSize:ki(r,n+18)});const f=i.get(1);f&&(function(t,e){e.zip64=!0;const r=Wt(t.data),n=Ka.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+Xa[e].bytes,0);if(t.data.length<o)throw new Error(ma);for(let o=0,a=0;o<n.length;o++){const[i,s]=n[o],c=Xa[s];e[i]=t[i]=c.ht(r,a),a+=c.bytes}}(f,e),e.extraFieldZip64=f);const d=i.get(28789);d&&(si(d,Oo,Io,e,t),e.extraFieldUnicodePath=d);const w=i.get(25461);w&&(si(w,To,Uo,e,t),e.extraFieldUnicodeComment=w);const p=i.get(h);p&&p.data.length>=7?(function(t,e,r){const n=Wt(t.data),o=Ui(n,4);Object.assign(t,{vendorVersion:Ui(n,0),vendorId:Ui(n,2),strength:o,originalCompressionMethod:r,compressionMethod:Ci(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=I)}(p,e,l),e.extraFieldAES=p):e.compressionMethod=l;const S=i.get(13);S&&(ci(S,e),e.extraFieldPkwareUnix=S);const g=i.get(22613);g&&(ci(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=Ci(r,o),a=Ci(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:Ti(o),lastAccessDate:Ti(a),creationDate:Ti(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(A,e),e.extraFieldNTFS=A);const R=i.get(E);let D;if(R&&(D=ui(R,e,!1),e.extraFieldUnix=R),!D){const t=i.get(b);t&&(ui(t,e,!0),e.extraFieldInfoZip=t)}const x=i.get(m);x&&(function(t,e,r){if(!t.data.length)return;const n=Wt(t.data),o=Ui(n,0),a=[],i=[];r?(1&~o||(a.push(No),i.push(_o)),2&~o||(a.push(jo),i.push(Bo)),4&~o||(a.push(Po),i.push(Lo))):t.data.length>=5&&(a.push(No),i.push(_o));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=ki(n,s);e[r]=t[r]=new Date(1e3*(0|a));const c=i[o];t[c]=a}s+=4})}(x,e,o),e.extraFieldExtendedTimestamp=x);const z=i.get(y);return z&&(e.extraFieldUSDZ=z),u}function si(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=Wt(t.data),i=new $t;i.append(o[r]);const s=Wt(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=ki(a,1),u=Ui(a,0);Object.assign(t,{version:u,[e]:An(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==ki(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function ci(t,e){if(t.data.length<8)return;const r=Wt(t.data),n={lastAccessDate:new Date(1e3*(0|ki(r,0))),lastModDate:new Date(1e3*(0|ki(r,4)))};t.data.length>=12&&(n.uid=Ci(r,8),n.gid=Ci(r,10)),Object.assign(t,n),Object.assign(e,n)}function ui(t,e,r){try{const n=Wt(t.data);let o,a;if(r){let e=0;const r=Ui(n,e++),i=Ui(n,e++);o=li(t.data.subarray(e,e+i)),e+=i;const s=Ui(n,e++);a=li(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=Ci(n,0),a=Ci(n,2),Object.assign(t,{uid:o,gid:a}));return o!==I&&(e.uid=o),a!==I&&(e.gid=a),o!==I||a!==I}catch{}}function li(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function fi(t,e){return t.start<e.end&&e.start<t.end}function di(t,e,r){const n=ki(t,e);let o,a;return r?(o=vi(t,e+4),a=vi(t,e+12)):(o=ki(t,e+4),a=ki(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:a}}function wi(t,e){return t.wt?t.wt(e):0}async function pi(t){return ki(Wt(await xo(t,0,4)))}function hi(t){return t===rt||t===nt||t===ot}function mi(t,e){return yi(t,yi(e,nt))}function yi(t,e){const r=t.strictness;if(r!==I){if(!hi(r))throw new Error(xa);return r}const n=t.checkAmbiguity;return n===I?e:n?rt:e==ot?ot:nt}function bi(t,e){if(e==ot)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(r.includes("..")||t.startsWith("/")||t.startsWith("\\\\")||Ga.test(t))||e==rt&&(r.includes(".")||r.includes(""))}function Ei(t,r){if(t!==I){const e=bt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(Fa);return e}return r==rt?0:r==ot?1/0:e}async function Si(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={count:64};let i,s,c=0;for await(const[r,u,l,f,w]of gi(t,o)){const o=Ci(r,f+20);if(w+d+o==n){const o=await Ri(t,r,u,f,w,n,a);if(2==o){if(i||(i=Ai(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=Ai(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 gi(t,o)){const o=Ai(c,u,l);a||(a=o);const f=await Ri(t,e,s,u,l,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{gt:i,At:c}}async function*gi(t,e){const r=t.size-e,n=await xo(t,r,e),o=Wt(n);for(let t=n.length-d;t>=0;t--)ki(o,t)==c&&(yield[o,r,n,t,r+t])}function Ai(t,e,r){return{offset:r,buffer:t.slice(e,e+d).buffer}}async function Ri(r,n,o,a,i,c,u){const f=Ci(n,a+10),d=ki(n,a+12),p=ki(n,a+16);if(f==e||d==t||p==t)return await Di(r,n,o,i-w,c,u)==l?2:0;if(!f&&!d)return 1;const h=Ci(n,a+6);for(const t of[i-d,wi(r,h)+p])if(await Di(r,n,o,t,c,u)==s)return 2;return 0}async function Di(t,e,r,n,o,a){return n<0||n+4>o?I:n>=r?ki(e,n-r):a.count>0?(a.count--,ki(Wt(await xo(t,n,4)),0)):I}function xi(t,e,r){t?zi(r):Fo(e,r)}function zi(t){const e=new Error(Aa);throw e.reason=t,e}function Fi(t,e,r){return e[r]===I?t.options[r]:e[r]}function Oi(t,e,r){return ft(Fi(t,e,r))}function Ii(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 Ti(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function Ui(t,e){return t.getUint8(e)}function Ci(t,e){return t.getUint16(e,!0)}function ki(t,e){return t.getUint32(e,!0)}function vi(t,e){const r=t.getBigUint64(e,!0);if(r>Ja)throw new Error(Oa);return Number(r)}var Mi=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Aa,ERR_BAD_FORMAT:fa,ERR_CENTRAL_DIRECTORY_NOT_FOUND:pa,ERR_ENCRYPTED:ya,ERR_ENCRYPTED_CENTRAL_DIRECTORY:Ra,ERR_ENTRY_DATA_OUT_OF_BOUNDS:ga,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:wa,ERR_EOCDR_NOT_FOUND:da,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:ma,ERR_INVALID_AUTHENTICATION_CODE:Se,ERR_INVALID_COMPRESSED_DATA:hr,ERR_INVALID_CRC32:mr,ERR_INVALID_FILENAME_VALIDATION:za,ERR_INVALID_MAX_APPENDED_DATA_SIZE:Fa,ERR_INVALID_PASSWORD:Ee,ERR_INVALID_STRICTNESS:xa,ERR_INVALID_UNCOMPRESSED_SIZE:pr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:ha,ERR_OVERLAPPING_ENTRY:Sa,ERR_SPLIT_ZIP_FILE:Ea,ERR_UNSAFE_FILENAME:Da,ERR_UNSUPPORTED_COMPRESSION:or,ERR_UNSUPPORTED_ENCRYPTION:ba,ERR_UNSUPPORTED_UINT64:Oa,ERR_WORKER_STARTUP_TIMEOUT:_r,WARNING_APPENDED_DATA:Ma,WARNING_COMPRESSED_PATCHED_DATA:Ua,WARNING_DUPLICATE_FILENAME:Ba,WARNING_MALFORMED_EXTRA_FIELD:Ca,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:Za,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:Va,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Ha,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Wa,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:Pa,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:La,WARNING_PREPENDED_CENTRAL_DIRECTORY:_a,WARNING_PREPENDED_DATA:Na,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:ja,WARNING_UNKNOWN_VERSION:Ta,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:ka,WARNING_UNSORTED_CENTRAL_DIRECTORY:Ia,WARNING_WRAPPED_ENTRIES_COUNT:va,ZipReader:Qa,ZipReaderStream:$a,isZipFile:ti});const Ni="File already exists",_i="Zip file comment exceeds 64KB",ji="Invalid zip file comment (must be a Uint8Array)",Bi="File entry comment exceeds 64KB",Pi="Invalid file entry comment (must be a string)",Li="Invalid date (must be a valid Date instance)",Wi="File entry name exceeds 64KB",Zi="Version exceeds 65535",Vi="The strength must equal 1, 2, or 3",Hi="Encryption is not supported in USDZ files",Gi="Split zip files are not supported in USDZ files",Yi="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",qi="Invalid extra field (must be a Map)",Ki="Invalid extra field type (must be integer 0..65535)",Xi="Invalid extra field data (must be a Uint8Array)",Ji="Extra field data exceeds 64KB",Qi=-2147483648,$i=2147483647,ts=BigInt(0),es=BigInt("0x7fffffffffffffff"),rs="Zip64 is not supported (set the 'zip64' option to 'true')",ns="Undefined uncompressed size",os="Undefined compression method",as="Undefined CRC32",is="Undetermined size",ss="Undefined reader",cs="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",us="Zip file not empty",ls="Invalid uid (must be integer 0..2^32-1)",fs="Invalid gid (must be integer 0..2^32-1)",ds="Invalid UNIX mode (must be integer 0..65535)",ws="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",ps="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",hs="Invalid msdosAttributesRaw (must be integer 0..255)",ms="Invalid msdosAttributes (must be an object with boolean flags)",ys="Invalid level (must be integer 0..9)",bs="Signature data exceeds 64KB",Es="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Ss="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",gs="compression unavailable",As="clamped last modification date",Rs=new Uint8Array([7,0,2,0,65,69,3,0,0]),Ds="infozip",xs="unix",zs=[8,9,5,3];let Fs=0;const Os=[];class Is{constructor(t,e={}){t=new go(t);const{availableSize:r=T,maxSize:n=T}=t,o=r>0&&r!==T&&n>0&&n!==T;if(o&&e[X])throw new Error(Gi);Object.assign(this,{writer:t,zt:o,options:e,Ft:new Map,Ot:new Set,offset:e[K]===I?t.size||t.writable.size||0:e[K],It:e[K]===I?0:e[K]-(t.size||t.writable.size||0),Tt:new Set,Ut:[],warnings:[],Ct:0,kt:0,vt:I,Mt:!1})}prependZip(t){return ks(this,async function(t,e){if(t.Ot.size)throw new Error(us);await t.Nt(e)}(this,t))}appendZip(t){return ks(this,this.Nt(t))}async Nt(t){const e=this,{Tt:r,Ot:n,Ft: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 So(t),await Ro(t),t.size!==I&&t.readUint8Array||(t=new Vn(await $e(t.readable)),await Ro(t));const{ZipReader:r}=await Promise.resolve().then(function(){return Mi}),i=new r(t),s=await i.getEntries();await i.close(),await Ro(e.writer);const{directoryOffset:l}=i;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(Ni);n.add(t),c.push(t)}),e._t=!0;const{jt:f}=e;e.jt=new Promise(t=>u=()=>{e._t=!1,t()}),await f,e.zt&&(delete e.zt,await async function(t){return Wt(await xo(t,0,4)).getUint32(0,!0)==o}(t)||(await oc(e.writer,rc()),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)=>ec(e,t)-ec(e,r));let s=0;for(const r of i){const n=ec(e,r);await $s(t,e,s,n-s),Xs(o,await tc(e,n))&&await o.closeDisk(),a.set(r,{offset:Js(t,o),diskNumberStart:qs(o)}),s=n}await $s(t,e,s,n-s)}else{const o=t.offset;await $s(t,e,0,n),r.forEach(t=>a.set(t,{offset:o+ec(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:h}=o;f=Qs(f||N),t.extraFieldAES&&(l=99);const m=Sc(f),y=Boolean(u)&&u.uncompressedSize!==I,b=Boolean(u)&&u.compressedSize!==I,E=-7&Rc(w,p,h,i,l)|w<<1,{Bt:S,Pt:g}=gc({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,Lt:b,Wt:y,extraFieldLength:m}),{crc32:A}=t;A!==I&&yc(g,10,A);const{offset:R,diskNumberStart:D}=d.get(t);Object.assign(t,{Zt:!0,Wt:y,Lt:b,offset:R,diskNumberStart:D,Vt:!1,Ht:N,Gt:N,Yt:N,qt:N,Kt:N,rawExtraField:f,Xt:N,Bt:S,Pt: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,{Tt:i}=a,s=async function(e,n,o,a){const i=(a=Object.assign({},a))[$];if(i!==I){const{Jt:t,Qt:r}=Ns(i,ht(uc(e,a,P)),uc(e,a,No));delete a[$],a=Object.assign(t,r,a)}if(uc(e,a,Qo)&&!n.endsWith(x)&&(n+=x),e.Ot.has(n))throw new Error(Ni);e.Ot.add(n),Fs<Ut().maxWorkers?Fs++:await new Promise(t=>Os.push(t));try{return await async function(e,n,o,a){const i=_s(e,n,a);({name:n}=i);const s=js(e,n,a),{comment:c}=s,u=a[ra];e.Ft.set(n,I);const l=e.vt,f={};let d,w;s.$t.keepOrder&&(f.te=new Promise(t=>d=t)),e.vt=f;try{const{$t:c}=s;0==c.level||c.compressionMethod!==I||c.ee||await Wr(Ut())||(c.level=0,Fo(e.warnings,gs,n));const u=await async function(t,e,{$t:r},n){if(r.ee&&!e&&!uc(t,n,Qo))throw new Error(ss);let o;if(e){if(e=new So(e),await Ro(e),!e.readable&&!e.readUint8Array)throw new Error(cs);({size:o}=e)}return Object.assign({reader:e},Ps(t,Boolean(e),o,r,n))}(e,o,s,a);({reader:o}=u);const p=Ks(e.writer),h=qs(e.writer);let m=a.crc32===I?a[ea]:a.crc32;const y=u.$t.encrypted&&!c.zipCrypto;if(c.ee&&!c.re&&y&&(m=I),c.ee&&o&&!y&&m===I)throw new Error(as);const b=Ws(a=Object.assign({},a,i.$t,s.$t,u.$t,{signature:a[ea],crc32:m,offset:e.offset-p,diskNumberStart:h,[X]:e.options[X]}));b.ne&&Fo(e.warnings,As,n);const E=Hs(a),S=Sc(b.oe,E.ae);w=await async function(e,n,o,a,i){const{Ft:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,ie:f,signal:d}=i,{se:w,xt:p,ce:h,ue:m}=a,y=e.options[X];let b,E,S,g,A,R,D,x=p,F=0;const O=u&&h?h.te:I;s.set(n,x);try{i.bufferedWrite||!u||e._t||e.Ct||e.kt||!l&&!f?(b=!0,e.Ct++,D=i.createTempStream?await i.createTempStream():new TransformStream(I,I,{highWaterMark:T}),D.size=0,await Ro(c)):(E=!0,e.kt++,D=c,await O,await U()),await Ro(D);const p=Ks(c);e.zt&&!b&&await nc(e,c),y&&!b&&Zs(a,e.offset-p);const{oe:h}=w;b||await C();const m=qs(c),S=Js(e,c);if(x.diskNumberStart=m,b||(A=!0,R=c.size,await oc(D,h)),x=await async function(e,n,{diskNumberStart:o,te:a},i,s,c){const{se:u,le:l,fe:f}=i,{Bt:d,Pt:w,lastModDate:p,rawLastModDate:h,encrypted:m,compressed:y,version:b,compressionMethod:E,Ht:S,de:g,Yt:A,we:R,pe:D,qt:x,Kt:z,Gt:F}=u,{ae:O}=l,{rawFilename:T,lastAccessDate:U,creationDate:C,password:k,rawPassword:v,level:M,useUnicodeFileNames:N,zip64:_,Zt:j,Wt:B,Lt:P,zipCrypto:L,dataDescriptor:W,directory:Z,executable:V,versionMadeBy:H,rawComment:G,rawExtraField:Y,Xt:q,useWebWorkers:K,transferStreams:X,onstart:J,onprogress:Q,onend:$,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:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht,useCompressionStream:mt,ee:yt,re:bt,format:Et,codecURI:St}=c,gt={te:a,versionMadeBy:H,zip64:_,Zt:j,directory:Boolean(Z),executable:Boolean(V),filenameUTF8:Boolean(N),rawFilename:T,commentUTF8:Boolean(N),rawComment:G,Ht:S,de:g,Yt:A,qt:x,Kt:z,Gt:F,rawExtraField:Y,Xt:q,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,diskNumberStart:o,uid:it,gid:st,unixMode:ct,symlink:Boolean(ut),setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht};let{crc32:At,uncompressedSize:Rt}=c,Dt=0;yt||(Rt=0);const{writable:xt}=n;if(e){const o=e.size,a=Qe(zo(e,{size:o})),i={options:{codecType:kr,inputSize:o,level:M,rawPassword:v,password:k,encryptionStrength:et,zipCrypto:m&&L,passwordVerification:m&&L&&h>>8&r,computeCrc32:!yt,compressed:y&&!yt,encrypted:m&&!bt,useWebWorkers:K,useCompressionStream:mt,transferStreams:X,format:Et,codecURI:St,compressionMethod:E},config:s,D:{signal:tt,size:o,onstart:J,onprogress:Q,onend:$}};try{const e=await hn({readable:a,writable:xt},i);if(Dt=e.outputSize,n.size+=Dt,yt||(Rt=e.inputSize,m&&!L||(At=e.crc32)),!P&&Dt>=t||!B&&Rt>=t)throw new Error(rs)}catch(t){const{outputSize:e}=i;throw e!==I?n.size+=e:Zt(t)&&t.outputSize!==I&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,se:n,le:o},{zip64:a,zipCrypto:i,ee:s,dataDescriptor:c}){const{Pt:u,encrypted:l}=n,{he:f,me:d}=o;l&&!i&&!s||t===I||(yc(u,10,t),c&&yc(f,d,t)),a?c&&(bc(f,d+4,BigInt(e)),bc(f,d+12,BigInt(r))):(yc(u,14,e),yc(u,18,r),c&&(yc(f,d+4,e),yc(f,d+8,r)))}({crc32:At,compressedSize:Dt,uncompressedSize:Rt,se:u,le:l},c),W&&await oc(n,O),Object.assign(gt,{uncompressedSize:Rt,compressedSize:Dt,lastModDate:p,rawLastModDate:h,creationDate:C,lastAccessDate:U,encrypted:Boolean(m),zipCrypto:Boolean(L),size:f+Dt,compressionMethod:E,version:b,Bt:d,Pt:w,signature:At,crc32:!m||L||yt?At:I,we:R,pe:D,Wt:B,Lt:P}),gt}(o,D,x,a,Ut(),i),b||(A=!1),s.set(n,x),x.filename=n,b){if(await Promise.all([D.writable.getWriter().close(),O]),await U(),e.zt&&await nc(e,c),g=!0,R=c.size,await C(),x.diskNumberStart=qs(c),x.offset=Js(e,c),y){const t=a.fe;Zs(a,e.offset-Ks(c)),x.size+=a.fe-t}!function({rawFilename:t,encrypted:e,zip64:r,de:n,crc32:o,compressedSize:a,uncompressedSize:i,Wt:s,Lt:c},u,{dataDescriptor:l,ee:f}){if(l||((!e||f&&o!==I)&&yc(u,14,o),c||yc(u,18,a),s||yc(u,22,i)),r&&n){const e=z+Sc(t)+4;bc(u,e,BigInt(i)),bc(u,e+8,BigInt(a))}}(x,w.ye,i),await oc(c,w.oe),await ac(D.readable,c,d,t=>F+=t),c.size+=D.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,b&&(e.offset+=F)}throw s.delete(n),t}finally{if(b&&e.Ct--,E&&e.kt--,m&&m(O),S&&S(),b&&D&&D.dispose)try{await D.dispose()}catch{}}async function U(){e._t=!0;const{jt:t}=e;e.jt=new Promise(t=>S=()=>{e._t=!1,t()}),await t}async function C(){Xs(c,Sc(w.oe))&&await c.closeDisk()}}(e,n,o,{se:b,le:E,fe:S,xt:f,ce:l,ue:d},a)}catch(t){throw e.Ft.delete(n),t}finally{d&&d(l&&l.te)}return Object.assign(w,{name:n,comment:c,extraField:u}),new ca(w)}(e,n,o,a)}catch(t){throw e.Ot.delete(n),t}finally{const t=Os.shift();t?t():Fs--}}(a,e,n,o);i.add(s);const c=()=>i.delete(s);return Promise.prototype.then.call(s,c,c),ks(a,s)}remove(t){const{Ot:e,Ft:r}=this;if(typeof t==v&&(t=r.get(t)),t&&t.filename!==I){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,{Tt:a,writer:w}=this,{writable:p}=w;if(o.Mt)return Cs(w);if(!(r instanceof Uint8Array))throw new Error(ji);if(Sc(r)>e)throw new Error(_i);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.Ut.map(t=>t.be));const h=o.Ut.filter(t=>t.Ee&&!t.Se);if(h.length){const t=h.map(t=>t.error);h.forEach(t=>t.Se=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{ge:a,Ae:w}=Gs(r.Ft),{Re:p,De:h,xe:m}=await async function(r,n,o){const{Ft:a,writer:i}=r,c=new Uint8Array(n);await Ro(i);let u=0,l=0,d=qs(i),w=Ks(i),p=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:h,rawFilename:m,Ht:y,Gt:b,Yt:E,qt:S,Kt:g,rawExtraField:A,Xt:R,rawComment:D,versionMadeBy:x,Bt:z,Pt:F,Wt:O,Lt:I,Vt:T,ze:U,internalFileAttributes:C,externalFileAttributes:k,diskNumberStart:v,uncompressedSize:M,compressedSize:N}=n,_=Sc(y,b,E,S,g,A,R),j=f+Sc(m,D)+_;Xs(i,u+j-l)&&(await oc(i,c.slice(l,u)),l=u,p=0,await i.closeDisk()),0==r&&(d=qs(i),w=Ks(i)),O||yc(F,18,M),I||yc(F,14,N),(U||T)&&n.version<45&&mc(F,0,45);const B=Ys(j);if(B.Fe(s),B.Oe(x),B.Ie(z.subarray(0,24)),B.Oe(_),B.Oe(Sc(D)),B.Oe(T?e:v),B.Oe(C),B.Fe(k),B.Fe(U?t:h),B.Ie(m),B.Ie(y),B.Ie(b),B.Ie(E),B.Ie(S),B.Ie(g),B.Ie(A),B.Ie(R),B.Ie(D),Ec(c,B.st,u),u+=j,p++,o.onprogress)try{await o.onprogress(r+1,a.size,new ca(n))}catch{}}return await oc(i,l?c.slice(l):c),{Re:{diskNumber:d,diskOffset:w},De:{diskNumber:qs(i),Te:p},xe:c}}(r,a,o),y=await async function(t,r,n){const o=fc(t,n,Q);if(o){const n=await o(r),a=Sc(n);if(a>e)throw new Error(bs);const s=Ys(6+a);s.Fe(i),s.Oe(a),s.Ie(n);const{writer:c}=t;return Xs(c,Sc(s.st))&&await c.closeDisk(),await oc(c,s.st),6+a}return 0}(r,m,o);await async function(r,n,o,a){const{writer:i}=r,{Re:s,De:f,Ue:w,Ae:p}=a;let{ge:h}=a,m=r.Ft.size,y=s.diskNumber,b=Js(r,s);const E=Sc(n);if(E>e)throw new Error(_i);let S=uc(r,o,Yo),g=qs(i);if(Xs(i,(S?98:d)+E)&&g++,b>=t||h>=t||m>=e||g>=e){if(!1===S)throw new Error(rs);S=!0}else S===I&&p&&(S=!0);const A=Ys(S?98:d);Xs(i,Sc(A.st)+E)&&await i.closeDisk(),g=qs(i);let R=g==f.diskNumber?f.Te:0;S&&(A.Fe(u),A.Ce(44),A.Oe(45),A.Oe(45),A.Fe(g),A.Fe(y),A.Ce(R),A.Ce(m),A.Ce(h),A.Ce(b),A.Fe(l),A.Fe(g),A.Ce(BigInt(Js(r,i))+BigInt(h)+BigInt(w)),A.Fe(g+1),uc(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,m=e,b=t,h=t),A.Fe(c),A.Oe(g),A.Oe(y),A.Oe(R),A.Oe(m),A.Fe(h),A.Fe(b),A.Oe(E),await oc(i,A.st),E&&await oc(i,n)}(r,n,o,{Re:p,De:h,ge:a,Ue:y,Ae:w})}(o,r,n),o.Mt=!0,!Ao(w)&&uc(o,n,H)||await p.getWriter().close(),Cs(w)}[_](){return this.close()}}class Ts{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new Is(r,t),this.Tt=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 vs(e,t)}}()}});return Ms(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 Ms(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.Tt))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await vs(r,t),t}try{return await r.close(t,e)}catch(t){throw await vs(r,t),t}}}class Us extends Promise{then(t,e){const{ke:r}=this;return r&&(r.Se=!0),super.then(t,e)}}function Cs(t){return t.getData?t.getData():t.writable}function ks(t,e){const r=new Us((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.ke=n,n.be=Promise.prototype.then.call(r,I,t=>Object.assign(n,{Ee:!0,error:t})),t.Ut.push(n),r}async function vs(t,e){try{await t.writer.writable.abort(e)}catch{}}function Ms(t,e,r){t.Tt.add(e),e.catch(t=>{try{r(t)}catch{}})}function Ns(t,e,n){if(null===t||typeof t!=k||Array.isArray(t))throw new Error(Es);const{externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,rawLastModDate:c,creationDate:u,lastAccessDate:l,uncompressedSize:f,encrypted:d,zipCrypto:w,crc32:p,compressionMethod:h,extraFieldAES:m,extraFieldUnix:y,internalFileAttributes:b,extraField:E,bitFlag:S,directory:g,uid:A,gid:R}=t,D={externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,creationDate:u,lastAccessDate:l,internalFileAttributes:b,directory:g};S&&S.languageEncodingFlag&&(D[Y]=!0);const x=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{ua.has(r)||e.set(r,t.data)}),e.size)return e}}(E);x&&(D[ra]=x),A===I&&R===I||Object.assign(D,{uid:A,gid:R,unixExtraFieldType:y?xs:Ds});const z={};if(e&&!g)if(Object.assign(z,{uncompressedSize:f,crc32:p,compressionMethod:h}),e!==at&&Object.assign(z,{encrypted:d,zipCrypto:w,encryptionStrength:m?m.strength:I}),S&&(z.dataDescriptor=S.dataDescriptor,z[G]=zs[S.level]),n===I)z.rawLastModDate=c;else if(e!==at&&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(Ss);return{Jt:D,Qt:z}}function _s(n,o,a){let i=uc(n,a,Go),s=uc(n,a,Xo,i?20:768);const c=uc(n,a,$o),u=dc(n,a,"uid"),l=dc(n,a,"gid");let f=dc(n,a,na),d=uc(n,a,"unixExtraFieldType"),w=uc(n,a,oa),p=uc(n,a,aa),h=uc(n,a,ia);if(yt(u,t,ls),yt(l,t,fs),yt(f,e,ds),d!==I&&d!==Ds&&d!==xs)throw new Error(ws);if(d===xs&&(u!==I&&u>e||l!==I&&l>e))throw new Error(ps);d!==I||u===I&&l===I||(d=Ds);let m=dc(n,a,Vo),y=uc(n,a,Ho);const b=m!==I||y!==I;if(u!==I||l!==I||f!==I||d||c?(i=!1,s=s&r|768):b&&(i=!0,s&=r),yt(m,r,hs),y&&(typeof y!==k||Array.isArray(y)))throw new Error(ms);if(s>e)throw new Error(Zi);let E=uc(n,a,Zo);const S=E!==I;S||(E=0),!a[Qo]&&o.endsWith(x)&&(a[Qo]=!0);const z=uc(n,a,Qo);if(z?(o.endsWith(x)||(o+=x),S||(E=16,i||(E|=16877<<16))):i||S||(E=c?493<<16:27525120),!i){const t=f!==I||Boolean(w||p||h);f=f===I?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),p?f|=D:p=Boolean(f&D),h?f|=512:h=Boolean(512&f),S&&!t||(z?f=-61441&f|A:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:m,msdosAttributes:y}=function(t,e){if(t!==I)t&=r;else if(e!==I){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===I&&(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)),b&&(E=E&t|m&r);const F=E>>16&e,O=f!==I&&40960==(f&g);return{name:o,$t:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:E,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:O,setuid:w,setgid:p,sticky:h,msdosAttributesRaw:m,msdosAttributes:y}}}function js(t,r,n){const o=fc(t,n,"encodeText")||ee;let a=o(r,tt);if(a===I&&(a=ee(r)),Sc(a)>e)throw new Error(Wi);const i=n[To]||"";if(typeof i!=v)throw new Error(Pi);let s=o(i,et);if(s===I&&(s=ee(i)),Sc(s)>e)throw new Error(Bi);const c=uc(t,n,Ko);if(c!==I&&c>e)throw new Error(Zi);const u=lc(t,n,No,new Date),l=uc(t,n,_o),f=lc(t,n,jo),d=lc(t,n,Po),w=uc(t,n,Wo,0),p=ht(uc(t,n,P)),h=Boolean(p),m=!0===p,y=uc(t,n,j),b=uc(t,n,B);pt(y,b);const E=dc(t,n,"encryptionStrength",3),S=uc(t,n,Jo),g=uc(t,n,"extendedTimestamp",!0),A=uc(t,n,"ntfsTimestamp"),R=uc(t,n,"keepOrder",!0),D=uc(t,n,W),x=uc(t,n,V),z=uc(t,n,"bufferedWrite"),F=fc(t,n,"createTempStream"),O=uc(t,n,"dataDescriptorSignature",!0),T=dt(uc(t,n,L));wt(T);const U=uc(t,n,Y,!Ac(a)||!Ac(s)),C=uc(t,n,ta),k=h||C===I?I:lr(C);if(!h&&C!==I&&0!==C&&8!==C&&!k)throw new Error(or);let M=dc(t,n,G);if(yt(M,9,ys),t.options[X]){if(y!==I||b!==I)throw new Error(Hi);M===I&&C===I&&(M=0)}h&&(M=bt(n[G]));let N=uc(t,n,Z),_=uc(t,n,q);z&&_===I&&(_=!1),(_===I||S&&!m)&&(_=!0),M!==I&&6!=M&&(N=!1);const H=uc(t,n,Yo);if(!(S||y===I&&b===I||Number.isInteger(E)&&E>=1&&E<=3))throw new Error(Vi);const K=Bs(n[ra]),J=Bs(n.localExtraField),Q=Bs(n.centralExtraField);return{comment:i,$t:{rawFilename:a,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,ee:h,re:m,password:y,rawPassword:b,encryptionStrength:E,zipCrypto:S,extendedTimestamp:g,ntfsTimestamp:A,keepOrder:R,useWebWorkers:D,transferStreams:x,bufferedWrite:z,createTempStream:F,dataDescriptorSignature:O,signal:T,useUnicodeFileNames:U,compressionMethod:C,format:k?k.format:I,codecURI:k?k.codecURI:I,ve:k?k.versionNeeded:I,level:M,useCompressionStream:N,dataDescriptor:_,zip64:H,rawExtraField:K,Me:J,Xt:Q}}}function Bs(t){if(!t)return N;if(!(t instanceof Map))throw new Error(qi);let r=0,n=0;t.forEach((t,n)=>{if(mt(n,e,Ki),!(t instanceof Uint8Array))throw new Error(Xi);if(Sc(t)>e)throw new Error(Ji);r+=4+Sc(t)});const o=new Uint8Array(r),a=Wt(o);return t.forEach((t,e)=>{mc(a,n,e),mc(a,n+2,Sc(t)),Ec(o,t,n+4),n+=4+Sc(t)}),o}function Ps(e,r,n,o,a){const{ee:i,re:s,zipCrypto:c,password:u,rawPassword:l,encryptionStrength:f}=o;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:h}=o,m=0,y=0,b=!1;if(i&&r){if(y=a[Co],y===I)throw new Error(ns);if(h===I)throw new Error(os)}const E=!0===w,S=uc(e,a,qo);if(r&&s&&!S&&Sc(u,l))throw new Error(Yi);const g=r&&(Boolean(u&&Sc(u)||l&&Sc(l))||s&&S);r||(p=0,h=0);const A=la(g,c,f);r&&(i?(a.uncompressedSize=y,m=n===I?wc(y)+A:n+(s?0:A)):n===I?(d=!0,(w||w===I)&&(w=b=!0,m=4294967296)):(a.uncompressedSize=y=n,m=(pc(h,p)?wc(y):y)+A));const R=!(g||r&&(0!==n||i)||pc(h,p));R&&uc(e,a,q)===I&&(d=!1);const D=E||b||y>=t,x=E||m>=t;if(D||x){if(!1===w)throw new Error(rs);w=!0}return w=w||!1,{Ne:m,$t:{dataDescriptor:d,ie:R,zip64:w,Zt:E,_e:b,Wt:D,Lt:x,uncompressedSize:y,level:p,compressionMethod:h,encrypted:g}}}function Ls(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 Ws(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,Me:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,ee:R,encrypted:D,Wt:x,Lt:T,uncompressedSize:U,_e:C,crc32:k}=t;let{version:v,compressionMethod:M}=t;const _=!w&&pc(M,c);let j;const B=R||!_,P=u&&(t.bufferedWrite||!d||!x&&!T||B&&!C),L=P||u&&d&&(x||T);if(u&&(x||T)){const t=20,e=Ys(t);if(e.Oe(1),e.Oe(t-4),j=e.st,P&&(e.Ce(U),B)){const t=la(D,l,S);e.Ce(R?0:U+t)}}else j=N;let W,Z,V,H,G;if(D&&!l){const t=Ys(Sc(Rs)+2);t.Oe(h),t.Ie(Rs),W=t.st,W[8]=S}else W=N;if(g){const t=sc(o),e=(Y=t)>=Qi&&Y<=$i;if(e){const e=9+(i?4:0)+(s?4:0),r=Ys(e);H=1+(i?2:0)+(s?4:0),G=t,r.Oe(m),r.Oe(e-4),r.je(H),r.Fe(t),i&&r.Fe(cc(sc(i))),s&&r.Fe(cc(sc(s))),V=r.st}else V=N;if(A===I?!e||Boolean(i||s):A)try{const t=ic(o),e=Ys(36);e.Oe(10),e.Oe(32),e.Be(4),e.Oe(1),e.Oe(24),e.Ce(t),e.Ce(i?ic(i):t),e.Ce(s?ic(s):t),Z=e.st}catch{Z=N}else Z=N}else Z=V=N;var Y;let q;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=Ds||r===I&&n===I)if(o!=xs||r===I&&n===I)q=N;else{const t=Ys(8);t.Oe(E),t.Oe(4),t.Oe((r===I?0:r)&e),t.Oe((n===I?0:n)&e),q=t.st}else{const t=Vs(r===I?0:r),e=Vs(n===I?0:n),o=3+t.length+e.length,a=Ys(4+o);a.Oe(b),a.Oe(o),a.je(1),a.je(t.length),a.Ie(t),a.je(e.length),a.Ie(e),q=a.st}}catch{q=N}M===I&&(M=_?8:0),v===I&&(v=0!=M||w||D?20:10);const{ve:K}=t;_&&K!==I&&(v=v>K?v:K),u&&(v=v>45?v:45),D&&!l&&(v=v>51?v:51,R&&k!==I&&(W[4]=1),mc(Wt(W),9,M),M=99);const J=L?Sc(j):0,Q=J+Sc(W,V,Z,q,p,y);if(Q+(t[X]?67:0)>e)throw new Error(Ji);const $=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),tt=$<O?O:$>F?F:$,et=Sc(V)?new Date(1e3*sc(o)):Sc(Z)?o:tt,{Bt:rt,Pt:nt,rawLastModDate:ot}=gc({version:v,bitFlag:Rc(c,f,d,D,M),compressionMethod:M,uncompressedSize:U,lastModDate:tt,rawLastModDate:a,rawFilename:r,Lt:T,Wt:x,extraFieldLength:Q}),at=Ys(z+Sc(r)+Q),it=at.st,st=Wt(it);return at.Fe(n),at.Ie(rt),at.Ie(r),L&&at.Ie(j),at.Ie(W),at.Ie(V),at.Ie(Z),at.Ie(q),at.Ie(p),at.Ie(y),d&&(T||yc(st,18,0),x||yc(st,22,0)),{oe:it,ye:st,Bt:rt,Pt:nt,lastModDate:et,ne:et===tt&&$.getTime()!=tt.getTime(),rawLastModDate:ot,encrypted:D,compressed:_,version:v,compressionMethod:M,we:H,pe:G,Ht:N,de:J,Yt:V,qt:Z,Kt:q,Gt:W,extraFieldLength:Q}}function Zs(t,e){const{se:r}=t;let{oe:n,extraFieldLength:o}=r,a=64-(e+Sc(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=Wt(i);mc(s,0,y),mc(s,2,a-4);const c=n;r.oe=n=new Uint8Array(Sc(c)+a),Ec(n,c),Ec(n,i,Sc(c));const u=Wt(n);mc(u,28,o+a),r.ye=u,t.fe+=a}function Vs(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 Hs({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,yc(n,0,a))),{ae:o,he:n,me:i}}function Gs(r){let n=0,o=!1;for(const[,a]of r){const{rawFilename:r,Gt:i,rawComment:s,qt:c,Kt:u,rawExtraField:l,Xt:d,we:w,pe:p,Zt:h,uncompressedSize:y,compressedSize:b}=a;let{Wt:E,Lt:S}=a;h||(E&&y<t&&(E=a.Wt=!1),S&&b<t&&(S=a.Lt=!1)),o=o||E||S;const g=a.offset>=t,A=a.diskNumberStart>=e;let R,D;if(g||A||E||S){const t=4+(E?8:0)+(S?8:0)+(g?8:0)+(A?4:0),e=Ys(t);e.Oe(1),e.Oe(t-4),E&&e.Ce(y),S&&e.Ce(b),g&&e.Ce(a.offset),A&&e.Fe(a.diskNumberStart),R=e.st}else R=N;if(a.Ht=R,a.ze=g,a.Vt=A,p===I)D=N;else{const t=Ys(9);t.Oe(m),t.Oe(5),t.je(w),t.Fe(p),D=t.st}a.Yt=D;const x=Sc(R,i,c,u,D,l,d);if(x>e)throw new Error(Ji);n+=f+Sc(r,s)+x}return{ge:n,Ae:o}}function Ys(t){const e=new Uint8Array(t),r=Wt(e);let n=0;return{st:e,je:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},Oe:t=>{mc(r,n,t),n+=2},Fe:t=>{yc(r,n,t),n+=4},Ce:t=>{bc(r,n,BigInt(t)),n+=8},Ie:t=>{Ec(e,t,n),n+=Sc(t)},Be:t=>n+=t}}function qs(t){const{diskNumber:e=0}=t;return e}function Ks(t){const{diskOffset:e=0}=t;return e}function Xs(t,e){const{availableSize:r=T}=t;return e>r}function Js(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.It:0)}function Qs(t){const e=Wt(t);let r=0;for(;r+4<=Sc(t);){const n=4+hc(e,r+2);if(1==hc(e,r))return Qs(Pt(t.subarray(0,r),t.subarray(Math.min(r+n,Sc(t)))));r+=n}return t}async function $s(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await ac(zo(e,{offset:r,size:n}),o,I,t=>a+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=a,t.offset+=a}}}async function tc(t,e){const r=await xo(t,e,z);if(Sc(r)<z)return z;const n=Wt(r);return z+hc(n,26)+hc(n,28)}function ec(t,{offset:e,diskNumberStart:r}){return e+(t.wt?t.wt(r):0)}function rc(){const t=new Uint8Array(4);return yc(Wt(t),0,o),t}async function nc(t,e){delete t.zt,await oc(e,rc()),t.offset+=4}async function oc(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Sc(e),await n.write(e)}finally{n.releaseLock()}}async function ac(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(Sc(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function ic(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<ts?ts:e>es?es:e}}function sc(t){return Math.floor(t.getTime()/1e3)}function cc(t){return Math.min($i,Math.max(Qi,t))}function uc(t,e,r,n){const o=e[r]===I?t.options[r]:e[r];return o===I?n:o}function lc(t,e,r,n){const o=uc(t,e,r,n);if(null===o)return n;if(o!==I&&(typeof o.getTime!=C||Number.isNaN(o.getTime())))throw new Error(Li);return o}function fc(t,e,r){return ft(uc(t,e,r))}function dc(t,e,r,n){return bt(uc(t,e,r,n))}function wc(t){return t+5*(Math.floor(t/16383)+1)}function pc(t,e){return t===I?e===I||e>0:0!==t}function hc(t,e){return t.getUint16(e,!0)}function mc(t,e,r){t.setUint16(e,r,!0)}function yc(t,e,r){t.setUint32(e,r,!0)}function bc(t,e,r){t.setBigUint64(e,r,!0)}function Ec(t,e,r){t.set(e,r)}function Sc(...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,Lt:u,Wt:l,extraFieldLength:f}){const d=Ys(26),w=d.st,p=Wt(w);if(d.Oe(e),d.Oe(r),d.Oe(n),s===I){const t=new Uint32Array(1),e=Wt(t);mc(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),mc(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return d.Fe(s),d.Be(4),u||a!==I?d.Fe(u?t:a):d.Be(4),l||o!==I?d.Fe(l?t:o):d.Be(4),d.Oe(Sc(c)),d.Oe(f),{Bt:w,Pt:p,rawLastModDate:s}}function Ac(t){return t.every(t=>t>=32&&t<=126)}function Rc(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 Dc(){return"application/octet-stream"}function xc(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=Ut(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:zc(r,yr)||zc(t,yr)||zc(t,Er),decompression:zc(n,yr)||zc(e,yr)||zc(e,Er),registered:!1},{compressionMethod:9,compression:!1,decompression:zc(n,br)||zc(e,br),registered:!1}];for(const t of fr()){const e=dr(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==C:I,decompression:e?typeof e.DecompressionStream==C:I,registered:!0})}return o}function zc(t,e){if(!t)return!1;const{Pe:r}=t;return r?r.includes(e):xr(t,e)}const Fc="2.14.1",Oc=1048576,Ic=".zip.js-temp";function Tc(t={}){const{thresholdBytes:e=Oc,directoryName:r=Ic,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 Uc=1048576;function Cc(t={}){const{thresholdBytes:e=Uc}=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=$e(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 kc=1048576,vc=".zip.js-temp",Mc="createSyncAccessHandle is only available in dedicated workers";function Nc(t={}){const{thresholdBytes:e=kc,directoryName:r=vc,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(Mc);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 _c="deflate",jc="deflate-raw",Bc="deflate64-raw",Pc="gzip";let Lc,Wc,Zc,Vc,Hc;function Gc(t,e,r={}){if(!Lc){const t=new Error("WASM module not loaded");throw t.cause=Hc,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;return new TransformStream({start(){try{let r;if(this.Le=Wc(o),this.in=Wc(a),this.inBufferSize=a,!this.Le||!this.in)throw new Error("allocation failed");if(t?(this.We=Lc.deflate_process,this.Ze=Lc.deflate_last_consumed,this.Ve=Lc.deflate_end,this.He=Lc.deflate_new(),r=e===Pc?Lc.deflate_init_gzip(this.He,n):e===jc?Lc.deflate_init_raw(this.He,n):Lc.deflate_init(this.He,n)):e===Bc?(this.We=Lc.inflate9_process,this.Ze=Lc.inflate9_last_consumed,this.Ve=Lc.inflate9_end,this.He=Lc.inflate9_new(),r=Lc.inflate9_init_raw(this.He)):(this.We=Lc.inflate_process,this.Ze=Lc.inflate_last_consumed,this.Ve=Lc.inflate_end,this.He=Lc.inflate_new(),r=e===jc?Lc.inflate_init_raw(this.He):e===Pc?Lc.inflate_init_gzip(this.He):Lc.inflate_init(this.He)),0!==r)throw new Error("init failed:"+r)}catch(t){throw i(this),t}},transform(t,e){try{const r=t,n=new Uint8Array(Vc.buffer),a=this.We,i=this.Ze,s=this.Le;let c=0;for(;c<r.length;){const t=Math.min(r.length-c,32768);if((!this.in||this.inBufferSize<t)&&(this.in&&Zc&&(Zc(this.in),this.in=0),this.in=Wc(t),this.inBufferSize=t,!this.in))throw new Error("allocation failed");n.set(r.subarray(c,c+t),this.in);const u=a(this.He,this.in,t,s,o,0),l=u>>24&255,f=128&l?l-256:l;if(f<0)throw new Error("process error:"+f);const d=16777215&u;d&&e.enqueue(n.slice(s,s+d));const w=i(this.He);if(0===w&&0===d)break;c+=w}}catch(t){i(this),e.error(t)}},flush(t){try{const e=new Uint8Array(Vc.buffer),r=this.We,n=this.Le;for(;;){const a=r(this.He,0,0,n,o,4),i=a>>24&255,s=128&i?i-256:i;if(s<0)throw new Error("process error:"+s);const c=16777215&a;if(c&&t.enqueue(e.slice(n,n+c)),1===i||0===c)break}}catch(e){t.error(e)}finally{const e=i(this);0!==e&&t.error(new Error("end error:"+e))}},cancel(){i(this)}});function i(t){let e=0;return t.He&&t.Ve&&(e=t.Ve(t.He)),t.He=0,t.in&&Zc&&Zc(t.in),t.in=0,t.Le&&Zc&&Zc(t.Le),t.Le=0,e}}class Yc{constructor(t=_c,e){return Gc(!0,t,e)}}class qc{constructor(t=_c,e){return Gc(!1,t,e)}}Yc.R=!0,qc.R=!0,Yc.Pe=[_c,jc,Pc],qc.Pe=[_c,jc,Pc,Bc];const Kc=65536;let Xc,Jc;function Qc(t){return new Uint8Array(t.memory.buffer)}let $c,tu=!1;var eu;async function ru(){await async function(){await Promise.allSettled(ln.map(t=>(Sn(t),t.terminate()))),jr=I,Br=!1}(),$c=null,tu=!1,Lc=Wc=Zc=Vc=Hc=null,Xc=null,Jc=0}eu=function(t,e){const r=Xc;let n=r?function(t,e,r){Jc||(Jc=t.malloc(Kc));const n=Jc?t.aes_hmac_new():0;if(n){const o=Qc(t);if(o.set(e,Jc),o.set(r,Jc+e.length),t.aes_hmac_init(n,Jc,e.length,Jc+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=Jc;return{process(t,e){for(let a=0;a<t.length;a+=Kc){const i=t.subarray(a,a+Kc),s=Qc(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,Qc(r).slice(o,o+20)),dispose(){n&&(r.aes_hmac_end(n,0),n=0)}}},ve=eu||we,function({Ge:t}){Lr=t}({Ge:t=>{if(!$c){let{wasmURI:e}=t;typeof e==C&&(e=e()),$c=async function(t,{baseURI:e}){if(!tu)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(Lc=t,({malloc:Wc,free:Zc,memory:Vc}=Lc),"function"!=typeof Wc||"function"!=typeof Zc||!Vc)throw Lc=Wc=Zc=Vc=null,new Error("Invalid WASM module")})(o.instance.exports),typeof(a=o.instance.exports).aes_hmac_new==C&&(Xc=a,Jc=0)}(t,e),tu=!0}catch(t){throw function(t){Hc=t}(t),t}}(e,t).catch(t=>{throw $c=null,t})}return $c}}),jt({CompressionStreamFallback:Yc,DecompressionStreamFallback:qc}),jt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const nu="Entry filename already exists",ou="Duplicate entry filename in the imported zip file",au='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',iu="Entry is an ancestor of target entry",su="Root directory cannot be moved",cu="Target entry is not a directory",uu="Parent entry is not a directory",lu="Readable stream already consumed",fu="throw",du="keep-first",wu="keep-last",pu=new Set([fu,du,wu]),hu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",mu="Invalid readerOptions (must be an object)",yu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",bu="zipjs-abort-export";class Eu{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(nu);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.Ye++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,qe:r.qe||r.uncompressedSize===I,passThrough:r.passThrough,Ke:r.Ke||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=Yu(t);n&&(t=n.pop(),r=qu(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(nu);r!=e.parent&&(Uu(e),e.parent=r,r.children.push(e),Hu(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!==I))}}class Su extends Eu{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 Su(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===I||(t.constructor==Hn?e.type==r:t.constructor!=Ln||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=Iu(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([Ro(n),Ro(t,o)]);const a=dt(e.signal),i=function(t,e,r,n){const{onstart:o,onprogress:a,onend:i}=r,{readable:s}=e;return t.data instanceof ca||!o&&!a&&!i?s:Qe(s).pipeThrough(new Gr({onstart:o,onprogress:a,onend:i,size:e.size}),{signal:n})}(r,n,e,a),s=!Ao(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Qe(i).pipeTo(tr(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 qn(t),e)}getBlob(t,e){return this.getData(new Hn(t),e)}getData64URI(t,e){return this.getData(new Ln(t),e)}getUint8Array(t){return this.getData(new yo,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Lt(await this.getUint8Array(t)).buffer}replaceBlob(t){_u(this,{data:t,Reader:Vn,Writer:Hn,uncompressedSize:t.size})}replaceText(t){_u(this,{data:t,Reader:Gn,Writer:qn,uncompressedSize:Yn(t)})}replaceData64URI(t){_u(this,{data:t,Reader:Pn,Writer:Ln,uncompressedSize:ju(t)})}replaceUint8Array(t){_u(this,{data:t,Reader:mo,Writer:yo,uncompressedSize:t.length})}replaceReadable(t){_u(this,{data:null,Reader:Fu(t),Writer:null,uncompressedSize:I})}}class gu extends Eu{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new gu(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 Gu(this,t,{options:e},!0)}addText(t,e,r={}){return Gu(this,t,{data:e,Reader:Gn,Writer:qn,options:r,uncompressedSize:Yn(e)})}addBlob(t,e,r={}){return Gu(this,t,{data:e,Reader:Vn,Writer:Hn,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return Gu(this,t,{data:e,Reader:Pn,Writer:Ln,options:r,uncompressedSize:ju(e)})}addUint8Array(t,e,r={}){return Gu(this,t,{data:e,Reader:mo,Writer:yo,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return Gu(this,t,{data:e,Reader:class extends po{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return Gu(this,t,{Reader:Fu(e),options:r})}addFileSystemEntry(t,e={}){return Lu(this,t,e)}addFileSystemHandle(t,e={}){return Lu(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),Gu(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 Vn(t),e)}importData64URI(t,e){return this.importZip(new Pn(t),e)}importUint8Array(t,e){return this.importZip(new mo(t),e)}importHttpContent(t,e){return this.importZip(new po(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new Hn(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Ln(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new yo,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;Nu(r.passThrough);const i=Mu(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!dt(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:I,onprogress:I,onend:I,preventClose:!1}),f=Du([t],t=>zu(t,l.passThrough)),d=[];let w=!1,p=0;try{n&&await Yr(n,f),await m(t,e),a&&await Yr(a,p)}catch(t){try{t.exportedEntryNames=d}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 Yr(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=>!Cu(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||Cu(c.reason))return;wt(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 w?new Error(bu):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(bu));try{r.entryName===I&&(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==C?(r=t,e=Object.assign({},r.options,e)):(await Ro(t),r=new Qa(t,e)),Nu(e.passThrough);const n=function(t){if(t===I)return fu;if(pu.has(t))return t;throw new Error(au)}(e.duplicates),o=[],a=await r.getEntries(e);for(const t of a){let r=this;try{const a=t.filename.split("/").filter(t=>""!=t&&"."!=t),i=a.pop();let s=!1;for(const t of a){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==du){s=!0;break}if(n!=wu)throw new Error(ou);this.fs.remove(r),r=new gu(this.fs,t,{data:null},e),o.push(r)}}else r=new gu(this.fs,t,{data:null},e),o.push(r)}if(s)continue;if(t.directory){let e=r;if(i){if(e=r.getChildByName(i),e&&(!e.directory||e.data)){if(n==du)continue;if(n!=wu)throw new Error(ou);e.directory?e.data=t:(this.fs.remove(e),e=I)}e||(e=new gu(this.fs,i,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const a=r.getChildByName(i);if(a){if(n==du)continue;if(n!=wu)throw new Error(ou);this.fs.remove(a)}o.push(Gu(r,i,{data:t,Reader:Ou(Object.assign({},e)),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==C;e=Object.assign({},e),n||e.bufferedWrite!==I||(e.bufferedWrite=!0);const[o]=await Promise.all([Tu(r,Mu(e.readerOptions)),n?I:Ro(t)]),a=n?t:new Is(t,e);return await async function(t,e,r,n,o){const{onstart:a,onprogress:i,onend:s,onentryprogress:c}=n,u=e,l=Du(e.children,t=>Pu(t)?0:1);let f=0,d=0;if(a&&await Yr(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(Pu(e))return;const{name:a,Jt:s}=ku(e,u,n);let w=0;const p=await t.add(a,o.get(e),Object.assign(s,{onstart:I,onend:I,onprogress:async t=>{f+=t-w,w=t,i&&await Yr(i,f,r)}}));d++,c&&await Yr(c,d,l,p)}s&&await Yr(s,f)}(a,r,Du([r],xu),e,o),n?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(r={}){const n=this;Mu((r=Object.assign({},r)).readerOptions),r.bufferedWrite===I&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),a=o.filter(t=>!Pu(t)).map(t=>{const{name:e,Jt:o}=ku(t,n,r);return{name:e,size:t.directory?0:vu(t,Bu(t,r)),options:o}}),i=!r.bufferedWrite||a.every(t=>!1!==t.options.keepOrder)&&o.every(t=>Pu(t)||!t.children.length);return await async function(r,n,o,a){const i={options:r};if(ft(r[Q]))throw new Error(is);if(a!==I&&!(a instanceof Uint8Array))throw new Error(ji);const s=Sc(a);if(s>e)throw new Error(_i);const c=r[X],u=new Map,l=r[K]===I?0:r[K];let f=l,w=T;const p=[],h=new Set;for(const e of n){let{name:r}=e;const{size:n}=e,o=Object.assign({},e.options);uc(i,o,Qo)&&!r.endsWith(x)&&(r+=x);const a=_s(i,r,o);({name:r}=a);const{$t:s}=js(i,r,o);0==s.level||s.compressionMethod!==I||s.ee||await Wr(Ut())||(s.level=0);const l=!uc(i,o,Qo);if(l&&n===I)throw new Error(is);const{Ne:d,$t:m}=Ps(i,l,n,s,o);if(l&&!s.ee&&pc(m.compressionMethod,m.level))throw new Error(is);const y=Object.assign({},o,a.$t,s,m,{[X]:c}),b=Ws(y),E=Hs(y),S={se:b,fe:Sc(b.oe,E.ae)};c&&Zs(S,f);const g=l?d:0;u.set(r,Object.assign({},y,b,{offset:f,diskNumberStart:0,compressedSize:g}));const A=S.fe+g;p.push(A),h.add(Boolean(y.Zt||y.uncompressedSize>=t||g>=t)),w=Math.min(w,A),f+=A}if(u.size>1&&(c||f-w>=t&&(h.size>1||Ls(p,l,!0)!=Ls(p,l,!1)))&&!o)throw new Error(is);const{ge:m,Ae:y}=Gs(u);let b=uc(i,r,Yo);if(f>=t||m>=t||u.size>=e){if(!1===b)throw new Error(rs);b=!0}else b===I&&y&&(b=!0);return f-l+m+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 Au{constructor(){Zu(this)}get children(){return this.root.children}remove(t){Uu(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=I}move(t,e){if(t==this.root)throw new Error(su);if(!e.directory)throw new Error(cu);if(e.isDescendantOf(t))throw new Error(iu);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(nu)}else Uu(t),t.parent=e,e.children.push(t),Hu(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]):I;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 Vu(this,r=>r.importBlob(t,e))}importData64URI(t,e){return Vu(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return Vu(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return Vu(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return Vu(this,r=>r.importReadable(t,e))}importZip(t,e){return Vu(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 Ru={FS:Au,ZipDirectoryEntry:gu,ZipFileEntry:Su};function Du(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 xu(t){return t.uncompressedSize}function zu(t,e){const{data:r}=t;return e&&r instanceof ca?r.compressedSize:t.uncompressedSize}function Fu(t){let e;return function(){if(e)throw new Error(lu);return e=!0,{readable:t}}}function Ou(t){return class extends jn{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const e=this,r=Object.assign({},t,e.options),{checkOverlappingEntry:n,checkOverlappingEntryOnly:o}=r,a=await e.entry.getData(new Hn,Object.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:o||n,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=a,e.Xe=new Vn(a),e.size=a.size,super.init()}readUint8Array(t,e){return this.Xe.readUint8Array(t,e)}}}function Iu(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function Tu(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 t=>{const r=t.reader=Iu(t.Reader,t.data,e);o.set(t,r);try{await Ro(r)}catch(e){try{e.entryId=t.id,e.cause={entry:t}}catch{}throw e}r.size!==I&&(t.uncompressedSize=r.size,t.qe=!1)})),o}function Uu(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function Cu(t){return Boolean(t)&&t.message==bu}function ku(t,e,r){const n=r.relativePath?t.getRelativeName(e):t.getFullname(),o=t.options||{};let a={},i={};if(t.data instanceof ca){const e=Bu(t,r),n=o.lastModDate===I?r.lastModDate:o.lastModDate;({Jt:a,Qt:i}=Ns(t.data,e,n)),e&&(i.passThrough=!0)}const s=Object.assign({lastModDate:t.Ke},a,r,o,i,{directory:t.directory});if(!t.directory&&s.passThrough&&s.uncompressedSize===I)throw new Error(hu);return{name:n,Jt:s}}function vu(t,e){const{reader:r}=t;return r&&r.size!==I?r.size:t.qe?I:zu(t,e)}function Mu(t){if(t&&(typeof t!=k||Array.isArray(t)))throw new Error(mu);return t&&Nu(t.passThrough),t}function Nu(t){if(ht(t)===at)throw new Error(yu)}function _u(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:I,uncompressedSize:r===I?0:r,qe:r===I})}function ju(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function Bu(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function Pu(t){return t.directory&&null===t.data}function Lu(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 Wu(n)),"file"==n.kind){const t=await n.getFile();o.push(Gu(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===I&&(t.entryName=i)}catch{}throw t}}return o}(t,e,[])}async function Wu(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 Wu(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 Zu(t){t.entries=[],t.Ye=0,t.root=new gu(t)}function Vu(t,e){const{entries:r,Ye:n,root:o}=t;return Zu(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,Ye:n,root:o}),e})}function Hu(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 Gu(t,e,r,n){if(t.directory){const o=Yu(e);return o&&(e=o.pop(),t=qu(t,o)),n?new gu(t.fs,e,r,t):new Su(t.fs,e,r,t)}throw new Error(uu)}function Yu(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function qu(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(nu);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(iu)}else t=new gu(n.fs,e,{data:null},n)}),t}export{Vn as BlobReader,Hn as BlobWriter,Pn as Data64URIReader,Ln as Data64URIWriter,lt as ERR_ABORTED,Aa as ERR_AMBIGUOUS_ARCHIVE,iu as ERR_ANCESTOR_ENTRY,fa as ERR_BAD_FORMAT,pa as ERR_CENTRAL_DIRECTORY_NOT_FOUND,Ni as ERR_DUPLICATED_NAME,ou as ERR_DUPLICATE_IMPORTED_ENTRY,ya as ERR_ENCRYPTED,Ra as ERR_ENCRYPTED_CENTRAL_DIRECTORY,ga as ERR_ENTRY_DATA_OUT_OF_BOUNDS,nu as ERR_ENTRY_EXISTS,wa as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,da as ERR_EOCDR_NOT_FOUND,ma as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,xn as ERR_HTTP_RANGE,zn as ERR_HTTP_RESOURCE_CHANGED,Dn as ERR_HTTP_STATUS,Se as ERR_INVALID_AUTHENTICATION_CODE,St as ERR_INVALID_BASE_URI,er as ERR_INVALID_CODEC_DEFINITION,nr as ERR_INVALID_CODEC_MODULE,_i as ERR_INVALID_COMMENT,ji as ERR_INVALID_COMMENT_TYPE,hr as ERR_INVALID_COMPRESSED_DATA,mr as ERR_INVALID_CRC32,Li as ERR_INVALID_DATE,au as ERR_INVALID_DUPLICATES,Vi as ERR_INVALID_ENCRYPTION_STRENGTH,Es as ERR_INVALID_ENTRY,Bi as ERR_INVALID_ENTRY_COMMENT,Pi as ERR_INVALID_ENTRY_COMMENT_TYPE,Wi as ERR_INVALID_ENTRY_NAME,qi as ERR_INVALID_EXTRAFIELD,Ji as ERR_INVALID_EXTRAFIELD_DATA,Xi as ERR_INVALID_EXTRAFIELD_DATA_TYPE,Ki as ERR_INVALID_EXTRAFIELD_TYPE,za as ERR_INVALID_FILENAME_VALIDATION,it as ERR_INVALID_FUNCTION_OPTION,fs as ERR_INVALID_GID,ys as ERR_INVALID_LEVEL,Fa as ERR_INVALID_MAX_APPENDED_DATA_SIZE,Et as ERR_INVALID_MAX_WORKERS,hs as ERR_INVALID_MSDOS_ATTRIBUTES,ms as ERR_INVALID_MSDOS_DATA,Ee as ERR_INVALID_PASSWORD,ct as ERR_INVALID_PASSWORD_TYPE,hu as ERR_INVALID_PASS_THROUGH,ut as ERR_INVALID_PASS_THROUGH_VALUE,cs as ERR_INVALID_READER,mu as ERR_INVALID_READER_OPTIONS,st as ERR_INVALID_SIGNAL,bs as ERR_INVALID_SIGNATURE_DATA,xa as ERR_INVALID_STRICTNESS,ls as ERR_INVALID_UID,pr as ERR_INVALID_UNCOMPRESSED_SIZE,ws as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,ps as ERR_INVALID_UNIX_ID_SIZE,ds as ERR_INVALID_UNIX_MODE,gt as ERR_INVALID_URI,Zi as ERR_INVALID_VERSION,Fn as ERR_ITERATOR_COMPLETED_TOO_SOON,ha as ERR_LOCAL_FILE_HEADER_NOT_FOUND,Sa as ERR_OVERLAPPING_ENTRY,uu as ERR_PARENT_NOT_DIRECTORY,lu as ERR_READABLE_CONSUMED,rr as ERR_RESERVED_COMPRESSION_METHOD,su as ERR_ROOT_DIRECTORY_NOT_MOVABLE,Ea as ERR_SPLIT_ZIP_FILE,cu as ERR_TARGET_NOT_DIRECTORY,os as ERR_UNDEFINED_COMPRESSION_METHOD,as as ERR_UNDEFINED_CRC32,ss as ERR_UNDEFINED_READER,ns as ERR_UNDEFINED_UNCOMPRESSED_SIZE,is as ERR_UNDETERMINED_SIZE,Da as ERR_UNSAFE_FILENAME,or as ERR_UNSUPPORTED_COMPRESSION,Mc as ERR_UNSUPPORTED_CONTEXT,Ae as ERR_UNSUPPORTED_CRYPTO_API,ba as ERR_UNSUPPORTED_ENCRYPTION,Yi as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,Hi as ERR_UNSUPPORTED_ENCRYPTION_USDZ,rs as ERR_UNSUPPORTED_FORMAT,yu as ERR_UNSUPPORTED_PASS_THROUGH_VALUE,Gi as ERR_UNSUPPORTED_SPLIT_USDZ,Oa as ERR_UNSUPPORTED_UINT64,_r as ERR_WORKER_STARTUP_TIMEOUT,On as ERR_WRITER_NOT_INITIALIZED,In as ERR_WRITER_SIZE_NOT_WRITABLE,Ss as ERR_ZIP_CRYPTO_LAST_MOD_DATE,us as ERR_ZIP_NOT_EMPTY,ho as HttpRangeReader,po as HttpReader,jn as Reader,bo as SplitDataReader,Eo as SplitDataWriter,Gn as TextReader,qn as TextWriter,mo as Uint8ArrayReader,yo as Uint8ArrayWriter,Fc as VERSION,Ma as WARNING_APPENDED_DATA,As as WARNING_CLAMPED_LAST_MODIFICATION_DATE,Ua as WARNING_COMPRESSED_PATCHED_DATA,gs as WARNING_COMPRESSION_UNAVAILABLE,Ba as WARNING_DUPLICATE_FILENAME,Ca as WARNING_MALFORMED_EXTRA_FIELD,Za as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,Va as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,Ha as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,Wa as WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,Pa as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,La as WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,_a as WARNING_PREPENDED_CENTRAL_DIRECTORY,Na as WARNING_PREPENDED_DATA,ja as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,Ta as WARNING_UNKNOWN_VERSION,ka as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,Ia as WARNING_UNSORTED_CENTRAL_DIRECTORY,va as WARNING_WRAPPED_ENTRIES_COUNT,Bn as Writer,gu as ZipDirectoryEntry,Eu as ZipEntry,Au as ZipFS,Su as ZipFileEntry,Qa as ZipReader,$a as ZipReaderStream,Is as ZipWriter,Ts as ZipWriterStream,vt as configure,Cc as createBlobTempStream,Tc as createOPFSTempStream,Nc as createSyncAccessHandleTempStream,Ru as fs,Dc as getMimeType,fr as getRegisteredCodecs,xc as getSupportedCompressionMethods,ti as isZipFile,cr as registerCodec,Bt as resetConfiguration,ru as terminateWorkers,ur as unregisterCodec};
1
+ const t=4294967295,e=65535,r=255,n=67324752,o=134695760,i=o,a=84233040,s=33639248,c=101010256,u=101075792,l=117853008,f=46,d=22,w=20,p=56,h=39169,m=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,z=1024,D="/",x=30,F=new Date(2107,11,31,23,59,58),O=new Date(1980,0,1),I=void 0,U=1/0,T="undefined",C="function",k="object",v="string",M="boolean",N=new Uint8Array,_=Symbol.asyncDispose||Symbol(),j="password",B="rawPassword",P="passThrough",L="signal",W="useWebWorkers",Z="useCompressionStream",V="transferStreams",H="preventClose",G="level",Y="useUnicodeFileNames",q="dataDescriptor",K="offset",X="usdz",$="maxAppendedDataSize",J="signCentralDirectory",Q="entry",tt="filename",et="comment",rt="strict",nt="balanced",ot="tolerant",it="compressed",at="Invalid option (must be a function)",st="Invalid signal (must be an AbortSignal instance)",ct="Invalid password (password must be a string, rawPassword must be a Uint8Array)",ut="Invalid passThrough option (must be a boolean or 'compressed')",lt="The operation was aborted";function ft(t){if(t&&typeof t!=C)throw new Error(at);return t}function dt(t){if(t&&(typeof t.addEventListener!=C||typeof t.aborted!=M))throw new Error(st);return t||I}function wt(t){if(t&&t.aborted)throw t.reason===I?new DOMException(lt,"AbortError"):t.reason}function pt(t,e){if(t&&typeof t!=v||e&&!(e instanceof Uint8Array))throw new Error(ct)}function ht(t){if(t!==I&&typeof t!=M&&t!==it)throw new Error(ut);return t}function mt(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function yt(t,e,r){t!==I&&mt(t,e,r)}function bt(t){return typeof t==v&&t.trim()?Number(t):t}const 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:65536,maxWorkers:At,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=T&&CompressionStream,DecompressionStream:typeof DecompressionStream!=T&&DecompressionStream},zt="maxWorkers",Dt="baseURI",xt=["wasmURI","workerURI"],Ft=["chunkSize",zt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],Ot=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],It=[Dt,...xt,"useCompressionStream","useWebWorkers","transferStreams",...Ft,...Ot],Ut={...Rt};function Tt(){return Ut}function Ct(t){return kt(t.chunkSize)}function kt(t){return t=bt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function vt(t){Object.assign(Ut,Mt(_t(t)))}function Mt(t){const e={};for(const r of It){const n=t[r];n!==I&&(e[r]=Nt(r,n))}return e}function Nt(t,e){if(Ft.includes(t)){if(e=bt(e),t==zt&&(!Number.isInteger(e)||e<1))throw new Error(Et)}else if(Ot.includes(t))ft(e);else if(t==Dt){if(e&&typeof e!=v)throw new Error(St)}else if(xt.includes(t)&&e&&typeof e!=v&&typeof e!=C)throw new Error(gt);return e}function _t(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===I&&r===I)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===I&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===I&&(n.DecompressionStreamFallback=r),n}function jt(t){const e=Mt(_t(t));Object.assign(Rt,e),Object.assign(Ut,e)}function Bt(){for(const t of It)delete Ut[t];Object.assign(Ut,Rt)}function Pt(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,Yt,qt,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),i=r-8;for(;n<=i;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]^qt[255&r]^Yt[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]),ie=new Uint8Array(1),ae=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 i=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=he(n<<8|n>>>24)^i<<24,i=ye(i)):r>6&&t%r==4&&(n=he(n)),e[t]=e[t-r]^n}return n}(t,r),o=new Int32Array(4),i=pe(e);let a=0,s=0,c=0,u=0;return{process(t,e){e&&i.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||i.update(t,0,t.length)},digest:()=>i.digest()};function l(){a=a+1|0,a||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=me(a)^r[0],e=me(s)^r[1],i=me(c)^r[2],l=me(u)^r[3],f=ce[t>>>24]^ue[e>>>16&255]^le[i>>>8&255]^fe[255&l]^r[4],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[5],w=ce[i>>>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&i]^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],i=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[i>>>8&255]^fe[255&l]^r[12],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[13],w=ce[i>>>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&i]^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],i=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[i>>>8&255]^fe[255&l]^r[20],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[21],w=ce[i>>>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&i]^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],i=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[i>>>8&255]^fe[255&l]^r[28],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[29],w=ce[i>>>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&i]^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],i=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[i>>>8&255]^fe[255&l]^r[36],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[37],w=ce[i>>>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&i]^r[39];let h=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],i=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[i>>>8&255]^fe[255&l]^r[44],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[45],w=ce[i>>>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&i]^r[47],h=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],i=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[i>>>8&255]^fe[255&l]^r[52],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[53],w=ce[i>>>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&i]^r[55],h=56),o[0]=(se[f>>>24]<<24|se[d>>>16&255]<<16|se[w>>>8&255]<<8|se[255&p])^r[h],o[1]=(se[d>>>24]<<24|se[w>>>16&255]<<16|se[p>>>8&255]<<8|se[255&f])^r[h+1],o[2]=(se[w>>>24]<<24|se[p>>>16&255]<<16|se[f>>>8&255]<<8|se[255&d])^r[h+2],o[3]=(se[p>>>24]<<24|se[f>>>16&255]<<16|se[d>>>8&255]<<8|se[255&w])^r[h+3]}}function pe(t){const e=function(){const t=new Int32Array(ae),e=new Int32Array(16),r=new Uint8Array(re),n=new DataView(r.buffer),o=new Uint8Array(8);let i=0,a=0;return{update:s,digest:function(){const e=8*a,r=Math.floor(e/4294967296),n=e>>>0;for(s(oe,0,1);56!=i;)s(ie,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(ae),i=0,a=0,c}};function s(t,e,o){const s=e+o;if(a+=o,i){for(;e<s&&i<re;)r[i++]=t[e++];i==re&&(c(n,0),i=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[i++]=t[e++]}function c(r,n){for(let t=0;t<16;t++)e[t]=r.getInt32(n+4*t);let o,i=t[0],a=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[t]|0,a=a<<30|a>>>2,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+e[t+1]|0,i=i<<30|i>>>2,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+e[t+3]|0,c=c<<30|c>>>2,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[15]|0,a=a<<30|a>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+o|0,i=i<<30|i>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((i^a)&u^a)+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,a=(s<<5|s>>>27)+((u^i)&c^i)+a+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,i=(a<<5|a>>>27)+((c^u)&s^u)+i+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=(i<<5|i>>>27)+(a^s^c)+u+1859775393+o|0,a=a<<30|a>>>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)+(i^a^s)+c+1859775393+o|0,i=i<<30|i>>>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^i^a)+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,a=(s<<5|s>>>27)+(c^u^i)+a+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,i=(a<<5|a>>>27)+(s^c^u)+i+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=(i<<5|i>>>27)+(a&s|(a|s)&c)+u+2400959708+o|0,a=a<<30|a>>>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)+(i&a|(i|a)&s)+c+2400959708+o|0,i=i<<30|i>>>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&i|(u|i)&a)+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,a=(s<<5|s>>>27)+(c&u|(c|u)&i)+a+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,i=(a<<5|a>>>27)+(s&c|(s|c)&u)+i+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=(i<<5|i>>>27)+(a^s^c)+u+3395469782+o|0,a=a<<30|a>>>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)+(i^a^s)+c+3395469782+o|0,i=i<<30|i>>>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^i^a)+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,a=(s<<5|s>>>27)+(c^u^i)+a+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,i=(a<<5|a>>>27)+(s^c^u)+i+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+i|0,t[1]=t[1]+a|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 he(t){return se[t>>>24]<<24|se[t>>>16&255]<<16|se[t>>>8&255]<<8|se[255&t]}function me(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==C,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 ze={name:"PBKDF2"},De=Object.assign({hash:{name:"HMAC"}},ze),xe=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},ze),Fe=["deriveBits"],Oe=[8,12,16],Ie=[16,24,32],Ue=10,Te=typeof crypto!=T,Ce=Te&&crypto.subtle;let ke=Te&&typeof Ce!=T&&typeof Ce.importKey==C&&typeof Ce.deriveBits==C,ve=we;class Me extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){super({start(){_e(this,t,e,r)},async transform(t,e){const r=this,{password:o,strength:i,l:a,ready:s}=r;o?(await async function(t,e,r,n){const o=await Pe(t,e,r,We(n,0,Oe[e])),i=We(n,Oe[e]);if(o[0]!=i[0]||o[1]!=i[1])throw Be(t),new Error(Ee)}(r,i,o,We(t,0,Oe[i]+2)),t=We(t,Oe[i]+2),n?(Be(r),e.error(new Error(ge))):a()):await s;const c=new Uint8Array(t.length-Ue-(t.length-Ue)%16);e.enqueue(je(r,t,c,0,Ue,!0))},async flush(t){const{h:e,m:r,ready:n}=this;if(e){await n;const i=We(r,r.length-Ue),a=new Uint8Array(We(r,0,r.length-Ue));e.process(a,!0);const s=e.digest();let c=r.length<Ue?1:0;for(let t=0;t<Ue;t++)c|=s[t]^i[t];if(c&&o)throw new Error(Se);t.enqueue(a)}},cancel(){Be(this)}})}}class Ne extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){super({start(){_e(this,t,e,r)},async transform(t,e){const r=this,{password:n,strength:o,l:i,ready:a}=r;let s=N;n?(s=await async function(t,e,r){const n=Re(new Uint8Array(Oe[e]));return Pt(n,await Pe(t,e,r,n))}(r,o,n),i()):await a;const c=new Uint8Array(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(je(r,t,c,s.length,0,!1))},async flush(t){const{h:e,m:r,ready:n}=this;if(e){await n;const o=new Uint8Array(r);e.process(o,!1);const i=We(e.digest(),0,Ue);t.enqueue(Pt(o,i))}},cancel(){Be(this)}})}}function _e(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.l=e),password:Le(e,r),strength:n-1,m:N})}function je(t,e,r,n,o,i){const{h:a,m:s}=t;s.length&&(e=Pt(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=We(r,n,n+u);t.set(We(e,0,u)),a.process(t,i)}return t.m=We(e,u),r}function Be({h:t}){t&&t.dispose&&t.dispose()}async function Pe(t,e,r,n){t.password=null;const o=Ie[e],i=await async function(t,e,r){if(ke)try{const n=await Ce.importKey("raw",t,De,!1,Fe);return new Uint8Array(await Ce.deriveBits(Object.assign({salt:e},xe),n,8*r))}catch{ke=!1}return function(t,e,r,n){const o=pe(t),i=new Uint8Array(n),a=new Uint8Array(e.length+4),s=new DataView(a.buffer);a.set(e);for(let t=1,r=0;r<n;t++,r+=ne){s.setUint32(e.length,t),o.update(a,0,a.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]}i.set(u.subarray(0,Math.min(ne,n-r)),r)}return i}(t,e,0,r)}(r,n,2*o+2);return t.h=ve(We(i,0,o),We(i,o,2*o)),We(i,2*o)}function Le(t,e){return e===I?ee(t):e}function We(t,e,r){return t.subarray(e,r)}class Ze extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){He(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=Ge(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(Ge(r,t))}})}}class Ve extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){He(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 He(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,{keys:n,S:new Qt(n[0]),A:new Qt(n[2])}),r)for(let e=0;e<r.length;e++)qe(t,r[e]);else for(let r=0;r<e.length;r++)qe(t,e.charCodeAt(r))}(t,e,r)}function Ge(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Ke(t)^e[n],qe(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]=Ke(t)^e[n],qe(t,e[n]);return r}function qe(t,e){let[,r]=t.keys;t.S.append([e]);const n=~t.S.get();r=$e(Math.imul($e(r+Xe(n)),134775813)+1),t.A.append([r>>>24]);const o=~t.A.get();t.keys=[n,r,o]}function Ke(t){const e=2|t.keys[2];return Xe(Math.imul(e,1^e)>>>8)}function Xe(t){return 255&t}function $e(t){return 4294967295&t}function Je(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}function Qe(t,e){t=Je(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=C||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 tr(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 er="Invalid codec definition",rr="Reserved compression method",nr="Invalid codec module",or="Compression method not supported",ir=[0,8,9,99],ar=new Map,sr=new Map;function cr(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=v||!n.length)throw new Error(er);if(ir.includes(r))throw new Error(rr);const c=typeof i==C||typeof a==C;if(!(c||typeof o==v&&o.length))throw new Error(er);ar.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&wr(n,{CompressionStream:i,DecompressionStream:a})}function ur(t){const e=ar.get(t);if(e){let r;ar.delete(t),ar.forEach(t=>r=r||t.format==e.format),r||sr.delete(e.format)}}function lr(t){return ar.get(t)}function fr(){return Array.from(ar.values(),t=>Object.assign({},t,sr.get(t.format)))}function dr(t){return sr.get(t)}function wr(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=C&&typeof n!=C)throw new Error(nr);sr.set(t,{CompressionStream:r,DecompressionStream:n})}const pr="Invalid uncompressed size",hr="Invalid compressed data",mr="Invalid CRC32",yr="deflate-raw",br="deflate64-raw",Er="gzip",Sr=[31,139,8];class gr extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:i,useCompressionStream:a,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let h,m,y,b=super.readable;const E=f&&dr(f),S=Ir(a,n,r),g=c&&o&&!l&&!E&&(!i||s)&&Boolean(S);if(i&&!s||!c||g||(h=new te,b=Tr(b,h)),o)if(E)b=Cr(b,Or(E.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(g)y=new Ar,b=Cr(b,new S(Er,{level:u,chunkSize:e})),b=Tr(b,y);else try{b=Ur(b,a,{level:u,chunkSize:e},n,r)}catch(t){if(!a&&r)throw t;let e;try{e=new n(Er)}catch{throw t}b=Cr(b,e),b=Tr(b,new Ar)}i&&(s?b=Tr(b,new Ve(t)):(m=new Ne(t),b=Tr(b,m))),Fr(p,b,()=>{i&&!s||!c||(p.crc32=g?y.crc32:new DataView(h.value.buffer).getUint32(0))})}}class Ar 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=Pt(r,t));const i=o-8,a=Math.min(i,r.length);n.enqueue(Pt(r.subarray(0,a),t.subarray(0,i-a))),r=Pt(r.subarray(a),t.subarray(i-a))},flush(){const e=Wt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Rr extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:d,rawBitFlag:w,outputSize:p}=t;let h,m,y,b=super.readable;if(i&&(o?b=Tr(b,new Ze(t)):(m=new Me(t),b=Tr(b,m))),c){const t=f&&dr(f);if(t)b=Cr(b,Or(t.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:p}));else{let t;const o=Ir(u,n,r);if(a&&!l&&s!==I&&p!==I&&o)try{t=new o(Er,{chunkSize:e})}catch{t=I}if(!t)try{b=Ur(b,u,{chunkSize:e,deflate64:l},n,r)}catch(e){if(l||p===I||!u&&r)throw e;try{t=new n(Er)}catch{throw e}}t&&(y=!0,b=function(t,e,r,n){const o=e.writable.getWriter(),i=e.readable.getReader(),a=n===I?new Qt:I;let s,c,u=0,l=!1,f=!1,d=!1,w=0,p=!1;const h=new Promise((t,e)=>{s=t,c=e});return h.catch(()=>{}),async function(){const e=t.getReader();try{const t=new Uint8Array(10);for(t.set(Sr),await o.write(t);;){await o.ready;const{value:t,done:r}=await e.read();if(r)break;await o.write(t)}l=!0,a&&(p&&y(),await h);const i=new Uint8Array(8),s=Wt(i);s.setUint32(0,a?a.get():n,!0),s.setUint32(4,r,!0),f=!0,await o.write(i),await o.close()}catch(t){await kr(o,t),await vr(e,t)}}(),new ReadableStream({async pull(t){let e;try{e=await function(){w++,p=!0;const t=i.read();return t.then(m,m),l&&a&&y(),t}()}catch(t){throw f?function(t){const e=new Error(u==r?mr:pr);return e.cause=t,e}(t):t}const{value:n,done:o}=e;if(o)t.close();else{if(u+=n.length,u>r){const t=new Error(pr);throw c(t),await vr(i,t),t}a&&a.append(n),t.enqueue(n)}},cancel:t=>(c(t),i.cancel(t))});function m(){p=!1}async function y(){if(!d){d=!0;const t=w;await new Promise(t=>{const{port1:e,port2:r}=new MessageChannel;r.onmessage=()=>{e.close(),r.close(),t()},e.postMessage(I)}),d=!1,p&&(w==t?s():y())}}}(b,t,p,s))}b=function(t){const e=t.getReader();return new ReadableStream({async pull(t){let r;try{r=await e.read()}catch(t){if(t&&t.message)throw t;const e=new Error(hr);throw e.cause=t,e}const{value:n,done:o}=r;o?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}(b)}a&&!y&&(h=new te,b=Tr(b,h)),Fr(this,b,()=>{if(h){const t=new DataView(h.value.buffer).getUint32(0,!1);if(s!=t)throw new Error(mr)}})}}const zr=new Map;function Dr(t,e){if(!t)return!1;let r=zr.get(t);r||(r=new Map,zr.set(t,r));let n=r.get(e);if(n===I){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function xr(t){return Dr(t,yr)}function Fr(t,e,r){e=Tr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function Or(t,e,r){if(!t)throw new Error(or);return new t(e,r)}function Ir(t,e,r){return t&&e?e:r&&r.requiresModule?r:void 0}function Ur(t,e,r,n,o){const i=e&&n?n:o||n,a=r.deflate64?br:yr;let s;try{s=new i(a,r)}catch(t){if(!e||!o||i==o)throw t;s=new o(a,r)}return Cr(t,s)}function Tr(t,e){return Je(t).pipeThrough(e)}function Cr(t,e){const r=e.writable.getWriter(),n=t.getReader();return async function(){try{for(;;){await r.ready;const t=await n.read();if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await kr(r,t),await vr(n,t)}}(),e.readable}async function kr(t,e){try{await t.abort(e)}catch{}}async function vr(t,e){try{await t.cancel(e)}catch{}}const Mr="data",Nr="deflate",_r="inflate";class jr extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(Nr)?o=gr:n.startsWith(_r)&&(o=Rr),r.outputSize=0;let i=0;const a=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(i+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:i})}}),u=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==I&&r.outputSize>t.outputSize))throw new Error(pr)},flush(){const{crc32:t}=a;Object.assign(r,{crc32:t,inputSize:i})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(a).pipeThrough(u)})}}class Br 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],i=t-o;r.length<=i?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,i),o),e[0]=r.subarray(i),o+=i)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=65536),super({transform(i,a){for(e.push(i),r+=i.length;r>t;)n+=t,a.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 Pr="Worker startup timeout";let Lr,Wr,Zr,Vr=()=>{};async function Hr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;return!(!r||r.requiresModule)||!(!xr(e)&&(n=e,!Dr(n,Er)))||!!r&&await Gr(t);var n}async function Gr(t){if(Vr)try{return await Vr(t),!0}catch{}return!1}function Yr(t){t.createWorker?Wr=!0:Lr=!1}class qr{constructor(t,{readable:e,writable:r},n,o){const{options:i,config:a,R:s,useWebWorkers:c,transferStreams:u,workerURI:l}=n;let{createWorker:f}=n;const{signal:d}=s;return Wr&&(f=I),Object.assign(t,{D:!0,F:(t.F||0)+1,readable:e.pipeThrough(new Br(Ct(a))).pipeThrough(new Kr(s),{signal:d}),writable:r,options:Object.assign({},i),O:n,workerURI:l,createWorker:f,transferStreams:u,terminate:()=>new Promise(e=>{const{I:r,D:n}=t;n?(t.U=t.U||[],t.U.push(e)):(r&&(r.terminate(),t.I=null),e()),t.T=null}),C(){if(t.D){const{U:e,I:r}=t;e&&(t.U=null,r&&(t.v=!0,r.terminate())),t.D=!1;const n=o(t);e&&e.forEach(t=>t(n))}}}),Lr===I&&(Lr=typeof Worker!=T),(c&&Zr&&(Lr&&l||f)?Zr:$r)(t,a)}}class Kr extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await Xr(t,r)},async transform(t,n){o+=t.length,e&&await Xr(e,o,r),n.enqueue(t)},async flush(){n&&await Xr(n,o)}})}}async function Xr(t,...e){try{await t(...e)}catch{}}function $r(t,e){return{run:()=>Jr(t,e)}}async function Jr({options:t,readable:e,writable:r,C:n,O:o},i){let a,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Nr),r=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,n=e?i.CompressionStream:i.DecompressionStream;t.useCompressionStream?r&&r.requiresModule&&!xr(n)&&await u():await u()||r&&!r.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),a=new jr(t,i),s=new Br(Ct(i)),await e.pipeThrough(a).pipeThrough(s).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:o,outputSize:c}=a;return{crc32:n,inputSize:o,outputSize:c}}catch(t){if(a){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=Gr(i)),c}}const Qr={type:"module"},tn="error";let en,rn,nn,on=!0;try{on=typeof structuredClone==C&&structuredClone(new DOMException("","AbortError")).code!==I}catch{}var an;function sn(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function cn(t){const{I:e}=t;if(e)try{e.terminate()}catch{}t.T=null}function un(t,e,r,n,o=!0){const{createWorker:i}=r;let a,s,c;if(i)a=i();else if(rn===I||en!==t){const i=typeof t==C;s=i?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===I&&(n=!1),n&&(c=Qr);try{a=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(i&&l)return un(t,e,r,n,!1);if(n)throw o;return un(t,e,r,!0,!1)}}else{n===I&&(n=!0),n&&(c=Qr);try{s=new URL(s,e)}catch{}try{a=new Worker(s,c)}catch(i){if(n)return un(t,e,r,!1,o);throw i}}en=t,rn=s,nn=c}else a=new Worker(rn,nn);return a.addEventListener("message",t=>{r.M=!0,ln(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:i,error:a,errorValue:s}=t,{reader:c,writer:u,N:l,_:f,C:d,F:w}=e,p=()=>e.F!=w;try{if(a)h(function(t,e){const{message:r,stack:n,code:o,name:i,outputSize:a,cause:s,codecImportFailed:c}=t;let u;if(e?u=e.value:(u=Object.assign(new Error(r),{stack:n,code:o,name:i}),s&&(u.cause=Object.assign(new Error(s.message),{name:s.name}))),Zt(u))try{a!==I&&(u.outputSize=a),c&&(u.codecImportFailed=!0),e&&(u.name!==i&&(u.name=i),u.code!==o&&(u.code=o))}catch{}return u}(a,s));else{if("pull"==r){const{value:t,done:r}=await c.read();p()||dn({type:Mr,value:t,done:r,messageId:o},e)}if(r==Mr){const t=new Uint8Array(n);await u.ready,await u.write(t),p()||dn({type:"ack",messageId:o},e)}"close"==r&&function(t){p()||(l(t),m(),d())}(i)}}catch(a){p()||(cn(e),h(a))}function h(t){p()||(f(t),m(),Zt(t)&&t.codecImportFailed||d())}function m(){u&&u.releaseLock()}}(t,r)}),a.addEventListener(tn,t=>fn(t,r)),a.addEventListener("messageerror",t=>fn(t,r)),a}function ln(t){const{j:e}=t;e&&(clearTimeout(e),t.j=null)}function fn(t,e){t.preventDefault&&t.preventDefault(),ln(e);const{M:r,_:n,writer:o,C:i}=e;cn(e),r||(e.I=null);let a=t.error||new Error(t.message||tn);r||(a=Object.assign(new Error(a.message||tn),{B:!0}),e.P=a),n&&(n(a),o&&o.releaseLock(),r&&i())}function dn(t,{I:e,writer:r,transferStreams:n,M:o}){try{const{value:r,readable:i,writable:a}=t,s=[];if(r&&(t.value=Lt(r),s.push(t.value.buffer)),n&&on&&o?(i&&s.push(i),a&&s.push(a)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{on=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}an=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:i}=e;if(!t.T){let a;typeof i==C&&(i=i());try{a=un(t.workerURI,r,t)}catch{return Yr(t),$r(t,e)}Object.assign(t,{I:a,M:!1,v:!1,P:null,T:{run:async()=>{try{return await async function(t,e){if(!t.I){const{P:e}=t;t.P=null;const r=e||new Error(Pr);throw r.B=!0,r}let r,n;const o=new Promise((e,o)=>{r=e,n=e=>{const{outputSize:r,O:n}=t;if(n.outputSize=r,Zt(e))try{e.outputSize=r}catch{}o(e)}});Object.assign(t,{reader:null,writer:null,outputSize:0,L:!1,W:null,N:r,_:n,result:o});const{readable:i,options:a}=t,{writable:s,closed:c,Z:u}=function(t,e){const r=new AbortController;let n;const{writable:o,readable:i}=new TransformStream({transform(t,r){e.outputSize+=t.length,r.enqueue(t)}}),a=i.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});return a.catch(t=>{n||Object.assign(e,{L:!0,W:t})}),{writable:o,closed:a,Z:()=>{n=!0,r.abort()}}}(t.writable,t);let l;try{l=dn({type:"start",options:a,config:e,readable:i,writable:s},t)}catch(e){u();try{await c}catch{}throw t.C(),e}l||Object.assign(t,{reader:i.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t.M&&Number.isFinite(f)&&f>=0&&(t.j=setTimeout(()=>function(t){if(t.j=null,t.M)return;const{_:e,writer:r}=t;if(cn(t),t.I=null,e){const t=new Error(Pr);t.B=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await d(),await c,t}catch(e){await d(),u();try{await c}catch{}const{outputSize:r,O:n,L:o,W:i}=t;n.outputSize=r;const a=Zt(e)&&(e.codecImportFailed||e.B),s=o&&!a?i:e;if(Zt(s))try{s.outputSize=r}catch{}throw s}async function d(){if(!l&&!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:i,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.B)return Yr(t),sn(t),Jr(t,e);if(r&&r.codecImportFailed){if(t.reader)return sn(t),Jr(t,e);t.C()}throw r}}}})}return t.T},Zr=an;let wn=[];const pn=[];let hn,mn,yn=0;async function bn(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:f,codecURI:d}=r,{workerURI:w,createWorker:p,maxWorkers:h}=n;f&&(d&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(d,n.baseURI)),await async function(t,e){!sr.has(t)&&e&&wr(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===I&&n.transferStreams);const m=!(s||c||u||l),y=f===I||Boolean(r.codecURI);return e.useWebWorkers=!m&&y&&(i||i===I&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:I,e.createWorker=e.useWebWorkers&&p?p:I,r.useCompressionStream=a||a===I&&n.useCompressionStream,(await async function(){const r=wn.find(t=>!t.D);if(r)return Dn(r),new qr(r,t,e,b);if(wn.length<h){const r={V:yn};return yn++,wn.push(r),new qr(r,t,e,b)}return new Promise(r=>{pn.push({resolve:r,stream:t,O:e}),mn=n.workerStarvationTimeout,En()})}()).run();function b(t){if(Sn(),t.v)return t.v=!1,An();if(pn.length){const[{resolve:e,stream:r,O:n}]=pn.splice(0,1);e(new qr(t,r,n,b)),En()}else t.I?(Dn(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.H=setTimeout(async()=>{wn=wn.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):wn=wn.filter(e=>e!=t)}}function En(){!hn&&pn.length&&Number.isFinite(mn)&&mn>=0&&(hn=setTimeout(gn,mn))}function Sn(){hn&&(clearTimeout(hn),hn=null)}function gn(){if(hn=null,pn.length){const[{resolve:t,stream:e,O:r}]=pn.splice(0,1);t(new qr({},e,Rn(r),zn)),En()}}function An(){const t=pn.splice(0).map(({resolve:t,stream:e,O:r})=>new Promise(n=>{t(new qr({},e,Rn(r),()=>{zn(),n()}))}));return Sn(),Promise.all(t)}function Rn(t){return Object.assign({},t,{useWebWorkers:!1,workerURI:I,createWorker:I})}function zn(){Sn(),En()}function Dn(t){const{H:e}=t;e&&(clearTimeout(e),t.H=null)}const xn="\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 Fn(t,e){return In(t,e,!0)}function On(t){if(!t.some(t=>t>127))return!1;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function In(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=xn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const Un="HTTP error ",Tn="HTTP Range not supported",Cn="HTTP resource changed",kn="Writer iterator completed too soon",vn="Writer not initialized",Mn="Invalid writer (size must be writable)",Nn="Content-Range",_n="Range",jn="GET",Bn="bytes",Pn=16777216,Ln="writable",Wn=Symbol();class Zn{constructor(){this.size=0}init(){this.initialized=!0}}class Vn extends Zn{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=Ct(Tt())}={}){const n=this;let o=0;return r=kt(r),new ReadableStream({async pull(i){const a=e===I?r:Math.min(r,e-o),s=await To(n,t+o,a);s.length&&(i.enqueue(s),o+=s.length),(e!==I&&o>=e||!s.length&&a)&&i.close()}})}}class Hn extends Zn{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(vn);return t.writeUint8Array(Lt(e))}});Object.defineProperty(t,Ln,{get:()=>e})}writeUint8Array(){}}class Gn extends Vn{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{G:t,Y:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{Y:r,G:n}=this,o=new Uint8Array(e),i=4*Math.floor(t/3),a=atob(n.substring(i+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(i/4);let c=0;for(let t=s;t<s+e&&t<a.length;t++)o[t-s]=a.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class Yn extends Hn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",K:""})}writeUint8Array(t){const e=this;let r,n=e.K;const o=e.K.length;for(e.K="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.K+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.K=n+e.K}getData(){return this.data+btoa(this.K)}}let qn,Kn;class Xn extends Vn{constructor(t){super(),Object.assign(this,{X:t,size:t.size}),Kn||(Kn=(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();qn=1==e}catch{qn=!1}})())}createReadable(t){const{X:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};if(typeof e.stream==C){if(!n&&o>=r)return Je(e.stream());if(qn)return Je(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.X:r.X.slice(t,n);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,n)),new Uint8Array(i)}}class $n extends Zn{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,Ln,{get:()=>r.writable}),e.contentType=t,e.$=Qe(r.readable,t),e.$.catch(()=>{})}getData(){return this.$}}class Jn extends Xn{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function Qn(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 to extends $n{constructor(t){super(),Object.assign(this,{encoding:t,J:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,J:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return In(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class eo extends Vn{constructor(t,e){super(),no(this,t,e)}async init(){await oo(this,bo,po),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o,et:i}=e;if((r||n)&&o!==I){const{offset:r=0,size:n=o-r}=t||{},a=i&&r>=o-i.length;if(n>0&&r<o&&!a)return function(t,e,r){let n,o=e,i=0,a=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(Tn);const o=e.length>i?e.subarray(0,i):e;i-=o.length,a-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=n;n=I,await t.cancel()}(),a||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,a),r=await bo(jn,t,fo(t,o,e));if(206!=r.status)throw new Error(Tn);const s=ao(r);if(s!==I&&s!=o)throw new Error(Tn);lo(t,r),uo(t,r),o+=e,i=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return io(this,t,e,bo,po)}}class ro extends Vn{constructor(t,e){super(),no(this,t,e)}async init(){await oo(this,Eo,ho),super.init()}readUint8Array(t,e){return io(this,t,e,Eo,ho)}}function no(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:i,combineSizeEocd:a,checkResourceChanges:s=!0,maximumRangeSize:c=Pn,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:i,combineSizeEocd:a,checkResourceChanges:s,maximumRangeSize:c,fetch:u})}async function oo(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Tt(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(i||a)&&(typeof o==T||o)){const n=await e(jn,t,fo(t,s?-65557:void 0)),o=n.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==Bn))throw new Error(Tn);{let o;s&&206==n.status&&(o=new Uint8Array(await n.arrayBuffer())),uo(t,n);const i=so(n);i===I?await yo(t,e,r):t.size=i,o&&o.length&&ao(n)===t.size-o.length&&(t.et=o)}}else await yo(t,e,r)}async function io(t,e,r,n,o){const{useRangeHeader:i,forceRangeRequests:a,et:s,size:c,options:u}=t;if(i||a){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(jn,t,fo(t,e,r));if(206!=o.status)throw new Error(Tn);const i=ao(o);if(i!==I&&i!=e)throw new Error(Tn);lo(t,o),uo(t,o);const a=new Uint8Array(await o.arrayBuffer());if(a.length!=r)throw new Error(Tn);return a}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function ao(t){const e=t.headers.get(Nn);if(e){const t=Number(e.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t))return t}}function so(t){const e=t.headers.get(Nn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function co({headers:t}){return{nt:t.get("Etag")||I,lastModified:t.get("Last-Modified")||I}}function uo(t,e){const{checkResourceChanges:r,ot:n}=t;r&&!n&&206==e.status&&(t.ot=co(e))}function lo(t,e){const{checkResourceChanges:r,ot:n,size:o}=t;if(r){const t=so(e);if(t!==I&&o!==I&&t!=o)throw new Error(Cn);if(n){const t=co(e);if(Object.entries(n).some(([e,r])=>r!==I&&t[e]!==I&&r!=t[e]))throw new Error(Cn)}}}function fo(t,e=0,r=1){return Object.assign({},wo(t),{[_n]:Bn+"="+(e<0?e:e+"-"+(e+r-1))})}function wo({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function po(t){await mo(t,bo)}async function ho(t){await mo(t,Eo)}async function mo(t,e){const r=await e(jn,t,wo(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function yo(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,wo(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function bo(t,{fetch:e=fetch,options:r,url:n},o){const i=await e(n,Object.assign({},r,{method:t,headers:o}));if(i.status>=200&&i.status<=299)return i;throw 416==i.status?new Error(Tn):new Error(Un+(i.statusText||i.status))}function Eo(t,{url:e},r){return new Promise((n,o)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",()=>{if(i.status>=200&&i.status<=299){const t=[];i.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:i.status,arrayBuffer:()=>i.response,headers:new Map(t)})}else o(416==i.status?new Error(Tn):new Error(Un+(i.statusText||i.status)))},!1),i.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),i.open(t,e),r)for(const t of Object.entries(r))i.setRequestHeader(t[0],t[1]);i.responseType="arraybuffer",i.send()})}class So extends Vn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new ro(t,e):new eo(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 go extends So{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class Ao extends Vn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{it:t,size:t.length})}readUint8Array(t,e){return this.it.slice(t,t+e)}}class Ro extends Hn{constructor(t){super(),this.st=t||262144}init(t=0){Object.assign(this,{offset:0,it:new Uint8Array(t>0?t:this.st)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.it.length){let t=e.it.length?2*e.it.length:e.st;for(;t<r;)t*=2;const n=e.it;e.it=new Uint8Array(t),e.it.set(n)}e.it.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.it.length?this.it:this.it.slice(0,this.offset)}}class zo extends Vn{constructor(t){super(),this.ct=t}async init(){const t=this;t.ut=0;const e=t.ct=await Promise.all(t.ct.map(Uo));t.lt=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}ft(t){const{lt:e,size:r}=this,n=e[t];return n===I?r:n}async readUint8Array(t,e){const r=this,{ct:n}=this;let o,i=0,a=t;for(;n[i]&&a>=n[i].size;)a-=n[i].size,i++;const s=n[i];if(s){const n=s.size;if(a+e<=n)o=await To(s,a,e);else{const i=n-a;o=Pt(await To(s,a,i),await r.readUint8Array(t+i,e-i))}}else o=N;return r.ut=Math.max(i,r.ut),o}}class Do extends Zn{constructor(t,e=4294967295){super();const r=this;let n,o,i;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const a=new WritableStream({async write(e){if(e===Wn)return void(i&&await c());const{availableSize:a}=r;if(i)e.length>=a?(await s(e.subarray(0,a)),await c(),e.length>a&&await this.write(e.subarray(a))):await s(e);else{const{value:a,done:s}=await t.next();if(s&&!a)throw new Error(kn);n=a,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await Io(n),o=a.writable,i=o.getWriter(),await this.write(e)}},async close(){i&&(await i.ready,await u())},async abort(t){i&&await i.abort(t)}});async function s(t){const e=t.length;e&&(await i.ready,await i.write(t),n.size+=e,r.availableSize-=e)}async function c(){await u(),r.diskOffset+=n.size,r.diskNumber++,i=null,r.availableSize=r.maxSize}async function u(){await i.close()}Object.defineProperty(r,Ln,{get:()=>a})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Wn)}finally{t.releaseLock()}}}class xo{constructor(t){return Array.isArray(t)&&(t=new zo(t)),(t instanceof ReadableStream||typeof t.getReader==C)&&(t={readable:Je(t)}),t}}class Fo{constructor(t){t.writable===I&&typeof t.next==C&&(t=new Do(t)),(t instanceof WritableStream||typeof t.getWriter==C)&&(t={writable:tr(t)});try{t.size=t.size===I?0:t.size}catch{throw new Error(Mn)}return t}}function Oo(t){return Boolean(t&&t.getData)}async function Io(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function Uo(t){return t=new xo(t),await Io(t),t.size!==I&&t.readUint8Array||(t=new Xn(await Qe(t.readable)),await Io(t)),t}function To(t,e,r){return t.readUint8Array(e,r)}function Co(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Vn.prototype.createReadable.call(t,e):t.readable}function ko(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==I&&(n.filename=r),t.push(n)}}const vo="filename",Mo="rawFilename",No="comment",_o="rawComment",jo="uncompressedSize",Bo="compressedSize",Po="offset",Lo="diskNumberStart",Wo="lastModDate",Zo="rawLastModDate",Vo="lastAccessDate",Ho="rawLastAccessDate",Go="creationDate",Yo="rawCreationDate",qo="internalFileAttributes",Ko="externalFileAttributes",Xo="msdosAttributesRaw",$o="msdosAttributes",Jo="msDosCompatible",Qo="zip64",ti="encrypted",ei="version",ri="versionMadeBy",ni="zipCrypto",oi="directory",ii="executable",ai="compressionMethod",si="signature",ci="extraField",ui="unixMode",li="setuid",fi="setgid",di="sticky",wi=[vo,Mo,jo,Bo,Wo,Zo,No,_o,Vo,Ho,Go,Yo,Po,Lo,qo,Ko,Xo,$o,Jo,Qo,ti,ei,ri,ni,oi,ii,"symlink",ai,si,"crc32",ci,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",ui,"unixExternalUpper",li,fi,di,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class pi{constructor(t){wi.forEach(e=>this[e]=t[e])}}const hi=new Set([1,h,10,m,28789,25461,y,b,E,22613,13]);function mi(t,e,r){return t?e?12:16+4*r:0}const yi="File format is not recognized",bi="End of central directory not found",Ei="End of Zip64 central directory locator not found",Si="Central directory header not found",gi="Local file header not found",Ai="Zip64 extra field not found",Ri="File contains encrypted entry",zi="Encryption method not supported",Di="Split zip file",xi="Overlapping entry found",Fi="Entry data out of bounds",Oi="Ambiguous archive",Ii="Encrypted central directory is not supported",Ui="Unsafe filename",Ti="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Ci="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",ki="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",vi="64-bit value exceeds Number.MAX_SAFE_INTEGER",Mi="unsorted central directory",Ni="unknown version needed to extract",_i="compressed patched data",ji="malformed extra field",Bi="unknown zip64 extensible data",Pi="wrapped entries count",Li="appended data",Wi="prepended data",Zi="prepended central directory",Vi="trailing central directory data",Hi="duplicate filename",Gi="mismatched zip64 end of central directory record",Yi="multiple end of central directory records",qi="mismatched local file header (filename)",Ki="mismatched local file header (general purpose bit flag)",Xi="mismatched local file header (compression method)",$i="mismatched local file header (crc32 or sizes)",Ji=/^[a-zA-Z]:/,Qi=/(^|[\\/])\.\.([\\/]|$)/,ta="utf-8",ea="cp437",ra=[[jo,t],[Bo,t],[Po,t],[Lo,e]],na={[e]:{wt:Pa,bytes:4},[t]:{wt:La,bytes:8}},oa=BigInt(Number.MAX_SAFE_INTEGER);class ia{constructor(t,e={}){Object.assign(this,{reader:new xo(t),options:e,ht:{yt:new Set,bt:[],Et:[]}})}async*getEntriesGenerator(n={}){const i=this;let{reader:a}=i;if(await Io(a),a.size!==I&&a.readUint8Array||(a=new Xn(await Qe(a.readable)),await Io(a)),a.size<d)throw new Error(yi);const c=i.warnings=[],h=Ra(n,i.options),m=h==rt,y=h!=ot,b=xa(va(i,n,$),h),E=function(t,e){if(t===I)return e;if(!Aa(t))throw new Error(Ci);return t}(va(i,n,"filenameValidation"),h),S=va(i,n,"normalizeFilename"),{St:x,gt:F}=await Fa(a,y,b);if(!x)throw await async function(t){return await ga(t)==o}(a)?new Error(Di):new Error(bi);y&&F>1&&ka(Yi);const O=Wt(x);let U=Pa(O,12),T=Pa(O,16);const C=x.offset,k=Ba(O,20),v=C+d+k,M=a.size-v;M>b&&ka(Li),M>0&&ko(c,Li);let _=Ba(O,4);const j=a.ut||0;let B,P,L,W,Z,V=Ba(O,6),H=Ba(O,10),G=0,Y=p;const q=T==t||U==t||H==e||V==e;if(T!=t&&V!=e&&(T+=Sa(a,V)),q){const r=x.offset>=w?await To(a,x.offset-w,w):N,n=Wt(r);if(r.length==w&&Pa(n,0)==l){T=Sa(a,Pa(n,4))+La(n,8);let r=await To(a,T,p),o=Wt(r);const i=x.offset-w-p;if((r.length<p||Pa(o,0)!=u)&&T!=i&&i>=0){const t=T;T=i,T>t&&(G=T-t),r=await To(a,T,p),o=Wt(r)}if(r.length<p||Pa(o,0)!=u)throw new Error(Ei);if(L=!0,W=La(o,4)>44,W){const t=Math.min(La(o,4)-44,a.size-T-p);t>0&&(Y+=t,Z=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Wt(t),n=Ba(r,26);Object.assign(e,{compressionMethod:Ba(r,0),compressedSize:La(r,2),uncompressedSize:La(r,10),encryptionAlgorithm:Ba(r,18),bitLength:Ba(r,20),flags:Ba(r,22),hashAlgorithm:Ba(r,24),hashData:t.subarray(28,28+n)})}return e}(await To(a,T+p,t)))}_==e?_=Pa(o,16):_!=Pa(o,16)&&Ca(m,c,Gi),V==e?V=Pa(o,20):V!=Pa(o,20)&&Ca(m,c,Gi),H==e?H=La(o,32):H!=La(o,32)&&Ca(m,c,Gi),U==t?U=La(o,40):U!=La(o,40)&&Ca(m,c,Gi),T=Sa(a,V)+La(o,48)+G}}let K=U;const X=x.offset-(L?Y+w:0);if(T>=a.size&&(G=a.size-T-U-d,T=a.size-U-d),j!=_)throw new Error(Di);if(T<0)throw new Error(yi);let J=0,Q=await To(a,T,U),nt=Wt(Q);if(U){if(Q.length<4)throw new Error(yi);const t=X-U;if(T!=t&&V==_){const e=Pa(nt,J)==s||Boolean(Z&&Z.compressedSize)||ua(nt);let r=!e;if(!r&&t>=0&&t+4<=a.size&&(r=Pa(Wt(await To(a,t,4)),0)==s),r){const r=T;T=t,T>r&&(G+=T-r,B=e),Q=await To(a,T,U),nt=Wt(Q)}}}const it=X-T;if(U!=it&&it>=0&&V==_&&(U=it,Q=await To(a,T,U),nt=Wt(Q)),T<0||T>=a.size)throw new Error(yi);i.directoryOffset=T,i.directoryLength=K;const at=Ma(i,n,"decryptCentralDirectory");let st,ct;if(at&&H&&Q.length>=4&&Pa(nt,0)!=s&&(W||ua(nt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(Z,K,Q.length);ct=Q.subarray(t),Q=await at(Q.subarray(0,t),Z),nt=Wt(Q),K=Q.length,st=!0}Z&&!st&&(Q.length<4||Pa(nt,0)==s)&&ko(c,Bi),P=T;const ut=va(i,n,"filenameEncoding"),lt=va(i,n,"commentEncoding"),ft=new Set;let dt,wt=-1;const pt=!m&&!L;!H&&pt&&(H=la(nt,Q,J),H&&ko(c,Pi));for(let t=0;t<H;t++){const o=new ca(a,i.options);if(J+f>Q.length||Pa(nt,J)!=s){if(0==t&&!st&&(W||ua(nt)))throw new Error(Ii);throw new Error(Si)}da(o,nt,J+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=J+f,d=l+o.filenameLength+o.extraFieldLength,w=Ba(nt,J+4),p=!(w>>8),h=w>>8==3,m=Ba(nt,J+32),y=d+m,b=new Uint8Array(Q.subarray(l,y)),x=b.subarray(0,o.filenameLength),F=b.subarray(o.filenameLength+o.extraFieldLength),O=u||!ut&&On(x),U=u||!lt&&On(F),T=Pa(nt,J+38),C=T&r,k={readOnly:Boolean(1&C),hidden:Boolean(2&C),system:Boolean(4&C),directory:Boolean(16&C),archive:Boolean(32&C)},v=Pa(nt,J+42),M=Ma(i,n,"decodeText")||Fn,N=O?ta:ut||ea,_=U?ta:lt||ea;let j=M(x,N,tt);if(j===I&&(j=Fn(x,N)),S){const t=S(j);t!==I&&(j=t)}if(Da(j,E)){const t=new Error(Ui);throw t.filename=j,t}let B=M(F,_,et);B===I&&(B=Fn(F,_)),Object.assign(o,{index:t,At:st,versionMadeBy:w,msDosCompatible:p,zip64:!1,compressedSize:0,uncompressedSize:0,Rt:m,offset:v,diskNumberStart:Ba(nt,J+34),internalFileAttributes:Ba(nt,J+36),externalFileAttributes:T,msdosAttributesRaw:C,msdosAttributes:k,rawFilename:x,filenameUTF8:O,commentUTF8:U,rawExtraField:b.subarray(o.filenameLength,o.filenameLength+o.extraFieldLength),rawComment:F,filename:j,comment:B}),wa(o,o,nt,J+6)&&ko(c,ji,j),o.offset+=G;const L=Sa(a,o.diskNumberStart)+o.offset;P=Math.min(L,P),L<wt&&ko(c,Mi,j),wt=L,(o.version&r)>63&&ko(c,Ni,j),32&~o.rawBitFlag||ko(c,_i,j),ft.has(o.filename)&&(dt=!0),ft.add(o.filename);const Z=o.externalFileAttributes>>16&e;o.unixMode===I&&16877&Z&&(o.unixMode=Z);const V=Boolean(o.unixMode&R),Y=Boolean(o.unixMode&z),q=Boolean(512&o.unixMode),K=40960==((o.unixMode===I?Z:o.unixMode)&g),X=!K&&(o.unixMode!==I?!!(73&o.unixMode):h&&!!(73&Z)),$=o.unixMode!==I&&(o.unixMode&g)==A,rt=(Z&g)==A;Object.assign(o,{setuid:V,setgid:Y,sticky:q,symlink:K,unixExternalUpper:Z,executable:X,directory:$||rt||p&&k.directory||o.filename.endsWith(D),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new pi(o);if(ot.getData=(t,e)=>o.getData(t,ot,i.ht,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=Qe(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,i.ht,Object.assign({},t,{preventClose:!1})),r},J=y,t==H-1&&pt){const t=la(nt,Q,J);t&&(H+=t,ko(c,Pi))}const{onprogress:it}=n;if(it)try{await it(t+1,H,new pi(o))}catch{}yield ot}let ht=J,mt=fa(Q.subarray(J))||(st?fa(ct):I);if(!mt&&!st){const t=T+J,e=Math.min(X-t,65541);e>=6&&(mt=fa(await To(a,t,e)))}mt&&(i.digitalSignature=mt,ht=J+6+mt.length),(J!=K&&ht!=K||!st&&J!=U&&ht!=U)&&Ca(m,c,Vi),dt&&Ca(m,c,Hi);const yt=va(i,n,"extractPrependedData"),bt=va(i,n,"extractAppendedData"),Et=(m||yt)&&H&&4==P&&await async function(t){const e=await ga(t);return e==o||808471376==e}(a)?4:0;return m&&(G||H&&P>Et)&&ka(Wi),(G||H&&P>4)&&ko(c,Wi),B&&ko(c,Zi),yt&&(i.prependedData=P>Et?await To(a,Et,P-Et):N),i.comment=k?await To(a,C+d,k):N,bt&&(i.appendedData=v<a.size?await To(a,v,a.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 aa{constructor(t={}){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}}),o=new ia(r,t),i=o.getEntriesGenerator(),a=new Set;this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await i.next();if(e)return t.close();const n=function(t,e){const{readable:r,writable:n}=new TransformStream;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):r.cancel(t))}};return i.readable=new ReadableStream({async pull(a){o||(o=r.getReader(),e.add(i),async function(){try{await t.getData(n,{preventClose:!1})}catch(t){try{await n.abort(t)}catch{}}finally{e.delete(i)}}());const{done:s,value:c}=await o.read();s?a.close():a.enqueue(c)},cancel:t=>i.cancel(t)},{highWaterMark:0}),i}(r,a),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(a);a.clear(),e.error(t),await Promise.allSettled(r.map(e=>e.cancel(t))),await Promise.allSettled([i.return(),o.close()])}}),this.writable=n}}async function sa(t,e={}){if(t=new xo(t),await Io(t),t.size!==I&&t.readUint8Array||(t=new Xn(await Qe(t.readable)),await Io(t)),t.size<d)return!1;const r=Ra(e,{}),n=r!=ot,o=xa(e[$],r),{St:i,gt:a}=await Fa(t,n,o);if(!i||r==rt&&a>1)return!1;const s=Ba(Wt(i),20),c=i.offset+d+s;return t.size-c<=o}let ca=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,a={}){const s=this,c=Tt(),{reader:u,index:l,offset:f,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:b,rawLastModDate:E,uncompressedSize:S,compressedSize:g}=s,{dataDescriptor:A}=m,R=e.localDirectory={},z=e.warnings=[],D=Sa(u,d)+f,F=await To(u,D,x),O=Wt(F);let U=va(s,a,j),T=va(s,a,B);const C=ht(va(s,a,P)),k=Boolean(C),v=!0===C;if(pt(U,T),U=U&&U.length&&U,T=T&&T.length&&T,w&&99!=w.originalCompressionMethod)throw new Error(or);if(F.length<x||Pa(O,0)!=n)throw new Error(gi);da(R,O,4);const{extraFieldLength:M,filenameLength:_}=R,G=R.dataOffset=D+x+_+M,Y=va(s,a,"checkLocalDirectory"),q=Ra(a,s.options),K=function(t,e){return t===I?e!=ot:Boolean(t)}(Y,q),X=va(s,a,"checkLocalFilename"),$=function(t,e){return t===I?e==rt:Boolean(t)}(X===I?Y:X,q);let J=N;if($&&(_||M)){const t=await To(u,D+x,_+M);J=t.subarray(0,_),R.rawExtraField=t.subarray(_)}else R.rawExtraField=M?await To(u,D+x+_,M):N;$&&(R.rawFilename=J),wa(s,R,O,4,!0)&&ko(z,ji),function(t,e,r,n,o){const{rawFilename:i}=t,a=!o,s=t.At&&!(8192&~e.rawBitFlag);!n||s||r.length==i.length&&!r.some((t,e)=>t!=i[e])||Ca(a,o,qi),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&Ca(a,o,Ki),e.compressionMethod!=t.compressionMethod&&Ca(a,o,Xi),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Ca(a,o,$i)}(s,R,J,$,K?I:z);const{lastAccessDate:Q,creationDate:tt,uid:et,gid:nt}=R;Q&&(e.lastAccessDate=Q),tt&&(e.creationDate=tt),et!==I&&e.uid===I&&(e.uid=et),nt!==I&&e.gid===I&&(e.gid=nt);const it=va(s,a,"checkPasswordOnly"),at=s.encrypted&&R.encrypted&&(!v||it),st=at&&!w;if(v||(e.zipCrypto=st),at&&!(64&~R.rawBitFlag))throw new Error(zi);const ct=k?I:lr(h);if(0!=h&&8!=h&&9!=h&&!ct&&!k)throw new Error(or);if(at){if(!st&&(w.strength<1||w.strength>3))throw new Error(zi);if(!U&&!T)throw new Error(Ri)}if(G+g>u.size)throw new Error(Fi);const ut=g,lt=dt(va(s,a,L));wt(lt);let ft=va(s,a,"checkOverlappingEntry");const mt=va(s,a,"checkOverlappingEntryOnly");mt&&(ft=!0);const{onstart:yt,onprogress:bt,onend:Et}=a,St=0!=h&&!k,gt=k?g-mi(at,st,w&&w.strength):S,At=9==h;let Rt=va(s,a,Z);At&&(Rt=!1);const zt=va(s,a,"checkCrc32"),Dt=(zt===I?va(s,a,"checkSignature"):zt)&&!k&&(!at||st||w&&1==w.vendorVersion),xt={options:{codecType:_r,password:U,rawPassword:T,zipCrypto:st,encryptionStrength:w&&w.strength,checkCrc32:Dt,checkAuthenticationCode:va(s,a,"checkAuthenticationCode"),passwordVerification:st&&(A?E>>>8&r:b>>>24&r),outputSize:gt,crc32:b,compressed:St,encrypted:at,useWebWorkers:va(s,a,W),useCompressionStream:Rt,transferStreams:va(s,a,V),deflate64:At,format:ct?ct.format:I,codecURI:ct?ct.codecURI:I,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:it},config:c,R:{signal:lt,size:ut,onstart:yt,onprogress:bt,onend:Et}};let Ft,Ot,It;ft&&await async function({reader:t,zt:e,index:r,offset:n,crc32:o,compressedSize:a,uncompressedSize:s,dataOffset:c,dataDescriptor:u,extraFieldZip64:l,ht:f}){let d=0;if(u&&(d=l?20:12),d){const r=await To(t,c+a,d+4),n=Wt(r);let u=r.length==d+4&&Pa(n,0)==i;if(u){const t=Ea(n,4,l);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==a&&t.uncompressedSize==s?d+=4:u=!1}if(r.length>=d){const t=Ea(n,u?4:0,l);t.signature=u,e.localDirectory.dataDescriptor=t}}const w={start:n,end:c+a+d,zt:e},{yt:p,bt:h,Et:m}=f;if(!p.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],i=t[r];return o&&ba(e,o)?o:i&&ba(e,i)?i:void 0}(h,w)||m.find(t=>ba(w,t));if(t){const e=new Error(xi);throw e.overlappingEntry=t.zt,e}p.add(r),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),f.bt=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}(h,m),m.length=0)}}({reader:u,zt:e,index:l,offset:D,crc32:b,compressedSize:g,uncompressedSize:S,dataOffset:G,dataDescriptor:A||R.bitFlag.dataDescriptor,extraFieldZip64:p||R.extraFieldZip64,ht:o});try{if(!mt){it&&(t=new WritableStream),t=new Fo(t),await Io(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(gt,g,St)),({writable:Ft}=t);const e=Je(u.createReadable({offset:G,size:ut})),{outputSize:r}=await bn({readable:e,writable:Ft},xt);if(r!=gt)throw Object.assign(new Error(pr),{outputSize:r});t.size+=r}}catch(e){const{outputSize:r}=xt;if(r!==I?t.size+=r:Zt(e)&&e.outputSize!==I&&(t.size+=e.outputSize),!it||!Zt(e)||e.message!=ge)throw Ot=e,It=!0,e}finally{if((Oo(t)||!va(s,a,H))&&Ft&&!Ft.locked){const t=Ft.getWriter();if(It)try{await t.abort(Ot)}catch{}else await t.close()}}return it||mt?I:t.getData?t.getData():Ft}};function ua(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==Pa(t,r))return!0;return!1}function la(t,e,r){let n=0;for(;r+f<=e.length&&Pa(t,r)==s;)r+=f+Ba(t,r+28)+Ba(t,r+30)+Ba(t,r+32),n++;return n%65536?0:n}function fa(t){if(t.length>=6){const e=Wt(t);if(Pa(e,0)==a){const r=Ba(e,4);if(6+r<=t.length)return new Uint8Array(t.subarray(6,6+r))}}}function da(t,e,r){const n=t.rawBitFlag=Ba(e,r+2),o=!(1&~n),i=Pa(e,r+6);Object.assign(t,{encrypted:o,version:Ba(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:i,lastModDate:Na(i),filenameLength:Ba(e,r+22),extraFieldLength:Ba(e,r+24)})}function wa(t,e,r,n,o){const{rawExtraField:i}=e,a=e.extraField=new Map,s=Wt(i);let c=0,u=!1;try{for(;c<i.length;){const t=Ba(s,c),e=Ba(s,c+2);a.set(t,{type:t,data:i.slice(c+4,c+4+e)}),c+=4+e}}catch{u=!0}c>i.length&&(u=!0);const l=Ba(r,n+4);Object.assign(e,{signature:Pa(r,n+10),crc32:Pa(r,n+10),compressedSize:Pa(r,n+14),uncompressedSize:Pa(r,n+18)});const f=a.get(1);f&&(function(t,e){e.zip64=!0;const r=Wt(t.data),n=ra.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+na[e].bytes,0);if(t.data.length<o)throw new Error(Ai);for(let o=0,i=0;o<n.length;o++){const[a,s]=n[o],c=na[s];e[a]=t[a]=c.wt(r,i),i+=c.bytes}}(f,e),e.extraFieldZip64=f);const d=a.get(28789);d&&(pa(d,vo,Mo,e,t),e.extraFieldUnicodePath=d);const w=a.get(25461);w&&(pa(w,No,_o,e,t),e.extraFieldUnicodeComment=w);const p=a.get(h);p&&p.data.length>=7?(function(t,e,r){const n=Wt(t.data),o=ja(n,4);Object.assign(t,{vendorVersion:ja(n,0),vendorId:ja(n,2),strength:o,originalCompressionMethod:r,compressionMethod:Ba(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=I)}(p,e,l),e.extraFieldAES=p):e.compressionMethod=l;const S=a.get(13);S&&(ha(S,e),e.extraFieldPkwareUnix=S);const g=a.get(22613);g&&(ha(g,e),e.extraFieldUnixType1=g);const A=a.get(10);A&&(function(t,e){const r=Wt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=Ba(r,o),i=Ba(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+i)),o+=4+i}}catch{}if(n&&24==n.length){const r=Wt(n),o=r.getBigUint64(0,!0),i=r.getBigUint64(8,!0),a=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:i,rawCreationDate:a});const s={lastModDate:_a(o),lastAccessDate:_a(i),creationDate:_a(a)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:i,rawCreationDate:a})}}(A,e),e.extraFieldNTFS=A);const R=a.get(E);let z;if(R&&(z=ma(R,e,!1),e.extraFieldUnix=R),!z){const t=a.get(b);t&&(ma(t,e,!0),e.extraFieldInfoZip=t)}const D=a.get(m);D&&(function(t,e,r){if(!t.data.length)return;const n=Wt(t.data),o=ja(n,0),i=[],a=[];r?(1&~o||(i.push(Wo),a.push(Zo)),2&~o||(i.push(Vo),a.push(Ho)),4&~o||(i.push(Go),a.push(Yo))):t.data.length>=5&&(i.push(Wo),a.push(Zo));let s=1;i.forEach((r,o)=>{if(t.data.length>=s+4){const i=Pa(n,s);e[r]=t[r]=new Date(1e3*(0|i));const c=a[o];t[c]=i}s+=4})}(D,e,o),e.extraFieldExtendedTimestamp=D);const x=a.get(y);return x&&(e.extraFieldUSDZ=x),u}function pa(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const i=Wt(t.data),a=new Qt;a.append(o[r]);const s=Wt(new Uint8Array(4));s.setUint32(0,a.get(),!0);const c=Pa(i,1),u=ja(i,0);Object.assign(t,{version:u,[e]:Fn(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==Pa(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function ha(t,e){if(t.data.length<8)return;const r=Wt(t.data),n={lastAccessDate:new Date(1e3*(0|Pa(r,0))),lastModDate:new Date(1e3*(0|Pa(r,4)))};t.data.length>=12&&(n.uid=Ba(r,8),n.gid=Ba(r,10)),Object.assign(t,n),Object.assign(e,n)}function ma(t,e,r){try{const n=Wt(t.data);let o,i;if(r){let e=0;const r=ja(n,e++),a=ja(n,e++);o=ya(t.data.subarray(e,e+a)),e+=a;const s=ja(n,e++);i=ya(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:i})}else t.data.length>=4&&(o=Ba(n,0),i=Ba(n,2),Object.assign(t,{uid:o,gid:i}));return o!==I&&(e.uid=o),i!==I&&(e.gid=i),o!==I||i!==I}catch{}}function ya(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function ba(t,e){return t.start<e.end&&e.start<t.end}function Ea(t,e,r){const n=Pa(t,e);let o,i;return r?(o=La(t,e+4),i=La(t,e+12)):(o=Pa(t,e+4),i=Pa(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:i}}function Sa(t,e){return t.ft?t.ft(e):0}async function ga(t){return Pa(Wt(await To(t,0,4)))}function Aa(t){return t===rt||t===nt||t===ot}function Ra(t,e){return za(t,za(e,nt))}function za(t,e){const r=t.strictness;if(r!==I){if(!Aa(r))throw new Error(Ti);return r}const n=t.checkAmbiguity;return n===I?e:n?rt:e==ot?ot:nt}function Da(t,e){if(e==ot)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(Qi.test(t)||t.startsWith("/")||t.startsWith("\\")||Ji.test(t))||e==rt&&(r.includes(".")||r.includes("")||t.includes("\0"))}function xa(t,r){if(t!==I){const e=bt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(ki);return e}return r==rt?0:r==ot?1/0:e}async function Fa(t,e,r){const{size:n}=t,o=Math.min(n,65557),i={count:64};let a,s,c=0;for await(const[r,u,l,f,w]of Oa(t,o)){const o=Ba(r,f+20);if(w+d+o==n){const o=await Ua(t,r,u,f,w,n,i);if(2==o){if(a||(a=Ia(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=Ia(l,f,w))}}return a||(a=s),a||(a=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let i,a;for await(const[e,s,c,u,l]of Oa(t,o)){const o=Ia(c,u,l);i||(i=o);const f=await Ua(t,e,s,u,l,n,r);if(2==f)return o;1!=f||a||(a=o)}return a||i}(t,r,i)),{St:a,gt:c}}async function*Oa(t,e){const r=t.size-e,n=await To(t,r,e),o=Wt(n);for(let t=n.length-d;t>=0;t--)Pa(o,t)==c&&(yield[o,r,n,t,r+t])}function Ia(t,e,r){return{offset:r,buffer:new Uint8Array(t.subarray(e,e+d)).buffer}}async function Ua(r,n,o,i,a,c,u){const f=Ba(n,i+10),d=Pa(n,i+12),p=Pa(n,i+16);if(f==e||d==t||p==t)return await Ta(r,n,o,a-w,c,u)==l?2:0;if(!f&&!d)return 1;const h=Ba(n,i+6);for(const t of[a-d,Sa(r,h)+p])if(await Ta(r,n,o,t,c,u)==s)return 2;return 0}async function Ta(t,e,r,n,o,i){return n<0||n+4>o?I:n>=r?Pa(e,n-r):i.count>0?(i.count--,Pa(Wt(await To(t,n,4)),0)):I}function Ca(t,e,r){t?ka(r):ko(e,r)}function ka(t){const e=new Error(Oi);throw e.reason=t,e}function va(t,e,r){return e[r]===I?t.options[r]:e[r]}function Ma(t,e,r){return ft(va(t,e,r))}function Na(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 _a(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function ja(t,e){return t.getUint8(e)}function Ba(t,e){return t.getUint16(e,!0)}function Pa(t,e){return t.getUint32(e,!0)}function La(t,e){const r=t.getBigUint64(e,!0);if(r>oa)throw new Error(vi);return Number(r)}var Wa=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Oi,ERR_BAD_FORMAT:yi,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Si,ERR_ENCRYPTED:Ri,ERR_ENCRYPTED_CENTRAL_DIRECTORY:Ii,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Fi,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Ei,ERR_EOCDR_NOT_FOUND:bi,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Ai,ERR_INVALID_AUTHENTICATION_CODE:Se,ERR_INVALID_COMPRESSED_DATA:hr,ERR_INVALID_CRC32:mr,ERR_INVALID_FILENAME_VALIDATION:Ci,ERR_INVALID_MAX_APPENDED_DATA_SIZE:ki,ERR_INVALID_PASSWORD:Ee,ERR_INVALID_STRICTNESS:Ti,ERR_INVALID_UNCOMPRESSED_SIZE:pr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:gi,ERR_OVERLAPPING_ENTRY:xi,ERR_SPLIT_ZIP_FILE:Di,ERR_UNSAFE_FILENAME:Ui,ERR_UNSUPPORTED_COMPRESSION:or,ERR_UNSUPPORTED_ENCRYPTION:zi,ERR_UNSUPPORTED_UINT64:vi,ERR_WORKER_STARTUP_TIMEOUT:Pr,WARNING_APPENDED_DATA:Li,WARNING_COMPRESSED_PATCHED_DATA:_i,WARNING_DUPLICATE_FILENAME:Hi,WARNING_MALFORMED_EXTRA_FIELD:ji,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:Ki,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:Xi,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:$i,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:qi,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:Gi,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:Yi,WARNING_PREPENDED_CENTRAL_DIRECTORY:Zi,WARNING_PREPENDED_DATA:Wi,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Vi,WARNING_UNKNOWN_VERSION:Ni,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Bi,WARNING_UNSORTED_CENTRAL_DIRECTORY:Mi,WARNING_WRAPPED_ENTRIES_COUNT:Pi,ZipReader:ia,ZipReaderStream:aa,isZipFile:sa});const Za="File already exists",Va="Zip file comment exceeds 64KB",Ha="Invalid zip file comment (must be a Uint8Array)",Ga="File entry comment exceeds 64KB",Ya="Invalid file entry comment (must be a string)",qa="Invalid date (must be a valid Date instance)",Ka="File entry name exceeds 64KB",Xa="Version exceeds 65535",$a="The strength must equal 1, 2, or 3",Ja="Encryption is not supported in USDZ files",Qa="Split zip files are not supported in USDZ files",ts="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",es="Invalid extra field (must be a Map)",rs="Invalid extra field type (must be integer 0..65535)",ns="Invalid extra field data (must be a Uint8Array)",os="Extra field data exceeds 64KB",is=-2147483648,as=2147483647,ss=BigInt(0),cs=BigInt("0x7fffffffffffffff"),us="Zip64 is not supported (set the 'zip64' option to 'true')",ls="Undefined uncompressed size",fs="Undefined compression method",ds="Undefined CRC32",ws="Undetermined size",ps="Undefined reader",hs="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",ms="Zip file not empty",ys="Invalid uid (must be integer 0..2^32-1)",bs="Invalid gid (must be integer 0..2^32-1)",Es="Invalid UNIX mode (must be integer 0..65535)",Ss="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",gs="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",As="Invalid msdosAttributesRaw (must be integer 0..255)",Rs="Invalid msdosAttributes (must be an object with boolean flags)",zs="Invalid level (must be integer 0..9)",Ds="Signature data exceeds 64KB",xs="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Fs="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",Os="compression unavailable",Is="clamped last modification date",Us=new Uint8Array([7,0,2,0,65,69,3,0,0]),Ts="infozip",Cs="unix",ks=[8,9,5,3];let vs=0;const Ms=[];class Ns{constructor(t,e={}){t=new Fo(t);const{availableSize:r=U,maxSize:n=U}=t,o=r>0&&r!==U&&n>0&&n!==U;if(o&&e[X])throw new Error(Qa);Object.assign(this,{writer:t,Dt:o,options:e,xt:new Map,Ft:new Set,offset:e[K]===I?t.size||t.writable.size||0:e[K],Ot:e[K]===I?0:e[K]-(t.size||t.writable.size||0),It:new Set,Ut:[],warnings:[],Tt:0,Ct:0,kt:I,vt:!1})}prependZip(t){return Ps(this,async function(t,e){if(t.Ft.size)throw new Error(ms);await t.Mt(e)}(this,t))}appendZip(t){return Ps(this,this.Mt(t))}async Mt(t){const e=this,{It:r,Ft:n,xt:i}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let a;const s=new Promise(t=>a=t);r.add(s);const c=[];let u;try{t=new xo(t),await Io(t),t.size!==I&&t.readUint8Array||(t=new Xn(await Qe(t.readable)),await Io(t));const{ZipReader:r}=await Promise.resolve().then(function(){return Wa}),a=new r(t),s=await a.getEntries();await a.close(),await Io(e.writer);const{directoryOffset:l}=a;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(Za);n.add(t),c.push(t)}),e.Nt=!0;const{_t:f}=e;e._t=new Promise(t=>u=()=>{e.Nt=!1,t()}),await f,e.Dt&&(delete e.Dt,await async function(t){return Wt(await To(t,0,4)).getUint32(0,!0)==o}(t)||(await fc(e.writer,uc()),e.offset+=4));const d=await async function(t,e,r,n){const{writer:o}=t,i=new Map;if(o.closeDisk){const a=Array.from(r).sort((t,r)=>cc(e,t)-cc(e,r));let s=0;for(const r of a){const n=cc(e,r);await ac(t,e,s,n-s),nc(o,await sc(e,n))&&await o.closeDisk(),i.set(r,{offset:oc(t,o),diskNumberStart:ec(o)}),s=n}await ac(t,e,s,n-s)}else{const o=t.offset;await ac(t,e,0,n),r.forEach(t=>i.set(t,{offset:o+cc(e,t),diskNumberStart:0}))}return i}(e,t,s,l);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:a,uncompressedSize:s,compressedSize:c,extraFieldZip64:u}=t;let{compressionMethod:l,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:h}=o;f=ic(f||N),t.extraFieldAES&&(l=99);const m=Fc(f),y=Boolean(u)&&u.uncompressedSize!==I,b=Boolean(u)&&u.compressedSize!==I,E=-7&Uc(w,p,h,a,l)|w<<1,{jt:S,Bt:g}=Oc({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,Pt:b,Lt:y,extraFieldLength:m}),{crc32:A}=t;A!==I&&zc(g,10,A);const{offset:R,diskNumberStart:z}=d.get(t);Object.assign(t,{Wt:!0,Lt:y,Pt:b,offset:R,diskNumberStart:z,Zt:!1,Vt:N,Ht:N,Gt:N,Yt:N,qt:N,rawExtraField:f,Kt:N,jt:S,Bt:g}),i.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{a(),r.delete(s),u&&u()}}add(e="",n,o={}){const i=this,{It:a}=i,s=async function(e,n,o,i){const a=(i=Object.assign({},i))[Q];if(a!==I){const{Xt:t,$t:r}=Zs(a,ht(mc(e,i,P)),mc(e,i,Wo));delete i[Q],i=Object.assign(t,r,i)}if(mc(e,i,oi)&&!n.endsWith(D)&&(n+=D),e.Ft.has(n))throw new Error(Za);e.Ft.add(n),vs<Tt().maxWorkers?vs++:await new Promise(t=>Ms.push(t));try{return await async function(e,n,o,i){const a=Vs(e,n,i);({name:n}=a);const s=Hs(e,n,i),{comment:c}=s,u=i[ci];e.xt.set(n,I);const l=e.kt,f={};let d,w;s.Jt.keepOrder&&(f.Qt=new Promise(t=>d=t)),e.kt=f;try{const{Jt:c}=s;0==c.level||c.compressionMethod!==I||c.te||await Hr(Tt())||(c.level=0,ko(e.warnings,Os,n));const u=await async function(t,e,{Jt:r},n){if(r.te&&!e&&!mc(t,n,oi))throw new Error(ps);let o;if(e){if(e=new xo(e),await Io(e),!e.readable&&!e.readUint8Array)throw new Error(hs);({size:o}=e)}return Object.assign({reader:e},Ys(t,Boolean(e),o,r,n))}(e,o,s,i);({reader:o}=u);const p=rc(e.writer),h=ec(e.writer);let m=i.crc32===I?i[si]:i.crc32;const y=u.Jt.encrypted&&!c.zipCrypto;if(c.te&&!c.ee&&y&&(m=I),c.te&&o&&!y&&m===I)throw new Error(ds);const b=Ks(i=Object.assign({},i,a.Jt,s.Jt,u.Jt,{signature:i[si],crc32:m,offset:e.offset-p,diskNumberStart:h,[X]:e.options[X]}));b.re&&ko(e.warnings,Is,n);const E=Js(i),S=Fc(b.ne,E.oe);w=await async function(e,n,o,i,a){const{xt:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,ie:f,signal:d}=a,{ae:w,zt:p,se:h,ce:m}=i,y=e.options[X];let b,E,S,g,A,R,z,D=p,F=0;const O=u&&h?h.Qt:I;s.set(n,D);try{a.bufferedWrite||!u||e.Nt||e.Tt||e.Ct||!l&&!f?(b=!0,e.Tt++,z=a.createTempStream?await a.createTempStream():new TransformStream(I,I,{highWaterMark:U}),z.size=0,await Io(c)):(E=!0,e.Ct++,z=c,await O,await T()),await Io(z);const p=rc(c);e.Dt&&!b&&await lc(e,c),y&&!b&&Xs(i,e.offset-p);const{ne:h}=w;b||await C();const m=ec(c),S=oc(e,c);if(D.diskNumberStart=m,b||(A=!0,R=c.size,await fc(z,h)),D=await async function(e,n,{diskNumberStart:o,Qt:i},a,s,c){const{ae:u,ue:l,le:f}=a,{jt:d,Bt:w,lastModDate:p,rawLastModDate:h,encrypted:m,compressed:y,version:b,compressionMethod:E,Vt:S,fe:g,Gt:A,de:R,we:z,Yt:D,qt:x,Ht:F}=u,{oe:O}=l,{rawFilename:U,lastAccessDate:T,creationDate:C,password:k,rawPassword:v,level:M,useUnicodeFileNames:N,zip64:_,Wt:j,Lt:B,Pt:P,zipCrypto:L,dataDescriptor:W,directory:Z,executable:V,versionMadeBy:H,rawComment:G,rawExtraField:Y,Kt:q,useWebWorkers:K,transferStreams:X,onstart:$,onprogress:J,onend:Q,signal:tt,encryptionStrength:et,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:it,uid:at,gid:st,unixMode:ct,symlink:ut,setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht,useCompressionStream:mt,te:yt,ee:bt,format:Et,codecURI:St}=c,gt={Qt:i,versionMadeBy:H,zip64:_,Wt:j,directory:Boolean(Z),executable:Boolean(V),filenameUTF8:Boolean(N),rawFilename:U,commentUTF8:Boolean(N),rawComment:G,Vt:S,fe:g,Gt:A,Yt:D,qt:x,Ht:F,rawExtraField:Y,Kt:q,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:it,diskNumberStart:o,uid:at,gid:st,unixMode:ct,symlink:Boolean(ut),setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht};let{crc32:At,uncompressedSize:Rt}=c,zt=0;yt||(Rt=0);const{writable:Dt}=n;if(e){const o=e.size,i=Je(Co(e,{size:o})),a={options:{codecType:Nr,inputSize:o,level:M,rawPassword:v,password:k,encryptionStrength:et,zipCrypto:m&&L,passwordVerification:m&&L&&h>>8&r,computeCrc32:!yt,compressed:y&&!yt,encrypted:m&&!bt,useWebWorkers:K,useCompressionStream:mt,transferStreams:X,format:Et,codecURI:St,compressionMethod:E},config:s,R:{signal:tt,size:o,onstart:$,onprogress:J,onend:Q}};try{const e=await bn({readable:i,writable:Dt},a);if(zt=e.outputSize,n.size+=zt,yt||(Rt=e.inputSize,m&&!L||(At=e.crc32)),!P&&zt>=t||!B&&Rt>=t)throw new Error(us)}catch(t){const{outputSize:e}=a;throw e!==I?n.size+=e:Zt(t)&&t.outputSize!==I&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,ae:n,ue:o},{zip64:i,zipCrypto:a,te:s,dataDescriptor:c}){const{Bt:u,encrypted:l}=n,{pe:f,he:d}=o;l&&!a&&!s||t===I||(zc(u,10,t),c&&zc(f,d,t)),i?c&&(Dc(f,d+4,BigInt(e)),Dc(f,d+12,BigInt(r))):(zc(u,14,e),zc(u,18,r),c&&(zc(f,d+4,e),zc(f,d+8,r)))}({crc32:At,compressedSize:zt,uncompressedSize:Rt,ae:u,ue:l},c),W&&await fc(n,O),Object.assign(gt,{uncompressedSize:Rt,compressedSize:zt,lastModDate:p,rawLastModDate:h,creationDate:C,lastAccessDate:T,encrypted:Boolean(m),zipCrypto:Boolean(L),size:f+zt,compressionMethod:E,version:b,jt:d,Bt:w,signature:At,crc32:!m||L||yt?At:I,de:R,we:z,Lt:B,Pt:P}),gt}(o,z,D,i,Tt(),a),b||(A=!1),s.set(n,D),D.filename=n,b){if(await Promise.all([z.writable.getWriter().close(),O]),await T(),e.Dt&&await lc(e,c),g=!0,R=c.size,await C(),D.diskNumberStart=ec(c),D.offset=oc(e,c),y){const t=i.le;Xs(i,e.offset-rc(c)),D.size+=i.le-t}!function({rawFilename:t,encrypted:e,zip64:r,fe:n,crc32:o,compressedSize:i,uncompressedSize:a,Lt:s,Pt:c},u,{dataDescriptor:l,te:f}){if(l||((!e||f&&o!==I)&&zc(u,14,o),c||zc(u,18,i),s||zc(u,22,a)),r&&n){const e=x+Fc(t)+4;Dc(u,e,BigInt(a)),Dc(u,e+8,BigInt(i))}}(D,w.me,a),await fc(c,w.ne),await dc(z.readable,c,d,t=>F+=t),c.size+=z.size,g=!1}else D.diskNumberStart=m,D.offset=S;return e.offset+=D.size,D}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.Tt--,E&&e.Ct--,m&&m(O),S&&S(),b&&z&&z.dispose)try{await z.dispose()}catch{}}async function T(){e.Nt=!0;const{_t:t}=e;e._t=new Promise(t=>S=()=>{e.Nt=!1,t()}),await t}async function C(){nc(c,Fc(w.ne))&&await c.closeDisk()}}(e,n,o,{ae:b,ue:E,le:S,zt:f,se:l,ce:d},i)}catch(t){throw e.xt.delete(n),t}finally{d&&d(l&&l.Qt)}return Object.assign(w,{name:n,comment:c,extraField:u}),new pi(w)}(e,n,o,i)}catch(t){throw e.Ft.delete(n),t}finally{const t=Ms.shift();t?t():vs--}}(i,e,n,o);a.add(s);const c=()=>a.delete(s);return Promise.prototype.then.call(s,c,c),Ps(i,s)}remove(t){const{Ft:e,xt:r}=this;if(typeof t==v&&(t=r.get(t)),t&&t.filename!==I){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,{It:i,writer:w}=this,{writable:p}=w;if(o.vt)return Bs(w);if(!(r instanceof Uint8Array))throw new Error(Ha);if(Fc(r)>e)throw new Error(Va);for(;i.size;)await Promise.allSettled(Array.from(i));await Promise.allSettled(o.Ut.map(t=>t.ye));const h=o.Ut.filter(t=>t.be&&!t.Ee);if(h.length){const t=h.map(t=>t.error);h.forEach(t=>t.Ee=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{Se:i,ge:w}=Qs(r.xt),{Ae:p,Re:h,ze:m}=await async function(r,n,o){const{xt:i,writer:a}=r,c=new Uint8Array(n);await Io(a);let u=0,l=0,d=ec(a),w=rc(a),p=0;for(const[r,n]of Array.from(i.values()).entries()){const{offset:h,rawFilename:m,Vt:y,Ht:b,Gt:E,Yt:S,qt:g,rawExtraField:A,Kt:R,rawComment:z,versionMadeBy:D,jt:x,Bt:F,Lt:O,Pt:I,Zt:U,De:T,internalFileAttributes:C,externalFileAttributes:k,diskNumberStart:v,uncompressedSize:M,compressedSize:N}=n,_=Fc(y,b,E,S,g,A,R),j=f+Fc(m,z)+_;nc(a,u+j-l)&&(await fc(a,c.slice(l,u)),l=u,p=0,await a.closeDisk()),0==r&&(d=ec(a),w=rc(a)),O||zc(F,18,M),I||zc(F,14,N),(T||U)&&n.version<45&&Rc(F,0,45);const B=tc(j);if(B.xe(s),B.Fe(D),B.Oe(x.subarray(0,24)),B.Fe(_),B.Fe(Fc(z)),B.Fe(U?e:v),B.Fe(C),B.xe(k),B.xe(T?t:h),B.Oe(m),B.Oe(y),B.Oe(b),B.Oe(E),B.Oe(S),B.Oe(g),B.Oe(A),B.Oe(R),B.Oe(z),xc(c,B.it,u),u+=j,p++,o.onprogress)try{await o.onprogress(r+1,i.size,new pi(n))}catch{}}return await fc(a,l?c.slice(l):c),{Ae:{diskNumber:d,diskOffset:w},Re:{diskNumber:ec(a),Ie:p},ze:c}}(r,i,o),y=await async function(t,r,n){const o=bc(t,n,J);if(o){const n=await o(r),i=Fc(n);if(i>e)throw new Error(Ds);const s=tc(6+i);s.xe(a),s.Fe(i),s.Oe(n);const{writer:c}=t;return nc(c,Fc(s.it))&&await c.closeDisk(),await fc(c,s.it),6+i}return 0}(r,m,o);await async function(r,n,o,i){const{writer:a}=r,{Ae:s,Re:f,Ue:w,ge:p}=i;let{Se:h}=i,m=r.xt.size,y=s.diskNumber,b=oc(r,s);const E=Fc(n);if(E>e)throw new Error(Va);let S=mc(r,o,Qo),g=ec(a);if(nc(a,(S?98:d)+E)&&g++,b>=t||h>=t||m>=e||g>=e){if(!1===S)throw new Error(us);S=!0}else S===I&&p&&(S=!0);const A=tc(S?98:d);nc(a,Fc(A.it)+E)&&await a.closeDisk(),g=ec(a);let R=g==f.diskNumber?f.Ie:0;S&&(A.xe(u),A.Te(44),A.Fe(45),A.Fe(45),A.xe(g),A.xe(y),A.Te(R),A.Te(m),A.Te(h),A.Te(b),A.xe(l),A.xe(g),A.Te(BigInt(oc(r,a))+BigInt(h)+BigInt(w)),A.xe(g+1),mc(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,m=e,b=t,h=t),A.xe(c),A.Fe(g),A.Fe(y),A.Fe(R),A.Fe(m),A.xe(h),A.xe(b),A.Fe(E),await fc(a,A.it),E&&await fc(a,n)}(r,n,o,{Ae:p,Re:h,Se:i,Ue:y,ge:w})}(o,r,n),o.vt=!0,!Oo(w)&&mc(o,n,H)||await p.getWriter().close(),Bs(w)}[_](){return this.close()}}class _s{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new Ns(r,t),this.It=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 Ls(e,t)}}()}});return Ws(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 Ws(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.It))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await Ls(r,t),t}try{return await r.close(t,e)}catch(t){throw await Ls(r,t),t}}}class js extends Promise{then(t,e){const{Ce:r}=this;return r&&(r.Ee=!0),super.then(t,e)}}function Bs(t){return t.getData?t.getData():t.writable}function Ps(t,e){const r=new js((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.Ce=n,n.ye=Promise.prototype.then.call(r,I,t=>Object.assign(n,{be:!0,error:t})),t.Ut.push(n),r}async function Ls(t,e){try{await t.writer.writable.abort(e)}catch{}}function Ws(t,e,r){t.It.add(e),e.catch(t=>{try{r(t)}catch{}})}function Zs(t,e,n){if(null===t||typeof t!=k||Array.isArray(t))throw new Error(xs);const{externalFileAttributes:o,versionMadeBy:i,comment:a,lastModDate:s,rawLastModDate:c,creationDate:u,lastAccessDate:l,uncompressedSize:f,encrypted:d,zipCrypto:w,crc32:p,compressionMethod:h,extraFieldAES:m,extraFieldUnix:y,internalFileAttributes:b,extraField:E,bitFlag:S,directory:g,uid:A,gid:R}=t,z={externalFileAttributes:o,versionMadeBy:i,comment:a,lastModDate:s,creationDate:u,lastAccessDate:l,internalFileAttributes:b,directory:g};S&&S.languageEncodingFlag&&(z[Y]=!0);const D=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{hi.has(r)||e.set(r,t.data)}),e.size)return e}}(E);D&&(z[ci]=D),A===I&&R===I||Object.assign(z,{uid:A,gid:R,unixExtraFieldType:y?Cs:Ts});const x={};if(e&&!g)if(Object.assign(x,{uncompressedSize:f,crc32:p,compressionMethod:h}),e!==it&&Object.assign(x,{encrypted:d,zipCrypto:w,encryptionStrength:m?m.strength:I}),S&&(x.dataDescriptor=S.dataDescriptor,x[G]=ks[S.level]),n===I)x.rawLastModDate=c;else if(e!==it&&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(Fs);return{Xt:z,$t:x}}function Vs(n,o,i){let a=mc(n,i,Jo),s=mc(n,i,ri,a?20:768);const c=mc(n,i,ii),u=Ec(n,i,"uid"),l=Ec(n,i,"gid");let f=Ec(n,i,ui),d=mc(n,i,"unixExtraFieldType"),w=mc(n,i,li),p=mc(n,i,fi),h=mc(n,i,di);if(yt(u,t,ys),yt(l,t,bs),yt(f,e,Es),d!==I&&d!==Ts&&d!==Cs)throw new Error(Ss);if(d===Cs&&(u!==I&&u>e||l!==I&&l>e))throw new Error(gs);d!==I||u===I&&l===I||(d=Ts);let m=Ec(n,i,Xo),y=mc(n,i,$o);const b=m!==I||y!==I;if(u!==I||l!==I||f!==I||d||c?(a=!1,s=s&r|768):b&&(a=!0,s&=r),yt(m,r,As),y&&(typeof y!==k||Array.isArray(y)))throw new Error(Rs);if(s>e)throw new Error(Xa);let E=mc(n,i,Ko);const S=E!==I;S||(E=0),!i[oi]&&o.endsWith(D)&&(i[oi]=!0);const x=mc(n,i,oi);if(x?(o.endsWith(D)||(o+=D),S||(E=16,a||(E|=16877<<16))):a||S||(E=c?493<<16:27525120),!a){const t=f!==I||Boolean(w||p||h);f=f===I?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),p?f|=z:p=Boolean(f&z),h?f|=512:h=Boolean(512&f),S&&!t||(x?f=-61441&f|A:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:m,msdosAttributes:y}=function(t,e){if(t!==I)t&=r;else if(e!==I){const{readOnly:n,hidden:o,system:i,directory:a,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),i&&(c|=4),a&&(c|=16),s&&(c|=32),t=c&r}return e===I&&(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)),b&&(E=E&t|m&r);const F=E>>16&e,O=f!==I&&40960==(f&g);return{name:o,Jt:{versionMadeBy:s,msDosCompatible:Boolean(a),externalFileAttributes:E,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:O,setuid:w,setgid:p,sticky:h,msdosAttributesRaw:m,msdosAttributes:y}}}function Hs(t,r,n){const o=bc(t,n,"encodeText")||ee;let i=o(r,tt);if(i===I&&(i=ee(r)),Fc(i)>e)throw new Error(Ka);const a=n[No]||"";if(typeof a!=v)throw new Error(Ya);let s=o(a,et);if(s===I&&(s=ee(a)),Fc(s)>e)throw new Error(Ga);const c=mc(t,n,ei);if(c!==I&&c>e)throw new Error(Xa);const u=yc(t,n,Wo,new Date),l=mc(t,n,Zo),f=yc(t,n,Vo),d=yc(t,n,Go),w=mc(t,n,qo,0),p=ht(mc(t,n,P)),h=Boolean(p),m=!0===p,y=mc(t,n,j),b=mc(t,n,B);pt(y,b);const E=Ec(t,n,"encryptionStrength",3),S=mc(t,n,ni),g=mc(t,n,"extendedTimestamp",!0),A=mc(t,n,"ntfsTimestamp"),R=mc(t,n,"keepOrder",!0),z=mc(t,n,W),D=mc(t,n,V),x=mc(t,n,"bufferedWrite"),F=bc(t,n,"createTempStream"),O=mc(t,n,"dataDescriptorSignature",!0),U=dt(mc(t,n,L));wt(U);const T=mc(t,n,Y,!Ic(i)||!Ic(s)),C=mc(t,n,ai),k=h||C===I?I:lr(C);if(!h&&C!==I&&0!==C&&8!==C&&!k)throw new Error(or);let M=Ec(t,n,G);if(yt(M,9,zs),t.options[X]){if(y!==I||b!==I)throw new Error(Ja);M===I&&C===I&&(M=0)}h&&(M=bt(n[G]));let N=mc(t,n,Z),_=mc(t,n,q);x&&_===I&&(_=!1),(_===I||S&&!m)&&(_=!0),M!==I&&6!=M&&(N=!1);const H=mc(t,n,Qo);if(!(S||y===I&&b===I||Number.isInteger(E)&&E>=1&&E<=3))throw new Error($a);const K=Gs(n[ci]),$=Gs(n.localExtraField),J=Gs(n.centralExtraField);return{comment:a,Jt:{rawFilename:i,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,te:h,ee:m,password:y,rawPassword:b,encryptionStrength:E,zipCrypto:S,extendedTimestamp:g,ntfsTimestamp:A,keepOrder:R,useWebWorkers:z,transferStreams:D,bufferedWrite:x,createTempStream:F,dataDescriptorSignature:O,signal:U,useUnicodeFileNames:T,compressionMethod:C,format:k?k.format:I,codecURI:k?k.codecURI:I,ke:k?k.versionNeeded:I,level:M,useCompressionStream:N,dataDescriptor:_,zip64:H,rawExtraField:K,ve:$,Kt:J}}}function Gs(t){if(!t)return N;if(!(t instanceof Map))throw new Error(es);let r=0,n=0;t.forEach((t,n)=>{if(mt(n,e,rs),!(t instanceof Uint8Array))throw new Error(ns);if(Fc(t)>e)throw new Error(os);r+=4+Fc(t)});const o=new Uint8Array(r),i=Wt(o);return t.forEach((t,e)=>{Rc(i,n,e),Rc(i,n+2,Fc(t)),xc(o,t,n+4),n+=4+Fc(t)}),o}function Ys(e,r,n,o,i){const{te:a,ee:s,zipCrypto:c,password:u,rawPassword:l,encryptionStrength:f}=o;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:h}=o,m=0,y=0,b=!1;if(a&&r){if(y=i[jo],y===I)throw new Error(ls);if(h===I)throw new Error(fs)}const E=!0===w,S=mc(e,i,ti);if(r&&s&&!S&&Fc(u,l))throw new Error(ts);const g=r&&(Boolean(u&&Fc(u)||l&&Fc(l))||s&&S);r||(p=0,h=0);const A=mi(g,c,f);r&&(a?(i.uncompressedSize=y,m=n===I?Sc(y)+A:n+(s?0:A)):n===I?(d=!0,(w||w===I)&&(w=b=!0,m=4294967296)):(i.uncompressedSize=y=n,m=(gc(h,p)?Sc(y):y)+A));const R=!(g||r&&(0!==n||a)||gc(h,p));R&&mc(e,i,q)===I&&(d=!1);const z=E||b||y>=t,D=E||m>=t;if(z||D){if(!1===w)throw new Error(us);w=!0}return w=w||!1,{Me:m,Jt:{dataDescriptor:d,ie:R,zip64:w,Wt:E,Ne:b,Lt:z,Pt:D,uncompressedSize:y,level:p,compressionMethod:h,encrypted:g}}}function qs(e,r,n){const o=e.slice().sort((t,e)=>n?e-t:t-e);let i=r,a=0;for(const e of o){if(i>=t)break;i+=e,a++}return a}function Ks(t){const{rawFilename:r,lastModDate:o,rawLastModDate:i,lastAccessDate:a,creationDate:s,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:d,directory:w,rawExtraField:p,ve:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,te:R,encrypted:z,Lt:D,Pt:U,uncompressedSize:T,Ne:C,crc32:k}=t;let{version:v,compressionMethod:M}=t;const _=!w&&gc(M,c);let j;const B=R||!_,P=u&&(t.bufferedWrite||!d||!D&&!U||B&&!C),L=P||u&&d&&(D||U);if(u&&(D||U)){const t=20,e=tc(t);if(e.Fe(1),e.Fe(t-4),j=e.it,P&&(e.Te(T),B)){const t=mi(z,l,S);e.Te(R?0:T+t)}}else j=N;let W,Z,V,H,G;if(z&&!l){const t=tc(Fc(Us)+2);t.Fe(h),t.Oe(Us),W=t.it,W[8]=S}else W=N;if(g){const t=pc(o),e=(Y=t)>=is&&Y<=as;if(e){const e=9+(a?4:0)+(s?4:0),r=tc(e);H=1+(a?2:0)+(s?4:0),G=t,r.Fe(m),r.Fe(e-4),r._e(H),r.xe(t),a&&r.xe(hc(pc(a))),s&&r.xe(hc(pc(s))),V=r.it}else V=N;if(A===I?!e||Boolean(a||s):A)try{const t=wc(o),e=tc(36);e.Fe(10),e.Fe(32),e.je(4),e.Fe(1),e.Fe(24),e.Te(t),e.Te(a?wc(a):t),e.Te(s?wc(s):t),Z=e.it}catch{Z=N}else Z=N}else Z=V=N;var Y;let q;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=Ts||r===I&&n===I)if(o!=Cs||r===I&&n===I)q=N;else{const t=tc(8);t.Fe(E),t.Fe(4),t.Fe((r===I?0:r)&e),t.Fe((n===I?0:n)&e),q=t.it}else{const t=$s(r===I?0:r),e=$s(n===I?0:n),o=3+t.length+e.length,i=tc(4+o);i.Fe(b),i.Fe(o),i._e(1),i._e(t.length),i.Oe(t),i._e(e.length),i.Oe(e),q=i.it}}catch{q=N}M===I&&(M=_?8:0),v===I&&(v=0!=M||w||z?20:10);const{ke:K}=t;_&&K!==I&&(v=v>K?v:K),u&&(v=v>45?v:45),z&&!l&&(v=v>51?v:51,R&&k!==I&&(W[4]=1),Rc(Wt(W),9,M),M=99);const $=L?Fc(j):0,J=$+Fc(W,V,Z,q,p,y);if(J+(t[X]?67:0)>e)throw new Error(os);const Q=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),tt=Q<O?O:Q>F?F:Q,et=Fc(V)?new Date(1e3*pc(o)):Fc(Z)?o:tt,{jt:rt,Bt:nt,rawLastModDate:ot}=Oc({version:v,bitFlag:Uc(c,f,d,z,M),compressionMethod:M,uncompressedSize:T,lastModDate:tt,rawLastModDate:i,rawFilename:r,Pt:U,Lt:D,extraFieldLength:J}),it=tc(x+Fc(r)+J),at=it.it,st=Wt(at);return it.xe(n),it.Oe(rt),it.Oe(r),L&&it.Oe(j),it.Oe(W),it.Oe(V),it.Oe(Z),it.Oe(q),it.Oe(p),it.Oe(y),d&&(U||zc(st,18,0),D||zc(st,22,0)),{ne:at,me:st,jt:rt,Bt:nt,lastModDate:et,re:et===tt&&Q.getTime()!=tt.getTime(),rawLastModDate:ot,encrypted:z,compressed:_,version:v,compressionMethod:M,de:H,we:G,Vt:N,fe:$,Gt:V,Yt:Z,qt:q,Ht:W,extraFieldLength:J}}function Xs(t,e){const{ae:r}=t;let{ne:n,extraFieldLength:o}=r,i=64-(e+Fc(n))%64;i<4&&(i+=64);const a=new Uint8Array(i),s=Wt(a);Rc(s,0,y),Rc(s,2,i-4);const c=n;r.ne=n=new Uint8Array(Fc(c)+i),xc(n,c),xc(n,a,Fc(c));const u=Wt(n);Rc(u,28,o+i),r.me=u,t.le+=i}function $s(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 Js({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=N,a=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Wt(o),r&&(a=4,zc(n,0,i))),{oe:o,pe:n,he:a}}function Qs(r){let n=0,o=!1;for(const[,i]of r){const{rawFilename:r,Ht:a,rawComment:s,Yt:c,qt:u,rawExtraField:l,Kt:d,de:w,we:p,Wt:h,uncompressedSize:y,compressedSize:b}=i;let{Lt:E,Pt:S}=i;h||(E&&y<t&&(E=i.Lt=!1),S&&b<t&&(S=i.Pt=!1)),o=o||E||S;const g=i.offset>=t,A=i.diskNumberStart>=e;let R,z;if(g||A||E||S){const t=4+(E?8:0)+(S?8:0)+(g?8:0)+(A?4:0),e=tc(t);e.Fe(1),e.Fe(t-4),E&&e.Te(y),S&&e.Te(b),g&&e.Te(i.offset),A&&e.xe(i.diskNumberStart),R=e.it}else R=N;if(i.Vt=R,i.De=g,i.Zt=A,p===I)z=N;else{const t=tc(9);t.Fe(m),t.Fe(5),t._e(w),t.xe(p),z=t.it}i.Gt=z;const D=Fc(R,a,c,u,z,l,d);if(D>e)throw new Error(os);n+=f+Fc(r,s)+D}return{Se:n,ge:o}}function tc(t){const e=new Uint8Array(t),r=Wt(e);let n=0;return{it:e,_e:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},Fe:t=>{Rc(r,n,t),n+=2},xe:t=>{zc(r,n,t),n+=4},Te:t=>{Dc(r,n,BigInt(t)),n+=8},Oe:t=>{xc(e,t,n),n+=Fc(t)},je:t=>n+=t}}function ec(t){const{diskNumber:e=0}=t;return e}function rc(t){const{diskOffset:e=0}=t;return e}function nc(t,e){const{availableSize:r=U}=t;return e>r}function oc(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.Ot:0)}function ic(t){const e=Wt(t);let r=0;for(;r+4<=Fc(t);){const n=4+Ac(e,r+2);if(1==Ac(e,r))return ic(Pt(t.subarray(0,r),t.subarray(Math.min(r+n,Fc(t)))));r+=n}return t}async function ac(t,e,r,n){if(n>0){const{writer:o}=t;let i=0;try{await dc(Co(e,{offset:r,size:n}),o,I,t=>i+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=i,t.offset+=i}}}async function sc(t,e){const r=await To(t,e,x);if(Fc(r)<x)return x;const n=Wt(r);return x+Ac(n,26)+Ac(n,28)}function cc(t,{offset:e,diskNumberStart:r}){return e+(t.ft?t.ft(r):0)}function uc(){const t=new Uint8Array(4);return zc(Wt(t),0,o),t}async function lc(t,e){delete t.Dt,await fc(e,uc()),t.offset+=4}async function fc(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Fc(e),await n.write(e)}finally{n.releaseLock()}}async function dc(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(Fc(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function wc(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<ss?ss:e>cs?cs:e}}function pc(t){return Math.floor(t.getTime()/1e3)}function hc(t){return Math.min(as,Math.max(is,t))}function mc(t,e,r,n){const o=e[r]===I?t.options[r]:e[r];return o===I?n:o}function yc(t,e,r,n){const o=mc(t,e,r,n);if(null===o)return n;if(o!==I&&(typeof o.getTime!=C||Number.isNaN(o.getTime())))throw new Error(qa);return o}function bc(t,e,r){return ft(mc(t,e,r))}function Ec(t,e,r,n){return bt(mc(t,e,r,n))}function Sc(t){return t+5*(Math.floor(t/16383)+1)}function gc(t,e){return t===I?e===I||e>0:0!==t}function Ac(t,e){return t.getUint16(e,!0)}function Rc(t,e,r){t.setUint16(e,r,!0)}function zc(t,e,r){t.setUint32(e,r,!0)}function Dc(t,e,r){t.setBigUint64(e,r,!0)}function xc(t,e,r){t.set(e,r)}function Fc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Oc({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:i,lastModDate:a,rawLastModDate:s,rawFilename:c,Pt:u,Lt:l,extraFieldLength:f}){const d=tc(26),w=d.it,p=Wt(w);if(d.Fe(e),d.Fe(r),d.Fe(n),s===I){const t=new Uint32Array(1),e=Wt(t);Rc(e,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),Rc(e,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate()),s=t[0]}return d.xe(s),d.je(4),u||i!==I?d.xe(u?t:i):d.je(4),l||o!==I?d.xe(l?t:o):d.je(4),d.Fe(Fc(c)),d.Fe(f),{jt:w,Bt:p,rawLastModDate:s}}function Ic(t){return t.every(t=>t>=32&&t<=126)}function Uc(t,e,r,n,o){let i=0;return e&&(i|=S),r&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),n&&(i|=1),i}function Tc(){return"application/octet-stream"}function Cc(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=Tt(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:kc(r,yr)||kc(t,yr)||kc(t,Er),decompression:kc(n,yr)||kc(e,yr)||kc(e,Er),registered:!1},{compressionMethod:9,compression:!1,decompression:kc(n,br)||kc(e,br),registered:!1}];for(const t of fr()){const e=dr(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==C:I,decompression:e?typeof e.DecompressionStream==C:I,registered:!0})}return o}function kc(t,e){if(!t)return!1;const{supportedFormats:r}=t;return r?r.includes(e):Dr(t,e)}const vc="2.16.0",Mc=1048576,Nc=".zip.js-temp";function _c(t={}){const{thresholdBytes:e=Mc,directoryName:r=Nc,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function i(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,a,s=0,c=!1;const u=new WritableStream({async write(a){c?await o.write(a):(t.push(a),s+=a.length,s>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(""),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(!a){const t=await n.getFile();a=t.stream().getReader()}const{value:t,done:r}=await a.read();r?e.close():e.enqueue(t)}else l<t.length?e.enqueue(t[l++]):e.close()},async cancel(t){a&&await a.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const jc=1048576;function Bc(t={}){const{thresholdBytes:e=jc}=t;return function(){const t=[];let r,n,o,i=0,a=!1;const s=new WritableStream({async write(o){a?await r.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new TransformStream;n=Qe(e.readable),r=e.writable.getWriter(),a=!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(a){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 Pc=1048576,Lc=".zip.js-temp",Wc="createSyncAccessHandle is only available in dedicated workers";function Zc(t={}){const{thresholdBytes:e=Pc,directoryName:r=Lc,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(Wc);const o=n||(()=>navigator.storage.getDirectory());let i;function a(){return i||(i=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,n,o=0,i=!1,s=0,c=0;const u=new WritableStream({async write(c){i?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>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("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),i=!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(i){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 a();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{jt({baseURI:import.meta.url})}catch{}const Vc="deflate",Hc="deflate-raw",Gc="deflate64-raw",Yc="gzip";let qc,Kc,Xc,$c,Jc;function Qc(t,e,r={}){if(!qc){const t=new Error("WASM module not loaded");throw t.cause=Jc,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,i="number"==typeof r.inBufferSize?r.inBufferSize:65536;return new TransformStream({start(){try{let r;if(this.Be=Kc(o),this.in=Kc(i),this.inBufferSize=i,!this.Be||!this.in)throw new Error("allocation failed");if(t?(this.Pe=qc.deflate_process,this.Le=qc.deflate_last_consumed,this.We=qc.deflate_end,this.Ze=qc.deflate_new(),r=e===Yc?qc.deflate_init_gzip(this.Ze,n):e===Hc?qc.deflate_init_raw(this.Ze,n):qc.deflate_init(this.Ze,n)):e===Gc?(this.Pe=qc.inflate9_process,this.Le=qc.inflate9_last_consumed,this.We=qc.inflate9_end,this.Ze=qc.inflate9_new(),r=qc.inflate9_init_raw(this.Ze)):(this.Pe=qc.inflate_process,this.Le=qc.inflate_last_consumed,this.We=qc.inflate_end,this.Ze=qc.inflate_new(),r=e===Hc?qc.inflate_init_raw(this.Ze):e===Yc?qc.inflate_init_gzip(this.Ze):qc.inflate_init(this.Ze)),0!==r)throw new Error("init failed:"+r)}catch(t){throw a(this),t}},transform(t,e){try{const r=t,n=new Uint8Array($c.buffer),i=this.Pe,a=this.Le,s=this.Be;let c=0;for(;c<r.length;){const t=Math.min(r.length-c,32768);if((!this.in||this.inBufferSize<t)&&(this.in&&Xc&&(Xc(this.in),this.in=0),this.in=Kc(t),this.inBufferSize=t,!this.in))throw new Error("allocation failed");n.set(r.subarray(c,c+t),this.in);const u=i(this.Ze,this.in,t,s,o,0),l=u>>24&255,f=128&l?l-256:l;if(f<0)throw new Error("process error:"+f);const d=16777215&u;d&&e.enqueue(n.slice(s,s+d));const w=a(this.Ze);if(0===w&&0===d)break;c+=w}}catch(t){a(this),e.error(t)}},flush(t){try{const e=new Uint8Array($c.buffer),r=this.Pe,n=this.Be;for(;;){const i=r(this.Ze,0,0,n,o,4),a=i>>24&255,s=128&a?a-256:a;if(s<0)throw new Error("process error:"+s);const c=16777215&i;if(c&&t.enqueue(e.slice(n,n+c)),1===a||0===c)break}}catch(e){t.error(e)}finally{const e=a(this);0!==e&&t.error(new Error("end error:"+e))}},cancel(){a(this)}});function a(t){let e=0;return t.Ze&&t.We&&(e=t.We(t.Ze)),t.Ze=0,t.in&&Xc&&Xc(t.in),t.in=0,t.Be&&Xc&&Xc(t.Be),t.Be=0,e}}class tu{constructor(t=Vc,e){return Qc(!0,t,e)}}class eu{constructor(t=Vc,e){return Qc(!1,t,e)}}tu.requiresModule=!0,eu.requiresModule=!0,tu.supportedFormats=[Vc,Hc,Yc],eu.supportedFormats=[Vc,Hc,Yc,Gc];const ru=65536;let nu,ou;function iu(t){return new Uint8Array(t.memory.buffer)}let au,su=!1;var cu;async function uu(){await async function(){await Promise.allSettled([An(),...wn.map(t=>(Dn(t),t.terminate()))]),Lr=I,Wr=!1}(),au=null,su=!1,qc=Kc=Xc=$c=Jc=null,nu=null,ou=0}cu=function(t,e){const r=nu;let n=r?function(t,e,r){ou||(ou=t.malloc(ru));const n=ou?t.aes_hmac_new():0;if(n){const o=iu(t);if(o.set(e,ou),o.set(r,ou+e.length),t.aes_hmac_init(n,ou,e.length,ou+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=ou;return{process(t,e){for(let i=0;i<t.length;i+=ru){const a=t.subarray(i,i+ru),s=iu(r);s.set(a,o),r.aes_hmac_process(n,o,a.length,e?1:0),a.set(s.subarray(o,o+a.length))}},digest:()=>(r.aes_hmac_end(n,o),n=0,iu(r).slice(o,o+20)),dispose(){n&&(r.aes_hmac_end(n,0),n=0)}}},ve=cu||we,function({Ve:t}){Vr=t}({Ve:t=>{if(!au){let{wasmURI:e}=t;typeof e==C&&(e=e()),au=async function(t,{baseURI:e}){if(!su)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 i;(function(t){if(qc=t,({malloc:Kc,free:Xc,memory:$c}=qc),"function"!=typeof Kc||"function"!=typeof Xc||!$c)throw qc=Kc=Xc=$c=null,new Error("Invalid WASM module")})(o.instance.exports),typeof(i=o.instance.exports).aes_hmac_new==C&&(nu=i,ou=0)}(t,e),su=!0}catch(t){throw function(t){Jc=t}(t),t}}(e,t).catch(t=>{throw au=null,t})}return au}}),jt({CompressionStreamFallback:tu,DecompressionStreamFallback:eu}),jt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const lu="Entry filename already exists",fu="Duplicate entry filename in the imported zip file",du='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',wu="Entry is an ancestor of target entry",pu="Root directory cannot be moved",hu="Target entry is not a directory",mu="Parent entry is not a directory",yu="Readable stream already consumed",bu="throw",Eu="keep-first",Su="keep-last",gu=new Set([bu,Eu,Su]),Au="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Ru="Invalid readerOptions (must be an object)",zu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",Du="zipjs-abort-export";class xu{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(lu);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.He++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,Ge:r.Ge||r.uncompressedSize===I,passThrough:r.passThrough,Ye:r.Ye||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=tl(t);n&&(t=n.pop(),r=el(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(lu);r!=e.parent&&(ju(e),e.parent=r,r.children.push(e),Ju(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!==I))}}class Fu extends xu{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 Fu(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===I||(t.constructor==$n?e.type==r:t.constructor!=Yn||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=Nu(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([Io(n),Io(t,o)]);const i=dt(e.signal),a=function(t,e,r,n){const{onstart:o,onprogress:i,onend:a}=r,{readable:s}=e;return t.data instanceof pi||!o&&!i&&!a?s:Je(s).pipeThrough(new Kr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:n})}(r,n,e,i),s=!Oo(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Je(a).pipeTo(tr(t.writable),{signal:i,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 to(t),e)}getBlob(t,e){return this.getData(new $n(t),e)}getData64URI(t,e){return this.getData(new Yn(t),e)}getUint8Array(t){return this.getData(new Ro,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Lt(await this.getUint8Array(t)).buffer}replaceBlob(t){Vu(this,{data:t,Reader:Xn,Writer:$n,uncompressedSize:t.size})}replaceText(t){Vu(this,{data:t,Reader:Jn,Writer:to,uncompressedSize:Qn(t)})}replaceData64URI(t){Vu(this,{data:t,Reader:Gn,Writer:Yn,uncompressedSize:Hu(t)})}replaceUint8Array(t){Vu(this,{data:t,Reader:Ao,Writer:Ro,uncompressedSize:t.length})}replaceReadable(t){Vu(this,{data:null,Reader:vu(t),Writer:null,uncompressedSize:I})}}class Ou extends xu{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new Ou(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 Qu(this,t,{options:e},!0)}addText(t,e,r={}){return Qu(this,t,{data:e,Reader:Jn,Writer:to,options:r,uncompressedSize:Qn(e)})}addBlob(t,e,r={}){return Qu(this,t,{data:e,Reader:Xn,Writer:$n,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return Qu(this,t,{data:e,Reader:Gn,Writer:Yn,options:r,uncompressedSize:Hu(e)})}addUint8Array(t,e,r={}){return Qu(this,t,{data:e,Reader:Ao,Writer:Ro,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return Qu(this,t,{data:e,Reader:class extends So{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return Qu(this,t,{Reader:vu(e),options:r})}addFileSystemEntry(t,e={}){return qu(this,t,e)}addFileSystemHandle(t,e={}){return qu(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),Qu(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 Xn(t),e)}importData64URI(t,e){return this.importZip(new Gn(t),e)}importUint8Array(t,e){return this.importZip(new Ao(t),e)}importHttpContent(t,e){return this.importZip(new So(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new $n(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Yn(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new Ro,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:i}=r;Zu(r.passThrough);const a=Wu(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!dt(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,a,{signal:c,onstart:I,onprogress:I,onend:I,preventClose:!1}),f=Tu([t],t=>ku(t,l.passThrough)),d=[];let w=!1,p=0;try{n&&await Xr(n,f),await m(t,e),i&&await Xr(i,p)}catch(t){try{t.exportedEntryNames=d}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 Xr(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=>!Bu(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||Bu(c.reason))return;wt(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 w?new Error(Du):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(Du));try{r.entryName===I&&(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==C?(r=t,e=Object.assign({},r.options,e)):(await Io(t),r=new ia(t,e)),Zu(e.passThrough);const n=function(t){if(t===I)return bu;if(gu.has(t))return t;throw new Error(du)}(e.duplicates),o=[],i=await r.getEntries(e);for(const t of i){let r=this;try{const i=t.filename.split("/").filter(t=>""!=t&&"."!=t),a=i.pop();let s=!1;for(const t of i){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==Eu){s=!0;break}if(n!=Su)throw new Error(fu);this.fs.remove(r),r=new Ou(this.fs,t,{data:null},e),o.push(r)}}else r=new Ou(this.fs,t,{data:null},e),o.push(r)}if(s)continue;if(t.directory){let e=r;if(a){if(e=r.getChildByName(a),e&&(!e.directory||e.data)){if(n==Eu)continue;if(n!=Su)throw new Error(fu);e.directory?e.data=t:(this.fs.remove(e),e=I)}e||(e=new Ou(this.fs,a,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const i=r.getChildByName(a);if(i){if(n==Eu)continue;if(n!=Su)throw new Error(fu);this.fs.remove(i)}o.push(Qu(r,a,{data:t,Reader:Mu(Object.assign({},e)),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==C;e=Object.assign({},e),n||e.bufferedWrite!==I||(e.bufferedWrite=!0);const[o]=await Promise.all([_u(r,Wu(e.readerOptions)),n?I:Io(t)]),i=n?t:new Ns(t,e);return await async function(t,e,r,n,o){const{onstart:i,onprogress:a,onend:s,onentryprogress:c}=n,u=e,l=Tu(e.children,t=>Yu(t)?0:1);let f=0,d=0;if(i&&await Xr(i,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(Yu(e))return;const{name:i,Xt:s}=Pu(e,u,n);let w=0;const p=await t.add(i,o.get(e),Object.assign(s,{onstart:I,onend:I,onprogress:async t=>{f+=t-w,w=t,a&&await Xr(a,f,r)}}));d++,c&&await Xr(c,d,l,p)}s&&await Xr(s,f)}(i,r,Tu([r],Cu),e,o),n?i:(await i.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(r={}){const n=this;Wu((r=Object.assign({},r)).readerOptions),r.bufferedWrite===I&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),i=o.filter(t=>!Yu(t)).map(t=>{const{name:e,Xt:o}=Pu(t,n,r);return{name:e,size:t.directory?0:Lu(t,Gu(t,r)),options:o}}),a=!r.bufferedWrite||i.every(t=>!1!==t.options.keepOrder)&&o.every(t=>Yu(t)||!t.children.length);return await async function(r,n,o,i){const a={options:r};if(ft(r[J]))throw new Error(ws);if(i!==I&&!(i instanceof Uint8Array))throw new Error(Ha);const s=Fc(i);if(s>e)throw new Error(Va);const c=r[X],u=new Map,l=r[K]===I?0:r[K];let f=l,w=U;const p=[],h=new Set;for(const e of n){let{name:r}=e;const{size:n}=e,o=Object.assign({},e.options);mc(a,o,oi)&&!r.endsWith(D)&&(r+=D);const i=Vs(a,r,o);({name:r}=i);const{Jt:s}=Hs(a,r,o);0==s.level||s.compressionMethod!==I||s.te||await Hr(Tt())||(s.level=0);const l=!mc(a,o,oi);if(l&&n===I)throw new Error(ws);const{Me:d,Jt:m}=Ys(a,l,n,s,o);if(l&&!s.te&&gc(m.compressionMethod,m.level))throw new Error(ws);const y=Object.assign({},o,i.Jt,s,m,{[X]:c}),b=Ks(y),E=Js(y),S={ae:b,le:Fc(b.ne,E.oe)};c&&Xs(S,f);const g=l?d:0;u.set(r,Object.assign({},y,b,{offset:f,diskNumberStart:0,compressedSize:g}));const A=S.le+g;p.push(A),h.add(Boolean(y.Wt||y.uncompressedSize>=t||g>=t)),w=Math.min(w,A),f+=A}if(u.size>1&&(c||f-w>=t&&(h.size>1||qs(p,l,!0)!=qs(p,l,!1)))&&!o)throw new Error(ws);const{Se:m,ge:y}=Qs(u);let b=mc(a,r,Qo);if(f>=t||m>=t||u.size>=e){if(!1===b)throw new Error(us);b=!0}else b===I&&y&&(b=!0);return f-l+m+s+(b?98:d)}(r,i,a,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 Iu{constructor(){Xu(this)}get children(){return this.root.children}remove(t){ju(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=I}move(t,e){if(t==this.root)throw new Error(pu);if(!e.directory)throw new Error(hu);if(e.isDescendantOf(t))throw new Error(wu);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(lu)}else ju(t),t.parent=e,e.children.push(t),Ju(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]):I;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 $u(this,r=>r.importBlob(t,e))}importData64URI(t,e){return $u(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return $u(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return $u(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return $u(this,r=>r.importReadable(t,e))}importZip(t,e){return $u(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 Uu={FS:Iu,ZipDirectoryEntry:Ou,ZipFileEntry:Fu};function Tu(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 Cu(t){return t.uncompressedSize}function ku(t,e){const{data:r}=t;return e&&r instanceof pi?r.compressedSize:t.uncompressedSize}function vu(t){let e;return function(){if(e)throw new Error(yu);return e=!0,{readable:t}}}function Mu(t){return class extends Vn{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const e=this,r=Object.assign({},t,e.options),{checkOverlappingEntry:n,checkOverlappingEntryOnly:o}=r,i=await e.entry.getData(new $n,Object.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:o||n,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=i,e.qe=new Xn(i),e.size=i.size,super.init()}readUint8Array(t,e){return this.qe.readUint8Array(t,e)}}}function Nu(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function _u(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 t=>{const r=t.reader=Nu(t.Reader,t.data,e);o.set(t,r);try{await Io(r)}catch(e){try{e.entryId=t.id,e.cause={entry:t}}catch{}throw e}r.size!==I&&(t.uncompressedSize=r.size,t.Ge=!1)})),o}function ju(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function Bu(t){return Boolean(t)&&t.message==Du}function Pu(t,e,r){const n=r.relativePath?t.getRelativeName(e):t.getFullname(),o=t.options||{};let i={},a={};if(t.data instanceof pi){const e=Gu(t,r),n=o.lastModDate===I?r.lastModDate:o.lastModDate;({Xt:i,$t:a}=Zs(t.data,e,n)),e&&(a.passThrough=!0)}const s=Object.assign({lastModDate:t.Ye},i,r,o,a,{directory:t.directory});if(!t.directory&&s.passThrough&&s.uncompressedSize===I)throw new Error(Au);return{name:n,Xt:s}}function Lu(t,e){const{reader:r}=t;return r&&r.size!==I?r.size:t.Ge?I:ku(t,e)}function Wu(t){if(t&&(typeof t!=k||Array.isArray(t)))throw new Error(Ru);return t&&Zu(t.passThrough),t}function Zu(t){if(ht(t)===it)throw new Error(zu)}function Vu(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:I,uncompressedSize:r===I?0:r,Ge:r===I})}function Hu(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function Gu(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function Yu(t){return t.directory&&null===t.data}function qu(t,e,r){return async function t(e,n,o,i=""){if(n){const a=i?i+"/"+n.name:n.name;try{if((n.isFile||n.isDirectory)&&(n=await Ku(n)),"file"==n.kind){const t=await n.getFile();o.push(Qu(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 i=e.addDirectory(n.name,r);o.push(i);for await(const e of n.values())await t(i,e,o,a)}}catch(t){try{t.entryName===I&&(t.entryName=a)}catch{}throw t}}return o}(t,e,[])}async function Ku(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 i=>{if(i.length){for(const t of i)e.push(await Ku(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 Xu(t){t.entries=[],t.He=0,t.root=new Ou(t)}function $u(t,e){const{entries:r,He:n,root:o}=t;return Xu(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,He:n,root:o}),e})}function Ju(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 Qu(t,e,r,n){if(t.directory){const o=tl(e);return o&&(e=o.pop(),t=el(t,o)),n?new Ou(t.fs,e,r,t):new Fu(t.fs,e,r,t)}throw new Error(mu)}function tl(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function el(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(lu);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(wu)}else t=new Ou(n.fs,e,{data:null},n)}),t}export{Xn as BlobReader,$n as BlobWriter,Gn as Data64URIReader,Yn as Data64URIWriter,lt as ERR_ABORTED,Oi as ERR_AMBIGUOUS_ARCHIVE,wu as ERR_ANCESTOR_ENTRY,yi as ERR_BAD_FORMAT,Si as ERR_CENTRAL_DIRECTORY_NOT_FOUND,Za as ERR_DUPLICATED_NAME,fu as ERR_DUPLICATE_IMPORTED_ENTRY,Ri as ERR_ENCRYPTED,Ii as ERR_ENCRYPTED_CENTRAL_DIRECTORY,Fi as ERR_ENTRY_DATA_OUT_OF_BOUNDS,lu as ERR_ENTRY_EXISTS,Ei as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,bi as ERR_EOCDR_NOT_FOUND,Ai as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,Tn as ERR_HTTP_RANGE,Cn as ERR_HTTP_RESOURCE_CHANGED,Un as ERR_HTTP_STATUS,Se as ERR_INVALID_AUTHENTICATION_CODE,St as ERR_INVALID_BASE_URI,er as ERR_INVALID_CODEC_DEFINITION,nr as ERR_INVALID_CODEC_MODULE,Va as ERR_INVALID_COMMENT,Ha as ERR_INVALID_COMMENT_TYPE,hr as ERR_INVALID_COMPRESSED_DATA,mr as ERR_INVALID_CRC32,qa as ERR_INVALID_DATE,du as ERR_INVALID_DUPLICATES,$a as ERR_INVALID_ENCRYPTION_STRENGTH,xs as ERR_INVALID_ENTRY,Ga as ERR_INVALID_ENTRY_COMMENT,Ya as ERR_INVALID_ENTRY_COMMENT_TYPE,Ka as ERR_INVALID_ENTRY_NAME,es as ERR_INVALID_EXTRAFIELD,os as ERR_INVALID_EXTRAFIELD_DATA,ns as ERR_INVALID_EXTRAFIELD_DATA_TYPE,rs as ERR_INVALID_EXTRAFIELD_TYPE,Ci as ERR_INVALID_FILENAME_VALIDATION,at as ERR_INVALID_FUNCTION_OPTION,bs as ERR_INVALID_GID,zs as ERR_INVALID_LEVEL,ki as ERR_INVALID_MAX_APPENDED_DATA_SIZE,Et as ERR_INVALID_MAX_WORKERS,As as ERR_INVALID_MSDOS_ATTRIBUTES,Rs as ERR_INVALID_MSDOS_DATA,Ee as ERR_INVALID_PASSWORD,ct as ERR_INVALID_PASSWORD_TYPE,Au as ERR_INVALID_PASS_THROUGH,ut as ERR_INVALID_PASS_THROUGH_VALUE,hs as ERR_INVALID_READER,Ru as ERR_INVALID_READER_OPTIONS,st as ERR_INVALID_SIGNAL,Ds as ERR_INVALID_SIGNATURE_DATA,Ti as ERR_INVALID_STRICTNESS,ys as ERR_INVALID_UID,pr as ERR_INVALID_UNCOMPRESSED_SIZE,Ss as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,gs as ERR_INVALID_UNIX_ID_SIZE,Es as ERR_INVALID_UNIX_MODE,gt as ERR_INVALID_URI,Xa as ERR_INVALID_VERSION,kn as ERR_ITERATOR_COMPLETED_TOO_SOON,gi as ERR_LOCAL_FILE_HEADER_NOT_FOUND,xi as ERR_OVERLAPPING_ENTRY,mu as ERR_PARENT_NOT_DIRECTORY,yu as ERR_READABLE_CONSUMED,rr as ERR_RESERVED_COMPRESSION_METHOD,pu as ERR_ROOT_DIRECTORY_NOT_MOVABLE,Di as ERR_SPLIT_ZIP_FILE,hu as ERR_TARGET_NOT_DIRECTORY,fs as ERR_UNDEFINED_COMPRESSION_METHOD,ds as ERR_UNDEFINED_CRC32,ps as ERR_UNDEFINED_READER,ls as ERR_UNDEFINED_UNCOMPRESSED_SIZE,ws as ERR_UNDETERMINED_SIZE,Ui as ERR_UNSAFE_FILENAME,or as ERR_UNSUPPORTED_COMPRESSION,Wc as ERR_UNSUPPORTED_CONTEXT,Ae as ERR_UNSUPPORTED_CRYPTO_API,zi as ERR_UNSUPPORTED_ENCRYPTION,ts as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,Ja as ERR_UNSUPPORTED_ENCRYPTION_USDZ,us as ERR_UNSUPPORTED_FORMAT,zu as ERR_UNSUPPORTED_PASS_THROUGH_VALUE,Qa as ERR_UNSUPPORTED_SPLIT_USDZ,vi as ERR_UNSUPPORTED_UINT64,Pr as ERR_WORKER_STARTUP_TIMEOUT,vn as ERR_WRITER_NOT_INITIALIZED,Mn as ERR_WRITER_SIZE_NOT_WRITABLE,Fs as ERR_ZIP_CRYPTO_LAST_MOD_DATE,ms as ERR_ZIP_NOT_EMPTY,go as HttpRangeReader,So as HttpReader,Vn as Reader,zo as SplitDataReader,Do as SplitDataWriter,Jn as TextReader,to as TextWriter,Ao as Uint8ArrayReader,Ro as Uint8ArrayWriter,vc as VERSION,Li as WARNING_APPENDED_DATA,Is as WARNING_CLAMPED_LAST_MODIFICATION_DATE,_i as WARNING_COMPRESSED_PATCHED_DATA,Os as WARNING_COMPRESSION_UNAVAILABLE,Hi as WARNING_DUPLICATE_FILENAME,ji as WARNING_MALFORMED_EXTRA_FIELD,Ki as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,Xi as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,$i as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,qi as WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,Gi as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,Yi as WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,Zi as WARNING_PREPENDED_CENTRAL_DIRECTORY,Wi as WARNING_PREPENDED_DATA,Vi as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,Ni as WARNING_UNKNOWN_VERSION,Bi as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,Mi as WARNING_UNSORTED_CENTRAL_DIRECTORY,Pi as WARNING_WRAPPED_ENTRIES_COUNT,Hn as Writer,Ou as ZipDirectoryEntry,xu as ZipEntry,Iu as ZipFS,Fu as ZipFileEntry,ia as ZipReader,aa as ZipReaderStream,Ns as ZipWriter,_s as ZipWriterStream,vt as configure,Bc as createBlobTempStream,_c as createOPFSTempStream,Zc as createSyncAccessHandleTempStream,Uu as fs,Tc as getMimeType,fr as getRegisteredCodecs,Cc as getSupportedCompressionMethods,sa as isZipFile,cr as registerCodec,Bt as resetConfiguration,uu as terminateWorkers,ur as unregisterCodec};