@zip.js/zip.js 2.21.0 → 2.22.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.
- package/deno.json +1 -1
- package/dist/zip-core-external.js +30 -15
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +30 -14
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +30 -18
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +30 -18
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +30 -18
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +30 -18
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +30 -18
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +30 -14
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +30 -14
- package/dist/zip-native.min.js +1 -1
- package/dist/zip.js +30 -14
- package/dist/zip.min.js +1 -1
- package/index-native.cjs +30 -18
- package/index-native.min.js +1 -1
- package/index.cjs +30 -18
- package/index.d.cts +36 -14
- package/index.d.ts +36 -14
- package/index.min.js +1 -1
- package/lib/core/configuration.js +1 -3
- package/lib/core/options.js +11 -0
- package/lib/core/version.js +1 -1
- package/lib/core/zip-fs.js +2 -6
- package/lib/core/zip-reader.js +1 -1
- package/lib/core/zip-writer.js +19 -9
- package/lib/zip-core-base.js +1 -0
- package/package.json +1 -1
package/dist/zip-fs-core.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,function(t){"use strict";const{Array:e,Object:n,String:r,Number:o,BigInt:i,Math:a,Date:s,Map:c,Set:u,Response:l,URL:f,Error:d,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:m,Blob:y,Promise:g,TextEncoder:E,TextDecoder:S,document:b,crypto:R,btoa:x,TransformStream:z,ReadableStream:F,WritableStream:D,CompressionStream:A,DecompressionStream:I,navigator:C,Worker:T,Symbol:k,setTimeout:v,clearTimeout:_,structuredClone:N}="undefined"!=typeof globalThis?globalThis:self;var U=void 0!==b?b.currentScript:null;const O=4294967295,M=65535,L=255,B=67324752,W=134695760,P=W,Z=84233040,H=33639248,V=101010256,G=101075792,j=117853008,q=46,Y=22,K=20,X=56,$=39169,J=21589,Q=6534,tt=30837,et=30805,nt=2048,rt=8192,ot=61440,it=16384,at=2048,st=1024,ct="/",ut=30,lt=new s(2107,11,31,23,59,58),ft=new s(1980,0,1),dt=void 0,wt=1/0,pt="Local file header not found",ht="Overlapping entry found",mt="Zip64 extra field not found",yt="undefined",gt="function",Et="object",St="string",bt="boolean",Rt=new w,xt=k.asyncDispose||k(),zt="password",Ft="rawPassword",Dt="passThrough",At="signal",It="checkAmbiguity",Ct="useWebWorkers",Tt="useCompressionStream",kt="preventClose",vt="level",_t="useUnicodeFileNames",Nt="dataDescriptor",Ut="offset",Ot="usdz",Mt="strictness",Lt="maxAppendedDataSize",Bt="signCentralDirectory",Wt="entry",Pt="filename",Zt="comment",Ht="strict",Vt="balanced",Gt="tolerant",jt="compressed",qt="Invalid option (must be a function)",Yt="Invalid signal (must be an AbortSignal instance)",Kt="Invalid password (password must be a string, rawPassword must be a Uint8Array)",Xt="Invalid passThrough option (must be a boolean or 'compressed')",$t="The operation was aborted";function Jt(t){if(t&&typeof t!=gt)throw new d(qt);return t}function Qt(t){if(t&&(typeof t.addEventListener!=gt||typeof t.aborted!=bt))throw new d(Yt);return t||dt}function te(t){if(t&&t.aborted)throw t.reason===dt?new DOMException($t,"AbortError"):t.reason}function ee(t,e){if(t&&typeof t!=St||e&&!(e instanceof w))throw new d(Kt)}function ne(t){if(t!==dt&&typeof t!=bt&&t!==jt)throw new d(Xt);return t}function re(t,e,n){if(!o.isInteger(t)||t<0||t>e)throw new d(n)}function oe(t,e,n){t!==dt&&re(t,e,n)}function ie(t){return typeof t==St&&t.trim()?o(t):t}const ae=262144,se="Invalid maxWorkers (must be an integer greater than 0)",ce="Invalid baseURI (must be a string)",ue="Invalid URI (must be a string or a function returning a string)";let le=2;try{typeof C!=yt&&C.hardwareConcurrency&&(le=C.hardwareConcurrency)}catch{}const fe={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:ae,maxWorkers:le,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof A!=yt&&A,DecompressionStream:typeof I!=yt&&I},de="maxWorkers",we="baseURI",pe=["wasmURI","workerURI"],he=["chunkSize",de,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],me=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],ye=[we,...pe,"useCompressionStream","useWebWorkers","transferStreams",...he,...me],ge={...fe};function Ee(){return ge}function Se(t){return be(t.chunkSize)}function be(t){return t=ie(t),o.isInteger(t)&&t>=1?a.max(t,64):ae}function Re(t){const e={};for(const n of ye){const r=t[n];r!==dt&&(e[n]=xe(n,r))}return e}function xe(t,e){if(he.includes(t)){if(e=ie(e),t==de&&(!o.isInteger(e)||e<1))throw new d(se)}else if(me.includes(t))Jt(e);else if(t==we){if(e&&typeof e!=St)throw new d(ce)}else if(pe.includes(t)&&e&&typeof e!=St&&typeof e!=gt)throw new d(ue);return e}function ze(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===dt&&r===dt)return t;const o=n.assign({},t);return o.CompressionStreamFallback===dt&&(o.CompressionStreamFallback=e),o.DecompressionStreamFallback===dt&&(o.DecompressionStreamFallback=r),o}function Fe(t,e){const n=new w(t.length+e.length);return n.set(t),n.set(e,t.length),n}function De(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new w(t):t}function Ae(t){return new m(t.buffer,t.byteOffset,t.byteLength)}function Ie(t){return Boolean(t)&&"object"==typeof t}const Ce=[[],[],[],[],[],[],[],[]];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;Ce[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const n=Ce[e-1][t];Ce[e][t]=n>>>8^Ce[0][255&n]}const[Te,ke,ve,_e,Ne,Ue,Oe,Me]=Ce;class Le{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let r=0;if(n>=8&&t.buffer){const o=new m(t.buffer,t.byteOffset,n),i=n-8;for(;r<=i;r+=8){const t=e^o.getInt32(r,!0),n=o.getInt32(r+4,!0);e=Me[255&t]^Oe[t>>>8&255]^Ue[t>>>16&255]^Ne[t>>>24&255]^_e[255&n]^ve[n>>>8&255]^ke[n>>>16&255]^Te[n>>>24&255]}}for(;r<n;r++)e=e>>>8^Te[255&(e^t[r])];this.o=e}get(){return~this.o}}class Be extends z{constructor(){let t;const e=new Le;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new w(4);new m(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function We(t){if(typeof E==yt){t=unescape(encodeURIComponent(t));const e=new w(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new E).encode(t)}const Pe=64,Ze=20,He=new w([128]),Ve=new w(1),Ge=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),je=new w(256),qe=new Int32Array(256),Ye=new Int32Array(256),Ke=new Int32Array(256),Xe=new Int32Array(256);let $e=!1;function Je(t){const e=function(){const t=new Int32Array(Ge),e=new Int32Array(16),n=new w(Pe),r=new m(n.buffer),o=new w(8);let i=0,s=0;return{update:c,digest:function(){const e=8*s,n=a.floor(e/4294967296),r=e>>>0;for(c(He,0,1);56!=i;)c(Ve,0,1);o[0]=n>>>24,o[1]=n>>>16,o[2]=n>>>8,o[3]=n,o[4]=r>>>24,o[5]=r>>>16,o[6]=r>>>8,o[7]=r,c(o,0,8);const u=new w(Ze),l=new m(u.buffer);for(let e=0;e<t.length;e++)l.setInt32(4*e,t[e]);return t.set(Ge),i=0,s=0,u}};function c(t,e,o){const a=e+o;if(s+=o,i){for(;e<a&&i<Pe;)n[i++]=t[e++];i==Pe&&(u(r,0),i=0)}if(e+Pe<=a){const n=new m(t.buffer,t.byteOffset,t.byteLength);for(;e+Pe<=a;e+=Pe)u(n,e)}for(;e<a;)n[i++]=t[e++]}function u(n,r){for(let t=0;t<16;t++)e[t]=n.getInt32(r+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}}(),n=new w(Pe),r=new w(Pe);t.length>Pe&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<Pe;e++){const o=e<t.length?t[e]:0;n[e]=54^o,r[e]=92^o}return e.update(n,0,Pe),{update(t,n,r){e.update(t,n,r)},digest(){const t=e.digest();e.update(r,0,Pe),e.update(t,0,Ze);const o=e.digest();return e.update(n,0,Pe),o}}}function Qe(t){return je[t>>>24]<<24|je[t>>>16&255]<<16|je[t>>>8&255]<<8|je[255&t]}function tn(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function en(t){return 255&(t<<1^27*(t>>7))}const nn=typeof R!=yt&&typeof R.getRandomValues==gt,rn="Invalid password",on="Invalid authentication code",an="zipjs-abort-check-password",sn="Crypto API not supported";function cn(t){if(nn)return R.getRandomValues(t);throw new d(sn)}const un={name:"PBKDF2"},ln=n.assign({hash:{name:"HMAC"}},un),fn=n.assign({iterations:1e3,hash:{name:"SHA-1"}},un),dn=["deriveBits"],wn=[8,12,16],pn=[16,24,32],hn=10,mn=typeof R!=yt,yn=mn&&R.subtle;let gn=mn&&typeof yn!=yt&&typeof yn.importKey==gt&&typeof yn.deriveBits==gt;class En extends z{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:r,checkAuthenticationCode:o=!0}){const i={};super({start(){bn(i,t,e,n)},async transform(t,e){const{password:n,strength:o,l:a,ready:s}=i;if(n?(await async function(t,e,n,r){const o=await Fn(t,e,n,An(r,0,wn[e])),i=An(r,wn[e]);if(o[0]!=i[0]||o[1]!=i[1])throw zn(t),new d(rn)}(i,o,n,An(t,0,wn[o]+2)),t=An(t,wn[o]+2),r?(zn(i),e.error(new d(an))):a()):await s,i.h)return;const c=new w(t.length-hn-(t.length-hn)%16);e.enqueue(xn(i,t,c,0,hn,!0))},async flush(t){const{m:e,S:n,ready:r}=i;if(e){if(await r,i.h)return;const a=An(n,n.length-hn),s=new w(An(n,0,n.length-hn));e.process(s,!0);const c=e.digest();let u=n.length<hn?1:0;for(let t=0;t<hn;t++)u|=c[t]^a[t];if(u&&o)return void t.error(new d(on));t.enqueue(s)}}}),Rn(this,i)}}class Sn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n}){const r={};super({start(){bn(r,t,e,n)},async transform(t,e){const{password:n,strength:o,l:i,ready:a}=r;let s=Rt;if(n?(s=await async function(t,e,n){const r=cn(new w(wn[e]));return Fe(r,await Fn(t,e,n,r))}(r,o,n),i()):await a,r.h)return;const c=new w(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(xn(r,t,c,s.length,0,!1))},async flush(t){const{m:e,S:n,ready:o}=r;if(e){if(await o,r.h)return;const i=new w(n);e.process(i,!1);const a=An(e.digest(),0,hn);t.enqueue(Fe(i,a))}}}),Rn(this,r)}}function bn(t,e,r,o){n.assign(t,{ready:new g(e=>t.l=e),password:Dn(e,r),strength:o-1,S:Rt,h:!1})}function Rn(t,e){const r=t.readable.getReader(),o=new F({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw zn(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(zn(e),r.cancel(t))});n.defineProperty(t,"readable",{get:()=>o})}function xn(t,e,n,r,o,i){const{m:a,S:s}=t;s.length&&(e=Fe(s,e));const c=e.length-o,u=c-c%16;if(n=function(t,e){if(e&&e>t.length){const n=t;(t=new w(e)).set(n,0)}return t}(n,r+u),u){const t=An(n,r,r+u);t.set(An(e,0,u)),a.process(t,i)}return t.S=An(e,u),n}function zn(t){const{m:e}=t;t.h=!0,e&&e.dispose&&e.dispose()}async function Fn(t,e,r,o){t.password=null;const i=pn[e],s=await async function(t,e,r){if(gn)try{const o=await yn.importKey("raw",t,ln,!1,dn);return new w(await yn.deriveBits(n.assign({salt:e},fn),o,8*r))}catch{gn=!1}return function(t,e,n,r){const o=Je(t),i=new w(r),s=new w(e.length+4),c=new m(s.buffer);s.set(e);for(let t=1,n=0;n<r;t++,n+=Ze){c.setUint32(e.length,t),o.update(s,0,s.length);let u=o.digest();const l=u.slice();for(let t=1;t<1e3;t++){o.update(u,0,Ze),u=o.digest();for(let t=0;t<Ze;t++)l[t]^=u[t]}i.set(l.subarray(0,a.min(Ze,r-n)),n)}return i}(t,e,0,r)}(r,o,2*i+2);return t.m=function(t,e){!function(){if(!$e){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),je[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);je[0]=99;for(let t=0;t<256;t++){const e=je[t],n=en(e),r=n<<24|e<<16|e<<8|n^e;qe[t]=r,Ye[t]=r>>>8|r<<24,Ke[t]=r>>>16|r<<16,Xe[t]=r>>>24|r<<8}$e=!0}}();const n=new Int32Array(60),r=function(t,e){const n=t.length>>2,r=n+6,o=4*(r+1);let i=1;for(let r=0;r<n;r++)e[r]=t[4*r]<<24|t[4*r+1]<<16|t[4*r+2]<<8|t[4*r+3];for(let t=n;t<o;t++){let r=e[t-1];t%n==0?(r=Qe(r<<8|r>>>24)^i<<24,i=en(i)):n>6&&t%n==4&&(r=Qe(r)),e[t]=e[t-n]^r}return r}(t,n),o=new Int32Array(4),i=Je(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 m(t.buffer,t.byteOffset,t.byteLength),n=t.length;let r=0;for(;r+16<=n;r+=16)l(),e.setInt32(r,e.getInt32(r)^o[0]),e.setInt32(r+4,e.getInt32(r+4)^o[1]),e.setInt32(r+8,e.getInt32(r+8)^o[2]),e.setInt32(r+12,e.getInt32(r+12)^o[3]);if(r<n){l();for(let e=0;r<n;r++,e++)t[r]^=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=tn(a)^n[0],e=tn(s)^n[1],i=tn(c)^n[2],l=tn(u)^n[3],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[4],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[5],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[6],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[7];t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[8],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[9],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[10],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[11],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[12],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[13],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[14],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[15],t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[16],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[17],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[18],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[19],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[20],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[21],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[22],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[23],t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[24],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[25],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[26],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[27],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[28],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[29],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[30],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[31],t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[32],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[33],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[34],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[35],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[36],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[37],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[38],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[39];let h=40;r>10&&(t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[40],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[41],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[42],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[43],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[44],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[45],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[46],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[47],h=48),r>12&&(t=qe[f>>>24]^Ye[d>>>16&255]^Ke[w>>>8&255]^Xe[255&p]^n[48],e=qe[d>>>24]^Ye[w>>>16&255]^Ke[p>>>8&255]^Xe[255&f]^n[49],i=qe[w>>>24]^Ye[p>>>16&255]^Ke[f>>>8&255]^Xe[255&d]^n[50],l=qe[p>>>24]^Ye[f>>>16&255]^Ke[d>>>8&255]^Xe[255&w]^n[51],f=qe[t>>>24]^Ye[e>>>16&255]^Ke[i>>>8&255]^Xe[255&l]^n[52],d=qe[e>>>24]^Ye[i>>>16&255]^Ke[l>>>8&255]^Xe[255&t]^n[53],w=qe[i>>>24]^Ye[l>>>16&255]^Ke[t>>>8&255]^Xe[255&e]^n[54],p=qe[l>>>24]^Ye[t>>>16&255]^Ke[e>>>8&255]^Xe[255&i]^n[55],h=56),o[0]=(je[f>>>24]<<24|je[d>>>16&255]<<16|je[w>>>8&255]<<8|je[255&p])^n[h],o[1]=(je[d>>>24]<<24|je[w>>>16&255]<<16|je[p>>>8&255]<<8|je[255&f])^n[h+1],o[2]=(je[w>>>24]<<24|je[p>>>16&255]<<16|je[f>>>8&255]<<8|je[255&d])^n[h+2],o[3]=(je[p>>>24]<<24|je[f>>>16&255]<<16|je[d>>>8&255]<<8|je[255&w])^n[h+3]}}(An(s,0,i),An(s,i,2*i)),t.h&&zn(t),An(s,2*i)}function Dn(t,e){return e===dt?We(t):e}function An(t,e,n){return t.subarray(e,n)}class In extends z{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){Tn(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=kn(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new d(rn);t=t.subarray(12)}r?e.error(new d(an)):e.enqueue(kn(n,t))}})}}class Cn extends z{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){Tn(this,t,e,n)},transform(t,e){const n=this;let r,o;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=cn(new w(12));e[11]=n.passwordVerification,r=new w(t.length+e.length),r.set(vn(n,e),0),o=12}else r=new w(t.length),o=0;r.set(vn(n,t),o),e.enqueue(r)}})}}function Tn(t,e,r,o){n.assign(t,{password:e,rawPassword:r,passwordVerification:o}),function(t,e,r){const o=[305419896,591751049,878082192];if(n.assign(t,{R:o,F:new Le(o[0]),D:new Le(o[2])}),r)for(let e=0;e<r.length;e++)_n(t,r[e]);else for(let n=0;n<e.length;n++)_n(t,e.charCodeAt(n))}(t,e,r)}function kn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=Nn(t)^e[r],_n(t,n[r]);return n}function vn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=Nn(t)^e[r],_n(t,e[r]);return n}function _n(t,e){let[,n]=t.R;t.F.append([e]);const r=~t.F.get();n=On(a.imul(On(n+Un(r)),134775813)+1),t.D.append([n>>>24]);const o=~t.D.get();t.R=[r,n,o]}function Nn(t){const e=2|t.R[2];return Un(a.imul(e,1^e)>>>8)}function Un(t){return 255&t}function On(t){return 4294967295&t}function Mn(t){if(t instanceof F)return t;const e=t.getReader();return new F({async pull(t){try{const{value:n,done:r}=await e.read();r?t.close():t.enqueue(n)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function Ln(t,e){t=Mn(t);const n=e?{type:e}:{};if(typeof y.prototype.stream!=gt||new y([]).stream()instanceof F)return new l(t).blob().then(t=>e?new y([t],n):t);const r=[];return t.pipeTo(new D({write(t){r.push(t)}})).then(()=>new y(r,n))}function Bn(t){if(t instanceof D)return t;const e=t.getWriter();return new D({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Wn="Invalid codec definition",Pn="Reserved compression method",Zn="Invalid codec module",Hn="Compression method not supported",Vn=[0,8,9,99],Gn=new c,jn=new c;function qn(t){return Gn.get(t)}function Yn(){return e.from(Gn.values(),t=>n.assign({},t,jn.get(t.format)))}function Kn(t){return jn.get(t)}function Xn(t,e){const{CompressionStream:n,DecompressionStream:r}=e;if(typeof n!=gt&&typeof r!=gt)throw new d(Zn);jn.set(t,{CompressionStream:n,DecompressionStream:r})}const $n="Invalid uncompressed size",Jn="Invalid compressed data",Qn="Codec out of memory",tr="Invalid CRC32",er="deflate-raw",nr="deflate64-raw",rr="gzip",or=[31,139,8];class ir extends z{constructor(t,{chunkSize:e,CompressionStreamFallback:n,CompressionStream:r}){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,y,g,E=super.readable;const S=f&&Kn(f),b=wr(a,r,n),R=c&&o&&!l&&!S&&(!i||s)&&Boolean(b);if(i&&!s||!c||R||(h=new Be,E=hr(E,h)),o)if(S)E=mr(E,dr(S.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(R)g=new ar,E=mr(E,new b(rr,{level:u,chunkSize:e})),E=hr(E,g);else try{E=pr(E,a,{level:u,chunkSize:e},r,n)}catch(t){if(!a&&n)throw br(t);let e;try{e=new r(rr)}catch{throw br(t)}E=mr(E,e),E=hr(E,new ar)}i&&(s?E=hr(E,new Cn(t)):(y=new Sn(t),E=hr(E,y))),fr(p,E,()=>{i&&!s||!c||(p.crc32=R?g.crc32:new m(h.value.buffer).getUint32(0))})}}class ar extends z{constructor(){let t,e=10,n=new w(0);super({transform(t,r){if(e){const n=a.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(o<=8)return void(n=Fe(n,t));const i=o-8,s=a.min(i,n.length);r.enqueue(Fe(n.subarray(0,s),t.subarray(0,i-s))),n=Fe(n.subarray(s),t.subarray(i-s))},flush(){const e=Ae(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class sr extends z{constructor(t,{chunkSize:e,DecompressionStreamFallback:n,DecompressionStream:r}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:l,deflate64:f,format:p,compressionMethod:h,rawBitFlag:y,outputSize:E}=t;let S,b,R,x=super.readable;if(i&&(o?x=hr(x,new In(t)):(b=new En(t),x=hr(x,b))),c){const t=new u,o=p&&Kn(p);let i;if(o)x=mr(x,dr(o.DecompressionStream,p,{chunkSize:e,compressionMethod:h,rawBitFlag:y,uncompressedSize:E}),t);else{const o=wr(l,r,n);if(a&&!f&&s!==dt&&E!==dt&&o)try{i=new o(rr,{chunkSize:e})}catch{i=dt}if(!i)try{x=pr(x,l,{chunkSize:e,deflate64:f},r,n,t)}catch(t){if(f||E===dt||!l&&n)throw br(t);try{i=new r(rr)}catch{throw br(t)}}}i?(R=!0,x=function(t,e,n,r,o){const i=e.writable.getWriter(),a=e.readable.getReader(),s=r===dt?new Le:dt;let c,u,l=0,f=!1,p=!1;const h=new F({start(t){u=t},pull(){E()},cancel:t=>(p=!0,E(),a.cancel(t))});return async function(){const e=t.getReader();try{const t=new w(10);for(t.set(or),await i.write(t);;){await y(),await i.ready;const{value:t,done:n}=await Er(e,o);if(n)break;await i.write(t)}s&&await i.write(new w(0));const a=new w(8),c=Ae(a);c.setUint32(0,s?s.get():r,!0),c.setUint32(4,n,!0),f=!0,await i.write(a),await i.close()}catch(t){await yr(i,t),await gr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await m();if(e)break;if(l+=t.length,l>n)throw new d($n);s&&s.append(t),u.enqueue(t)}p||(p=!0,u.close())}catch(t){!function(t){p||(p=!0,u.error(t),E())}(t),await gr(a,t)}}(),h;function m(){return a.read().catch(t=>{if(f){if(!s)throw xr(t,tr);if(l!=n)throw xr(t,$n);return{done:!0}}throw Sr(t,o)})}function y(){if(!p&&u.desiredSize<=0)return new g(t=>c=t)}function E(){if(c){const t=c;c=dt,t()}}}(x,i,E,s,t)):x=function(t,e){const n=t.getReader();return new F({async pull(t){try{const{value:e,done:r}=await n.read();r?t.close():t.enqueue(e)}catch(t){throw await gr(n,t),Sr(t,e)}},cancel:t=>n.cancel(t)})}(x,t)}a&&!R&&(S=new Be,x=hr(x,S)),fr(this,x,()=>{if(S){const t=new m(S.value.buffer).getUint32(0,!1);if(s!=t)throw new d(tr)}})}}const cr=new c;function ur(t,e){if(!t)return!1;let n=cr.get(t);n||(n=new c,cr.set(t,n));let r=n.get(e);if(r===dt){try{new t(e),r=!0}catch{r=!1}n.set(e,r)}return r}function lr(t){return ur(t,er)}function fr(t,e,r){e=hr(e,new z({flush:r})),n.defineProperty(t,"readable",{get:()=>e})}function dr(t,e,n){if(!t)throw new d(Hn);return new t(e,n)}function wr(t,e,n){return t&&e?e:n&&n.requiresModule?n:void 0}function pr(t,e,n,r,o,i){const a=e&&r?r:o||r,s=n.deflate64?nr:er;let c;try{c=new a(s,n)}catch(t){if(!e||!o||a==o)throw t;c=new o(s,n)}return mr(t,c,i)}function hr(t,e){return Mn(t).pipeThrough(e)}function mr(t,e,n){const r=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await r.ready;const t=await Er(o,n);if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await yr(r,t),await gr(o,t)}}(),e.readable}async function yr(t,e){try{await t.abort(e)}catch{}}async function gr(t,e){try{await t.cancel(e)}catch{}}function Er(t,e){const n=t.read();return e?n.catch(t=>{throw e.add(t),t}):n}function Sr(t,e){return e.has(t)?t:xr(t,Rr(t)?Qn:Jn)}function br(t){return Rr(t)?xr(t,Qn):t}function Rr(t){return Ie(t)&&"Z_MEM_ERROR"==t.code}function xr(t,e){const n=new d(e);return n.cause=t,n}const zr="data",Fr="deflate",Dr="inflate";class Ar extends z{constructor(t,e){super({});const r=this,{codecType:o}=t;let i;o.startsWith(Fr)?i=ir:o.startsWith(Dr)&&(i=sr),r.outputSize=0;let a=0;const s=new i(t,e),c=super.readable,u=new z({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){n.assign(r,{inputSize:a})}}),l=new z({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==dt&&r.outputSize>t.outputSize))throw new d($n)},flush(){const{crc32:t}=s;n.assign(r,{crc32:t,inputSize:a})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(s).pipeThrough(l)})}}class Ir extends z{constructor(t){const e=[];let r=0,i=0;function a(){const n=new w(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}(!o.isFinite(t)||t<1)&&(t=262144),super({transform(n,o){for(e.push(n),r+=n.length;r>t;)i+=t,o.enqueue(a())},flush(t){r&&(i+=r,t.enqueue(function(t,e){const n=new w(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(e,r)))}}),n.defineProperty(this,"outputSize",{get:()=>i})}}const Cr="Worker startup timeout";let Tr,kr,vr,_r=()=>{};async function Nr(t){const{CompressionStream:e,CompressionStreamFallback:n}=t;return!(!n||n.requiresModule)||!(!lr(e)&&(r=e,!ur(r,rr)))||!!n&&await Ur();var r}async function Ur(){if(_r)try{return await void 0,!0}catch{}return!1}function Or(t){t.createWorker?kr=!0:Tr=!1}class Mr{constructor(t,{readable:e,writable:r},o,i){const{options:a,config:s,A:c,useWebWorkers:u,workerURI:l}=o;let{createWorker:f}=o;const{signal:d}=c;return kr&&(f=dt),n.assign(t,{I:!0,C:(t.C||0)+1,readable:e.pipeThrough(new Ir(Se(s))).pipeThrough(new Lr(c),{signal:d}),writable:r,options:n.assign({},a),T:o,workerURI:l,createWorker:f,terminate:()=>new g(e=>{const{v:n,I:r}=t;r?(t._=t._||[],t._.push(e)):(n&&(n.terminate(),t.v=null),e()),t.N=null}),U(){if(t.I){const{_:e,v:n}=t;e&&(t._=null,n&&(t.O=!0,n.terminate())),t.I=!1;const r=i(t);e&&e.forEach(t=>t(r))}}}),Tr===dt&&(Tr=typeof T!=yt),(u&&vr&&(Tr&&l||f)?vr:Wr)(t,s)}}class Lr extends z{constructor({onstart:t,onprogress:e,size:n,onend:r}){let o=0;super({async start(){t&&await Br(t,n)},async transform(t,r){o+=t.length,e&&await Br(e,o,n),r.enqueue(t)},async flush(){r&&await Br(r,o)}})}}async function Br(t,...e){try{await t(...e)}catch{}}function Wr(t,e){return{run:()=>Pr(t,e)}}async function Pr({options:t,readable:e,writable:n,U:r,T:o},i){let a,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Fr),n=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,r=e?i.CompressionStream:i.DecompressionStream;t.useCompressionStream?n&&n.requiresModule&&!lr(r)&&await u():await u()||n&&!n.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),a=new Ar(t,i),s=new Ir(Se(i));const{signal:r}=o.A;await e.pipeThrough(a).pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0,signal:r});const{crc32:c,inputSize:l,outputSize:f}=a;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(a){const e=s?s.outputSize:0;if(o.outputSize=e,Ie(t))try{t.outputSize=e}catch{}}throw t}finally{r()}function u(){return c||(c=Ur()),c}}const Zr={type:"module"},Hr="error",Vr="abort";let Gr,jr,qr;var Yr;function Kr(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Xr(t){const{v:e}=t;if(e)try{e.terminate()}catch{}t.N=null}function $r(t,e,r,o,i=!0){const{createWorker:a}=r;let s,c,u;if(a)s=a();else if(jr===dt||Gr!==t){const n=typeof t==gt;c=n?t(i):t;const a=c.startsWith("data:"),l=c.startsWith("blob:");if(a||l){o===dt&&(o=!1),o&&(u=Zr);try{s=new T(c,u)}catch(i){if(l)try{f.revokeObjectURL(c)}catch{}if(n&&l)return $r(t,e,r,o,!1);if(o)throw i;return $r(t,e,r,!0,!1)}}else{o===dt&&(o=!0),o&&(u=Zr);try{c=new f(c,e)}catch{}try{s=new T(c,u)}catch(n){if(o)return $r(t,e,r,!1,i);throw n}}Gr=t,jr=c,qr=u}else s=new T(jr,qr);return s.addEventListener("message",t=>{r.M=!0,Jr(r),async function({data:t},e){const{type:r,value:o,messageId:i,result:a,error:s,errorValue:c}=t,{reader:u,writer:l,L:f,B:p,U:h,C:m}=e,y=()=>e.C!=m;try{if(s)g(function(t,e){const{message:r,stack:o,code:i,name:a,outputSize:s,cause:c,codecImportFailed:u}=t;let l;if(l=e?e.value:n.assign(new d(r),{stack:o,code:i,name:a}),Ie(l))try{s!==dt&&(l.outputSize=s),u&&(l.codecImportFailed=!0),c&&(Ie(l.cause)||(l.cause=n.assign(new d(c.message),{name:c.name})),c.code!==dt&&l.cause.code!==c.code&&(l.cause.code=c.code)),e&&(l.name!==a&&(l.name=a),l.code!==i&&(l.code=i))}catch{}return l}(s,c));else{if("pull"==r){const{value:t,done:n}=await u.read();y()||to({type:zr,value:t,done:n,messageId:i},e)}if(r==zr){const t=new w(o);await l.ready,await l.write(t),y()||to({type:"ack",messageId:i},e)}"close"==r&&function(t){y()||(f(t),E(),h())}(a)}}catch(s){y()||(Xr(e),g(s))}function g(t){y()||(p(t),E(),Ie(t)&&t.codecImportFailed||h())}function E(){l&&l.releaseLock()}}(t,r)}),s.addEventListener(Hr,t=>Qr(t,r)),s.addEventListener("messageerror",t=>Qr(t,r)),s}function Jr(t){const{W:e}=t;e&&(_(e),t.W=null)}function Qr(t,e){t.preventDefault&&t.preventDefault(),Jr(e);const{M:r,B:o,writer:i,U:a}=e;Xr(e),r||(e.v=null);let s=t.error||new d(t.message||Hr);r||(s=n.assign(new d(s.message||Hr),{P:!0}),e.Z=s),o&&(o(s),i&&i.releaseLock(),r&&a())}function to(t,{v:e,writer:n}){try{const{value:n}=t;if(n){t.value=De(n);try{e.postMessage(t,[t.value.buffer])}catch{e.postMessage(t)}}else e.postMessage(t)}catch(t){throw n&&n.releaseLock(),t}}Yr=function(t,e){const{baseURI:r,chunkSize:i,workerStartupTimeout:a}=e;let{wasmURI:s}=e;if(!t.N){let c;typeof s==gt&&(s=s());try{c=$r(t.workerURI,r,t)}catch{return Or(t),Wr(t,e)}n.assign(t,{v:c,M:!1,O:!1,Z:null,N:{run:async()=>{try{return await async function(t,e){if(!t.v){const{Z:e}=t;t.Z=null;const n=e||new d(Cr);throw n.P=!0,n}let r,i;const a=new g((e,n)=>{r=e,i=e=>{const{outputSize:r,T:o}=t;if(o.outputSize=r,Ie(e))try{e.outputSize=r}catch{}n(e)}});n.assign(t,{reader:null,writer:null,outputSize:0,H:!1,V:null,L:r,B:i,result:a});const{readable:s,options:c}=t,{writable:u,closed:l,G:f}=function(t,e){const r=new AbortController;let o;const{writable:i,readable:a}=new z({transform(t,n){e.outputSize+=t.length,n.enqueue(t)}}),s=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});s.catch(t=>{o||n.assign(e,{H:!0,V:t})});const{signal:c}=e.T.A;if(c){const t=()=>r.abort(c.reason),e=()=>c.removeEventListener(Vr,t);c.addEventListener(Vr,t),s.then(e,e)}return{writable:i,closed:s,G:()=>{o=!0,r.abort()}}}(t.writable,t);try{to({type:"start",options:c,config:e},t)}catch(e){f();try{await l}catch{}throw t.U(),e}n.assign(t,{reader:s.getReader(),writer:u.getWriter()});const{workerStartupTimeout:w}=e;!t.M&&o.isFinite(w)&&w>=0&&(t.W=v(()=>function(t){if(t.W=null,t.M)return;const{B:e,writer:n}=t;if(Xr(t),t.v=null,e){const t=new d(Cr);t.P=!0,e(t),n&&n.releaseLock()}}(t),w));try{const t=await a;return await p(),await l,t}catch(e){await p(),f();try{await l}catch{}const{outputSize:n,T:r,H:o,V:i}=t;r.outputSize=n;const a=Ie(e)&&(e.codecImportFailed||e.P),s=o&&!a?i:e;if(Ie(s))try{s.outputSize=n}catch{}throw s}async function p(){if(!u.locked)try{await u.getWriter().close()}catch{}}}(t,{chunkSize:i,wasmURI:s,baseURI:r,workerStartupTimeout:a})}catch(n){if(n&&n.P)return Or(t),Kr(t),Pr(t,e);if(n&&n.codecImportFailed){if(t.reader)return Kr(t),Pr(t,e);t.U()}throw n}}}})}return t.N},vr=Yr;let eo=[];const no=[];let ro,oo,io=0;async function ao(t,e){const{options:n,config:r}=e,{useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:d,codecURI:w}=n,{workerURI:p,createWorker:h,maxWorkers:m}=r;d&&(w&&(n.codecURI=function(t,e){try{return new f(t,e).toString()}catch{return t}}(w,r.baseURI)),await async function(t,e){!jn.has(t)&&e&&Xn(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(d,n.codecURI));const y=!(s||c||u||l),E=d===dt||Boolean(n.codecURI);return e.useWebWorkers=!y&&E&&(i||i===dt&&r.useWebWorkers),e.workerURI=e.useWebWorkers&&p?p:dt,e.createWorker=e.useWebWorkers&&h?h:dt,n.useCompressionStream=a||a===dt&&r.useCompressionStream,(await async function(){const n=eo.find(t=>!t.I);if(n)return po(n),new Mr(n,t,e,S);if(eo.length<m){const n={j:io};return io++,eo.push(n),new Mr(n,t,e,S)}return new g(n=>{no.push({resolve:n,stream:t,T:e}),oo=r.workerStarvationTimeout,so()})}()).run();function S(t){if(co(),t.O)return t.O=!1,lo();if(no.length){const[{resolve:e,stream:n,T:r}]=no.splice(0,1);e(new Mr(t,n,r,S)),so()}else t.v?(po(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;o.isFinite(r)&&r>=0&&(t.Y=v(async()=>{eo=eo.filter(e=>e!=t);try{await t.terminate()}catch{}},r))}(t,e)):eo=eo.filter(e=>e!=t)}}function so(){!ro&&no.length&&o.isFinite(oo)&&oo>=0&&(ro=v(uo,oo))}function co(){ro&&(_(ro),ro=null)}function uo(){if(ro=null,no.length){const[{resolve:t,stream:e,T:n}]=no.splice(0,1);t(new Mr({},e,fo(n),wo)),so()}}function lo(){const t=no.splice(0).map(({resolve:t,stream:e,T:n})=>new g(r=>{t(new Mr({},e,fo(n),()=>{wo(),r()}))}));return co(),g.all(t)}function fo(t){return n.assign({},t,{useWebWorkers:!1,workerURI:dt,createWorker:dt})}function wo(){co(),so()}function po(t){const{Y:e}=t;e&&(_(e),t.Y=null)}const ho="\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 mo(t,e){return go(t,e,!0)}function yo(t){if(!t.some(t=>t>127))return!1;try{return new S("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function go(t,e,n){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let n=0;n<t.length;n++)e+=ho[t[n]];return e}(t):new S(e,{ignoreBOM:n}).decode(t)}const Eo="HTTP error ",So="HTTP Range not supported",bo="HTTP resource changed",Ro="Writer iterator completed too soon",xo="Writer not initialized",zo="Invalid writer (size must be writable)",Fo="Content-Range",Do="Range",Ao="GET",Io="bytes",Co=16777216,To="writable",ko=k();class vo{constructor(){this.size=0}init(){this.initialized=!0}}class _o extends vo{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:n=Se(Ee())}={}){const r=this;let o=0;return n=be(n),new F({async pull(i){const s=e===dt?n:a.min(n,e-o),c=await gi(r,t+o,s);c.length&&(i.enqueue(c),o+=c.length),(e!==dt&&o>=e||!c.length&&s)&&i.close()}})}}class No extends vo{constructor(){super();const t=this,e=new D({write(e){if(!t.initialized)throw new d(xo);return t.writeUint8Array(De(e))}});n.defineProperty(t,To,{get:()=>e})}writeUint8Array(){}}class Uo extends _o{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;n.assign(this,{K:t,X:r,size:a.floor(.75*(e-r))})}readUint8Array(t,e){const{X:n,K:r}=this,o=new w(e),i=4*a.floor(t/3),s=atob(r.substring(i+n,4*a.ceil((t+e)/3)+n)),c=t-3*a.floor(i/4);let u=0;for(let t=c;t<c+e&&t<s.length;t++)o[t-c]=s.charCodeAt(t),u++;return u<o.length?o.subarray(0,u):o}}class Oo extends No{constructor(t){super(),n.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let n,o=e.$;const i=e.$.length;for(e.$="",n=0;n<3*a.floor((i+t.length)/3)-i;n++)o+=r.fromCharCode(t[n]);for(;n<t.length;n++)e.$+=r.fromCharCode(t[n]);o.length>2?e.data+=x(o):e.$=o+e.$}getData(){return this.data+x(this.$)}}let Mo,Lo;class Bo extends _o{constructor(t){super(),n.assign(this,{J:t,size:t.size}),Lo||(Lo=(async()=>{try{const t=new y([new w(3)]).slice(1,2).stream().getReader();let e=0,n=await t.read();for(;!n.done;)e+=n.value.length,n=await t.read();Mo=1==e}catch{Mo=!1}})())}createReadable(t){const{J:e,size:n}=this,{offset:r=0,size:o=n-r}=t||{};if(typeof e.stream==gt){if(!r&&o>=n)return Mn(e.stream());if(Mo)return Mn(e.slice(r,r+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const n=this,r=t+e,o=!t&&r>=n.size?n.J:n.J.slice(t,r);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,r)),new w(i)}}class Wo extends vo{constructor(t){super();const e=this,r=new z;n.defineProperty(e,To,{get:()=>r.writable}),e.contentType=t,e.et=Ln(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class Po extends Bo{constructor(t){super(new y([t],{type:"text/plain"}))}}function Zo(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:r<56320&&56320==(64512&t.charCodeAt(n+1))?(e+=4,n++):e+=3}return e}class Ho extends Wo{constructor(t){super(),n.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,n=await super.getData();return n.text&&e?n.text():function(t,e){return go(t,e,!1)}(new w(await n.arrayBuffer()),t)}}class Vo extends _o{constructor(t,e){super(),jo(this,t,e)}async init(){await qo(this,ai,ni),super.init()}createReadable(t){const e=this,{useRangeHeader:n,forceRangeRequests:r,size:o,ot:i}=e;if((n||r)&&o!==dt){const{offset:n=0,size:r=o-n}=t||{},s=i&&n>=o-i.length;if(r>0&&n<o&&!s)return function(t,e,n){let r,o=e,i=0,s=n;return new F({start:()=>c(),async pull(t){r||await c();const{value:e,done:n}=await r.read();if(n)throw new d(So);const o=e.length>i?e.subarray(0,i):e;i-=o.length,s-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=r;r=dt,await t.cancel()}(),s||t.close())},cancel:t=>r&&r.cancel(t)});async function c(){const e=a.min(t.maximumRangeSize,s),n=await ai(Ao,t,ti(t,o,e));if(206!=n.status)throw new d(So);const c=Ko(n);if(c!==dt&&c!=o)throw new d(So);Qo(t,n),Jo(t,n),o+=e,i=e,r=n.body.getReader()}}(e,n,a.min(r,o-n))}return super.createReadable(t)}readUint8Array(t,e){return Yo(this,t,e,ai,ni)}}class Go extends _o{constructor(t,e){super(),jo(this,t,e)}async init(){await qo(this,si,ri),super.init()}readUint8Array(t,e){return Yo(this,t,e,si,ri)}}function jo(t,e,r){const{preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c=!0,maximumRangeSize:u=Co,fetch:l}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,n.assign(t,{url:e,options:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c,maximumRangeSize:u,fetch:l})}async function qo(t,e,n){const{url:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Ee(),{protocol:n}=new f(t,e);return"http:"==n||"https:"==n}(r)&&(i||a)&&(typeof o==yt||o)){const r=await e(Ao,t,ti(t,s?-65557:void 0)),o=r.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==Io))throw new d(So);{let o;s&&206==r.status&&(o=new w(await r.arrayBuffer())),Jo(t,r);const i=Xo(r);i===dt?await ii(t,e,n):t.size=i,o&&o.length&&Ko(r)===t.size-o.length&&(t.ot=o)}}else await ii(t,e,n)}async function Yo(t,e,n,r,o){const{useRangeHeader:i,forceRangeRequests:a,ot:s,size:c,options:u}=t;if(i||a){if(e>=c||0===n)return Rt;{if(e+n>c&&(n=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+n)}const o=await r(Ao,t,ti(t,e,n));if(206!=o.status)throw new d(So);const i=Ko(o);if(i!==dt&&i!=e)throw new d(So);Qo(t,o),Jo(t,o);const a=new w(await o.arrayBuffer());if(a.length!=n)throw new d(So);return a}}{const{data:r}=t;return r||await o(t,u),t.data.subarray(e,e+n)}}function Ko(t){const e=t.headers.get(Fo);if(e){const t=o(e.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t))return t}}function Xo(t){const e=t.headers.get(Fo);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=o(t);if(!o.isNaN(e))return e}}}function $o({headers:t}){return{it:t.get("Etag")||dt,lastModified:t.get("Last-Modified")||dt}}function Jo(t,e){const{checkResourceChanges:n,st:r}=t;n&&!r&&206==e.status&&(t.st=$o(e))}function Qo(t,e){const{checkResourceChanges:r,st:o,size:i}=t;if(r){const t=Xo(e);if(t!==dt&&i!==dt&&t!=i)throw new d(bo);if(o){const t=$o(e);if(n.entries(o).some(([e,n])=>n!==dt&&t[e]!==dt&&n!=t[e]))throw new d(bo)}}}function ti(t,e=0,r=1){return n.assign({},ei(t),{[Do]:Io+"="+(e<0?e:e+"-"+(e+r-1))})}function ei({options:t}){const{headers:e}=t;if(e)return k.iterator in e?n.fromEntries(e):e}async function ni(t){await oi(t,ai)}async function ri(t){await oi(t,si)}async function oi(t,e){const n=await e(Ao,t,ei(t));t.data=new w(await n.arrayBuffer()),t.size=t.data.length}async function ii(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=await e("HEAD",t,ei(t)),i=r.headers.get("Content-Length");i&&!r.headers.get("Content-Encoding")?t.size=o(i):await n(t,t.options)}}async function ai(t,{fetch:e=fetch,options:r,url:o},i){const a=await e(o,n.assign({},r,{method:t,headers:i}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new d(So):new d(Eo+(a.statusText||a.status))}function si(t,{url:e},r){return new g((o,i)=>{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 n=e.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(n)}),o({status:a.status,arrayBuffer:()=>a.response,headers:new c(t)})}else i(416==a.status?new d(So):new d(Eo+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>i(t.detail?t.detail.error:new d("Network error")),!1),a.open(t,e),r)for(const t of n.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class ci extends _o{constructor(t,e={}){super(),n.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Go(t,e):new Vo(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 ui extends _o{constructor(t){super(),t=new w(t.buffer,t.byteOffset,t.byteLength),n.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class li extends No{constructor(t){super(),this.ut=t||262144}init(t=0){n.assign(this,{offset:0,ct:new w(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,n=e.offset+t.length;if(n>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<n;)t*=2;const r=e.ct;e.ct=new w(t),e.ct.set(r)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class fi extends _o{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await g.all(t.lt.map(yi));t.wt=e.map(e=>{const n=t.size;return t.size+=e.size,n}),super.init()}ht(t){const{wt:e,size:n}=this,r=e[t];return r===dt?n:r}async readUint8Array(t,e){const n=this,{lt:r}=this;let o,i=0,s=t;for(;r[i]&&s>=r[i].size;)s-=r[i].size,i++;const c=r[i];if(c){const r=c.size;if(s+e<=r)o=await gi(c,s,e);else{const i=r-s;o=Fe(await gi(c,s,i),await n.readUint8Array(t+i,e-i))}}else o=Rt;return n.ft=a.max(i,n.ft),o}}class di extends vo{constructor(t,e=4294967295){super();const r=this;let o,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const s=new D({async write(e){if(e===ko)return void(a&&await u());const{availableSize:n}=r;if(a)e.length>=n?(await c(e.subarray(0,n)),await u(),e.length>n&&await this.write(e.subarray(n))):await c(e);else{const{value:n,done:s}=await t.next();if(s&&!n)throw new d(Ro);o=n,o.size=0,o.maxSize&&(r.maxSize=o.maxSize),r.availableSize=r.maxSize,await mi(o),i=n.writable,a=i.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await l())},async abort(t){a&&await a.abort(t)}});async function c(t){const e=t.length;e&&(await a.ready,await a.write(t),o.size+=e,r.availableSize-=e)}async function u(){await l(),r.diskOffset+=o.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function l(){await a.close()}n.defineProperty(r,To,{get:()=>s})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(ko)}finally{t.releaseLock()}}}class wi{constructor(t){return e.isArray(t)&&(t=new fi(t)),(t instanceof F||typeof t.getReader==gt)&&(t={readable:Mn(t)}),t}}class pi{constructor(t){t.writable===dt&&typeof t.next==gt&&(t=new di(t)),(t instanceof D||typeof t.getWriter==gt)&&(t={writable:Bn(t)});try{t.size=t.size===dt?0:t.size}catch{throw new d(zo)}return t}}function hi(t){return Boolean(t&&t.getData)}async function mi(t,e){if(!t.init||t.initialized)return g.resolve();await t.init(e)}async function yi(t){return t=new wi(t),await mi(t),t.size!==dt&&t.readUint8Array||(t=new Bo(await Ln(t.readable)),await mi(t)),t}function gi(t,e,n){return t.readUint8Array(e,n)}function Ei(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?_o.prototype.createReadable.call(t,e):t.readable}function Si(t,e,n){if(!t.some(t=>t.reason==e)){const r={reason:e};n!==dt&&(r.filename=n),t.push(r)}}const bi="filename",Ri="rawFilename",xi="comment",zi="rawComment",Fi="uncompressedSize",Di="compressedSize",Ai="offset",Ii="diskNumberStart",Ci="lastModDate",Ti="rawLastModDate",ki="lastAccessDate",vi="rawLastAccessDate",_i="creationDate",Ni="rawCreationDate",Ui="internalFileAttributes",Oi="externalFileAttributes",Mi="msdosAttributesRaw",Li="msdosAttributes",Bi="msDosCompatible",Wi="zip64",Pi="encrypted",Zi="version",Hi="versionMadeBy",Vi="zipCrypto",Gi="directory",ji="executable",qi="compressionMethod",Yi="signature",Ki="extraField",Xi="unixMode",$i="setuid",Ji="setgid",Qi="sticky",ta=[bi,Ri,Fi,Di,Ci,Ti,xi,zi,ki,vi,_i,Ni,Ai,Ii,Ui,Oi,Mi,Li,Bi,Wi,Pi,Zi,Hi,Vi,Gi,ji,"symlink",qi,Yi,"crc32",Ki,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Xi,"unixExternalUpper",$i,Ji,Qi,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class ea{constructor(t){ta.forEach(e=>this[e]=t[e])}}const na=new u([1,$,10,J,28789,25461,Q,tt,et,22613,13]);function ra(t,e,n){return t?e?12:16+4*n:0}const oa="File format is not recognized",ia="End of central directory not found",aa="End of Zip64 central directory locator not found",sa="Central directory header not found",ca="File contains encrypted entry",ua="Encryption method not supported",la="Split zip file",fa="Entry data out of bounds",da="Ambiguous archive",wa="Encrypted central directory is not supported",pa="Unsafe filename",ha="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",ma="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",ya="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",ga="64-bit value exceeds Number.MAX_SAFE_INTEGER",Ea="unsorted central directory",Sa="unknown version needed to extract",ba="compressed patched data",Ra="malformed extra field",xa="unknown zip64 extensible data",za="wrapped entries count",Fa="appended data",Da="prepended data",Aa="prepended central directory",Ia="trailing central directory data",Ca="mismatched central directory offset",Ta="missing zip64 extra field",ka="duplicate filename",va="mismatched zip64 end of central directory record",_a="multiple end of central directory records",Na="mismatched local file header (filename)",Ua="mismatched local file header (general purpose bit flag)",Oa="mismatched local file header (compression method)",Ma="mismatched local file header (crc32 or sizes)",La=/^[a-zA-Z]:/,Ba=/(^|[\\/])\.\.([\\/]|$)/,Wa="utf-8",Pa="cp437",Za=[[Fi,O],[Di,O],[Ai,O],[Ii,M]],Ha={[M]:{yt:Ts,bytes:4},[O]:{yt:ks,bytes:8}},Va=i(o.MAX_SAFE_INTEGER);class Ga{constructor(t,e={}){n.assign(this,{reader:new wi(t),options:e,gt:{Et:new u,St:[],bt:[]},Rt:new WeakSet})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;if(await mi(r),r.size!==dt&&r.readUint8Array||(r=new Bo(await Ln(r.readable)),await mi(r)),r.size<Y)throw new d(oa);const i=e.warnings=[],s=ws(t,e.options),c=s==Ht,l=s!=Gt,f=ms(zs(e,t,Lt),s),p=function(t,e){if(t===dt)return e;if(!ds(t))throw new d(ma);return t}(zs(e,t,"filenameValidation"),s),h=zs(e,t,"normalizeFilename"),{xt:m,zt:y}=await ys(r,l,f);if(!m)throw await async function(t){return await fs(t)==W}(r)?new d(la):new d(ia);l&&y>1&&xs(_a);const g=Ae(m);let E=Ts(g,12),S=Ts(g,16);const b=m.offset,R=Cs(g,20),x=b+Y+R,F=r.size-x;F>f&&xs(Fa),F>0&&Si(i,Fa);let D=Cs(g,4);const A=r.ft||0;let I,C,T,k,v,_=Cs(g,6),N=Cs(g,10),U=0,P=X;const V=S==O||E==O||N==M||_==M;if(S!=O&&_!=M&&(S+=ls(r,_)),V){const t=m.offset>=K?await gi(r,m.offset-K,K):Rt,e=Ae(t);if(t.length==K&&Ts(e,0)==j){S=ls(r,Ts(e,4))+ks(e,8);let t=await gi(r,S,X),s=Ae(t);if(t.length<X||Ts(s,0)!=G){const e=m.offset-K;let n=e-X;if(await Ja(r,n,G)||(n=await async function(t,e){const n=a.max(0,e-65591),r=await gi(t,n,e-n),i=Ae(r);for(let t=r.length-X;t>=0;t--)if(Ts(i,t)==G&&t+12+o(i.getBigUint64(t+4,!0))==r.length)return n+t}(r,e)),n!==dt&&n>=0&&S!=n){const e=S;S=n,S>e&&(U=S-e),t=await gi(r,S,X),s=Ae(t)}}if(t.length<X||Ts(s,0)!=G)throw new d(aa);if(T=!0,k=ks(s,4)>44,k){const t=a.min(ks(s,4)-44,r.size-S-X);t>0&&(P+=t,v=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Ae(t),o=Cs(r,26);n.assign(e,{compressionMethod:Cs(r,0),compressedSize:ks(r,2),uncompressedSize:ks(r,10),encryptionAlgorithm:Cs(r,18),bitLength:Cs(r,20),flags:Cs(r,22),hashAlgorithm:Cs(r,24),hashData:t.subarray(28,28+o)})}return e}(await gi(r,S+X,t)))}D==M?D=Ts(s,16):D!=Ts(s,16)&&Rs(c,i,va),_==M?_=Ts(s,20):_!=Ts(s,20)&&Rs(c,i,va),N==M?N=ks(s,32):N!=ks(s,32)&&Rs(c,i,va),E==O?E=ks(s,40):E!=ks(s,40)&&Rs(c,i,va),S=ls(r,_)+ks(s,48)+U}else if(S==O||E==O||_==M)throw new d(aa)}let $=E;const J=m.offset-(T?P+K:0);if(A!=D)throw new d(la);if(S<0)throw new d(oa);let Q=0,tt=S<r.size?await gi(r,S,E):Rt,et=Ae(tt);if(E){let t=J-E;if(S!=t&&_==D){const e=tt.length>=4&&(Ts(et,Q)==H||Boolean(v&&v.compressedSize)||Ka(et));if(!e&&t<0)throw new d(oa);let n=!e;if(t>=0&&t+4<=r.size){let o=await $a(r,t);if(!o){const e=await async function(t,e){const n=a.max(0,e-65541),r=await gi(t,n,e-n),o=Ae(r);for(let t=r.length-6;t>=0;t--)if(Ts(o,t)==Z&&t+6+Cs(o,t+4)==r.length)return n+t}(r,J),n=e-E;e!==dt&&n>=0&&await $a(r,n)&&(t=n,o=!0)}e&&(n=o)}if(n&&t!=S){const n=S;S=t,tt=await gi(r,S,E),et=Ae(tt);const o=S-n,s=function(t,e){if(t.length<q)return dt;const n=Ts(e,42);if(n!=O)return n;let r=q+Cs(e,28);const o=a.min(r+Cs(e,30),t.length);for(;r+4<=o;){const t=Cs(e,r),n=Cs(e,r+2);if(1==t){let t=r+4;return Ts(e,24)==O&&(t+=8),Ts(e,20)==O&&(t+=8),t+8<=o?ks(e,t):dt}r+=4+n}return dt}(tt,et),u=s!==dt&&await Ja(r,s,B),l=s!==dt&&await Ja(r,s+o,B);o>0&&(!u||l)?(U+=o,I=e):(Rs(c,i,Ca),o<0&&!u&&l&&(U+=o))}}if(tt.length<4)throw new d(oa)}else!N&&S<J&&_==D&&(U+=J-S,S=J);const nt=J-S;if(E!=nt&&nt>=0&&_==D&&(E=nt,tt=await gi(r,S,E),et=Ae(tt)),S<0||S>=r.size)throw new d(oa);e.directoryOffset=S,e.directoryLength=$;const rt=Fs(e,t,"decryptCentralDirectory");let ut,lt;if(rt&&N&&tt.length>=4&&Ts(et,0)!=H&&(k||Ka(et))){const t=function(t,e,n){const r=t&&t.compressedSize?t.compressedSize:e;return r>0&&r<=n?r:n}(v,$,tt.length);lt=tt.subarray(t),tt=await rt(tt.subarray(0,t),v),et=Ae(tt),$=tt.length,ut=!0}v&&!ut&&(tt.length<4||Ts(et,0)==H)&&Si(i,xa),C=S;const ft=zs(e,t,"filenameEncoding"),wt=zs(e,t,"commentEncoding"),pt=new u;let ht,yt=-1;const gt=!c&&!T;!N&>&&(N=Xa(et,tt,Q),N&&Si(i,za));const Et=n.assign({},e.options,t,{[Mt]:s});delete Et[It];for(let o=0;o<N;o++){const s=new Ya(r,Et);if(Q+q>tt.length||Ts(et,Q)!=H){if(0==o&&!ut&&(k||Ka(et)))throw new d(wa);throw new d(sa)}ts(s,et,Q+6);const u=Boolean(s.bitFlag.languageEncodingFlag),l=Q+q,f=l+s.filenameLength+s.extraFieldLength,m=Cs(et,Q+4),y=!(m>>8),g=m>>8==3,E=Cs(et,Q+32),S=f+E,b=new w(tt.subarray(l,S)),R=b.subarray(0,s.filenameLength),x=b.subarray(s.filenameLength+s.extraFieldLength),F=u||!ft&&yo(R),D=u||!wt&&yo(x),A=Ts(et,Q+38),I=A&L,T={readOnly:Boolean(1&I),hidden:Boolean(2&I),system:Boolean(4&I),directory:Boolean(16&I),archive:Boolean(32&I)},v=Ts(et,Q+42),_=Fs(e,t,"decodeText")||mo,B=F?Wa:ft||Pa,W=D?Wa:wt||Pa;let P=_(R,B,Pt);P===dt&&(P=mo(R,B));let Z,V=_(x,W,Zt);V===dt&&(V=mo(x,W)),n.assign(s,{index:o,Ft:ut,versionMadeBy:m,msDosCompatible:y,zip64:!1,compressedSize:0,uncompressedSize:0,Dt:E,offset:v,diskNumberStart:Cs(et,Q+34),internalFileAttributes:Cs(et,Q+36),externalFileAttributes:A,msdosAttributesRaw:I,msdosAttributes:T,rawFilename:R,filenameUTF8:F,commentUTF8:D,rawExtraField:b.subarray(s.filenameLength,s.filenameLength+s.extraFieldLength),rawComment:x,filename:P,comment:V});try{Z=es(s,s,et,Q+6)}catch(t){if(c||t.message!=mt)throw t;s.At=!0,Si(i,Ta,s.filename)}if(P=s.filename,h){const t=h(P);t!==dt&&(P=s.filename=t)}if(hs(P,p)){const t=new d(pa);throw t.filename=P,t}if(Z&&Si(i,Ra,P),s.At&&s.offset==O)C=0;else{s.offset+=U;const t=ls(r,s.diskNumberStart)+s.offset;C=a.min(t,C),t<yt&&Si(i,Ea,P),yt=t}(s.version&L)>63&&Si(i,Sa,P),32&~s.rawBitFlag||Si(i,ba,P),pt.has(s.filename)&&(ht=!0),pt.add(s.filename);const G=s.externalFileAttributes>>16&M;s.unixMode===dt&&16877&G&&(s.unixMode=G);const j=Boolean(s.unixMode&at),Y=Boolean(s.unixMode&st),K=Boolean(512&s.unixMode),X=40960==((s.unixMode===dt?G:s.unixMode)&ot),$=s.unixMode!==dt&&(s.unixMode&ot)==it||(G&ot)==it||y&&T.directory||s.filename.endsWith(ct),J=!X&&!$&&(s.unixMode!==dt?!!(73&s.unixMode):g&&!!(73&G));n.assign(s,{setuid:j,setgid:Y,sticky:K,symlink:X,unixExternalUpper:G,executable:J,directory:$,zipCrypto:s.encrypted&&!s.extraFieldAES});const nt=new ea(s);if(s.At&&e.Rt.add(nt),nt.getData=(t,n)=>s.getData(t,nt,e,n),nt.arrayBuffer=async t=>{const r=new z,o=Ln(r.readable).then(t=>t.arrayBuffer());return o.catch(()=>{}),await s.getData(r,nt,e,n.assign({},t,{preventClose:!1})),o},Q=S,o==N-1&>){const t=Xa(et,tt,Q);t&&(N+=t,Si(i,za))}const{onprogress:rt}=t;if(rt)try{await rt(o+1,N,new ea(s))}catch{}yield nt}let St=Q,bt=Qa(tt.subarray(Q))||(ut?Qa(lt):dt);if(!bt&&!ut){const t=S+Q,e=a.min(J-t,65541);e>=6&&(bt=Qa(await gi(r,t,e)))}bt&&(e.digitalSignature=bt,St=Q+6+bt.length),(Q!=$&&St!=$||!ut&&Q!=E&&St!=E)&&Rs(c,i,Ia),ht&&Rs(c,i,ka);const xt=zs(e,t,"extractPrependedData"),zt=zs(e,t,"extractAppendedData"),Ft=(c||xt)&&N&&4==C&&await async function(t){const e=await fs(t);return e==W||808471376==e}(r)?4:0;return c&&(U>0||N&&C>Ft)&&xs(Da),(U>0||N&&C>4)&&Si(i,Da),I&&Si(i,Aa),xt&&(e.prependedData=C>Ft?await gi(r,Ft,C-Ft):Rt),e.comment=R?await gi(r,b+Y,R):Rt,zt&&(e.appendedData=x<r.size?await gi(r,x,r.size-x):Rt),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[xt](){return this.close()}}class ja{constructor(t={}){let r;const{readable:o,writable:i}=new z({start(t){r=t}}),a=new Ga(o,t),s=a.getEntriesGenerator(),c=new u;this.readable=new F({async pull(t){const{done:e,value:r}=await s.next();if(e)return t.close();const o=function(t,e){const{readable:n,writable:r}=new z;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):n.cancel(t))}};return i.readable=new F({async pull(a){o||(o=n.getReader(),e.add(i),async function(){try{await t.getData(r,{preventClose:!1})}catch(t){try{await r.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,c),i={...r,readable:o.readable};delete i.getData,n.defineProperties(i,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(i)},async cancel(t){const n=e.from(c);c.clear(),r.error(t),await g.allSettled(n.map(e=>e.cancel(t))),await g.allSettled([s.return(),a.close()])}}),this.writable=i}}async function qa(t,e={}){if(t=new wi(t),await mi(t),t.size!==dt&&t.readUint8Array||(t=new Bo(await Ln(t.readable)),await mi(t)),t.size<Y)return!1;const n=ws(e,{}),r=n!=Gt,o=ms(e[Lt],n),{xt:i,zt:a}=await ys(t,r,o);if(!i||n==Ht&&a>1)return!1;const s=Cs(Ae(i),20),c=i.offset+Y+s;return t.size-c<=o}let Ya=class{constructor(t,e){n.assign(this,{reader:t,options:e})}async getData(t,e,r,o={}){const i=this,{gt:s,directoryOffset:c}=r;if(i.At)throw new d(mt);const u=Ee(),{reader:l,index:f,offset:w,diskNumberStart:p,extraFieldAES:h,extraFieldZip64:m,compressionMethod:y,bitFlag:g,rawBitFlag:E,crc32:S,rawLastModDate:b,uncompressedSize:R,compressedSize:x}=i,{dataDescriptor:z}=g,F=e.localDirectory={},A=e.warnings=[],I=ls(l,p)+w,C=await gi(l,I,ut),T=Ae(C);let k=zs(i,o,zt),v=zs(i,o,Ft);const _=ne(zs(i,o,Dt)),N=Boolean(_),U=!0===_;if(ee(k,v),k=k&&k.length?k:dt,v=v&&v.length?v:dt,h&&99!=h.originalCompressionMethod)throw new d(Hn);if(C.length<ut||Ts(T,0)!=B)throw new d(pt);ts(F,T,4);const{extraFieldLength:O,filenameLength:M}=F,W=F.dataOffset=I+ut+M+O,P=zs(i,o,"checkLocalDirectory"),Z=ws(o,i.options),H=function(t,e){return t===dt?e!=Gt:Boolean(t)}(P,Z),V=zs(i,o,"checkLocalFilename"),G=function(t,e){return t===dt?e==Ht:Boolean(t)}(V===dt?P:V,Z);let j=Rt;if(G&&(M||O)){const t=await gi(l,I+ut,M+O);j=t.subarray(0,M),F.rawExtraField=t.subarray(M)}else F.rawExtraField=O?await gi(l,I+ut+M,O):Rt;G&&(F.rawFilename=j),es(i,F,T,4,!0)&&Si(A,Ra),function(t,e,n,r,o){const{rawFilename:i}=t,a=!o,s=t.Ft&&(e.rawBitFlag&rt)==rt;!r||s||n.length==i.length&&!n.some((t,e)=>t!=i[e])||Rs(a,o,Na),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&Rs(a,o,Ua),e.compressionMethod!=t.compressionMethod&&Rs(a,o,Oa),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Rs(a,o,Ma)}(i,F,j,G,H?dt:A);const{lastAccessDate:q,creationDate:Y,uid:K,gid:X}=F;q&&e.lastAccessDate===dt&&(e.lastAccessDate=q),Y&&e.creationDate===dt&&(e.creationDate=Y),K!==dt&&e.uid===dt&&(e.uid=K),X!==dt&&e.gid===dt&&(e.gid=X);const $=zs(i,o,"checkPasswordOnly"),J=i.encrypted&&(!U||$),Q=J&&!h;if(U||(e.zipCrypto=Q),J&&!(64&~i.rawBitFlag))throw new d(ua);const tt=N?dt:qn(y);if(0!=y&&8!=y&&9!=y&&!tt&&!N)throw new d(Hn);if(J){if(!Q&&(h.strength<1||h.strength>3))throw new d(ua);if(!k&&!v)throw new d(ca)}if(W+x>a.min(l.size,c))throw new d(fa);const et=x,nt=Qt(zs(i,o,At));te(nt);let ot=zs(i,o,"checkOverlappingEntry");const it=zs(i,o,"checkOverlappingEntryOnly");it&&(ot=!0);const{onstart:at,onprogress:st,onend:ct}=o,lt=0!=y&&!N,ft=N?x-ra(J,Q,h&&h.strength):R,wt=9==y;let yt=zs(i,o,Tt);wt&&(yt=!1);const gt=zs(i,o,"checkCrc32"),Et=(gt===dt?zs(i,o,"checkSignature"):gt)&&!N&&(!J||Q||h&&1==h.vendorVersion),St={options:{codecType:Dr,password:k,rawPassword:v,zipCrypto:Q,encryptionStrength:h&&h.strength,checkCrc32:Et,checkAuthenticationCode:zs(i,o,"checkAuthenticationCode"),passwordVerification:Q&&(z?b>>>8&L:S>>>24&L),outputSize:ft,crc32:S,compressed:lt,encrypted:J,useWebWorkers:zs(i,o,Ct),useCompressionStream:yt,deflate64:wt,format:tt?tt.format:dt,codecURI:tt?tt.codecURI:dt,compressionMethod:y,rawBitFlag:E,checkPasswordOnly:$},config:u,A:{signal:nt,size:et,onstart:at,onprogress:st,onend:ct}};let bt,xt,It;ot&&(await async function({reader:t,It:e,index:n,offset:r,crc32:o,compressedSize:i,uncompressedSize:a,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,gt:l}){let f=0;if(c){const n=Boolean(u),r=await ss(t,s+i,{crc32:o,compressedSize:i,uncompressedSize:a,zip64:n});r?(e.localDirectory.dataDescriptor=r,f=us(r.zip64,r.signature)):f=us(n,!1)}const w={start:r,end:s+i+f,It:e},{Et:p,St:h,bt:m}=l;if(!p.has(n)){const t=function(t,e){let n=0,r=t.length;for(;n<r;){const o=n+r>>>1;t[o].start<e.start?n=o+1:r=o}const o=t[n-1],i=t[n];return o&&as(e,o)?o:i&&as(e,i)?i:void 0}(h,w)||m.find(t=>as(w,t));if(t){const e=new d(ht);throw e.overlappingEntry=t.It,e}p.add(n),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),l.St=function(t,e){const n=[];let r=0,o=0;for(;r<t.length||o<e.length;)o==e.length||r<t.length&&t[r].start<e[o].start?n.push(t[r++]):n.push(e[o++]);return n}(h,m),m.length=0)}}({reader:l,It:e,index:f,offset:I,crc32:S,compressedSize:x,uncompressedSize:R,dataOffset:W,dataDescriptor:z||F.bitFlag.dataDescriptor,extraFieldZip64:m||F.extraFieldZip64,gt:s}),function(t,e,n){const{dataDescriptor:r}=e,o=t.Ft&&(e.rawBitFlag&rt)==rt;r&&!o&&(t.crc32!==dt&&r.crc32!=t.crc32||r.compressedSize!=t.compressedSize||r.uncompressedSize!=t.uncompressedSize)&&Rs(!n,n,Ma)}(i,F,H?dt:A));try{if(!it){$&&(t=new D),t=new pi(t),await mi(t,function(t,e,n){return a.min(t,n?1032*e:e)}(ft,x,lt)),({writable:bt}=t);const e=Mn(l.createReadable({offset:W,size:et})),{outputSize:r}=await ao({readable:e,writable:bt},St);if(te(nt),r!=ft)throw n.assign(new d($n),{outputSize:r});t.size+=r}}catch(e){if(Ie(e)&&e.outputSize!==dt&&(t.size+=e.outputSize),!$||!Ie(e)||e.message!=an)throw xt=e,It=!0,e}finally{if((hi(t)||!zs(i,o,kt))&&bt&&!bt.locked){const t=bt.getWriter();if(It)try{await t.abort(xt)}catch{}else await t.close()}}return $||it?dt:t.getData?t.getData():bt}};function Ka(t){return t.byteLength>=4&&134630224==Ts(t,0)}function Xa(t,e,n){let r=0;for(;n+q<=e.length&&Ts(t,n)==H;)n+=q+Cs(t,n+28)+Cs(t,n+30)+Cs(t,n+32),r++;return r%65536?0:r}function $a(t,e){return Ja(t,e,H)}async function Ja(t,e,n){return!(e<0||e+4>t.size)&&Ts(Ae(await gi(t,e,4)),0)==n}function Qa(t){if(t.length>=6){const e=Ae(t);if(Ts(e,0)==Z){const n=Cs(e,4);if(6+n<=t.length)return new w(t.subarray(6,6+n))}}}function ts(t,e,r){const o=t.rawBitFlag=Cs(e,r+2),i=!(1&~o),a=Ts(e,r+6);n.assign(t,{encrypted:i,version:Cs(e,r),bitFlag:{level:(6&o)>>1,dataDescriptor:!(8&~o),languageEncodingFlag:(o&nt)==nt},rawLastModDate:a,lastModDate:Ds(a),filenameLength:Cs(e,r+22),extraFieldLength:Cs(e,r+24)})}function es(t,e,r,o,i){const{rawExtraField:a}=e,u=e.extraField=new c,l=Ae(a);let f=0,w=!1;try{for(;f<a.length;){const t=Cs(l,f),e=Cs(l,f+2);u.set(t,{type:t,data:a.slice(f+4,f+4+e)}),f+=4+e}}catch{w=!0}f>a.length&&(w=!0);const p=Cs(r,o+4);n.assign(e,{signature:Ts(r,o+10),crc32:Ts(r,o+10),compressedSize:Ts(r,o+14),uncompressedSize:Ts(r,o+18)});const h=u.get(1);let m;h?(function(t,e,n){e.zip64=!0;const r=Ae(t.data),o=Za.filter(([t,n])=>e[t]==n),i=o.reduce((t,[,e])=>t+Ha[e].bytes,0);if(t.data.length<i){if(n)return!1;throw new d(mt)}const a=[];try{for(let t=0,e=0;t<o.length;t++){const[,n]=o[t],i=Ha[n];a.push(i.yt(r,e)),e+=i.bytes}}catch(t){if(n)return!1;throw t}return o.forEach(([n],r)=>{e[n]=t[n]=a[r]}),!0}(h,e,i)||(w=!0),e.extraFieldZip64=h):Za.some(([t,n])=>e[t]==n)&&(i?w=!0:m=!0);const y=u.get(28789);y&&(ns(y,bi,Ri,e,t),e.extraFieldUnicodePath=y);const g=u.get(25461);g&&(ns(g,xi,zi,e,t),e.extraFieldUnicodeComment=g);const E=u.get($);E&&(99==p||e.encrypted)&&E.data.length>=7?(function(t,e,r){const o=Ae(t.data),i=Is(o,4);n.assign(t,{vendorVersion:Is(o,0),vendorId:Is(o,2),strength:i,originalCompressionMethod:r,compressionMethod:Cs(o,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=dt)}(E,e,p),e.extraFieldAES=E):(E&&(w=!0),e.compressionMethod=p);const S=u.get(13);S&&(rs(S,e),e.extraFieldPkwareUnix=S);const b=u.get(22613);b&&(rs(b,e),e.extraFieldUnixType1=b);const R=u.get(J);R&&(function(t,e,n){if(!t.data.length)return;const r=Ae(t.data),o=Is(r,0),i=[],a=[];n?(1&~o||(i.push(Ci),a.push(Ti)),2&~o||(i.push(ki),a.push(vi)),4&~o||(i.push(_i),a.push(Ni))):t.data.length>=5&&(i.push(Ci),a.push(Ti));let c=1;i.forEach((n,o)=>{if(t.data.length>=c+4){const i=Ts(r,c);e[n]=t[n]=new s(1e3*(0|i));const u=a[o];t[u]=i}c+=4})}(R,e,i),e.extraFieldExtendedTimestamp=R);const x=u.get(10);x&&(function(t,e){const r=Ae(t.data);let o,i=4;try{for(;i<t.data.length&&!o;){const e=Cs(r,i),n=Cs(r,i+2);1==e&&(o=t.data.slice(i+4,i+4+n)),i+=4+n}}catch{}if(o&&24==o.length){const r=Ae(o),i=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),s=r.getBigUint64(16,!0);n.assign(t,{rawLastModDate:i,rawLastAccessDate:a,rawCreationDate:s});const c={lastModDate:As(i),lastAccessDate:As(a),creationDate:As(s)};n.assign(t,c),n.assign(e,c,{rawLastAccessDate:a,rawCreationDate:s})}}(x,e),e.extraFieldNTFS=x);const z=u.get(tt);let F;z&&(F=os(z,e,!0),e.extraFieldInfoZip=z);const D=u.get(et);D&&(os(D,F?{}:e,!1),e.extraFieldUnix=D);const A=u.get(Q);if(A&&(e.extraFieldUSDZ=A),m)throw new d(mt);return w}function ns(t,e,r,o,i){if(t.data.length<5)return void(t.valid=!1);const a=Ae(t.data),s=new Le;s.append(i[r]);const c=Ae(new w(4));c.setUint32(0,s.get(),!0);const u=Ts(a,1),l=Is(a,0);n.assign(t,{version:l,[e]:mo(t.data.subarray(5)),valid:1==l&&!i.bitFlag.languageEncodingFlag&&u==Ts(c,0)}),t.valid&&(o[e]=t[e],o[e+"UTF8"]=!0)}function rs(t,e){if(t.data.length<8)return;const r=Ae(t.data),o={lastAccessDate:new s(1e3*(0|Ts(r,0))),lastModDate:new s(1e3*(0|Ts(r,4)))};t.data.length>=12&&(o.uid=Cs(r,8),o.gid=Cs(r,10)),n.assign(t,o),n.assign(e,o)}function os(t,e,r){try{const o=Ae(t.data);let i,a;if(r){let e=0;const r=Is(o,e++),s=Is(o,e++);i=is(t.data.subarray(e,e+s)),e+=s;const c=Is(o,e++);a=is(t.data.subarray(e,e+c)),n.assign(t,{version:r,uid:i,gid:a})}else t.data.length>=4&&(i=Cs(o,0),a=Cs(o,2),n.assign(t,{uid:i,gid:a}));return i!==dt&&(e.uid=i),a!==dt&&(e.gid=a),i!==dt||a!==dt}catch{}}function is(t){const e=new w(4);return e.set(t,0),new m(e.buffer,e.byteOffset,4).getUint32(0,!0)}function as(t,e){return t.start<e.end&&e.start<t.end}async function ss(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,zip64:i}){const s=a.min(24,a.max(0,t.size-e)),c=Ae(s?await gi(t,e,s):Rt),u=[[i,!0],[i,!1],[!i,!0],[!i,!1]].map(([t,e])=>cs(c,t,e)).filter(t=>t&&t.compressedSize==r&&t.uncompressedSize==o);return u.find(t=>t.crc32==n)||u[0]||cs(c,i,!0)||cs(c,i,!1)}function cs(t,e,n){const r=n?4:0;if(t.byteLength<us(e,n)||n&&Ts(t,0)!=P)return dt;const o=Ts(t,r);let i,a;try{e?(i=ks(t,r+4),a=ks(t,r+12)):(i=Ts(t,r+4),a=Ts(t,r+8))}catch{return dt}return{signature:n,zip64:e,crc32:o,compressedSize:i,uncompressedSize:a}}function us(t,e){return(t?20:12)+(e?4:0)}function ls(t,e){return t.ht?t.ht(e):0}async function fs(t){return Ts(Ae(await gi(t,0,4)))}function ds(t){return t===Ht||t===Vt||t===Gt}function ws(t,e){return ps(t,ps(e,Vt))}function ps(t,e){const n=t[Mt];if(n!==dt){if(!ds(n))throw new d(ha);return n}const r=t[It];return r===dt?e:r?Ht:e==Gt?Gt:Vt}function hs(t,e){if(e==Gt)return!1;const n=t.split("/");return n.length>1&&""===n[n.length-1]&&n.pop(),!!(Ba.test(t)||t.startsWith("/")||t.startsWith("\\")||La.test(t))||e==Ht&&(n.includes(".")||n.includes("")||t.includes("\0"))}function ms(t,e){if(t!==dt){const e=ie(t);if("number"!=typeof e||o.isNaN(e)||e<0)throw new d(ya);return e}return e==Ht?0:e==Gt?1/0:M}async function ys(t,e,n){const{size:r}=t,o=a.min(r,65557),i={Ct:64};let s,c,u=0;for await(const[n,a,l,f,d]of gs(t,o)){const o=Cs(n,f+20);if(d+Y+o==r){const o=await Ss(t,n,a,f,d,r,i);if(2==o){if(s||(s=Es(l,f,d)),u++,!e||u>1)break}else 1!=o||c||(c=Es(l,f,d))}}return s||(s=c),s||(s=await async function(t,e,n){const{size:r}=t,o=a.min(r,e==1/0?r:65557+e);let i,s;for await(const[e,a,c,u,l]of gs(t,o)){const o=Es(c,u,l);i||(i=o);const f=await Ss(t,e,a,u,l,r,n);if(2==f)return o;1!=f||s||(s=o)}return s||i}(t,n,i)),{xt:s,zt:u}}async function*gs(t,e){const n=t.size-e,r=await gi(t,n,e),o=Ae(r);for(let t=r.length-Y;t>=0;t--)Ts(o,t)==V&&(yield[o,n,r,t,n+t])}function Es(t,e,n){return{offset:n,buffer:new w(t.subarray(e,e+Y)).buffer}}async function Ss(t,e,n,r,o,i,a){const s=Cs(e,r+10),c=Ts(e,r+12),u=Ts(e,r+16);if(s==M||c==O||u==O)return await bs(t,e,n,o-K,i,a)==j?2:0;if(!s&&!c)return 1;const l=Cs(e,r+6);for(const r of[o-c,ls(t,l)+u])if(await bs(t,e,n,r,i,a)==H)return 2;return 0}async function bs(t,e,n,r,o,i){return r<0||r+4>o?dt:r>=n?Ts(e,r-n):i.Ct>0?(i.Ct--,Ts(Ae(await gi(t,r,4)),0)):dt}function Rs(t,e,n){t?xs(n):Si(e,n)}function xs(t){const e=new d(da);throw e.reason=t,e}function zs(t,e,n){return e[n]===dt?t.options[n]:e[n]}function Fs(t,e,n){return Jt(zs(t,e,n))}function Ds(t){const e=(4294901760&t)>>16,n=t&M,r=new s(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return r<ft?ft:r}function As(t){return new s(o(t/i(1e4)-i(116444736e5)))}function Is(t,e){return t.getUint8(e)}function Cs(t,e){return t.getUint16(e,!0)}function Ts(t,e){return t.getUint32(e,!0)}function ks(t,e){const n=t.getBigUint64(e,!0);if(n>Va)throw new d(ga);return o(n)}var vs=n.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:da,ERR_BAD_FORMAT:oa,ERR_CENTRAL_DIRECTORY_NOT_FOUND:sa,ERR_CODEC_OUT_OF_MEMORY:Qn,ERR_ENCRYPTED:ca,ERR_ENCRYPTED_CENTRAL_DIRECTORY:wa,ERR_ENTRY_DATA_OUT_OF_BOUNDS:fa,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:aa,ERR_EOCDR_NOT_FOUND:ia,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:mt,ERR_INVALID_AUTHENTICATION_CODE:on,ERR_INVALID_COMPRESSED_DATA:Jn,ERR_INVALID_CRC32:tr,ERR_INVALID_FILENAME_VALIDATION:ma,ERR_INVALID_MAX_APPENDED_DATA_SIZE:ya,ERR_INVALID_PASSWORD:rn,ERR_INVALID_STRICTNESS:ha,ERR_INVALID_UNCOMPRESSED_SIZE:$n,ERR_LOCAL_FILE_HEADER_NOT_FOUND:pt,ERR_OVERLAPPING_ENTRY:ht,ERR_SPLIT_ZIP_FILE:la,ERR_UNSAFE_FILENAME:pa,ERR_UNSUPPORTED_COMPRESSION:Hn,ERR_UNSUPPORTED_ENCRYPTION:ua,ERR_UNSUPPORTED_UINT64:ga,ERR_WORKER_STARTUP_TIMEOUT:Cr,WARNING_APPENDED_DATA:Fa,WARNING_COMPRESSED_PATCHED_DATA:ba,WARNING_DUPLICATE_FILENAME:ka,WARNING_MALFORMED_EXTRA_FIELD:Ra,WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET:Ca,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:Ua,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:Oa,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Ma,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Na,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:va,WARNING_MISSING_ZIP64_EXTRA_FIELD:Ta,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:_a,WARNING_PREPENDED_CENTRAL_DIRECTORY:Aa,WARNING_PREPENDED_DATA:Da,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Ia,WARNING_UNKNOWN_VERSION:Sa,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:xa,WARNING_UNSORTED_CENTRAL_DIRECTORY:Ea,WARNING_WRAPPED_ENTRIES_COUNT:za,ZipReader:Ga,ZipReaderStream:ja,Tt:async function(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,extraFieldZip64:i}){const a=await ss(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,zip64:Boolean(i)});if(a&&a.compressedSize==r&&a.uncompressedSize==o)return us(a.zip64,a.signature)},isZipFile:qa});const _s="File already exists",Ns="Zip file comment exceeds 64KB",Us="Invalid zip file comment (must be a Uint8Array)",Os="File entry comment exceeds 64KB",Ms="Invalid file entry comment (must be a string)",Ls="Invalid date (must be a valid Date instance)",Bs="File entry name exceeds 64KB",Ws="Version exceeds 65535",Ps="The strength must equal 1, 2, or 3",Zs="Encryption is not supported in USDZ files",Hs="Split zip files are not supported in USDZ files",Vs="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",Gs="Invalid extra field (must be a Map)",js="Invalid extra field type (must be integer 0..65535)",qs="Invalid extra field data (must be a Uint8Array)",Ys="Extra field data exceeds 64KB",Ks=-2147483648,Xs=2147483647,$s=i(0),Js=i("0x7fffffffffffffff"),Qs="Zip64 is not supported (set the 'zip64' option to 'true')",tc="Undefined uncompressed size",ec="Undefined compression method",nc="Undefined CRC32",rc="Undetermined size",oc="Undefined reader",ic="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",ac="Zip file not empty",sc="Invalid uid (must be integer 0..2^32-1)",cc="Invalid gid (must be integer 0..2^32-1)",uc="Invalid UNIX mode (must be integer 0..65535)",lc="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",fc="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",dc="Invalid msdosAttributesRaw (must be integer 0..255)",wc="Invalid msdosAttributes (must be an object with boolean flags)",pc="Invalid level (must be integer 0..9)",hc="Signature data exceeds 64KB",mc="Invalid entry option (must be an entry returned by ZipReader#getEntries())",yc="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",gc="compression unavailable",Ec="clamped last modification date",Sc=new w([7,0,2,0,65,69,3,0,0]),bc="infozip",Rc="unix",xc=[8,9,5,3];let zc=0;const Fc=[];class Dc{constructor(t,e={}){t=new pi(t);const{availableSize:r=wt,maxSize:o=wt}=t,i=r>0&&r!==wt&&o>0&&o!==wt;if(i&&e[Ot])throw new d(Hs);n.assign(this,{writer:t,kt:i,options:e,vt:new c,_t:new u,offset:e[Ut]===dt?t.size||t.writable.size||0:e[Ut],Nt:e[Ut]===dt?0:e[Ut]-(t.size||t.writable.size||0),Ut:new u,Ot:[],warnings:[],Mt:0,Lt:0,Bt:dt,Wt:!1})}prependZip(t){return Cc(this,async function(t,e){if(t._t.size)throw new d(ac);await Tc(t,e)}(this,t))}appendZip(t,e={}){return Cc(this,Tc(this,t,e))}add(t="",e,r={}){const o=this,{Ut:a}=o,s=async function(t,e,r,o){const a=(o=n.assign({},o))[Wt];if(a!==dt){const{Pt:e,Zt:r}=_c(a,ne(au(t,o,Dt)),au(t,o,Ci));delete o[Wt],o=n.assign(e,r,o)}if(au(t,o,Gi)&&!e.endsWith(ct)&&(e+=ct),t._t.has(e))throw new d(_s);t._t.add(e),zc<Ee().maxWorkers?zc++:await new g(t=>Fc.push(t));try{return await async function(t,e,r,o){const a=Nc(t,e,o);({name:e}=a);const s=Uc(t,e,o),{comment:c}=s,u=o[Ki];t.vt.set(e,dt);const l=t.Bt,f={};let w,p;s.Ht.keepOrder&&(f.Vt=new g(t=>w=t)),t.Bt=f;try{const{Ht:c}=s;0==c.level||c.compressionMethod!==dt||c.Gt||await Nr(Ee())||(c.level=0,Si(t.warnings,gc,e));const u=await async function(t,e,{Ht:r},o){if(r.Gt&&!e&&!au(t,o,Gi))throw new d(oc);let i;if(e){if(e=new wi(e),await mi(e),!e.readUint8Array&&!e.readable)throw new d(ic);({size:i}=e)}return n.assign({reader:e},Mc(t,Boolean(e),i,r,o))}(t,r,s,o);({reader:r}=u);const h=jc(t.writer),m=Gc(t.writer);let y=o.crc32===dt?o[Yi]:o.crc32;const E=u.Ht.encrypted&&!c.zipCrypto;if(c.Gt&&!c.jt&&E&&(y=dt),c.Gt&&r&&!E&&y===dt)throw new d(nc);const S=Bc(o=n.assign({},o,a.Ht,s.Ht,u.Ht,{signature:o[Yi],crc32:y,offset:t.offset-h,diskNumberStart:m,[Ot]:t.options[Ot]}));S.qt&&Si(t.warnings,Ec,e);const b=Zc(o),R=gu(S.Yt,b.Kt);p=await async function(t,e,r,o,a){const{vt:s,writer:c}=t,{keepOrder:u,dataDescriptor:l,Xt:f,signal:w}=a,{$t:p,It:h,Jt:m,Qt:y}=o,E=t.options[Ot];let S,b,R,x,F,D,A,I=h,C=0;const T=u&&m?m.Vt:dt;s.set(e,I);try{a.bufferedWrite||!u||t.te||t.Mt||t.Lt||!l&&!f?(S=!0,t.Mt++,A=a.createTempStream?await a.createTempStream():new z(dt,dt,{highWaterMark:wt}),A.size=0,await mi(c)):(b=!0,t.Lt++,A=c,await T,await k()),await mi(A);const h=jc(c);t.kt&&!S&&await tu(t,c),E&&!S&&Wc(o,t.offset-h);const{Yt:m}=p;S||await v();const y=Gc(c),R=Yc(t,c);if(I.diskNumberStart=y,S||(F=!0,D=c.size,await eu(A,m)),I=await async function(t,e,{diskNumberStart:r,Vt:o},a,s,c){const{$t:u,ee:l,ne:f}=a,{re:w,oe:p,lastModDate:h,rawLastModDate:m,encrypted:y,compressed:g,version:E,compressionMethod:S,ie:b,ae:R,se:x,ce:z,ue:F,le:D,fe:A,de:I,we:C}=u,{Kt:T}=l,{rawFilename:k,lastAccessDate:v,creationDate:_,password:N,rawPassword:U,level:M,useUnicodeFileNames:B,zip64:W,pe:P,he:Z,me:H,zipCrypto:V,dataDescriptor:G,directory:j,executable:q,versionMadeBy:Y,rawComment:K,rawExtraField:X,ye:$,useWebWorkers:J,onstart:Q,onprogress:tt,onend:et,signal:nt,encryptionStrength:rt,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,uid:ct,gid:ut,unixMode:lt,symlink:ft,setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt,useCompressionStream:Et,Gt:St,jt:bt,format:Rt,codecURI:xt}=c,zt={Vt:o,versionMadeBy:Y,zip64:W,pe:P,directory:Boolean(j),executable:Boolean(q),filenameUTF8:Boolean(B),rawFilename:k,commentUTF8:Boolean(B),rawComment:K,ie:b,ae:R,se:x,le:D,fe:A,de:I,we:C,rawExtraField:X,ye:$,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,diskNumberStart:r,uid:ct,gid:ut,unixMode:lt,symlink:Boolean(ft),setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt};let{crc32:Ft,uncompressedSize:Dt}=c,At=0;St||(Dt=0);const{writable:It}=e;if(t){const n=t.size,r=Mn(Ei(t,{size:n})),o={options:{codecType:Fr,inputSize:n,level:M,rawPassword:U,password:N,encryptionStrength:rt,zipCrypto:y&&V,passwordVerification:y&&V&&m>>8&L,computeCrc32:!St,compressed:g&&!St,encrypted:y&&!bt,useWebWorkers:J,useCompressionStream:Et,format:Rt,codecURI:xt,compressionMethod:S},config:s,A:{signal:nt,size:n,onstart:Q,onprogress:tt,onend:et}};try{const t=await ao({readable:r,writable:It},o);if(At=t.outputSize,e.size+=At,te(nt),St||(Dt=t.inputSize,y&&!V||(Ft=t.crc32)),!H&&At>=O||!Z&&Dt>=O)throw new d(Qs)}catch(t){const{outputSize:n}=o;throw n!==dt?e.size+=n:Ie(t)&&t.outputSize!==dt&&(e.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:n,$t:r,ee:o},{zip64:a,zipCrypto:s,Gt:c,dataDescriptor:u}){const{oe:l,encrypted:f}=r,{ge:d,Ee:w}=o;f&&!s&&!c||t===dt||(hu(l,10,t),u&&hu(d,w,t)),a?u&&(mu(d,w+4,i(e)),mu(d,w+12,i(n))):(hu(l,14,e),hu(l,18,n),u&&(hu(d,w+4,e),hu(d,w+8,n)))}({crc32:Ft,compressedSize:At,uncompressedSize:Dt,$t:u,ee:l},c),G&&await eu(e,T),n.assign(zt,{uncompressedSize:Dt,compressedSize:At,lastModDate:h,rawLastModDate:m,creationDate:_,lastAccessDate:v,encrypted:Boolean(y),zipCrypto:Boolean(V),size:f+At,compressionMethod:S,version:E,re:w,oe:p,signature:Ft,crc32:!y||V||St?Ft:dt,ce:z,ue:F,he:Z,me:H}),zt}(r,A,I,o,Ee(),a),S||(F=!1),s.set(e,I),I.filename=e,S){if(await g.all([A.writable.getWriter().close(),T]),await k(),t.kt&&await tu(t,c),x=!0,D=c.size,await v(),I.diskNumberStart=Gc(c),I.offset=Yc(t,c),E){const e=o.ne;Wc(o,t.offset-jc(c)),I.size+=o.ne-e}!function({rawFilename:t,encrypted:e,zip64:n,ae:r,crc32:o,compressedSize:a,uncompressedSize:s,he:c,me:u},l,{dataDescriptor:f,Gt:d}){if(f||((!e||d&&o!==dt)&&hu(l,14,o),u||hu(l,18,a),c||hu(l,22,s)),n&&r){const e=ut+gu(t)+4;mu(l,e,i(s)),mu(l,e+8,i(a))}}(I,p.Se,a),await eu(c,p.Yt),await nu(A.readable,c,w,t=>C+=t),c.size+=A.size,x=!1}else I.diskNumberStart=y,I.offset=R;return t.offset+=I.size,I}catch(n){if(x||F){if(t.hasCorruptedEntries=!0,n)try{n.corruptedEntry=!0}catch{}t.offset+=c.size-D,S&&(t.offset+=C)}throw s.delete(e),n}finally{if(S&&t.Mt--,b&&t.Lt--,y&&y(T),R&&R(),S&&A&&A.dispose)try{await A.dispose()}catch{}}async function k(){t.te=!0;const{be:e}=t;t.be=new g(e=>R=()=>{t.te=!1,e()}),await e}async function v(){qc(c,gu(p.Yt))&&await c.closeDisk()}}(t,e,r,{$t:S,ee:b,ne:R,It:f,Jt:l,Qt:w},o)}catch(n){throw t.vt.delete(e),n}finally{w&&w(l&&l.Vt)}return n.assign(p,{name:e,comment:c,extraField:u}),new ea(p)}(t,e,r,o)}catch(n){throw t._t.delete(e),n}finally{const t=Fc.shift();t?t():zc--}}(o,t,e,r);a.add(s);const c=()=>a.delete(s);return g.prototype.then.call(s,c,c),Cc(o,s)}remove(t){const{_t:e,vt:n}=this;if(typeof t==St&&(t=n.get(t)),t&&t.filename!==dt){const{filename:r}=t;if(e.has(r)&&n.has(r))return e.delete(r),n.delete(r),!0}return!1}async close(t=Rt,n={}){const r=this,{Ut:o,writer:a}=this,{writable:s}=a;if(r.Wt)return Ic(a);if(!(t instanceof w))throw new d(Us);if(gu(t)>M)throw new d(Ns);for(;o.size;)await g.allSettled(e.from(o));await g.allSettled(r.Ot.map(t=>t.Re));const c=r.Ot.filter(t=>t.xe&&!t.ze);if(c.length){const t=c.map(t=>t.error);c.forEach(t=>t.ze=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(t,n,r){const{Fe:o,De:a}=Hc(t.vt),{Ae:s,Ie:c,Ce:u}=await async function(t,n,r){const{vt:o,writer:i}=t,a=new w(n);await mi(i);let s=0,c=0,u=Gc(i),l=jc(i),f=0;for(const[t,n]of e.from(o.values()).entries()){const{offset:e,rawFilename:d,ie:w,we:p,se:h,le:m,de:y,rawExtraField:g,ye:E,rawComment:S,versionMadeBy:b,re:R,oe:x,he:z,me:F,Te:D,ke:A,internalFileAttributes:I,externalFileAttributes:C,diskNumberStart:T,uncompressedSize:k,compressedSize:v}=n,_=gu(w,p,h,m,y,g,E),N=q+gu(d,S)+_;qc(i,s+N-c)&&(await eu(i,a.slice(c,s)),c=s,f=0,await i.closeDisk()),0==t&&(u=Gc(i),l=jc(i)),z||hu(x,18,k),F||hu(x,14,v),(A||D)&&n.version<45&&pu(x,0,45);const U=Vc(N);if(U.ve(H),U._e(b),U.Ne(R.subarray(0,24)),U._e(_),U._e(gu(S)),U._e(D?M:T),U._e(I),U.ve(C),U.ve(A?O:e),U.Ne(d),U.Ne(w),U.Ne(p),U.Ne(h),U.Ne(m),U.Ne(y),U.Ne(g),U.Ne(E),U.Ne(S),yu(a,U.ct,s),s+=N,f++,r.onprogress)try{await r.onprogress(t+1,o.size,new ea(n))}catch{}}return await eu(i,c?a.slice(c):a),{Ae:{diskNumber:u,diskOffset:l},Ie:{diskNumber:Gc(i),Ue:f},Ce:a}}(t,o,r),l=await async function(t,e,n){const r=cu(t,n,Bt);if(r){const n=await r(e),o=gu(n);if(o>M)throw new d(hc);const i=Vc(6+o);i.ve(Z),i._e(o),i.Ne(n);const{writer:a}=t;return qc(a,gu(i.ct))&&await a.closeDisk(),await eu(a,i.ct),6+o}return 0}(t,u,r);await async function(t,e,n,r){const{writer:o}=t,{Ae:a,Ie:s,Oe:c,De:u}=r;let{Fe:l}=r,f=t.vt.size,w=a.diskNumber,p=Yc(t,a);const h=gu(e);if(h>M)throw new d(Ns);let m=au(t,n,Wi),y=Gc(o);if(qc(o,(m?98:Y)+h)&&y++,p>=O||l>=O||f>=M||y>=M){if(!1===m)throw new d(Qs);m=!0}else m===dt&&u&&(m=!0);const g=Vc(m?98:Y);qc(o,gu(g.ct)+h)&&await o.closeDisk(),y=Gc(o);let E=y==s.diskNumber?s.Ue:0;m&&(g.ve(G),g.Me(44),g._e(45),g._e(45),g.ve(y),g.ve(w),g.Me(E),g.Me(f),g.Me(l),g.Me(p),g.ve(j),g.ve(y),g.Me(i(Yc(t,o))+i(l)+i(c)),g.ve(y+1),au(t,n,"supportZip64SplitFile",!0)&&(y=M,w=M),E=M,f=M,p=O,l=O),g.ve(V),g._e(y),g._e(w),g._e(E),g._e(f),g.ve(l),g.ve(p),g._e(h),await eu(o,g.ct),h&&await eu(o,e)}(t,n,r,{Ae:s,Ie:c,Fe:o,Oe:l,De:a})}(r,t,n),r.Wt=!0,!hi(a)&&au(r,n,kt)||await s.getWriter().close(),Ic(a)}[xt](){return this.close()}}class Ac extends g{then(t,e){const{Le:n}=this;return n&&(n.ze=!0),super.then(t,e)}}function Ic(t){return t.getData?t.getData():t.writable}function Cc(t,e){const r=new Ac((t,n)=>g.prototype.then.call(e,t,n)),o={};return r.Le=o,o.Re=g.prototype.then.call(r,dt,t=>n.assign(o,{xe:!0,error:t})),t.Ot.push(o),r}async function Tc(t,r,o={}){const{Ut:i,_t:s,vt:l}=t,f=Jt(o.filter);for(;i.size;)await g.allSettled(e.from(i));let w;const p=new g(t=>w=t);i.add(p);const h=[];let m;try{r=new wi(r),await mi(r),r.size!==dt&&r.readUint8Array||(r=new Bo(await Ln(r.readable)),await mi(r));const{ZipReader:o,Tt:i}=await g.resolve().then(function(){return vs}),w=new o(r),p=await w.getEntries(),y=[];for(const t of p)f&&!await f(t)||y.push(t);await w.close(),await mi(t.writer);const{directoryOffset:E,Rt:S}=w;y.forEach(t=>{const{filename:e}=t;if(S.has(t))throw new d(mt);if(s.has(e))throw new d(_s);s.add(e),h.push(e)}),t.te=!0;const{be:b}=t;t.be=new g(e=>m=()=>{t.te=!1,e()}),await b,t.kt&&(delete t.kt,!f&&await async function(t){return wu(Ae(await gi(t,0,4)),0)==W}(r)||(await eu(t.writer,Qc()),t.offset+=4));const R=await async function(t,n,r,o,i,s,l){const{writer:f}=t,w=new c;if(f.closeDisk||s){const p=e.from(r).sort((t,e)=>Jc(n,t)-Jc(n,e)),h=function(t,n,r){const o=new e(n.length);let i=r;for(let e=n.length-1;e>=0;e--){const s=Jc(t,n[e]),c=n[e+1];c&&Jc(t,c)>s&&(i=a.min(Jc(t,c),r)),o[e]=i}return o}(n,p,i),m=new u(o),y=new c;for(let t=0;t<p.length;t++){const e=p[t];if(m.has(e)){const r=Jc(n,e),o=await $c(n,r);if(o===dt)throw new d(pt);let i=r+o+e.compressedSize;if(e.bitFlag.dataDescriptor){const r=await l(n,i,e);i=r===dt?a.max(i,h[t]):i+r}if(i>h[t])throw new d(ht);h[t]=i,y.set(e,o)}}let g,E=0;for(let e=0;e<p.length;e++){const r=p[e];if(m.has(r)){const o=Jc(n,r);o<E?w.set(r,g):(s||await Xc(t,n,E,o-E),f.closeDisk&&qc(f,y.get(r))&&await f.closeDisk(),g={offset:Yc(t,f),diskNumberStart:Gc(f)},w.set(r,g),await Xc(t,n,o,h[e]-o),E=h[e])}}s||await Xc(t,n,E,i-E)}else{const e=t.offset;await Xc(t,n,0,i),r.forEach(t=>w.set(t,{offset:e+Jc(n,t),diskNumberStart:0}))}return w}(t,r,p,y,E,Boolean(f),i);y.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:o,rawBitFlag:i,uncompressedSize:a,compressedSize:s,extraFieldZip64:c}=t;let{compressionMethod:u,rawExtraField:f}=t;f=Kc(f||Rt),t.extraFieldAES&&(u=99);const d=gu(f),w=Boolean(c)&&c.uncompressedSize!==dt,p=Boolean(c)&&c.compressedSize!==dt,{re:h,oe:m}=Eu({version:e,bitFlag:i,compressionMethod:u,uncompressedSize:a,compressedSize:s,rawLastModDate:r,rawFilename:o,me:p,he:w,extraFieldLength:d}),{crc32:y}=t;y!==dt&&hu(m,10,y);const{offset:g,diskNumberStart:E}=R.get(t);n.assign(t,{pe:!0,he:w,me:p,offset:g,diskNumberStart:E,Te:!1,ie:Rt,we:Rt,se:Rt,le:Rt,fe:Rt,de:Rt,rawExtraField:f,ye:Rt,re:h,oe:m}),l.set(t.filename,t)})}catch(t){throw h.forEach(t=>s.delete(t)),t}finally{w(),i.delete(p),m&&m()}}async function kc(t,e){try{await t.writer.writable.abort(e)}catch{}}function vc(t,e,n){t.Ut.add(e),e.catch(t=>{try{n(t)}catch{}})}function _c(t,r,o){if(null===t||typeof t!=Et||e.isArray(t))throw new d(mc);const{externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,rawLastModDate:w,creationDate:p,lastAccessDate:h,uncompressedSize:m,encrypted:y,zipCrypto:g,crc32:E,compressionMethod:S,extraFieldAES:b,extraFieldUnix:R,internalFileAttributes:x,extraField:z,bitFlag:F,directory:D,uid:A,gid:I}=t,C={externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,creationDate:p,lastAccessDate:h,internalFileAttributes:x,directory:D};F&&F.languageEncodingFlag&&(C[_t]=!0);const T=function(t){if(t){const e=new c;if(t.forEach((t,n)=>{na.has(n)||e.set(n,t.data)}),e.size)return e}}(z);T&&(C[Ki]=T),A===dt&&I===dt||n.assign(C,{uid:A,gid:I,unixExtraFieldType:R?Rc:bc});const k={};if(r&&!D)if(n.assign(k,{uncompressedSize:m,crc32:E,compressionMethod:S}),r!==jt&&n.assign(k,{encrypted:y,zipCrypto:g,encryptionStrength:b?b.strength:dt}),F&&(k.dataDescriptor=F.dataDescriptor,k[vt]=xc[F.level]),o===dt)k.rawLastModDate=w;else if(r!==jt&&g&&(!F||F.dataDescriptor)&&o instanceof s&&function(t){let e=new s(2e3*a.ceil(a.floor(t.getTime()/1e3)/2));return e<ft?e=ft:e>lt&&(e=lt),(e.getHours()<<3|e.getMinutes()>>3)&L}(o)!=(w>>>8&L))throw new d(yc);return{Pt:C,Zt:k}}function Nc(t,n,r){let o=au(t,r,Bi),i=au(t,r,Hi,o?20:768);const a=au(t,r,ji),s=uu(t,r,"uid"),c=uu(t,r,"gid");let u=uu(t,r,Xi),l=au(t,r,"unixExtraFieldType"),f=au(t,r,$i),w=au(t,r,Ji),p=au(t,r,Qi);if(oe(s,O,sc),oe(c,O,cc),oe(u,M,uc),l!==dt&&l!==bc&&l!==Rc)throw new d(lc);if(l===Rc&&(s!==dt&&s>M||c!==dt&&c>M))throw new d(fc);l!==dt||s===dt&&c===dt||(l=bc);let h=uu(t,r,Mi),m=au(t,r,Li);const y=h!==dt||m!==dt;if(s!==dt||c!==dt||u!==dt||l||a?(o=!1,i=i&L|768):y&&(o=!0,i&=L),oe(h,L,dc),m&&(typeof m!==Et||e.isArray(m)))throw new d(wc);if(i>M)throw new d(Ws);let g=au(t,r,Oi);const E=g!==dt;E||(g=0),!r[Gi]&&n.endsWith(ct)&&(r[Gi]=!0);const S=au(t,r,Gi);if(S?(n.endsWith(ct)||(n+=ct),E||(g=16,o||(g|=16877<<16))):o||E||(g=a?493<<16:27525120),!o){const t=u!==dt||Boolean(f||w||p);u=u===dt?g>>16&M:u&M,f?u|=at:f=Boolean(u&at),w?u|=st:w=Boolean(u&st),p?u|=512:p=Boolean(512&u),E&&!t||(S?u=-61441&u|it:u&ot||(u|=32768),g=(u&M)<<16|g&M)}({msdosAttributesRaw:h,msdosAttributes:m}=function(t,e){if(t!==dt)t&=L;else if(e!==dt){const{readOnly:n,hidden:r,system:o,directory:i,archive:a}=e;let s=0;n&&(s|=1),r&&(s|=2),o&&(s|=4),i&&(s|=16),a&&(s|=32),t=s&L}return e===dt&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,m)),y&&(g=g&O|h&L);const b=g>>16&M,R=u!==dt&&40960==(u&ot);return{name:n,Ht:{versionMadeBy:i,msDosCompatible:Boolean(o),externalFileAttributes:g,unixExternalUpper:b,uid:s,gid:c,unixMode:u,unixExtraFieldType:l,symlink:R,setuid:f,setgid:w,sticky:p,msdosAttributesRaw:h,msdosAttributes:m}}}function Uc(t,e,n){const r=cu(t,n,"encodeText")||We;let i=r(e,Pt);if(i===dt&&(i=We(e)),gu(i)>M)throw new d(Bs);const a=n[xi]||"";if(typeof a!=St)throw new d(Ms);let c=r(a,Zt);if(c===dt&&(c=We(a)),gu(c)>M)throw new d(Os);const u=au(t,n,Zi);if(u!==dt&&u>M)throw new d(Ws);const l=su(t,n,Ci,new s),f=au(t,n,Ti),w=su(t,n,ki),p=su(t,n,_i),h=au(t,n,Ui,0),m=ne(au(t,n,Dt)),y=Boolean(m),g=!0===m;let E=au(t,n,zt),S=au(t,n,Ft);ee(E,S),E=E&&E.length?E:dt,S=S&&S.length?S:dt;const b=uu(t,n,"encryptionStrength",3),R=au(t,n,Vi),x=au(t,n,"extendedTimestamp",!0),z=au(t,n,"ntfsTimestamp"),F=au(t,n,"keepOrder",!0),D=au(t,n,Ct),A=au(t,n,"bufferedWrite"),I=cu(t,n,"createTempStream"),C=au(t,n,"dataDescriptorSignature",!0),T=Qt(au(t,n,At));te(T);const k=au(t,n,_t,!Su(i)||!Su(c)),v=au(t,n,qi),_=y||v===dt?dt:qn(v);if(!y&&v!==dt&&0!==v&&8!==v&&!_)throw new d(Hn);let N=uu(t,n,vt);if(oe(N,9,pc),t.options[Ot]){if(E!==dt||S!==dt)throw new d(Zs);N===dt&&v===dt&&(N=0)}y&&(N=ie(n[vt]));let U=au(t,n,Tt),O=au(t,n,Nt);A&&O===dt&&(O=!1),(O===dt||R&&!g)&&(O=!0),N!==dt&&6!=N&&(U=!1);const L=au(t,n,Wi);if(!(R||E===dt&&S===dt||o.isInteger(b)&&b>=1&&b<=3))throw new d(Ps);const B=Oc(n[Ki]),W=Oc(n.localExtraField),P=Oc(n.centralExtraField);return{comment:a,Ht:{rawFilename:i,rawComment:c,version:u,lastModDate:l,rawLastModDate:f,lastAccessDate:w,creationDate:p,internalFileAttributes:h,Gt:y,jt:g,password:E,rawPassword:S,encryptionStrength:b,zipCrypto:R,extendedTimestamp:x,ntfsTimestamp:z,keepOrder:F,useWebWorkers:D,bufferedWrite:A,createTempStream:I,dataDescriptorSignature:C,signal:T,useUnicodeFileNames:k,compressionMethod:v,format:_?_.format:dt,codecURI:_?_.codecURI:dt,Be:_?_.versionNeeded:dt,level:N,useCompressionStream:U,dataDescriptor:O,zip64:L,rawExtraField:B,We:W,ye:P}}}function Oc(t){if(!t)return Rt;if(!(t instanceof c))throw new d(Gs);let e=0,n=0;t.forEach((t,n)=>{if(re(n,M,js),!(t instanceof w))throw new d(qs);if(gu(t)>M)throw new d(Ys);e+=4+gu(t)});const r=new w(e),o=Ae(r);return t.forEach((t,e)=>{pu(o,n,e),pu(o,n+2,gu(t)),yu(r,t,n+4),n+=4+gu(t)}),r}function Mc(t,e,n,r,o){const{Gt:i,jt:a,zipCrypto:s,password:c,rawPassword:u,encryptionStrength:l}=r;let{dataDescriptor:f,zip64:w,level:p,compressionMethod:h}=r,m=0,y=0,g=!1;if(i&&e){if(y=o[Fi],y===dt)throw new d(tc);if(h===dt)throw new d(ec)}const E=!0===w,S=au(t,o,Pi);if(e&&a&&!S&&gu(c,u))throw new d(Vs);const b=e&&(Boolean(c&&gu(c)||u&&gu(u))||a&&S);e||(p=0,h=0);const R=ra(b,s,l);e&&(i?(o.uncompressedSize=y,m=n===dt?lu(y)+R:n+(a?0:R)):n===dt?(f=!0,(w||w===dt)&&(w=g=!0,m=4294967296)):(o.uncompressedSize=y=n,m=(fu(h,p)?lu(y):y)+R));const x=!(b||e&&(0!==n||i)||fu(h,p));x&&au(t,o,Nt)===dt&&(f=!1);const z=E||g||y>=O,F=E||m>=O;if(z||F){if(!1===w)throw new d(Qs);w=!0}return w=w||!1,{Pe:m,Ht:{dataDescriptor:f,Xt:x,zip64:w,pe:E,Ze:g,he:z,me:F,uncompressedSize:y,level:p,compressionMethod:h,encrypted:b}}}function Lc(t,e,n){const r=t.slice().sort((t,e)=>n?e-t:t-e);let o=e,i=0;for(const t of r){if(o>=O)break;o+=t,i++}return i}function Bc(t){const{rawFilename:e,lastModDate:n,rawLastModDate:r,lastAccessDate:o,creationDate:i,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:w,directory:p,rawExtraField:h,We:m,encryptionStrength:y,extendedTimestamp:g,ntfsTimestamp:E,Gt:S,encrypted:b,he:R,me:x,uncompressedSize:z,Ze:F,crc32:D}=t;let{version:A,compressionMethod:I}=t;const C=!p&&fu(I,c);let T;const k=S||!C,v=u&&(t.bufferedWrite||!w||!R&&!x||k&&!F),_=v||u&&w&&(R||x);if(u&&(R||x)){const t=20,e=Vc(t);if(e._e(1),e._e(t-4),T=e.ct,v&&(e.Me(z),k)){const t=ra(b,l,y);e.Me(S?0:z+t)}}else T=Rt;let N,U,O,L,W;if(b&&!l){const t=Vc(gu(Sc)+2);t._e($),t.Ne(Sc),N=t.ct,N[8]=y}else N=Rt;if(g){const t=ou(n),e=(P=t)>=Ks&&P<=Xs;if(e){const e=9+(o?4:0)+(i?4:0),n=Vc(e);L=1+(o?2:0)+(i?4:0),W=t,n._e(J),n._e(e-4),n.He(L),n.ve(t),o&&n.ve(iu(ou(o))),i&&n.ve(iu(ou(i))),O=n.ct}else O=Rt;if(E===dt?!e||Boolean(o||i):E)try{const t=ru(n),e=Vc(36);e._e(10),e._e(32),e.Ve(4),e._e(1),e._e(24),e.Me(t),e.Me(o?ru(o):t),e.Me(i?ru(i):t),U=e.ct}catch{U=Rt}else U=Rt}else U=O=Rt;var P;let Z,H;try{const{uid:e,gid:n,unixExtraFieldType:r}=t;if(r!=bc||e===dt&&n===dt)if(r!=Rc||e===dt&&n===dt)Z=H=Rt;else{const t=Vc(8);t._e(et),t._e(4),t._e((e===dt?0:e)&M),t._e((n===dt?0:n)&M),Z=t.ct;const r=Vc(4);r._e(et),r._e(0),H=r.ct}else{const t=Pc(e===dt?0:e),r=Pc(n===dt?0:n),o=3+t.length+r.length,i=Vc(4+o);i._e(tt),i._e(o),i.He(1),i.He(t.length),i.Ne(t),i.He(r.length),i.Ne(r),Z=H=i.ct}}catch{Z=H=Rt}I===dt&&(I=C?8:0),A===dt&&(A=0!=I||p||b?20:10);const{Be:V}=t;C&&V!==dt&&(A=A>V?A:V),u&&(A=A>45?A:45),b&&!l&&(A=A>51?A:51,S&&D!==dt&&(N[4]=1),pu(Ae(N),9,I),I=99);const G=_?gu(T):0,j=G+gu(N,O,U,Z,h,m);if(j+(t[Ot]?67:0)>M)throw new d(Ys);const q=new s(2e3*a.ceil(a.floor(n.getTime()/1e3)/2)),Y=q<ft?ft:q>lt?lt:q,K=gu(O)?new s(1e3*ou(n)):gu(U)?n:Y,{re:X,oe:Q,rawLastModDate:nt}=Eu({version:A,bitFlag:bu(c,f,w,b,I),compressionMethod:I,uncompressedSize:z,lastModDate:Y,rawLastModDate:r,rawFilename:e,me:x,he:R,extraFieldLength:j}),rt=Vc(ut+gu(e)+j),ot=rt.ct,it=Ae(ot);return rt.ve(B),rt.Ne(X),rt.Ne(e),_&&rt.Ne(T),rt.Ne(N),rt.Ne(O),rt.Ne(U),rt.Ne(Z),rt.Ne(h),rt.Ne(m),w&&(x||hu(it,18,0),R||hu(it,22,0)),{Yt:ot,Se:it,re:X,oe:Q,lastModDate:K,qt:K===Y&&q.getTime()!=Y.getTime(),rawLastModDate:nt,encrypted:b,compressed:C,version:A,compressionMethod:I,ce:L,ue:W,ie:Rt,ae:G,se:O,le:U,fe:Z,de:H,we:N,extraFieldLength:j}}function Wc(t,e){const{$t:n}=t;let{Yt:r,extraFieldLength:o}=n,i=64-(e+gu(r))%64;i<4&&(i+=64);const a=new w(i),s=Ae(a);pu(s,0,Q),pu(s,2,i-4);const c=r;n.Yt=r=new w(gu(c)+i),yu(r,c),yu(r,a,gu(c));const u=Ae(r);pu(u,28,o+i),n.Se=u,t.ne+=i}function Pc(t){const e=new w(4);Ae(e).setUint32(0,t,!0);let n=4;for(;n>1&&0===e[n-1];)n--;return e.subarray(0,n)}function Zc({zip64:t,dataDescriptor:e,dataDescriptorSignature:n}){let r,o=Rt,i=0,a=t?20:12;return n&&(a+=4),e&&(o=new w(a),r=Ae(o),n&&(i=4,hu(r,0,P))),{Kt:o,ge:r,Ee:i}}function Hc(t){let e=0,n=!1;for(const[,r]of t){const{rawFilename:t,we:o,rawComment:i,le:a,de:s,rawExtraField:c,ye:u,ce:l,ue:f,pe:w,uncompressedSize:p,compressedSize:h}=r;let{he:m,me:y}=r;w||(m&&p<O&&(m=r.he=!1),y&&h<O&&(y=r.me=!1)),n=n||m||y;const g=r.offset>=O,E=r.diskNumberStart>=M;let S,b;if(g||E||m||y){const t=4+(m?8:0)+(y?8:0)+(g?8:0)+(E?4:0),e=Vc(t);e._e(1),e._e(t-4),m&&e.Me(p),y&&e.Me(h),g&&e.Me(r.offset),E&&e.ve(r.diskNumberStart),S=e.ct}else S=Rt;if(r.ie=S,r.ke=g,r.Te=E,f===dt)b=Rt;else{const t=Vc(9);t._e(J),t._e(5),t.He(l),t.ve(f),b=t.ct}r.se=b;const R=gu(S,o,a,s,b,c,u);if(R>M)throw new d(Ys);e+=q+gu(t,i)+R}return{Fe:e,De:n}}function Vc(t){const e=new w(t),n=Ae(e);let r=0;return{ct:e,He:t=>{!function(t,e,n){t.setUint8(e,n)}(n,r,t),r+=1},_e:t=>{pu(n,r,t),r+=2},ve:t=>{hu(n,r,t),r+=4},Me:t=>{mu(n,r,i(t)),r+=8},Ne:t=>{yu(e,t,r),r+=gu(t)},Ve:t=>r+=t}}function Gc(t){const{diskNumber:e=0}=t;return e}function jc(t){const{diskOffset:e=0}=t;return e}function qc(t,e){const{availableSize:n=wt}=t;return e>n}function Yc(t,{diskNumber:e=0,diskOffset:n=0}){return t.offset-n-(e?t.Nt:0)}function Kc(t){const e=Ae(t);let n=0;for(;n+4<=gu(t);){const r=4+du(e,n+2);if(1==du(e,n))return Kc(Fe(t.subarray(0,n),t.subarray(a.min(n+r,gu(t)))));n+=r}return t}async function Xc(t,e,n,r){if(r>0){const{writer:o}=t;let i=0;try{await nu(Ei(e,{offset:n,size:r}),o,dt,t=>i+=t)}catch(e){if(i){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}}throw e}finally{o.size+=i,t.offset+=i}}}async function $c(t,e){const n=e>=0&&e+ut<=t.size?await gi(t,e,ut):Rt;if(gu(n)<ut)return dt;const r=Ae(n);return wu(r,0)!=B?dt:ut+du(r,26)+du(r,28)}function Jc(t,{offset:e,diskNumberStart:n}){return e+(t.ht?t.ht(n):0)}function Qc(){const t=new w(4);return hu(Ae(t),0,W),t}async function tu(t,e){delete t.kt,await eu(e,Qc()),t.offset+=4}async function eu(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=gu(e),await r.write(e)}finally{r.releaseLock()}}async function nu(t,e,n,r){const o=e.writable.getWriter();try{await t.pipeTo(new D({async write(t){await o.ready,await o.write(t),r(gu(t))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{o.releaseLock()}}function ru(t){if(t){const e=(i(t.getTime())+i(116444736e5))*i(1e4);return e<$s?$s:e>Js?Js:e}}function ou(t){return a.floor(t.getTime()/1e3)}function iu(t){return a.min(Xs,a.max(Ks,t))}function au(t,e,n,r){const o=e[n]===dt?t.options[n]:e[n];return o===dt?r:o}function su(t,e,n,r){const i=au(t,e,n,r);if(null===i)return r;if(i!==dt&&(typeof i.getTime!=gt||o.isNaN(i.getTime())))throw new d(Ls);return i}function cu(t,e,n){return Jt(au(t,e,n))}function uu(t,e,n,r){return ie(au(t,e,n,r))}function lu(t){return t+5*(a.floor(t/16383)+1)}function fu(t,e){return t===dt?e===dt||e>0:0!==t}function du(t,e){return t.getUint16(e,!0)}function wu(t,e){return t.getUint32(e,!0)}function pu(t,e,n){t.setUint16(e,n,!0)}function hu(t,e,n){t.setUint32(e,n,!0)}function mu(t,e,n){t.setBigUint64(e,n,!0)}function yu(t,e,n){t.set(e,n)}function gu(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Eu({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:o,lastModDate:i,rawLastModDate:a,rawFilename:s,me:c,he:u,extraFieldLength:l}){const f=Vc(26),d=f.ct,w=Ae(d);if(f._e(t),f._e(e),f._e(n),a===dt){const t=new h(1),e=Ae(t);pu(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),pu(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),a=t[0]}return f.ve(a),f.Ve(4),c||o!==dt?f.ve(c?O:o):f.Ve(4),u||r!==dt?f.ve(u?O:r):f.Ve(4),f._e(gu(s)),f._e(l),{re:d,oe:w,rawLastModDate:a}}function Su(t){return t.every(t=>t>=32&&t<=126)}function bu(t,e,n,r,o){let i=0;return e&&(i|=nt),n&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),r&&(i|=1),i}function Ru(t,e){if(!t)return!1;const{supportedFormats:n}=t;return n?n.includes(e):ur(t,e)}const xu=1048576,zu=".zip.js-temp",Fu=1048576,Du=1048576,Au=".zip.js-temp",Iu="createSyncAccessHandle is only available in dedicated workers";try{!function(t){const e=Re(ze(t));n.assign(fe,e),n.assign(ge,e)}({baseURI:void 0===b&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:void 0===b?location.href:U&&"SCRIPT"===U.tagName.toUpperCase()&&U.src||new f("zip-fs-core.min.js",b.baseURI).href})}catch{}const Cu="Entry filename already exists",Tu="Duplicate entry filename in the imported zip file",ku='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',vu="Entry is an ancestor of target entry",_u="Root directory cannot be moved",Nu="Target entry is not a directory",Uu="Parent entry is not a directory",Ou="Readable stream already consumed",Mu="throw",Lu="keep-first",Bu="keep-last",Wu=new u([Mu,Lu,Bu]),Pu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Zu="Invalid readerOptions (must be an object)",Hu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",Vu="Invalid passwords option (must be an array of strings)",Gu="Invalid requestPassword option (must be a function returning a string or undefined)",ju="zipjs-abort-export",qu=new w(0),Yu=new u([tr,$n,Jn]);class Ku{constructor(t,e,r,o){const i=this;if(t.root&&o&&o.getChildByName(e))throw new d(Cu);r||(r={}),n.assign(i,{fs:t,name:e,data:r.data,options:r.options&&n.assign({},r.options),id:t.Ge++,parent:o,children:[],uncompressedSize:r.uncompressedSize||0,je:r.je||r.uncompressedSize===dt,passThrough:r.passThrough,qe:r.qe||new s}),!o&&t.root||(t.entries[i.id]=i),o&&i.parent.children.push(i)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let n=e.parent;if(n){const r=Al(t);r&&(t=r.pop(),n=Il(n,r,e));const o=n.getChildByName(t);if(o&&o!=e)throw new d(Cu);n!=e.parent&&(sl(e),e.parent=n,n.children.push(e),Fl(e.fs,e))}e.name=t}setOptions(t){const e=n.assign({},this.options,t);this.options=n.fromEntries(n.entries(e).filter(([,t])=>t!==dt))}}class Xu extends Ku{constructor(t,e,n,r){super(t,e,n,r);const o=this;o.Reader=n.Reader,o.Writer=n.Writer,n.getData&&(o.getData=n.getData)}clone(){return new Xu(this.fs,this.name,this)}async getData(t,e={}){const n=this;if(!t||t.constructor==n.Writer&&n.data&&function(t,e){const{contentType:n}=t;return n===dt||(t.constructor==Wo?e.type==n:t.constructor!=Oo||e.startsWith("data:"+(n||"")+";base64,"))}(t,n.data))return n.data;{const r=n.reader=il(n.Reader,n.data,e),o=n.uncompressedSize||r.size;await g.all([mi(r),mi(t,o)]);const i=Qt(e.signal),a=function(t,e,n,r){const{onstart:o,onprogress:i,onend:a}=n,{readable:s}=e;return t.data instanceof ea||!o&&!i&&!a?s:Mn(s).pipeThrough(new Lr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:r})}(n,r,e,i),s=!hi(t)&&Boolean(e.preventClose);return n.uncompressedSize=r.size,await Mn(a).pipeTo(Bn(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,n.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Ie(t)&&t.message==rn)return!1;throw t}}getText(t,e){return this.getData(new Ho(t),e)}getBlob(t,e){return this.getData(new Wo(t),e)}getData64URI(t,e){return this.getData(new Oo(t),e)}getUint8Array(t){return this.getData(new li,t)}getWritable(t=new D,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return De(await this.getUint8Array(t)).buffer}replaceBlob(t){yl(this,{data:t,Reader:Bo,Writer:Wo,uncompressedSize:t.size})}replaceText(t){yl(this,{data:t,Reader:Po,Writer:Ho,uncompressedSize:Zo(t)})}replaceData64URI(t){yl(this,{data:t,Reader:Uo,Writer:Oo,uncompressedSize:gl(t)})}replaceUint8Array(t){yl(this,{data:t,Reader:ui,Writer:li,uncompressedSize:t.length})}replaceReadable(t){yl(this,{data:null,Reader:rl(t),Writer:null,uncompressedSize:dt})}}class $u extends Ku{constructor(t,e,n,r){super(t,e,n,r),this.directory=!0}clone(t){const e=this,n=new $u(e.fs,e.name,e);return t&&(n.children=e.children.map(e=>{const r=e.clone(t);return r.parent=n,r})),n}addDirectory(t,e){return Dl(this,t,{options:e},!0)}addText(t,e,n={}){return Dl(this,t,{data:e,Reader:Po,Writer:Ho,options:n,uncompressedSize:Zo(e)})}addBlob(t,e,n={}){return Dl(this,t,{data:e,Reader:Bo,Writer:Wo,options:n,uncompressedSize:e.size})}addData64URI(t,e,n={}){return Dl(this,t,{data:e,Reader:Uo,Writer:Oo,options:n,uncompressedSize:gl(e)})}addUint8Array(t,e,n={}){return Dl(this,t,{data:e,Reader:ui,Writer:li,options:n,uncompressedSize:e.length})}addHttpContent(t,e,n={}){return Dl(this,t,{data:e,Reader:class extends ci{constructor(t){super(t,n)}},options:n})}addReadable(t,e,n={}){return Dl(this,t,{Reader:rl(e),options:n})}addFileSystemEntry(t,e={}){return bl(this,t,e)}addFileSystemHandle(t,e={}){return bl(this,t,e)}addFile(t,e={}){return(e=n.assign({},e)).lastModDate||(e.lastModDate=new s(t.lastModified)),Dl(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 Bo(t),e)}importData64URI(t,e){return this.importZip(new Uo(t),e)}importUint8Array(t,e){return this.importZip(new ui(t),e)}importHttpContent(t,e){return this.importZip(new ci(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new Wo(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Oo(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new li,t)}async exportWritable(t=new D,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:o,onprogress:i,onend:a}=r;ml(r.passThrough),dl(r);const s=fl(r.readerOptions),c=new AbortController,{signal:u}=c,l=function(t,e){if(!Qt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const n=()=>e.abort(t.reason);return t.addEventListener("abort",n,{once:!0}),()=>t.removeEventListener("abort",n)}(r.signal,c),f=n.assign({},r,s,{signal:u,onstart:dt,onprogress:dt,onend:dt,preventClose:!1}),w=tl([t],t=>nl(t,f.passThrough)),p=[];let h=!1,m=0;try{o&&await Br(o,w),await E(t,e),a&&await Br(a,m)}catch(t){try{t.exportedEntryNames=p}catch{}throw t}finally{l()}return e;function y(t){const e=t.getWriter();return new D({async write(t){await e.write(t),m+=t.length,i&&await Br(i,m,w)},close:()=>e.close(),abort:t=>e.abort(t)})}async function E(t,e){if(r.concurrent){const n=(await g.allSettled(t.children.map(t=>S(t,e)))).filter(t=>"rejected"==t.status);if(n.length){const t=n.filter(t=>!cl(t.reason));throw function(t){const[e]=t,n=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(n.length)try{e.entryErrors=[...e.entryErrors||[],...n]}catch{}return e}((t.length?t:n).map(t=>t.reason))}}else for(const n of t.children)await S(n,e)}async function S(e,n){if(u.aborted){if(h||cl(u.reason))return;te(u)}try{if(e.directory){const t=await n.getDirectoryHandle(e.name,{create:!0});await E(e,t)}else{const r=await n.getFileHandle(e.name,{create:!0}),o=await r.createWritable();try{await e.getData({writable:y(o)},f)}catch(t){throw h?new d(ju):t}p.push(e.getRelativeName(t))}}catch(n){h=!0,c.abort(new d(ju));try{n.entryName===dt&&(n.entryName=e.getRelativeName(t),n.entryId=e.id)}catch{}throw n}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==gt?(r=t,e=n.assign({},r.options,e)):(await mi(t),r=new Ga(t,e)),ml(e.passThrough),dl(e);const o=function(t){if(t===dt)return Mu;if(Wu.has(t))return t;throw new d(ku)}(e.duplicates),i=[],a={Ye:[]},s=await r.getEntries(e);for(const t of s){let r=this;try{const s=t.filename.split("/").filter(t=>""!=t&&"."!=t),c=s.pop();let u=!1;for(const t of s){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(o==Lu){u=!0;break}if(o!=Bu)throw new d(Tu);this.fs.remove(r),r=new $u(this.fs,t,{data:null},e),i.push(r)}}else r=new $u(this.fs,t,{data:null},e),i.push(r)}if(u)continue;if(t.directory){let e=r;if(c){if(e=r.getChildByName(c),e&&(!e.directory||e.data)){if(o==Lu)continue;if(o!=Bu)throw new d(Tu);e.directory?e.data=t:(this.fs.remove(e),e=dt)}e||(e=new $u(this.fs,c,{data:null},r),i.push(e))}e==this||e.data||(e.data=t)}else{const s=r.getChildByName(c);if(s){if(o==Lu)continue;if(o!=Bu)throw new d(Tu);this.fs.remove(s)}i.push(Dl(r,c,{data:t,Reader:ol(n.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){i.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return i}async exportZip(t,e={}){const r=this,o=Boolean(t)&&typeof t.add==gt;e=n.assign({},e),o||e.bufferedWrite!==dt||(e.bufferedWrite=!0);const[i]=await g.all([al(r,fl(e.readerOptions)),o?dt:mi(t)]),a=o?t:new Dc(t,e);return await async function(t,e,r,o,i){const{onstart:a,onprogress:s,onend:c,onentryprogress:u}=o,l=e,f=tl(e.children,t=>Sl(t)?0:1);let d=0,w=0;if(a&&await Br(a,r),o.bufferedWrite)await async function t(e){const n=(await g.allSettled(e.children.map(async e=>{await p(e),await t(e)}))).find(t=>"rejected"==t.status);if(n)throw n.reason}(e);else for(const t of e.getChildren({recursive:!0}))await p(t);async function p(e){if(Sl(e))return;const{name:a,Pt:c}=ul(e,l,o);let p=0;const h=await t.add(a,i.get(e),n.assign(c,{onstart:dt,onend:dt,onprogress:async t=>{d+=t-p,p=t,s&&await Br(s,d,r)}}));w++,u&&await Br(u,w,f,h)}c&&await Br(c,d)}(a,r,tl([r],el),e,i),o?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(t={}){const e=this;fl((t=n.assign({},t)).readerOptions),t.bufferedWrite===dt&&(t.bufferedWrite=!0);const r=e.getChildren({recursive:!0}),o=r.filter(t=>!Sl(t)).map(n=>{const{name:r,Pt:o}=ul(n,e,t);return{name:r,size:n.directory?0:ll(n,El(n,t)),options:o}}),i=!t.bufferedWrite||o.every(t=>!1!==t.options.keepOrder)&&r.every(t=>Sl(t)||!t.children.length);return await async function(t,e,r,o){const i={options:t};if(Jt(t[Bt]))throw new d(rc);if(o!==dt&&!(o instanceof w))throw new d(Us);const s=gu(o);if(s>M)throw new d(Ns);const l=t[Ot],f=new c,p=t[Ut]===dt?0:t[Ut];let h=p,m=wt;const y=[],g=new u;for(const t of e){let{name:e}=t;const{size:r}=t,o=n.assign({},t.options);au(i,o,Gi)&&!e.endsWith(ct)&&(e+=ct);const s=Nc(i,e,o);({name:e}=s);const{Ht:c}=Uc(i,e,o);0==c.level||c.compressionMethod!==dt||c.Gt||await Nr(Ee())||(c.level=0);const u=!au(i,o,Gi);if(u&&r===dt)throw new d(rc);const{Pe:w,Ht:p}=Mc(i,u,r,c,o);if(u&&!c.Gt&&fu(p.compressionMethod,p.level))throw new d(rc);const E=n.assign({},o,s.Ht,c,p,{[Ot]:l}),S=Bc(E),b=Zc(E),R={$t:S,ne:gu(S.Yt,b.Kt)};l&&Wc(R,h);const x=u?w:0;f.set(e,n.assign({},E,S,{offset:h,diskNumberStart:0,compressedSize:x}));const z=R.ne+x;y.push(z),g.add(Boolean(E.pe||E.uncompressedSize>=O||x>=O)),m=a.min(m,z),h+=z}if(f.size>1&&(l||h-m>=O&&(g.size>1||Lc(y,p,!0)!=Lc(y,p,!1)))&&!r)throw new d(rc);const{Fe:E,De:S}=Hc(f);let b=au(i,t,Wi);if(h>=O||E>=O||f.size>=M){if(!1===b)throw new d(Qs);b=!0}else b===dt&&S&&(b=!0);return h-p+E+s+(b?98:Y)}(t,o,i,t.globalComment)}getChildByName(t){const e=this.children;for(let n=0;n<e.length;n++){const r=e[n];if(r.name==t)return r}}getChildren(t={}){return function(t,e){const n=[],r=[t];let o=0;for(;o<r.length;)for(const t of r[o++].children)n.push(t),e&&r.push(t);return n}(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 n=this.children;return!(await g.all(n.map(n=>n.checkPassword(t,e)))).includes(!1)}}class Ju{constructor(){xl(this)}get children(){return this.root.children}remove(t){sl(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const n of t.children)e.push(n)}t.parent=dt}move(t,e){if(t==this.root)throw new d(_u);if(!e.directory)throw new d(Nu);if(e.isDescendantOf(t))throw new d(vu);if(t!=e){const n=e.getChildByName(t.name);if(n){if(n!=t)throw new d(Cu)}else sl(t),t.parent=e,e.children.push(t),Fl(this,t)}}find(t){const e=t.split("/");let n=this.root;for(let t=0;n&&t<e.length;t++)n=n.directory?n.getChildByName(e[t]):dt;return n||(n=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),n}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,n){return this.root.addText(t,e,n)}addBlob(t,e,n){return this.root.addBlob(t,e,n)}addData64URI(t,e,n){return this.root.addData64URI(t,e,n)}addUint8Array(t,e,n){return this.root.addUint8Array(t,e,n)}addHttpContent(t,e,n){return this.root.addHttpContent(t,e,n)}addReadable(t,e,n){return this.root.addReadable(t,e,n)}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 zl(this,n=>n.importBlob(t,e))}importData64URI(t,e){return zl(this,n=>n.importData64URI(t,e))}importUint8Array(t,e){return zl(this,n=>n.importUint8Array(t,e))}importHttpContent(t,e){return zl(this,n=>n.importHttpContent(t,e))}importReadable(t,e){return zl(this,n=>n.importReadable(t,e))}importZip(t,e){return zl(this,n=>n.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 Qu={FS:Ju,ZipDirectoryEntry:$u,ZipFileEntry:Xu};function tl(t,n){let r=0;const o=e.from(t);for(;o.length;){const t=o.pop();r+=n(t)||0;for(const e of t.children)o.push(e)}return r}function el(t){return t.uncompressedSize}function nl(t,e){const{data:n}=t;return e&&n instanceof ea?n.compressedSize:t.uncompressedSize}function rl(t){let e;return function(){if(e)throw new d(Ou);return e=!0,{readable:t}}}function ol(t,e){return class extends _o{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,o=n.assign({},t,r.options),{checkOverlappingEntry:i,checkOverlappingEntryOnly:a}=o,s=await async function(t,e,r){dl(e);const{passwords:o,requestPassword:i,signal:a}=e;if(delete(e=n.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!o&&!i)return t.getData(new Wo,e);const s=new u;let c;for(;;){for(const t of pl(e,r,o))if(!s.has(t.key)){const e=await f(t);if(e.done)return e.data;c=e.error}if(!i)break;if(r.Ke){await r.Ke;continue}let n;r.Ke=new g(t=>n=t);try{const e=await i(t,c);if(e===dt||null===e)break;if(typeof e!=St)throw new d(Gu);const n=await f(hl(e));if(n.done)return n.data;c=n.error}finally{r.Ke=dt,n()}}if(!s.size)throw new d(ca);const l=new d(rn);throw l.cause=c,l;async function f(o){s.add(o.key);const i=n.assign({},e,o.options);if(t.zipCrypto){i.checkCrc32=!0;try{await t.getData(null,n.assign({},i,{checkPasswordOnly:!0}))}catch(t){if(wl(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new Wo,i);return function(t,e){const{Ye:n}=t,r=n.findIndex(t=>t.key===e.key);-1!=r&&n.splice(r,1),n.unshift(e)}(r,o),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Ie(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return wl(t)||e.zipCrypto&&Ie(t)&&Yu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,n.assign(o,{checkPasswordOnly:!1,checkOverlappingEntry:a||i,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=s,r.Xe=new Bo(s),r.size=s.size,super.init()}readUint8Array(t,e){return this.Xe.readUint8Array(t,e)}}}function il(t,e,n){return t.prototype?new t(e,n):t(e,n)}async function al(t,e){const n=[],r=[t],o=new c;for(;r.length;){const t=r.pop();for(const e of t.children)e.directory?r.push(e):n.push(e)}return await g.all(n.map(async n=>{const r=n.reader=il(n.Reader,n.data,e);o.set(n,r);try{await mi(r)}catch(e){try{e.entry=n,e.entryId=n.id,e.entryName=n.getRelativeName(t)}catch{}throw e}r.size!==dt&&(n.uncompressedSize=r.size,n.je=!1)})),o}function sl(t){if(t.parent){const e=t.parent.children;e.forEach((n,r)=>{n.id==t.id&&e.splice(r,1)})}}function cl(t){return Boolean(t)&&t.message==ju}function ul(t,e,r){const o=r.relativePath?t.getRelativeName(e):t.getFullname(),i=t.options||{};let a={},s={};if(t.data instanceof ea){const e=El(t,r),n=i.lastModDate===dt?r.lastModDate:i.lastModDate;({Pt:a,Zt:s}=_c(t.data,e,n)),e&&(s.passThrough=!0)}const c=n.assign({lastModDate:t.qe},a,r,i,s,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===dt)throw new d(Pu);return{name:o,Pt:c}}function ll(t,e){const{reader:n}=t;return n&&n.size!==dt?n.size:t.je?dt:nl(t,e)}function fl(t){if(t&&(typeof t!=Et||e.isArray(t)))throw new d(Zu);return t&&(ml(t.passThrough),dl(t)),t}function dl(t){const{passwords:n,requestPassword:r}=t;if(n&&(!e.isArray(n)||n.some(t=>typeof t!=St)))throw new d(Vu);if(r&&typeof r!=gt)throw new d(Gu)}function wl(t){return Ie(t)&&t.message==rn}function pl(t,e,n){const r=[],{password:o,rawPassword:i}=t;return i&&i.length&&r.push({key:i,options:{password:"",rawPassword:i}}),o&&r.push(hl(o)),r.push(...e.Ye),n&&r.push(...n.filter(t=>t).map(hl)),r}function hl(t){return{key:t,options:{password:t,rawPassword:qu}}}function ml(t){if(ne(t)===jt)throw new d(Hu)}function yl(t,e){const{uncompressedSize:r}=e;n.assign(t,e,{reader:null,passThrough:dt,uncompressedSize:r===dt?0:r,je:r===dt})}function gl(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const n=t.indexOf(",")+1;return a.floor(.75*(e-n))}function El(t,e){const{readerOptions:n}=e;return Boolean(!t.directory&&(t.passThrough||n&&n.passThrough))}function Sl(t){return t.directory&&null===t.data}function bl(t,e,r){return async function t(e,o,i,a=""){if(o){const c=a?a+"/"+o.name:o.name;try{if((o.isFile||o.isDirectory)&&(o=await Rl(o)),"file"==o.kind){const t=await o.getFile();i.push(Dl(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:n.assign({},{lastModDate:new s(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==o.kind){const n=e.addDirectory(o.name,r);i.push(n);for await(const e of o.values())await t(n,e,i,c)}}catch(t){try{t.entryName===dt&&(t.entryName=c)}catch{}throw t}}return i}(t,e,[])}async function Rl(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new g((e,n)=>t.file(e,n))),t.isDirectory){e.kind="directory";const n=await async function(t){const e=[];function n(t,r,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await Rl(t));n(t,r,o)}else r(e)},o)}return await new g((e,r)=>n(t.createReader(),e,r)),{[k.iterator](){let t=0;return{next(){const n={value:e[t],done:t==e.length};return t++,n}}}}}(t);e.values=()=>n}return e}function xl(t){t.entries=[],t.Ge=0,t.root=new $u(t)}function zl(t,e){const{entries:r,Ge:o,root:i}=t;return xl(t),e(t.root).catch(e=>{throw n.assign(t,{entries:r,Ge:o,root:i}),e})}function Fl(t,e){const n=[e];for(;n.length;){const e=n.pop();t.entries[e.id]=e;for(const t of e.children)n.push(t)}}function Dl(t,e,n,r){if(t.directory){const o=Al(e);return o&&(e=o.pop(),t=Il(t,o)),r?new $u(t.fs,e,n,t):new Xu(t.fs,e,n,t)}throw new d(Uu)}function Al(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Il(t,e,n){return e.forEach(e=>{const r=t;if(t=t.getChildByName(e)){if(!t.directory)throw new d(Cu);if(n&&(t==n||t.isDescendantOf(n)))throw new d(vu)}else t=new $u(r.fs,e,{data:null},r)}),t}t.BlobReader=Bo,t.BlobWriter=Wo,t.Data64URIReader=Uo,t.Data64URIWriter=Oo,t.ERR_ABORTED=$t,t.ERR_AMBIGUOUS_ARCHIVE=da,t.ERR_ANCESTOR_ENTRY=vu,t.ERR_BAD_FORMAT=oa,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=sa,t.ERR_CODEC_OUT_OF_MEMORY=Qn,t.ERR_DUPLICATED_NAME=_s,t.ERR_DUPLICATE_IMPORTED_ENTRY=Tu,t.ERR_ENCRYPTED=ca,t.ERR_ENCRYPTED_CENTRAL_DIRECTORY=wa,t.ERR_ENTRY_DATA_OUT_OF_BOUNDS=fa,t.ERR_ENTRY_EXISTS=Cu,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=aa,t.ERR_EOCDR_NOT_FOUND=ia,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=mt,t.ERR_HTTP_RANGE=So,t.ERR_HTTP_RESOURCE_CHANGED=bo,t.ERR_HTTP_STATUS=Eo,t.ERR_INVALID_AUTHENTICATION_CODE=on,t.ERR_INVALID_BASE_URI=ce,t.ERR_INVALID_CODEC_DEFINITION=Wn,t.ERR_INVALID_CODEC_MODULE=Zn,t.ERR_INVALID_COMMENT=Ns,t.ERR_INVALID_COMMENT_TYPE=Us,t.ERR_INVALID_COMPRESSED_DATA=Jn,t.ERR_INVALID_CRC32=tr,t.ERR_INVALID_DATE=Ls,t.ERR_INVALID_DUPLICATES=ku,t.ERR_INVALID_ENCRYPTION_STRENGTH=Ps,t.ERR_INVALID_ENTRY=mc,t.ERR_INVALID_ENTRY_COMMENT=Os,t.ERR_INVALID_ENTRY_COMMENT_TYPE=Ms,t.ERR_INVALID_ENTRY_NAME=Bs,t.ERR_INVALID_EXTRAFIELD=Gs,t.ERR_INVALID_EXTRAFIELD_DATA=Ys,t.ERR_INVALID_EXTRAFIELD_DATA_TYPE=qs,t.ERR_INVALID_EXTRAFIELD_TYPE=js,t.ERR_INVALID_FILENAME_VALIDATION=ma,t.ERR_INVALID_FUNCTION_OPTION=qt,t.ERR_INVALID_GID=cc,t.ERR_INVALID_LEVEL=pc,t.ERR_INVALID_MAX_APPENDED_DATA_SIZE=ya,t.ERR_INVALID_MAX_WORKERS=se,t.ERR_INVALID_MSDOS_ATTRIBUTES=dc,t.ERR_INVALID_MSDOS_DATA=wc,t.ERR_INVALID_PASSWORD=rn,t.ERR_INVALID_PASSWORDS=Vu,t.ERR_INVALID_PASSWORD_TYPE=Kt,t.ERR_INVALID_PASS_THROUGH=Pu,t.ERR_INVALID_PASS_THROUGH_VALUE=Xt,t.ERR_INVALID_READER=ic,t.ERR_INVALID_READER_OPTIONS=Zu,t.ERR_INVALID_REQUEST_PASSWORD=Gu,t.ERR_INVALID_SIGNAL=Yt,t.ERR_INVALID_SIGNATURE_DATA=hc,t.ERR_INVALID_STRICTNESS=ha,t.ERR_INVALID_UID=sc,t.ERR_INVALID_UNCOMPRESSED_SIZE=$n,t.ERR_INVALID_UNIX_EXTRA_FIELD_TYPE=lc,t.ERR_INVALID_UNIX_ID_SIZE=fc,t.ERR_INVALID_UNIX_MODE=uc,t.ERR_INVALID_URI=ue,t.ERR_INVALID_VERSION=Ws,t.ERR_ITERATOR_COMPLETED_TOO_SOON=Ro,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=pt,t.ERR_OVERLAPPING_ENTRY=ht,t.ERR_PARENT_NOT_DIRECTORY=Uu,t.ERR_READABLE_CONSUMED=Ou,t.ERR_RESERVED_COMPRESSION_METHOD=Pn,t.ERR_ROOT_DIRECTORY_NOT_MOVABLE=_u,t.ERR_SPLIT_ZIP_FILE=la,t.ERR_TARGET_NOT_DIRECTORY=Nu,t.ERR_UNDEFINED_COMPRESSION_METHOD=ec,t.ERR_UNDEFINED_CRC32=nc,t.ERR_UNDEFINED_READER=oc,t.ERR_UNDEFINED_UNCOMPRESSED_SIZE=tc,t.ERR_UNDETERMINED_SIZE=rc,t.ERR_UNSAFE_FILENAME=pa,t.ERR_UNSUPPORTED_COMPRESSION=Hn,t.ERR_UNSUPPORTED_CONTEXT=Iu,t.ERR_UNSUPPORTED_CRYPTO_API=sn,t.ERR_UNSUPPORTED_ENCRYPTION=ua,t.ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH=Vs,t.ERR_UNSUPPORTED_ENCRYPTION_USDZ=Zs,t.ERR_UNSUPPORTED_FORMAT=Qs,t.ERR_UNSUPPORTED_PASS_THROUGH_VALUE=Hu,t.ERR_UNSUPPORTED_SPLIT_USDZ=Hs,t.ERR_UNSUPPORTED_UINT64=ga,t.ERR_WORKER_STARTUP_TIMEOUT=Cr,t.ERR_WRITER_NOT_INITIALIZED=xo,t.ERR_WRITER_SIZE_NOT_WRITABLE=zo,t.ERR_ZIP_CRYPTO_LAST_MOD_DATE=yc,t.ERR_ZIP_NOT_EMPTY=ac,t.HttpRangeReader=class extends ci{constructor(t,e={}){super(t,n.assign({},e,{useRangeHeader:!0}))}},t.HttpReader=ci,t.Reader=_o,t.SplitDataReader=fi,t.SplitDataWriter=di,t.TextReader=Po,t.TextWriter=Ho,t.Uint8ArrayReader=ui,t.Uint8ArrayWriter=li,t.VERSION="2.21.0",t.WARNING_APPENDED_DATA=Fa,t.WARNING_CLAMPED_LAST_MODIFICATION_DATE=Ec,t.WARNING_COMPRESSED_PATCHED_DATA=ba,t.WARNING_COMPRESSION_UNAVAILABLE=gc,t.WARNING_DUPLICATE_FILENAME=ka,t.WARNING_MALFORMED_EXTRA_FIELD=Ra,t.WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET=Ca,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG=Ua,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD=Oa,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES=Ma,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME=Na,t.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY=va,t.WARNING_MISSING_ZIP64_EXTRA_FIELD=Ta,t.WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY=_a,t.WARNING_PREPENDED_CENTRAL_DIRECTORY=Aa,t.WARNING_PREPENDED_DATA=Da,t.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA=Ia,t.WARNING_UNKNOWN_VERSION=Sa,t.WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA=xa,t.WARNING_UNSORTED_CENTRAL_DIRECTORY=Ea,t.WARNING_WRAPPED_ENTRIES_COUNT=za,t.Writer=No,t.ZipDirectoryEntry=$u,t.ZipEntry=Ku,t.ZipFS=Ju,t.ZipFileEntry=Xu,t.ZipReader=Ga,t.ZipReaderStream=ja,t.ZipWriter=Dc,t.ZipWriterStream=class{constructor(t={}){const{readable:e,writable:n}=new z;this.readable=e,this.zipWriter=new Dc(n,t),this.Ut=new u}transform(t){const e=this.zipWriter;let n;const{readable:r,writable:o}=new z({start(t){n=t},flush:()=>{!async function(){try{await e.close()}catch(t){await kc(e,t)}}()}});return vc(this,this.zipWriter.add(t,r),t=>n.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:n,writable:r}=new z({start(t){e=t}});return vc(this,this.zipWriter.add(t,n),t=>e.error(t)),r}async close(t,n={}){const{zipWriter:r}=this,o=(await g.allSettled(e.from(this.Ut))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(o.length){const[t]=o;try{t.entryErrors=o}catch{}throw await kc(r,t),t}try{return await r.close(t,n)}catch(t){throw await kc(r,t),t}}},t.configure=function(t){n.assign(ge,Re(ze(t)))},t.createBlobTempStream=function(t={}){const{thresholdBytes:e=Fu}=t;return function(){const t=[];let n,r,o,i=0,a=!1;const s=new D({async write(o){a?await n.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new z;r=Ln(e.readable),n=e.writable.getWriter(),a=!0;for(const e of t)await n.write(e);t.length=0}())},async close(){n&&(await n.close(),n=null)}});let c=0;return{writable:s,readable:new F({async pull(e){if(a){if(!o){const t=await r;o=t.stream().getReader()}const{value:t,done:n}=await o.read();n?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(n){try{await n.abort()}catch{}n=null}r&&(r.catch(()=>{}),r=null),t.length=0}}}},t.createOPFSTempStream=function(t={}){const{thresholdBytes:n=xu,directoryName:r=zu,getDirectory:o=()=>C.storage.getDirectory()}=t;let i;function a(){return i||(i=g.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,o,i,s,c=0,u=!1;const l=new D({async write(s){u?await i.write(s):(t.push(s),c+=s.length,c>n&&await async function(){const n=await a();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join(""),o=await n.getFileHandle(r,{create:!0}),i=(await o.createWritable()).getWriter(),u=!0;for(const e of t)await i.write(e);t.length=0}())},async close(){i&&(await i.close(),i=null)}});let f=0;return{writable:l,readable:new F({async pull(e){if(u){if(!s){const t=await o.getFile();s=t.stream().getReader()}const{value:t,done:n}=await s.read();n?e.close():e.enqueue(t)}else f<t.length?e.enqueue(t[f++]):e.close()},async cancel(t){s&&await s.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(i){try{await i.close()}catch{}i=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}o=r=null}t.length=0}}}},t.createSyncAccessHandleTempStream=function(t={}){const{thresholdBytes:n=Du,directoryName:r=Au,getDirectory:o}=t;if(!(o||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new d(Iu);const i=o||(()=>C.storage.getDirectory());let s;function c(){return s||(s=g.resolve(i()).then(t=>t.getDirectoryHandle(r,{create:!0}))),s}return function(){const t=[];let r,o,i=0,s=!1,u=0,l=0;const f=new D({async write(a){s?(o.write(a,{at:u}),u+=a.length):(t.push(a),i+=a.length,i>n&&await async function(){const n=await c();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join("");const i=await n.getFileHandle(r,{create:!0});o=await i.createSyncAccessHandle(),s=!0;for(const e of t)o.write(e,{at:u}),u+=e.length;t.length=0}())},close(){o&&o.flush()}});let d=0;return{writable:f,readable:new F({pull(e){if(s){const t=u-l;if(t<=0)return void e.close();const n=new w(a.min(524288,t)),r=o.read(n,{at:l});r?(l+=r,e.enqueue(n.subarray(0,r))):e.close()}else d<t.length?e.enqueue(t[d++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(o){try{o.close()}catch{}o=null}if(r){try{const t=await c();await t.removeEntry(r)}catch{}r=null}t.length=0}}}},t.fs=Qu,t.getMimeType=function(){return"application/octet-stream"},t.getRegisteredCodecs=Yn,t.getSupportedCompressionMethods=function(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:n,DecompressionStreamFallback:r}=Ee(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Ru(n,er)||Ru(t,er)||Ru(t,rr),decompression:Ru(r,er)||Ru(e,er)||Ru(e,rr),registered:!1},{compressionMethod:9,compression:!1,decompression:Ru(r,nr)||Ru(e,nr),registered:!1}];for(const t of Yn()){const e=Kn(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==gt:dt,decompression:e?typeof e.DecompressionStream==gt:dt,registered:!0})}return o},t.isZipFile=qa,t.registerCodec=function(t={}){const{compressionMethod:e,format:n,codecURI:r,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!o.isInteger(e)||e<0||e>M||typeof n!=St||!n.length)throw new d(Wn);if(Vn.includes(e))throw new d(Pn);const c=typeof i==gt||typeof a==gt;if(!(c||typeof r==St&&r.length))throw new d(Wn);Gn.set(e,{compressionMethod:e,format:n,codecURI:r,versionNeeded:s}),c&&Xn(n,{CompressionStream:i,DecompressionStream:a})},t.resetConfiguration=function(){for(const t of ye)delete ge[t];n.assign(ge,fe)},t.terminateWorkers=async function(){await g.allSettled([lo(),...eo.map(t=>(po(t),t.terminate()))]),Tr=dt,kr=!1},t.unregisterCodec=function(t){const e=Gn.get(t);if(e){let n;Gn.delete(t),Gn.forEach(t=>n=n||t.format==e.format),n||jn.delete(e.format)}}});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,function(t){"use strict";const{Array:e,Object:n,String:r,Number:o,BigInt:i,Math:a,Date:s,Map:c,Set:u,Response:l,URL:f,Error:d,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:m,Blob:y,Promise:g,TextEncoder:E,TextDecoder:S,document:b,crypto:R,btoa:x,TransformStream:z,ReadableStream:F,WritableStream:D,CompressionStream:A,DecompressionStream:I,navigator:C,Worker:T,Symbol:k,setTimeout:v,clearTimeout:_,structuredClone:N}="undefined"!=typeof globalThis?globalThis:self;var U=void 0!==b?b.currentScript:null;const O=4294967295,M=65535,L=255,B=67324752,W=134695760,P=W,Z=84233040,H=33639248,V=101010256,G=101075792,j=117853008,q=46,Y=22,K=20,X=56,$=39169,J=21589,Q=6534,tt=30837,et=30805,nt=2048,rt=8192,ot=61440,it=16384,at=2048,st=1024,ct="/",ut=30,lt=new s(2107,11,31,23,59,58),ft=new s(1980,0,1),dt=void 0,wt=1/0,pt="Local file header not found",ht="Overlapping entry found",mt="Zip64 extra field not found",yt="undefined",gt="function",Et="object",St="string",bt="boolean",Rt=new w,xt=k.asyncDispose||k(),zt="password",Ft="rawPassword",Dt="passThrough",At="signal",It="checkAmbiguity",Ct="useWebWorkers",Tt="useCompressionStream",kt="preventClose",vt="level",_t="useUnicodeFileNames",Nt="dataDescriptor",Ut="offset",Ot="usdz",Mt="strictness",Lt="maxAppendedDataSize",Bt="signCentralDirectory",Wt="entry",Pt="filename",Zt="comment",Ht="strict",Vt="balanced",Gt="tolerant",jt="compressed",qt="Invalid option (must be a function)",Yt="Invalid signal (must be an AbortSignal instance)",Kt="Invalid password (password must be a string, rawPassword must be a Uint8Array)",Xt="Invalid passThrough option (must be a boolean or 'compressed')",$t="Invalid readerOptions (must be an object)",Jt="The operation was aborted";function Qt(t){if(t&&typeof t!=gt)throw new d(qt);return t}function te(t){if(t&&(typeof t!=Et||e.isArray(t)))throw new d($t);return t}function ee(t){if(t&&(typeof t.addEventListener!=gt||typeof t.aborted!=bt))throw new d(Yt);return t||dt}function ne(t){if(t&&t.aborted)throw t.reason===dt?new DOMException(Jt,"AbortError"):t.reason}function re(t,e){if(t&&typeof t!=St||e&&!(e instanceof w))throw new d(Kt)}function oe(t){if(t!==dt&&typeof t!=bt&&t!==jt)throw new d(Xt);return t}function ie(t,e,n){if(!o.isInteger(t)||t<0||t>e)throw new d(n)}function ae(t,e,n){t!==dt&&ie(t,e,n)}function se(t){return typeof t==St&&t.trim()?o(t):t}const ce=262144,ue="Invalid maxWorkers (must be an integer greater than 0)",le="Invalid baseURI (must be a string)",fe="Invalid URI (must be a string or a function returning a string)";let de=2;try{typeof C!=yt&&C.hardwareConcurrency&&(de=C.hardwareConcurrency)}catch{}const we={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:ce,maxWorkers:de,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,CompressionStream:typeof A!=yt&&A,DecompressionStream:typeof I!=yt&&I},pe="maxWorkers",he="baseURI",me=["wasmURI","workerURI"],ye=["chunkSize",pe,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],ge=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],Ee=[he,...me,"useCompressionStream","useWebWorkers",...ye,...ge],Se={...we};function be(){return Se}function Re(t){return xe(t.chunkSize)}function xe(t){return t=se(t),o.isInteger(t)&&t>=1?a.max(t,64):ce}function ze(t){const e={};for(const n of Ee){const r=t[n];r!==dt&&(e[n]=Fe(n,r))}return e}function Fe(t,e){if(ye.includes(t)){if(e=se(e),t==pe&&(!o.isInteger(e)||e<1))throw new d(ue)}else if(ge.includes(t))Qt(e);else if(t==he){if(e&&typeof e!=St)throw new d(le)}else if(me.includes(t)&&e&&typeof e!=St&&typeof e!=gt)throw new d(fe);return e}function De(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===dt&&r===dt)return t;const o=n.assign({},t);return o.CompressionStreamFallback===dt&&(o.CompressionStreamFallback=e),o.DecompressionStreamFallback===dt&&(o.DecompressionStreamFallback=r),o}function Ae(t,e){const n=new w(t.length+e.length);return n.set(t),n.set(e,t.length),n}function Ie(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new w(t):t}function Ce(t){return new m(t.buffer,t.byteOffset,t.byteLength)}function Te(t){return Boolean(t)&&"object"==typeof t}const ke=[[],[],[],[],[],[],[],[]];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;ke[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const n=ke[e-1][t];ke[e][t]=n>>>8^ke[0][255&n]}const[ve,_e,Ne,Ue,Oe,Me,Le,Be]=ke;class We{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let r=0;if(n>=8&&t.buffer){const o=new m(t.buffer,t.byteOffset,n),i=n-8;for(;r<=i;r+=8){const t=e^o.getInt32(r,!0),n=o.getInt32(r+4,!0);e=Be[255&t]^Le[t>>>8&255]^Me[t>>>16&255]^Oe[t>>>24&255]^Ue[255&n]^Ne[n>>>8&255]^_e[n>>>16&255]^ve[n>>>24&255]}}for(;r<n;r++)e=e>>>8^ve[255&(e^t[r])];this.o=e}get(){return~this.o}}class Pe extends z{constructor(){let t;const e=new We;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new w(4);new m(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function Ze(t){if(typeof E==yt){t=unescape(encodeURIComponent(t));const e=new w(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new E).encode(t)}const He=64,Ve=20,Ge=new w([128]),je=new w(1),qe=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),Ye=new w(256),Ke=new Int32Array(256),Xe=new Int32Array(256),$e=new Int32Array(256),Je=new Int32Array(256);let Qe=!1;function tn(t){const e=function(){const t=new Int32Array(qe),e=new Int32Array(16),n=new w(He),r=new m(n.buffer),o=new w(8);let i=0,s=0;return{update:c,digest:function(){const e=8*s,n=a.floor(e/4294967296),r=e>>>0;for(c(Ge,0,1);56!=i;)c(je,0,1);o[0]=n>>>24,o[1]=n>>>16,o[2]=n>>>8,o[3]=n,o[4]=r>>>24,o[5]=r>>>16,o[6]=r>>>8,o[7]=r,c(o,0,8);const u=new w(Ve),l=new m(u.buffer);for(let e=0;e<t.length;e++)l.setInt32(4*e,t[e]);return t.set(qe),i=0,s=0,u}};function c(t,e,o){const a=e+o;if(s+=o,i){for(;e<a&&i<He;)n[i++]=t[e++];i==He&&(u(r,0),i=0)}if(e+He<=a){const n=new m(t.buffer,t.byteOffset,t.byteLength);for(;e+He<=a;e+=He)u(n,e)}for(;e<a;)n[i++]=t[e++]}function u(n,r){for(let t=0;t<16;t++)e[t]=n.getInt32(r+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}}(),n=new w(He),r=new w(He);t.length>He&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<He;e++){const o=e<t.length?t[e]:0;n[e]=54^o,r[e]=92^o}return e.update(n,0,He),{update(t,n,r){e.update(t,n,r)},digest(){const t=e.digest();e.update(r,0,He),e.update(t,0,Ve);const o=e.digest();return e.update(n,0,He),o}}}function en(t){return Ye[t>>>24]<<24|Ye[t>>>16&255]<<16|Ye[t>>>8&255]<<8|Ye[255&t]}function nn(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function rn(t){return 255&(t<<1^27*(t>>7))}const on=typeof R!=yt&&typeof R.getRandomValues==gt,an="Invalid password",sn="Invalid authentication code",cn="zipjs-abort-check-password",un="Crypto API not supported";function ln(t){if(on)return R.getRandomValues(t);throw new d(un)}const fn={name:"PBKDF2"},dn=n.assign({hash:{name:"HMAC"}},fn),wn=n.assign({iterations:1e3,hash:{name:"SHA-1"}},fn),pn=["deriveBits"],hn=[8,12,16],mn=[16,24,32],yn=10,gn=typeof R!=yt,En=gn&&R.subtle;let Sn=gn&&typeof En!=yt&&typeof En.importKey==gt&&typeof En.deriveBits==gt;class bn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:r,checkAuthenticationCode:o=!0}){const i={};super({start(){xn(i,t,e,n)},async transform(t,e){const{password:n,strength:o,l:a,ready:s}=i;if(n?(await async function(t,e,n,r){const o=await An(t,e,n,Cn(r,0,hn[e])),i=Cn(r,hn[e]);if(o[0]!=i[0]||o[1]!=i[1])throw Dn(t),new d(an)}(i,o,n,Cn(t,0,hn[o]+2)),t=Cn(t,hn[o]+2),r?(Dn(i),e.error(new d(cn))):a()):await s,i.h)return;const c=new w(t.length-yn-(t.length-yn)%16);e.enqueue(Fn(i,t,c,0,yn,!0))},async flush(t){const{m:e,S:n,ready:r}=i;if(e){if(await r,i.h)return;const a=Cn(n,n.length-yn),s=new w(Cn(n,0,n.length-yn));e.process(s,!0);const c=e.digest();let u=n.length<yn?1:0;for(let t=0;t<yn;t++)u|=c[t]^a[t];if(u&&o)return void t.error(new d(sn));t.enqueue(s)}}}),zn(this,i)}}class Rn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n}){const r={};super({start(){xn(r,t,e,n)},async transform(t,e){const{password:n,strength:o,l:i,ready:a}=r;let s=Rt;if(n?(s=await async function(t,e,n){const r=ln(new w(hn[e]));return Ae(r,await An(t,e,n,r))}(r,o,n),i()):await a,r.h)return;const c=new w(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(Fn(r,t,c,s.length,0,!1))},async flush(t){const{m:e,S:n,ready:o}=r;if(e){if(await o,r.h)return;const i=new w(n);e.process(i,!1);const a=Cn(e.digest(),0,yn);t.enqueue(Ae(i,a))}}}),zn(this,r)}}function xn(t,e,r,o){n.assign(t,{ready:new g(e=>t.l=e),password:In(e,r),strength:o-1,S:Rt,h:!1})}function zn(t,e){const r=t.readable.getReader(),o=new F({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw Dn(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(Dn(e),r.cancel(t))});n.defineProperty(t,"readable",{get:()=>o})}function Fn(t,e,n,r,o,i){const{m:a,S:s}=t;s.length&&(e=Ae(s,e));const c=e.length-o,u=c-c%16;if(n=function(t,e){if(e&&e>t.length){const n=t;(t=new w(e)).set(n,0)}return t}(n,r+u),u){const t=Cn(n,r,r+u);t.set(Cn(e,0,u)),a.process(t,i)}return t.S=Cn(e,u),n}function Dn(t){const{m:e}=t;t.h=!0,e&&e.dispose&&e.dispose()}async function An(t,e,r,o){t.password=null;const i=mn[e],s=await async function(t,e,r){if(Sn)try{const o=await En.importKey("raw",t,dn,!1,pn);return new w(await En.deriveBits(n.assign({salt:e},wn),o,8*r))}catch{Sn=!1}return function(t,e,n,r){const o=tn(t),i=new w(r),s=new w(e.length+4),c=new m(s.buffer);s.set(e);for(let t=1,n=0;n<r;t++,n+=Ve){c.setUint32(e.length,t),o.update(s,0,s.length);let u=o.digest();const l=u.slice();for(let t=1;t<1e3;t++){o.update(u,0,Ve),u=o.digest();for(let t=0;t<Ve;t++)l[t]^=u[t]}i.set(l.subarray(0,a.min(Ve,r-n)),n)}return i}(t,e,0,r)}(r,o,2*i+2);return t.m=function(t,e){!function(){if(!Qe){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),Ye[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);Ye[0]=99;for(let t=0;t<256;t++){const e=Ye[t],n=rn(e),r=n<<24|e<<16|e<<8|n^e;Ke[t]=r,Xe[t]=r>>>8|r<<24,$e[t]=r>>>16|r<<16,Je[t]=r>>>24|r<<8}Qe=!0}}();const n=new Int32Array(60),r=function(t,e){const n=t.length>>2,r=n+6,o=4*(r+1);let i=1;for(let r=0;r<n;r++)e[r]=t[4*r]<<24|t[4*r+1]<<16|t[4*r+2]<<8|t[4*r+3];for(let t=n;t<o;t++){let r=e[t-1];t%n==0?(r=en(r<<8|r>>>24)^i<<24,i=rn(i)):n>6&&t%n==4&&(r=en(r)),e[t]=e[t-n]^r}return r}(t,n),o=new Int32Array(4),i=tn(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 m(t.buffer,t.byteOffset,t.byteLength),n=t.length;let r=0;for(;r+16<=n;r+=16)l(),e.setInt32(r,e.getInt32(r)^o[0]),e.setInt32(r+4,e.getInt32(r+4)^o[1]),e.setInt32(r+8,e.getInt32(r+8)^o[2]),e.setInt32(r+12,e.getInt32(r+12)^o[3]);if(r<n){l();for(let e=0;r<n;r++,e++)t[r]^=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=nn(a)^n[0],e=nn(s)^n[1],i=nn(c)^n[2],l=nn(u)^n[3],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[4],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[5],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[6],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[7];t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[8],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[9],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[10],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[11],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[12],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[13],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[14],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[15],t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[16],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[17],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[18],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[19],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[20],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[21],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[22],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[23],t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[24],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[25],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[26],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[27],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[28],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[29],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[30],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[31],t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[32],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[33],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[34],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[35],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[36],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[37],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[38],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[39];let h=40;r>10&&(t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[40],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[41],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[42],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[43],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[44],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[45],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[46],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[47],h=48),r>12&&(t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[48],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[49],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[50],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[51],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[52],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[53],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[54],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[55],h=56),o[0]=(Ye[f>>>24]<<24|Ye[d>>>16&255]<<16|Ye[w>>>8&255]<<8|Ye[255&p])^n[h],o[1]=(Ye[d>>>24]<<24|Ye[w>>>16&255]<<16|Ye[p>>>8&255]<<8|Ye[255&f])^n[h+1],o[2]=(Ye[w>>>24]<<24|Ye[p>>>16&255]<<16|Ye[f>>>8&255]<<8|Ye[255&d])^n[h+2],o[3]=(Ye[p>>>24]<<24|Ye[f>>>16&255]<<16|Ye[d>>>8&255]<<8|Ye[255&w])^n[h+3]}}(Cn(s,0,i),Cn(s,i,2*i)),t.h&&Dn(t),Cn(s,2*i)}function In(t,e){return e===dt?Ze(t):e}function Cn(t,e,n){return t.subarray(e,n)}class Tn extends z{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){vn(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=_n(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new d(an);t=t.subarray(12)}r?e.error(new d(cn)):e.enqueue(_n(n,t))}})}}class kn extends z{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){vn(this,t,e,n)},transform(t,e){const n=this;let r,o;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=ln(new w(12));e[11]=n.passwordVerification,r=new w(t.length+e.length),r.set(Nn(n,e),0),o=12}else r=new w(t.length),o=0;r.set(Nn(n,t),o),e.enqueue(r)}})}}function vn(t,e,r,o){n.assign(t,{password:e,rawPassword:r,passwordVerification:o}),function(t,e,r){const o=[305419896,591751049,878082192];if(n.assign(t,{R:o,F:new We(o[0]),D:new We(o[2])}),r)for(let e=0;e<r.length;e++)Un(t,r[e]);else for(let n=0;n<e.length;n++)Un(t,e.charCodeAt(n))}(t,e,r)}function _n(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=On(t)^e[r],Un(t,n[r]);return n}function Nn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=On(t)^e[r],Un(t,e[r]);return n}function Un(t,e){let[,n]=t.R;t.F.append([e]);const r=~t.F.get();n=Ln(a.imul(Ln(n+Mn(r)),134775813)+1),t.D.append([n>>>24]);const o=~t.D.get();t.R=[r,n,o]}function On(t){const e=2|t.R[2];return Mn(a.imul(e,1^e)>>>8)}function Mn(t){return 255&t}function Ln(t){return 4294967295&t}function Bn(t){if(t instanceof F)return t;const e=t.getReader();return new F({async pull(t){try{const{value:n,done:r}=await e.read();r?t.close():t.enqueue(n)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function Wn(t,e){t=Bn(t);const n=e?{type:e}:{};if(typeof y.prototype.stream!=gt||new y([]).stream()instanceof F)return new l(t).blob().then(t=>e?new y([t],n):t);const r=[];return t.pipeTo(new D({write(t){r.push(t)}})).then(()=>new y(r,n))}function Pn(t){if(t instanceof D)return t;const e=t.getWriter();return new D({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Zn="Invalid codec definition",Hn="Reserved compression method",Vn="Invalid codec module",Gn="Compression method not supported",jn=[0,8,9,99],qn=new c,Yn=new c;function Kn(t){return qn.get(t)}function Xn(){return e.from(qn.values(),t=>n.assign({},t,Yn.get(t.format)))}function $n(t){return Yn.get(t)}function Jn(t,e){const{CompressionStream:n,DecompressionStream:r}=e;if(typeof n!=gt&&typeof r!=gt)throw new d(Vn);Yn.set(t,{CompressionStream:n,DecompressionStream:r})}const Qn="Invalid uncompressed size",tr="Invalid compressed data",er="Codec out of memory",nr="Invalid CRC32",rr="deflate-raw",or="deflate64-raw",ir="gzip",ar=[31,139,8];class sr extends z{constructor(t,{chunkSize:e,CompressionStreamFallback:n,CompressionStream:r}){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,y,g,E=super.readable;const S=f&&$n(f),b=hr(a,r,n),R=c&&o&&!l&&!S&&(!i||s)&&Boolean(b);if(i&&!s||!c||R||(h=new Pe,E=yr(E,h)),o)if(S)E=gr(E,pr(S.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(R)g=new cr,E=gr(E,new b(ir,{level:u,chunkSize:e})),E=yr(E,g);else try{E=mr(E,a,{level:u,chunkSize:e},r,n)}catch(t){if(!a&&n)throw xr(t);let e;try{e=new r(ir)}catch{throw xr(t)}E=gr(E,e),E=yr(E,new cr)}i&&(s?E=yr(E,new kn(t)):(y=new Rn(t),E=yr(E,y))),wr(p,E,()=>{i&&!s||!c||(p.crc32=R?g.crc32:new m(h.value.buffer).getUint32(0))})}}class cr extends z{constructor(){let t,e=10,n=new w(0);super({transform(t,r){if(e){const n=a.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(o<=8)return void(n=Ae(n,t));const i=o-8,s=a.min(i,n.length);r.enqueue(Ae(n.subarray(0,s),t.subarray(0,i-s))),n=Ae(n.subarray(s),t.subarray(i-s))},flush(){const e=Ce(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class ur extends z{constructor(t,{chunkSize:e,DecompressionStreamFallback:n,DecompressionStream:r}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:l,deflate64:f,format:p,compressionMethod:h,rawBitFlag:y,outputSize:E}=t;let S,b,R,x=super.readable;if(i&&(o?x=yr(x,new Tn(t)):(b=new bn(t),x=yr(x,b))),c){const t=new u,o=p&&$n(p);let i;if(o)x=gr(x,pr(o.DecompressionStream,p,{chunkSize:e,compressionMethod:h,rawBitFlag:y,uncompressedSize:E}),t);else{const o=hr(l,r,n);if(a&&!f&&s!==dt&&E!==dt&&o)try{i=new o(ir,{chunkSize:e})}catch{i=dt}if(!i)try{x=mr(x,l,{chunkSize:e,deflate64:f},r,n,t)}catch(t){if(f||E===dt||!l&&n)throw xr(t);try{i=new r(ir)}catch{throw xr(t)}}}i?(R=!0,x=function(t,e,n,r,o){const i=e.writable.getWriter(),a=e.readable.getReader(),s=r===dt?new We:dt;let c,u,l=0,f=!1,p=!1;const h=new F({start(t){u=t},pull(){E()},cancel:t=>(p=!0,E(),a.cancel(t))});return async function(){const e=t.getReader();try{const t=new w(10);for(t.set(ar),await i.write(t);;){await y(),await i.ready;const{value:t,done:n}=await br(e,o);if(n)break;await i.write(t)}s&&await i.write(new w(0));const a=new w(8),c=Ce(a);c.setUint32(0,s?s.get():r,!0),c.setUint32(4,n,!0),f=!0,await i.write(a),await i.close()}catch(t){await Er(i,t),await Sr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await m();if(e)break;if(l+=t.length,l>n)throw new d(Qn);s&&s.append(t),u.enqueue(t)}p||(p=!0,u.close())}catch(t){!function(t){p||(p=!0,u.error(t),E())}(t),await Sr(a,t)}}(),h;function m(){return a.read().catch(t=>{if(f){if(!s)throw Fr(t,nr);if(l!=n)throw Fr(t,Qn);return{done:!0}}throw Rr(t,o)})}function y(){if(!p&&u.desiredSize<=0)return new g(t=>c=t)}function E(){if(c){const t=c;c=dt,t()}}}(x,i,E,s,t)):x=function(t,e){const n=t.getReader();return new F({async pull(t){try{const{value:e,done:r}=await n.read();r?t.close():t.enqueue(e)}catch(t){throw await Sr(n,t),Rr(t,e)}},cancel:t=>n.cancel(t)})}(x,t)}a&&!R&&(S=new Pe,x=yr(x,S)),wr(this,x,()=>{if(S){const t=new m(S.value.buffer).getUint32(0,!1);if(s!=t)throw new d(nr)}})}}const lr=new c;function fr(t,e){if(!t)return!1;let n=lr.get(t);n||(n=new c,lr.set(t,n));let r=n.get(e);if(r===dt){try{new t(e),r=!0}catch{r=!1}n.set(e,r)}return r}function dr(t){return fr(t,rr)}function wr(t,e,r){e=yr(e,new z({flush:r})),n.defineProperty(t,"readable",{get:()=>e})}function pr(t,e,n){if(!t)throw new d(Gn);return new t(e,n)}function hr(t,e,n){return t&&e?e:n&&n.requiresModule?n:void 0}function mr(t,e,n,r,o,i){const a=e&&r?r:o||r,s=n.deflate64?or:rr;let c;try{c=new a(s,n)}catch(t){if(!e||!o||a==o)throw t;c=new o(s,n)}return gr(t,c,i)}function yr(t,e){return Bn(t).pipeThrough(e)}function gr(t,e,n){const r=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await r.ready;const t=await br(o,n);if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await Er(r,t),await Sr(o,t)}}(),e.readable}async function Er(t,e){try{await t.abort(e)}catch{}}async function Sr(t,e){try{await t.cancel(e)}catch{}}function br(t,e){const n=t.read();return e?n.catch(t=>{throw e.add(t),t}):n}function Rr(t,e){return e.has(t)?t:Fr(t,zr(t)?er:tr)}function xr(t){return zr(t)?Fr(t,er):t}function zr(t){return Te(t)&&"Z_MEM_ERROR"==t.code}function Fr(t,e){const n=new d(e);return n.cause=t,n}const Dr="data",Ar="deflate",Ir="inflate";class Cr extends z{constructor(t,e){super({});const r=this,{codecType:o}=t;let i;o.startsWith(Ar)?i=sr:o.startsWith(Ir)&&(i=ur),r.outputSize=0;let a=0;const s=new i(t,e),c=super.readable,u=new z({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){n.assign(r,{inputSize:a})}}),l=new z({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==dt&&r.outputSize>t.outputSize))throw new d(Qn)},flush(){const{crc32:t}=s;n.assign(r,{crc32:t,inputSize:a})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(s).pipeThrough(l)})}}class Tr extends z{constructor(t){const e=[];let r=0,i=0;function a(){const n=new w(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}(!o.isFinite(t)||t<1)&&(t=262144),super({transform(n,o){for(e.push(n),r+=n.length;r>t;)i+=t,o.enqueue(a())},flush(t){r&&(i+=r,t.enqueue(function(t,e){const n=new w(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(e,r)))}}),n.defineProperty(this,"outputSize",{get:()=>i})}}const kr="Worker startup timeout";let vr,_r,Nr,Ur=()=>{};async function Or(t){const{CompressionStream:e,CompressionStreamFallback:n}=t;return!(!n||n.requiresModule)||!(!dr(e)&&(r=e,!fr(r,ir)))||!!n&&await Mr();var r}async function Mr(){if(Ur)try{return await void 0,!0}catch{}return!1}function Lr(t){t.createWorker?_r=!0:vr=!1}class Br{constructor(t,{readable:e,writable:r},o,i){const{options:a,config:s,A:c,useWebWorkers:u,workerURI:l}=o;let{createWorker:f}=o;const{signal:d}=c;return _r&&(f=dt),n.assign(t,{I:!0,C:(t.C||0)+1,readable:e.pipeThrough(new Tr(Re(s))).pipeThrough(new Wr(c),{signal:d}),writable:r,options:n.assign({},a),T:o,workerURI:l,createWorker:f,terminate:()=>new g(e=>{const{v:n,I:r}=t;r?(t._=t._||[],t._.push(e)):(n&&(n.terminate(),t.v=null),e()),t.N=null}),U(){if(t.I){const{_:e,v:n}=t;e&&(t._=null,n&&(t.O=!0,n.terminate())),t.I=!1;const r=i(t);e&&e.forEach(t=>t(r))}}}),vr===dt&&(vr=typeof T!=yt),(u&&Nr&&(vr&&l||f)?Nr:Zr)(t,s)}}class Wr extends z{constructor({onstart:t,onprogress:e,size:n,onend:r}){let o=0;super({async start(){t&&await Pr(t,n)},async transform(t,r){o+=t.length,e&&await Pr(e,o,n),r.enqueue(t)},async flush(){r&&await Pr(r,o)}})}}async function Pr(t,...e){try{await t(...e)}catch{}}function Zr(t,e){return{run:()=>Hr(t,e)}}async function Hr({options:t,readable:e,writable:n,U:r,T:o},i){let a,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Ar),n=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,r=e?i.CompressionStream:i.DecompressionStream;t.useCompressionStream?n&&n.requiresModule&&!dr(r)&&await u():await u()||n&&!n.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),a=new Cr(t,i),s=new Tr(Re(i));const{signal:r}=o.A;await e.pipeThrough(a).pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0,signal:r});const{crc32:c,inputSize:l,outputSize:f}=a;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(a){const e=s?s.outputSize:0;if(o.outputSize=e,Te(t))try{t.outputSize=e}catch{}}throw t}finally{r()}function u(){return c||(c=Mr()),c}}const Vr={type:"module"},Gr="error",jr="abort";let qr,Yr,Kr;var Xr;function $r(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Jr(t){const{v:e}=t;if(e)try{e.terminate()}catch{}t.N=null}function Qr(t,e,r,o,i=!0){const{createWorker:a}=r;let s,c,u;if(a)s=a();else if(Yr===dt||qr!==t){const n=typeof t==gt;c=n?t(i):t;const a=c.startsWith("data:"),l=c.startsWith("blob:");if(a||l){o===dt&&(o=!1),o&&(u=Vr);try{s=new T(c,u)}catch(i){if(l)try{f.revokeObjectURL(c)}catch{}if(n&&l)return Qr(t,e,r,o,!1);if(o)throw i;return Qr(t,e,r,!0,!1)}}else{o===dt&&(o=!0),o&&(u=Vr);try{c=new f(c,e)}catch{}try{s=new T(c,u)}catch(n){if(o)return Qr(t,e,r,!1,i);throw n}}qr=t,Yr=c,Kr=u}else s=new T(Yr,Kr);return s.addEventListener("message",t=>{r.M=!0,to(r),async function({data:t},e){const{type:r,value:o,messageId:i,result:a,error:s,errorValue:c}=t,{reader:u,writer:l,L:f,B:p,U:h,C:m}=e,y=()=>e.C!=m;try{if(s)g(function(t,e){const{message:r,stack:o,code:i,name:a,outputSize:s,cause:c,codecImportFailed:u}=t;let l;if(l=e?e.value:n.assign(new d(r),{stack:o,code:i,name:a}),Te(l))try{s!==dt&&(l.outputSize=s),u&&(l.codecImportFailed=!0),c&&(Te(l.cause)||(l.cause=n.assign(new d(c.message),{name:c.name})),c.code!==dt&&l.cause.code!==c.code&&(l.cause.code=c.code)),e&&(l.name!==a&&(l.name=a),l.code!==i&&(l.code=i))}catch{}return l}(s,c));else{if("pull"==r){const{value:t,done:n}=await u.read();y()||no({type:Dr,value:t,done:n,messageId:i},e)}if(r==Dr){const t=new w(o);await l.ready,await l.write(t),y()||no({type:"ack",messageId:i},e)}"close"==r&&function(t){y()||(f(t),E(),h())}(a)}}catch(s){y()||(Jr(e),g(s))}function g(t){y()||(p(t),E(),Te(t)&&t.codecImportFailed||h())}function E(){l&&l.releaseLock()}}(t,r)}),s.addEventListener(Gr,t=>eo(t,r)),s.addEventListener("messageerror",t=>eo(t,r)),s}function to(t){const{W:e}=t;e&&(_(e),t.W=null)}function eo(t,e){t.preventDefault&&t.preventDefault(),to(e);const{M:r,B:o,writer:i,U:a}=e;Jr(e),r||(e.v=null);let s=t.error||new d(t.message||Gr);r||(s=n.assign(new d(s.message||Gr),{P:!0}),e.Z=s),o&&(o(s),i&&i.releaseLock(),r&&a())}function no(t,{v:e,writer:n}){try{const{value:n}=t;if(n){t.value=Ie(n);try{e.postMessage(t,[t.value.buffer])}catch{e.postMessage(t)}}else e.postMessage(t)}catch(t){throw n&&n.releaseLock(),t}}Xr=function(t,e){const{baseURI:r,chunkSize:i,workerStartupTimeout:a}=e;let{wasmURI:s}=e;if(!t.N){let c;typeof s==gt&&(s=s());try{c=Qr(t.workerURI,r,t)}catch{return Lr(t),Zr(t,e)}n.assign(t,{v:c,M:!1,O:!1,Z:null,N:{run:async()=>{try{return await async function(t,e){if(!t.v){const{Z:e}=t;t.Z=null;const n=e||new d(kr);throw n.P=!0,n}let r,i;const a=new g((e,n)=>{r=e,i=e=>{const{outputSize:r,T:o}=t;if(o.outputSize=r,Te(e))try{e.outputSize=r}catch{}n(e)}});n.assign(t,{reader:null,writer:null,outputSize:0,H:!1,V:null,L:r,B:i,result:a});const{readable:s,options:c}=t,{writable:u,closed:l,G:f}=function(t,e){const r=new AbortController;let o;const{writable:i,readable:a}=new z({transform(t,n){e.outputSize+=t.length,n.enqueue(t)}}),s=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});s.catch(t=>{o||n.assign(e,{H:!0,V:t})});const{signal:c}=e.T.A;if(c){const t=()=>r.abort(c.reason),e=()=>c.removeEventListener(jr,t);c.addEventListener(jr,t),s.then(e,e)}return{writable:i,closed:s,G:()=>{o=!0,r.abort()}}}(t.writable,t);try{no({type:"start",options:c,config:e},t)}catch(e){f();try{await l}catch{}throw t.U(),e}n.assign(t,{reader:s.getReader(),writer:u.getWriter()});const{workerStartupTimeout:w}=e;!t.M&&o.isFinite(w)&&w>=0&&(t.W=v(()=>function(t){if(t.W=null,t.M)return;const{B:e,writer:n}=t;if(Jr(t),t.v=null,e){const t=new d(kr);t.P=!0,e(t),n&&n.releaseLock()}}(t),w));try{const t=await a;return await p(),await l,t}catch(e){await p(),f();try{await l}catch{}const{outputSize:n,T:r,H:o,V:i}=t;r.outputSize=n;const a=Te(e)&&(e.codecImportFailed||e.P),s=o&&!a?i:e;if(Te(s))try{s.outputSize=n}catch{}throw s}async function p(){if(!u.locked)try{await u.getWriter().close()}catch{}}}(t,{chunkSize:i,wasmURI:s,baseURI:r,workerStartupTimeout:a})}catch(n){if(n&&n.P)return Lr(t),$r(t),Hr(t,e);if(n&&n.codecImportFailed){if(t.reader)return $r(t),Hr(t,e);t.U()}throw n}}}})}return t.N},Nr=Xr;let ro=[];const oo=[];let io,ao,so=0;async function co(t,e){const{options:n,config:r}=e,{useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:d,codecURI:w}=n,{workerURI:p,createWorker:h,maxWorkers:m}=r;d&&(w&&(n.codecURI=function(t,e){try{return new f(t,e).toString()}catch{return t}}(w,r.baseURI)),await async function(t,e){!Yn.has(t)&&e&&Jn(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(d,n.codecURI));const y=!(s||c||u||l),E=d===dt||Boolean(n.codecURI);return e.useWebWorkers=!y&&E&&(i||i===dt&&r.useWebWorkers),e.workerURI=e.useWebWorkers&&p?p:dt,e.createWorker=e.useWebWorkers&&h?h:dt,n.useCompressionStream=a||a===dt&&r.useCompressionStream,(await async function(){const n=ro.find(t=>!t.I);if(n)return mo(n),new Br(n,t,e,S);if(ro.length<m){const n={j:so};return so++,ro.push(n),new Br(n,t,e,S)}return new g(n=>{oo.push({resolve:n,stream:t,T:e}),ao=r.workerStarvationTimeout,uo()})}()).run();function S(t){if(lo(),t.O)return t.O=!1,wo();if(oo.length){const[{resolve:e,stream:n,T:r}]=oo.splice(0,1);e(new Br(t,n,r,S)),uo()}else t.v?(mo(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;o.isFinite(r)&&r>=0&&(t.Y=v(async()=>{ro=ro.filter(e=>e!=t);try{await t.terminate()}catch{}},r))}(t,e)):ro=ro.filter(e=>e!=t)}}function uo(){!io&&oo.length&&o.isFinite(ao)&&ao>=0&&(io=v(fo,ao))}function lo(){io&&(_(io),io=null)}function fo(){if(io=null,oo.length){const[{resolve:t,stream:e,T:n}]=oo.splice(0,1);t(new Br({},e,po(n),ho)),uo()}}function wo(){const t=oo.splice(0).map(({resolve:t,stream:e,T:n})=>new g(r=>{t(new Br({},e,po(n),()=>{ho(),r()}))}));return lo(),g.all(t)}function po(t){return n.assign({},t,{useWebWorkers:!1,workerURI:dt,createWorker:dt})}function ho(){lo(),uo()}function mo(t){const{Y:e}=t;e&&(_(e),t.Y=null)}const yo="\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 go(t,e){return So(t,e,!0)}function Eo(t){if(!t.some(t=>t>127))return!1;try{return new S("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function So(t,e,n){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let n=0;n<t.length;n++)e+=yo[t[n]];return e}(t):new S(e,{ignoreBOM:n}).decode(t)}const bo="HTTP error ",Ro="HTTP Range not supported",xo="HTTP resource changed",zo="Writer iterator completed too soon",Fo="Writer not initialized",Do="Invalid writer (size must be writable)",Ao="Content-Range",Io="Range",Co="GET",To="bytes",ko=16777216,vo="writable",_o=k();class No{constructor(){this.size=0}init(){this.initialized=!0}}class Uo extends No{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:n=Re(be())}={}){const r=this;let o=0;return n=xe(n),new F({async pull(i){const s=e===dt?n:a.min(n,e-o),c=await Si(r,t+o,s);c.length&&(i.enqueue(c),o+=c.length),(e!==dt&&o>=e||!c.length&&s)&&i.close()}})}}class Oo extends No{constructor(){super();const t=this,e=new D({write(e){if(!t.initialized)throw new d(Fo);return t.writeUint8Array(Ie(e))}});n.defineProperty(t,vo,{get:()=>e})}writeUint8Array(){}}class Mo extends Uo{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;n.assign(this,{K:t,X:r,size:a.floor(.75*(e-r))})}readUint8Array(t,e){const{X:n,K:r}=this,o=new w(e),i=4*a.floor(t/3),s=atob(r.substring(i+n,4*a.ceil((t+e)/3)+n)),c=t-3*a.floor(i/4);let u=0;for(let t=c;t<c+e&&t<s.length;t++)o[t-c]=s.charCodeAt(t),u++;return u<o.length?o.subarray(0,u):o}}class Lo extends Oo{constructor(t){super(),n.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let n,o=e.$;const i=e.$.length;for(e.$="",n=0;n<3*a.floor((i+t.length)/3)-i;n++)o+=r.fromCharCode(t[n]);for(;n<t.length;n++)e.$+=r.fromCharCode(t[n]);o.length>2?e.data+=x(o):e.$=o+e.$}getData(){return this.data+x(this.$)}}let Bo,Wo;class Po extends Uo{constructor(t){super(),n.assign(this,{J:t,size:t.size}),Wo||(Wo=(async()=>{try{const t=new y([new w(3)]).slice(1,2).stream().getReader();let e=0,n=await t.read();for(;!n.done;)e+=n.value.length,n=await t.read();Bo=1==e}catch{Bo=!1}})())}createReadable(t){const{J:e,size:n}=this,{offset:r=0,size:o=n-r}=t||{};if(typeof e.stream==gt){if(!r&&o>=n)return Bn(e.stream());if(Bo)return Bn(e.slice(r,r+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const n=this,r=t+e,o=!t&&r>=n.size?n.J:n.J.slice(t,r);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,r)),new w(i)}}class Zo extends No{constructor(t){super();const e=this,r=new z;n.defineProperty(e,vo,{get:()=>r.writable}),e.contentType=t,e.et=Wn(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class Ho extends Po{constructor(t){super(new y([t],{type:"text/plain"}))}}function Vo(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:r<56320&&56320==(64512&t.charCodeAt(n+1))?(e+=4,n++):e+=3}return e}class Go extends Zo{constructor(t){super(),n.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,n=await super.getData();return n.text&&e?n.text():function(t,e){return So(t,e,!1)}(new w(await n.arrayBuffer()),t)}}class jo extends Uo{constructor(t,e){super(),Yo(this,t,e)}async init(){await Ko(this,ci,oi),super.init()}createReadable(t){const e=this,{useRangeHeader:n,forceRangeRequests:r,size:o,ot:i}=e;if((n||r)&&o!==dt){const{offset:n=0,size:r=o-n}=t||{},s=i&&n>=o-i.length;if(r>0&&n<o&&!s)return function(t,e,n){let r,o=e,i=0,s=n;return new F({start:()=>c(),async pull(t){r||await c();const{value:e,done:n}=await r.read();if(n)throw new d(Ro);const o=e.length>i?e.subarray(0,i):e;i-=o.length,s-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=r;r=dt,await t.cancel()}(),s||t.close())},cancel:t=>r&&r.cancel(t)});async function c(){const e=a.min(t.maximumRangeSize,s),n=await ci(Co,t,ni(t,o,e));if(206!=n.status)throw new d(Ro);const c=$o(n);if(c!==dt&&c!=o)throw new d(Ro);ei(t,n),ti(t,n),o+=e,i=e,r=n.body.getReader()}}(e,n,a.min(r,o-n))}return super.createReadable(t)}readUint8Array(t,e){return Xo(this,t,e,ci,oi)}}class qo extends Uo{constructor(t,e){super(),Yo(this,t,e)}async init(){await Ko(this,ui,ii),super.init()}readUint8Array(t,e){return Xo(this,t,e,ui,ii)}}function Yo(t,e,r){const{preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c=!0,maximumRangeSize:u=ko,fetch:l}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,n.assign(t,{url:e,options:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c,maximumRangeSize:u,fetch:l})}async function Ko(t,e,n){const{url:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=be(),{protocol:n}=new f(t,e);return"http:"==n||"https:"==n}(r)&&(i||a)&&(typeof o==yt||o)){const r=await e(Co,t,ni(t,s?-65557:void 0)),o=r.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==To))throw new d(Ro);{let o;s&&206==r.status&&(o=new w(await r.arrayBuffer())),ti(t,r);const i=Jo(r);i===dt?await si(t,e,n):t.size=i,o&&o.length&&$o(r)===t.size-o.length&&(t.ot=o)}}else await si(t,e,n)}async function Xo(t,e,n,r,o){const{useRangeHeader:i,forceRangeRequests:a,ot:s,size:c,options:u}=t;if(i||a){if(e>=c||0===n)return Rt;{if(e+n>c&&(n=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+n)}const o=await r(Co,t,ni(t,e,n));if(206!=o.status)throw new d(Ro);const i=$o(o);if(i!==dt&&i!=e)throw new d(Ro);ei(t,o),ti(t,o);const a=new w(await o.arrayBuffer());if(a.length!=n)throw new d(Ro);return a}}{const{data:r}=t;return r||await o(t,u),t.data.subarray(e,e+n)}}function $o(t){const e=t.headers.get(Ao);if(e){const t=o(e.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t))return t}}function Jo(t){const e=t.headers.get(Ao);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=o(t);if(!o.isNaN(e))return e}}}function Qo({headers:t}){return{it:t.get("Etag")||dt,lastModified:t.get("Last-Modified")||dt}}function ti(t,e){const{checkResourceChanges:n,st:r}=t;n&&!r&&206==e.status&&(t.st=Qo(e))}function ei(t,e){const{checkResourceChanges:r,st:o,size:i}=t;if(r){const t=Jo(e);if(t!==dt&&i!==dt&&t!=i)throw new d(xo);if(o){const t=Qo(e);if(n.entries(o).some(([e,n])=>n!==dt&&t[e]!==dt&&n!=t[e]))throw new d(xo)}}}function ni(t,e=0,r=1){return n.assign({},ri(t),{[Io]:To+"="+(e<0?e:e+"-"+(e+r-1))})}function ri({options:t}){const{headers:e}=t;if(e)return k.iterator in e?n.fromEntries(e):e}async function oi(t){await ai(t,ci)}async function ii(t){await ai(t,ui)}async function ai(t,e){const n=await e(Co,t,ri(t));t.data=new w(await n.arrayBuffer()),t.size=t.data.length}async function si(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=await e("HEAD",t,ri(t)),i=r.headers.get("Content-Length");i&&!r.headers.get("Content-Encoding")?t.size=o(i):await n(t,t.options)}}async function ci(t,{fetch:e=fetch,options:r,url:o},i){const a=await e(o,n.assign({},r,{method:t,headers:i}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new d(Ro):new d(bo+(a.statusText||a.status))}function ui(t,{url:e},r){return new g((o,i)=>{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 n=e.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(n)}),o({status:a.status,arrayBuffer:()=>a.response,headers:new c(t)})}else i(416==a.status?new d(Ro):new d(bo+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>i(t.detail?t.detail.error:new d("Network error")),!1),a.open(t,e),r)for(const t of n.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class li extends Uo{constructor(t,e={}){super(),n.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new qo(t,e):new jo(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 fi extends Uo{constructor(t){super(),t=new w(t.buffer,t.byteOffset,t.byteLength),n.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class di extends Oo{constructor(t){super(),this.ut=t||262144}init(t=0){n.assign(this,{offset:0,ct:new w(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,n=e.offset+t.length;if(n>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<n;)t*=2;const r=e.ct;e.ct=new w(t),e.ct.set(r)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class wi extends Uo{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await g.all(t.lt.map(Ei));t.wt=e.map(e=>{const n=t.size;return t.size+=e.size,n}),super.init()}ht(t){const{wt:e,size:n}=this,r=e[t];return r===dt?n:r}async readUint8Array(t,e){const n=this,{lt:r}=this;let o,i=0,s=t;for(;r[i]&&s>=r[i].size;)s-=r[i].size,i++;const c=r[i];if(c){const r=c.size;if(s+e<=r)o=await Si(c,s,e);else{const i=r-s;o=Ae(await Si(c,s,i),await n.readUint8Array(t+i,e-i))}}else o=Rt;return n.ft=a.max(i,n.ft),o}}class pi extends No{constructor(t,e=4294967295){super();const r=this;let o,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const s=new D({async write(e){if(e===_o)return void(a&&await u());const{availableSize:n}=r;if(a)e.length>=n?(await c(e.subarray(0,n)),await u(),e.length>n&&await this.write(e.subarray(n))):await c(e);else{const{value:n,done:s}=await t.next();if(s&&!n)throw new d(zo);o=n,o.size=0,o.maxSize&&(r.maxSize=o.maxSize),r.availableSize=r.maxSize,await gi(o),i=n.writable,a=i.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await l())},async abort(t){a&&await a.abort(t)}});async function c(t){const e=t.length;e&&(await a.ready,await a.write(t),o.size+=e,r.availableSize-=e)}async function u(){await l(),r.diskOffset+=o.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function l(){await a.close()}n.defineProperty(r,vo,{get:()=>s})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(_o)}finally{t.releaseLock()}}}class hi{constructor(t){return e.isArray(t)&&(t=new wi(t)),(t instanceof F||typeof t.getReader==gt)&&(t={readable:Bn(t)}),t}}class mi{constructor(t){t.writable===dt&&typeof t.next==gt&&(t=new pi(t)),(t instanceof D||typeof t.getWriter==gt)&&(t={writable:Pn(t)});try{t.size=t.size===dt?0:t.size}catch{throw new d(Do)}return t}}function yi(t){return Boolean(t&&t.getData)}async function gi(t,e){if(!t.init||t.initialized)return g.resolve();await t.init(e)}async function Ei(t){return t=new hi(t),await gi(t),t.size!==dt&&t.readUint8Array||(t=new Po(await Wn(t.readable)),await gi(t)),t}function Si(t,e,n){return t.readUint8Array(e,n)}function bi(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Uo.prototype.createReadable.call(t,e):t.readable}function Ri(t,e,n){if(!t.some(t=>t.reason==e)){const r={reason:e};n!==dt&&(r.filename=n),t.push(r)}}const xi="filename",zi="rawFilename",Fi="comment",Di="rawComment",Ai="uncompressedSize",Ii="compressedSize",Ci="offset",Ti="diskNumberStart",ki="lastModDate",vi="rawLastModDate",_i="lastAccessDate",Ni="rawLastAccessDate",Ui="creationDate",Oi="rawCreationDate",Mi="internalFileAttributes",Li="externalFileAttributes",Bi="msdosAttributesRaw",Wi="msdosAttributes",Pi="msDosCompatible",Zi="zip64",Hi="encrypted",Vi="version",Gi="versionMadeBy",ji="zipCrypto",qi="directory",Yi="executable",Ki="compressionMethod",Xi="signature",$i="extraField",Ji="unixMode",Qi="setuid",ta="setgid",ea="sticky",na=[xi,zi,Ai,Ii,ki,vi,Fi,Di,_i,Ni,Ui,Oi,Ci,Ti,Mi,Li,Bi,Wi,Pi,Zi,Hi,Vi,Gi,ji,qi,Yi,"symlink",Ki,Xi,"crc32",$i,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Ji,"unixExternalUpper",Qi,ta,ea,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class ra{constructor(t){na.forEach(e=>this[e]=t[e])}}const oa=new u([1,$,10,J,28789,25461,Q,tt,et,22613,13]);function ia(t,e,n){return t?e?12:16+4*n:0}const aa="File format is not recognized",sa="End of central directory not found",ca="End of Zip64 central directory locator not found",ua="Central directory header not found",la="File contains encrypted entry",fa="Encryption method not supported",da="Split zip file",wa="Entry data out of bounds",pa="Ambiguous archive",ha="Encrypted central directory is not supported",ma="Unsafe filename",ya="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",ga="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",Ea="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Sa="64-bit value exceeds Number.MAX_SAFE_INTEGER",ba="unsorted central directory",Ra="unknown version needed to extract",xa="compressed patched data",za="malformed extra field",Fa="unknown zip64 extensible data",Da="wrapped entries count",Aa="appended data",Ia="prepended data",Ca="prepended central directory",Ta="trailing central directory data",ka="mismatched central directory offset",va="missing zip64 extra field",_a="duplicate filename",Na="mismatched zip64 end of central directory record",Ua="multiple end of central directory records",Oa="mismatched local file header (filename)",Ma="mismatched local file header (general purpose bit flag)",La="mismatched local file header (compression method)",Ba="mismatched local file header (crc32 or sizes)",Wa=/^[a-zA-Z]:/,Pa=/(^|[\\/])\.\.([\\/]|$)/,Za="utf-8",Ha="cp437",Va=[[Ai,O],[Ii,O],[Ci,O],[Ti,M]],Ga={[M]:{yt:vs,bytes:4},[O]:{yt:_s,bytes:8}},ja=i(o.MAX_SAFE_INTEGER);class qa{constructor(t,e={}){n.assign(this,{reader:new hi(t),options:e||{},gt:{Et:new u,St:[],bt:[]},Rt:new WeakSet})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;if(await gi(r),r.size!==dt&&r.readUint8Array||(r=new Po(await Wn(r.readable)),await gi(r)),r.size<Y)throw new d(aa);const i=e.warnings=[],s=hs(t,e.options),c=s==Ht,l=s!=Gt,f=gs(Ds(e,t,Lt),s),p=function(t,e){if(t===dt)return e;if(!ps(t))throw new d(ga);return t}(Ds(e,t,"filenameValidation"),s),h=Ds(e,t,"normalizeFilename"),{xt:m,zt:y}=await Es(r,l,f);if(!m)throw await async function(t){return await ws(t)==W}(r)?new d(da):new d(sa);l&&y>1&&Fs(Ua);const g=Ce(m);let E=vs(g,12),S=vs(g,16);const b=m.offset,R=ks(g,20),x=b+Y+R,F=r.size-x;F>f&&Fs(Aa),F>0&&Ri(i,Aa);let D=ks(g,4);const A=r.ft||0;let I,C,T,k,v,_=ks(g,6),N=ks(g,10),U=0,P=X;const V=S==O||E==O||N==M||_==M;if(S!=O&&_!=M&&(S+=ds(r,_)),V){const t=m.offset>=K?await Si(r,m.offset-K,K):Rt,e=Ce(t);if(t.length==K&&vs(e,0)==j){S=ds(r,vs(e,4))+_s(e,8);let t=await Si(r,S,X),s=Ce(t);if(t.length<X||vs(s,0)!=G){const e=m.offset-K;let n=e-X;if(await ts(r,n,G)||(n=await async function(t,e){const n=a.max(0,e-65591),r=await Si(t,n,e-n),i=Ce(r);for(let t=r.length-X;t>=0;t--)if(vs(i,t)==G&&t+12+o(i.getBigUint64(t+4,!0))==r.length)return n+t}(r,e)),n!==dt&&n>=0&&S!=n){const e=S;S=n,S>e&&(U=S-e),t=await Si(r,S,X),s=Ce(t)}}if(t.length<X||vs(s,0)!=G)throw new d(ca);if(T=!0,k=_s(s,4)>44,k){const t=a.min(_s(s,4)-44,r.size-S-X);t>0&&(P+=t,v=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Ce(t),o=ks(r,26);n.assign(e,{compressionMethod:ks(r,0),compressedSize:_s(r,2),uncompressedSize:_s(r,10),encryptionAlgorithm:ks(r,18),bitLength:ks(r,20),flags:ks(r,22),hashAlgorithm:ks(r,24),hashData:t.subarray(28,28+o)})}return e}(await Si(r,S+X,t)))}D==M?D=vs(s,16):D!=vs(s,16)&&zs(c,i,Na),_==M?_=vs(s,20):_!=vs(s,20)&&zs(c,i,Na),N==M?N=_s(s,32):N!=_s(s,32)&&zs(c,i,Na),E==O?E=_s(s,40):E!=_s(s,40)&&zs(c,i,Na),S=ds(r,_)+_s(s,48)+U}else if(S==O||E==O||_==M)throw new d(ca)}let $=E;const J=m.offset-(T?P+K:0);if(A!=D)throw new d(da);if(S<0)throw new d(aa);let Q=0,tt=S<r.size?await Si(r,S,E):Rt,et=Ce(tt);if(E){let t=J-E;if(S!=t&&_==D){const e=tt.length>=4&&(vs(et,Q)==H||Boolean(v&&v.compressedSize)||$a(et));if(!e&&t<0)throw new d(aa);let n=!e;if(t>=0&&t+4<=r.size){let o=await Qa(r,t);if(!o){const e=await async function(t,e){const n=a.max(0,e-65541),r=await Si(t,n,e-n),o=Ce(r);for(let t=r.length-6;t>=0;t--)if(vs(o,t)==Z&&t+6+ks(o,t+4)==r.length)return n+t}(r,J),n=e-E;e!==dt&&n>=0&&await Qa(r,n)&&(t=n,o=!0)}e&&(n=o)}if(n&&t!=S){const n=S;S=t,tt=await Si(r,S,E),et=Ce(tt);const o=S-n,s=function(t,e){if(t.length<q)return dt;const n=vs(e,42);if(n!=O)return n;let r=q+ks(e,28);const o=a.min(r+ks(e,30),t.length);for(;r+4<=o;){const t=ks(e,r),n=ks(e,r+2);if(1==t){let t=r+4;return vs(e,24)==O&&(t+=8),vs(e,20)==O&&(t+=8),t+8<=o?_s(e,t):dt}r+=4+n}return dt}(tt,et),u=s!==dt&&await ts(r,s,B),l=s!==dt&&await ts(r,s+o,B);o>0&&(!u||l)?(U+=o,I=e):(zs(c,i,ka),o<0&&!u&&l&&(U+=o))}}if(tt.length<4)throw new d(aa)}else!N&&S<J&&_==D&&(U+=J-S,S=J);const nt=J-S;if(E!=nt&&nt>=0&&_==D&&(E=nt,tt=await Si(r,S,E),et=Ce(tt)),S<0||S>=r.size)throw new d(aa);e.directoryOffset=S,e.directoryLength=$;const rt=As(e,t,"decryptCentralDirectory");let ut,lt;if(rt&&N&&tt.length>=4&&vs(et,0)!=H&&(k||$a(et))){const t=function(t,e,n){const r=t&&t.compressedSize?t.compressedSize:e;return r>0&&r<=n?r:n}(v,$,tt.length);lt=tt.subarray(t),tt=await rt(tt.subarray(0,t),v),et=Ce(tt),$=tt.length,ut=!0}v&&!ut&&(tt.length<4||vs(et,0)==H)&&Ri(i,Fa),C=S;const ft=Ds(e,t,"filenameEncoding"),wt=Ds(e,t,"commentEncoding"),pt=new u;let ht,yt=-1;const gt=!c&&!T;!N&>&&(N=Ja(et,tt,Q),N&&Ri(i,Da));const Et=n.assign({},e.options,t,{[Mt]:s});delete Et[It];for(let o=0;o<N;o++){const s=new Xa(r,Et);if(Q+q>tt.length||vs(et,Q)!=H){if(0==o&&!ut&&(k||$a(et)))throw new d(ha);throw new d(ua)}ns(s,et,Q+6);const u=Boolean(s.bitFlag.languageEncodingFlag),l=Q+q,f=l+s.filenameLength+s.extraFieldLength,m=ks(et,Q+4),y=!(m>>8),g=m>>8==3,E=ks(et,Q+32),S=f+E,b=new w(tt.subarray(l,S)),R=b.subarray(0,s.filenameLength),x=b.subarray(s.filenameLength+s.extraFieldLength),F=u||!ft&&Eo(R),D=u||!wt&&Eo(x),A=vs(et,Q+38),I=A&L,T={readOnly:Boolean(1&I),hidden:Boolean(2&I),system:Boolean(4&I),directory:Boolean(16&I),archive:Boolean(32&I)},v=vs(et,Q+42),_=As(e,t,"decodeText")||go,B=F?Za:ft||Ha,W=D?Za:wt||Ha;let P=_(R,B,Pt);P===dt&&(P=go(R,B));let Z,V=_(x,W,Zt);V===dt&&(V=go(x,W)),n.assign(s,{index:o,Ft:ut,versionMadeBy:m,msDosCompatible:y,zip64:!1,compressedSize:0,uncompressedSize:0,Dt:E,offset:v,diskNumberStart:ks(et,Q+34),internalFileAttributes:ks(et,Q+36),externalFileAttributes:A,msdosAttributesRaw:I,msdosAttributes:T,rawFilename:R,filenameUTF8:F,commentUTF8:D,rawExtraField:b.subarray(s.filenameLength,s.filenameLength+s.extraFieldLength),rawComment:x,filename:P,comment:V});try{Z=rs(s,s,et,Q+6)}catch(t){if(c||t.message!=mt)throw t;s.At=!0,Ri(i,va,s.filename)}if(P=s.filename,h){const t=h(P);t!==dt&&(P=s.filename=t)}if(ys(P,p)){const t=new d(ma);throw t.filename=P,t}if(Z&&Ri(i,za,P),s.At&&s.offset==O)C=0;else{s.offset+=U;const t=ds(r,s.diskNumberStart)+s.offset;C=a.min(t,C),t<yt&&Ri(i,ba,P),yt=t}(s.version&L)>63&&Ri(i,Ra,P),32&~s.rawBitFlag||Ri(i,xa,P),pt.has(s.filename)&&(ht=!0),pt.add(s.filename);const G=s.externalFileAttributes>>16&M;s.unixMode===dt&&16877&G&&(s.unixMode=G);const j=Boolean(s.unixMode&at),Y=Boolean(s.unixMode&st),K=Boolean(512&s.unixMode),X=40960==((s.unixMode===dt?G:s.unixMode)&ot),$=s.unixMode!==dt&&(s.unixMode&ot)==it||(G&ot)==it||y&&T.directory||s.filename.endsWith(ct),J=!X&&!$&&(s.unixMode!==dt?!!(73&s.unixMode):g&&!!(73&G));n.assign(s,{setuid:j,setgid:Y,sticky:K,symlink:X,unixExternalUpper:G,executable:J,directory:$,zipCrypto:s.encrypted&&!s.extraFieldAES});const nt=new ra(s);if(s.At&&e.Rt.add(nt),nt.getData=(t,n)=>s.getData(t,nt,e,n),nt.arrayBuffer=async t=>{const r=new z,o=Wn(r.readable).then(t=>t.arrayBuffer());return o.catch(()=>{}),await s.getData(r,nt,e,n.assign({},t,{preventClose:!1})),o},Q=S,o==N-1&>){const t=Ja(et,tt,Q);t&&(N+=t,Ri(i,Da))}const{onprogress:rt}=t;if(rt)try{await rt(o+1,N,new ra(s))}catch{}yield nt}let St=Q,bt=es(tt.subarray(Q))||(ut?es(lt):dt);if(!bt&&!ut){const t=S+Q,e=a.min(J-t,65541);e>=6&&(bt=es(await Si(r,t,e)))}bt&&(e.digitalSignature=bt,St=Q+6+bt.length),(Q!=$&&St!=$||!ut&&Q!=E&&St!=E)&&zs(c,i,Ta),ht&&zs(c,i,_a);const xt=Ds(e,t,"extractPrependedData"),zt=Ds(e,t,"extractAppendedData"),Ft=(c||xt)&&N&&4==C&&await async function(t){const e=await ws(t);return e==W||808471376==e}(r)?4:0;return c&&(U>0||N&&C>Ft)&&Fs(Ia),(U>0||N&&C>4)&&Ri(i,Ia),I&&Ri(i,Ca),xt&&(e.prependedData=C>Ft?await Si(r,Ft,C-Ft):Rt),e.comment=R?await Si(r,b+Y,R):Rt,zt&&(e.appendedData=x<r.size?await Si(r,x,r.size-x):Rt),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[xt](){return this.close()}}class Ya{constructor(t={}){let r;const{readable:o,writable:i}=new z({start(t){r=t}}),a=new qa(o,t),s=a.getEntriesGenerator(),c=new u;this.readable=new F({async pull(t){const{done:e,value:r}=await s.next();if(e)return t.close();const o=function(t,e){const{readable:n,writable:r}=new z;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):n.cancel(t))}};return i.readable=new F({async pull(a){o||(o=n.getReader(),e.add(i),async function(){try{await t.getData(r,{preventClose:!1})}catch(t){try{await r.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,c),i={...r,readable:o.readable};delete i.getData,n.defineProperties(i,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(i)},async cancel(t){const n=e.from(c);c.clear(),r.error(t),await g.allSettled(n.map(e=>e.cancel(t))),await g.allSettled([s.return(),a.close()])}}),this.writable=i}}async function Ka(t,e={}){if(t=new hi(t),await gi(t),t.size!==dt&&t.readUint8Array||(t=new Po(await Wn(t.readable)),await gi(t)),t.size<Y)return!1;const n=hs(e,{}),r=n!=Gt,o=gs(e[Lt],n),{xt:i,zt:a}=await Es(t,r,o);if(!i||n==Ht&&a>1)return!1;const s=ks(Ce(i),20),c=i.offset+Y+s;return t.size-c<=o}let Xa=class{constructor(t,e){n.assign(this,{reader:t,options:e})}async getData(t,e,r,o={}){const i=this,{gt:s,directoryOffset:c}=r;if(i.At)throw new d(mt);const u=be(),{reader:l,index:f,offset:w,diskNumberStart:p,extraFieldAES:h,extraFieldZip64:m,compressionMethod:y,bitFlag:g,rawBitFlag:E,crc32:S,rawLastModDate:b,uncompressedSize:R,compressedSize:x}=i,{dataDescriptor:z}=g,F=e.localDirectory={},A=e.warnings=[],I=ds(l,p)+w,C=await Si(l,I,ut),T=Ce(C);let k=Ds(i,o,zt),v=Ds(i,o,Ft);const _=oe(Ds(i,o,Dt)),N=Boolean(_),U=!0===_;if(re(k,v),k=k&&k.length?k:dt,v=v&&v.length?v:dt,h&&99!=h.originalCompressionMethod)throw new d(Gn);if(C.length<ut||vs(T,0)!=B)throw new d(pt);ns(F,T,4);const{extraFieldLength:O,filenameLength:M}=F,W=F.dataOffset=I+ut+M+O,P=Ds(i,o,"checkLocalDirectory"),Z=hs(o,i.options),H=function(t,e){return t===dt?e!=Gt:Boolean(t)}(P,Z),V=Ds(i,o,"checkLocalFilename"),G=function(t,e){return t===dt?e==Ht:Boolean(t)}(V===dt?P:V,Z);let j=Rt;if(G&&(M||O)){const t=await Si(l,I+ut,M+O);j=t.subarray(0,M),F.rawExtraField=t.subarray(M)}else F.rawExtraField=O?await Si(l,I+ut+M,O):Rt;G&&(F.rawFilename=j),rs(i,F,T,4,!0)&&Ri(A,za),function(t,e,n,r,o){const{rawFilename:i}=t,a=!o,s=t.Ft&&(e.rawBitFlag&rt)==rt;!r||s||n.length==i.length&&!n.some((t,e)=>t!=i[e])||zs(a,o,Oa),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&zs(a,o,Ma),e.compressionMethod!=t.compressionMethod&&zs(a,o,La),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||zs(a,o,Ba)}(i,F,j,G,H?dt:A);const{lastAccessDate:q,creationDate:Y,uid:K,gid:X}=F;q&&e.lastAccessDate===dt&&(e.lastAccessDate=q),Y&&e.creationDate===dt&&(e.creationDate=Y),K!==dt&&e.uid===dt&&(e.uid=K),X!==dt&&e.gid===dt&&(e.gid=X);const $=Ds(i,o,"checkPasswordOnly"),J=i.encrypted&&(!U||$),Q=J&&!h;if(U||(e.zipCrypto=Q),J&&!(64&~i.rawBitFlag))throw new d(fa);const tt=N?dt:Kn(y);if(0!=y&&8!=y&&9!=y&&!tt&&!N)throw new d(Gn);if(J){if(!Q&&(h.strength<1||h.strength>3))throw new d(fa);if(!k&&!v)throw new d(la)}if(W+x>a.min(l.size,c))throw new d(wa);const et=x,nt=ee(Ds(i,o,At));ne(nt);let ot=Ds(i,o,"checkOverlappingEntry");const it=Ds(i,o,"checkOverlappingEntryOnly");it&&(ot=!0);const{onstart:at,onprogress:st,onend:ct}=o,lt=0!=y&&!N,ft=N?x-ia(J,Q,h&&h.strength):R,wt=9==y;let yt=Ds(i,o,Tt);wt&&(yt=!1);const gt=Ds(i,o,"checkCrc32"),Et=(gt===dt?Ds(i,o,"checkSignature"):gt)&&!N&&(!J||Q||h&&1==h.vendorVersion),St={options:{codecType:Ir,password:k,rawPassword:v,zipCrypto:Q,encryptionStrength:h&&h.strength,checkCrc32:Et,checkAuthenticationCode:Ds(i,o,"checkAuthenticationCode"),passwordVerification:Q&&(z?b>>>8&L:S>>>24&L),outputSize:ft,crc32:S,compressed:lt,encrypted:J,useWebWorkers:Ds(i,o,Ct),useCompressionStream:yt,deflate64:wt,format:tt?tt.format:dt,codecURI:tt?tt.codecURI:dt,compressionMethod:y,rawBitFlag:E,checkPasswordOnly:$},config:u,A:{signal:nt,size:et,onstart:at,onprogress:st,onend:ct}};let bt,xt,It;ot&&(await async function({reader:t,It:e,index:n,offset:r,crc32:o,compressedSize:i,uncompressedSize:a,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,gt:l}){let f=0;if(c){const n=Boolean(u),r=await us(t,s+i,{crc32:o,compressedSize:i,uncompressedSize:a,zip64:n});r?(e.localDirectory.dataDescriptor=r,f=fs(r.zip64,r.signature)):f=fs(n,!1)}const w={start:r,end:s+i+f,It:e},{Et:p,St:h,bt:m}=l;if(!p.has(n)){const t=function(t,e){let n=0,r=t.length;for(;n<r;){const o=n+r>>>1;t[o].start<e.start?n=o+1:r=o}const o=t[n-1],i=t[n];return o&&cs(e,o)?o:i&&cs(e,i)?i:void 0}(h,w)||m.find(t=>cs(w,t));if(t){const e=new d(ht);throw e.overlappingEntry=t.It,e}p.add(n),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),l.St=function(t,e){const n=[];let r=0,o=0;for(;r<t.length||o<e.length;)o==e.length||r<t.length&&t[r].start<e[o].start?n.push(t[r++]):n.push(e[o++]);return n}(h,m),m.length=0)}}({reader:l,It:e,index:f,offset:I,crc32:S,compressedSize:x,uncompressedSize:R,dataOffset:W,dataDescriptor:z||F.bitFlag.dataDescriptor,extraFieldZip64:m||F.extraFieldZip64,gt:s}),function(t,e,n){const{dataDescriptor:r}=e,o=t.Ft&&(e.rawBitFlag&rt)==rt;r&&!o&&(t.crc32!==dt&&r.crc32!=t.crc32||r.compressedSize!=t.compressedSize||r.uncompressedSize!=t.uncompressedSize)&&zs(!n,n,Ba)}(i,F,H?dt:A));try{if(!it){$&&(t=new D),t=new mi(t),await gi(t,function(t,e,n){return a.min(t,n?1032*e:e)}(ft,x,lt)),({writable:bt}=t);const e=Bn(l.createReadable({offset:W,size:et})),{outputSize:r}=await co({readable:e,writable:bt},St);if(ne(nt),r!=ft)throw n.assign(new d(Qn),{outputSize:r});t.size+=r}}catch(e){if(Te(e)&&e.outputSize!==dt&&(t.size+=e.outputSize),!$||!Te(e)||e.message!=cn)throw xt=e,It=!0,e}finally{if((yi(t)||!Ds(i,o,kt))&&bt&&!bt.locked){const t=bt.getWriter();if(It)try{await t.abort(xt)}catch{}else await t.close()}}return $||it?dt:t.getData?t.getData():bt}};function $a(t){return t.byteLength>=4&&134630224==vs(t,0)}function Ja(t,e,n){let r=0;for(;n+q<=e.length&&vs(t,n)==H;)n+=q+ks(t,n+28)+ks(t,n+30)+ks(t,n+32),r++;return r%65536?0:r}function Qa(t,e){return ts(t,e,H)}async function ts(t,e,n){return!(e<0||e+4>t.size)&&vs(Ce(await Si(t,e,4)),0)==n}function es(t){if(t.length>=6){const e=Ce(t);if(vs(e,0)==Z){const n=ks(e,4);if(6+n<=t.length)return new w(t.subarray(6,6+n))}}}function ns(t,e,r){const o=t.rawBitFlag=ks(e,r+2),i=!(1&~o),a=vs(e,r+6);n.assign(t,{encrypted:i,version:ks(e,r),bitFlag:{level:(6&o)>>1,dataDescriptor:!(8&~o),languageEncodingFlag:(o&nt)==nt},rawLastModDate:a,lastModDate:Is(a),filenameLength:ks(e,r+22),extraFieldLength:ks(e,r+24)})}function rs(t,e,r,o,i){const{rawExtraField:a}=e,u=e.extraField=new c,l=Ce(a);let f=0,w=!1;try{for(;f<a.length;){const t=ks(l,f),e=ks(l,f+2);u.set(t,{type:t,data:a.slice(f+4,f+4+e)}),f+=4+e}}catch{w=!0}f>a.length&&(w=!0);const p=ks(r,o+4);n.assign(e,{signature:vs(r,o+10),crc32:vs(r,o+10),compressedSize:vs(r,o+14),uncompressedSize:vs(r,o+18)});const h=u.get(1);let m;h?(function(t,e,n){e.zip64=!0;const r=Ce(t.data),o=Va.filter(([t,n])=>e[t]==n),i=o.reduce((t,[,e])=>t+Ga[e].bytes,0);if(t.data.length<i){if(n)return!1;throw new d(mt)}const a=[];try{for(let t=0,e=0;t<o.length;t++){const[,n]=o[t],i=Ga[n];a.push(i.yt(r,e)),e+=i.bytes}}catch(t){if(n)return!1;throw t}return o.forEach(([n],r)=>{e[n]=t[n]=a[r]}),!0}(h,e,i)||(w=!0),e.extraFieldZip64=h):Va.some(([t,n])=>e[t]==n)&&(i?w=!0:m=!0);const y=u.get(28789);y&&(os(y,xi,zi,e,t),e.extraFieldUnicodePath=y);const g=u.get(25461);g&&(os(g,Fi,Di,e,t),e.extraFieldUnicodeComment=g);const E=u.get($);E&&(99==p||e.encrypted)&&E.data.length>=7?(function(t,e,r){const o=Ce(t.data),i=Ts(o,4);n.assign(t,{vendorVersion:Ts(o,0),vendorId:Ts(o,2),strength:i,originalCompressionMethod:r,compressionMethod:ks(o,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=dt)}(E,e,p),e.extraFieldAES=E):(E&&(w=!0),e.compressionMethod=p);const S=u.get(13);S&&(is(S,e),e.extraFieldPkwareUnix=S);const b=u.get(22613);b&&(is(b,e),e.extraFieldUnixType1=b);const R=u.get(J);R&&(function(t,e,n){if(!t.data.length)return;const r=Ce(t.data),o=Ts(r,0),i=[],a=[];n?(1&~o||(i.push(ki),a.push(vi)),2&~o||(i.push(_i),a.push(Ni)),4&~o||(i.push(Ui),a.push(Oi))):t.data.length>=5&&(i.push(ki),a.push(vi));let c=1;i.forEach((n,o)=>{if(t.data.length>=c+4){const i=vs(r,c);e[n]=t[n]=new s(1e3*(0|i));const u=a[o];t[u]=i}c+=4})}(R,e,i),e.extraFieldExtendedTimestamp=R);const x=u.get(10);x&&(function(t,e){const r=Ce(t.data);let o,i=4;try{for(;i<t.data.length&&!o;){const e=ks(r,i),n=ks(r,i+2);1==e&&(o=t.data.slice(i+4,i+4+n)),i+=4+n}}catch{}if(o&&24==o.length){const r=Ce(o),i=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),s=r.getBigUint64(16,!0);n.assign(t,{rawLastModDate:i,rawLastAccessDate:a,rawCreationDate:s});const c={lastModDate:Cs(i),lastAccessDate:Cs(a),creationDate:Cs(s)};n.assign(t,c),n.assign(e,c,{rawLastAccessDate:a,rawCreationDate:s})}}(x,e),e.extraFieldNTFS=x);const z=u.get(tt);let F;z&&(F=as(z,e,!0),e.extraFieldInfoZip=z);const D=u.get(et);D&&(as(D,F?{}:e,!1),e.extraFieldUnix=D);const A=u.get(Q);if(A&&(e.extraFieldUSDZ=A),m)throw new d(mt);return w}function os(t,e,r,o,i){if(t.data.length<5)return void(t.valid=!1);const a=Ce(t.data),s=new We;s.append(i[r]);const c=Ce(new w(4));c.setUint32(0,s.get(),!0);const u=vs(a,1),l=Ts(a,0);n.assign(t,{version:l,[e]:go(t.data.subarray(5)),valid:1==l&&!i.bitFlag.languageEncodingFlag&&u==vs(c,0)}),t.valid&&(o[e]=t[e],o[e+"UTF8"]=!0)}function is(t,e){if(t.data.length<8)return;const r=Ce(t.data),o={lastAccessDate:new s(1e3*(0|vs(r,0))),lastModDate:new s(1e3*(0|vs(r,4)))};t.data.length>=12&&(o.uid=ks(r,8),o.gid=ks(r,10)),n.assign(t,o),n.assign(e,o)}function as(t,e,r){try{const o=Ce(t.data);let i,a;if(r){let e=0;const r=Ts(o,e++),s=Ts(o,e++);i=ss(t.data.subarray(e,e+s)),e+=s;const c=Ts(o,e++);a=ss(t.data.subarray(e,e+c)),n.assign(t,{version:r,uid:i,gid:a})}else t.data.length>=4&&(i=ks(o,0),a=ks(o,2),n.assign(t,{uid:i,gid:a}));return i!==dt&&(e.uid=i),a!==dt&&(e.gid=a),i!==dt||a!==dt}catch{}}function ss(t){const e=new w(4);return e.set(t,0),new m(e.buffer,e.byteOffset,4).getUint32(0,!0)}function cs(t,e){return t.start<e.end&&e.start<t.end}async function us(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,zip64:i}){const s=a.min(24,a.max(0,t.size-e)),c=Ce(s?await Si(t,e,s):Rt),u=[[i,!0],[i,!1],[!i,!0],[!i,!1]].map(([t,e])=>ls(c,t,e)).filter(t=>t&&t.compressedSize==r&&t.uncompressedSize==o);return u.find(t=>t.crc32==n)||u[0]||ls(c,i,!0)||ls(c,i,!1)}function ls(t,e,n){const r=n?4:0;if(t.byteLength<fs(e,n)||n&&vs(t,0)!=P)return dt;const o=vs(t,r);let i,a;try{e?(i=_s(t,r+4),a=_s(t,r+12)):(i=vs(t,r+4),a=vs(t,r+8))}catch{return dt}return{signature:n,zip64:e,crc32:o,compressedSize:i,uncompressedSize:a}}function fs(t,e){return(t?20:12)+(e?4:0)}function ds(t,e){return t.ht?t.ht(e):0}async function ws(t){return vs(Ce(await Si(t,0,4)))}function ps(t){return t===Ht||t===Vt||t===Gt}function hs(t,e){return ms(t,ms(e,Vt))}function ms(t,e){const n=t[Mt];if(n!==dt){if(!ps(n))throw new d(ya);return n}const r=t[It];return r===dt?e:r?Ht:e==Gt?Gt:Vt}function ys(t,e){if(e==Gt)return!1;const n=t.split("/");return n.length>1&&""===n[n.length-1]&&n.pop(),!!(Pa.test(t)||t.startsWith("/")||t.startsWith("\\")||Wa.test(t))||e==Ht&&(n.includes(".")||n.includes("")||t.includes("\0"))}function gs(t,e){if(t!==dt){const e=se(t);if("number"!=typeof e||o.isNaN(e)||e<0)throw new d(Ea);return e}return e==Ht?0:e==Gt?1/0:M}async function Es(t,e,n){const{size:r}=t,o=a.min(r,65557),i={Ct:64};let s,c,u=0;for await(const[n,a,l,f,d]of Ss(t,o)){const o=ks(n,f+20);if(d+Y+o==r){const o=await Rs(t,n,a,f,d,r,i);if(2==o){if(s||(s=bs(l,f,d)),u++,!e||u>1)break}else 1!=o||c||(c=bs(l,f,d))}}return s||(s=c),s||(s=await async function(t,e,n){const{size:r}=t,o=a.min(r,e==1/0?r:65557+e);let i,s;for await(const[e,a,c,u,l]of Ss(t,o)){const o=bs(c,u,l);i||(i=o);const f=await Rs(t,e,a,u,l,r,n);if(2==f)return o;1!=f||s||(s=o)}return s||i}(t,n,i)),{xt:s,zt:u}}async function*Ss(t,e){const n=t.size-e,r=await Si(t,n,e),o=Ce(r);for(let t=r.length-Y;t>=0;t--)vs(o,t)==V&&(yield[o,n,r,t,n+t])}function bs(t,e,n){return{offset:n,buffer:new w(t.subarray(e,e+Y)).buffer}}async function Rs(t,e,n,r,o,i,a){const s=ks(e,r+10),c=vs(e,r+12),u=vs(e,r+16);if(s==M||c==O||u==O)return await xs(t,e,n,o-K,i,a)==j?2:0;if(!s&&!c)return 1;const l=ks(e,r+6);for(const r of[o-c,ds(t,l)+u])if(await xs(t,e,n,r,i,a)==H)return 2;return 0}async function xs(t,e,n,r,o,i){return r<0||r+4>o?dt:r>=n?vs(e,r-n):i.Ct>0?(i.Ct--,vs(Ce(await Si(t,r,4)),0)):dt}function zs(t,e,n){t?Fs(n):Ri(e,n)}function Fs(t){const e=new d(pa);throw e.reason=t,e}function Ds(t,e,n){return e[n]===dt?t.options[n]:e[n]}function As(t,e,n){return Qt(Ds(t,e,n))}function Is(t){const e=(4294901760&t)>>16,n=t&M,r=new s(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return r<ft?ft:r}function Cs(t){return new s(o(t/i(1e4)-i(116444736e5)))}function Ts(t,e){return t.getUint8(e)}function ks(t,e){return t.getUint16(e,!0)}function vs(t,e){return t.getUint32(e,!0)}function _s(t,e){const n=t.getBigUint64(e,!0);if(n>ja)throw new d(Sa);return o(n)}var Ns=n.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:pa,ERR_BAD_FORMAT:aa,ERR_CENTRAL_DIRECTORY_NOT_FOUND:ua,ERR_CODEC_OUT_OF_MEMORY:er,ERR_ENCRYPTED:la,ERR_ENCRYPTED_CENTRAL_DIRECTORY:ha,ERR_ENTRY_DATA_OUT_OF_BOUNDS:wa,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:ca,ERR_EOCDR_NOT_FOUND:sa,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:mt,ERR_INVALID_AUTHENTICATION_CODE:sn,ERR_INVALID_COMPRESSED_DATA:tr,ERR_INVALID_CRC32:nr,ERR_INVALID_FILENAME_VALIDATION:ga,ERR_INVALID_MAX_APPENDED_DATA_SIZE:Ea,ERR_INVALID_PASSWORD:an,ERR_INVALID_STRICTNESS:ya,ERR_INVALID_UNCOMPRESSED_SIZE:Qn,ERR_LOCAL_FILE_HEADER_NOT_FOUND:pt,ERR_OVERLAPPING_ENTRY:ht,ERR_SPLIT_ZIP_FILE:da,ERR_UNSAFE_FILENAME:ma,ERR_UNSUPPORTED_COMPRESSION:Gn,ERR_UNSUPPORTED_ENCRYPTION:fa,ERR_UNSUPPORTED_UINT64:Sa,ERR_WORKER_STARTUP_TIMEOUT:kr,WARNING_APPENDED_DATA:Aa,WARNING_COMPRESSED_PATCHED_DATA:xa,WARNING_DUPLICATE_FILENAME:_a,WARNING_MALFORMED_EXTRA_FIELD:za,WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET:ka,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:Ma,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:La,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Ba,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Oa,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:Na,WARNING_MISSING_ZIP64_EXTRA_FIELD:va,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:Ua,WARNING_PREPENDED_CENTRAL_DIRECTORY:Ca,WARNING_PREPENDED_DATA:Ia,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Ta,WARNING_UNKNOWN_VERSION:Ra,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Fa,WARNING_UNSORTED_CENTRAL_DIRECTORY:ba,WARNING_WRAPPED_ENTRIES_COUNT:Da,ZipReader:qa,ZipReaderStream:Ya,Tt:async function(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,extraFieldZip64:i}){const a=await us(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,zip64:Boolean(i)});if(a&&a.compressedSize==r&&a.uncompressedSize==o)return fs(a.zip64,a.signature)},isZipFile:Ka});const Us="File already exists",Os="Zip file comment exceeds 64KB",Ms="Invalid zip file comment (must be a Uint8Array)",Ls="File entry comment exceeds 64KB",Bs="Invalid file entry comment (must be a string)",Ws="Invalid date (must be a valid Date instance)",Ps="File entry name exceeds 64KB",Zs="Version exceeds 65535",Hs="The strength must equal 1, 2, or 3",Vs="Encryption is not supported in USDZ files",Gs="Split zip files are not supported in USDZ files",js="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",qs="Invalid extra field (must be a Map)",Ys="Invalid extra field type (must be integer 0..65535)",Ks="Invalid extra field data (must be a Uint8Array)",Xs="Extra field data exceeds 64KB",$s=-2147483648,Js=2147483647,Qs=i(0),tc=i("0x7fffffffffffffff"),ec="Zip64 is not supported (set the 'zip64' option to 'true')",nc="Undefined uncompressed size",rc="Undefined compression method",oc="Undefined CRC32",ic="Undetermined size",ac="Undefined reader",sc="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",cc="Zip file not empty",uc="Invalid uid (must be integer 0..2^32-1)",lc="Invalid gid (must be integer 0..2^32-1)",fc="Invalid UNIX mode (must be integer 0..65535)",dc="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",wc="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",pc="Invalid msdosAttributesRaw (must be integer 0..255)",hc="Invalid msdosAttributes (must be an object with boolean flags)",mc="Invalid level (must be integer 0..9)",yc="Signature data exceeds 64KB",gc="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Ec="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",Sc="compression unavailable",bc="clamped last modification date",Rc=new w([7,0,2,0,65,69,3,0,0]),xc="infozip",zc="unix",Fc=[8,9,5,3];let Dc=0;const Ac=[];class Ic{constructor(t,e={}){t=new mi(t);const{availableSize:r=wt,maxSize:o=wt}=t,i=r>0&&r!==wt&&o>0&&o!==wt;if(i&&e[Ot])throw new d(Gs);n.assign(this,{writer:t,kt:i,options:e,vt:new c,_t:new u,offset:e[Ut]===dt?t.size||t.writable.size||0:e[Ut],Nt:e[Ut]===dt?0:e[Ut]-(t.size||t.writable.size||0),Ut:new u,Ot:[],warnings:[],Mt:0,Lt:0,Bt:dt,Wt:!1})}prependZip(t){return kc(this,async function(t,e){if(t._t.size)throw new d(cc);await vc(t,e)}(this,t))}appendZip(t,e={}){return kc(this,vc(this,t,e))}add(t="",e,r={}){const o=this,{Ut:a}=o,s=async function(t,e,r,o){const a=(o=n.assign({},o))[Wt];if(a!==dt){const{Pt:e,Zt:r}=Oc(a,oe(uu(t,o,Dt)),uu(t,o,ki));delete o[Wt],o=n.assign(e,r,o)}if(uu(t,o,qi)&&!e.endsWith(ct)&&(e+=ct),t._t.has(e))throw new d(Us);t._t.add(e),Dc<be().maxWorkers?Dc++:await new g(t=>Ac.push(t));try{return await async function(t,e,r,o){const a=Mc(t,e,o);({name:e}=a);const s=Lc(t,e,o),{comment:c}=s,u=o[$i];t.vt.set(e,dt);const l=t.Bt,f={};let w,p;s.Ht.keepOrder&&(f.Vt=new g(t=>w=t)),t.Bt=f;try{const{Ht:c}=s;0==c.level||c.compressionMethod!==dt||c.Gt||await Or(be())||(c.level=0,Ri(t.warnings,Sc,e));const u=await async function(t,e,{Ht:r},o){if(r.Gt&&!e&&!uu(t,o,qi))throw new d(ac);let i;if(e){if(e=new hi(e),await gi(e),!e.readUint8Array&&!e.readable)throw new d(sc);({size:i}=e)}return n.assign({reader:e},Wc(t,Boolean(e),i,r,o))}(t,r,s,o);({reader:r}=u);const h=Kc(t.writer),m=Yc(t.writer);let y=o.crc32===dt?o[Xi]:o.crc32;const E=u.Ht.encrypted&&!c.zipCrypto;if(c.Gt&&!c.jt&&E&&(y=dt),c.Gt&&r&&!E&&y===dt)throw new d(oc);const S=Zc(o=n.assign({},o,a.Ht,s.Ht,u.Ht,{signature:o[Xi],crc32:y,offset:t.offset-h,diskNumberStart:m,[Ot]:t.options[Ot]}));S.qt&&Ri(t.warnings,bc,e);const b=Gc(o),R=bu(S.Yt,b.Kt);p=await async function(t,e,r,o,a){const{vt:s,writer:c}=t,{keepOrder:u,dataDescriptor:l,Xt:f,signal:w}=a,{$t:p,It:h,Jt:m,Qt:y}=o,E=t.options[Ot];let S,b,R,x,F,D,A,I=h,C=0;const T=u&&m?m.Vt:dt;s.set(e,I);try{a.bufferedWrite||!u||t.te||t.Mt||t.Lt||!l&&!f?(S=!0,t.Mt++,A=a.createTempStream?await a.createTempStream():new z(dt,dt,{highWaterMark:wt}),A.size=0,await gi(c)):(b=!0,t.Lt++,A=c,await T,await k()),await gi(A);const h=Kc(c);t.kt&&!S&&await ru(t,c),E&&!S&&Hc(o,t.offset-h);const{Yt:m}=p;S||await v();const y=Yc(c),R=$c(t,c);if(I.diskNumberStart=y,S||(F=!0,D=c.size,await ou(A,m)),I=await async function(t,e,{diskNumberStart:r,Vt:o},a,s,c){const{$t:u,ee:l,ne:f}=a,{re:w,oe:p,lastModDate:h,rawLastModDate:m,encrypted:y,compressed:g,version:E,compressionMethod:S,ie:b,ae:R,se:x,ce:z,ue:F,le:D,fe:A,de:I,we:C}=u,{Kt:T}=l,{rawFilename:k,lastAccessDate:v,creationDate:_,password:N,rawPassword:U,level:M,useUnicodeFileNames:B,zip64:W,pe:P,he:Z,me:H,zipCrypto:V,dataDescriptor:G,directory:j,executable:q,versionMadeBy:Y,rawComment:K,rawExtraField:X,ye:$,useWebWorkers:J,onstart:Q,onprogress:tt,onend:et,signal:nt,encryptionStrength:rt,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,uid:ct,gid:ut,unixMode:lt,symlink:ft,setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt,useCompressionStream:Et,Gt:St,jt:bt,format:Rt,codecURI:xt}=c,zt={Vt:o,versionMadeBy:Y,zip64:W,pe:P,directory:Boolean(j),executable:Boolean(q),filenameUTF8:Boolean(B),rawFilename:k,commentUTF8:Boolean(B),rawComment:K,ie:b,ae:R,se:x,le:D,fe:A,de:I,we:C,rawExtraField:X,ye:$,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,diskNumberStart:r,uid:ct,gid:ut,unixMode:lt,symlink:Boolean(ft),setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt};let{crc32:Ft,uncompressedSize:Dt}=c,At=0;St||(Dt=0);const{writable:It}=e;if(t){const n=t.size,r=Bn(bi(t,{size:n})),o={options:{codecType:Ar,inputSize:n,level:M,rawPassword:U,password:N,encryptionStrength:rt,zipCrypto:y&&V,passwordVerification:y&&V&&m>>8&L,computeCrc32:!St,compressed:g&&!St,encrypted:y&&!bt,useWebWorkers:J,useCompressionStream:Et,format:Rt,codecURI:xt,compressionMethod:S},config:s,A:{signal:nt,size:n,onstart:Q,onprogress:tt,onend:et}};try{const t=await co({readable:r,writable:It},o);if(At=t.outputSize,e.size+=At,ne(nt),St||(Dt=t.inputSize,y&&!V||(Ft=t.crc32)),!H&&At>=O||!Z&&Dt>=O)throw new d(ec)}catch(t){const{outputSize:n}=o;throw n!==dt?e.size+=n:Te(t)&&t.outputSize!==dt&&(e.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:n,$t:r,ee:o},{zip64:a,zipCrypto:s,Gt:c,dataDescriptor:u}){const{oe:l,encrypted:f}=r,{ge:d,Ee:w}=o;f&&!s&&!c||t===dt||(gu(l,10,t),u&&gu(d,w,t)),a?u&&(Eu(d,w+4,i(e)),Eu(d,w+12,i(n))):(gu(l,14,e),gu(l,18,n),u&&(gu(d,w+4,e),gu(d,w+8,n)))}({crc32:Ft,compressedSize:At,uncompressedSize:Dt,$t:u,ee:l},c),G&&await ou(e,T),n.assign(zt,{uncompressedSize:Dt,compressedSize:At,lastModDate:h,rawLastModDate:m,creationDate:_,lastAccessDate:v,encrypted:Boolean(y),zipCrypto:Boolean(V),size:f+At,compressionMethod:S,version:E,re:w,oe:p,signature:Ft,crc32:!y||V||St?Ft:dt,ce:z,ue:F,he:Z,me:H}),zt}(r,A,I,o,be(),a),S||(F=!1),s.set(e,I),I.filename=e,S){if(await g.all([A.writable.getWriter().close(),T]),await k(),t.kt&&await ru(t,c),x=!0,D=c.size,await v(),I.diskNumberStart=Yc(c),I.offset=$c(t,c),E){const e=o.ne;Hc(o,t.offset-Kc(c)),I.size+=o.ne-e}!function({rawFilename:t,encrypted:e,zip64:n,ae:r,crc32:o,compressedSize:a,uncompressedSize:s,he:c,me:u},l,{dataDescriptor:f,Gt:d}){if(f||((!e||d&&o!==dt)&&gu(l,14,o),u||gu(l,18,a),c||gu(l,22,s)),n&&r){const e=ut+bu(t)+4;Eu(l,e,i(s)),Eu(l,e+8,i(a))}}(I,p.Se,a),await ou(c,p.Yt),await iu(A.readable,c,w,t=>C+=t),c.size+=A.size,x=!1}else I.diskNumberStart=y,I.offset=R;return t.offset+=I.size,I}catch(n){if(x||F){if(t.hasCorruptedEntries=!0,n)try{n.corruptedEntry=!0}catch{}t.offset+=c.size-D,S&&(t.offset+=C)}throw s.delete(e),n}finally{if(S&&t.Mt--,b&&t.Lt--,y&&y(T),R&&R(),S&&A&&A.dispose)try{await A.dispose()}catch{}}async function k(){t.te=!0;const{be:e}=t;t.be=new g(e=>R=()=>{t.te=!1,e()}),await e}async function v(){Xc(c,bu(p.Yt))&&await c.closeDisk()}}(t,e,r,{$t:S,ee:b,ne:R,It:f,Jt:l,Qt:w},o)}catch(n){throw t.vt.delete(e),n}finally{w&&w(l&&l.Vt)}return n.assign(p,{name:e,comment:c,extraField:u}),new ra(p)}(t,e,r,o)}catch(n){throw t._t.delete(e),n}finally{const t=Ac.shift();t?t():Dc--}}(o,t,e,r);a.add(s);const c=()=>a.delete(s);return g.prototype.then.call(s,c,c),kc(o,s)}remove(t){const{_t:e,vt:n}=this;if(typeof t==St&&(t=n.get(t)),t&&t.filename!==dt){const{filename:r}=t;if(e.has(r)&&n.has(r))return e.delete(r),n.delete(r),!0}return!1}async close(t=Rt,n={}){const r=this,{Ut:o,writer:a}=this,{writable:s}=a;if(r.Wt)return Tc(a);if(!(t instanceof w))throw new d(Ms);if(bu(t)>M)throw new d(Os);for(;o.size;)await g.allSettled(e.from(o));await g.allSettled(r.Ot.map(t=>t.Re));const c=r.Ot.filter(t=>t.xe&&!t.ze);if(c.length){const t=c.map(t=>t.error);c.forEach(t=>t.ze=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(t,n,r){const{Fe:o,De:a}=jc(t.vt),{Ae:s,Ie:c,Ce:u}=await async function(t,n,r){const{vt:o,writer:i}=t,a=new w(n);await gi(i);let s=0,c=0,u=Yc(i),l=Kc(i),f=0;for(const[t,n]of e.from(o.values()).entries()){const{offset:e,rawFilename:d,ie:w,we:p,se:h,le:m,de:y,rawExtraField:g,ye:E,rawComment:S,versionMadeBy:b,re:R,oe:x,he:z,me:F,Te:D,ke:A,internalFileAttributes:I,externalFileAttributes:C,diskNumberStart:T,uncompressedSize:k,compressedSize:v}=n,_=bu(w,p,h,m,y,g,E),N=q+bu(d,S)+_;Xc(i,s+N-c)&&(await ou(i,a.slice(c,s)),c=s,f=0,await i.closeDisk()),0==t&&(u=Yc(i),l=Kc(i)),z||gu(x,18,k),F||gu(x,14,v),(A||D)&&n.version<45&&yu(x,0,45);const U=qc(N);if(U.ve(H),U._e(b),U.Ne(R.subarray(0,24)),U._e(_),U._e(bu(S)),U._e(D?M:T),U._e(I),U.ve(C),U.ve(A?O:e),U.Ne(d),U.Ne(w),U.Ne(p),U.Ne(h),U.Ne(m),U.Ne(y),U.Ne(g),U.Ne(E),U.Ne(S),Su(a,U.ct,s),s+=N,f++,r.onprogress)try{await r.onprogress(t+1,o.size,new ra(n))}catch{}}return await ou(i,c?a.slice(c):a),{Ae:{diskNumber:u,diskOffset:l},Ie:{diskNumber:Yc(i),Ue:f},Ce:a}}(t,o,r),l=await async function(t,e,n){const r=fu(t,n,Bt);if(r){const n=await r(e),o=bu(n);if(o>M)throw new d(yc);const i=qc(6+o);i.ve(Z),i._e(o),i.Ne(n);const{writer:a}=t;return Xc(a,bu(i.ct))&&await a.closeDisk(),await ou(a,i.ct),6+o}return 0}(t,u,r);await async function(t,e,n,r){const{writer:o}=t,{Ae:a,Ie:s,Oe:c,De:u}=r;let{Fe:l}=r,f=t.vt.size,w=a.diskNumber,p=$c(t,a);const h=bu(e);if(h>M)throw new d(Os);let m=uu(t,n,Zi),y=Yc(o);if(Xc(o,(m?98:Y)+h)&&y++,p>=O||l>=O||f>=M||y>=M){if(!1===m)throw new d(ec);m=!0}else m===dt&&u&&(m=!0);const g=qc(m?98:Y);Xc(o,bu(g.ct)+h)&&await o.closeDisk(),y=Yc(o);let E=y==s.diskNumber?s.Ue:0;m&&(g.ve(G),g.Me(44),g._e(45),g._e(45),g.ve(y),g.ve(w),g.Me(E),g.Me(f),g.Me(l),g.Me(p),g.ve(j),g.ve(y),g.Me(i($c(t,o))+i(l)+i(c)),g.ve(y+1),uu(t,n,"supportZip64SplitFile",!0)&&(y=M,w=M),E=M,f=M,p=O,l=O),g.ve(V),g._e(y),g._e(w),g._e(E),g._e(f),g.ve(l),g.ve(p),g._e(h),await ou(o,g.ct),h&&await ou(o,e)}(t,n,r,{Ae:s,Ie:c,Fe:o,Oe:l,De:a})}(r,t,n),r.Wt=!0,!yi(a)&&uu(r,n,kt)||await s.getWriter().close(),Tc(a)}[xt](){return this.close()}}class Cc extends g{then(t,e){const{Le:n}=this;return n&&(n.ze=!0),super.then(t,e)}}function Tc(t){return t.getData?t.getData():t.writable}function kc(t,e){const r=new Cc((t,n)=>g.prototype.then.call(e,t,n)),o={};return r.Le=o,o.Re=g.prototype.then.call(r,dt,t=>n.assign(o,{xe:!0,error:t})),t.Ot.push(o),r}async function vc(t,r,o={}){const{Ut:i,_t:s,vt:l}=t,f=Qt(o.filter),w=te(o.readerOptions);for(;i.size;)await g.allSettled(e.from(i));let p;const h=new g(t=>p=t);i.add(h);const m=[];let y;try{r=new hi(r),await gi(r),r.size!==dt&&r.readUint8Array||(r=new Po(await Wn(r.readable)),await gi(r));const{ZipReader:o,Tt:i}=await g.resolve().then(function(){return Ns}),p=new o(r,w),h=[];let E;try{E=await p.getEntries();for(const t of E)f&&!await f(t,_c(l,t.filename))||h.push(t)}finally{await p.close()}await gi(t.writer);const{directoryOffset:S,Rt:b}=p;h.forEach(t=>{const{filename:e}=t;if(b.has(t))throw new d(mt);if(s.has(e))throw new d(Us);s.add(e),m.push(e)}),t.te=!0;const{be:R}=t;t.be=new g(e=>y=()=>{t.te=!1,e()}),await R,t.kt&&(delete t.kt,!f&&await async function(t){return mu(Ce(await Si(t,0,4)),0)==W}(r)||(await ou(t.writer,nu()),t.offset+=4));const x=await async function(t,n,r,o,i,s,l){const{writer:f}=t,w=new c;if(f.closeDisk||s){const p=e.from(r).sort((t,e)=>eu(n,t)-eu(n,e)),h=function(t,n,r){const o=new e(n.length);let i=r;for(let e=n.length-1;e>=0;e--){const s=eu(t,n[e]),c=n[e+1];c&&eu(t,c)>s&&(i=a.min(eu(t,c),r)),o[e]=i}return o}(n,p,i),m=new u(o),y=new c;for(let t=0;t<p.length;t++){const e=p[t];if(m.has(e)){const r=eu(n,e),o=await tu(n,r);if(o===dt)throw new d(pt);let i=r+o+e.compressedSize;if(e.bitFlag.dataDescriptor){const r=await l(n,i,e);i=r===dt?a.max(i,h[t]):i+r}if(i>h[t])throw new d(ht);h[t]=i,y.set(e,o)}}let g,E=0;for(let e=0;e<p.length;e++){const r=p[e];if(m.has(r)){const o=eu(n,r);o<E?w.set(r,g):(s||await Qc(t,n,E,o-E),f.closeDisk&&Xc(f,y.get(r))&&await f.closeDisk(),g={offset:$c(t,f),diskNumberStart:Yc(f)},w.set(r,g),await Qc(t,n,o,h[e]-o),E=h[e])}}s||await Qc(t,n,E,i-E)}else{const e=t.offset;await Qc(t,n,0,i),r.forEach(t=>w.set(t,{offset:e+eu(n,t),diskNumberStart:0}))}return w}(t,r,E,h,S,Boolean(f),i);h.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:o,rawBitFlag:i,uncompressedSize:a,compressedSize:s,extraFieldZip64:c}=t;let{compressionMethod:u,rawExtraField:f}=t;f=Jc(f||Rt),t.extraFieldAES&&(u=99);const d=bu(f),w=Boolean(c)&&c.uncompressedSize!==dt,p=Boolean(c)&&c.compressedSize!==dt,{re:h,oe:m}=Ru({version:e,bitFlag:i,compressionMethod:u,uncompressedSize:a,compressedSize:s,rawLastModDate:r,rawFilename:o,me:p,he:w,extraFieldLength:d}),{crc32:y}=t;y!==dt&&gu(m,10,y);const{offset:g,diskNumberStart:E}=x.get(t);l.set(t.filename,n.assign({},t,{pe:!0,he:w,me:p,offset:g,diskNumberStart:E,Te:!1,ie:Rt,we:Rt,se:Rt,le:Rt,fe:Rt,de:Rt,rawExtraField:f,ye:Rt,re:h,oe:m}))})}catch(t){throw m.forEach(t=>s.delete(t)),t}finally{p(),i.delete(h),y&&y()}}function _c(t,e){const n=t.get(e);return n?new ra(n):dt}async function Nc(t,e){try{await t.writer.writable.abort(e)}catch{}}function Uc(t,e,n){t.Ut.add(e),e.catch(t=>{try{n(t)}catch{}})}function Oc(t,r,o){if(null===t||typeof t!=Et||e.isArray(t))throw new d(gc);const{externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,rawLastModDate:w,creationDate:p,lastAccessDate:h,uncompressedSize:m,encrypted:y,zipCrypto:g,crc32:E,compressionMethod:S,extraFieldAES:b,extraFieldUnix:R,internalFileAttributes:x,extraField:z,bitFlag:F,directory:D,uid:A,gid:I}=t,C={externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,creationDate:p,lastAccessDate:h,internalFileAttributes:x,directory:D};F&&F.languageEncodingFlag&&(C[_t]=!0);const T=function(t){if(t){const e=new c;if(t.forEach((t,n)=>{oa.has(n)||e.set(n,t.data)}),e.size)return e}}(z);T&&(C[$i]=T),A===dt&&I===dt||n.assign(C,{uid:A,gid:I,unixExtraFieldType:R?zc:xc});const k={};if(r&&!D)if(n.assign(k,{uncompressedSize:m,crc32:E,compressionMethod:S}),r!==jt&&n.assign(k,{encrypted:y,zipCrypto:g,encryptionStrength:b?b.strength:dt}),F&&(k.dataDescriptor=F.dataDescriptor,k[vt]=Fc[F.level]),o===dt)k.rawLastModDate=w;else if(r!==jt&&g&&(!F||F.dataDescriptor)&&o instanceof s&&function(t){let e=new s(2e3*a.ceil(a.floor(t.getTime()/1e3)/2));return e<ft?e=ft:e>lt&&(e=lt),(e.getHours()<<3|e.getMinutes()>>3)&L}(o)!=(w>>>8&L))throw new d(Ec);return{Pt:C,Zt:k}}function Mc(t,n,r){let o=uu(t,r,Pi),i=uu(t,r,Gi,o?20:768);const a=uu(t,r,Yi),s=du(t,r,"uid"),c=du(t,r,"gid");let u=du(t,r,Ji),l=uu(t,r,"unixExtraFieldType"),f=uu(t,r,Qi),w=uu(t,r,ta),p=uu(t,r,ea);if(ae(s,O,uc),ae(c,O,lc),ae(u,M,fc),l!==dt&&l!==xc&&l!==zc)throw new d(dc);if(l===zc&&(s!==dt&&s>M||c!==dt&&c>M))throw new d(wc);l!==dt||s===dt&&c===dt||(l=xc);let h=du(t,r,Bi),m=uu(t,r,Wi);const y=h!==dt||m!==dt;if(s!==dt||c!==dt||u!==dt||l||a?(o=!1,i=i&L|768):y&&(o=!0,i&=L),ae(h,L,pc),m&&(typeof m!==Et||e.isArray(m)))throw new d(hc);if(i>M)throw new d(Zs);let g=uu(t,r,Li);const E=g!==dt;E||(g=0),!r[qi]&&n.endsWith(ct)&&(r[qi]=!0);const S=uu(t,r,qi);if(S?(n.endsWith(ct)||(n+=ct),E||(g=16,o||(g|=16877<<16))):o||E||(g=a?493<<16:27525120),!o){const t=u!==dt||Boolean(f||w||p);u=u===dt?g>>16&M:u&M,f?u|=at:f=Boolean(u&at),w?u|=st:w=Boolean(u&st),p?u|=512:p=Boolean(512&u),E&&!t||(S?u=-61441&u|it:u&ot||(u|=32768),g=(u&M)<<16|g&M)}({msdosAttributesRaw:h,msdosAttributes:m}=function(t,e){if(t!==dt)t&=L;else if(e!==dt){const{readOnly:n,hidden:r,system:o,directory:i,archive:a}=e;let s=0;n&&(s|=1),r&&(s|=2),o&&(s|=4),i&&(s|=16),a&&(s|=32),t=s&L}return e===dt&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,m)),y&&(g=g&O|h&L);const b=g>>16&M,R=u!==dt&&40960==(u&ot);return{name:n,Ht:{versionMadeBy:i,msDosCompatible:Boolean(o),externalFileAttributes:g,unixExternalUpper:b,uid:s,gid:c,unixMode:u,unixExtraFieldType:l,symlink:R,setuid:f,setgid:w,sticky:p,msdosAttributesRaw:h,msdosAttributes:m}}}function Lc(t,e,n){const r=fu(t,n,"encodeText")||Ze;let i=r(e,Pt);if(i===dt&&(i=Ze(e)),bu(i)>M)throw new d(Ps);const a=n[Fi]||"";if(typeof a!=St)throw new d(Bs);let c=r(a,Zt);if(c===dt&&(c=Ze(a)),bu(c)>M)throw new d(Ls);const u=uu(t,n,Vi);if(u!==dt&&u>M)throw new d(Zs);const l=lu(t,n,ki,new s),f=uu(t,n,vi),w=lu(t,n,_i),p=lu(t,n,Ui),h=uu(t,n,Mi,0),m=oe(uu(t,n,Dt)),y=Boolean(m),g=!0===m;let E=uu(t,n,zt),S=uu(t,n,Ft);re(E,S),E=E&&E.length?E:dt,S=S&&S.length?S:dt;const b=du(t,n,"encryptionStrength",3),R=uu(t,n,ji),x=uu(t,n,"extendedTimestamp",!0),z=uu(t,n,"ntfsTimestamp"),F=uu(t,n,"keepOrder",!0),D=uu(t,n,Ct),A=uu(t,n,"bufferedWrite"),I=fu(t,n,"createTempStream"),C=uu(t,n,"dataDescriptorSignature",!0),T=ee(uu(t,n,At));ne(T);const k=uu(t,n,_t,!xu(i)||!xu(c)),v=uu(t,n,Ki),_=y||v===dt?dt:Kn(v);if(!y&&v!==dt&&0!==v&&8!==v&&!_)throw new d(Gn);let N=du(t,n,vt);if(ae(N,9,mc),t.options[Ot]){if(E!==dt||S!==dt)throw new d(Vs);N===dt&&v===dt&&(N=0)}y&&(N=se(n[vt]));let U=uu(t,n,Tt),O=uu(t,n,Nt);A&&O===dt&&(O=!1),(O===dt||R&&!g)&&(O=!0),N!==dt&&6!=N&&(U=!1);const L=uu(t,n,Zi);if(!(R||E===dt&&S===dt||o.isInteger(b)&&b>=1&&b<=3))throw new d(Hs);const B=Bc(n[$i]),W=Bc(n.localExtraField),P=Bc(n.centralExtraField);return{comment:a,Ht:{rawFilename:i,rawComment:c,version:u,lastModDate:l,rawLastModDate:f,lastAccessDate:w,creationDate:p,internalFileAttributes:h,Gt:y,jt:g,password:E,rawPassword:S,encryptionStrength:b,zipCrypto:R,extendedTimestamp:x,ntfsTimestamp:z,keepOrder:F,useWebWorkers:D,bufferedWrite:A,createTempStream:I,dataDescriptorSignature:C,signal:T,useUnicodeFileNames:k,compressionMethod:v,format:_?_.format:dt,codecURI:_?_.codecURI:dt,Be:_?_.versionNeeded:dt,level:N,useCompressionStream:U,dataDescriptor:O,zip64:L,rawExtraField:B,We:W,ye:P}}}function Bc(t){if(!t)return Rt;if(!(t instanceof c))throw new d(qs);let e=0,n=0;t.forEach((t,n)=>{if(ie(n,M,Ys),!(t instanceof w))throw new d(Ks);if(bu(t)>M)throw new d(Xs);e+=4+bu(t)});const r=new w(e),o=Ce(r);return t.forEach((t,e)=>{yu(o,n,e),yu(o,n+2,bu(t)),Su(r,t,n+4),n+=4+bu(t)}),r}function Wc(t,e,n,r,o){const{Gt:i,jt:a,zipCrypto:s,password:c,rawPassword:u,encryptionStrength:l}=r;let{dataDescriptor:f,zip64:w,level:p,compressionMethod:h}=r,m=0,y=0,g=!1;if(i&&e){if(y=o[Ai],y===dt)throw new d(nc);if(h===dt)throw new d(rc)}const E=!0===w,S=uu(t,o,Hi);if(e&&a&&!S&&bu(c,u))throw new d(js);const b=e&&(Boolean(c&&bu(c)||u&&bu(u))||a&&S);e||(p=0,h=0);const R=ia(b,s,l);e&&(i?(o.uncompressedSize=y,m=n===dt?wu(y)+R:n+(a?0:R)):n===dt?(f=!0,(w||w===dt)&&(w=g=!0,m=4294967296)):(o.uncompressedSize=y=n,m=(pu(h,p)?wu(y):y)+R));const x=!(b||e&&(0!==n||i)||pu(h,p));x&&uu(t,o,Nt)===dt&&(f=!1);const z=E||g||y>=O,F=E||m>=O;if(z||F){if(!1===w)throw new d(ec);w=!0}return w=w||!1,{Pe:m,Ht:{dataDescriptor:f,Xt:x,zip64:w,pe:E,Ze:g,he:z,me:F,uncompressedSize:y,level:p,compressionMethod:h,encrypted:b}}}function Pc(t,e,n){const r=t.slice().sort((t,e)=>n?e-t:t-e);let o=e,i=0;for(const t of r){if(o>=O)break;o+=t,i++}return i}function Zc(t){const{rawFilename:e,lastModDate:n,rawLastModDate:r,lastAccessDate:o,creationDate:i,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:w,directory:p,rawExtraField:h,We:m,encryptionStrength:y,extendedTimestamp:g,ntfsTimestamp:E,Gt:S,encrypted:b,he:R,me:x,uncompressedSize:z,Ze:F,crc32:D}=t;let{version:A,compressionMethod:I}=t;const C=!p&&pu(I,c);let T;const k=S||!C,v=u&&(t.bufferedWrite||!w||!R&&!x||k&&!F),_=v||u&&w&&(R||x);if(u&&(R||x)){const t=20,e=qc(t);if(e._e(1),e._e(t-4),T=e.ct,v&&(e.Me(z),k)){const t=ia(b,l,y);e.Me(S?0:z+t)}}else T=Rt;let N,U,O,L,W;if(b&&!l){const t=qc(bu(Rc)+2);t._e($),t.Ne(Rc),N=t.ct,N[8]=y}else N=Rt;if(g){const t=su(n),e=(P=t)>=$s&&P<=Js;if(e){const e=9+(o?4:0)+(i?4:0),n=qc(e);L=1+(o?2:0)+(i?4:0),W=t,n._e(J),n._e(e-4),n.He(L),n.ve(t),o&&n.ve(cu(su(o))),i&&n.ve(cu(su(i))),O=n.ct}else O=Rt;if(E===dt?!e||Boolean(o||i):E)try{const t=au(n),e=qc(36);e._e(10),e._e(32),e.Ve(4),e._e(1),e._e(24),e.Me(t),e.Me(o?au(o):t),e.Me(i?au(i):t),U=e.ct}catch{U=Rt}else U=Rt}else U=O=Rt;var P;let Z,H;try{const{uid:e,gid:n,unixExtraFieldType:r}=t;if(r!=xc||e===dt&&n===dt)if(r!=zc||e===dt&&n===dt)Z=H=Rt;else{const t=qc(8);t._e(et),t._e(4),t._e((e===dt?0:e)&M),t._e((n===dt?0:n)&M),Z=t.ct;const r=qc(4);r._e(et),r._e(0),H=r.ct}else{const t=Vc(e===dt?0:e),r=Vc(n===dt?0:n),o=3+t.length+r.length,i=qc(4+o);i._e(tt),i._e(o),i.He(1),i.He(t.length),i.Ne(t),i.He(r.length),i.Ne(r),Z=H=i.ct}}catch{Z=H=Rt}I===dt&&(I=C?8:0),A===dt&&(A=0!=I||p||b?20:10);const{Be:V}=t;C&&V!==dt&&(A=A>V?A:V),u&&(A=A>45?A:45),b&&!l&&(A=A>51?A:51,S&&D!==dt&&(N[4]=1),yu(Ce(N),9,I),I=99);const G=_?bu(T):0,j=G+bu(N,O,U,Z,h,m);if(j+(t[Ot]?67:0)>M)throw new d(Xs);const q=new s(2e3*a.ceil(a.floor(n.getTime()/1e3)/2)),Y=q<ft?ft:q>lt?lt:q,K=bu(O)?new s(1e3*su(n)):bu(U)?n:Y,{re:X,oe:Q,rawLastModDate:nt}=Ru({version:A,bitFlag:zu(c,f,w,b,I),compressionMethod:I,uncompressedSize:z,lastModDate:Y,rawLastModDate:r,rawFilename:e,me:x,he:R,extraFieldLength:j}),rt=qc(ut+bu(e)+j),ot=rt.ct,it=Ce(ot);return rt.ve(B),rt.Ne(X),rt.Ne(e),_&&rt.Ne(T),rt.Ne(N),rt.Ne(O),rt.Ne(U),rt.Ne(Z),rt.Ne(h),rt.Ne(m),w&&(x||gu(it,18,0),R||gu(it,22,0)),{Yt:ot,Se:it,re:X,oe:Q,lastModDate:K,qt:K===Y&&q.getTime()!=Y.getTime(),rawLastModDate:nt,encrypted:b,compressed:C,version:A,compressionMethod:I,ce:L,ue:W,ie:Rt,ae:G,se:O,le:U,fe:Z,de:H,we:N,extraFieldLength:j}}function Hc(t,e){const{$t:n}=t;let{Yt:r,extraFieldLength:o}=n,i=64-(e+bu(r))%64;i<4&&(i+=64);const a=new w(i),s=Ce(a);yu(s,0,Q),yu(s,2,i-4);const c=r;n.Yt=r=new w(bu(c)+i),Su(r,c),Su(r,a,bu(c));const u=Ce(r);yu(u,28,o+i),n.Se=u,t.ne+=i}function Vc(t){const e=new w(4);Ce(e).setUint32(0,t,!0);let n=4;for(;n>1&&0===e[n-1];)n--;return e.subarray(0,n)}function Gc({zip64:t,dataDescriptor:e,dataDescriptorSignature:n}){let r,o=Rt,i=0,a=t?20:12;return n&&(a+=4),e&&(o=new w(a),r=Ce(o),n&&(i=4,gu(r,0,P))),{Kt:o,ge:r,Ee:i}}function jc(t){let e=0,n=!1;for(const[,r]of t){const{rawFilename:t,we:o,rawComment:i,le:a,de:s,rawExtraField:c,ye:u,ce:l,ue:f,pe:w,uncompressedSize:p,compressedSize:h}=r;let{he:m,me:y}=r;w||(m&&p<O&&(m=r.he=!1),y&&h<O&&(y=r.me=!1)),n=n||m||y;const g=r.offset>=O,E=r.diskNumberStart>=M;let S,b;if(g||E||m||y){const t=4+(m?8:0)+(y?8:0)+(g?8:0)+(E?4:0),e=qc(t);e._e(1),e._e(t-4),m&&e.Me(p),y&&e.Me(h),g&&e.Me(r.offset),E&&e.ve(r.diskNumberStart),S=e.ct}else S=Rt;if(r.ie=S,r.ke=g,r.Te=E,f===dt)b=Rt;else{const t=qc(9);t._e(J),t._e(5),t.He(l),t.ve(f),b=t.ct}r.se=b;const R=bu(S,o,a,s,b,c,u);if(R>M)throw new d(Xs);e+=q+bu(t,i)+R}return{Fe:e,De:n}}function qc(t){const e=new w(t),n=Ce(e);let r=0;return{ct:e,He:t=>{!function(t,e,n){t.setUint8(e,n)}(n,r,t),r+=1},_e:t=>{yu(n,r,t),r+=2},ve:t=>{gu(n,r,t),r+=4},Me:t=>{Eu(n,r,i(t)),r+=8},Ne:t=>{Su(e,t,r),r+=bu(t)},Ve:t=>r+=t}}function Yc(t){const{diskNumber:e=0}=t;return e}function Kc(t){const{diskOffset:e=0}=t;return e}function Xc(t,e){const{availableSize:n=wt}=t;return e>n}function $c(t,{diskNumber:e=0,diskOffset:n=0}){return t.offset-n-(e?t.Nt:0)}function Jc(t){const e=Ce(t);let n=0;for(;n+4<=bu(t);){const r=4+hu(e,n+2);if(1==hu(e,n))return Jc(Ae(t.subarray(0,n),t.subarray(a.min(n+r,bu(t)))));n+=r}return t}async function Qc(t,e,n,r){if(r>0){const{writer:o}=t;let i=0;try{await iu(bi(e,{offset:n,size:r}),o,dt,t=>i+=t)}catch(e){if(i){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}}throw e}finally{o.size+=i,t.offset+=i}}}async function tu(t,e){const n=e>=0&&e+ut<=t.size?await Si(t,e,ut):Rt;if(bu(n)<ut)return dt;const r=Ce(n);return mu(r,0)!=B?dt:ut+hu(r,26)+hu(r,28)}function eu(t,{offset:e,diskNumberStart:n}){return e+(t.ht?t.ht(n):0)}function nu(){const t=new w(4);return gu(Ce(t),0,W),t}async function ru(t,e){delete t.kt,await ou(e,nu()),t.offset+=4}async function ou(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=bu(e),await r.write(e)}finally{r.releaseLock()}}async function iu(t,e,n,r){const o=e.writable.getWriter();try{await t.pipeTo(new D({async write(t){await o.ready,await o.write(t),r(bu(t))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{o.releaseLock()}}function au(t){if(t){const e=(i(t.getTime())+i(116444736e5))*i(1e4);return e<Qs?Qs:e>tc?tc:e}}function su(t){return a.floor(t.getTime()/1e3)}function cu(t){return a.min(Js,a.max($s,t))}function uu(t,e,n,r){const o=e[n]===dt?t.options[n]:e[n];return o===dt?r:o}function lu(t,e,n,r){const i=uu(t,e,n,r);if(null===i)return r;if(i!==dt&&(typeof i.getTime!=gt||o.isNaN(i.getTime())))throw new d(Ws);return i}function fu(t,e,n){return Qt(uu(t,e,n))}function du(t,e,n,r){return se(uu(t,e,n,r))}function wu(t){return t+5*(a.floor(t/16383)+1)}function pu(t,e){return t===dt?e===dt||e>0:0!==t}function hu(t,e){return t.getUint16(e,!0)}function mu(t,e){return t.getUint32(e,!0)}function yu(t,e,n){t.setUint16(e,n,!0)}function gu(t,e,n){t.setUint32(e,n,!0)}function Eu(t,e,n){t.setBigUint64(e,n,!0)}function Su(t,e,n){t.set(e,n)}function bu(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Ru({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:o,lastModDate:i,rawLastModDate:a,rawFilename:s,me:c,he:u,extraFieldLength:l}){const f=qc(26),d=f.ct,w=Ce(d);if(f._e(t),f._e(e),f._e(n),a===dt){const t=new h(1),e=Ce(t);yu(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),yu(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),a=t[0]}return f.ve(a),f.Ve(4),c||o!==dt?f.ve(c?O:o):f.Ve(4),u||r!==dt?f.ve(u?O:r):f.Ve(4),f._e(bu(s)),f._e(l),{re:d,oe:w,rawLastModDate:a}}function xu(t){return t.every(t=>t>=32&&t<=126)}function zu(t,e,n,r,o){let i=0;return e&&(i|=nt),n&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),r&&(i|=1),i}function Fu(t,e){if(!t)return!1;const{supportedFormats:n}=t;return n?n.includes(e):fr(t,e)}const Du=1048576,Au=".zip.js-temp",Iu=1048576,Cu=1048576,Tu=".zip.js-temp",ku="createSyncAccessHandle is only available in dedicated workers";try{!function(t){const e=ze(De(t));n.assign(we,e),n.assign(Se,e)}({baseURI:void 0===b&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:void 0===b?location.href:U&&"SCRIPT"===U.tagName.toUpperCase()&&U.src||new f("zip-fs-core.min.js",b.baseURI).href})}catch{}const vu="Entry filename already exists",_u="Duplicate entry filename in the imported zip file",Nu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Uu="Entry is an ancestor of target entry",Ou="Root directory cannot be moved",Mu="Target entry is not a directory",Lu="Parent entry is not a directory",Bu="Readable stream already consumed",Wu="throw",Pu="keep-first",Zu="keep-last",Hu=new u([Wu,Pu,Zu]),Vu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Gu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",ju="Invalid passwords option (must be an array of strings)",qu="Invalid requestPassword option (must be a function returning a string or undefined)",Yu="zipjs-abort-export",Ku=new w(0),Xu=new u([nr,Qn,tr]);class $u{constructor(t,e,r,o){const i=this;if(t.root&&o&&o.getChildByName(e))throw new d(vu);r||(r={}),n.assign(i,{fs:t,name:e,data:r.data,options:r.options&&n.assign({},r.options),id:t.Ge++,parent:o,children:[],uncompressedSize:r.uncompressedSize||0,je:r.je||r.uncompressedSize===dt,passThrough:r.passThrough,qe:r.qe||new s}),!o&&t.root||(t.entries[i.id]=i),o&&i.parent.children.push(i)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let n=e.parent;if(n){const r=Cl(t);r&&(t=r.pop(),n=Tl(n,r,e));const o=n.getChildByName(t);if(o&&o!=e)throw new d(vu);n!=e.parent&&(ul(e),e.parent=n,n.children.push(e),Al(e.fs,e))}e.name=t}setOptions(t){const e=n.assign({},this.options,t);this.options=n.fromEntries(n.entries(e).filter(([,t])=>t!==dt))}}class Ju extends $u{constructor(t,e,n,r){super(t,e,n,r);const o=this;o.Reader=n.Reader,o.Writer=n.Writer,n.getData&&(o.getData=n.getData)}clone(){return new Ju(this.fs,this.name,this)}async getData(t,e={}){const n=this;if(!t||t.constructor==n.Writer&&n.data&&function(t,e){const{contentType:n}=t;return n===dt||(t.constructor==Zo?e.type==n:t.constructor!=Lo||e.startsWith("data:"+(n||"")+";base64,"))}(t,n.data))return n.data;{const r=n.reader=sl(n.Reader,n.data,e),o=n.uncompressedSize||r.size;await g.all([gi(r),gi(t,o)]);const i=ee(e.signal),a=function(t,e,n,r){const{onstart:o,onprogress:i,onend:a}=n,{readable:s}=e;return t.data instanceof ra||!o&&!i&&!a?s:Bn(s).pipeThrough(new Wr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:r})}(n,r,e,i),s=!yi(t)&&Boolean(e.preventClose);return n.uncompressedSize=r.size,await Bn(a).pipeTo(Pn(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,n.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Te(t)&&t.message==an)return!1;throw t}}getText(t,e){return this.getData(new Go(t),e)}getBlob(t,e){return this.getData(new Zo(t),e)}getData64URI(t,e){return this.getData(new Lo(t),e)}getUint8Array(t){return this.getData(new di,t)}getWritable(t=new D,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Ie(await this.getUint8Array(t)).buffer}replaceBlob(t){El(this,{data:t,Reader:Po,Writer:Zo,uncompressedSize:t.size})}replaceText(t){El(this,{data:t,Reader:Ho,Writer:Go,uncompressedSize:Vo(t)})}replaceData64URI(t){El(this,{data:t,Reader:Mo,Writer:Lo,uncompressedSize:Sl(t)})}replaceUint8Array(t){El(this,{data:t,Reader:fi,Writer:di,uncompressedSize:t.length})}replaceReadable(t){El(this,{data:null,Reader:il(t),Writer:null,uncompressedSize:dt})}}class Qu extends $u{constructor(t,e,n,r){super(t,e,n,r),this.directory=!0}clone(t){const e=this,n=new Qu(e.fs,e.name,e);return t&&(n.children=e.children.map(e=>{const r=e.clone(t);return r.parent=n,r})),n}addDirectory(t,e){return Il(this,t,{options:e},!0)}addText(t,e,n={}){return Il(this,t,{data:e,Reader:Ho,Writer:Go,options:n,uncompressedSize:Vo(e)})}addBlob(t,e,n={}){return Il(this,t,{data:e,Reader:Po,Writer:Zo,options:n,uncompressedSize:e.size})}addData64URI(t,e,n={}){return Il(this,t,{data:e,Reader:Mo,Writer:Lo,options:n,uncompressedSize:Sl(e)})}addUint8Array(t,e,n={}){return Il(this,t,{data:e,Reader:fi,Writer:di,options:n,uncompressedSize:e.length})}addHttpContent(t,e,n={}){return Il(this,t,{data:e,Reader:class extends li{constructor(t){super(t,n)}},options:n})}addReadable(t,e,n={}){return Il(this,t,{Reader:il(e),options:n})}addFileSystemEntry(t,e={}){return xl(this,t,e)}addFileSystemHandle(t,e={}){return xl(this,t,e)}addFile(t,e={}){return(e=n.assign({},e)).lastModDate||(e.lastModDate=new s(t.lastModified)),Il(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 Po(t),e)}importData64URI(t,e){return this.importZip(new Mo(t),e)}importUint8Array(t,e){return this.importZip(new fi(t),e)}importHttpContent(t,e){return this.importZip(new li(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new Zo(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Lo(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new di,t)}async exportWritable(t=new D,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:o,onprogress:i,onend:a}=r;gl(r.passThrough),pl(r);const s=wl(r.readerOptions),c=new AbortController,{signal:u}=c,l=function(t,e){if(!ee(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const n=()=>e.abort(t.reason);return t.addEventListener("abort",n,{once:!0}),()=>t.removeEventListener("abort",n)}(r.signal,c),f=n.assign({},r,s,{signal:u,onstart:dt,onprogress:dt,onend:dt,preventClose:!1}),w=nl([t],t=>ol(t,f.passThrough)),p=[];let h=!1,m=0;try{o&&await Pr(o,w),await E(t,e),a&&await Pr(a,m)}catch(t){try{t.exportedEntryNames=p}catch{}throw t}finally{l()}return e;function y(t){const e=t.getWriter();return new D({async write(t){await e.write(t),m+=t.length,i&&await Pr(i,m,w)},close:()=>e.close(),abort:t=>e.abort(t)})}async function E(t,e){if(r.concurrent){const n=(await g.allSettled(t.children.map(t=>S(t,e)))).filter(t=>"rejected"==t.status);if(n.length){const t=n.filter(t=>!ll(t.reason));throw function(t){const[e]=t,n=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(n.length)try{e.entryErrors=[...e.entryErrors||[],...n]}catch{}return e}((t.length?t:n).map(t=>t.reason))}}else for(const n of t.children)await S(n,e)}async function S(e,n){if(u.aborted){if(h||ll(u.reason))return;ne(u)}try{if(e.directory){const t=await n.getDirectoryHandle(e.name,{create:!0});await E(e,t)}else{const r=await n.getFileHandle(e.name,{create:!0}),o=await r.createWritable();try{await e.getData({writable:y(o)},f)}catch(t){throw h?new d(Yu):t}p.push(e.getRelativeName(t))}}catch(n){h=!0,c.abort(new d(Yu));try{n.entryName===dt&&(n.entryName=e.getRelativeName(t),n.entryId=e.id)}catch{}throw n}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==gt?(r=t,e=n.assign({},r.options,e)):(await gi(t),r=new qa(t,e)),gl(e.passThrough),pl(e);const o=function(t){if(t===dt)return Wu;if(Hu.has(t))return t;throw new d(Nu)}(e.duplicates),i=[],a={Ye:[]},s=await r.getEntries(e);for(const t of s){let r=this;try{const s=t.filename.split("/").filter(t=>""!=t&&"."!=t),c=s.pop();let u=!1;for(const t of s){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(o==Pu){u=!0;break}if(o!=Zu)throw new d(_u);this.fs.remove(r),r=new Qu(this.fs,t,{data:null},e),i.push(r)}}else r=new Qu(this.fs,t,{data:null},e),i.push(r)}if(u)continue;if(t.directory){let e=r;if(c){if(e=r.getChildByName(c),e&&(!e.directory||e.data)){if(o==Pu)continue;if(o!=Zu)throw new d(_u);e.directory?e.data=t:(this.fs.remove(e),e=dt)}e||(e=new Qu(this.fs,c,{data:null},r),i.push(e))}e==this||e.data||(e.data=t)}else{const s=r.getChildByName(c);if(s){if(o==Pu)continue;if(o!=Zu)throw new d(_u);this.fs.remove(s)}i.push(Il(r,c,{data:t,Reader:al(n.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){i.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return i}async exportZip(t,e={}){const r=this,o=Boolean(t)&&typeof t.add==gt;e=n.assign({},e),o||e.bufferedWrite!==dt||(e.bufferedWrite=!0);const[i]=await g.all([cl(r,wl(e.readerOptions)),o?dt:gi(t)]),a=o?t:new Ic(t,e);return await async function(t,e,r,o,i){const{onstart:a,onprogress:s,onend:c,onentryprogress:u}=o,l=e,f=nl(e.children,t=>Rl(t)?0:1);let d=0,w=0;if(a&&await Pr(a,r),o.bufferedWrite)await async function t(e){const n=(await g.allSettled(e.children.map(async e=>{await p(e),await t(e)}))).find(t=>"rejected"==t.status);if(n)throw n.reason}(e);else for(const t of e.getChildren({recursive:!0}))await p(t);async function p(e){if(Rl(e))return;const{name:a,Pt:c}=fl(e,l,o);let p=0;const h=await t.add(a,i.get(e),n.assign(c,{onstart:dt,onend:dt,onprogress:async t=>{d+=t-p,p=t,s&&await Pr(s,d,r)}}));w++,u&&await Pr(u,w,f,h)}c&&await Pr(c,d)}(a,r,nl([r],rl),e,i),o?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(t={}){const e=this;wl((t=n.assign({},t)).readerOptions),t.bufferedWrite===dt&&(t.bufferedWrite=!0);const r=e.getChildren({recursive:!0}),o=r.filter(t=>!Rl(t)).map(n=>{const{name:r,Pt:o}=fl(n,e,t);return{name:r,size:n.directory?0:dl(n,bl(n,t)),options:o}}),i=!t.bufferedWrite||o.every(t=>!1!==t.options.keepOrder)&&r.every(t=>Rl(t)||!t.children.length);return await async function(t,e,r,o){const i={options:t};if(Qt(t[Bt]))throw new d(ic);if(o!==dt&&!(o instanceof w))throw new d(Ms);const s=bu(o);if(s>M)throw new d(Os);const l=t[Ot],f=new c,p=t[Ut]===dt?0:t[Ut];let h=p,m=wt;const y=[],g=new u;for(const t of e){let{name:e}=t;const{size:r}=t,o=n.assign({},t.options);uu(i,o,qi)&&!e.endsWith(ct)&&(e+=ct);const s=Mc(i,e,o);({name:e}=s);const{Ht:c}=Lc(i,e,o);0==c.level||c.compressionMethod!==dt||c.Gt||await Or(be())||(c.level=0);const u=!uu(i,o,qi);if(u&&r===dt)throw new d(ic);const{Pe:w,Ht:p}=Wc(i,u,r,c,o);if(u&&!c.Gt&&pu(p.compressionMethod,p.level))throw new d(ic);const E=n.assign({},o,s.Ht,c,p,{[Ot]:l}),S=Zc(E),b=Gc(E),R={$t:S,ne:bu(S.Yt,b.Kt)};l&&Hc(R,h);const x=u?w:0;f.set(e,n.assign({},E,S,{offset:h,diskNumberStart:0,compressedSize:x}));const z=R.ne+x;y.push(z),g.add(Boolean(E.pe||E.uncompressedSize>=O||x>=O)),m=a.min(m,z),h+=z}if(f.size>1&&(l||h-m>=O&&(g.size>1||Pc(y,p,!0)!=Pc(y,p,!1)))&&!r)throw new d(ic);const{Fe:E,De:S}=jc(f);let b=uu(i,t,Zi);if(h>=O||E>=O||f.size>=M){if(!1===b)throw new d(ec);b=!0}else b===dt&&S&&(b=!0);return h-p+E+s+(b?98:Y)}(t,o,i,t.globalComment)}getChildByName(t){const e=this.children;for(let n=0;n<e.length;n++){const r=e[n];if(r.name==t)return r}}getChildren(t={}){return function(t,e){const n=[],r=[t];let o=0;for(;o<r.length;)for(const t of r[o++].children)n.push(t),e&&r.push(t);return n}(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 n=this.children;return!(await g.all(n.map(n=>n.checkPassword(t,e)))).includes(!1)}}class tl{constructor(){Fl(this)}get children(){return this.root.children}remove(t){ul(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const n of t.children)e.push(n)}t.parent=dt}move(t,e){if(t==this.root)throw new d(Ou);if(!e.directory)throw new d(Mu);if(e.isDescendantOf(t))throw new d(Uu);if(t!=e){const n=e.getChildByName(t.name);if(n){if(n!=t)throw new d(vu)}else ul(t),t.parent=e,e.children.push(t),Al(this,t)}}find(t){const e=t.split("/");let n=this.root;for(let t=0;n&&t<e.length;t++)n=n.directory?n.getChildByName(e[t]):dt;return n||(n=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),n}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,n){return this.root.addText(t,e,n)}addBlob(t,e,n){return this.root.addBlob(t,e,n)}addData64URI(t,e,n){return this.root.addData64URI(t,e,n)}addUint8Array(t,e,n){return this.root.addUint8Array(t,e,n)}addHttpContent(t,e,n){return this.root.addHttpContent(t,e,n)}addReadable(t,e,n){return this.root.addReadable(t,e,n)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return Dl(this,n=>n.importBlob(t,e))}importData64URI(t,e){return Dl(this,n=>n.importData64URI(t,e))}importUint8Array(t,e){return Dl(this,n=>n.importUint8Array(t,e))}importHttpContent(t,e){return Dl(this,n=>n.importHttpContent(t,e))}importReadable(t,e){return Dl(this,n=>n.importReadable(t,e))}importZip(t,e){return Dl(this,n=>n.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const el={FS:tl,ZipDirectoryEntry:Qu,ZipFileEntry:Ju};function nl(t,n){let r=0;const o=e.from(t);for(;o.length;){const t=o.pop();r+=n(t)||0;for(const e of t.children)o.push(e)}return r}function rl(t){return t.uncompressedSize}function ol(t,e){const{data:n}=t;return e&&n instanceof ra?n.compressedSize:t.uncompressedSize}function il(t){let e;return function(){if(e)throw new d(Bu);return e=!0,{readable:t}}}function al(t,e){return class extends Uo{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,o=n.assign({},t,r.options),{checkOverlappingEntry:i,checkOverlappingEntryOnly:a}=o,s=await async function(t,e,r){pl(e);const{passwords:o,requestPassword:i,signal:a}=e;if(delete(e=n.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!o&&!i)return t.getData(new Zo,e);const s=new u;let c;for(;;){for(const t of ml(e,r,o))if(!s.has(t.key)){const e=await f(t);if(e.done)return e.data;c=e.error}if(!i)break;if(r.Ke){await r.Ke;continue}let n;r.Ke=new g(t=>n=t);try{const e=await i(t,c);if(e===dt||null===e)break;if(typeof e!=St)throw new d(qu);const n=await f(yl(e));if(n.done)return n.data;c=n.error}finally{r.Ke=dt,n()}}if(!s.size)throw new d(la);const l=new d(an);throw l.cause=c,l;async function f(o){s.add(o.key);const i=n.assign({},e,o.options);if(t.zipCrypto){i.checkCrc32=!0;try{await t.getData(null,n.assign({},i,{checkPasswordOnly:!0}))}catch(t){if(hl(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new Zo,i);return function(t,e){const{Ye:n}=t,r=n.findIndex(t=>t.key===e.key);-1!=r&&n.splice(r,1),n.unshift(e)}(r,o),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Te(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return hl(t)||e.zipCrypto&&Te(t)&&Xu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,n.assign(o,{checkPasswordOnly:!1,checkOverlappingEntry:a||i,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=s,r.Xe=new Po(s),r.size=s.size,super.init()}readUint8Array(t,e){return this.Xe.readUint8Array(t,e)}}}function sl(t,e,n){return t.prototype?new t(e,n):t(e,n)}async function cl(t,e){const n=[],r=[t],o=new c;for(;r.length;){const t=r.pop();for(const e of t.children)e.directory?r.push(e):n.push(e)}return await g.all(n.map(async n=>{const r=n.reader=sl(n.Reader,n.data,e);o.set(n,r);try{await gi(r)}catch(e){try{e.entry=n,e.entryId=n.id,e.entryName=n.getRelativeName(t)}catch{}throw e}r.size!==dt&&(n.uncompressedSize=r.size,n.je=!1)})),o}function ul(t){if(t.parent){const e=t.parent.children;e.forEach((n,r)=>{n.id==t.id&&e.splice(r,1)})}}function ll(t){return Boolean(t)&&t.message==Yu}function fl(t,e,r){const o=r.relativePath?t.getRelativeName(e):t.getFullname(),i=t.options||{};let a={},s={};if(t.data instanceof ra){const e=bl(t,r),n=i.lastModDate===dt?r.lastModDate:i.lastModDate;({Pt:a,Zt:s}=Oc(t.data,e,n)),e&&(s.passThrough=!0)}const c=n.assign({lastModDate:t.qe},a,r,i,s,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===dt)throw new d(Vu);return{name:o,Pt:c}}function dl(t,e){const{reader:n}=t;return n&&n.size!==dt?n.size:t.je?dt:ol(t,e)}function wl(t){return te(t),t&&(gl(t.passThrough),pl(t)),t}function pl(t){const{passwords:n,requestPassword:r}=t;if(n&&(!e.isArray(n)||n.some(t=>typeof t!=St)))throw new d(ju);if(r&&typeof r!=gt)throw new d(qu)}function hl(t){return Te(t)&&t.message==an}function ml(t,e,n){const r=[],{password:o,rawPassword:i}=t;return i&&i.length&&r.push({key:i,options:{password:"",rawPassword:i}}),o&&r.push(yl(o)),r.push(...e.Ye),n&&r.push(...n.filter(t=>t).map(yl)),r}function yl(t){return{key:t,options:{password:t,rawPassword:Ku}}}function gl(t){if(oe(t)===jt)throw new d(Gu)}function El(t,e){const{uncompressedSize:r}=e;n.assign(t,e,{reader:null,passThrough:dt,uncompressedSize:r===dt?0:r,je:r===dt})}function Sl(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const n=t.indexOf(",")+1;return a.floor(.75*(e-n))}function bl(t,e){const{readerOptions:n}=e;return Boolean(!t.directory&&(t.passThrough||n&&n.passThrough))}function Rl(t){return t.directory&&null===t.data}function xl(t,e,r){return async function t(e,o,i,a=""){if(o){const c=a?a+"/"+o.name:o.name;try{if((o.isFile||o.isDirectory)&&(o=await zl(o)),"file"==o.kind){const t=await o.getFile();i.push(Il(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:n.assign({},{lastModDate:new s(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==o.kind){const n=e.addDirectory(o.name,r);i.push(n);for await(const e of o.values())await t(n,e,i,c)}}catch(t){try{t.entryName===dt&&(t.entryName=c)}catch{}throw t}}return i}(t,e,[])}async function zl(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new g((e,n)=>t.file(e,n))),t.isDirectory){e.kind="directory";const n=await async function(t){const e=[];function n(t,r,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await zl(t));n(t,r,o)}else r(e)},o)}return await new g((e,r)=>n(t.createReader(),e,r)),{[k.iterator](){let t=0;return{next(){const n={value:e[t],done:t==e.length};return t++,n}}}}}(t);e.values=()=>n}return e}function Fl(t){t.entries=[],t.Ge=0,t.root=new Qu(t)}function Dl(t,e){const{entries:r,Ge:o,root:i}=t;return Fl(t),e(t.root).catch(e=>{throw n.assign(t,{entries:r,Ge:o,root:i}),e})}function Al(t,e){const n=[e];for(;n.length;){const e=n.pop();t.entries[e.id]=e;for(const t of e.children)n.push(t)}}function Il(t,e,n,r){if(t.directory){const o=Cl(e);return o&&(e=o.pop(),t=Tl(t,o)),r?new Qu(t.fs,e,n,t):new Ju(t.fs,e,n,t)}throw new d(Lu)}function Cl(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Tl(t,e,n){return e.forEach(e=>{const r=t;if(t=t.getChildByName(e)){if(!t.directory)throw new d(vu);if(n&&(t==n||t.isDescendantOf(n)))throw new d(Uu)}else t=new Qu(r.fs,e,{data:null},r)}),t}t.BlobReader=Po,t.BlobWriter=Zo,t.Data64URIReader=Mo,t.Data64URIWriter=Lo,t.ERR_ABORTED=Jt,t.ERR_AMBIGUOUS_ARCHIVE=pa,t.ERR_ANCESTOR_ENTRY=Uu,t.ERR_BAD_FORMAT=aa,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=ua,t.ERR_CODEC_OUT_OF_MEMORY=er,t.ERR_DUPLICATED_NAME=Us,t.ERR_DUPLICATE_IMPORTED_ENTRY=_u,t.ERR_ENCRYPTED=la,t.ERR_ENCRYPTED_CENTRAL_DIRECTORY=ha,t.ERR_ENTRY_DATA_OUT_OF_BOUNDS=wa,t.ERR_ENTRY_EXISTS=vu,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=ca,t.ERR_EOCDR_NOT_FOUND=sa,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=mt,t.ERR_HTTP_RANGE=Ro,t.ERR_HTTP_RESOURCE_CHANGED=xo,t.ERR_HTTP_STATUS=bo,t.ERR_INVALID_AUTHENTICATION_CODE=sn,t.ERR_INVALID_BASE_URI=le,t.ERR_INVALID_CODEC_DEFINITION=Zn,t.ERR_INVALID_CODEC_MODULE=Vn,t.ERR_INVALID_COMMENT=Os,t.ERR_INVALID_COMMENT_TYPE=Ms,t.ERR_INVALID_COMPRESSED_DATA=tr,t.ERR_INVALID_CRC32=nr,t.ERR_INVALID_DATE=Ws,t.ERR_INVALID_DUPLICATES=Nu,t.ERR_INVALID_ENCRYPTION_STRENGTH=Hs,t.ERR_INVALID_ENTRY=gc,t.ERR_INVALID_ENTRY_COMMENT=Ls,t.ERR_INVALID_ENTRY_COMMENT_TYPE=Bs,t.ERR_INVALID_ENTRY_NAME=Ps,t.ERR_INVALID_EXTRAFIELD=qs,t.ERR_INVALID_EXTRAFIELD_DATA=Xs,t.ERR_INVALID_EXTRAFIELD_DATA_TYPE=Ks,t.ERR_INVALID_EXTRAFIELD_TYPE=Ys,t.ERR_INVALID_FILENAME_VALIDATION=ga,t.ERR_INVALID_FUNCTION_OPTION=qt,t.ERR_INVALID_GID=lc,t.ERR_INVALID_LEVEL=mc,t.ERR_INVALID_MAX_APPENDED_DATA_SIZE=Ea,t.ERR_INVALID_MAX_WORKERS=ue,t.ERR_INVALID_MSDOS_ATTRIBUTES=pc,t.ERR_INVALID_MSDOS_DATA=hc,t.ERR_INVALID_PASSWORD=an,t.ERR_INVALID_PASSWORDS=ju,t.ERR_INVALID_PASSWORD_TYPE=Kt,t.ERR_INVALID_PASS_THROUGH=Vu,t.ERR_INVALID_PASS_THROUGH_VALUE=Xt,t.ERR_INVALID_READER=sc,t.ERR_INVALID_READER_OPTIONS=$t,t.ERR_INVALID_REQUEST_PASSWORD=qu,t.ERR_INVALID_SIGNAL=Yt,t.ERR_INVALID_SIGNATURE_DATA=yc,t.ERR_INVALID_STRICTNESS=ya,t.ERR_INVALID_UID=uc,t.ERR_INVALID_UNCOMPRESSED_SIZE=Qn,t.ERR_INVALID_UNIX_EXTRA_FIELD_TYPE=dc,t.ERR_INVALID_UNIX_ID_SIZE=wc,t.ERR_INVALID_UNIX_MODE=fc,t.ERR_INVALID_URI=fe,t.ERR_INVALID_VERSION=Zs,t.ERR_ITERATOR_COMPLETED_TOO_SOON=zo,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=pt,t.ERR_OVERLAPPING_ENTRY=ht,t.ERR_PARENT_NOT_DIRECTORY=Lu,t.ERR_READABLE_CONSUMED=Bu,t.ERR_RESERVED_COMPRESSION_METHOD=Hn,t.ERR_ROOT_DIRECTORY_NOT_MOVABLE=Ou,t.ERR_SPLIT_ZIP_FILE=da,t.ERR_TARGET_NOT_DIRECTORY=Mu,t.ERR_UNDEFINED_COMPRESSION_METHOD=rc,t.ERR_UNDEFINED_CRC32=oc,t.ERR_UNDEFINED_READER=ac,t.ERR_UNDEFINED_UNCOMPRESSED_SIZE=nc,t.ERR_UNDETERMINED_SIZE=ic,t.ERR_UNSAFE_FILENAME=ma,t.ERR_UNSUPPORTED_COMPRESSION=Gn,t.ERR_UNSUPPORTED_CONTEXT=ku,t.ERR_UNSUPPORTED_CRYPTO_API=un,t.ERR_UNSUPPORTED_ENCRYPTION=fa,t.ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH=js,t.ERR_UNSUPPORTED_ENCRYPTION_USDZ=Vs,t.ERR_UNSUPPORTED_FORMAT=ec,t.ERR_UNSUPPORTED_PASS_THROUGH_VALUE=Gu,t.ERR_UNSUPPORTED_SPLIT_USDZ=Gs,t.ERR_UNSUPPORTED_UINT64=Sa,t.ERR_WORKER_STARTUP_TIMEOUT=kr,t.ERR_WRITER_NOT_INITIALIZED=Fo,t.ERR_WRITER_SIZE_NOT_WRITABLE=Do,t.ERR_ZIP_CRYPTO_LAST_MOD_DATE=Ec,t.ERR_ZIP_NOT_EMPTY=cc,t.HttpRangeReader=class extends li{constructor(t,e={}){super(t,n.assign({},e,{useRangeHeader:!0}))}},t.HttpReader=li,t.Reader=Uo,t.SplitDataReader=wi,t.SplitDataWriter=pi,t.TextReader=Ho,t.TextWriter=Go,t.Uint8ArrayReader=fi,t.Uint8ArrayWriter=di,t.VERSION="2.22.0",t.WARNING_APPENDED_DATA=Aa,t.WARNING_CLAMPED_LAST_MODIFICATION_DATE=bc,t.WARNING_COMPRESSED_PATCHED_DATA=xa,t.WARNING_COMPRESSION_UNAVAILABLE=Sc,t.WARNING_DUPLICATE_FILENAME=_a,t.WARNING_MALFORMED_EXTRA_FIELD=za,t.WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET=ka,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG=Ma,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD=La,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES=Ba,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME=Oa,t.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY=Na,t.WARNING_MISSING_ZIP64_EXTRA_FIELD=va,t.WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY=Ua,t.WARNING_PREPENDED_CENTRAL_DIRECTORY=Ca,t.WARNING_PREPENDED_DATA=Ia,t.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA=Ta,t.WARNING_UNKNOWN_VERSION=Ra,t.WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA=Fa,t.WARNING_UNSORTED_CENTRAL_DIRECTORY=ba,t.WARNING_WRAPPED_ENTRIES_COUNT=Da,t.Writer=Oo,t.ZipDirectoryEntry=Qu,t.ZipEntry=$u,t.ZipFS=tl,t.ZipFileEntry=Ju,t.ZipReader=qa,t.ZipReaderStream=Ya,t.ZipWriter=Ic,t.ZipWriterStream=class{constructor(t={}){const{readable:e,writable:n}=new z;this.readable=e,this.zipWriter=new Ic(n,t),this.Ut=new u}transform(t){const e=this.zipWriter;let n;const{readable:r,writable:o}=new z({start(t){n=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Nc(e,t)}}()}});return Uc(this,this.zipWriter.add(t,r),t=>n.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:n,writable:r}=new z({start(t){e=t}});return Uc(this,this.zipWriter.add(t,n),t=>e.error(t)),r}async close(t,n={}){const{zipWriter:r}=this,o=(await g.allSettled(e.from(this.Ut))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(o.length){const[t]=o;try{t.entryErrors=o}catch{}throw await Nc(r,t),t}try{return await r.close(t,n)}catch(t){throw await Nc(r,t),t}}},t.configure=function(t){n.assign(Se,ze(De(t)))},t.createBlobTempStream=function(t={}){const{thresholdBytes:e=Iu}=t;return function(){const t=[];let n,r,o,i=0,a=!1;const s=new D({async write(o){a?await n.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new z;r=Wn(e.readable),n=e.writable.getWriter(),a=!0;for(const e of t)await n.write(e);t.length=0}())},async close(){n&&(await n.close(),n=null)}});let c=0;return{writable:s,readable:new F({async pull(e){if(a){if(!o){const t=await r;o=t.stream().getReader()}const{value:t,done:n}=await o.read();n?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(n){try{await n.abort()}catch{}n=null}r&&(r.catch(()=>{}),r=null),t.length=0}}}},t.createOPFSTempStream=function(t={}){const{thresholdBytes:n=Du,directoryName:r=Au,getDirectory:o=()=>C.storage.getDirectory()}=t;let i;function a(){return i||(i=g.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,o,i,s,c=0,u=!1;const l=new D({async write(s){u?await i.write(s):(t.push(s),c+=s.length,c>n&&await async function(){const n=await a();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join(""),o=await n.getFileHandle(r,{create:!0}),i=(await o.createWritable()).getWriter(),u=!0;for(const e of t)await i.write(e);t.length=0}())},async close(){i&&(await i.close(),i=null)}});let f=0;return{writable:l,readable:new F({async pull(e){if(u){if(!s){const t=await o.getFile();s=t.stream().getReader()}const{value:t,done:n}=await s.read();n?e.close():e.enqueue(t)}else f<t.length?e.enqueue(t[f++]):e.close()},async cancel(t){s&&await s.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(i){try{await i.close()}catch{}i=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}o=r=null}t.length=0}}}},t.createSyncAccessHandleTempStream=function(t={}){const{thresholdBytes:n=Cu,directoryName:r=Tu,getDirectory:o}=t;if(!(o||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new d(ku);const i=o||(()=>C.storage.getDirectory());let s;function c(){return s||(s=g.resolve(i()).then(t=>t.getDirectoryHandle(r,{create:!0}))),s}return function(){const t=[];let r,o,i=0,s=!1,u=0,l=0;const f=new D({async write(a){s?(o.write(a,{at:u}),u+=a.length):(t.push(a),i+=a.length,i>n&&await async function(){const n=await c();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join("");const i=await n.getFileHandle(r,{create:!0});o=await i.createSyncAccessHandle(),s=!0;for(const e of t)o.write(e,{at:u}),u+=e.length;t.length=0}())},close(){o&&o.flush()}});let d=0;return{writable:f,readable:new F({pull(e){if(s){const t=u-l;if(t<=0)return void e.close();const n=new w(a.min(524288,t)),r=o.read(n,{at:l});r?(l+=r,e.enqueue(n.subarray(0,r))):e.close()}else d<t.length?e.enqueue(t[d++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(o){try{o.close()}catch{}o=null}if(r){try{const t=await c();await t.removeEntry(r)}catch{}r=null}t.length=0}}}},t.fs=el,t.getMimeType=function(){return"application/octet-stream"},t.getRegisteredCodecs=Xn,t.getSupportedCompressionMethods=function(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:n,DecompressionStreamFallback:r}=be(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Fu(n,rr)||Fu(t,rr)||Fu(t,ir),decompression:Fu(r,rr)||Fu(e,rr)||Fu(e,ir),registered:!1},{compressionMethod:9,compression:!1,decompression:Fu(r,or)||Fu(e,or),registered:!1}];for(const t of Xn()){const e=$n(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==gt:dt,decompression:e?typeof e.DecompressionStream==gt:dt,registered:!0})}return o},t.isZipFile=Ka,t.registerCodec=function(t={}){const{compressionMethod:e,format:n,codecURI:r,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!o.isInteger(e)||e<0||e>M||typeof n!=St||!n.length)throw new d(Zn);if(jn.includes(e))throw new d(Hn);const c=typeof i==gt||typeof a==gt;if(!(c||typeof r==St&&r.length))throw new d(Zn);qn.set(e,{compressionMethod:e,format:n,codecURI:r,versionNeeded:s}),c&&Jn(n,{CompressionStream:i,DecompressionStream:a})},t.resetConfiguration=function(){for(const t of Ee)delete Se[t];n.assign(Se,we)},t.terminateWorkers=async function(){await g.allSettled([wo(),...ro.map(t=>(mo(t),t.terminate()))]),vr=dt,_r=!1},t.unregisterCodec=function(t){const e=qn.get(t);if(e){let n;qn.delete(t),qn.forEach(t=>n=n||t.format==e.format),n||Yn.delete(e.format)}}});
|