@zip.js/zip.js 2.8.61 → 2.10.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/README.md +40 -0
- package/deno.json +1 -1
- package/dist/zip-core-external.js +15 -15
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +15 -14
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +168 -57
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +170 -56
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +168 -57
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +170 -56
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +170 -56
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +15 -14
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +15 -14
- package/dist/zip-native.min.js +1 -1
- package/dist/zip.js +15 -14
- package/dist/zip.min.js +1 -1
- package/index-native.cjs +170 -56
- package/index-native.min.js +1 -1
- package/index.cjs +170 -56
- package/index.d.cts +104 -9
- package/index.d.ts +104 -9
- package/index.min.js +1 -1
- package/lib/core/streams/codecs/crc32.js +1 -1
- package/lib/core/util/decode-cp437.js +5 -12
- package/lib/core/version.js +1 -1
- package/lib/core/zip-fs.js +155 -44
- package/lib/core/zip-reader.js +7 -0
- package/lib/zip-core-reader.js +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=4294967295,e=65535,r=255,n=67324752,o=134695760,a=o,i=84233040,s=33639248,c=101010256,l=101075792,u=117853008,f=46,w=22,d=20,m=56,p=21589,h=2048,y=61440,E=16384,b=2048,S=1024,A="/",g=30,R=new Date(2107,11,31,23,59,58),x=new Date(1980,0,1),D=void 0,F=1/0,z="undefined",T="function",U="string",I=new Uint8Array,O="password",k="rawPassword",C="passThrough",N="signal",M="useWebWorkers",_="useCompressionStream",v="transferStreams",L="preventClose",B="dataDescriptor",P="offset",W="usdz",j="maxAppendedDataSize",V="filename",Z="comment",H="strict",G="balanced",K="tolerant",q="Invalid option (must be a function)",Y="Invalid signal (must be an AbortSignal instance)",X="Invalid password (password must be a string, rawPassword must be a Uint8Array)";function J(t){if(t&&typeof t!=T)throw new Error(q);return t}function Q(t){if(t&&(typeof t.addEventListener!=T||"boolean"!=typeof t.aborted))throw new Error(Y);return t||D}function $(t,e){if(t&&typeof t!=U||e&&!(e instanceof Uint8Array))throw new Error(X)}function tt(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function et(t,e,r){t!==D&&tt(t,e,r)}function rt(t){return typeof t==U&&t.trim()?Number(t):t}const nt="Invalid maxWorkers (must be an integer greater than 0)";let ot=2;try{typeof navigator!=z&&navigator.hardwareConcurrency&&(ot=navigator.hardwareConcurrency)}catch{}const at={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:ot,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=z&&CompressionStream,DecompressionStream:typeof DecompressionStream!=z&&DecompressionStream},it="maxWorkers",st=["chunkSize",it,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],ct=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],lt=["baseURI","wasmURI","workerURI","useCompressionStream","useWebWorkers","transferStreams",...st,...ct],ut={...at};function ft(){return ut}function wt(t){return dt(t.chunkSize)}function dt(t){return t=rt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function mt(t){Object.assign(ut,pt(yt(t)))}function pt(t){const e={};for(const r of lt){const n=t[r];n!==D&&(e[r]=ht(r,n))}return e}function ht(t,e){if(st.includes(t)){if(e=rt(e),t==it&&(!Number.isInteger(e)||e<1))throw new Error(nt)}else ct.includes(t)&&J(e);return e}function yt(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===D&&r===D)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===D&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===D&&(n.DecompressionStreamFallback=r),n}function Et(t){const e=pt(yt(t));Object.assign(at,e),Object.assign(ut,e)}function bt(){for(const t of lt)delete ut[t];Object.assign(ut,at)}function St(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function At(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function gt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const Rt=[[],[],[],[],[],[],[],[]];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;Rt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Rt[e-1][t];Rt[e][t]=r>>>8^Rt[0][255&r]}const[xt,Dt,Ft,zt,Tt,Ut,It,Ot]=Rt;class kt{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),a=r-8;for(;n<=a;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=Ot[255&t]^It[t>>>8&255]^Ut[t>>>16&255]^Tt[t>>>24&255]^zt[255&r]^Ft[r>>>8&255]^Dt[r>>>16&255]^xt[r>>>24&255]}}for(;n<r;n++)e=e>>>8^xt[255&(e^t[n])];this.o=e}get(){return~this.o}}class Ct extends TransformStream{constructor(){let t;const e=new kt;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function Nt(t){if(typeof TextEncoder==z){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const Mt={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const r=t[t.length-1],n=Mt.l(r);return 32===n?t.concat(e):Mt.m(e,n,0|r,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const r=t[e-1];return 32*(e-1)+Mt.l(r)},h(t,e){if(32*t.length<e)return t;const r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=Mt.S(e,t[r-1]&2147483648>>e-1,1)),t},S:(t,e,r)=>32===t?e:(r?0|e:e<<32-t)+1099511627776*t,l:t=>Math.round(t/1099511627776)||32,m(t,e,r,n){for(void 0===n&&(n=[]);e>=32;e-=32)n.push(r),r=0;if(0===e)return n.concat(t);for(let o=0;o<t.length;o++)n.push(r|t[o]>>>e),r=t[o]<<32-e;const o=t.length?t[t.length-1]:0,a=Mt.l(o);return n.push(Mt.S(e+a&31,e+a>32?r:n.pop(),1)),n}},_t={bytes:{A(t){const e=Mt.bitLength(t)/8,r=new Uint8Array(e);let n;for(let o=0;o<e;o++)3&o||(n=t[o/4]),r[o]=n>>>24,n<<=8;return r},R(t){const e=[];let r,n=0;for(r=0;r<t.length;r++)n=n<<8|t[r],3&~r||(e.push(n),n=0);return 3&r&&e.push(Mt.S(8*(3&r),n)),e}}},vt=class{constructor(t){const e=this;e.blockSize=512,e.D=[1732584193,4023233417,2562383102,271733878,3285377520],e.F=[1518500249,1859775393,2400959708,3395469782],t?(e.T=t.T.slice(0),e.U=t.U.slice(0),e.I=t.I):e.reset()}reset(){const t=this;return t.T=t.D.slice(0),t.U=[],t.I=0,t}update(t){const e=this;"string"==typeof t&&(t=_t.O.R(t));const r=e.U=Mt.concat(e.U,t),n=e.I,o=e.I=n+Mt.bitLength(t);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const a=new Uint32Array(r);let i=0;for(let t=e.blockSize+n-(e.blockSize+n&e.blockSize-1);t<=o;t+=e.blockSize)e.C(a.subarray(16*i,16*(i+1))),i+=1;return r.splice(0,16*i),e}N(){const t=this;let e=t.U;const r=t.T;e=Mt.concat(e,[Mt.S(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t.I/4294967296)),e.push(0|t.I);e.length;)t.C(e.splice(0,16));return t.reset(),r}M(t,e,r,n){return t<=19?e&r|~e&n:t<=39?e^r^n:t<=59?e&r|e&n|r&n:t<=79?e^r^n:void 0}_(t,e){return e<<t|e>>>32-t}C(t){const e=this,r=e.T,n=Array(80);for(let e=0;e<16;e++)n[e]=t[e];let o=r[0],a=r[1],i=r[2],s=r[3],c=r[4];for(let t=0;t<=79;t++){t>=16&&(n[t]=e._(1,n[t-3]^n[t-8]^n[t-14]^n[t-16]));const r=e._(5,o)+e.M(t,a,i,s)+c+n[t]+e.F[Math.floor(t/20)]|0;c=s,s=i,i=e._(30,a),a=o,o=r}r[0]=r[0]+o|0,r[1]=r[1]+a|0,r[2]=r[2]+i|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0}},Lt={importKey:t=>new Lt.v(_t.bytes.R(t)),L(t,e,r,n){if(r=r||1e4,n<0||r<0)throw new Error("invalid params to pbkdf2");const o=1+(n>>5)<<2;let a,i,s,c,l;const u=new ArrayBuffer(o),f=new DataView(u);let w=0;const d=Mt;for(e=_t.bytes.R(e),l=1;w<(o||1);l++){for(a=i=t.encrypt(d.concat(e,[l])),s=1;s<r;s++)for(i=t.encrypt(i),c=0;c<i.length;c++)a[c]^=i[c];for(s=0;w<(o||1)&&s<a.length;s++)f.setInt32(w,a[s]),w+=4}return u.slice(0,n/8)},v:class{constructor(t){const e=this,r=e.B=vt,n=[[],[]];e.P=[new r,new r];const o=e.P[0].blockSize/32;t.length>o&&(t=(new r).update(t).N());for(let e=0;e<o;e++)n[0][e]=909522486^t[e],n[1][e]=1549556828^t[e];e.P[0].update(n[0]),e.P[1].update(n[1]),e.W=new r(e.P[0])}reset(){const t=this;t.W=new t.B(t.P[0]),t.j=!1}update(t){this.j=!0,this.W.update(t)}digest(){const t=this,e=t.W.N(),r=new t.B(t.P[1]).update(e).N();return t.reset(),r}encrypt(t){if(this.j)throw new Error("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},Bt=typeof crypto!=z&&typeof crypto.getRandomValues==T,Pt="Invalid password",Wt="Invalid signature",jt=Wt,Vt="zipjs-abort-check-password",Zt="Crypto API not supported";function Ht(t){if(Bt)return crypto.getRandomValues(t);throw new Error(Zt)}const Gt=16,Kt={name:"PBKDF2"},qt=Object.assign({hash:{name:"HMAC"}},Kt),Yt=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},Kt),Xt=["deriveBits"],Jt=[8,12,16],Qt=[16,24,32],$t=10,te=[0,0,0,0],ee=typeof crypto!=z,re=ee&&crypto.subtle,ne=ee&&typeof re!=z,oe=_t.bytes,ae=class{constructor(t){const e=this;e.V=[[[],[],[],[],[]],[[],[],[],[],[]]],e.V[0][0][0]||e.Z();const r=e.V[0][4],n=e.V[1],o=t.length;let a,i,s,c=1;if(4!==o&&6!==o&&8!==o)throw new Error("invalid aes key size");for(e.F=[i=t.slice(0),s=[]],a=o;a<4*o+28;a++){let t=i[a-1];(a%o===0||8===o&&a%o===4)&&(t=r[t>>>24]<<24^r[t>>16&255]<<16^r[t>>8&255]<<8^r[255&t],a%o===0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),i[a]=i[a-o]^t}for(let t=0;a;t++,a--){const e=i[3&t?a:a-4];s[t]=a<=4||t<4?e:n[0][r[e>>>24]]^n[1][r[e>>16&255]]^n[2][r[e>>8&255]]^n[3][r[255&e]]}}encrypt(t){return this.H(t,0)}decrypt(t){return this.H(t,1)}Z(){const t=this.V[0],e=this.V[1],r=t[4],n=e[4],o=[],a=[];let i,s,c,l;for(let t=0;t<256;t++)a[(o[t]=t<<1^283*(t>>7))^t]=t;for(let u=i=0;!r[u];u^=s||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,r[u]=a,n[a]=u,l=o[c=o[s=o[u]]];let f=16843009*l^65537*c^257*s^16843008*u,w=257*o[a]^16843008*a;for(let r=0;r<4;r++)t[r][u]=w=w<<24^w>>>8,e[r][a]=f=f<<24^f>>>8}for(let r=0;r<5;r++)t[r]=t[r].slice(0),e[r]=e[r].slice(0)}H(t,e){if(4!==t.length)throw new Error("invalid aes block size");const r=this.F[e],n=r.length/4-2,o=[0,0,0,0],a=this.V[e],i=a[0],s=a[1],c=a[2],l=a[3],u=a[4];let f,w,d,m=t[0]^r[0],p=t[e?3:1]^r[1],h=t[2]^r[2],y=t[e?1:3]^r[3],E=4;for(let t=0;t<n;t++)f=i[m>>>24]^s[p>>16&255]^c[h>>8&255]^l[255&y]^r[E],w=i[p>>>24]^s[h>>16&255]^c[y>>8&255]^l[255&m]^r[E+1],d=i[h>>>24]^s[y>>16&255]^c[m>>8&255]^l[255&p]^r[E+2],y=i[y>>>24]^s[m>>16&255]^c[p>>8&255]^l[255&h]^r[E+3],E+=4,m=f,p=w,h=d;for(let t=0;t<4;t++)o[e?3&-t:t]=u[m>>>24]<<24^u[p>>16&255]<<16^u[h>>8&255]<<8^u[255&y]^r[E++],f=m,m=p,p=h,h=y,y=f;return o}},ie=class{constructor(t,e){this.G=t,this.K=e,this.Y=e}reset(){this.Y=this.K}update(t){return this.X(this.G,t,this.Y)}J(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,r=t>>8&255,n=255&t;255===e?(e=0,255===r?(r=0,255===n?n=0:++n):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=n}return t}$(t){0===(t[0]=this.J(t[0]))&&(t[1]=this.J(t[1]))}X(t,e,r){let n;if(!(n=e.length))return[];const o=Mt.bitLength(e);for(let o=0;o<n;o+=4){this.$(r);const n=t.encrypt(r);e[o]^=n[0],e[o+1]^=n[1],e[o+2]^=n[2],e[o+3]^=n[3]}return Mt.h(e,o)}},se=Lt.v;let ce=ee&&ne&&typeof re.importKey==T,le=ee&&ne&&typeof re.deriveBits==T;class ue extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){super({start(){we(this,t,e,r)},async transform(t,e){const r=this,{password:o,strength:a,et:i,ready:s}=r;o?(await async function(t,e,r,n){const o=await me(t,e,r,he(n,0,Jt[e])),a=he(n,Jt[e]);if(o[0]!=a[0]||o[1]!=a[1])throw new Error(Pt)}(r,a,o,he(t,0,Jt[a]+2)),t=he(t,Jt[a]+2),n?e.error(new Error(Vt)):i()):await s;const c=new Uint8Array(t.length-$t-(t.length-$t)%Gt);e.enqueue(de(r,t,c,0,$t,!0))},async flush(t){const{nt:e,ot:r,it:n,ready:a}=this;if(r&&e){await a;const i=he(n,0,n.length-$t),s=he(n,n.length-$t);let c=I;if(i.length){const t=Ee(oe,i);r.update(t);const n=e.update(t);c=ye(oe,n)}const l=he(ye(oe,r.digest()),0,$t);let u=n.length<$t?1:0;for(let t=0;t<$t;t++)u|=l[t]^s[t];if(u&&o)throw new Error(jt);t.enqueue(c)}}})}}class fe extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){super({start(){we(this,t,e,r)},async transform(t,e){const r=this,{password:n,strength:o,et:a,ready:i}=r;let s=I;n?(s=await async function(t,e,r){const n=Ht(new Uint8Array(Jt[e]));return St(n,await me(t,e,r,n))}(r,o,n),a()):await i;const c=new Uint8Array(s.length+t.length-t.length%Gt);c.set(s,0),e.enqueue(de(r,t,c,s.length,0))},async flush(t){const{nt:e,ot:r,it:n,ready:o}=this;if(r&&e){await o;let a=I;if(n.length){const t=e.update(Ee(oe,n));r.update(t),a=ye(oe,t)}const i=ye(oe,r.digest()).slice(0,$t);t.enqueue(St(a,i))}}})}}function we(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.et=e),password:pe(e,r),strength:n-1,it:I})}function de(t,e,r,n,o,a){const{nt:i,ot:s,it:c}=t;c.length&&(e=St(c,e));const l=e.length-o;let u;for(r=function(t,e){if(e&&e>t.length){const r=t;(t=new Uint8Array(e)).set(r,0)}return t}(r,n+(l-l%Gt)),u=0;u<=l-Gt;u+=Gt){const t=Ee(oe,he(e,u,u+Gt));a&&s.update(t);const o=i.update(t);a||s.update(o),r.set(ye(oe,o),u+n)}return t.it=he(e,u),r}async function me(t,e,r,n){t.password=null;const o=await async function(t,e,r,n,o){if(!ce)return Lt.importKey(e);try{return await re.importKey("raw",e,r,!1,o)}catch{return ce=!1,Lt.importKey(e)}}(0,r,qt,0,Xt),a=await async function(t,e,r){if(!le)return Lt.L(e,t.salt,Yt.iterations,r);try{return await re.deriveBits(t,e,r)}catch{return le=!1,Lt.L(e,t.salt,Yt.iterations,r)}}(Object.assign({salt:n},Yt),o,8*(2*Qt[e]+2)),i=new Uint8Array(a),s=Ee(oe,he(i,0,Qt[e])),c=Ee(oe,he(i,Qt[e],2*Qt[e])),l=he(i,2*Qt[e]);return Object.assign(t,{keys:{key:s,st:c,passwordVerification:l},nt:new ie(new ae(s),Array.from(te)),ot:new se(c)}),l}function pe(t,e){return e===D?Nt(t):e}function he(t,e,r){return t.subarray(e,r)}function ye(t,e){return t.A(e)}function Ee(t,e){return t.R(e)}class be extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){Ae(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=ge(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(Pt);t=t.subarray(12)}n?e.error(new Error(Vt)):e.enqueue(ge(r,t))}})}}class Se extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){Ae(this,t,e,r)},transform(t,e){const r=this;let n,o;if(r.password||r.rawPassword){r.password=r.rawPassword=null;const e=Ht(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Re(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Re(r,t),o),e.enqueue(n)}})}}function Ae(t,e,r,n){Object.assign(t,{password:e,rawPassword:r,passwordVerification:n}),function(t,e,r){const n=[305419896,591751049,878082192];if(Object.assign(t,{keys:n,ct:new kt(n[0]),lt:new kt(n[2])}),r)for(let e=0;e<r.length;e++)xe(t,r[e]);else for(let r=0;r<e.length;r++)xe(t,e.charCodeAt(r))}(t,e,r)}function ge(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=De(t)^e[n],xe(t,r[n]);return r}function Re(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=De(t)^e[n],xe(t,e[n]);return r}function xe(t,e){let[,r]=t.keys;t.ct.append([e]);const n=~t.ct.get();r=ze(Math.imul(ze(r+Fe(n)),134775813)+1),t.lt.append([r>>>24]);const o=~t.lt.get();t.keys=[n,r,o]}function De(t){const e=2|t.keys[2];return Fe(Math.imul(e,1^e)>>>8)}function Fe(t){return 255&t}function ze(t){return 4294967295&t}function Te(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}function Ue(t,e){t=Te(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=T||new Blob([]).stream()instanceof ReadableStream)return new Response(t).blob().then(t=>e?new Blob([t],r):t);const n=[];return t.pipeTo(new WritableStream({write(t){n.push(t)}})).then(()=>new Blob(n,r))}function Ie(t){if(t instanceof WritableStream)return t;const e=t.getWriter();return new WritableStream({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Oe="Invalid codec definition",ke="Reserved compression method",Ce="Invalid codec module",Ne=[0,8,9,99],Me=new Map,_e=new Map;function ve(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:a,DecompressionStream:i,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=U||!n.length)throw new Error(Oe);if(Ne.includes(r))throw new Error(ke);const c=typeof a==T||typeof i==T;if(!(c||typeof o==U&&o.length))throw new Error(Oe);Me.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&je(n,{CompressionStream:a,DecompressionStream:i})}function Le(t){const e=Me.get(t);if(e){let r;Me.delete(t),Me.forEach(t=>r=r||t.format==e.format),r||_e.delete(e.format)}}function Be(t){return Me.get(t)}function Pe(){return Array.from(Me.values(),t=>Object.assign({},t,_e.get(t.format)))}function We(t){return _e.get(t)}function je(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=T&&typeof n!=T)throw new Error(Ce);_e.set(t,{CompressionStream:r,DecompressionStream:n})}const Ve="Invalid uncompressed size",Ze="Invalid compressed data",He=Wt,Ge="deflate-raw",Ke="deflate64-raw",qe="gzip",Ye=[31,139,8];class Xe extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:a,useCompressionStream:i,zipCrypto:s,computeCrc32:c,level:l,deflate64:u,format:f,compressionMethod:w,inputSize:d}=t,m=this;let p,h,y,E=super.readable;const b=f&&We(f),S=c&&o&&!u&&!b&&(!a||s)&&Boolean(i&&n);if(a&&!s||!c||S||(p=new Ct,E=ar(E,p)),o)if(b)E=ir(E,nr(b.CompressionStream,f,{level:l,chunkSize:e,compressionMethod:w,uncompressedSize:d}));else if(S)y=new Je,E=ir(E,new n(qe)),E=ar(E,y);else try{E=or(E,i,{level:l,chunkSize:e},n,r)}catch(t){let e;try{e=new n(qe)}catch{throw t}E=ir(E,e),E=ar(E,new Je)}a&&(s?E=ar(E,new Se(t)):(h=new fe(t),E=ar(E,h))),rr(m,E,()=>{a&&!s||!c||(m.crc32=S?y.crc32:new DataView(p.value.buffer).getUint32(0))})}}class Je extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=St(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(St(r.subarray(0,i),t.subarray(0,a-i))),r=St(r.subarray(i),t.subarray(a-i))},flush(){const e=gt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Qe extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:a,checkCrc32:i,crc32:s,compressed:c,useCompressionStream:l,deflate64:u,format:f,compressionMethod:w,rawBitFlag:d,outputSize:m}=t;let p,h,y=super.readable;if(a&&(o?y=ar(y,new be(t)):(h=new ue(t),y=ar(y,h))),c){const t=f&&We(f);if(t)y=ir(y,nr(t.DecompressionStream,f,{chunkSize:e,compressionMethod:w,rawBitFlag:d,uncompressedSize:m}));else try{y=or(y,l,{chunkSize:e,deflate64:u},n,r)}catch(t){if(u||m===D)throw t;let e;try{e=new n(qe)}catch{throw t}y=function(t,e,r){const n=new kt;let o,a,i,s=0,c=!1;const l=new Promise((t,e)=>{a=t,i=e});l.catch(()=>{}),r||a();const u=new TransformStream({start(t){const e=new Uint8Array(10);e.set(Ye),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){c=!0,w();try{await l}finally{d()}const e=new Uint8Array(8),o=gt(e);o.setUint32(0,n.get(),!0),o.setUint32(4,r,!0),t.enqueue(e)},cancel(t){i(t)}}),f=new TransformStream({transform(t,e){n.append(t),s+=t.length,s>=r?a():c&&w(),e.enqueue(t)},cancel(t){i(t)}});return t=ar(t,u),ar(t=ir(t,e),f);function w(){d(),o=setTimeout(()=>i(new Error(Ve)),5e3)}function d(){clearTimeout(o)}}(y,e,m)}y=function(t){const e=t.getReader();return new ReadableStream({async pull(t){let r;try{r=await e.read()}catch(t){if(t&&t.message)throw t;const e=new Error(Ze);throw e.cause=t,e}const{value:n,done:o}=r;o?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}(y)}i&&(p=new Ct,y=ar(y,p)),rr(this,y,()=>{if(i){const t=new DataView(p.value.buffer);if(s!=t.getUint32(0,!1))throw new Error(He)}})}}const $e=new Map;function tr(t,e){if(!t)return!1;let r=$e.get(t);r||(r=new Map,$e.set(t,r));let n=r.get(e);if(n===D){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function er(t){return tr(t,Ge)}function rr(t,e,r){e=ar(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function nr(t,e,r){if(!t)throw new Error("Compression method not supported");return new t(e,r)}function or(t,e,r,n,o){const a=e&&n?n:o||n,i=r.deflate64?Ke:Ge;let s;try{s=new a(i,r)}catch(t){if(!e||!o||a==o)throw t;s=new o(i,r)}return ir(t,s)}function ar(t,e){return Te(t).pipeThrough(e)}function ir(t,e){const r=e.writable.getWriter(),n=t.getReader();return async function(){try{for(;;){await r.ready;const t=await n.read();if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await async function(t,e){try{await t.abort(e)}catch{}}(r,t),await async function(t,e){try{await t.cancel(e)}catch{}}(n,t)}}(),e.readable}const sr="data",cr="deflate",lr="inflate";class ur extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(cr)?o=Xe:n.startsWith(lr)&&(o=Qe),r.outputSize=0;let a=0;const i=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:a})}}),l=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==D&&r.outputSize>t.outputSize))throw new Error(Ve)},flush(){const{crc32:t}=i;Object.assign(r,{crc32:t,inputSize:a})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(i).pipeThrough(l)})}}class fr extends TransformStream{constructor(t){const e=[];let r=0;function n(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],a=t-o;r.length<=a?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,a),o),e[0]=r.subarray(a),o+=a)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=65536),super({transform(o,a){for(e.push(o),r+=o.length;r>t;)a.enqueue(n())},flush(t){r&&t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r))}})}}const wr="Worker startup timeout";let dr,mr,pr,hr=()=>{};function yr(t){t.createWorker?mr=!0:dr=!1}class Er{constructor(t,{readable:e,writable:r},{options:n,config:o,ut:a,useWebWorkers:i,transferStreams:s,workerURI:c,createWorker:l},u){const{signal:f}=a;return mr&&(l=D),Object.assign(t,{ft:!0,wt:(t.wt||0)+1,readable:e.pipeThrough(new fr(wt(o))).pipeThrough(new br(a),{signal:f}),writable:r,options:Object.assign({},n),workerURI:c,createWorker:l,transferStreams:s,terminate:()=>new Promise(e=>{const{ht:r,ft:n}=t;r?(n?t.yt=e:(r.terminate(),e()),t.Et=null):e()}),bt(){if(t.ft){const{yt:e}=t;e&&(t.yt=null,t.St=!0,t.ht.terminate(),e()),t.ft=!1,u(t)}}}),dr===D&&(dr=typeof Worker!=z),(i&&pr&&(dr&&c||l)?pr:Ar)(t,o)}}class br extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await Sr(t,r)},async transform(t,n){o+=t.length,e&&await Sr(e,o,r),n.enqueue(t)},async flush(){n&&await Sr(n,o)}})}}async function Sr(t,...e){try{await t(...e)}catch{}}function Ar(t,e){return{run:()=>gr(t,e)}}async function gr({options:t,readable:e,writable:r,bt:n},o){let a;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(cr),r=e?o.CompressionStreamFallback:o.DecompressionStreamFallback,n=e?o.CompressionStream:o.DecompressionStream;if(t.useCompressionStream){if(r&&r.At&&!er(n))try{await hr(o)}catch{}}else try{await hr(o)}catch{r&&!r.At||(t.useCompressionStream=!0)}}a=new ur(t,o),await e.pipeThrough(a).pipeThrough(new fr(wt(o))).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:i,outputSize:s}=a;return{crc32:n,inputSize:i,outputSize:s}}catch(t){throw a&&(t.outputSize=a.outputSize),t}finally{n()}}const Rr={type:"module"},xr="error";let Dr,Fr,zr,Tr=!0;try{Tr=typeof structuredClone==T&&structuredClone(new DOMException("","AbortError")).code!==D}catch{}var Ur;function Ir(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Or(t){const{ht:e}=t;if(e)try{e.terminate()}catch{}t.Et=null}function kr(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if(Fr===D||Dr!==t){const a=typeof t==T;s=a?t(o):t;const l=s.startsWith("data:"),u=s.startsWith("blob:");if(l||u){n===D&&(n=!1),n&&(c=Rr);try{i=new Worker(s,c)}catch(o){if(u)try{URL.revokeObjectURL(s)}catch{}if(a&&u)return kr(t,e,r,n,!1);if(n)throw o;return kr(t,e,r,!0,!1)}}else{n===D&&(n=!0),n&&(c=Rr);try{s=new URL(s,e)}catch{}try{i=new Worker(s,c)}catch(a){if(n)return kr(t,e,r,!1,o);throw a}}Dr=t,Fr=s,zr=c}else i=new Worker(Fr,zr);return i.addEventListener("message",t=>{r.gt=!0,Cr(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i}=t,{reader:s,writer:c,Rt:l,xt:u,bt:f,wt:w}=e,d=()=>e.wt!=w;try{if(i){const{message:t,stack:e,code:r,name:n,outputSize:o,cause:a,codecImportFailed:s}=i,c=new Error(t);Object.assign(c,{stack:e,code:r,name:n,outputSize:o}),a&&(c.cause=Object.assign(new Error(a.message),{name:a.name})),s&&(c.codecImportFailed=!0),m(c)}else{if("pull"==r){const{value:t,done:r}=await s.read();d()||Mr({type:sr,value:t,done:r,messageId:o},e)}r==sr&&(await c.ready,await c.write(new Uint8Array(n)),d()||Mr({type:"ack",messageId:o},e)),"close"==r&&m(null,a)}}catch(i){d()||(Or(e),m(i))}function m(t,e){d()||(t?u(t):l(e),c&&c.releaseLock(),t&&t.codecImportFailed||f())}}(t,r)}),i.addEventListener(xr,t=>Nr(t,r)),i.addEventListener("messageerror",t=>Nr(t,r)),i}function Cr(t){const{Dt:e}=t;e&&(clearTimeout(e),t.Dt=null)}function Nr(t,e){t.preventDefault&&t.preventDefault(),Cr(e);const{gt:r,xt:n,writer:o,bt:a}=e;Or(e),r||(e.ht=null);let i=t.error||new Error(t.message||xr);r||(i=Object.assign(new Error(i.message||xr),{Ft:!0}),e.zt=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function Mr(t,{ht:e,writer:r,transferStreams:n,gt:o}){try{const{value:r,readable:a,writable:i}=t,s=[];if(r&&(t.value=At(r),s.push(t.value.buffer)),n&&Tr&&o?(a&&s.push(a),i&&s.push(i)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{Tr=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}Ur=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.Et){let i;typeof a==T&&(a=a());try{i=kr(t.workerURI,r,t)}catch{return yr(t),Ar(t,e)}Object.assign(t,{ht:i,gt:!1,St:!1,zt:null,Et:{run:async()=>{try{return await async function(t,e){if(!t.ht){const{zt:e}=t;t.zt=null;const r=e||new Error(wr);throw r.Ft=!0,r}let r,n;const o=new Promise((t,e)=>{r=t,n=e});Object.assign(t,{reader:null,writer:null,Rt:r,xt:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,Tt:l}=function(t){const e=new AbortController,{writable:r,readable:n}=new TransformStream,o=n.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:e.signal});return o.catch(()=>{}),{writable:r,closed:o,Tt:()=>e.abort()}}(t.writable);let u;try{u=Mr({type:"start",options:i,config:e,readable:a,writable:s},t)}catch(e){l();try{await c}catch{}throw t.bt(),e}u||Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t.gt&&Number.isFinite(f)&&f>=0&&(t.Dt=setTimeout(()=>function(t){if(t.Dt=null,t.gt)return;const{xt:e,writer:r}=t;if(Or(t),t.ht=null,e){const t=new Error(wr);t.Ft=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await w(),await c,t}catch(t){await w(),l();try{await c}catch{}throw t}async function w(){if(!u&&!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:a,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.Ft)return yr(t),Ir(t),gr(t,e);if(r&&r.codecImportFailed){if(t.reader)return Ir(t),gr(t,e);t.bt()}throw r}}}})}return t.Et},pr=Ur;let _r=[];const vr=[];let Lr,Br,Pr=0;async function Wr(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:a,useCompressionStream:i,compressed:s,checkCrc32:c,computeCrc32:l,encrypted:u,format:f,codecURI:w}=r,{workerURI:d,createWorker:m,maxWorkers:p}=n;f&&(w&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(w,n.baseURI)),await async function(t,e){!_e.has(t)&&e&&je(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===D&&n.transferStreams);const h=!(s||c||l||u),y=f===D||Boolean(r.codecURI);return e.useWebWorkers=!h&&y&&(a||a===D&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&d?d:D,e.createWorker=e.useWebWorkers&&m?m:D,r.useCompressionStream=i||i===D&&n.useCompressionStream,(await async function(){const r=_r.find(t=>!t.ft);if(r)return Gr(r),new Er(r,t,e,E);if(_r.length<p){const r={Ut:Pr};return Pr++,_r.push(r),new Er(r,t,e,E)}return new Promise(r=>{vr.push({resolve:r,stream:t,It:e}),Br=n.workerStarvationTimeout,jr()})}()).run();function E(t){if(Vr(),vr.length){const[{resolve:e,stream:r,It:n}]=vr.splice(0,1);e(new Er(t,r,n,E)),jr()}else t.ht?(Gr(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.St?t.St=!1:t.Ot=setTimeout(async()=>{_r=_r.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):_r=_r.filter(e=>e!=t)}}function jr(){!Lr&&vr.length&&Number.isFinite(Br)&&Br>=0&&(Lr=setTimeout(Zr,Br))}function Vr(){Lr&&(clearTimeout(Lr),Lr=null)}function Zr(){if(Lr=null,vr.length){const[{resolve:t,stream:e,It:r}]=vr.splice(0,1),n=Object.assign({},r,{useWebWorkers:!1,workerURI:D,createWorker:D});t(new Er({},e,n,Hr)),jr()}}function Hr(){Vr(),jr()}function Gr(t){const{Ot:e}=t;e&&(clearTimeout(e),t.Ot=null)}const Kr="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),qr=256==Kr.length;function Yr(t,e){return Xr(t,e,!0)}function Xr(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){if(qr){let e="";for(let r=0;r<t.length;r++)e+=Kr[t[r]];return e}return(new TextDecoder).decode(t)}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const Jr="HTTP error ",Qr="HTTP Range not supported",$r="HTTP resource changed",tn="Writer iterator completed too soon",en="Writer not initialized",rn="Content-Range",nn="Range",on="GET",an="bytes",sn=16777216,cn="writable",ln=Symbol();class un{constructor(){this.size=0}init(){this.initialized=!0}}class fn extends un{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=wt(ft())}={}){const n=this;let o=0;return r=dt(r),new ReadableStream({async pull(a){const i=e===D?r:Math.min(r,e-o),s=await Yn(n,t+o,i);s.length&&a.enqueue(s),o+r>=e||!s.length&&i?a.close():o+=r}})}}class wn extends un{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(en);return t.writeUint8Array(At(e))}});Object.defineProperty(t,cn,{get:()=>e})}writeUint8Array(){}}class dn extends fn{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{kt:t,Ct:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{Ct:r,kt:n}=this,o=new Uint8Array(e),a=4*Math.floor(t/3),i=atob(n.substring(a+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(a/4);let c=0;for(let t=s;t<s+e&&t<i.length;t++)o[t-s]=i.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class mn extends wn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",Nt:""})}writeUint8Array(t){const e=this;let r,n=e.Nt;const o=e.Nt.length;for(e.Nt="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.Nt+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.Nt=n+e.Nt}getData(){return this.data+btoa(this.Nt)}}let pn,hn;class yn extends fn{constructor(t){super(),Object.assign(this,{Mt:t,size:t.size}),hn||(hn=(async()=>{try{const t=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader();let e=0,r=await t.read();for(;!r.done;)e+=r.value.length,r=await t.read();pn=1==e}catch{pn=!1}})())}createReadable(t){const{Mt:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};return!n&&o>=r?Te(e.stream()):pn?Te(e.slice(n,n+o).stream()):super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.Mt:r.Mt.slice(t,n);let a=await o.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,n)),new Uint8Array(a)}}class En extends un{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,cn,{get:()=>r.writable}),e.contentType=t,e._t=Ue(r.readable,t),e._t.catch(()=>{})}getData(){return this._t}}class bn extends yn{constructor(t){super(new Blob([t],{type:"text/plain"}))}}class Sn extends En{constructor(t){super(),Object.assign(this,{encoding:t,vt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,vt:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return Xr(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class An extends fn{constructor(t,e){super(),Rn(this,t,e)}async init(){await xn(this,_n,kn),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o}=e;if((r||n)&&o!==D){const{offset:r=0,size:n=o-r}=t||{};if(n>0&&r<o)return function(t,e,r){let n,o=e,a=0,i=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(Qr);const o=e.length>a?e.subarray(0,a):e;a-=o.length,i-=o.length,o.length&&t.enqueue(o),a||(await async function(){const t=n;n=D,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await _n(on,t,In(t,o,e));if(206!=r.status)throw new Error(Qr);const s=r.headers.get(rn);if(s){const t=Number(s.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=o)throw new Error(Qr)}Un(t,r),Tn(t,r),o+=e,a=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return Dn(this,t,e,_n,kn)}}class gn extends fn{constructor(t,e){super(),Rn(this,t,e)}async init(){await xn(this,vn,Cn),super.init()}readUint8Array(t,e){return Dn(this,t,e,vn,Cn)}}function Rn(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=sn,fetch:l}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s,maximumRangeSize:c,fetch:l})}async function xn(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=ft(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==z||o)){const n=await e(on,t,In(t,s?-22:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==an))throw new Error(Qr);{if(s){const e=new Uint8Array(await n.arrayBuffer());206==n.status&&e.length==w&&(t.Lt=e)}Tn(t,n);const o=Fn(n);o===D?await Mn(t,e,r):t.size=o}}else await Mn(t,e,r)}async function Dn(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,Lt:s,size:c,options:l}=t;if(a||i){if(s&&e==c-w&&r==w)return s;if(e>=c||0===r)return I;{e+r>c&&(r=c-e);const o=await n(on,t,In(t,e,r));if(206!=o.status)throw new Error(Qr);const a=o.headers.get(rn);if(a){const t=Number(a.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=e)throw new Error(Qr)}Un(t,o),Tn(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(Qr);return i}}{const{data:n}=t;return n||await o(t,l),t.data.subarray(e,e+r)}}function Fn(t){const e=t.headers.get(rn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function zn({headers:t}){return{Bt:t.get("Etag")||D,lastModified:t.get("Last-Modified")||D}}function Tn(t,e){const{checkResourceChanges:r,Pt:n}=t;r&&!n&&206==e.status&&(t.Pt=zn(e))}function Un(t,e){const{checkResourceChanges:r,Pt:n,size:o}=t;if(r){const t=Fn(e);if(t!==D&&o!==D&&t!=o)throw new Error($r);if(n){const t=zn(e);if(Object.entries(n).some(([e,r])=>r!==D&&t[e]!==D&&r!=t[e]))throw new Error($r)}}}function In(t,e=0,r=1){return Object.assign({},On(t),{[nn]:an+"="+(e<0?e:e+"-"+(e+r-1))})}function On({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function kn(t){await Nn(t,_n)}async function Cn(t){await Nn(t,vn)}async function Nn(t,e){const r=await e(on,t,On(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function Mn(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,On(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function _n(t,{fetch:e=fetch,options:r,url:n},o){const a=await e(n,Object.assign({},r,{method:t,headers:o}));if(a.status<400)return a;throw 416==a.status?new Error(Qr):new Error(Jr+(a.statusText||a.status))}function vn(t,{url:e},r){return new Promise((n,o)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status<400){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:a.status,arrayBuffer:()=>a.response,headers:new Map(t)})}else o(416==a.status?new Error(Qr):new Error(Jr+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),a.open(t,e),r)for(const t of Object.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class Ln extends fn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new gn(t,e):new An(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 Bn extends Ln{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class Pn extends fn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{Wt:t,size:t.length})}readUint8Array(t,e){return this.Wt.slice(t,t+e)}}class Wn extends wn{constructor(t){super(),this.jt=t||262144}init(t=0){Object.assign(this,{offset:0,Wt:new Uint8Array(t>0?t:this.jt)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.Wt.length){let t=e.Wt.length?2*e.Wt.length:e.jt;for(;t<r;)t*=2;const n=e.Wt;e.Wt=new Uint8Array(t),e.Wt.set(n)}e.Wt.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.Wt.length?this.Wt:this.Wt.slice(0,this.offset)}}class jn extends fn{constructor(t){super(),this.Vt=t}async init(){const t=this;t.Zt=0;const e=t.Vt=await Promise.all(t.Vt.map(qn));t.Ht=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}Gt(t){const{Ht:e,size:r}=this,n=e[t];return n===D?r:n}async readUint8Array(t,e){const r=this,{Vt:n}=this;let o,a=0,i=t;for(;n[a]&&i>=n[a].size;)i-=n[a].size,a++;const s=n[a];if(s){const n=s.size;if(i+e<=n)o=await Yn(s,i,e);else{const a=n-i;o=St(await Yn(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=I;return r.Zt=Math.max(a,r.Zt),o}}class Vn extends un{constructor(t,e=4294967295){super();const r=this;let n,o,a;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const i=new WritableStream({async write(e){if(e===ln)return void(a&&await c());const{availableSize:i}=r;if(a)e.length>=i?(await s(e.subarray(0,i)),await c(),e.length>i&&await this.write(e.subarray(i))):await s(e);else{const{value:i,done:s}=await t.next();if(s&&!i)throw new Error(tn);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await Kn(n),o=i.writable,a=o.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await l())},async abort(t){a&&await a.abort(t)}});async function s(t){const e=t.length;e&&(await a.ready,await a.write(t),n.size+=e,r.availableSize-=e)}async function c(){await l(),r.diskOffset+=n.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function l(){await a.close()}Object.defineProperty(r,cn,{get:()=>i})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(ln)}finally{t.releaseLock()}}}class Zn{constructor(t){return Array.isArray(t)&&(t=new jn(t)),(t instanceof ReadableStream||typeof t.getReader==T)&&(t={readable:Te(t)}),t}}class Hn{constructor(t){return t.writable===D&&typeof t.next==T&&(t=new Vn(t)),(t instanceof WritableStream||typeof t.getWriter==T)&&(t={writable:Ie(t)}),t.size===D&&(t.size=0),t}}function Gn(t){return Boolean(t&&t.getData)}async function Kn(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function qn(t){return t=new Zn(t),await Kn(t),t.size!==D&&t.readUint8Array||(t=new yn(await Ue(t.readable)),await Kn(t)),t}function Yn(t,e,r){return t.readUint8Array(e,r)}function Xn(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?fn.prototype.createReadable.call(t,e):t.readable}const Jn="filename",Qn="rawFilename",$n="comment",to="rawComment",eo="uncompressedSize",ro="compressedSize",no="offset",oo="diskNumberStart",ao="lastModDate",io="rawLastModDate",so="lastAccessDate",co="rawLastAccessDate",lo="creationDate",uo="rawCreationDate",fo="internalFileAttributes",wo="externalFileAttributes",mo="internalFileAttribute",po="externalFileAttribute",ho="msdosAttributesRaw",yo="msdosAttributes",Eo="msDosCompatible",bo="zip64",So="encrypted",Ao="version",go="versionMadeBy",Ro="zipCrypto",xo="directory",Do="executable",Fo="compressionMethod",zo="signature",To="extraField",Uo="unixMode",Io="setuid",Oo="setgid",ko="sticky",Co=[Jn,Qn,eo,ro,ao,io,$n,to,so,co,lo,uo,no,oo,fo,wo,mo,po,ho,yo,Eo,bo,So,Ao,go,Ro,xo,Do,"symlink",Fo,zo,"crc32",To,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Uo,"unixExternalUpper",Io,Oo,ko,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class No{constructor(t){Co.forEach(e=>this[e]=t[e])}}const Mo="File format is not recognized",_o="End of central directory not found",vo="End of Zip64 central directory locator not found",Lo="Central directory header not found",Bo="Local file header not found",Po="Zip64 extra field not found",Wo="File contains encrypted entry",jo="Encryption method not supported",Vo="Compression method not supported",Zo="Split zip file",Ho="Overlapping entry found",Go="Entry data out of bounds",Ko="Ambiguous archive",qo="Encrypted central directory is not supported",Yo="Unsafe filename",Xo="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Jo="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",Qo="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",$o="64-bit value exceeds Number.MAX_SAFE_INTEGER",ta="unsorted central directory",ea="unknown version needed to extract",ra="compressed patched data",na="malformed extra field",oa="unknown zip64 extensible data",aa="wrapped entries count",ia="appended data",sa="prepended data",ca="trailing central directory data",la="duplicate filename",ua="mismatched zip64 end of central directory record",fa="mismatched local file header (general purpose bit flag)",wa="mismatched local file header (compression method)",da="mismatched local file header (crc32 or sizes)",ma=/^[a-zA-Z]:/,pa="utf-8",ha="cp437",ya=[[eo,t],[ro,t],[no,t],[oo,e]],Ea={[e]:{Kt:ei,bytes:4},[t]:{Kt:ri,bytes:8}},ba=BigInt(Number.MAX_SAFE_INTEGER);class Sa{constructor(t,e={}){Object.assign(this,{reader:new Zn(t),options:e,qt:new Map})}async*getEntriesGenerator(n={}){const a=this;let{reader:i}=a;if(await Kn(i),i.size!==D&&i.readUint8Array||(i=new yn(await Ue(i.readable)),await Kn(i)),i.size<w)throw new Error(Mo);const c=a.warnings=[],p=va(n,a.options),h=p==H,g=p!=K,R=Pa(Ya(a,n,j),p),x=function(t,e){if(t===D)return e;if(!_a(t))throw new Error(Jo);return t}(Ya(a,n,"filenameValidation"),p),F=Ya(a,n,"normalizeFilename"),{Yt:z,Xt:T}=await Wa(i,g,R);if(!z)throw await async function(t){return await Ma(t)==o}(i)?new Error(Zo):new Error(_o);g&&T>1&&qa("multiple end of central directory records");const U=gt(z);let O=ei(U,12),k=ei(U,16);const C=z.offset,N=ti(U,20),M=C+w+N,_=i.size-M;_>R&&qa(ia),_>0&&Ka(c,ia);let v=ti(U,4);const L=i.Zt||0;let B,P,W,G,q=ti(U,6),Y=ti(U,10),X=0,J=m;const Q=k==t||O==t||Y==e||q==e;if(k!=t&&q!=e&&(k+=Na(i,q)),Q){const r=z.offset>=d?await Yn(i,z.offset-d,d):I,n=gt(r);if(r.length==d&&ei(n,0)==u){k=Na(i,ei(n,4))+ri(n,8);let r=await Yn(i,k,m),o=gt(r);const a=z.offset-d-m;if((r.length<m||ei(o,0)!=l)&&k!=a&&a>=0){const t=k;k=a,k>t&&(X=k-t),r=await Yn(i,k,m),o=gt(r)}if(r.length<m||ei(o,0)!=l)throw new Error(vo);if(P=!0,W=ri(o,4)>44,W){const t=Math.min(ri(o,4)-44,i.size-k-m);t>0&&(J+=t,G=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=gt(t),n=ti(r,26);Object.assign(e,{compressionMethod:ti(r,0),compressedSize:ri(r,2),uncompressedSize:ri(r,10),encryptionAlgorithm:ti(r,18),bitLength:ti(r,20),flags:ti(r,22),hashAlgorithm:ti(r,24),hashData:t.subarray(28,28+n)})}return e}(await Yn(i,k+m,t)))}v==e?v=ei(o,16):v!=ei(o,16)&&Ga(h,c,ua),q==e?q=ei(o,20):q!=ei(o,20)&&Ga(h,c,ua),Y==e?Y=ri(o,32):Y!=ri(o,32)&&Ga(h,c,ua),O==t?O=ri(o,40):O!=ri(o,40)&&Ga(h,c,ua),k=Na(i,q)+ri(o,48)+X}}let $=O;const tt=z.offset-(P?J+d:0);if(k>=i.size&&(X=i.size-k-O-w,k=i.size-O-w),L!=v)throw new Error(Zo);if(k<0)throw new Error(Mo);let et=0,rt=await Yn(i,k,O),nt=gt(rt);if(O){if(rt.length<4)throw new Error(Mo);const t=tt-O;if(k!=t&&q==v){let e=!(ei(nt,et)==s||Boolean(G&&G.compressedSize)||xa(nt));if(!e&&t>=0&&t+4<=i.size&&(e=ei(gt(await Yn(i,t,4)),0)==s),e){const e=k;k=t,k>e&&(X+=k-e),rt=await Yn(i,k,O),nt=gt(rt)}}}const ot=tt-k;if(O!=ot&&ot>=0&&q==v&&(O=ot,rt=await Yn(i,k,O),nt=gt(rt)),k<0||k>=i.size)throw new Error(Mo);a.directoryOffset=k,a.directoryLength=$;const at=Xa(a,n,"decryptCentralDirectory");let it,st;if(at&&Y&&rt.length>=4&&ei(nt,0)!=s&&(W||xa(nt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(G,$,rt.length);st=rt.subarray(t),rt=await at(rt.subarray(0,t),G),nt=gt(rt),$=rt.length,it=!0}G&&!it&&(rt.length<4||ei(nt,0)==s)&&Ka(c,oa),B=k;const ct=Ya(a,n,"filenameEncoding"),lt=Ya(a,n,"commentEncoding"),ut=new Set;let ft,wt=-1;const dt=!h&&!P;!Y&&dt&&(Y=Da(nt,rt,et),Y&&Ka(c,aa));for(let t=0;t<Y;t++){const o=new Ra(i,a.options);if(et+f>rt.length||ei(nt,et)!=s){if(0==t&&!it&&(W||xa(nt)))throw new Error(qo);throw new Error(Lo)}za(o,nt,et+6);const l=Boolean(o.bitFlag.languageEncodingFlag),u=et+f,w=u+o.filenameLength,d=w+o.extraFieldLength,m=ti(nt,et+4),p=!(m>>8),h=m>>8==3,g=rt.subarray(u,w),R=ti(nt,et+32),z=d+R,T=rt.subarray(d,z),U=l,I=l,O=ei(nt,et+38),k=O&r,C={readOnly:Boolean(1&k),hidden:Boolean(2&k),system:Boolean(4&k),directory:Boolean(16&k),archive:Boolean(32&k)},N=ei(nt,et+42),M=Xa(a,n,"decodeText")||Yr,_=U?pa:ct||ha,v=I?pa:lt||ha;let L=M(g,_,V);if(L===D&&(L=Yr(g,_)),F){const t=F(L);t!==D&&(L=t)}if(Ba(L,x)){const t=new Error(Yo);throw t.filename=L,t}let P=M(T,v,Z);P===D&&(P=Yr(T,v)),Object.assign(o,{index:t,Jt:it,versionMadeBy:m,msDosCompatible:p,zip64:!1,compressedSize:0,uncompressedSize:0,Qt:R,offset:N,diskNumberStart:ti(nt,et+34),internalFileAttributes:ti(nt,et+36),externalFileAttributes:O,msdosAttributesRaw:k,msdosAttributes:C,rawFilename:g,filenameUTF8:U,commentUTF8:I,rawExtraField:rt.subarray(w,d),rawComment:T,filename:L,comment:P}),Ta(o,o,nt,et+6)&&Ka(c,na,L),o.offset+=X;const j=Na(i,o.diskNumberStart)+o.offset;B=Math.min(j,B),j<wt&&Ka(c,ta,L),wt=j,(o.version&r)>63&&Ka(c,ea,L),32&~o.rawBitFlag||Ka(c,ra,L),ut.has(o.filename)&&(ft=!0),ut.add(o.filename);const H=o.externalFileAttributes>>16&e;o.unixMode===D&&16877&H&&(o.unixMode=H);const G=Boolean(o.unixMode&b),K=Boolean(o.unixMode&S),q=Boolean(512&o.unixMode),J=40960==((o.unixMode===D?H:o.unixMode)&y),Q=!J&&(o.unixMode!==D?!!(73&o.unixMode):h&&!!(73&H)),$=o.unixMode!==D&&(o.unixMode&y)==E,tt=(H&y)==E;Object.assign(o,{setuid:G,setgid:K,sticky:q,symlink:J,unixExternalUpper:H,internalFileAttribute:o.internalFileAttributes,externalFileAttribute:o.externalFileAttributes,executable:Q,directory:$||tt||p&&C.directory||o.filename.endsWith(A),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new No(o);if(ot.getData=(t,e)=>o.getData(t,ot,a.qt,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=Ue(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,a.qt,t),r},et=z,t==Y-1&&dt){const t=Da(nt,rt,et);t&&(Y+=t,Ka(c,aa))}const{onprogress:at}=n;if(at)try{await at(t+1,Y,new No(o))}catch{}yield ot}let mt=et,pt=Fa(rt.subarray(et))||(it?Fa(st):D);if(!pt&&!it){const t=k+et,e=Math.min(tt-t,65541);e>=6&&(pt=Fa(await Yn(i,t,e)))}pt&&(a.digitalSignature=pt,mt=et+6+pt.length),(et!=$&&mt!=$||!it&&et!=O&&mt!=O)&&Ga(h,c,ca),ft&&Ga(h,c,la);const ht=Ya(a,n,"extractPrependedData"),yt=Ya(a,n,"extractAppendedData"),Et=(h||ht)&&Y&&4==B&&await async function(t){const e=await Ma(t);return e==o||808471376==e}(i)?4:0;return h&&(X||Y&&B>Et)&&qa(sa),(X||Y&&B>4)&&Ka(c,sa),ht&&(a.prependedData=B>Et?await Yn(i,Et,B-Et):I),a.comment=N?await Yn(i,C+w,N):I,yt&&(a.appendedData=M<i.size?await Yn(i,M,i.size-M):I),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}}class Aa{constructor(t={}){const{readable:e,writable:r}=new TransformStream,n=new Sa(e,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await n.next();if(e)return t.close();const o={...r,readable:function(){const{readable:t,writable:e}=new TransformStream;if(r.getData)return async function(){try{await r.getData(e)}catch(t){try{await e.abort(t)}catch{}}}(),t}()};delete o.getData,t.enqueue(o)}}),this.writable=r}}async function ga(t,e={}){if(t=new Zn(t),await Kn(t),t.size!==D&&t.readUint8Array||(t=new yn(await Ue(t.readable)),await Kn(t)),t.size<w)return!1;const r=va(e,{}),n=r!=K,o=Pa(e[j],r),{Yt:a,Xt:i}=await Wa(t,n,o);if(!a||r==H&&i>1)return!1;const s=ti(gt(a),20),c=a.offset+w+s;return t.size-c<=o}class Ra{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,i={}){const s=this,c=ft(),{reader:l,index:u,offset:f,diskNumberStart:w,extraFieldAES:d,extraFieldZip64:m,compressionMethod:p,bitFlag:h,rawBitFlag:y,crc32:E,rawLastModDate:b,uncompressedSize:S,compressedSize:A}=s,{dataDescriptor:R}=h,x=e.localDirectory={},F=e.warnings=[],z=Na(l,w)+f,T=await Yn(l,z,g),U=gt(T);let B=Ya(s,i,O),P=Ya(s,i,k);const W=Ya(s,i,C);if($(B,P),B=B&&B.length&&B,P=P&&P.length&&P,d&&99!=d.originalCompressionMethod)throw new Error(Vo);if(T.length<g||ei(U,0)!=n)throw new Error(Bo);za(x,U,4);const{extraFieldLength:j,filenameLength:V}=x,Z=x.dataOffset=z+g+V+j,G=Ya(s,i,"checkLocalDirectory"),q=va(i,s.options),Y=function(t,e){return t===D?e!=K:Boolean(t)}(G,q),X=function(t,e){return t===D?e==H:Boolean(t)}(G,q);let J=I;if(X&&(V||j)){const t=await Yn(l,z+g,V+j);J=t.subarray(0,V),x.rawExtraField=t.subarray(V)}else x.rawExtraField=j?await Yn(l,z+g+V,j):I;X&&(x.rawFilename=J),Ta(s,x,U,4,!0)&&Ka(F,na),function(t,e,r,n,o){const{rawFilename:a}=t,i=!o,s=t.Jt&&!(8192&~e.rawBitFlag);!n||s||r.length==a.length&&!r.some((t,e)=>t!=a[e])||Ga(i,o,"mismatched local file header (filename)"),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&Ga(i,o,fa),e.compressionMethod!=t.compressionMethod&&Ga(i,o,wa),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Ga(i,o,da)}(s,x,J,X,Y?D:F);const{lastAccessDate:tt,creationDate:et,uid:rt,gid:nt}=x;tt&&(e.lastAccessDate=tt),et&&(e.creationDate=et),rt!==D&&e.uid===D&&(e.uid=rt),nt!==D&&e.gid===D&&(e.gid=nt);const ot=s.encrypted&&x.encrypted&&!W,at=ot&&!d;if(W||(e.zipCrypto=at),ot&&!(64&~x.rawBitFlag))throw new Error(jo);const it=W?D:Be(p);if(0!=p&&8!=p&&9!=p&&!it&&!W)throw new Error(Vo);if(ot){if(!at&&(d.strength<1||d.strength>3))throw new Error(jo);if(!B&&!P)throw new Error(Wo)}if(Z+A>l.size)throw new Error(Go);const st=A,ct=Te(l.createReadable({offset:Z,size:st})),lt=Q(Ya(s,i,N)),ut=Ya(s,i,"checkPasswordOnly");let wt=Ya(s,i,"checkOverlappingEntry");const dt=Ya(s,i,"checkOverlappingEntryOnly");dt&&(wt=!0);const{onstart:mt,onprogress:pt,onend:ht}=i,yt=0!=p&&!W,Et=W?A:S,bt=9==p;let St=Ya(s,i,_);bt&&(St=!1);const At=Ya(s,i,"checkCrc32"),Rt=(At===D?Ya(s,i,"checkSignature"):At)&&!W&&(!ot||at||d&&1==d.vendorVersion),xt={options:{codecType:lr,password:B,rawPassword:P,zipCrypto:at,encryptionStrength:d&&d.strength,checkCrc32:Rt,checkAuthenticationCode:Ya(s,i,"checkAuthenticationCode"),passwordVerification:at&&(R?b>>>8&r:E>>>24&r),outputSize:Et,crc32:E,compressed:yt,encrypted:ot,useWebWorkers:Ya(s,i,M),useCompressionStream:St,transferStreams:Ya(s,i,v),deflate64:bt,format:it?it.format:D,codecURI:it?it.codecURI:D,compressionMethod:p,rawBitFlag:y,checkPasswordOnly:ut},config:c,ut:{signal:lt,size:st,onstart:mt,onprogress:pt,onend:ht}};let Dt,Ft;wt&&await async function({reader:t,$t:e,index:r,offset:n,crc32:o,compressedSize:i,uncompressedSize:s,dataOffset:c,dataDescriptor:l,extraFieldZip64:u,qt:f}){let w=0;if(l&&(w=u?20:12),w){const r=await Yn(t,c+i,w+4),n=gt(r);let l=r.length==w+4&&ei(n,0)==a;if(l){const t=Ca(n,4,u);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==i&&t.uncompressedSize==s?w+=4:l=!1}if(r.length>=w){const t=Ca(n,l?4:0,u);t.signature=l,e.localDirectory.dataDescriptor=t}}const d={start:n,end:c+i+w,$t:e};for(const[t,e]of f)if(t!=r&&d.start<e.end&&e.start<d.end){const t=new Error(Ho);throw t.overlappingEntry=e.$t,t}f.set(r,d)}({reader:l,$t:e,index:u,offset:z,crc32:E,compressedSize:A,uncompressedSize:S,dataOffset:Z,dataDescriptor:R||x.bitFlag.dataDescriptor,extraFieldZip64:m||x.extraFieldZip64,qt:o});try{if(!dt){ut&&(t=new WritableStream),t=new Hn(t),await Kn(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(Et,A,yt)),({writable:Dt}=t);const{outputSize:e}=await Wr({readable:ct,writable:Dt},xt);if(t.size+=e,e!=Et)throw new Error(Ve)}}catch(e){if(e.outputSize!==D&&(t.size+=e.outputSize),!ut||e.message!=Vt)throw Ft=e,e}finally{if((Gn(t)||!Ya(s,i,L))&&Dt&&!Dt.locked){const t=Dt.getWriter();if(Ft)try{await t.abort(Ft)}catch{}else await t.close()}}return ut||dt?D:t.getData?t.getData():Dt}}function xa(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==ei(t,r))return!0;return!1}function Da(t,e,r){let n=0;for(;r+f<=e.length&&ei(t,r)==s;)r+=f+ti(t,r+28)+ti(t,r+30)+ti(t,r+32),n++;return n%65536?0:n}function Fa(t){if(t.length>=6){const e=gt(t);if(ei(e,0)==i){const r=ti(e,4);if(6+r<=t.length)return t.subarray(6,6+r)}}}function za(t,e,r){const n=t.rawBitFlag=ti(e,r+2),o=!(1&~n),a=ei(e,r+6);Object.assign(t,{encrypted:o,version:ti(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&h)==h},rawLastModDate:a,lastModDate:Ja(a),filenameLength:ti(e,r+22),extraFieldLength:ti(e,r+24)})}function Ta(t,e,r,n,o){const{rawExtraField:a}=e,i=e.extraField=new Map,s=gt(a);let c=0,l=!1;try{for(;c<a.length;){const t=ti(s,c),e=ti(s,c+2);i.set(t,{type:t,data:a.slice(c+4,c+4+e)}),c+=4+e}}catch{l=!0}c>a.length&&(l=!0);const u=ti(r,n+4);Object.assign(e,{signature:ei(r,n+10),crc32:ei(r,n+10),compressedSize:ei(r,n+14),uncompressedSize:ei(r,n+18)});const f=i.get(1);f&&(function(t,e){e.zip64=!0;const r=gt(t.data),n=ya.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+Ea[e].bytes,0);if(t.data.length<o)throw new Error(Po);for(let o=0,a=0;o<n.length;o++){const[i,s]=n[o],c=Ea[s];e[i]=t[i]=c.Kt(r,a),a+=c.bytes}}(f,e),e.extraFieldZip64=f);const w=i.get(28789);w&&(Ua(w,Jn,Qn,e,t),e.extraFieldUnicodePath=w);const d=i.get(25461);d&&(Ua(d,$n,to,e,t),e.extraFieldUnicodeComment=d);const m=i.get(39169);m&&m.data.length>=7?(function(t,e,r){const n=gt(t.data),o=$a(n,4);Object.assign(t,{vendorVersion:$a(n,0),vendorId:$a(n,2),strength:o,originalCompressionMethod:r,compressionMethod:ti(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=D)}(m,e,u),e.extraFieldAES=m):e.compressionMethod=u;const h=i.get(13);h&&(Ia(h,e),e.extraFieldPkwareUnix=h);const y=i.get(22613);y&&(Ia(y,e),e.extraFieldUnixType1=y);const E=i.get(10);E&&(function(t,e){const r=gt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=ti(r,o),a=ti(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+a)),o+=4+a}}catch{}if(n&&24==n.length){const r=gt(n),o=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),i=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:a,rawCreationDate:i});const s={lastModDate:Qa(o),lastAccessDate:Qa(a),creationDate:Qa(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(E,e),e.extraFieldNTFS=E);const b=i.get(30805);let S;if(b&&(S=Oa(b,e,!1),e.extraFieldUnix=b),!S){const t=i.get(30837);t&&(Oa(t,e,!0),e.extraFieldInfoZip=t)}const A=i.get(p);A&&(function(t,e,r){if(!t.data.length)return;const n=gt(t.data),o=$a(n,0),a=[],i=[];r?(1&~o||(a.push(ao),i.push(io)),2&~o||(a.push(so),i.push(co)),4&~o||(a.push(lo),i.push(uo))):t.data.length>=5&&(a.push(ao),i.push(io));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=ei(n,s);e[r]=t[r]=new Date(1e3*(0|a));const c=i[o];t[c]=a}s+=4})}(A,e,o),e.extraFieldExtendedTimestamp=A);const g=i.get(6534);return g&&(e.extraFieldUSDZ=g),l}function Ua(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=gt(t.data),i=new kt;i.append(o[r]);const s=gt(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=ei(a,1),l=$a(a,0);Object.assign(t,{version:l,[e]:Yr(t.data.subarray(5)),valid:1==l&&!o.bitFlag.languageEncodingFlag&&c==ei(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function Ia(t,e){if(t.data.length<8)return;const r=gt(t.data),n={lastAccessDate:new Date(1e3*(0|ei(r,0))),lastModDate:new Date(1e3*(0|ei(r,4)))};t.data.length>=12&&(n.uid=ti(r,8),n.gid=ti(r,10)),Object.assign(t,n),Object.assign(e,n)}function Oa(t,e,r){try{const n=gt(t.data);let o,a;if(r){let e=0;const r=$a(n,e++),i=$a(n,e++);o=ka(t.data.subarray(e,e+i)),e+=i;const s=$a(n,e++);a=ka(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=ti(n,0),a=ti(n,2),Object.assign(t,{uid:o,gid:a}));return o!==D&&(e.uid=o),a!==D&&(e.gid=a),o!==D||a!==D}catch{}}function ka(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function Ca(t,e,r){const n=ei(t,e);let o,a;return r?(o=ri(t,e+4),a=ri(t,e+12)):(o=ei(t,e+4),a=ei(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:a}}function Na(t,e){return t.Gt?t.Gt(e):0}async function Ma(t){return ei(gt(await Yn(t,0,4)))}function _a(t){return t===H||t===G||t===K}function va(t,e){return La(t,La(e,G))}function La(t,e){const r=t.strictness;if(r!==D){if(!_a(r))throw new Error(Xo);return r}const n=t.checkAmbiguity;return n===D?e:n?H:e==K?K:G}function Ba(t,e){if(e==K)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(r.includes("..")||t.startsWith("/")||t.startsWith("\\\\")||ma.test(t))||e==H&&(r.includes(".")||r.includes(""))}function Pa(t,r){if(t!==D){const e=rt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(Qo);return e}return r==H?0:r==K?1/0:e}async function Wa(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={count:64};let i,s,c=0;for await(const[r,l,u,f,d]of ja(t,o)){const o=ti(r,f+20);if(d+w+o==n){const o=await Za(t,r,l,f,d,n,a);if(2==o){if(i||(i=Va(u,f,d)),c++,!e||c>1)break}else 1!=o||s||(s=Va(u,f,d))}}return i||(i=s),i||(i=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let a,i;for await(const[e,s,c,l,u]of ja(t,o)){const o=Va(c,l,u);a||(a=o);const f=await Za(t,e,s,l,u,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{Yt:i,Xt:c}}async function*ja(t,e){const r=t.size-e,n=await Yn(t,r,e),o=gt(n);for(let t=n.length-w;t>=0;t--)ei(o,t)==c&&(yield[o,r,n,t,r+t])}function Va(t,e,r){return{offset:r,buffer:t.slice(e,e+w).buffer}}async function Za(r,n,o,a,i,c,l){const f=ti(n,a+10),w=ei(n,a+12),m=ei(n,a+16);if(f==e||w==t||m==t)return await Ha(r,n,o,i-d,c,l)==u?2:0;if(!f&&!w)return 1;const p=ti(n,a+6);for(const t of[i-w,Na(r,p)+m])if(await Ha(r,n,o,t,c,l)==s)return 2;return 0}async function Ha(t,e,r,n,o,a){return n<0||n+4>o?D:n>=r?ei(e,n-r):a.count>0?(a.count--,ei(gt(await Yn(t,n,4)),0)):D}function Ga(t,e,r){t?qa(r):Ka(e,r)}function Ka(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==D&&(n.filename=r),t.push(n)}}function qa(t){const e=new Error(Ko);throw e.reason=t,e}function Ya(t,e,r){return e[r]===D?t.options[r]:e[r]}function Xa(t,e,r){return J(Ya(t,e,r))}function Ja(t){const r=(4294901760&t)>>16,n=t&e,o=new Date(1980+((65024&r)>>9),((480&r)>>5)-1,31&r,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return o<x?x:o}function Qa(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function $a(t,e){return t.getUint8(e)}function ti(t,e){return t.getUint16(e,!0)}function ei(t,e){return t.getUint32(e,!0)}function ri(t,e){const r=t.getBigUint64(e,!0);if(r>ba)throw new Error($o);return Number(r)}var ni=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Ko,ERR_BAD_FORMAT:Mo,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Lo,ERR_ENCRYPTED:Wo,ERR_ENCRYPTED_CENTRAL_DIRECTORY:qo,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Go,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:vo,ERR_EOCDR_NOT_FOUND:_o,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Po,ERR_INVALID_AUTHENTICATION_CODE:jt,ERR_INVALID_COMPRESSED_DATA:Ze,ERR_INVALID_CRC32:He,ERR_INVALID_FILENAME_VALIDATION:Jo,ERR_INVALID_MAX_APPENDED_DATA_SIZE:Qo,ERR_INVALID_PASSWORD:Pt,ERR_INVALID_SIGNATURE:Wt,ERR_INVALID_STRICTNESS:Xo,ERR_INVALID_UNCOMPRESSED_SIZE:Ve,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Bo,ERR_OVERLAPPING_ENTRY:Ho,ERR_SPLIT_ZIP_FILE:Zo,ERR_UNSAFE_FILENAME:Yo,ERR_UNSUPPORTED_COMPRESSION:Vo,ERR_UNSUPPORTED_ENCRYPTION:jo,ERR_UNSUPPORTED_UINT64:$o,ERR_WORKER_STARTUP_TIMEOUT:wr,WARNING_APPENDED_DATA:ia,WARNING_COMPRESSED_PATCHED_DATA:ra,WARNING_DUPLICATE_FILENAME:la,WARNING_MALFORMED_EXTRA_FIELD:na,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:fa,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:wa,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:da,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:ua,WARNING_PREPENDED_DATA:sa,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:ca,WARNING_UNKNOWN_VERSION:ea,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:oa,WARNING_UNSORTED_CENTRAL_DIRECTORY:ta,WARNING_WRAPPED_ENTRIES_COUNT:aa,ZipReader:Sa,ZipReaderStream:Aa,isZipFile:ga});const oi="File already exists",ai="Zip file comment exceeds 64KB",ii="Invalid zip file comment (must be a Uint8Array)",si="File entry comment exceeds 64KB",ci="Invalid file entry comment (must be a string)",li="Invalid date (must be a valid Date instance)",ui="File entry name exceeds 64KB",fi="Version exceeds 65535",wi="The strength must equal 1, 2, or 3",di="Encryption is not supported in USDZ files",mi="Encryption is not supported when the 'passThrough' option is set",pi="Invalid extra field (must be a Map)",hi="Invalid extra field type (must be integer 0..65535)",yi="Invalid extra field data (must be a Uint8Array)",Ei="Extra field data exceeds 64KB",bi=-2147483648,Si=2147483647,Ai=BigInt(0),gi=BigInt("0x7fffffffffffffff"),Ri="Zip64 is not supported (set the 'zip64' option to 'true')",xi="Undefined uncompressed size",Di="Undefined compression method",Fi="Undetermined size",zi="Undefined reader",Ti="Zip file not empty",Ui="Invalid uid (must be integer 0..2^32-1)",Ii="Invalid gid (must be integer 0..2^32-1)",Oi="Invalid UNIX mode (must be integer 0..65535)",ki="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",Ci="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Ni="Invalid msdosAttributesRaw (must be integer 0..255)",Mi="Invalid msdosAttributes (must be an object with boolean flags)",_i="Invalid level (must be integer 0..9)",vi="Signature data exceeds 64KB",Li=new Uint8Array([7,0,2,0,65,69,3,0,0]),Bi="infozip",Pi="unix";let Wi=0;const ji=[];class Vi{constructor(t,e={}){t=new Hn(t);const{availableSize:r=F,maxSize:n=F}=t,o=r>0&&r!==F&&n>0&&n!==F;Object.assign(this,{writer:t,te:o,options:e,ee:new Map,re:new Set,offset:e[P]===D?t.size||t.writable.size||0:e[P],ne:e[P]===D?0:e[P]-(t.size||t.writable.size||0),oe:new Set,ae:[],ie:0,se:D})}prependZip(t){return Gi(this,async function(t,e){if(t.re.size)throw new Error(Ti);await t.ce(e)}(this,t))}appendZip(t){return Gi(this,this.ce(t))}async ce(t){const e=this,{oe:r,re:n,ee:a}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let i;const s=new Promise(t=>i=t);r.add(s);const c=[];let l;try{t=new Zn(t),await Kn(t),t.size!==D&&t.readUint8Array||(t=new yn(await Ue(t.readable)),await Kn(t));const{ZipReader:r}=await Promise.resolve().then(function(){return ni}),i=new r(t),s=await i.getEntries();await i.close(),await Kn(e.writer);const{directoryOffset:u}=i;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(oi);n.add(t),c.push(t)}),e.le=!0;const{ue:f}=e;e.ue=new Promise(t=>l=()=>{e.le=!1,t()}),await f,e.te&&(delete e.te,await async function(t){return gt(await Yn(t,0,4)).getUint32(0,!0)==o}(t)||(await ls(e.writer,ss()),e.offset+=4));const w=await async function(t,e,r,n){const{writer:o}=t,a=new Map;if(o.closeDisk){const i=Array.from(r).sort((t,r)=>is(e,t)-is(e,r));let s=0;for(const r of i){const n=is(e,r);await os(t,e,s,n-s),es(o,await as(e,n))&&await o.closeDisk(),a.set(r,{offset:rs(t,o),diskNumberStart:$i(o)}),s=n}await os(t,e,s,n-s)}else{const o=t.offset;await os(t,e,0,n),r.forEach(t=>a.set(t,{offset:o+is(e,t),diskNumberStart:0}))}return a}(e,t,s,u);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:i,uncompressedSize:s,compressedSize:c,extraFieldZip64:l}=t;let{compressionMethod:u,rawExtraField:f}=t;const{level:d,languageEncodingFlag:m,dataDescriptor:p}=o;f=ns(f||I),t.extraFieldAES&&(u=99);const h=Ts(f),y=Boolean(l)&&l.uncompressedSize!==D,E=Boolean(l)&&l.compressedSize!==D,b=-7&Is(d,m,p,i,u)|d<<1,{fe:S,we:A}=Us({version:e,bitFlag:b,compressionMethod:u,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,de:E,me:y,extraFieldLength:h}),{crc32:g}=t;g!==D&&Ds(A,10,g);const{offset:R,diskNumberStart:x}=w.get(t);Object.assign(t,{me:y,de:E,offset:R,diskNumberStart:x,pe:!1,he:I,ye:I,Ee:I,be:I,Se:I,rawExtraField:f,Ae:I,extendedTimestamp:!1,fe:S,we:A}),a.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{i(),r.delete(s),l&&l()}}add(o="",i,s={}){const c=this,{oe:l}=c,u=async function(o,i,s,c){if(ps(o,c=Object.assign({},c),xo)&&!i.endsWith(A)&&(i+=A),o.re.has(i))throw new Error(oi);o.re.add(i),Wi<ft().maxWorkers?Wi++:await new Promise(t=>ji.push(t));try{return await async function(o,i,s,c){const l=function(n,o,a){let i=ps(n,a,Eo),s=ps(n,a,go,i?20:768);const c=ps(n,a,Do),l=Ss(n,a,"uid"),u=Ss(n,a,"gid");let f=Ss(n,a,Uo),w=ps(n,a,"unixExtraFieldType"),d=ps(n,a,Io),m=ps(n,a,Oo),p=ps(n,a,ko);if(et(l,t,Ui),et(u,t,Ii),et(f,e,Oi),w!==D&&w!==Bi&&w!==Pi)throw new Error(ki);if(w===Pi&&(l!==D&&l>e||u!==D&&u>e))throw new Error(Ci);w!==D||l===D&&u===D||(w=Bi);let h=Ss(n,a,ho),g=ps(n,a,yo);const R=h!==D||g!==D;if(l!==D||u!==D||f!==D||w||c?(i=!1,s=s&r|768):R&&(i=!0,s&=r),et(h,r,Ni),g&&("object"!=typeof g||Array.isArray(g)))throw new Error(Mi);if(s>e)throw new Error(fi);let x=Es(n,a,wo,po);const F=x!==D;F||(x=0),!a[xo]&&o.endsWith(A)&&(a[xo]=!0);const z=ps(n,a,xo);if(z?(o.endsWith(A)||(o+=A),F||(x=16,i||(x|=16877<<16))):i||F||(x=c?493<<16:27525120),!i){const t=f!==D||Boolean(d||m||p);f=f===D?x>>16&e:f&e,d?f|=b:d=Boolean(f&b),m?f|=S:m=Boolean(f&S),p?f|=512:p=Boolean(512&f),F&&!t||(z?f=-61441&f|E:f&y||(f|=32768),x=(f&e)<<16|x&e)}({msdosAttributesRaw:h,msdosAttributes:g}=function(t,e){if(t!==D)t&=r;else if(e!==D){const{readOnly:n,hidden:o,system:a,directory:i,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),a&&(c|=4),i&&(c|=16),s&&(c|=32),t=c&r}return e===D&&(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,g)),R&&(x=x&t|h&r);const T=x>>16&e,U=f!==D&&40960==(f&y);return{name:o,ge:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:x,unixExternalUpper:T,uid:l,gid:u,unixMode:f,unixExtraFieldType:w,symlink:U,setuid:d,setgid:m,sticky:p,msdosAttributesRaw:h,msdosAttributes:g}}}(o,i,c);({name:i}=l);const u=function(t,r,n){const o=ys(t,n,"encodeText")||Nt;let a=o(r,V);if(a===D&&(a=Nt(r)),Ts(a)>e)throw new Error(ui);const i=n[$n]||"";if(typeof i!=U)throw new Error(ci);let s=o(i,Z);if(s===D&&(s=Nt(i)),Ts(s)>e)throw new Error(si);const c=ps(t,n,Ao);if(c!==D&&c>e)throw new Error(fi);const l=hs(t,n,ao,new Date),u=ps(t,n,io),f=hs(t,n,so),w=hs(t,n,lo),d=Es(t,n,fo,mo,0),m=ps(t,n,C),p=ps(t,n,O),h=ps(t,n,k);$(p,h);const y=Ss(t,n,"encryptionStrength",3),E=ps(t,n,Ro),b=ps(t,n,"extendedTimestamp",!0),S=ps(t,n,"ntfsTimestamp"),A=ps(t,n,"keepOrder",!0),g=ps(t,n,M),R=ps(t,n,v),x=ps(t,n,"bufferedWrite"),F=ys(t,n,"createTempStream"),z=ps(t,n,"dataDescriptorSignature",!0),T=Q(ps(t,n,N)),I=ps(t,n,"useUnicodeFileNames",!0),L=ps(t,n,Fo),P=m||L===D?D:Be(L);if(!m&&L!==D&&0!==L&&8!==L&&!P)throw new Error("Compression method not supported");let j=Ss(t,n,"level");if(et(j,9,_i),t.options[W]){if(p!==D||h!==D)throw new Error(di);j===D&&L===D&&(j=0)}m&&(j=D);let H=ps(t,n,_),G=ps(t,n,B);x&&G===D&&(G=!1),(G===D||E&&!m)&&(G=!0),j!==D&&6!=j&&(H=!1);const K=ps(t,n,bo);if(!(E||p===D&&h===D||Number.isInteger(y)&&y>=1&&y<=3))throw new Error(wi);const q=Yi(n[To]),Y=Yi(n.localExtraField),X=Yi(n.centralExtraField);return{comment:i,ge:{rawFilename:a,rawComment:s,version:c,lastModDate:l,rawLastModDate:u,lastAccessDate:f,creationDate:w,internalFileAttributes:d,passThrough:m,password:p,rawPassword:h,encryptionStrength:y,zipCrypto:E,extendedTimestamp:b,ntfsTimestamp:S,keepOrder:A,useWebWorkers:g,transferStreams:R,bufferedWrite:x,createTempStream:F,dataDescriptorSignature:z,signal:T,useUnicodeFileNames:I,compressionMethod:L,format:P?P.format:D,codecURI:P?P.codecURI:D,Re:P?P.versionNeeded:D,level:j,useCompressionStream:H,dataDescriptor:G,zip64:K,rawExtraField:q,xe:Y,Ae:X}}}(o,i,c),{comment:f}=u,w=c[To];o.ee.set(i,D);const d=o.se,m={};let h,z;u.ge.keepOrder&&(m.De=new Promise(t=>h=t)),o.se=m;try{const{ge:f}=u;0==f.level||f.compressionMethod!==D||f.passThrough||await async function(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;if(r&&!r.At)return!0;if(er(e)||tr(e,qe))return!0;if(r)try{return await hr(t),!0}catch{return!1}return!1}(ft())||(f.level=0);const w=await async function(e,r,{ge:n},o){if(n.passThrough&&!r&&!ps(e,o,xo))throw new Error(zi);let a;return r&&(r=new Zn(r),await Kn(r),({size:a}=r)),Object.assign({reader:r},function(e,r,n,o,a){const{passThrough:i,zipCrypto:s,password:c,rawPassword:l,encryptionStrength:u}=o;let{dataDescriptor:f,zip64:w,level:d,compressionMethod:m}=o,p=0,h=0;if(i&&r){if(h=a[eo],h===D)throw new Error(xi);if(m===D)throw new Error(Di)}const y=!0===w,E=ps(e,a,So);if(r&&i&&!E&&Ts(c,l))throw new Error(mi);const b=r&&(Boolean(c&&Ts(c)||l&&Ts(l))||i&&E);r||(d=0,m=0);const S=b?s?12:16+4*u:0;r&&(i?(a.uncompressedSize=h,p=n===D?As(h)+S:n):n===D?(f=!0,(w||w===D)&&(w=!0,h=p=4294967296)):(a.uncompressedSize=h=n,p=(gs(m,d)?As(h):h)+S));const A=!(b||r&&(0!==n||i)||gs(m,d));A&&!s&&ps(e,a,B)===D&&(f=!1);const g=y||h>=t,R=y||p>=t;if(g||R){if(!1===w)throw new Error(Ri);w=!0}return w=w||!1,{Fe:p,ge:{dataDescriptor:f,ze:A,zip64:w,me:g,de:R,uncompressedSize:h,level:d,compressionMethod:m,encrypted:b}}}(e,Boolean(r),a,n,o))}(o,s,u,c);({reader:s}=w);const y=ts(o.writer),E=$i(o.writer),b=function(t){const{rawFilename:r,lastModDate:o,rawLastModDate:a,lastAccessDate:i,creationDate:s,level:c,zip64:l,zipCrypto:u,useUnicodeFileNames:f,dataDescriptor:w,directory:d,rawExtraField:m,xe:h,encryptionStrength:y,extendedTimestamp:E,ntfsTimestamp:b,passThrough:S,encrypted:A,me:F,de:z,uncompressedSize:T,crc32:U}=t;let{version:O,compressionMethod:k}=t;const C=!d&&gs(k,c);let N;const M=S||!C,_=l&&(t.bufferedWrite||!w||!F&&!z||M),v=_||l&&w&&(F||z);if(l&&(F||z)){const t=20,e=Qi(t);if(e.Te(1),e.Te(t-4),N=e.Wt,_&&(e.Ue(T),M)){const t=A?u?12:16+4*y:0;e.Ue(S?0:T+t)}}else N=I;let L,B,P,j,V;if(A&&!u){const t=Qi(Ts(Li)+2);t.Te(39169),t.Ie(Li),L=t.Wt,L[8]=y}else L=I;if(E){const t=ws(o),e=ds(t);if(e){const e=9+(i?4:0)+(s?4:0),r=Qi(e);j=1+(i?2:0)+(s?4:0),r.Te(p),r.Te(e-4),r.Oe(j),r.ke(t),i&&r.ke(ms(ws(i))),s&&r.ke(ms(ws(s))),P=r.Wt}else P=I;if(b===D?!e||Boolean(i||s):b)try{const t=fs(o),e=Qi(36);e.Te(10),e.Te(32),e.Ce(4),e.Te(1),e.Te(24),e.Ue(t),e.Ue(i?fs(i):t),e.Ue(s?fs(s):t),B=e.Wt}catch{B=I}else B=I}else B=P=I;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=Bi||r===D&&n===D)if(o!=Pi||r===D&&n===D)V=I;else{const t=Qi(8);t.Te(30805),t.Te(4),t.Te((r===D?0:r)&e),t.Te((n===D?0:n)&e),V=t.Wt}else{const t=Ji(r===D?0:r),e=Ji(n===D?0:n),o=3+t.length+e.length,a=Qi(4+o);a.Te(30837),a.Te(o),a.Oe(1),a.Oe(t.length),a.Ie(t),a.Oe(e.length),a.Ie(e),V=a.Wt}}catch{V=I}k===D&&(k=C?8:0),O===D&&(O=0!=k||d||A?20:10);const{Re:Z}=t;C&&Z!==D&&(O=O>Z?O:Z),l&&(O=O>45?O:45),A&&!u&&(O=O>51?O:51,S&&U!==D&&(L[4]=1),xs(gt(L),9,k),k=99);const H=v?Ts(N):0,G=H+Ts(L,P,B,V,m,h);if(G+(t[W]?67:0)>e)throw new Error(Ei);const K=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),{fe:q,we:Y,rawLastModDate:X}=Us({version:O,bitFlag:Is(c,f,w,A,k),compressionMethod:k,uncompressedSize:T,lastModDate:K<x?x:K>R?R:K,rawLastModDate:a,rawFilename:r,de:z,me:F,extraFieldLength:G}),J=Qi(g+Ts(r)+G),Q=J.Wt,$=gt(Q);return J.ke(n),J.Ie(q),J.Ie(r),v&&J.Ie(N),J.Ie(L),J.Ie(P),J.Ie(B),J.Ie(V),J.Ie(m),J.Ie(h),w&&(z||Ds($,18,0),F||Ds($,22,0)),{Ne:Q,Me:$,fe:q,we:Y,lastModDate:o,rawLastModDate:X,encrypted:A,compressed:C,version:O,compressionMethod:k,_e:j,he:I,ve:H,Ee:P,be:B,Se:V,ye:L,extraFieldLength:G}}(c=Object.assign({},c,l.ge,u.ge,w.ge,{signature:c[zo],crc32:c.crc32===D?c[zo]:c.crc32,offset:o.offset-y,diskNumberStart:E,[W]:o.options[W]})),S=function({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=I,i=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=gt(o),r&&(i=4,Ds(n,0,a))),{Le:o,Be:n,Pe:i}}(c),A=Ts(b.Ne,S.Le);z=await async function(e,n,o,a,i){const{ee:s,writer:c}=e,{keepOrder:l,dataDescriptor:u,ze:f,signal:w}=i,{We:d,$t:m,je:p,Ve:h}=a,y=e.options[W];let E,b,S,A,R,x,z=m,T=0;const U=l&&p?p.De:D;s.set(n,z);try{i.bufferedWrite||!l||e.le||e.ie||!u&&!f?(E=!0,e.ie++,x=i.createTempStream?await i.createTempStream():new TransformStream(D,D,{highWaterMark:F}),x.size=0,await Kn(c)):(x=c,await U,await I()),await Kn(x);const m=ts(c);e.te&&!E&&await cs(e,c),y&&!E&&Xi(a,e.offset-m);const{Ne:p}=d;E||await O();const h=$i(c),b=rs(e,c);if(z.diskNumberStart=h,E||(A=!0,R=c.size,await ls(x,p)),z=await async function(e,n,{diskNumberStart:o,De:a},i,s,c){const{We:l,Ze:u,He:f}=i,{fe:w,we:d,lastModDate:m,rawLastModDate:p,encrypted:h,compressed:y,version:E,compressionMethod:b,he:S,ve:A,Ee:g,_e:R,be:x,Se:F,ye:z}=l,{Le:T}=u,{rawFilename:U,lastAccessDate:I,creationDate:O,password:k,rawPassword:C,level:N,zip64:M,me:_,de:v,zipCrypto:L,dataDescriptor:B,directory:P,executable:W,versionMadeBy:j,rawComment:V,rawExtraField:Z,Ae:H,useWebWorkers:G,transferStreams:K,onstart:q,onprogress:Y,onend:X,signal:J,encryptionStrength:Q,extendedTimestamp:$,msDosCompatible:tt,internalFileAttributes:et,externalFileAttributes:rt,uid:nt,gid:ot,unixMode:at,symlink:it,setuid:st,setgid:ct,sticky:lt,unixExternalUpper:ut,msdosAttributesRaw:ft,msdosAttributes:wt,useCompressionStream:dt,passThrough:mt,format:pt,codecURI:ht}=c,yt={De:a,versionMadeBy:j,zip64:M,directory:Boolean(P),executable:Boolean(W),filenameUTF8:!0,rawFilename:U,commentUTF8:!0,rawComment:V,he:S,ve:A,Ee:g,be:x,Se:F,ye:z,rawExtraField:Z,Ae:H,extendedTimestamp:$,msDosCompatible:tt,internalFileAttributes:et,externalFileAttributes:rt,diskNumberStart:o,uid:nt,gid:ot,unixMode:at,symlink:Boolean(it),setuid:st,setgid:ct,sticky:lt,unixExternalUpper:ut,msdosAttributesRaw:ft,msdosAttributes:wt};let{crc32:Et,uncompressedSize:bt}=c,St=0;mt||(bt=0);const{writable:At}=n;if(e){const o=Te(Xn(e)),a=e.size,i={options:{codecType:cr,inputSize:a,level:N,rawPassword:C,password:k,encryptionStrength:Q,zipCrypto:h&&L,passwordVerification:h&&L&&p>>8&r,computeCrc32:!mt,compressed:y&&!mt,encrypted:h&&!mt,useWebWorkers:G,useCompressionStream:dt,transferStreams:K,format:pt,codecURI:ht,compressionMethod:b},config:s,ut:{signal:J,size:a,onstart:q,onprogress:Y,onend:X}};try{const e=await Wr({readable:o,writable:At},i);if(St=e.outputSize,n.size+=St,mt||(bt=e.inputSize,h&&!L||(Et=e.crc32)),!v&&St>=t||!_&&bt>=t)throw new Error(Ri)}catch(t){throw t.outputSize!==D&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,We:n,Ze:o},{zip64:a,zipCrypto:i,passThrough:s,dataDescriptor:c}){const{we:l,encrypted:u}=n,{Be:f,Pe:w}=o;u&&!i&&!s||t===D||(Ds(l,10,t),c&&Ds(f,w,t)),a?c&&(Fs(f,w+4,BigInt(e)),Fs(f,w+12,BigInt(r))):(Ds(l,14,e),Ds(l,18,r),c&&(Ds(f,w+4,e),Ds(f,w+8,r)))}({crc32:Et,compressedSize:St,uncompressedSize:bt,We:l,Ze:u},c),B&&await ls(n,T),Object.assign(yt,{uncompressedSize:bt,compressedSize:St,lastModDate:m,rawLastModDate:p,creationDate:O,lastAccessDate:I,encrypted:Boolean(h),zipCrypto:Boolean(L),size:f+St,compressionMethod:b,version:E,fe:w,we:d,signature:Et,crc32:!h||L||mt?Et:D,_e:R,me:_,de:v}),yt}(o,x,z,a,ft(),i),E||(A=!1),s.set(n,z),z.filename=n,E){if(await Promise.all([x.writable.getWriter().close(),U]),await I(),e.te&&await cs(e,c),S=!0,R=c.size,await O(),z.diskNumberStart=$i(c),z.offset=rs(e,c),y){const t=a.He;Xi(a,e.offset-ts(c)),z.size+=a.He-t}!function({rawFilename:t,encrypted:e,zip64:r,ve:n,crc32:o,compressedSize:a,uncompressedSize:i,me:s,de:c},l,{dataDescriptor:u,passThrough:f}){if(u||((!e||f&&o!==D)&&Ds(l,14,o),c||Ds(l,18,a),s||Ds(l,22,i)),r&&n){const e=g+Ts(t)+4;Fs(l,e,BigInt(i)),Fs(l,e+8,BigInt(a))}}(z,d.Me,i),await ls(c,d.Ne),await us(x.readable,c,w,t=>T+=t),c.size+=x.size,S=!1}else z.diskNumberStart=h,z.offset=b;return e.offset+=z.size,z}catch(t){if(S||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,E&&(e.offset+=T)}throw s.delete(n),t}finally{if(E&&e.ie--,h&&h(U),b&&b(),E&&x&&x.dispose)try{await x.dispose()}catch{}}async function I(){e.le=!0;const{ue:t}=e;e.ue=new Promise(t=>b=()=>{e.le=!1,t()}),await t}async function O(){es(c,Ts(d.Ne))&&await c.closeDisk()}}(o,i,s,{We:b,Ze:S,He:A,$t:m,je:d,Ve:h},c)}catch(t){throw o.ee.delete(i),t}finally{h&&h(d&&d.De)}return Object.assign(z,{name:i,comment:f,extraField:w,[mo]:z.internalFileAttributes,[po]:z.externalFileAttributes}),new No(z)}(o,i,s,c)}catch(t){throw o.re.delete(i),t}finally{const t=ji.shift();t?t():Wi--}}(c,o,i,s);l.add(u);const f=()=>l.delete(u);return Promise.prototype.then.call(u,f,f),Gi(c,u)}remove(t){const{re:e,ee:r}=this;if(typeof t==U&&(t=r.get(t)),t&&t.filename!==D){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=I,n={}){const o=this,{oe:a,writer:d}=this,{writable:m}=d;if(!(r instanceof Uint8Array))throw new Error(ii);if(Ts(r)>e)throw new Error(ai);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.ae.map(t=>t.Ge));const h=o.ae.filter(t=>t.error&&!t.Ke);if(h.length){const t=h.map(t=>t.error);h.forEach(t=>t.Ke=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const a=function(r){let n=0;for(const[,o]of r){const{rawFilename:r,ye:a,rawComment:i,be:s,Se:c,rawExtraField:l,Ae:u,extendedTimestamp:w,_e:d,lastModDate:m,me:h,de:y,uncompressedSize:E,compressedSize:b}=o,S=o.offset>=t,A=o.diskNumberStart>=e;let g,R;if(S||A||h||y){const t=4+(h?8:0)+(y?8:0)+(S?8:0)+(A?4:0),e=Qi(t);e.Te(1),e.Te(t-4),h&&e.Ue(E),y&&e.Ue(b),S&&e.Ue(o.offset),A&&e.ke(o.diskNumberStart),g=e.Wt}else g=I;o.he=g,o.qe=S,o.pe=A;const x=ws(m);if(w&&ds(x)){const t=Qi(9);t.Te(p),t.Te(5),t.Oe(d),t.ke(x),R=t.Wt}else R=I;o.Ee=R;const D=Ts(g,a,s,c,R,l,u);if(D>e)throw new Error(Ei);n+=f+Ts(r,i)+D}return n}(r.ee),{Ye:d,Xe:m,Je:h}=await async function(r,n,o){const{ee:a,writer:i}=r,c=new Uint8Array(n);await Kn(i);let l=0,u=0,w=$i(i),d=ts(i),m=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:p,rawFilename:h,he:y,ye:E,Ee:b,be:S,Se:A,rawExtraField:g,Ae:R,rawComment:x,versionMadeBy:D,fe:F,we:z,me:T,de:U,pe:I,qe:O,internalFileAttributes:k,externalFileAttributes:C,diskNumberStart:N,uncompressedSize:M,compressedSize:_}=n,v=Ts(y,E,b,S,A,g,R),L=f+Ts(h,x)+v;es(i,l+L-u)&&(await ls(i,c.slice(u,l)),u=l,m=0,await i.closeDisk()),0==r&&(w=$i(i),d=ts(i)),T||Ds(z,18,M),U||Ds(z,14,_),(O||I)&&n.version<45&&xs(z,0,45);const B=Qi(L);if(B.ke(s),B.Te(D),B.Ie(F.subarray(0,24)),B.Te(v),B.Te(Ts(x)),B.Te(I?e:N),B.Te(k),B.ke(C),B.ke(O?t:p),B.Ie(h),B.Ie(y),B.Ie(E),B.Ie(b),B.Ie(S),B.Ie(A),B.Ie(g),B.Ie(R),B.Ie(x),zs(c,B.Wt,l),l+=L,m++,o.onprogress)try{await o.onprogress(r+1,a.size,new No(n))}catch{}}return await ls(i,u?c.slice(u):c),{Ye:{diskNumber:w,diskOffset:d},Xe:{diskNumber:$i(i),Qe:m},Je:c}}(r,a,o),y=await async function(t,r,n){const o=ys(t,n,"signCentralDirectory");if(o){const n=await o(r),a=Ts(n);if(a>e)throw new Error(vi);const s=Qi(6+a);s.ke(i),s.Te(a),s.Ie(n);const{writer:c}=t;return es(c,Ts(s.Wt))&&await c.closeDisk(),await ls(c,s.Wt),6+a}return 0}(r,h,o);await async function(r,n,o,a){const{writer:i}=r,{Ye:s,Xe:f,$e:d}=a;let{er:m}=a,p=r.ee.size,h=s.diskNumber,y=rs(r,s);const E=Ts(n);if(E>e)throw new Error(ai);let b=ps(r,o,bo),S=$i(i);if(es(i,(b?98:w)+E)&&S++,y>=t||m>=t||p>=e||S>=e){if(!1===b)throw new Error(Ri);b=!0}const A=Qi(b?98:w);es(i,Ts(A.Wt)+E)&&await i.closeDisk(),S=$i(i);let g=S==f.diskNumber?f.Qe:0;b&&(A.ke(l),A.Ue(44),A.Te(45),A.Te(45),A.ke(S),A.ke(h),A.Ue(g),A.Ue(p),A.Ue(m),A.Ue(y),A.ke(u),A.ke(S),A.Ue(BigInt(rs(r,i))+BigInt(m)+BigInt(d)),A.ke(S+1),ps(r,o,"supportZip64SplitFile",!0)&&(S=e,h=e),g=e,p=e,y=t,m=t),A.ke(c),A.Te(S),A.Te(h),A.Te(g),A.Te(p),A.ke(m),A.ke(y),A.Te(E),await ls(i,A.Wt),E&&await ls(i,n)}(r,n,o,{Ye:d,Xe:m,er:a,$e:y})}(o,r,n),!Gn(d)&&ps(o,n,L)||await m.getWriter().close(),d.getData?d.getData():m}}class Zi{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new Vi(r,t),this.oe=new Set}transform(t){const e=this.zipWriter;let r;const{readable:n,writable:o}=new TransformStream({start(t){r=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Ki(e,t)}}()}});return qi(this,this.zipWriter.add(t,n),t=>r.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}});return qi(this,this.zipWriter.add(t,r),t=>e.error(t)),n}async close(t,e={}){const{zipWriter:r}=this,n=(await Promise.allSettled(Array.from(this.oe))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await Ki(r,t),t}try{return await r.close(t,e)}catch(t){throw await Ki(r,t),t}}}class Hi extends Promise{then(t,e){const{rr:r}=this;return r&&(r.Ke=!0),super.then(t,e)}}function Gi(t,e){const r=new Hi((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.rr=n,n.Ge=Promise.prototype.then.call(r,D,t=>n.error=t),t.ae.push(n),r}async function Ki(t,e){try{await t.writer.writable.abort(e)}catch{}}function qi(t,e,r){t.oe.add(e),e.catch(t=>{try{r(t)}catch{}})}function Yi(t){if(!t)return I;if(!(t instanceof Map))throw new Error(pi);let r=0,n=0;t.forEach((t,n)=>{if(tt(n,e,hi),!(t instanceof Uint8Array))throw new Error(yi);if(Ts(t)>e)throw new Error(Ei);r+=4+Ts(t)});const o=new Uint8Array(r),a=gt(o);return t.forEach((t,e)=>{xs(a,n,e),xs(a,n+2,Ts(t)),zs(o,t,n+4),n+=4+Ts(t)}),o}function Xi(t,e){const{We:r}=t;let{Ne:n,extraFieldLength:o}=r,a=64-(e+Ts(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=gt(i);xs(s,0,6534),xs(s,2,a-4);const c=n;r.Ne=n=new Uint8Array(Ts(c)+a),zs(n,c),zs(n,i,Ts(c));const l=gt(n);xs(l,28,o+a),r.Me=l,t.He+=a}function Ji(t){const e=new Uint8Array(4);gt(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function Qi(t){const e=new Uint8Array(t),r=gt(e);let n=0;return{Wt:e,Oe:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},Te:t=>{xs(r,n,t),n+=2},ke:t=>{Ds(r,n,t),n+=4},Ue:t=>{Fs(r,n,BigInt(t)),n+=8},Ie:t=>{zs(e,t,n),n+=Ts(t)},Ce:t=>n+=t}}function $i(t){const{diskNumber:e=0}=t;return e}function ts(t){const{diskOffset:e=0}=t;return e}function es(t,e){const{availableSize:r=F}=t;return e>r}function rs(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.ne:0)}function ns(t){const e=gt(t);let r=0;for(;r+4<=Ts(t);){const n=4+Rs(e,r+2);if(1==Rs(e,r))return ns(St(t.subarray(0,r),t.subarray(Math.min(r+n,Ts(t)))));r+=n}return t}async function os(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await us(Xn(e,{offset:r,size:n}),o,D,t=>a+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=a,t.offset+=a}}}async function as(t,e){const r=await Yn(t,e,g);if(Ts(r)<g)return g;const n=gt(r);return g+Rs(n,26)+Rs(n,28)}function is(t,{offset:e,diskNumberStart:r}){return e+(t.Gt?t.Gt(r):0)}function ss(){const t=new Uint8Array(4);return Ds(gt(t),0,o),t}async function cs(t,e){delete t.te,await ls(e,ss()),t.offset+=4}async function ls(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Ts(e),await n.write(e)}finally{n.releaseLock()}}async function us(t,e,r,n){const o=e.writable.getWriter();try{await t.pipeTo(new WritableStream({async write(t){await o.ready,await o.write(t),n(Ts(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function fs(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<Ai?Ai:e>gi?gi:e}}function ws(t){return Math.floor(t.getTime()/1e3)}function ds(t){return t>=bi&&t<=Si}function ms(t){return Math.min(Si,Math.max(bi,t))}function ps(t,e,r,n){const o=e[r]===D?t.options[r]:e[r];return o===D?n:o}function hs(t,e,r,n){const o=ps(t,e,r,n);if(null===o)return n;if(o!==D&&(typeof o.getTime!=T||Number.isNaN(o.getTime())))throw new Error(li);return o}function ys(t,e,r){return J(ps(t,e,r))}function Es(t,e,r,n,o){const a=bs(e,r,n),i=a===D?bs(t.options,r,n):a;return i===D?o:i}function bs(t,e,r){return t[e]===D?t[r]:t[e]}function Ss(t,e,r,n){return rt(ps(t,e,r,n))}function As(t){return t+5*(Math.floor(t/16383)+1)}function gs(t,e){return t===D?e===D||e>0:0!==t}function Rs(t,e){return t.getUint16(e,!0)}function xs(t,e,r){t.setUint16(e,r,!0)}function Ds(t,e,r){t.setUint32(e,r,!0)}function Fs(t,e,r){t.setBigUint64(e,r,!0)}function zs(t,e,r){t.set(e,r)}function Ts(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Us({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:a,lastModDate:i,rawLastModDate:s,rawFilename:c,de:l,me:u,extraFieldLength:f}){const w=Qi(26),d=w.Wt,m=gt(d);if(w.Te(e),w.Te(r),w.Te(n),s===D){const t=new Uint32Array(1),e=gt(t);xs(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),xs(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return w.ke(s),w.Ce(4),l||a!==D?w.ke(l?t:a):w.Ce(4),u||o!==D?w.ke(u?t:o):w.Ce(4),w.Te(Ts(c)),w.Te(f),{fe:d,we:m,rawLastModDate:s}}function Is(t,e,r,n,o){let a=0;return e&&(a|=h),r&&(a|=8),8!=o&&9!=o||(t>=0&&t<=3&&(a|=6),t>3&&t<=5&&(a|=4),9==t&&(a|=2)),n&&(a|=1),a}function Os(){return"application/octet-stream"}function ks(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=ft(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Cs(r,Ge)||Cs(t,Ge)||Cs(t,qe),decompression:Cs(n,Ge)||Cs(e,Ge)||Cs(e,qe),registered:!1},{compressionMethod:9,compression:!1,decompression:Cs(n,Ke)||Cs(e,Ke),registered:!1}];for(const t of Pe()){const e=We(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==T:D,decompression:e?typeof e.DecompressionStream==T:D,registered:!0})}return o}function Cs(t,e){if(!t)return!1;const{nr:r}=t;return r?r.includes(e):tr(t,e)}const Ns="2.8.61",Ms=1048576,_s=".zip.js-temp";function vs(t={}){const{thresholdBytes:e=Ms,directoryName:r=_s,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function a(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,i,s=0,c=!1;const l=new WritableStream({async write(i){c?await o.write(i):(t.push(i),s+=i.length,s>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let u=0;return{writable:l,readable:new ReadableStream({async pull(e){if(c){if(!i){const t=await n.getFile();i=t.stream().getReader()}const{value:t,done:r}=await i.read();r?e.close():e.enqueue(t)}else u<t.length?e.enqueue(t[u++]):e.close()},async cancel(t){i&&await i.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const Ls=1048576;function Bs(t={}){const{thresholdBytes:e=Ls}=t;return function(){const t=[];let r,n,o,a=0,i=!1;const s=new WritableStream({async write(o){i?await r.write(o):(t.push(o),a+=o.length,a>e&&await async function(){const e=new TransformStream;n=Ue(e.readable),r=e.writable.getWriter(),i=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(i){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const Ps=1048576,Ws=".zip.js-temp",js="createSyncAccessHandle is only available in dedicated workers";function Vs(t={}){const{thresholdBytes:e=Ps,directoryName:r=Ws,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(js);const o=n||(()=>navigator.storage.getDirectory());let a;function i(){return a||(a=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),a}return function(){const t=[];let r,n,o=0,a=!1,s=0,c=0;const l=new WritableStream({async write(c){a?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),a=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let u=0;return{writable:l,readable:new ReadableStream({pull(e){if(a){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else u<t.length?e.enqueue(t[u++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{Et({baseURI:import.meta.url})}catch{}const Zs="deflate",Hs="deflate-raw",Gs="deflate64-raw",Ks="gzip";let qs,Ys,Xs,Js,Qs;function $s(t,e,r={}){if(!qs){const t=new Error("WASM module not loaded");throw t.cause=Qs,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,a="number"==typeof r.inBufferSize?r.inBufferSize:65536;return new TransformStream({start(){try{let r;if(this.ar=Ys(o),this.in=Ys(a),this.inBufferSize=a,!this.ar||!this.in)throw new Error("allocation failed");if(this.ir=new Uint8Array(o),t?(this.sr=qs.deflate_process,this.cr=qs.deflate_last_consumed,this.lr=qs.deflate_end,this.ur=qs.deflate_new(),r=e===Ks?qs.deflate_init_gzip(this.ur,n):e===Hs?qs.deflate_init_raw(this.ur,n):qs.deflate_init(this.ur,n)):e===Gs?(this.sr=qs.inflate9_process,this.cr=qs.inflate9_last_consumed,this.lr=qs.inflate9_end,this.ur=qs.inflate9_new(),r=qs.inflate9_init_raw(this.ur)):(this.sr=qs.inflate_process,this.cr=qs.inflate_last_consumed,this.lr=qs.inflate_end,this.ur=qs.inflate_new(),r=e===Hs?qs.inflate_init_raw(this.ur):e===Ks?qs.inflate_init_gzip(this.ur):qs.inflate_init(this.ur)),0!==r)throw new Error("init failed:"+r)}catch(t){throw i(this),t}},transform(e,r){try{const n=e,a=new Uint8Array(Js.buffer),i=this.sr,s=this.cr,c=this.ar,l=this.ir;let u=0;for(;u<n.length;){const e=Math.min(n.length-u,32768);if((!this.in||this.inBufferSize<e)&&(this.in&&Xs&&(Xs(this.in),this.in=0),this.in=Ys(e),this.inBufferSize=e,!this.in))throw new Error("allocation failed");a.set(n.subarray(u,u+e),this.in);const f=i(this.ur,this.in,e,c,o,0),w=16777215&f;if(w&&(l.set(a.subarray(c,c+w),0),r.enqueue(l.slice(0,w))),!t){const t=f>>24&255,e=128&t?t-256:t;if(e<0)throw new Error("process error:"+e)}const d=s(this.ur);if(0===d)break;u+=d}}catch(t){i(this),r.error(t)}},flush(e){try{const r=new Uint8Array(Js.buffer),n=this.sr,a=this.ar,i=this.ir;for(;;){const s=n(this.ur,0,0,a,o,4),c=16777215&s,l=s>>24&255;if(!t){const t=128&l?l-256:l;if(t<0)throw new Error("process error:"+t)}if(c&&(i.set(r.subarray(a,a+c),0),e.enqueue(i.slice(0,c))),1===l||0===c)break}}catch(t){e.error(t)}finally{const t=i(this);0!==t&&e.error(new Error("end error:"+t))}},cancel(){i(this)}});function i(t){let e=0;return t.ur&&t.lr&&(e=t.lr(t.ur)),t.ur=0,t.in&&Xs&&Xs(t.in),t.in=0,t.ar&&Xs&&Xs(t.ar),t.ar=0,e}}class tc{constructor(t=Zs,e){return $s(!0,t,e)}}class ec{constructor(t=Zs,e){return $s(!1,t,e)}}tc.At=!0,ec.At=!0,tc.nr=[Zs,Hs,Ks],ec.nr=[Zs,Hs,Ks,Gs];let rc,nc=!1;function oc(){rc=null,async function(){await Promise.allSettled(_r.map(t=>(Gr(t),t.terminate()))),dr=D,mr=!1}(),nc=!1,qs=Ys=Xs=Js=Qs=null}!function({wr:t}){hr=t}({wr:t=>{if(!rc){let{wasmURI:e}=t;typeof e==T&&(e=e()),rc=async function(t,{baseURI:e}){if(!nc)try{await async function(t,e){let r,n;try{try{n=new URL(t,e)}catch{}const o=await fetch(n);r=await o.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;r=function(t){const e=t.split(",")[1],r=atob(e),n=r.length,o=new Uint8Array(n);for(let t=0;t<n;++t)o[t]=r.charCodeAt(t);return o.buffer}(t)}!function(t){if(qs=t,({malloc:Ys,free:Xs,memory:Js}=qs),"function"!=typeof Ys||"function"!=typeof Xs||!Js)throw qs=Ys=Xs=Js=null,new Error("Invalid WASM module")}((await WebAssembly.instantiate(r)).instance.exports)}(t,e),nc=!0}catch(t){throw function(t){Qs=t}(t),t}}(e,t).catch(t=>{throw rc=null,t})}return rc}}),Et({CompressionStreamFallback:tc,DecompressionStreamFallback:ec}),Et({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});export{yn as BlobReader,En as BlobWriter,dn as Data64URIReader,mn as Data64URIWriter,Ko as ERR_AMBIGUOUS_ARCHIVE,Mo as ERR_BAD_FORMAT,Lo as ERR_CENTRAL_DIRECTORY_NOT_FOUND,oi as ERR_DUPLICATED_NAME,Wo as ERR_ENCRYPTED,qo as ERR_ENCRYPTED_CENTRAL_DIRECTORY,Go as ERR_ENTRY_DATA_OUT_OF_BOUNDS,vo as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,_o as ERR_EOCDR_NOT_FOUND,Po as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,Qr as ERR_HTTP_RANGE,$r as ERR_HTTP_RESOURCE_CHANGED,jt as ERR_INVALID_AUTHENTICATION_CODE,Oe as ERR_INVALID_CODEC_DEFINITION,Ce as ERR_INVALID_CODEC_MODULE,ai as ERR_INVALID_COMMENT,ii as ERR_INVALID_COMMENT_TYPE,Ze as ERR_INVALID_COMPRESSED_DATA,He as ERR_INVALID_CRC32,li as ERR_INVALID_DATE,wi as ERR_INVALID_ENCRYPTION_STRENGTH,si as ERR_INVALID_ENTRY_COMMENT,ci as ERR_INVALID_ENTRY_COMMENT_TYPE,ui as ERR_INVALID_ENTRY_NAME,pi as ERR_INVALID_EXTRAFIELD,Ei as ERR_INVALID_EXTRAFIELD_DATA,yi as ERR_INVALID_EXTRAFIELD_DATA_TYPE,hi as ERR_INVALID_EXTRAFIELD_TYPE,Jo as ERR_INVALID_FILENAME_VALIDATION,q as ERR_INVALID_FUNCTION_OPTION,Ii as ERR_INVALID_GID,_i as ERR_INVALID_LEVEL,Qo as ERR_INVALID_MAX_APPENDED_DATA_SIZE,nt as ERR_INVALID_MAX_WORKERS,Ni as ERR_INVALID_MSDOS_ATTRIBUTES,Mi as ERR_INVALID_MSDOS_DATA,Pt as ERR_INVALID_PASSWORD,X as ERR_INVALID_PASSWORD_TYPE,Y as ERR_INVALID_SIGNAL,Wt as ERR_INVALID_SIGNATURE,vi as ERR_INVALID_SIGNATURE_DATA,Xo as ERR_INVALID_STRICTNESS,Ui as ERR_INVALID_UID,Ve as ERR_INVALID_UNCOMPRESSED_SIZE,ki as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,Ci as ERR_INVALID_UNIX_ID_SIZE,Oi as ERR_INVALID_UNIX_MODE,fi as ERR_INVALID_VERSION,tn as ERR_ITERATOR_COMPLETED_TOO_SOON,Bo as ERR_LOCAL_FILE_HEADER_NOT_FOUND,Ho as ERR_OVERLAPPING_ENTRY,ke as ERR_RESERVED_COMPRESSION_METHOD,Zo as ERR_SPLIT_ZIP_FILE,Di as ERR_UNDEFINED_COMPRESSION_METHOD,zi as ERR_UNDEFINED_READER,xi as ERR_UNDEFINED_UNCOMPRESSED_SIZE,Fi as ERR_UNDETERMINED_SIZE,Yo as ERR_UNSAFE_FILENAME,Vo as ERR_UNSUPPORTED_COMPRESSION,js as ERR_UNSUPPORTED_CONTEXT,Zt as ERR_UNSUPPORTED_CRYPTO_API,jo as ERR_UNSUPPORTED_ENCRYPTION,mi as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,di as ERR_UNSUPPORTED_ENCRYPTION_USDZ,Ri as ERR_UNSUPPORTED_FORMAT,$o as ERR_UNSUPPORTED_UINT64,wr as ERR_WORKER_STARTUP_TIMEOUT,en as ERR_WRITER_NOT_INITIALIZED,Ti as ERR_ZIP_NOT_EMPTY,Bn as HttpRangeReader,Ln as HttpReader,fn as Reader,jn as SplitDataReader,Vn as SplitDataWriter,bn as TextReader,Sn as TextWriter,Pn as Uint8ArrayReader,Wn as Uint8ArrayWriter,Ns as VERSION,ia as WARNING_APPENDED_DATA,ra as WARNING_COMPRESSED_PATCHED_DATA,la as WARNING_DUPLICATE_FILENAME,na as WARNING_MALFORMED_EXTRA_FIELD,fa as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,wa as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,da as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,ua as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,sa as WARNING_PREPENDED_DATA,ca as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,ea as WARNING_UNKNOWN_VERSION,oa as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,ta as WARNING_UNSORTED_CENTRAL_DIRECTORY,aa as WARNING_WRAPPED_ENTRIES_COUNT,wn as Writer,Sa as ZipReader,Aa as ZipReaderStream,Vi as ZipWriter,Zi as ZipWriterStream,mt as configure,Bs as createBlobTempStream,vs as createOPFSTempStream,Vs as createSyncAccessHandleTempStream,Os as getMimeType,Pe as getRegisteredCodecs,ks as getSupportedCompressionMethods,ga as isZipFile,ve as registerCodec,bt as resetConfiguration,oc as terminateWorkers,Le as unregisterCodec};
|
|
1
|
+
const t=4294967295,e=65535,r=255,n=67324752,o=134695760,a=o,i=84233040,s=33639248,c=101010256,l=101075792,u=117853008,f=46,w=22,d=20,m=56,p=21589,h=2048,y=61440,E=16384,b=2048,S=1024,A="/",g=30,R=new Date(2107,11,31,23,59,58),x=new Date(1980,0,1),D=void 0,F=1/0,z="undefined",T="function",I="string",U=new Uint8Array,O="password",k="rawPassword",C="passThrough",N="signal",M="useWebWorkers",_="useCompressionStream",v="transferStreams",L="preventClose",P="dataDescriptor",B="offset",W="usdz",j="maxAppendedDataSize",V="filename",Z="comment",H="strict",G="balanced",K="tolerant",q="Invalid option (must be a function)",Y="Invalid signal (must be an AbortSignal instance)",X="Invalid password (password must be a string, rawPassword must be a Uint8Array)";function J(t){if(t&&typeof t!=T)throw new Error(q);return t}function Q(t){if(t&&(typeof t.addEventListener!=T||"boolean"!=typeof t.aborted))throw new Error(Y);return t||D}function $(t,e){if(t&&typeof t!=I||e&&!(e instanceof Uint8Array))throw new Error(X)}function tt(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function et(t,e,r){t!==D&&tt(t,e,r)}function rt(t){return typeof t==I&&t.trim()?Number(t):t}const nt="Invalid maxWorkers (must be an integer greater than 0)";let ot=2;try{typeof navigator!=z&&navigator.hardwareConcurrency&&(ot=navigator.hardwareConcurrency)}catch{}const at={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:ot,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=z&&CompressionStream,DecompressionStream:typeof DecompressionStream!=z&&DecompressionStream},it="maxWorkers",st=["chunkSize",it,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],ct=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],lt=["baseURI","wasmURI","workerURI","useCompressionStream","useWebWorkers","transferStreams",...st,...ct],ut={...at};function ft(){return ut}function wt(t){return dt(t.chunkSize)}function dt(t){return t=rt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function mt(t){Object.assign(ut,pt(yt(t)))}function pt(t){const e={};for(const r of lt){const n=t[r];n!==D&&(e[r]=ht(r,n))}return e}function ht(t,e){if(st.includes(t)){if(e=rt(e),t==it&&(!Number.isInteger(e)||e<1))throw new Error(nt)}else ct.includes(t)&&J(e);return e}function yt(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===D&&r===D)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===D&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===D&&(n.DecompressionStreamFallback=r),n}function Et(t){const e=pt(yt(t));Object.assign(at,e),Object.assign(ut,e)}function bt(){for(const t of lt)delete ut[t];Object.assign(ut,at)}function St(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function At(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function gt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const Rt=[[],[],[],[],[],[],[],[]];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;Rt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Rt[e-1][t];Rt[e][t]=r>>>8^Rt[0][255&r]}const[xt,Dt,Ft,zt,Tt,It,Ut,Ot]=Rt;class kt{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),a=r-8;for(;n<=a;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=Ot[255&t]^Ut[t>>>8&255]^It[t>>>16&255]^Tt[t>>>24&255]^zt[255&r]^Ft[r>>>8&255]^Dt[r>>>16&255]^xt[r>>>24&255]}}for(;n<r;n++)e=e>>>8^xt[255&(e^t[n])];this.o=e}get(){return~this.o}}class Ct extends TransformStream{constructor(){let t;const e=new kt;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function Nt(t){if(typeof TextEncoder==z){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const Mt={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const r=t[t.length-1],n=Mt.l(r);return 32===n?t.concat(e):Mt.m(e,n,0|r,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const r=t[e-1];return 32*(e-1)+Mt.l(r)},h(t,e){if(32*t.length<e)return t;const r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=Mt.S(e,t[r-1]&2147483648>>e-1,1)),t},S:(t,e,r)=>32===t?e:(r?0|e:e<<32-t)+1099511627776*t,l:t=>Math.round(t/1099511627776)||32,m(t,e,r,n){for(void 0===n&&(n=[]);e>=32;e-=32)n.push(r),r=0;if(0===e)return n.concat(t);for(let o=0;o<t.length;o++)n.push(r|t[o]>>>e),r=t[o]<<32-e;const o=t.length?t[t.length-1]:0,a=Mt.l(o);return n.push(Mt.S(e+a&31,e+a>32?r:n.pop(),1)),n}},_t={bytes:{A(t){const e=Mt.bitLength(t)/8,r=new Uint8Array(e);let n;for(let o=0;o<e;o++)3&o||(n=t[o/4]),r[o]=n>>>24,n<<=8;return r},R(t){const e=[];let r,n=0;for(r=0;r<t.length;r++)n=n<<8|t[r],3&~r||(e.push(n),n=0);return 3&r&&e.push(Mt.S(8*(3&r),n)),e}}},vt=class{constructor(t){const e=this;e.blockSize=512,e.D=[1732584193,4023233417,2562383102,271733878,3285377520],e.F=[1518500249,1859775393,2400959708,3395469782],t?(e.T=t.T.slice(0),e.I=t.I.slice(0),e.U=t.U):e.reset()}reset(){const t=this;return t.T=t.D.slice(0),t.I=[],t.U=0,t}update(t){const e=this;"string"==typeof t&&(t=_t.O.R(t));const r=e.I=Mt.concat(e.I,t),n=e.U,o=e.U=n+Mt.bitLength(t);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const a=new Uint32Array(r);let i=0;for(let t=e.blockSize+n-(e.blockSize+n&e.blockSize-1);t<=o;t+=e.blockSize)e.C(a.subarray(16*i,16*(i+1))),i+=1;return r.splice(0,16*i),e}N(){const t=this;let e=t.I;const r=t.T;e=Mt.concat(e,[Mt.S(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t.U/4294967296)),e.push(0|t.U);e.length;)t.C(e.splice(0,16));return t.reset(),r}M(t,e,r,n){return t<=19?e&r|~e&n:t<=39?e^r^n:t<=59?e&r|e&n|r&n:t<=79?e^r^n:void 0}_(t,e){return e<<t|e>>>32-t}C(t){const e=this,r=e.T,n=Array(80);for(let e=0;e<16;e++)n[e]=t[e];let o=r[0],a=r[1],i=r[2],s=r[3],c=r[4];for(let t=0;t<=79;t++){t>=16&&(n[t]=e._(1,n[t-3]^n[t-8]^n[t-14]^n[t-16]));const r=e._(5,o)+e.M(t,a,i,s)+c+n[t]+e.F[Math.floor(t/20)]|0;c=s,s=i,i=e._(30,a),a=o,o=r}r[0]=r[0]+o|0,r[1]=r[1]+a|0,r[2]=r[2]+i|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0}},Lt={importKey:t=>new Lt.v(_t.bytes.R(t)),L(t,e,r,n){if(r=r||1e4,n<0||r<0)throw new Error("invalid params to pbkdf2");const o=1+(n>>5)<<2;let a,i,s,c,l;const u=new ArrayBuffer(o),f=new DataView(u);let w=0;const d=Mt;for(e=_t.bytes.R(e),l=1;w<(o||1);l++){for(a=i=t.encrypt(d.concat(e,[l])),s=1;s<r;s++)for(i=t.encrypt(i),c=0;c<i.length;c++)a[c]^=i[c];for(s=0;w<(o||1)&&s<a.length;s++)f.setInt32(w,a[s]),w+=4}return u.slice(0,n/8)},v:class{constructor(t){const e=this,r=e.P=vt,n=[[],[]];e.B=[new r,new r];const o=e.B[0].blockSize/32;t.length>o&&(t=(new r).update(t).N());for(let e=0;e<o;e++)n[0][e]=909522486^t[e],n[1][e]=1549556828^t[e];e.B[0].update(n[0]),e.B[1].update(n[1]),e.W=new r(e.B[0])}reset(){const t=this;t.W=new t.P(t.B[0]),t.j=!1}update(t){this.j=!0,this.W.update(t)}digest(){const t=this,e=t.W.N(),r=new t.P(t.B[1]).update(e).N();return t.reset(),r}encrypt(t){if(this.j)throw new Error("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},Pt=typeof crypto!=z&&typeof crypto.getRandomValues==T,Bt="Invalid password",Wt="Invalid signature",jt=Wt,Vt="zipjs-abort-check-password",Zt="Crypto API not supported";function Ht(t){if(Pt)return crypto.getRandomValues(t);throw new Error(Zt)}const Gt=16,Kt={name:"PBKDF2"},qt=Object.assign({hash:{name:"HMAC"}},Kt),Yt=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},Kt),Xt=["deriveBits"],Jt=[8,12,16],Qt=[16,24,32],$t=10,te=[0,0,0,0],ee=typeof crypto!=z,re=ee&&crypto.subtle,ne=ee&&typeof re!=z,oe=_t.bytes,ae=class{constructor(t){const e=this;e.V=[[[],[],[],[],[]],[[],[],[],[],[]]],e.V[0][0][0]||e.Z();const r=e.V[0][4],n=e.V[1],o=t.length;let a,i,s,c=1;if(4!==o&&6!==o&&8!==o)throw new Error("invalid aes key size");for(e.F=[i=t.slice(0),s=[]],a=o;a<4*o+28;a++){let t=i[a-1];(a%o===0||8===o&&a%o===4)&&(t=r[t>>>24]<<24^r[t>>16&255]<<16^r[t>>8&255]<<8^r[255&t],a%o===0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),i[a]=i[a-o]^t}for(let t=0;a;t++,a--){const e=i[3&t?a:a-4];s[t]=a<=4||t<4?e:n[0][r[e>>>24]]^n[1][r[e>>16&255]]^n[2][r[e>>8&255]]^n[3][r[255&e]]}}encrypt(t){return this.H(t,0)}decrypt(t){return this.H(t,1)}Z(){const t=this.V[0],e=this.V[1],r=t[4],n=e[4],o=[],a=[];let i,s,c,l;for(let t=0;t<256;t++)a[(o[t]=t<<1^283*(t>>7))^t]=t;for(let u=i=0;!r[u];u^=s||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,r[u]=a,n[a]=u,l=o[c=o[s=o[u]]];let f=16843009*l^65537*c^257*s^16843008*u,w=257*o[a]^16843008*a;for(let r=0;r<4;r++)t[r][u]=w=w<<24^w>>>8,e[r][a]=f=f<<24^f>>>8}for(let r=0;r<5;r++)t[r]=t[r].slice(0),e[r]=e[r].slice(0)}H(t,e){if(4!==t.length)throw new Error("invalid aes block size");const r=this.F[e],n=r.length/4-2,o=[0,0,0,0],a=this.V[e],i=a[0],s=a[1],c=a[2],l=a[3],u=a[4];let f,w,d,m=t[0]^r[0],p=t[e?3:1]^r[1],h=t[2]^r[2],y=t[e?1:3]^r[3],E=4;for(let t=0;t<n;t++)f=i[m>>>24]^s[p>>16&255]^c[h>>8&255]^l[255&y]^r[E],w=i[p>>>24]^s[h>>16&255]^c[y>>8&255]^l[255&m]^r[E+1],d=i[h>>>24]^s[y>>16&255]^c[m>>8&255]^l[255&p]^r[E+2],y=i[y>>>24]^s[m>>16&255]^c[p>>8&255]^l[255&h]^r[E+3],E+=4,m=f,p=w,h=d;for(let t=0;t<4;t++)o[e?3&-t:t]=u[m>>>24]<<24^u[p>>16&255]<<16^u[h>>8&255]<<8^u[255&y]^r[E++],f=m,m=p,p=h,h=y,y=f;return o}},ie=class{constructor(t,e){this.G=t,this.K=e,this.Y=e}reset(){this.Y=this.K}update(t){return this.X(this.G,t,this.Y)}J(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,r=t>>8&255,n=255&t;255===e?(e=0,255===r?(r=0,255===n?n=0:++n):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=n}return t}$(t){0===(t[0]=this.J(t[0]))&&(t[1]=this.J(t[1]))}X(t,e,r){let n;if(!(n=e.length))return[];const o=Mt.bitLength(e);for(let o=0;o<n;o+=4){this.$(r);const n=t.encrypt(r);e[o]^=n[0],e[o+1]^=n[1],e[o+2]^=n[2],e[o+3]^=n[3]}return Mt.h(e,o)}},se=Lt.v;let ce=ee&&ne&&typeof re.importKey==T,le=ee&&ne&&typeof re.deriveBits==T;class ue extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){super({start(){we(this,t,e,r)},async transform(t,e){const r=this,{password:o,strength:a,et:i,ready:s}=r;o?(await async function(t,e,r,n){const o=await me(t,e,r,he(n,0,Jt[e])),a=he(n,Jt[e]);if(o[0]!=a[0]||o[1]!=a[1])throw new Error(Bt)}(r,a,o,he(t,0,Jt[a]+2)),t=he(t,Jt[a]+2),n?e.error(new Error(Vt)):i()):await s;const c=new Uint8Array(t.length-$t-(t.length-$t)%Gt);e.enqueue(de(r,t,c,0,$t,!0))},async flush(t){const{nt:e,ot:r,it:n,ready:a}=this;if(r&&e){await a;const i=he(n,0,n.length-$t),s=he(n,n.length-$t);let c=U;if(i.length){const t=Ee(oe,i);r.update(t);const n=e.update(t);c=ye(oe,n)}const l=he(ye(oe,r.digest()),0,$t);let u=n.length<$t?1:0;for(let t=0;t<$t;t++)u|=l[t]^s[t];if(u&&o)throw new Error(jt);t.enqueue(c)}}})}}class fe extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){super({start(){we(this,t,e,r)},async transform(t,e){const r=this,{password:n,strength:o,et:a,ready:i}=r;let s=U;n?(s=await async function(t,e,r){const n=Ht(new Uint8Array(Jt[e]));return St(n,await me(t,e,r,n))}(r,o,n),a()):await i;const c=new Uint8Array(s.length+t.length-t.length%Gt);c.set(s,0),e.enqueue(de(r,t,c,s.length,0))},async flush(t){const{nt:e,ot:r,it:n,ready:o}=this;if(r&&e){await o;let a=U;if(n.length){const t=e.update(Ee(oe,n));r.update(t),a=ye(oe,t)}const i=ye(oe,r.digest()).slice(0,$t);t.enqueue(St(a,i))}}})}}function we(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.et=e),password:pe(e,r),strength:n-1,it:U})}function de(t,e,r,n,o,a){const{nt:i,ot:s,it:c}=t;c.length&&(e=St(c,e));const l=e.length-o;let u;for(r=function(t,e){if(e&&e>t.length){const r=t;(t=new Uint8Array(e)).set(r,0)}return t}(r,n+(l-l%Gt)),u=0;u<=l-Gt;u+=Gt){const t=Ee(oe,he(e,u,u+Gt));a&&s.update(t);const o=i.update(t);a||s.update(o),r.set(ye(oe,o),u+n)}return t.it=he(e,u),r}async function me(t,e,r,n){t.password=null;const o=await async function(t,e,r,n,o){if(!ce)return Lt.importKey(e);try{return await re.importKey("raw",e,r,!1,o)}catch{return ce=!1,Lt.importKey(e)}}(0,r,qt,0,Xt),a=await async function(t,e,r){if(!le)return Lt.L(e,t.salt,Yt.iterations,r);try{return await re.deriveBits(t,e,r)}catch{return le=!1,Lt.L(e,t.salt,Yt.iterations,r)}}(Object.assign({salt:n},Yt),o,8*(2*Qt[e]+2)),i=new Uint8Array(a),s=Ee(oe,he(i,0,Qt[e])),c=Ee(oe,he(i,Qt[e],2*Qt[e])),l=he(i,2*Qt[e]);return Object.assign(t,{keys:{key:s,st:c,passwordVerification:l},nt:new ie(new ae(s),Array.from(te)),ot:new se(c)}),l}function pe(t,e){return e===D?Nt(t):e}function he(t,e,r){return t.subarray(e,r)}function ye(t,e){return t.A(e)}function Ee(t,e){return t.R(e)}class be extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){Ae(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=ge(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(Bt);t=t.subarray(12)}n?e.error(new Error(Vt)):e.enqueue(ge(r,t))}})}}class Se extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){Ae(this,t,e,r)},transform(t,e){const r=this;let n,o;if(r.password||r.rawPassword){r.password=r.rawPassword=null;const e=Ht(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Re(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Re(r,t),o),e.enqueue(n)}})}}function Ae(t,e,r,n){Object.assign(t,{password:e,rawPassword:r,passwordVerification:n}),function(t,e,r){const n=[305419896,591751049,878082192];if(Object.assign(t,{keys:n,ct:new kt(n[0]),lt:new kt(n[2])}),r)for(let e=0;e<r.length;e++)xe(t,r[e]);else for(let r=0;r<e.length;r++)xe(t,e.charCodeAt(r))}(t,e,r)}function ge(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=De(t)^e[n],xe(t,r[n]);return r}function Re(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=De(t)^e[n],xe(t,e[n]);return r}function xe(t,e){let[,r]=t.keys;t.ct.append([e]);const n=~t.ct.get();r=ze(Math.imul(ze(r+Fe(n)),134775813)+1),t.lt.append([r>>>24]);const o=~t.lt.get();t.keys=[n,r,o]}function De(t){const e=2|t.keys[2];return Fe(Math.imul(e,1^e)>>>8)}function Fe(t){return 255&t}function ze(t){return 4294967295&t}function Te(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}function Ie(t,e){t=Te(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=T||new Blob([]).stream()instanceof ReadableStream)return new Response(t).blob().then(t=>e?new Blob([t],r):t);const n=[];return t.pipeTo(new WritableStream({write(t){n.push(t)}})).then(()=>new Blob(n,r))}function Ue(t){if(t instanceof WritableStream)return t;const e=t.getWriter();return new WritableStream({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Oe="Invalid codec definition",ke="Reserved compression method",Ce="Invalid codec module",Ne=[0,8,9,99],Me=new Map,_e=new Map;function ve(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:a,DecompressionStream:i,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=I||!n.length)throw new Error(Oe);if(Ne.includes(r))throw new Error(ke);const c=typeof a==T||typeof i==T;if(!(c||typeof o==I&&o.length))throw new Error(Oe);Me.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&je(n,{CompressionStream:a,DecompressionStream:i})}function Le(t){const e=Me.get(t);if(e){let r;Me.delete(t),Me.forEach(t=>r=r||t.format==e.format),r||_e.delete(e.format)}}function Pe(t){return Me.get(t)}function Be(){return Array.from(Me.values(),t=>Object.assign({},t,_e.get(t.format)))}function We(t){return _e.get(t)}function je(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=T&&typeof n!=T)throw new Error(Ce);_e.set(t,{CompressionStream:r,DecompressionStream:n})}const Ve="Invalid uncompressed size",Ze="Invalid compressed data",He=Wt,Ge="deflate-raw",Ke="deflate64-raw",qe="gzip",Ye=[31,139,8];class Xe extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:a,useCompressionStream:i,zipCrypto:s,computeCrc32:c,level:l,deflate64:u,format:f,compressionMethod:w,inputSize:d}=t,m=this;let p,h,y,E=super.readable;const b=f&&We(f),S=c&&o&&!u&&!b&&(!a||s)&&Boolean(i&&n);if(a&&!s||!c||S||(p=new Ct,E=ar(E,p)),o)if(b)E=ir(E,nr(b.CompressionStream,f,{level:l,chunkSize:e,compressionMethod:w,uncompressedSize:d}));else if(S)y=new Je,E=ir(E,new n(qe)),E=ar(E,y);else try{E=or(E,i,{level:l,chunkSize:e},n,r)}catch(t){let e;try{e=new n(qe)}catch{throw t}E=ir(E,e),E=ar(E,new Je)}a&&(s?E=ar(E,new Se(t)):(h=new fe(t),E=ar(E,h))),rr(m,E,()=>{a&&!s||!c||(m.crc32=S?y.crc32:new DataView(p.value.buffer).getUint32(0))})}}class Je extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=St(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(St(r.subarray(0,i),t.subarray(0,a-i))),r=St(r.subarray(i),t.subarray(a-i))},flush(){const e=gt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Qe extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:a,checkCrc32:i,crc32:s,compressed:c,useCompressionStream:l,deflate64:u,format:f,compressionMethod:w,rawBitFlag:d,outputSize:m}=t;let p,h,y=super.readable;if(a&&(o?y=ar(y,new be(t)):(h=new ue(t),y=ar(y,h))),c){const t=f&&We(f);if(t)y=ir(y,nr(t.DecompressionStream,f,{chunkSize:e,compressionMethod:w,rawBitFlag:d,uncompressedSize:m}));else try{y=or(y,l,{chunkSize:e,deflate64:u},n,r)}catch(t){if(u||m===D)throw t;let e;try{e=new n(qe)}catch{throw t}y=function(t,e,r){const n=new kt;let o,a,i,s=0,c=!1;const l=new Promise((t,e)=>{a=t,i=e});l.catch(()=>{}),r||a();const u=new TransformStream({start(t){const e=new Uint8Array(10);e.set(Ye),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){c=!0,w();try{await l}finally{d()}const e=new Uint8Array(8),o=gt(e);o.setUint32(0,n.get(),!0),o.setUint32(4,r,!0),t.enqueue(e)},cancel(t){i(t)}}),f=new TransformStream({transform(t,e){n.append(t),s+=t.length,s>=r?a():c&&w(),e.enqueue(t)},cancel(t){i(t)}});return t=ar(t,u),ar(t=ir(t,e),f);function w(){d(),o=setTimeout(()=>i(new Error(Ve)),5e3)}function d(){clearTimeout(o)}}(y,e,m)}y=function(t){const e=t.getReader();return new ReadableStream({async pull(t){let r;try{r=await e.read()}catch(t){if(t&&t.message)throw t;const e=new Error(Ze);throw e.cause=t,e}const{value:n,done:o}=r;o?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}(y)}i&&(p=new Ct,y=ar(y,p)),rr(this,y,()=>{if(i){const t=new DataView(p.value.buffer);if(s!=t.getUint32(0,!1))throw new Error(He)}})}}const $e=new Map;function tr(t,e){if(!t)return!1;let r=$e.get(t);r||(r=new Map,$e.set(t,r));let n=r.get(e);if(n===D){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function er(t){return tr(t,Ge)}function rr(t,e,r){e=ar(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function nr(t,e,r){if(!t)throw new Error("Compression method not supported");return new t(e,r)}function or(t,e,r,n,o){const a=e&&n?n:o||n,i=r.deflate64?Ke:Ge;let s;try{s=new a(i,r)}catch(t){if(!e||!o||a==o)throw t;s=new o(i,r)}return ir(t,s)}function ar(t,e){return Te(t).pipeThrough(e)}function ir(t,e){const r=e.writable.getWriter(),n=t.getReader();return async function(){try{for(;;){await r.ready;const t=await n.read();if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await async function(t,e){try{await t.abort(e)}catch{}}(r,t),await async function(t,e){try{await t.cancel(e)}catch{}}(n,t)}}(),e.readable}const sr="data",cr="deflate",lr="inflate";class ur extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(cr)?o=Xe:n.startsWith(lr)&&(o=Qe),r.outputSize=0;let a=0;const i=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:a})}}),l=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==D&&r.outputSize>t.outputSize))throw new Error(Ve)},flush(){const{crc32:t}=i;Object.assign(r,{crc32:t,inputSize:a})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(i).pipeThrough(l)})}}class fr extends TransformStream{constructor(t){const e=[];let r=0;function n(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],a=t-o;r.length<=a?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,a),o),e[0]=r.subarray(a),o+=a)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=65536),super({transform(o,a){for(e.push(o),r+=o.length;r>t;)a.enqueue(n())},flush(t){r&&t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r))}})}}const wr="Worker startup timeout";let dr,mr,pr,hr=()=>{};function yr(t){t.createWorker?mr=!0:dr=!1}class Er{constructor(t,{readable:e,writable:r},{options:n,config:o,ut:a,useWebWorkers:i,transferStreams:s,workerURI:c,createWorker:l},u){const{signal:f}=a;return mr&&(l=D),Object.assign(t,{ft:!0,wt:(t.wt||0)+1,readable:e.pipeThrough(new fr(wt(o))).pipeThrough(new br(a),{signal:f}),writable:r,options:Object.assign({},n),workerURI:c,createWorker:l,transferStreams:s,terminate:()=>new Promise(e=>{const{ht:r,ft:n}=t;r?(n?t.yt=e:(r.terminate(),e()),t.Et=null):e()}),bt(){if(t.ft){const{yt:e}=t;e&&(t.yt=null,t.St=!0,t.ht.terminate(),e()),t.ft=!1,u(t)}}}),dr===D&&(dr=typeof Worker!=z),(i&&pr&&(dr&&c||l)?pr:Ar)(t,o)}}class br extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await Sr(t,r)},async transform(t,n){o+=t.length,e&&await Sr(e,o,r),n.enqueue(t)},async flush(){n&&await Sr(n,o)}})}}async function Sr(t,...e){try{await t(...e)}catch{}}function Ar(t,e){return{run:()=>gr(t,e)}}async function gr({options:t,readable:e,writable:r,bt:n},o){let a;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(cr),r=e?o.CompressionStreamFallback:o.DecompressionStreamFallback,n=e?o.CompressionStream:o.DecompressionStream;if(t.useCompressionStream){if(r&&r.At&&!er(n))try{await hr(o)}catch{}}else try{await hr(o)}catch{r&&!r.At||(t.useCompressionStream=!0)}}a=new ur(t,o),await e.pipeThrough(a).pipeThrough(new fr(wt(o))).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:i,outputSize:s}=a;return{crc32:n,inputSize:i,outputSize:s}}catch(t){throw a&&(t.outputSize=a.outputSize),t}finally{n()}}const Rr={type:"module"},xr="error";let Dr,Fr,zr,Tr=!0;try{Tr=typeof structuredClone==T&&structuredClone(new DOMException("","AbortError")).code!==D}catch{}var Ir;function Ur(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Or(t){const{ht:e}=t;if(e)try{e.terminate()}catch{}t.Et=null}function kr(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if(Fr===D||Dr!==t){const a=typeof t==T;s=a?t(o):t;const l=s.startsWith("data:"),u=s.startsWith("blob:");if(l||u){n===D&&(n=!1),n&&(c=Rr);try{i=new Worker(s,c)}catch(o){if(u)try{URL.revokeObjectURL(s)}catch{}if(a&&u)return kr(t,e,r,n,!1);if(n)throw o;return kr(t,e,r,!0,!1)}}else{n===D&&(n=!0),n&&(c=Rr);try{s=new URL(s,e)}catch{}try{i=new Worker(s,c)}catch(a){if(n)return kr(t,e,r,!1,o);throw a}}Dr=t,Fr=s,zr=c}else i=new Worker(Fr,zr);return i.addEventListener("message",t=>{r.gt=!0,Cr(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i}=t,{reader:s,writer:c,Rt:l,xt:u,bt:f,wt:w}=e,d=()=>e.wt!=w;try{if(i){const{message:t,stack:e,code:r,name:n,outputSize:o,cause:a,codecImportFailed:s}=i,c=new Error(t);Object.assign(c,{stack:e,code:r,name:n,outputSize:o}),a&&(c.cause=Object.assign(new Error(a.message),{name:a.name})),s&&(c.codecImportFailed=!0),m(c)}else{if("pull"==r){const{value:t,done:r}=await s.read();d()||Mr({type:sr,value:t,done:r,messageId:o},e)}r==sr&&(await c.ready,await c.write(new Uint8Array(n)),d()||Mr({type:"ack",messageId:o},e)),"close"==r&&m(null,a)}}catch(i){d()||(Or(e),m(i))}function m(t,e){d()||(t?u(t):l(e),c&&c.releaseLock(),t&&t.codecImportFailed||f())}}(t,r)}),i.addEventListener(xr,t=>Nr(t,r)),i.addEventListener("messageerror",t=>Nr(t,r)),i}function Cr(t){const{Dt:e}=t;e&&(clearTimeout(e),t.Dt=null)}function Nr(t,e){t.preventDefault&&t.preventDefault(),Cr(e);const{gt:r,xt:n,writer:o,bt:a}=e;Or(e),r||(e.ht=null);let i=t.error||new Error(t.message||xr);r||(i=Object.assign(new Error(i.message||xr),{Ft:!0}),e.zt=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function Mr(t,{ht:e,writer:r,transferStreams:n,gt:o}){try{const{value:r,readable:a,writable:i}=t,s=[];if(r&&(t.value=At(r),s.push(t.value.buffer)),n&&Tr&&o?(a&&s.push(a),i&&s.push(i)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{Tr=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}Ir=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.Et){let i;typeof a==T&&(a=a());try{i=kr(t.workerURI,r,t)}catch{return yr(t),Ar(t,e)}Object.assign(t,{ht:i,gt:!1,St:!1,zt:null,Et:{run:async()=>{try{return await async function(t,e){if(!t.ht){const{zt:e}=t;t.zt=null;const r=e||new Error(wr);throw r.Ft=!0,r}let r,n;const o=new Promise((t,e)=>{r=t,n=e});Object.assign(t,{reader:null,writer:null,Rt:r,xt:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,Tt:l}=function(t){const e=new AbortController,{writable:r,readable:n}=new TransformStream,o=n.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:e.signal});return o.catch(()=>{}),{writable:r,closed:o,Tt:()=>e.abort()}}(t.writable);let u;try{u=Mr({type:"start",options:i,config:e,readable:a,writable:s},t)}catch(e){l();try{await c}catch{}throw t.bt(),e}u||Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t.gt&&Number.isFinite(f)&&f>=0&&(t.Dt=setTimeout(()=>function(t){if(t.Dt=null,t.gt)return;const{xt:e,writer:r}=t;if(Or(t),t.ht=null,e){const t=new Error(wr);t.Ft=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await w(),await c,t}catch(t){await w(),l();try{await c}catch{}throw t}async function w(){if(!u&&!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:a,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.Ft)return yr(t),Ur(t),gr(t,e);if(r&&r.codecImportFailed){if(t.reader)return Ur(t),gr(t,e);t.bt()}throw r}}}})}return t.Et},pr=Ir;let _r=[];const vr=[];let Lr,Pr,Br=0;async function Wr(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:a,useCompressionStream:i,compressed:s,checkCrc32:c,computeCrc32:l,encrypted:u,format:f,codecURI:w}=r,{workerURI:d,createWorker:m,maxWorkers:p}=n;f&&(w&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(w,n.baseURI)),await async function(t,e){!_e.has(t)&&e&&je(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===D&&n.transferStreams);const h=!(s||c||l||u),y=f===D||Boolean(r.codecURI);return e.useWebWorkers=!h&&y&&(a||a===D&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&d?d:D,e.createWorker=e.useWebWorkers&&m?m:D,r.useCompressionStream=i||i===D&&n.useCompressionStream,(await async function(){const r=_r.find(t=>!t.ft);if(r)return Gr(r),new Er(r,t,e,E);if(_r.length<p){const r={It:Br};return Br++,_r.push(r),new Er(r,t,e,E)}return new Promise(r=>{vr.push({resolve:r,stream:t,Ut:e}),Pr=n.workerStarvationTimeout,jr()})}()).run();function E(t){if(Vr(),vr.length){const[{resolve:e,stream:r,Ut:n}]=vr.splice(0,1);e(new Er(t,r,n,E)),jr()}else t.ht?(Gr(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.St?t.St=!1:t.Ot=setTimeout(async()=>{_r=_r.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):_r=_r.filter(e=>e!=t)}}function jr(){!Lr&&vr.length&&Number.isFinite(Pr)&&Pr>=0&&(Lr=setTimeout(Zr,Pr))}function Vr(){Lr&&(clearTimeout(Lr),Lr=null)}function Zr(){if(Lr=null,vr.length){const[{resolve:t,stream:e,Ut:r}]=vr.splice(0,1),n=Object.assign({},r,{useWebWorkers:!1,workerURI:D,createWorker:D});t(new Er({},e,n,Hr)),jr()}}function Hr(){Vr(),jr()}function Gr(t){const{Ot:e}=t;e&&(clearTimeout(e),t.Ot=null)}const Kr="\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 qr(t,e){return Yr(t,e,!0)}function Yr(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=Kr[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const Xr="HTTP error ",Jr="HTTP Range not supported",Qr="HTTP resource changed",$r="Writer iterator completed too soon",tn="Writer not initialized",en="Content-Range",rn="Range",nn="GET",on="bytes",an=16777216,sn="writable",cn=Symbol();class ln{constructor(){this.size=0}init(){this.initialized=!0}}class un extends ln{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=wt(ft())}={}){const n=this;let o=0;return r=dt(r),new ReadableStream({async pull(a){const i=e===D?r:Math.min(r,e-o),s=await qn(n,t+o,i);s.length&&a.enqueue(s),o+r>=e||!s.length&&i?a.close():o+=r}})}}class fn extends ln{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(tn);return t.writeUint8Array(At(e))}});Object.defineProperty(t,sn,{get:()=>e})}writeUint8Array(){}}class wn extends un{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{kt:t,Ct:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{Ct:r,kt:n}=this,o=new Uint8Array(e),a=4*Math.floor(t/3),i=atob(n.substring(a+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(a/4);let c=0;for(let t=s;t<s+e&&t<i.length;t++)o[t-s]=i.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class dn extends fn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",Nt:""})}writeUint8Array(t){const e=this;let r,n=e.Nt;const o=e.Nt.length;for(e.Nt="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.Nt+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.Nt=n+e.Nt}getData(){return this.data+btoa(this.Nt)}}let mn,pn;class hn extends un{constructor(t){super(),Object.assign(this,{Mt:t,size:t.size}),pn||(pn=(async()=>{try{const t=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader();let e=0,r=await t.read();for(;!r.done;)e+=r.value.length,r=await t.read();mn=1==e}catch{mn=!1}})())}createReadable(t){const{Mt:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};return!n&&o>=r?Te(e.stream()):mn?Te(e.slice(n,n+o).stream()):super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.Mt:r.Mt.slice(t,n);let a=await o.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,n)),new Uint8Array(a)}}class yn extends ln{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,sn,{get:()=>r.writable}),e.contentType=t,e._t=Ie(r.readable,t),e._t.catch(()=>{})}getData(){return this._t}}class En extends hn{constructor(t){super(new Blob([t],{type:"text/plain"}))}}class bn extends yn{constructor(t){super(),Object.assign(this,{encoding:t,vt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,vt:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return Yr(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class Sn extends un{constructor(t,e){super(),gn(this,t,e)}async init(){await Rn(this,Mn,On),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o}=e;if((r||n)&&o!==D){const{offset:r=0,size:n=o-r}=t||{};if(n>0&&r<o)return function(t,e,r){let n,o=e,a=0,i=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(Jr);const o=e.length>a?e.subarray(0,a):e;a-=o.length,i-=o.length,o.length&&t.enqueue(o),a||(await async function(){const t=n;n=D,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await Mn(nn,t,In(t,o,e));if(206!=r.status)throw new Error(Jr);const s=r.headers.get(en);if(s){const t=Number(s.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=o)throw new Error(Jr)}Tn(t,r),zn(t,r),o+=e,a=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return xn(this,t,e,Mn,On)}}class An extends un{constructor(t,e){super(),gn(this,t,e)}async init(){await Rn(this,_n,kn),super.init()}readUint8Array(t,e){return xn(this,t,e,_n,kn)}}function gn(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=an,fetch:l}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s,maximumRangeSize:c,fetch:l})}async function Rn(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=ft(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==z||o)){const n=await e(nn,t,In(t,s?-22:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==on))throw new Error(Jr);{if(s){const e=new Uint8Array(await n.arrayBuffer());206==n.status&&e.length==w&&(t.Lt=e)}zn(t,n);const o=Dn(n);o===D?await Nn(t,e,r):t.size=o}}else await Nn(t,e,r)}async function xn(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,Lt:s,size:c,options:l}=t;if(a||i){if(s&&e==c-w&&r==w)return s;if(e>=c||0===r)return U;{e+r>c&&(r=c-e);const o=await n(nn,t,In(t,e,r));if(206!=o.status)throw new Error(Jr);const a=o.headers.get(en);if(a){const t=Number(a.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=e)throw new Error(Jr)}Tn(t,o),zn(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(Jr);return i}}{const{data:n}=t;return n||await o(t,l),t.data.subarray(e,e+r)}}function Dn(t){const e=t.headers.get(en);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function Fn({headers:t}){return{Pt:t.get("Etag")||D,lastModified:t.get("Last-Modified")||D}}function zn(t,e){const{checkResourceChanges:r,Bt:n}=t;r&&!n&&206==e.status&&(t.Bt=Fn(e))}function Tn(t,e){const{checkResourceChanges:r,Bt:n,size:o}=t;if(r){const t=Dn(e);if(t!==D&&o!==D&&t!=o)throw new Error(Qr);if(n){const t=Fn(e);if(Object.entries(n).some(([e,r])=>r!==D&&t[e]!==D&&r!=t[e]))throw new Error(Qr)}}}function In(t,e=0,r=1){return Object.assign({},Un(t),{[rn]:on+"="+(e<0?e:e+"-"+(e+r-1))})}function Un({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function On(t){await Cn(t,Mn)}async function kn(t){await Cn(t,_n)}async function Cn(t,e){const r=await e(nn,t,Un(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function Nn(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,Un(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function Mn(t,{fetch:e=fetch,options:r,url:n},o){const a=await e(n,Object.assign({},r,{method:t,headers:o}));if(a.status<400)return a;throw 416==a.status?new Error(Jr):new Error(Xr+(a.statusText||a.status))}function _n(t,{url:e},r){return new Promise((n,o)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status<400){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:a.status,arrayBuffer:()=>a.response,headers:new Map(t)})}else o(416==a.status?new Error(Jr):new Error(Xr+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),a.open(t,e),r)for(const t of Object.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class vn extends un{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new An(t,e):new Sn(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 Ln extends vn{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class Pn extends un{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{Wt:t,size:t.length})}readUint8Array(t,e){return this.Wt.slice(t,t+e)}}class Bn extends fn{constructor(t){super(),this.jt=t||262144}init(t=0){Object.assign(this,{offset:0,Wt:new Uint8Array(t>0?t:this.jt)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.Wt.length){let t=e.Wt.length?2*e.Wt.length:e.jt;for(;t<r;)t*=2;const n=e.Wt;e.Wt=new Uint8Array(t),e.Wt.set(n)}e.Wt.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.Wt.length?this.Wt:this.Wt.slice(0,this.offset)}}class Wn extends un{constructor(t){super(),this.Vt=t}async init(){const t=this;t.Zt=0;const e=t.Vt=await Promise.all(t.Vt.map(Kn));t.Ht=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}Gt(t){const{Ht:e,size:r}=this,n=e[t];return n===D?r:n}async readUint8Array(t,e){const r=this,{Vt:n}=this;let o,a=0,i=t;for(;n[a]&&i>=n[a].size;)i-=n[a].size,a++;const s=n[a];if(s){const n=s.size;if(i+e<=n)o=await qn(s,i,e);else{const a=n-i;o=St(await qn(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=U;return r.Zt=Math.max(a,r.Zt),o}}class jn extends ln{constructor(t,e=4294967295){super();const r=this;let n,o,a;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const i=new WritableStream({async write(e){if(e===cn)return void(a&&await c());const{availableSize:i}=r;if(a)e.length>=i?(await s(e.subarray(0,i)),await c(),e.length>i&&await this.write(e.subarray(i))):await s(e);else{const{value:i,done:s}=await t.next();if(s&&!i)throw new Error($r);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await Gn(n),o=i.writable,a=o.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await l())},async abort(t){a&&await a.abort(t)}});async function s(t){const e=t.length;e&&(await a.ready,await a.write(t),n.size+=e,r.availableSize-=e)}async function c(){await l(),r.diskOffset+=n.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function l(){await a.close()}Object.defineProperty(r,sn,{get:()=>i})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(cn)}finally{t.releaseLock()}}}class Vn{constructor(t){return Array.isArray(t)&&(t=new Wn(t)),(t instanceof ReadableStream||typeof t.getReader==T)&&(t={readable:Te(t)}),t}}class Zn{constructor(t){return t.writable===D&&typeof t.next==T&&(t=new jn(t)),(t instanceof WritableStream||typeof t.getWriter==T)&&(t={writable:Ue(t)}),t.size===D&&(t.size=0),t}}function Hn(t){return Boolean(t&&t.getData)}async function Gn(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function Kn(t){return t=new Vn(t),await Gn(t),t.size!==D&&t.readUint8Array||(t=new hn(await Ie(t.readable)),await Gn(t)),t}function qn(t,e,r){return t.readUint8Array(e,r)}function Yn(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?un.prototype.createReadable.call(t,e):t.readable}const Xn="filename",Jn="rawFilename",Qn="comment",$n="rawComment",to="uncompressedSize",eo="compressedSize",ro="offset",no="diskNumberStart",oo="lastModDate",ao="rawLastModDate",io="lastAccessDate",so="rawLastAccessDate",co="creationDate",lo="rawCreationDate",uo="internalFileAttributes",fo="externalFileAttributes",wo="internalFileAttribute",mo="externalFileAttribute",po="msdosAttributesRaw",ho="msdosAttributes",yo="msDosCompatible",Eo="zip64",bo="encrypted",So="version",Ao="versionMadeBy",go="zipCrypto",Ro="directory",xo="executable",Do="compressionMethod",Fo="signature",zo="extraField",To="unixMode",Io="setuid",Uo="setgid",Oo="sticky",ko=[Xn,Jn,to,eo,oo,ao,Qn,$n,io,so,co,lo,ro,no,uo,fo,wo,mo,po,ho,yo,Eo,bo,So,Ao,go,Ro,xo,"symlink",Do,Fo,"crc32",zo,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",To,"unixExternalUpper",Io,Uo,Oo,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Co{constructor(t){ko.forEach(e=>this[e]=t[e])}}const No="File format is not recognized",Mo="End of central directory not found",_o="End of Zip64 central directory locator not found",vo="Central directory header not found",Lo="Local file header not found",Po="Zip64 extra field not found",Bo="File contains encrypted entry",Wo="Encryption method not supported",jo="Compression method not supported",Vo="Split zip file",Zo="Overlapping entry found",Ho="Entry data out of bounds",Go="Ambiguous archive",Ko="Encrypted central directory is not supported",qo="Unsafe filename",Yo="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Xo="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",Jo="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Qo="64-bit value exceeds Number.MAX_SAFE_INTEGER",$o="unsorted central directory",ta="unknown version needed to extract",ea="compressed patched data",ra="malformed extra field",na="unknown zip64 extensible data",oa="wrapped entries count",aa="appended data",ia="prepended data",sa="prepended central directory",ca="trailing central directory data",la="duplicate filename",ua="mismatched zip64 end of central directory record",fa="mismatched local file header (general purpose bit flag)",wa="mismatched local file header (compression method)",da="mismatched local file header (crc32 or sizes)",ma=/^[a-zA-Z]:/,pa="utf-8",ha="cp437",ya=[[to,t],[eo,t],[ro,t],[no,e]],Ea={[e]:{Kt:ei,bytes:4},[t]:{Kt:ri,bytes:8}},ba=BigInt(Number.MAX_SAFE_INTEGER);class Sa{constructor(t,e={}){Object.assign(this,{reader:new Vn(t),options:e,qt:new Map})}async*getEntriesGenerator(n={}){const a=this;let{reader:i}=a;if(await Gn(i),i.size!==D&&i.readUint8Array||(i=new hn(await Ie(i.readable)),await Gn(i)),i.size<w)throw new Error(No);const c=a.warnings=[],p=va(n,a.options),h=p==H,g=p!=K,R=Ba(Ya(a,n,j),p),x=function(t,e){if(t===D)return e;if(!_a(t))throw new Error(Xo);return t}(Ya(a,n,"filenameValidation"),p),F=Ya(a,n,"normalizeFilename"),{Yt:z,Xt:T}=await Wa(i,g,R);if(!z)throw await async function(t){return await Ma(t)==o}(i)?new Error(Vo):new Error(Mo);g&&T>1&&qa("multiple end of central directory records");const I=gt(z);let O=ei(I,12),k=ei(I,16);const C=z.offset,N=ti(I,20),M=C+w+N,_=i.size-M;_>R&&qa(aa),_>0&&Ka(c,aa);let v=ti(I,4);const L=i.Zt||0;let P,B,W,G,q,Y=ti(I,6),X=ti(I,10),J=0,Q=m;const $=k==t||O==t||X==e||Y==e;if(k!=t&&Y!=e&&(k+=Na(i,Y)),$){const r=z.offset>=d?await qn(i,z.offset-d,d):U,n=gt(r);if(r.length==d&&ei(n,0)==u){k=Na(i,ei(n,4))+ri(n,8);let r=await qn(i,k,m),o=gt(r);const a=z.offset-d-m;if((r.length<m||ei(o,0)!=l)&&k!=a&&a>=0){const t=k;k=a,k>t&&(J=k-t),r=await qn(i,k,m),o=gt(r)}if(r.length<m||ei(o,0)!=l)throw new Error(_o);if(W=!0,G=ri(o,4)>44,G){const t=Math.min(ri(o,4)-44,i.size-k-m);t>0&&(Q+=t,q=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=gt(t),n=ti(r,26);Object.assign(e,{compressionMethod:ti(r,0),compressedSize:ri(r,2),uncompressedSize:ri(r,10),encryptionAlgorithm:ti(r,18),bitLength:ti(r,20),flags:ti(r,22),hashAlgorithm:ti(r,24),hashData:t.subarray(28,28+n)})}return e}(await qn(i,k+m,t)))}v==e?v=ei(o,16):v!=ei(o,16)&&Ga(h,c,ua),Y==e?Y=ei(o,20):Y!=ei(o,20)&&Ga(h,c,ua),X==e?X=ri(o,32):X!=ri(o,32)&&Ga(h,c,ua),O==t?O=ri(o,40):O!=ri(o,40)&&Ga(h,c,ua),k=Na(i,Y)+ri(o,48)+J}}let tt=O;const et=z.offset-(W?Q+d:0);if(k>=i.size&&(J=i.size-k-O-w,k=i.size-O-w),L!=v)throw new Error(Vo);if(k<0)throw new Error(No);let rt=0,nt=await qn(i,k,O),ot=gt(nt);if(O){if(nt.length<4)throw new Error(No);const t=et-O;if(k!=t&&Y==v){const e=ei(ot,rt)==s||Boolean(q&&q.compressedSize)||xa(ot);let r=!e;if(!r&&t>=0&&t+4<=i.size&&(r=ei(gt(await qn(i,t,4)),0)==s),r){const r=k;k=t,k>r&&(J+=k-r,P=e),nt=await qn(i,k,O),ot=gt(nt)}}}const at=et-k;if(O!=at&&at>=0&&Y==v&&(O=at,nt=await qn(i,k,O),ot=gt(nt)),k<0||k>=i.size)throw new Error(No);a.directoryOffset=k,a.directoryLength=tt;const it=Xa(a,n,"decryptCentralDirectory");let st,ct;if(it&&X&&nt.length>=4&&ei(ot,0)!=s&&(G||xa(ot))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(q,tt,nt.length);ct=nt.subarray(t),nt=await it(nt.subarray(0,t),q),ot=gt(nt),tt=nt.length,st=!0}q&&!st&&(nt.length<4||ei(ot,0)==s)&&Ka(c,na),B=k;const lt=Ya(a,n,"filenameEncoding"),ut=Ya(a,n,"commentEncoding"),ft=new Set;let wt,dt=-1;const mt=!h&&!W;!X&&mt&&(X=Da(ot,nt,rt),X&&Ka(c,oa));for(let t=0;t<X;t++){const o=new Ra(i,a.options);if(rt+f>nt.length||ei(ot,rt)!=s){if(0==t&&!st&&(G||xa(ot)))throw new Error(Ko);throw new Error(vo)}za(o,ot,rt+6);const l=Boolean(o.bitFlag.languageEncodingFlag),u=rt+f,w=u+o.filenameLength,d=w+o.extraFieldLength,m=ti(ot,rt+4),p=!(m>>8),h=m>>8==3,g=nt.subarray(u,w),R=ti(ot,rt+32),z=d+R,T=nt.subarray(d,z),I=l,U=l,O=ei(ot,rt+38),k=O&r,C={readOnly:Boolean(1&k),hidden:Boolean(2&k),system:Boolean(4&k),directory:Boolean(16&k),archive:Boolean(32&k)},N=ei(ot,rt+42),M=Xa(a,n,"decodeText")||qr,_=I?pa:lt||ha,v=U?pa:ut||ha;let L=M(g,_,V);if(L===D&&(L=qr(g,_)),F){const t=F(L);t!==D&&(L=t)}if(Pa(L,x)){const t=new Error(qo);throw t.filename=L,t}let P=M(T,v,Z);P===D&&(P=qr(T,v)),Object.assign(o,{index:t,Jt:st,versionMadeBy:m,msDosCompatible:p,zip64:!1,compressedSize:0,uncompressedSize:0,Qt:R,offset:N,diskNumberStart:ti(ot,rt+34),internalFileAttributes:ti(ot,rt+36),externalFileAttributes:O,msdosAttributesRaw:k,msdosAttributes:C,rawFilename:g,filenameUTF8:I,commentUTF8:U,rawExtraField:nt.subarray(w,d),rawComment:T,filename:L,comment:P}),Ta(o,o,ot,rt+6)&&Ka(c,ra,L),o.offset+=J;const W=Na(i,o.diskNumberStart)+o.offset;B=Math.min(W,B),W<dt&&Ka(c,$o,L),dt=W,(o.version&r)>63&&Ka(c,ta,L),32&~o.rawBitFlag||Ka(c,ea,L),ft.has(o.filename)&&(wt=!0),ft.add(o.filename);const j=o.externalFileAttributes>>16&e;o.unixMode===D&&16877&j&&(o.unixMode=j);const H=Boolean(o.unixMode&b),K=Boolean(o.unixMode&S),q=Boolean(512&o.unixMode),Y=40960==((o.unixMode===D?j:o.unixMode)&y),Q=!Y&&(o.unixMode!==D?!!(73&o.unixMode):h&&!!(73&j)),$=o.unixMode!==D&&(o.unixMode&y)==E,tt=(j&y)==E;Object.assign(o,{setuid:H,setgid:K,sticky:q,symlink:Y,unixExternalUpper:j,internalFileAttribute:o.internalFileAttributes,externalFileAttribute:o.externalFileAttributes,executable:Q,directory:$||tt||p&&C.directory||o.filename.endsWith(A),zipCrypto:o.encrypted&&!o.extraFieldAES});const et=new Co(o);if(et.getData=(t,e)=>o.getData(t,et,a.qt,e),et.arrayBuffer=async t=>{const e=new TransformStream,r=Ie(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,et,a.qt,t),r},rt=z,t==X-1&&mt){const t=Da(ot,nt,rt);t&&(X+=t,Ka(c,oa))}const{onprogress:at}=n;if(at)try{await at(t+1,X,new Co(o))}catch{}yield et}let pt=rt,ht=Fa(nt.subarray(rt))||(st?Fa(ct):D);if(!ht&&!st){const t=k+rt,e=Math.min(et-t,65541);e>=6&&(ht=Fa(await qn(i,t,e)))}ht&&(a.digitalSignature=ht,pt=rt+6+ht.length),(rt!=tt&&pt!=tt||!st&&rt!=O&&pt!=O)&&Ga(h,c,ca),wt&&Ga(h,c,la);const yt=Ya(a,n,"extractPrependedData"),Et=Ya(a,n,"extractAppendedData"),bt=(h||yt)&&X&&4==B&&await async function(t){const e=await Ma(t);return e==o||808471376==e}(i)?4:0;return h&&(J||X&&B>bt)&&qa(ia),(J||X&&B>4)&&Ka(c,ia),P&&Ka(c,sa),yt&&(a.prependedData=B>bt?await qn(i,bt,B-bt):U),a.comment=N?await qn(i,C+w,N):U,Et&&(a.appendedData=M<i.size?await qn(i,M,i.size-M):U),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}}class Aa{constructor(t={}){const{readable:e,writable:r}=new TransformStream,n=new Sa(e,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await n.next();if(e)return t.close();const o={...r,readable:function(){const{readable:t,writable:e}=new TransformStream;if(r.getData)return async function(){try{await r.getData(e)}catch(t){try{await e.abort(t)}catch{}}}(),t}()};delete o.getData,t.enqueue(o)}}),this.writable=r}}async function ga(t,e={}){if(t=new Vn(t),await Gn(t),t.size!==D&&t.readUint8Array||(t=new hn(await Ie(t.readable)),await Gn(t)),t.size<w)return!1;const r=va(e,{}),n=r!=K,o=Ba(e[j],r),{Yt:a,Xt:i}=await Wa(t,n,o);if(!a||r==H&&i>1)return!1;const s=ti(gt(a),20),c=a.offset+w+s;return t.size-c<=o}class Ra{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,i={}){const s=this,c=ft(),{reader:l,index:u,offset:f,diskNumberStart:w,extraFieldAES:d,extraFieldZip64:m,compressionMethod:p,bitFlag:h,rawBitFlag:y,crc32:E,rawLastModDate:b,uncompressedSize:S,compressedSize:A}=s,{dataDescriptor:R}=h,x=e.localDirectory={},F=e.warnings=[],z=Na(l,w)+f,T=await qn(l,z,g),I=gt(T);let P=Ya(s,i,O),B=Ya(s,i,k);const W=Ya(s,i,C);if($(P,B),P=P&&P.length&&P,B=B&&B.length&&B,d&&99!=d.originalCompressionMethod)throw new Error(jo);if(T.length<g||ei(I,0)!=n)throw new Error(Lo);za(x,I,4);const{extraFieldLength:j,filenameLength:V}=x,Z=x.dataOffset=z+g+V+j,G=Ya(s,i,"checkLocalDirectory"),q=va(i,s.options),Y=function(t,e){return t===D?e!=K:Boolean(t)}(G,q),X=function(t,e){return t===D?e==H:Boolean(t)}(G,q);let J=U;if(X&&(V||j)){const t=await qn(l,z+g,V+j);J=t.subarray(0,V),x.rawExtraField=t.subarray(V)}else x.rawExtraField=j?await qn(l,z+g+V,j):U;X&&(x.rawFilename=J),Ta(s,x,I,4,!0)&&Ka(F,ra),function(t,e,r,n,o){const{rawFilename:a}=t,i=!o,s=t.Jt&&!(8192&~e.rawBitFlag);!n||s||r.length==a.length&&!r.some((t,e)=>t!=a[e])||Ga(i,o,"mismatched local file header (filename)"),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&Ga(i,o,fa),e.compressionMethod!=t.compressionMethod&&Ga(i,o,wa),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Ga(i,o,da)}(s,x,J,X,Y?D:F);const{lastAccessDate:tt,creationDate:et,uid:rt,gid:nt}=x;tt&&(e.lastAccessDate=tt),et&&(e.creationDate=et),rt!==D&&e.uid===D&&(e.uid=rt),nt!==D&&e.gid===D&&(e.gid=nt);const ot=s.encrypted&&x.encrypted&&!W,at=ot&&!d;if(W||(e.zipCrypto=at),ot&&!(64&~x.rawBitFlag))throw new Error(Wo);const it=W?D:Pe(p);if(0!=p&&8!=p&&9!=p&&!it&&!W)throw new Error(jo);if(ot){if(!at&&(d.strength<1||d.strength>3))throw new Error(Wo);if(!P&&!B)throw new Error(Bo)}if(Z+A>l.size)throw new Error(Ho);const st=A,ct=Te(l.createReadable({offset:Z,size:st})),lt=Q(Ya(s,i,N)),ut=Ya(s,i,"checkPasswordOnly");let wt=Ya(s,i,"checkOverlappingEntry");const dt=Ya(s,i,"checkOverlappingEntryOnly");dt&&(wt=!0);const{onstart:mt,onprogress:pt,onend:ht}=i,yt=0!=p&&!W,Et=W?A:S,bt=9==p;let St=Ya(s,i,_);bt&&(St=!1);const At=Ya(s,i,"checkCrc32"),Rt=(At===D?Ya(s,i,"checkSignature"):At)&&!W&&(!ot||at||d&&1==d.vendorVersion),xt={options:{codecType:lr,password:P,rawPassword:B,zipCrypto:at,encryptionStrength:d&&d.strength,checkCrc32:Rt,checkAuthenticationCode:Ya(s,i,"checkAuthenticationCode"),passwordVerification:at&&(R?b>>>8&r:E>>>24&r),outputSize:Et,crc32:E,compressed:yt,encrypted:ot,useWebWorkers:Ya(s,i,M),useCompressionStream:St,transferStreams:Ya(s,i,v),deflate64:bt,format:it?it.format:D,codecURI:it?it.codecURI:D,compressionMethod:p,rawBitFlag:y,checkPasswordOnly:ut},config:c,ut:{signal:lt,size:st,onstart:mt,onprogress:pt,onend:ht}};let Dt,Ft;wt&&await async function({reader:t,$t:e,index:r,offset:n,crc32:o,compressedSize:i,uncompressedSize:s,dataOffset:c,dataDescriptor:l,extraFieldZip64:u,qt:f}){let w=0;if(l&&(w=u?20:12),w){const r=await qn(t,c+i,w+4),n=gt(r);let l=r.length==w+4&&ei(n,0)==a;if(l){const t=Ca(n,4,u);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==i&&t.uncompressedSize==s?w+=4:l=!1}if(r.length>=w){const t=Ca(n,l?4:0,u);t.signature=l,e.localDirectory.dataDescriptor=t}}const d={start:n,end:c+i+w,$t:e};for(const[t,e]of f)if(t!=r&&d.start<e.end&&e.start<d.end){const t=new Error(Zo);throw t.overlappingEntry=e.$t,t}f.set(r,d)}({reader:l,$t:e,index:u,offset:z,crc32:E,compressedSize:A,uncompressedSize:S,dataOffset:Z,dataDescriptor:R||x.bitFlag.dataDescriptor,extraFieldZip64:m||x.extraFieldZip64,qt:o});try{if(!dt){ut&&(t=new WritableStream),t=new Zn(t),await Gn(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(Et,A,yt)),({writable:Dt}=t);const{outputSize:e}=await Wr({readable:ct,writable:Dt},xt);if(t.size+=e,e!=Et)throw new Error(Ve)}}catch(e){if(e.outputSize!==D&&(t.size+=e.outputSize),!ut||e.message!=Vt)throw Ft=e,e}finally{if((Hn(t)||!Ya(s,i,L))&&Dt&&!Dt.locked){const t=Dt.getWriter();if(Ft)try{await t.abort(Ft)}catch{}else await t.close()}}return ut||dt?D:t.getData?t.getData():Dt}}function xa(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==ei(t,r))return!0;return!1}function Da(t,e,r){let n=0;for(;r+f<=e.length&&ei(t,r)==s;)r+=f+ti(t,r+28)+ti(t,r+30)+ti(t,r+32),n++;return n%65536?0:n}function Fa(t){if(t.length>=6){const e=gt(t);if(ei(e,0)==i){const r=ti(e,4);if(6+r<=t.length)return t.subarray(6,6+r)}}}function za(t,e,r){const n=t.rawBitFlag=ti(e,r+2),o=!(1&~n),a=ei(e,r+6);Object.assign(t,{encrypted:o,version:ti(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&h)==h},rawLastModDate:a,lastModDate:Ja(a),filenameLength:ti(e,r+22),extraFieldLength:ti(e,r+24)})}function Ta(t,e,r,n,o){const{rawExtraField:a}=e,i=e.extraField=new Map,s=gt(a);let c=0,l=!1;try{for(;c<a.length;){const t=ti(s,c),e=ti(s,c+2);i.set(t,{type:t,data:a.slice(c+4,c+4+e)}),c+=4+e}}catch{l=!0}c>a.length&&(l=!0);const u=ti(r,n+4);Object.assign(e,{signature:ei(r,n+10),crc32:ei(r,n+10),compressedSize:ei(r,n+14),uncompressedSize:ei(r,n+18)});const f=i.get(1);f&&(function(t,e){e.zip64=!0;const r=gt(t.data),n=ya.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+Ea[e].bytes,0);if(t.data.length<o)throw new Error(Po);for(let o=0,a=0;o<n.length;o++){const[i,s]=n[o],c=Ea[s];e[i]=t[i]=c.Kt(r,a),a+=c.bytes}}(f,e),e.extraFieldZip64=f);const w=i.get(28789);w&&(Ia(w,Xn,Jn,e,t),e.extraFieldUnicodePath=w);const d=i.get(25461);d&&(Ia(d,Qn,$n,e,t),e.extraFieldUnicodeComment=d);const m=i.get(39169);m&&m.data.length>=7?(function(t,e,r){const n=gt(t.data),o=$a(n,4);Object.assign(t,{vendorVersion:$a(n,0),vendorId:$a(n,2),strength:o,originalCompressionMethod:r,compressionMethod:ti(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=D)}(m,e,u),e.extraFieldAES=m):e.compressionMethod=u;const h=i.get(13);h&&(Ua(h,e),e.extraFieldPkwareUnix=h);const y=i.get(22613);y&&(Ua(y,e),e.extraFieldUnixType1=y);const E=i.get(10);E&&(function(t,e){const r=gt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=ti(r,o),a=ti(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+a)),o+=4+a}}catch{}if(n&&24==n.length){const r=gt(n),o=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),i=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:a,rawCreationDate:i});const s={lastModDate:Qa(o),lastAccessDate:Qa(a),creationDate:Qa(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(E,e),e.extraFieldNTFS=E);const b=i.get(30805);let S;if(b&&(S=Oa(b,e,!1),e.extraFieldUnix=b),!S){const t=i.get(30837);t&&(Oa(t,e,!0),e.extraFieldInfoZip=t)}const A=i.get(p);A&&(function(t,e,r){if(!t.data.length)return;const n=gt(t.data),o=$a(n,0),a=[],i=[];r?(1&~o||(a.push(oo),i.push(ao)),2&~o||(a.push(io),i.push(so)),4&~o||(a.push(co),i.push(lo))):t.data.length>=5&&(a.push(oo),i.push(ao));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=ei(n,s);e[r]=t[r]=new Date(1e3*(0|a));const c=i[o];t[c]=a}s+=4})}(A,e,o),e.extraFieldExtendedTimestamp=A);const g=i.get(6534);return g&&(e.extraFieldUSDZ=g),l}function Ia(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=gt(t.data),i=new kt;i.append(o[r]);const s=gt(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=ei(a,1),l=$a(a,0);Object.assign(t,{version:l,[e]:qr(t.data.subarray(5)),valid:1==l&&!o.bitFlag.languageEncodingFlag&&c==ei(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function Ua(t,e){if(t.data.length<8)return;const r=gt(t.data),n={lastAccessDate:new Date(1e3*(0|ei(r,0))),lastModDate:new Date(1e3*(0|ei(r,4)))};t.data.length>=12&&(n.uid=ti(r,8),n.gid=ti(r,10)),Object.assign(t,n),Object.assign(e,n)}function Oa(t,e,r){try{const n=gt(t.data);let o,a;if(r){let e=0;const r=$a(n,e++),i=$a(n,e++);o=ka(t.data.subarray(e,e+i)),e+=i;const s=$a(n,e++);a=ka(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=ti(n,0),a=ti(n,2),Object.assign(t,{uid:o,gid:a}));return o!==D&&(e.uid=o),a!==D&&(e.gid=a),o!==D||a!==D}catch{}}function ka(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function Ca(t,e,r){const n=ei(t,e);let o,a;return r?(o=ri(t,e+4),a=ri(t,e+12)):(o=ei(t,e+4),a=ei(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:a}}function Na(t,e){return t.Gt?t.Gt(e):0}async function Ma(t){return ei(gt(await qn(t,0,4)))}function _a(t){return t===H||t===G||t===K}function va(t,e){return La(t,La(e,G))}function La(t,e){const r=t.strictness;if(r!==D){if(!_a(r))throw new Error(Yo);return r}const n=t.checkAmbiguity;return n===D?e:n?H:e==K?K:G}function Pa(t,e){if(e==K)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(r.includes("..")||t.startsWith("/")||t.startsWith("\\\\")||ma.test(t))||e==H&&(r.includes(".")||r.includes(""))}function Ba(t,r){if(t!==D){const e=rt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(Jo);return e}return r==H?0:r==K?1/0:e}async function Wa(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={count:64};let i,s,c=0;for await(const[r,l,u,f,d]of ja(t,o)){const o=ti(r,f+20);if(d+w+o==n){const o=await Za(t,r,l,f,d,n,a);if(2==o){if(i||(i=Va(u,f,d)),c++,!e||c>1)break}else 1!=o||s||(s=Va(u,f,d))}}return i||(i=s),i||(i=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let a,i;for await(const[e,s,c,l,u]of ja(t,o)){const o=Va(c,l,u);a||(a=o);const f=await Za(t,e,s,l,u,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{Yt:i,Xt:c}}async function*ja(t,e){const r=t.size-e,n=await qn(t,r,e),o=gt(n);for(let t=n.length-w;t>=0;t--)ei(o,t)==c&&(yield[o,r,n,t,r+t])}function Va(t,e,r){return{offset:r,buffer:t.slice(e,e+w).buffer}}async function Za(r,n,o,a,i,c,l){const f=ti(n,a+10),w=ei(n,a+12),m=ei(n,a+16);if(f==e||w==t||m==t)return await Ha(r,n,o,i-d,c,l)==u?2:0;if(!f&&!w)return 1;const p=ti(n,a+6);for(const t of[i-w,Na(r,p)+m])if(await Ha(r,n,o,t,c,l)==s)return 2;return 0}async function Ha(t,e,r,n,o,a){return n<0||n+4>o?D:n>=r?ei(e,n-r):a.count>0?(a.count--,ei(gt(await qn(t,n,4)),0)):D}function Ga(t,e,r){t?qa(r):Ka(e,r)}function Ka(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==D&&(n.filename=r),t.push(n)}}function qa(t){const e=new Error(Go);throw e.reason=t,e}function Ya(t,e,r){return e[r]===D?t.options[r]:e[r]}function Xa(t,e,r){return J(Ya(t,e,r))}function Ja(t){const r=(4294901760&t)>>16,n=t&e,o=new Date(1980+((65024&r)>>9),((480&r)>>5)-1,31&r,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return o<x?x:o}function Qa(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function $a(t,e){return t.getUint8(e)}function ti(t,e){return t.getUint16(e,!0)}function ei(t,e){return t.getUint32(e,!0)}function ri(t,e){const r=t.getBigUint64(e,!0);if(r>ba)throw new Error(Qo);return Number(r)}var ni=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Go,ERR_BAD_FORMAT:No,ERR_CENTRAL_DIRECTORY_NOT_FOUND:vo,ERR_ENCRYPTED:Bo,ERR_ENCRYPTED_CENTRAL_DIRECTORY:Ko,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Ho,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:_o,ERR_EOCDR_NOT_FOUND:Mo,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Po,ERR_INVALID_AUTHENTICATION_CODE:jt,ERR_INVALID_COMPRESSED_DATA:Ze,ERR_INVALID_CRC32:He,ERR_INVALID_FILENAME_VALIDATION:Xo,ERR_INVALID_MAX_APPENDED_DATA_SIZE:Jo,ERR_INVALID_PASSWORD:Bt,ERR_INVALID_SIGNATURE:Wt,ERR_INVALID_STRICTNESS:Yo,ERR_INVALID_UNCOMPRESSED_SIZE:Ve,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Lo,ERR_OVERLAPPING_ENTRY:Zo,ERR_SPLIT_ZIP_FILE:Vo,ERR_UNSAFE_FILENAME:qo,ERR_UNSUPPORTED_COMPRESSION:jo,ERR_UNSUPPORTED_ENCRYPTION:Wo,ERR_UNSUPPORTED_UINT64:Qo,ERR_WORKER_STARTUP_TIMEOUT:wr,WARNING_APPENDED_DATA:aa,WARNING_COMPRESSED_PATCHED_DATA:ea,WARNING_DUPLICATE_FILENAME:la,WARNING_MALFORMED_EXTRA_FIELD:ra,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:fa,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:wa,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:da,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:ua,WARNING_PREPENDED_CENTRAL_DIRECTORY:sa,WARNING_PREPENDED_DATA:ia,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:ca,WARNING_UNKNOWN_VERSION:ta,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:na,WARNING_UNSORTED_CENTRAL_DIRECTORY:$o,WARNING_WRAPPED_ENTRIES_COUNT:oa,ZipReader:Sa,ZipReaderStream:Aa,isZipFile:ga});const oi="File already exists",ai="Zip file comment exceeds 64KB",ii="Invalid zip file comment (must be a Uint8Array)",si="File entry comment exceeds 64KB",ci="Invalid file entry comment (must be a string)",li="Invalid date (must be a valid Date instance)",ui="File entry name exceeds 64KB",fi="Version exceeds 65535",wi="The strength must equal 1, 2, or 3",di="Encryption is not supported in USDZ files",mi="Encryption is not supported when the 'passThrough' option is set",pi="Invalid extra field (must be a Map)",hi="Invalid extra field type (must be integer 0..65535)",yi="Invalid extra field data (must be a Uint8Array)",Ei="Extra field data exceeds 64KB",bi=-2147483648,Si=2147483647,Ai=BigInt(0),gi=BigInt("0x7fffffffffffffff"),Ri="Zip64 is not supported (set the 'zip64' option to 'true')",xi="Undefined uncompressed size",Di="Undefined compression method",Fi="Undetermined size",zi="Undefined reader",Ti="Zip file not empty",Ii="Invalid uid (must be integer 0..2^32-1)",Ui="Invalid gid (must be integer 0..2^32-1)",Oi="Invalid UNIX mode (must be integer 0..65535)",ki="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",Ci="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Ni="Invalid msdosAttributesRaw (must be integer 0..255)",Mi="Invalid msdosAttributes (must be an object with boolean flags)",_i="Invalid level (must be integer 0..9)",vi="Signature data exceeds 64KB",Li=new Uint8Array([7,0,2,0,65,69,3,0,0]),Pi="infozip",Bi="unix";let Wi=0;const ji=[];class Vi{constructor(t,e={}){t=new Zn(t);const{availableSize:r=F,maxSize:n=F}=t,o=r>0&&r!==F&&n>0&&n!==F;Object.assign(this,{writer:t,te:o,options:e,ee:new Map,re:new Set,offset:e[B]===D?t.size||t.writable.size||0:e[B],ne:e[B]===D?0:e[B]-(t.size||t.writable.size||0),oe:new Set,ae:[],ie:0,se:D})}prependZip(t){return Gi(this,async function(t,e){if(t.re.size)throw new Error(Ti);await t.ce(e)}(this,t))}appendZip(t){return Gi(this,this.ce(t))}async ce(t){const e=this,{oe:r,re:n,ee:a}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let i;const s=new Promise(t=>i=t);r.add(s);const c=[];let l;try{t=new Vn(t),await Gn(t),t.size!==D&&t.readUint8Array||(t=new hn(await Ie(t.readable)),await Gn(t));const{ZipReader:r}=await Promise.resolve().then(function(){return ni}),i=new r(t),s=await i.getEntries();await i.close(),await Gn(e.writer);const{directoryOffset:u}=i;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(oi);n.add(t),c.push(t)}),e.le=!0;const{ue:f}=e;e.ue=new Promise(t=>l=()=>{e.le=!1,t()}),await f,e.te&&(delete e.te,await async function(t){return gt(await qn(t,0,4)).getUint32(0,!0)==o}(t)||(await ls(e.writer,ss()),e.offset+=4));const w=await async function(t,e,r,n){const{writer:o}=t,a=new Map;if(o.closeDisk){const i=Array.from(r).sort((t,r)=>is(e,t)-is(e,r));let s=0;for(const r of i){const n=is(e,r);await os(t,e,s,n-s),es(o,await as(e,n))&&await o.closeDisk(),a.set(r,{offset:rs(t,o),diskNumberStart:$i(o)}),s=n}await os(t,e,s,n-s)}else{const o=t.offset;await os(t,e,0,n),r.forEach(t=>a.set(t,{offset:o+is(e,t),diskNumberStart:0}))}return a}(e,t,s,u);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:i,uncompressedSize:s,compressedSize:c,extraFieldZip64:l}=t;let{compressionMethod:u,rawExtraField:f}=t;const{level:d,languageEncodingFlag:m,dataDescriptor:p}=o;f=ns(f||U),t.extraFieldAES&&(u=99);const h=Ts(f),y=Boolean(l)&&l.uncompressedSize!==D,E=Boolean(l)&&l.compressedSize!==D,b=-7&Us(d,m,p,i,u)|d<<1,{fe:S,we:A}=Is({version:e,bitFlag:b,compressionMethod:u,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,de:E,me:y,extraFieldLength:h}),{crc32:g}=t;g!==D&&Ds(A,10,g);const{offset:R,diskNumberStart:x}=w.get(t);Object.assign(t,{me:y,de:E,offset:R,diskNumberStart:x,pe:!1,he:U,ye:U,Ee:U,be:U,Se:U,rawExtraField:f,Ae:U,extendedTimestamp:!1,fe:S,we:A}),a.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{i(),r.delete(s),l&&l()}}add(o="",i,s={}){const c=this,{oe:l}=c,u=async function(o,i,s,c){if(ps(o,c=Object.assign({},c),Ro)&&!i.endsWith(A)&&(i+=A),o.re.has(i))throw new Error(oi);o.re.add(i),Wi<ft().maxWorkers?Wi++:await new Promise(t=>ji.push(t));try{return await async function(o,i,s,c){const l=function(n,o,a){let i=ps(n,a,yo),s=ps(n,a,Ao,i?20:768);const c=ps(n,a,xo),l=Ss(n,a,"uid"),u=Ss(n,a,"gid");let f=Ss(n,a,To),w=ps(n,a,"unixExtraFieldType"),d=ps(n,a,Io),m=ps(n,a,Uo),p=ps(n,a,Oo);if(et(l,t,Ii),et(u,t,Ui),et(f,e,Oi),w!==D&&w!==Pi&&w!==Bi)throw new Error(ki);if(w===Bi&&(l!==D&&l>e||u!==D&&u>e))throw new Error(Ci);w!==D||l===D&&u===D||(w=Pi);let h=Ss(n,a,po),g=ps(n,a,ho);const R=h!==D||g!==D;if(l!==D||u!==D||f!==D||w||c?(i=!1,s=s&r|768):R&&(i=!0,s&=r),et(h,r,Ni),g&&("object"!=typeof g||Array.isArray(g)))throw new Error(Mi);if(s>e)throw new Error(fi);let x=Es(n,a,fo,mo);const F=x!==D;F||(x=0),!a[Ro]&&o.endsWith(A)&&(a[Ro]=!0);const z=ps(n,a,Ro);if(z?(o.endsWith(A)||(o+=A),F||(x=16,i||(x|=16877<<16))):i||F||(x=c?493<<16:27525120),!i){const t=f!==D||Boolean(d||m||p);f=f===D?x>>16&e:f&e,d?f|=b:d=Boolean(f&b),m?f|=S:m=Boolean(f&S),p?f|=512:p=Boolean(512&f),F&&!t||(z?f=-61441&f|E:f&y||(f|=32768),x=(f&e)<<16|x&e)}({msdosAttributesRaw:h,msdosAttributes:g}=function(t,e){if(t!==D)t&=r;else if(e!==D){const{readOnly:n,hidden:o,system:a,directory:i,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),a&&(c|=4),i&&(c|=16),s&&(c|=32),t=c&r}return e===D&&(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,g)),R&&(x=x&t|h&r);const T=x>>16&e,I=f!==D&&40960==(f&y);return{name:o,ge:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:x,unixExternalUpper:T,uid:l,gid:u,unixMode:f,unixExtraFieldType:w,symlink:I,setuid:d,setgid:m,sticky:p,msdosAttributesRaw:h,msdosAttributes:g}}}(o,i,c);({name:i}=l);const u=function(t,r,n){const o=ys(t,n,"encodeText")||Nt;let a=o(r,V);if(a===D&&(a=Nt(r)),Ts(a)>e)throw new Error(ui);const i=n[Qn]||"";if(typeof i!=I)throw new Error(ci);let s=o(i,Z);if(s===D&&(s=Nt(i)),Ts(s)>e)throw new Error(si);const c=ps(t,n,So);if(c!==D&&c>e)throw new Error(fi);const l=hs(t,n,oo,new Date),u=ps(t,n,ao),f=hs(t,n,io),w=hs(t,n,co),d=Es(t,n,uo,wo,0),m=ps(t,n,C),p=ps(t,n,O),h=ps(t,n,k);$(p,h);const y=Ss(t,n,"encryptionStrength",3),E=ps(t,n,go),b=ps(t,n,"extendedTimestamp",!0),S=ps(t,n,"ntfsTimestamp"),A=ps(t,n,"keepOrder",!0),g=ps(t,n,M),R=ps(t,n,v),x=ps(t,n,"bufferedWrite"),F=ys(t,n,"createTempStream"),z=ps(t,n,"dataDescriptorSignature",!0),T=Q(ps(t,n,N)),U=ps(t,n,"useUnicodeFileNames",!0),L=ps(t,n,Do),B=m||L===D?D:Pe(L);if(!m&&L!==D&&0!==L&&8!==L&&!B)throw new Error("Compression method not supported");let j=Ss(t,n,"level");if(et(j,9,_i),t.options[W]){if(p!==D||h!==D)throw new Error(di);j===D&&L===D&&(j=0)}m&&(j=D);let H=ps(t,n,_),G=ps(t,n,P);x&&G===D&&(G=!1),(G===D||E&&!m)&&(G=!0),j!==D&&6!=j&&(H=!1);const K=ps(t,n,Eo);if(!(E||p===D&&h===D||Number.isInteger(y)&&y>=1&&y<=3))throw new Error(wi);const q=Yi(n[zo]),Y=Yi(n.localExtraField),X=Yi(n.centralExtraField);return{comment:i,ge:{rawFilename:a,rawComment:s,version:c,lastModDate:l,rawLastModDate:u,lastAccessDate:f,creationDate:w,internalFileAttributes:d,passThrough:m,password:p,rawPassword:h,encryptionStrength:y,zipCrypto:E,extendedTimestamp:b,ntfsTimestamp:S,keepOrder:A,useWebWorkers:g,transferStreams:R,bufferedWrite:x,createTempStream:F,dataDescriptorSignature:z,signal:T,useUnicodeFileNames:U,compressionMethod:L,format:B?B.format:D,codecURI:B?B.codecURI:D,Re:B?B.versionNeeded:D,level:j,useCompressionStream:H,dataDescriptor:G,zip64:K,rawExtraField:q,xe:Y,Ae:X}}}(o,i,c),{comment:f}=u,w=c[zo];o.ee.set(i,D);const d=o.se,m={};let h,z;u.ge.keepOrder&&(m.De=new Promise(t=>h=t)),o.se=m;try{const{ge:f}=u;0==f.level||f.compressionMethod!==D||f.passThrough||await async function(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;if(r&&!r.At)return!0;if(er(e)||tr(e,qe))return!0;if(r)try{return await hr(t),!0}catch{return!1}return!1}(ft())||(f.level=0);const w=await async function(e,r,{ge:n},o){if(n.passThrough&&!r&&!ps(e,o,Ro))throw new Error(zi);let a;return r&&(r=new Vn(r),await Gn(r),({size:a}=r)),Object.assign({reader:r},function(e,r,n,o,a){const{passThrough:i,zipCrypto:s,password:c,rawPassword:l,encryptionStrength:u}=o;let{dataDescriptor:f,zip64:w,level:d,compressionMethod:m}=o,p=0,h=0;if(i&&r){if(h=a[to],h===D)throw new Error(xi);if(m===D)throw new Error(Di)}const y=!0===w,E=ps(e,a,bo);if(r&&i&&!E&&Ts(c,l))throw new Error(mi);const b=r&&(Boolean(c&&Ts(c)||l&&Ts(l))||i&&E);r||(d=0,m=0);const S=b?s?12:16+4*u:0;r&&(i?(a.uncompressedSize=h,p=n===D?As(h)+S:n):n===D?(f=!0,(w||w===D)&&(w=!0,h=p=4294967296)):(a.uncompressedSize=h=n,p=(gs(m,d)?As(h):h)+S));const A=!(b||r&&(0!==n||i)||gs(m,d));A&&!s&&ps(e,a,P)===D&&(f=!1);const g=y||h>=t,R=y||p>=t;if(g||R){if(!1===w)throw new Error(Ri);w=!0}return w=w||!1,{Fe:p,ge:{dataDescriptor:f,ze:A,zip64:w,me:g,de:R,uncompressedSize:h,level:d,compressionMethod:m,encrypted:b}}}(e,Boolean(r),a,n,o))}(o,s,u,c);({reader:s}=w);const y=ts(o.writer),E=$i(o.writer),b=function(t){const{rawFilename:r,lastModDate:o,rawLastModDate:a,lastAccessDate:i,creationDate:s,level:c,zip64:l,zipCrypto:u,useUnicodeFileNames:f,dataDescriptor:w,directory:d,rawExtraField:m,xe:h,encryptionStrength:y,extendedTimestamp:E,ntfsTimestamp:b,passThrough:S,encrypted:A,me:F,de:z,uncompressedSize:T,crc32:I}=t;let{version:O,compressionMethod:k}=t;const C=!d&&gs(k,c);let N;const M=S||!C,_=l&&(t.bufferedWrite||!w||!F&&!z||M),v=_||l&&w&&(F||z);if(l&&(F||z)){const t=20,e=Qi(t);if(e.Te(1),e.Te(t-4),N=e.Wt,_&&(e.Ie(T),M)){const t=A?u?12:16+4*y:0;e.Ie(S?0:T+t)}}else N=U;let L,P,B,j,V;if(A&&!u){const t=Qi(Ts(Li)+2);t.Te(39169),t.Ue(Li),L=t.Wt,L[8]=y}else L=U;if(E){const t=ws(o),e=ds(t);if(e){const e=9+(i?4:0)+(s?4:0),r=Qi(e);j=1+(i?2:0)+(s?4:0),r.Te(p),r.Te(e-4),r.Oe(j),r.ke(t),i&&r.ke(ms(ws(i))),s&&r.ke(ms(ws(s))),B=r.Wt}else B=U;if(b===D?!e||Boolean(i||s):b)try{const t=fs(o),e=Qi(36);e.Te(10),e.Te(32),e.Ce(4),e.Te(1),e.Te(24),e.Ie(t),e.Ie(i?fs(i):t),e.Ie(s?fs(s):t),P=e.Wt}catch{P=U}else P=U}else P=B=U;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=Pi||r===D&&n===D)if(o!=Bi||r===D&&n===D)V=U;else{const t=Qi(8);t.Te(30805),t.Te(4),t.Te((r===D?0:r)&e),t.Te((n===D?0:n)&e),V=t.Wt}else{const t=Ji(r===D?0:r),e=Ji(n===D?0:n),o=3+t.length+e.length,a=Qi(4+o);a.Te(30837),a.Te(o),a.Oe(1),a.Oe(t.length),a.Ue(t),a.Oe(e.length),a.Ue(e),V=a.Wt}}catch{V=U}k===D&&(k=C?8:0),O===D&&(O=0!=k||d||A?20:10);const{Re:Z}=t;C&&Z!==D&&(O=O>Z?O:Z),l&&(O=O>45?O:45),A&&!u&&(O=O>51?O:51,S&&I!==D&&(L[4]=1),xs(gt(L),9,k),k=99);const H=v?Ts(N):0,G=H+Ts(L,B,P,V,m,h);if(G+(t[W]?67:0)>e)throw new Error(Ei);const K=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),{fe:q,we:Y,rawLastModDate:X}=Is({version:O,bitFlag:Us(c,f,w,A,k),compressionMethod:k,uncompressedSize:T,lastModDate:K<x?x:K>R?R:K,rawLastModDate:a,rawFilename:r,de:z,me:F,extraFieldLength:G}),J=Qi(g+Ts(r)+G),Q=J.Wt,$=gt(Q);return J.ke(n),J.Ue(q),J.Ue(r),v&&J.Ue(N),J.Ue(L),J.Ue(B),J.Ue(P),J.Ue(V),J.Ue(m),J.Ue(h),w&&(z||Ds($,18,0),F||Ds($,22,0)),{Ne:Q,Me:$,fe:q,we:Y,lastModDate:o,rawLastModDate:X,encrypted:A,compressed:C,version:O,compressionMethod:k,_e:j,he:U,ve:H,Ee:B,be:P,Se:V,ye:L,extraFieldLength:G}}(c=Object.assign({},c,l.ge,u.ge,w.ge,{signature:c[Fo],crc32:c.crc32===D?c[Fo]:c.crc32,offset:o.offset-y,diskNumberStart:E,[W]:o.options[W]})),S=function({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=U,i=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=gt(o),r&&(i=4,Ds(n,0,a))),{Le:o,Pe:n,Be:i}}(c),A=Ts(b.Ne,S.Le);z=await async function(e,n,o,a,i){const{ee:s,writer:c}=e,{keepOrder:l,dataDescriptor:u,ze:f,signal:w}=i,{We:d,$t:m,je:p,Ve:h}=a,y=e.options[W];let E,b,S,A,R,x,z=m,T=0;const I=l&&p?p.De:D;s.set(n,z);try{i.bufferedWrite||!l||e.le||e.ie||!u&&!f?(E=!0,e.ie++,x=i.createTempStream?await i.createTempStream():new TransformStream(D,D,{highWaterMark:F}),x.size=0,await Gn(c)):(x=c,await I,await U()),await Gn(x);const m=ts(c);e.te&&!E&&await cs(e,c),y&&!E&&Xi(a,e.offset-m);const{Ne:p}=d;E||await O();const h=$i(c),b=rs(e,c);if(z.diskNumberStart=h,E||(A=!0,R=c.size,await ls(x,p)),z=await async function(e,n,{diskNumberStart:o,De:a},i,s,c){const{We:l,Ze:u,He:f}=i,{fe:w,we:d,lastModDate:m,rawLastModDate:p,encrypted:h,compressed:y,version:E,compressionMethod:b,he:S,ve:A,Ee:g,_e:R,be:x,Se:F,ye:z}=l,{Le:T}=u,{rawFilename:I,lastAccessDate:U,creationDate:O,password:k,rawPassword:C,level:N,zip64:M,me:_,de:v,zipCrypto:L,dataDescriptor:P,directory:B,executable:W,versionMadeBy:j,rawComment:V,rawExtraField:Z,Ae:H,useWebWorkers:G,transferStreams:K,onstart:q,onprogress:Y,onend:X,signal:J,encryptionStrength:Q,extendedTimestamp:$,msDosCompatible:tt,internalFileAttributes:et,externalFileAttributes:rt,uid:nt,gid:ot,unixMode:at,symlink:it,setuid:st,setgid:ct,sticky:lt,unixExternalUpper:ut,msdosAttributesRaw:ft,msdosAttributes:wt,useCompressionStream:dt,passThrough:mt,format:pt,codecURI:ht}=c,yt={De:a,versionMadeBy:j,zip64:M,directory:Boolean(B),executable:Boolean(W),filenameUTF8:!0,rawFilename:I,commentUTF8:!0,rawComment:V,he:S,ve:A,Ee:g,be:x,Se:F,ye:z,rawExtraField:Z,Ae:H,extendedTimestamp:$,msDosCompatible:tt,internalFileAttributes:et,externalFileAttributes:rt,diskNumberStart:o,uid:nt,gid:ot,unixMode:at,symlink:Boolean(it),setuid:st,setgid:ct,sticky:lt,unixExternalUpper:ut,msdosAttributesRaw:ft,msdosAttributes:wt};let{crc32:Et,uncompressedSize:bt}=c,St=0;mt||(bt=0);const{writable:At}=n;if(e){const o=Te(Yn(e)),a=e.size,i={options:{codecType:cr,inputSize:a,level:N,rawPassword:C,password:k,encryptionStrength:Q,zipCrypto:h&&L,passwordVerification:h&&L&&p>>8&r,computeCrc32:!mt,compressed:y&&!mt,encrypted:h&&!mt,useWebWorkers:G,useCompressionStream:dt,transferStreams:K,format:pt,codecURI:ht,compressionMethod:b},config:s,ut:{signal:J,size:a,onstart:q,onprogress:Y,onend:X}};try{const e=await Wr({readable:o,writable:At},i);if(St=e.outputSize,n.size+=St,mt||(bt=e.inputSize,h&&!L||(Et=e.crc32)),!v&&St>=t||!_&&bt>=t)throw new Error(Ri)}catch(t){throw t.outputSize!==D&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,We:n,Ze:o},{zip64:a,zipCrypto:i,passThrough:s,dataDescriptor:c}){const{we:l,encrypted:u}=n,{Pe:f,Be:w}=o;u&&!i&&!s||t===D||(Ds(l,10,t),c&&Ds(f,w,t)),a?c&&(Fs(f,w+4,BigInt(e)),Fs(f,w+12,BigInt(r))):(Ds(l,14,e),Ds(l,18,r),c&&(Ds(f,w+4,e),Ds(f,w+8,r)))}({crc32:Et,compressedSize:St,uncompressedSize:bt,We:l,Ze:u},c),P&&await ls(n,T),Object.assign(yt,{uncompressedSize:bt,compressedSize:St,lastModDate:m,rawLastModDate:p,creationDate:O,lastAccessDate:U,encrypted:Boolean(h),zipCrypto:Boolean(L),size:f+St,compressionMethod:b,version:E,fe:w,we:d,signature:Et,crc32:!h||L||mt?Et:D,_e:R,me:_,de:v}),yt}(o,x,z,a,ft(),i),E||(A=!1),s.set(n,z),z.filename=n,E){if(await Promise.all([x.writable.getWriter().close(),I]),await U(),e.te&&await cs(e,c),S=!0,R=c.size,await O(),z.diskNumberStart=$i(c),z.offset=rs(e,c),y){const t=a.He;Xi(a,e.offset-ts(c)),z.size+=a.He-t}!function({rawFilename:t,encrypted:e,zip64:r,ve:n,crc32:o,compressedSize:a,uncompressedSize:i,me:s,de:c},l,{dataDescriptor:u,passThrough:f}){if(u||((!e||f&&o!==D)&&Ds(l,14,o),c||Ds(l,18,a),s||Ds(l,22,i)),r&&n){const e=g+Ts(t)+4;Fs(l,e,BigInt(i)),Fs(l,e+8,BigInt(a))}}(z,d.Me,i),await ls(c,d.Ne),await us(x.readable,c,w,t=>T+=t),c.size+=x.size,S=!1}else z.diskNumberStart=h,z.offset=b;return e.offset+=z.size,z}catch(t){if(S||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,E&&(e.offset+=T)}throw s.delete(n),t}finally{if(E&&e.ie--,h&&h(I),b&&b(),E&&x&&x.dispose)try{await x.dispose()}catch{}}async function U(){e.le=!0;const{ue:t}=e;e.ue=new Promise(t=>b=()=>{e.le=!1,t()}),await t}async function O(){es(c,Ts(d.Ne))&&await c.closeDisk()}}(o,i,s,{We:b,Ze:S,He:A,$t:m,je:d,Ve:h},c)}catch(t){throw o.ee.delete(i),t}finally{h&&h(d&&d.De)}return Object.assign(z,{name:i,comment:f,extraField:w,[wo]:z.internalFileAttributes,[mo]:z.externalFileAttributes}),new Co(z)}(o,i,s,c)}catch(t){throw o.re.delete(i),t}finally{const t=ji.shift();t?t():Wi--}}(c,o,i,s);l.add(u);const f=()=>l.delete(u);return Promise.prototype.then.call(u,f,f),Gi(c,u)}remove(t){const{re:e,ee:r}=this;if(typeof t==I&&(t=r.get(t)),t&&t.filename!==D){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=U,n={}){const o=this,{oe:a,writer:d}=this,{writable:m}=d;if(!(r instanceof Uint8Array))throw new Error(ii);if(Ts(r)>e)throw new Error(ai);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.ae.map(t=>t.Ge));const h=o.ae.filter(t=>t.error&&!t.Ke);if(h.length){const t=h.map(t=>t.error);h.forEach(t=>t.Ke=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const a=function(r){let n=0;for(const[,o]of r){const{rawFilename:r,ye:a,rawComment:i,be:s,Se:c,rawExtraField:l,Ae:u,extendedTimestamp:w,_e:d,lastModDate:m,me:h,de:y,uncompressedSize:E,compressedSize:b}=o,S=o.offset>=t,A=o.diskNumberStart>=e;let g,R;if(S||A||h||y){const t=4+(h?8:0)+(y?8:0)+(S?8:0)+(A?4:0),e=Qi(t);e.Te(1),e.Te(t-4),h&&e.Ie(E),y&&e.Ie(b),S&&e.Ie(o.offset),A&&e.ke(o.diskNumberStart),g=e.Wt}else g=U;o.he=g,o.qe=S,o.pe=A;const x=ws(m);if(w&&ds(x)){const t=Qi(9);t.Te(p),t.Te(5),t.Oe(d),t.ke(x),R=t.Wt}else R=U;o.Ee=R;const D=Ts(g,a,s,c,R,l,u);if(D>e)throw new Error(Ei);n+=f+Ts(r,i)+D}return n}(r.ee),{Ye:d,Xe:m,Je:h}=await async function(r,n,o){const{ee:a,writer:i}=r,c=new Uint8Array(n);await Gn(i);let l=0,u=0,w=$i(i),d=ts(i),m=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:p,rawFilename:h,he:y,ye:E,Ee:b,be:S,Se:A,rawExtraField:g,Ae:R,rawComment:x,versionMadeBy:D,fe:F,we:z,me:T,de:I,pe:U,qe:O,internalFileAttributes:k,externalFileAttributes:C,diskNumberStart:N,uncompressedSize:M,compressedSize:_}=n,v=Ts(y,E,b,S,A,g,R),L=f+Ts(h,x)+v;es(i,l+L-u)&&(await ls(i,c.slice(u,l)),u=l,m=0,await i.closeDisk()),0==r&&(w=$i(i),d=ts(i)),T||Ds(z,18,M),I||Ds(z,14,_),(O||U)&&n.version<45&&xs(z,0,45);const P=Qi(L);if(P.ke(s),P.Te(D),P.Ue(F.subarray(0,24)),P.Te(v),P.Te(Ts(x)),P.Te(U?e:N),P.Te(k),P.ke(C),P.ke(O?t:p),P.Ue(h),P.Ue(y),P.Ue(E),P.Ue(b),P.Ue(S),P.Ue(A),P.Ue(g),P.Ue(R),P.Ue(x),zs(c,P.Wt,l),l+=L,m++,o.onprogress)try{await o.onprogress(r+1,a.size,new Co(n))}catch{}}return await ls(i,u?c.slice(u):c),{Ye:{diskNumber:w,diskOffset:d},Xe:{diskNumber:$i(i),Qe:m},Je:c}}(r,a,o),y=await async function(t,r,n){const o=ys(t,n,"signCentralDirectory");if(o){const n=await o(r),a=Ts(n);if(a>e)throw new Error(vi);const s=Qi(6+a);s.ke(i),s.Te(a),s.Ue(n);const{writer:c}=t;return es(c,Ts(s.Wt))&&await c.closeDisk(),await ls(c,s.Wt),6+a}return 0}(r,h,o);await async function(r,n,o,a){const{writer:i}=r,{Ye:s,Xe:f,$e:d}=a;let{er:m}=a,p=r.ee.size,h=s.diskNumber,y=rs(r,s);const E=Ts(n);if(E>e)throw new Error(ai);let b=ps(r,o,Eo),S=$i(i);if(es(i,(b?98:w)+E)&&S++,y>=t||m>=t||p>=e||S>=e){if(!1===b)throw new Error(Ri);b=!0}const A=Qi(b?98:w);es(i,Ts(A.Wt)+E)&&await i.closeDisk(),S=$i(i);let g=S==f.diskNumber?f.Qe:0;b&&(A.ke(l),A.Ie(44),A.Te(45),A.Te(45),A.ke(S),A.ke(h),A.Ie(g),A.Ie(p),A.Ie(m),A.Ie(y),A.ke(u),A.ke(S),A.Ie(BigInt(rs(r,i))+BigInt(m)+BigInt(d)),A.ke(S+1),ps(r,o,"supportZip64SplitFile",!0)&&(S=e,h=e),g=e,p=e,y=t,m=t),A.ke(c),A.Te(S),A.Te(h),A.Te(g),A.Te(p),A.ke(m),A.ke(y),A.Te(E),await ls(i,A.Wt),E&&await ls(i,n)}(r,n,o,{Ye:d,Xe:m,er:a,$e:y})}(o,r,n),!Hn(d)&&ps(o,n,L)||await m.getWriter().close(),d.getData?d.getData():m}}class Zi{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new Vi(r,t),this.oe=new Set}transform(t){const e=this.zipWriter;let r;const{readable:n,writable:o}=new TransformStream({start(t){r=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Ki(e,t)}}()}});return qi(this,this.zipWriter.add(t,n),t=>r.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}});return qi(this,this.zipWriter.add(t,r),t=>e.error(t)),n}async close(t,e={}){const{zipWriter:r}=this,n=(await Promise.allSettled(Array.from(this.oe))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await Ki(r,t),t}try{return await r.close(t,e)}catch(t){throw await Ki(r,t),t}}}class Hi extends Promise{then(t,e){const{rr:r}=this;return r&&(r.Ke=!0),super.then(t,e)}}function Gi(t,e){const r=new Hi((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.rr=n,n.Ge=Promise.prototype.then.call(r,D,t=>n.error=t),t.ae.push(n),r}async function Ki(t,e){try{await t.writer.writable.abort(e)}catch{}}function qi(t,e,r){t.oe.add(e),e.catch(t=>{try{r(t)}catch{}})}function Yi(t){if(!t)return U;if(!(t instanceof Map))throw new Error(pi);let r=0,n=0;t.forEach((t,n)=>{if(tt(n,e,hi),!(t instanceof Uint8Array))throw new Error(yi);if(Ts(t)>e)throw new Error(Ei);r+=4+Ts(t)});const o=new Uint8Array(r),a=gt(o);return t.forEach((t,e)=>{xs(a,n,e),xs(a,n+2,Ts(t)),zs(o,t,n+4),n+=4+Ts(t)}),o}function Xi(t,e){const{We:r}=t;let{Ne:n,extraFieldLength:o}=r,a=64-(e+Ts(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=gt(i);xs(s,0,6534),xs(s,2,a-4);const c=n;r.Ne=n=new Uint8Array(Ts(c)+a),zs(n,c),zs(n,i,Ts(c));const l=gt(n);xs(l,28,o+a),r.Me=l,t.He+=a}function Ji(t){const e=new Uint8Array(4);gt(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function Qi(t){const e=new Uint8Array(t),r=gt(e);let n=0;return{Wt:e,Oe:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},Te:t=>{xs(r,n,t),n+=2},ke:t=>{Ds(r,n,t),n+=4},Ie:t=>{Fs(r,n,BigInt(t)),n+=8},Ue:t=>{zs(e,t,n),n+=Ts(t)},Ce:t=>n+=t}}function $i(t){const{diskNumber:e=0}=t;return e}function ts(t){const{diskOffset:e=0}=t;return e}function es(t,e){const{availableSize:r=F}=t;return e>r}function rs(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.ne:0)}function ns(t){const e=gt(t);let r=0;for(;r+4<=Ts(t);){const n=4+Rs(e,r+2);if(1==Rs(e,r))return ns(St(t.subarray(0,r),t.subarray(Math.min(r+n,Ts(t)))));r+=n}return t}async function os(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await us(Yn(e,{offset:r,size:n}),o,D,t=>a+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=a,t.offset+=a}}}async function as(t,e){const r=await qn(t,e,g);if(Ts(r)<g)return g;const n=gt(r);return g+Rs(n,26)+Rs(n,28)}function is(t,{offset:e,diskNumberStart:r}){return e+(t.Gt?t.Gt(r):0)}function ss(){const t=new Uint8Array(4);return Ds(gt(t),0,o),t}async function cs(t,e){delete t.te,await ls(e,ss()),t.offset+=4}async function ls(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Ts(e),await n.write(e)}finally{n.releaseLock()}}async function us(t,e,r,n){const o=e.writable.getWriter();try{await t.pipeTo(new WritableStream({async write(t){await o.ready,await o.write(t),n(Ts(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function fs(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<Ai?Ai:e>gi?gi:e}}function ws(t){return Math.floor(t.getTime()/1e3)}function ds(t){return t>=bi&&t<=Si}function ms(t){return Math.min(Si,Math.max(bi,t))}function ps(t,e,r,n){const o=e[r]===D?t.options[r]:e[r];return o===D?n:o}function hs(t,e,r,n){const o=ps(t,e,r,n);if(null===o)return n;if(o!==D&&(typeof o.getTime!=T||Number.isNaN(o.getTime())))throw new Error(li);return o}function ys(t,e,r){return J(ps(t,e,r))}function Es(t,e,r,n,o){const a=bs(e,r,n),i=a===D?bs(t.options,r,n):a;return i===D?o:i}function bs(t,e,r){return t[e]===D?t[r]:t[e]}function Ss(t,e,r,n){return rt(ps(t,e,r,n))}function As(t){return t+5*(Math.floor(t/16383)+1)}function gs(t,e){return t===D?e===D||e>0:0!==t}function Rs(t,e){return t.getUint16(e,!0)}function xs(t,e,r){t.setUint16(e,r,!0)}function Ds(t,e,r){t.setUint32(e,r,!0)}function Fs(t,e,r){t.setBigUint64(e,r,!0)}function zs(t,e,r){t.set(e,r)}function Ts(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Is({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:a,lastModDate:i,rawLastModDate:s,rawFilename:c,de:l,me:u,extraFieldLength:f}){const w=Qi(26),d=w.Wt,m=gt(d);if(w.Te(e),w.Te(r),w.Te(n),s===D){const t=new Uint32Array(1),e=gt(t);xs(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),xs(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return w.ke(s),w.Ce(4),l||a!==D?w.ke(l?t:a):w.Ce(4),u||o!==D?w.ke(u?t:o):w.Ce(4),w.Te(Ts(c)),w.Te(f),{fe:d,we:m,rawLastModDate:s}}function Us(t,e,r,n,o){let a=0;return e&&(a|=h),r&&(a|=8),8!=o&&9!=o||(t>=0&&t<=3&&(a|=6),t>3&&t<=5&&(a|=4),9==t&&(a|=2)),n&&(a|=1),a}function Os(){return"application/octet-stream"}function ks(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=ft(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Cs(r,Ge)||Cs(t,Ge)||Cs(t,qe),decompression:Cs(n,Ge)||Cs(e,Ge)||Cs(e,qe),registered:!1},{compressionMethod:9,compression:!1,decompression:Cs(n,Ke)||Cs(e,Ke),registered:!1}];for(const t of Be()){const e=We(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==T:D,decompression:e?typeof e.DecompressionStream==T:D,registered:!0})}return o}function Cs(t,e){if(!t)return!1;const{nr:r}=t;return r?r.includes(e):tr(t,e)}const Ns="2.10.0",Ms=1048576,_s=".zip.js-temp";function vs(t={}){const{thresholdBytes:e=Ms,directoryName:r=_s,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function a(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,i,s=0,c=!1;const l=new WritableStream({async write(i){c?await o.write(i):(t.push(i),s+=i.length,s>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let u=0;return{writable:l,readable:new ReadableStream({async pull(e){if(c){if(!i){const t=await n.getFile();i=t.stream().getReader()}const{value:t,done:r}=await i.read();r?e.close():e.enqueue(t)}else u<t.length?e.enqueue(t[u++]):e.close()},async cancel(t){i&&await i.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const Ls=1048576;function Ps(t={}){const{thresholdBytes:e=Ls}=t;return function(){const t=[];let r,n,o,a=0,i=!1;const s=new WritableStream({async write(o){i?await r.write(o):(t.push(o),a+=o.length,a>e&&await async function(){const e=new TransformStream;n=Ie(e.readable),r=e.writable.getWriter(),i=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(i){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const Bs=1048576,Ws=".zip.js-temp",js="createSyncAccessHandle is only available in dedicated workers";function Vs(t={}){const{thresholdBytes:e=Bs,directoryName:r=Ws,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(js);const o=n||(()=>navigator.storage.getDirectory());let a;function i(){return a||(a=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),a}return function(){const t=[];let r,n,o=0,a=!1,s=0,c=0;const l=new WritableStream({async write(c){a?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),a=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let u=0;return{writable:l,readable:new ReadableStream({pull(e){if(a){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else u<t.length?e.enqueue(t[u++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{Et({baseURI:import.meta.url})}catch{}const Zs="deflate",Hs="deflate-raw",Gs="deflate64-raw",Ks="gzip";let qs,Ys,Xs,Js,Qs;function $s(t,e,r={}){if(!qs){const t=new Error("WASM module not loaded");throw t.cause=Qs,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,a="number"==typeof r.inBufferSize?r.inBufferSize:65536;return new TransformStream({start(){try{let r;if(this.ar=Ys(o),this.in=Ys(a),this.inBufferSize=a,!this.ar||!this.in)throw new Error("allocation failed");if(this.ir=new Uint8Array(o),t?(this.sr=qs.deflate_process,this.cr=qs.deflate_last_consumed,this.lr=qs.deflate_end,this.ur=qs.deflate_new(),r=e===Ks?qs.deflate_init_gzip(this.ur,n):e===Hs?qs.deflate_init_raw(this.ur,n):qs.deflate_init(this.ur,n)):e===Gs?(this.sr=qs.inflate9_process,this.cr=qs.inflate9_last_consumed,this.lr=qs.inflate9_end,this.ur=qs.inflate9_new(),r=qs.inflate9_init_raw(this.ur)):(this.sr=qs.inflate_process,this.cr=qs.inflate_last_consumed,this.lr=qs.inflate_end,this.ur=qs.inflate_new(),r=e===Hs?qs.inflate_init_raw(this.ur):e===Ks?qs.inflate_init_gzip(this.ur):qs.inflate_init(this.ur)),0!==r)throw new Error("init failed:"+r)}catch(t){throw i(this),t}},transform(e,r){try{const n=e,a=new Uint8Array(Js.buffer),i=this.sr,s=this.cr,c=this.ar,l=this.ir;let u=0;for(;u<n.length;){const e=Math.min(n.length-u,32768);if((!this.in||this.inBufferSize<e)&&(this.in&&Xs&&(Xs(this.in),this.in=0),this.in=Ys(e),this.inBufferSize=e,!this.in))throw new Error("allocation failed");a.set(n.subarray(u,u+e),this.in);const f=i(this.ur,this.in,e,c,o,0),w=16777215&f;if(w&&(l.set(a.subarray(c,c+w),0),r.enqueue(l.slice(0,w))),!t){const t=f>>24&255,e=128&t?t-256:t;if(e<0)throw new Error("process error:"+e)}const d=s(this.ur);if(0===d)break;u+=d}}catch(t){i(this),r.error(t)}},flush(e){try{const r=new Uint8Array(Js.buffer),n=this.sr,a=this.ar,i=this.ir;for(;;){const s=n(this.ur,0,0,a,o,4),c=16777215&s,l=s>>24&255;if(!t){const t=128&l?l-256:l;if(t<0)throw new Error("process error:"+t)}if(c&&(i.set(r.subarray(a,a+c),0),e.enqueue(i.slice(0,c))),1===l||0===c)break}}catch(t){e.error(t)}finally{const t=i(this);0!==t&&e.error(new Error("end error:"+t))}},cancel(){i(this)}});function i(t){let e=0;return t.ur&&t.lr&&(e=t.lr(t.ur)),t.ur=0,t.in&&Xs&&Xs(t.in),t.in=0,t.ar&&Xs&&Xs(t.ar),t.ar=0,e}}class tc{constructor(t=Zs,e){return $s(!0,t,e)}}class ec{constructor(t=Zs,e){return $s(!1,t,e)}}tc.At=!0,ec.At=!0,tc.nr=[Zs,Hs,Ks],ec.nr=[Zs,Hs,Ks,Gs];let rc,nc=!1;function oc(){rc=null,async function(){await Promise.allSettled(_r.map(t=>(Gr(t),t.terminate()))),dr=D,mr=!1}(),nc=!1,qs=Ys=Xs=Js=Qs=null}!function({wr:t}){hr=t}({wr:t=>{if(!rc){let{wasmURI:e}=t;typeof e==T&&(e=e()),rc=async function(t,{baseURI:e}){if(!nc)try{await async function(t,e){let r,n;try{try{n=new URL(t,e)}catch{}const o=await fetch(n);r=await o.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;r=function(t){const e=t.split(",")[1],r=atob(e),n=r.length,o=new Uint8Array(n);for(let t=0;t<n;++t)o[t]=r.charCodeAt(t);return o.buffer}(t)}!function(t){if(qs=t,({malloc:Ys,free:Xs,memory:Js}=qs),"function"!=typeof Ys||"function"!=typeof Xs||!Js)throw qs=Ys=Xs=Js=null,new Error("Invalid WASM module")}((await WebAssembly.instantiate(r)).instance.exports)}(t,e),nc=!0}catch(t){throw function(t){Qs=t}(t),t}}(e,t).catch(t=>{throw rc=null,t})}return rc}}),Et({CompressionStreamFallback:tc,DecompressionStreamFallback:ec}),Et({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});export{hn as BlobReader,yn as BlobWriter,wn as Data64URIReader,dn as Data64URIWriter,Go as ERR_AMBIGUOUS_ARCHIVE,No as ERR_BAD_FORMAT,vo as ERR_CENTRAL_DIRECTORY_NOT_FOUND,oi as ERR_DUPLICATED_NAME,Bo as ERR_ENCRYPTED,Ko as ERR_ENCRYPTED_CENTRAL_DIRECTORY,Ho as ERR_ENTRY_DATA_OUT_OF_BOUNDS,_o as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,Mo as ERR_EOCDR_NOT_FOUND,Po as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,Jr as ERR_HTTP_RANGE,Qr as ERR_HTTP_RESOURCE_CHANGED,jt as ERR_INVALID_AUTHENTICATION_CODE,Oe as ERR_INVALID_CODEC_DEFINITION,Ce as ERR_INVALID_CODEC_MODULE,ai as ERR_INVALID_COMMENT,ii as ERR_INVALID_COMMENT_TYPE,Ze as ERR_INVALID_COMPRESSED_DATA,He as ERR_INVALID_CRC32,li as ERR_INVALID_DATE,wi as ERR_INVALID_ENCRYPTION_STRENGTH,si as ERR_INVALID_ENTRY_COMMENT,ci as ERR_INVALID_ENTRY_COMMENT_TYPE,ui as ERR_INVALID_ENTRY_NAME,pi as ERR_INVALID_EXTRAFIELD,Ei as ERR_INVALID_EXTRAFIELD_DATA,yi as ERR_INVALID_EXTRAFIELD_DATA_TYPE,hi as ERR_INVALID_EXTRAFIELD_TYPE,Xo as ERR_INVALID_FILENAME_VALIDATION,q as ERR_INVALID_FUNCTION_OPTION,Ui as ERR_INVALID_GID,_i as ERR_INVALID_LEVEL,Jo as ERR_INVALID_MAX_APPENDED_DATA_SIZE,nt as ERR_INVALID_MAX_WORKERS,Ni as ERR_INVALID_MSDOS_ATTRIBUTES,Mi as ERR_INVALID_MSDOS_DATA,Bt as ERR_INVALID_PASSWORD,X as ERR_INVALID_PASSWORD_TYPE,Y as ERR_INVALID_SIGNAL,Wt as ERR_INVALID_SIGNATURE,vi as ERR_INVALID_SIGNATURE_DATA,Yo as ERR_INVALID_STRICTNESS,Ii as ERR_INVALID_UID,Ve as ERR_INVALID_UNCOMPRESSED_SIZE,ki as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,Ci as ERR_INVALID_UNIX_ID_SIZE,Oi as ERR_INVALID_UNIX_MODE,fi as ERR_INVALID_VERSION,$r as ERR_ITERATOR_COMPLETED_TOO_SOON,Lo as ERR_LOCAL_FILE_HEADER_NOT_FOUND,Zo as ERR_OVERLAPPING_ENTRY,ke as ERR_RESERVED_COMPRESSION_METHOD,Vo as ERR_SPLIT_ZIP_FILE,Di as ERR_UNDEFINED_COMPRESSION_METHOD,zi as ERR_UNDEFINED_READER,xi as ERR_UNDEFINED_UNCOMPRESSED_SIZE,Fi as ERR_UNDETERMINED_SIZE,qo as ERR_UNSAFE_FILENAME,jo as ERR_UNSUPPORTED_COMPRESSION,js as ERR_UNSUPPORTED_CONTEXT,Zt as ERR_UNSUPPORTED_CRYPTO_API,Wo as ERR_UNSUPPORTED_ENCRYPTION,mi as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,di as ERR_UNSUPPORTED_ENCRYPTION_USDZ,Ri as ERR_UNSUPPORTED_FORMAT,Qo as ERR_UNSUPPORTED_UINT64,wr as ERR_WORKER_STARTUP_TIMEOUT,tn as ERR_WRITER_NOT_INITIALIZED,Ti as ERR_ZIP_NOT_EMPTY,Ln as HttpRangeReader,vn as HttpReader,un as Reader,Wn as SplitDataReader,jn as SplitDataWriter,En as TextReader,bn as TextWriter,Pn as Uint8ArrayReader,Bn as Uint8ArrayWriter,Ns as VERSION,aa as WARNING_APPENDED_DATA,ea as WARNING_COMPRESSED_PATCHED_DATA,la as WARNING_DUPLICATE_FILENAME,ra as WARNING_MALFORMED_EXTRA_FIELD,fa as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,wa as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,da as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,ua as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,sa as WARNING_PREPENDED_CENTRAL_DIRECTORY,ia as WARNING_PREPENDED_DATA,ca as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,ta as WARNING_UNKNOWN_VERSION,na as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,$o as WARNING_UNSORTED_CENTRAL_DIRECTORY,oa as WARNING_WRAPPED_ENTRIES_COUNT,fn as Writer,Sa as ZipReader,Aa as ZipReaderStream,Vi as ZipWriter,Zi as ZipWriterStream,mt as configure,Ps as createBlobTempStream,vs as createOPFSTempStream,Vs as createSyncAccessHandleTempStream,Os as getMimeType,Be as getRegisteredCodecs,ks as getSupportedCompressionMethods,ga as isZipFile,ve as registerCodec,bt as resetConfiguration,oc as terminateWorkers,Le as unregisterCodec};
|
package/dist/zip-core.js
CHANGED
|
@@ -493,7 +493,7 @@
|
|
|
493
493
|
// Every table MUST stay a PACKED_SMI array: build with array literals (not `new Array(n)`,
|
|
494
494
|
// which is HOLEY) and store the signed int32 XOR result (no `>>> 0`). An unsigned or holey
|
|
495
495
|
// table becomes a V8 FixedDoubleArray whose every hot-loop lookup unboxes a double (~1.6x
|
|
496
|
-
// slower). Signedness is irrelevant to the result
|
|
496
|
+
// slower). Signedness is irrelevant to the result: the reads mask/shift it and the final
|
|
497
497
|
// `~crc` normalizes it. Do NOT reintroduce `>>> 0` here or switch to `new Array(256)`.
|
|
498
498
|
const T = [[], [], [], [], [], [], [], []];
|
|
499
499
|
for (let n = 0; n < 256; n++) {
|
|
@@ -3475,21 +3475,14 @@
|
|
|
3475
3475
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
3476
3476
|
*/
|
|
3477
3477
|
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
const CP437 = "\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");
|
|
3481
|
-
const VALID_CP437 = CP437.length == 256;
|
|
3478
|
+
const CP437 = "\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\u00B6\u00A7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\u00C7\u00FC\u00E9\u00E2\u00E4\u00E0\u00E5\u00E7\u00EA\u00EB\u00E8\u00EF\u00EE\u00EC\u00C4\u00C5\u00C9\u00E6\u00C6\u00F4\u00F6\u00F2\u00FB\u00F9\u00FF\u00D6\u00DC\u00A2\u00A3\u00A5\u20A7\u0192\u00E1\u00ED\u00F3\u00FA\u00F1\u00D1\u00AA\u00BA\u00BF\u2310\u00AC\u00BD\u00BC\u00A1\u00AB\u00BB\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\u00DF\u0393\u03C0\u03A3\u03C3\u00B5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\u00B1\u2265\u2264\u2320\u2321\u00F7\u2248\u00B0\u2219\u00B7\u221A\u207F\u00B2\u25A0\u00A0".split("");
|
|
3482
3479
|
|
|
3483
3480
|
function decodeCP437(stringValue) {
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
result += CP437[stringValue[indexCharacter]];
|
|
3488
|
-
}
|
|
3489
|
-
return result;
|
|
3490
|
-
} else {
|
|
3491
|
-
return new TextDecoder().decode(stringValue);
|
|
3481
|
+
let result = "";
|
|
3482
|
+
for (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {
|
|
3483
|
+
result += CP437[stringValue[indexCharacter]];
|
|
3492
3484
|
}
|
|
3485
|
+
return result;
|
|
3493
3486
|
}
|
|
3494
3487
|
|
|
3495
3488
|
/*
|
|
@@ -4723,6 +4716,7 @@
|
|
|
4723
4716
|
const WARNING_WRAPPED_ENTRIES_COUNT = "wrapped entries count";
|
|
4724
4717
|
const WARNING_APPENDED_DATA = "appended data";
|
|
4725
4718
|
const WARNING_PREPENDED_DATA = "prepended data";
|
|
4719
|
+
const WARNING_PREPENDED_CENTRAL_DIRECTORY = "prepended central directory";
|
|
4726
4720
|
const WARNING_TRAILING_CENTRAL_DIRECTORY_DATA = "trailing central directory data";
|
|
4727
4721
|
const WARNING_DUPLICATE_FILENAME = "duplicate filename";
|
|
4728
4722
|
const WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY = "mismatched zip64 end of central directory record";
|
|
@@ -4816,6 +4810,7 @@
|
|
|
4816
4810
|
let diskNumber = getUint16$1(endOfDirectoryView, 6);
|
|
4817
4811
|
let filesLength = getUint16$1(endOfDirectoryView, 10);
|
|
4818
4812
|
let prependedDataLength = 0;
|
|
4813
|
+
let prependedCentralDirectory;
|
|
4819
4814
|
let startOffset;
|
|
4820
4815
|
let zip64EndOfDirectory;
|
|
4821
4816
|
let zip64EndOfDirectoryVersion2;
|
|
@@ -4919,6 +4914,7 @@
|
|
|
4919
4914
|
directoryDataOffset = expectedDirectoryDataOffset;
|
|
4920
4915
|
if (directoryDataOffset > originalDirectoryDataOffset) {
|
|
4921
4916
|
prependedDataLength += directoryDataOffset - originalDirectoryDataOffset;
|
|
4917
|
+
prependedCentralDirectory = storedPointsAtDirectory;
|
|
4922
4918
|
}
|
|
4923
4919
|
directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength);
|
|
4924
4920
|
directoryView = getDataView(directoryArray);
|
|
@@ -5146,6 +5142,9 @@
|
|
|
5146
5142
|
if (prependedDataLength || (filesLength && startOffset > SPLIT_ZIP_FILE_SIGNATURE_LENGTH)) {
|
|
5147
5143
|
addWarning(warnings, WARNING_PREPENDED_DATA);
|
|
5148
5144
|
}
|
|
5145
|
+
if (prependedCentralDirectory) {
|
|
5146
|
+
addWarning(warnings, WARNING_PREPENDED_CENTRAL_DIRECTORY);
|
|
5147
|
+
}
|
|
5149
5148
|
if (extractPrependedData) {
|
|
5150
5149
|
zipReader.prependedData = startOffset > splitZipSignatureLength ?
|
|
5151
5150
|
await readUint8Array(reader, splitZipSignatureLength, startOffset - splitZipSignatureLength) :
|
|
@@ -6206,6 +6205,7 @@
|
|
|
6206
6205
|
WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD: WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,
|
|
6207
6206
|
WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES: WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,
|
|
6208
6207
|
WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY: WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,
|
|
6208
|
+
WARNING_PREPENDED_CENTRAL_DIRECTORY: WARNING_PREPENDED_CENTRAL_DIRECTORY,
|
|
6209
6209
|
WARNING_PREPENDED_DATA: WARNING_PREPENDED_DATA,
|
|
6210
6210
|
WARNING_TRAILING_CENTRAL_DIRECTORY_DATA: WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,
|
|
6211
6211
|
WARNING_UNKNOWN_VERSION: WARNING_UNKNOWN_VERSION,
|
|
@@ -8522,7 +8522,7 @@
|
|
|
8522
8522
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
8523
8523
|
*/
|
|
8524
8524
|
|
|
8525
|
-
const VERSION = "2.
|
|
8525
|
+
const VERSION = "2.10.0";
|
|
8526
8526
|
|
|
8527
8527
|
/*
|
|
8528
8528
|
Copyright (c) 2025 Gildas Lormeau. All rights reserved.
|
|
@@ -9062,6 +9062,7 @@
|
|
|
9062
9062
|
exports.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD = WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD;
|
|
9063
9063
|
exports.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES = WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES;
|
|
9064
9064
|
exports.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY = WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY;
|
|
9065
|
+
exports.WARNING_PREPENDED_CENTRAL_DIRECTORY = WARNING_PREPENDED_CENTRAL_DIRECTORY;
|
|
9065
9066
|
exports.WARNING_PREPENDED_DATA = WARNING_PREPENDED_DATA;
|
|
9066
9067
|
exports.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA = WARNING_TRAILING_CENTRAL_DIRECTORY_DATA;
|
|
9067
9068
|
exports.WARNING_UNKNOWN_VERSION = WARNING_UNKNOWN_VERSION;
|