@zip.js/zip.js
Advanced tools
Comparing version 2.2.5 to 2.2.6
@@ -1,1 +0,1 @@ | ||
import{configure as t}from"./core/zip-core.js";export default()=>{const e=URL.createObjectURL(new Blob(["("+(()=>{class t{constructor(){this.crc=-1,this.table=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}return t})()}append(t){const e=this.table;let n=0|this.crc;for(let i=0,a=0|t.length;i<a;i++)n=n>>>8^e[255&(n^t[i])];this.crc=n}get(){return~this.crc}}const e={name:"PBKDF2"},n={name:"HMAC"},i={name:"AES-CTR"},a=Object.assign({hash:n},e),r=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},e),s=Object.assign({hash:"SHA-1"},n),l=Object.assign({length:16},i),o=["deriveBits"],_=["sign"],d=[8,12,16],u=[16,24,32],f=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=crypto.subtle;class h{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await c.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return x(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=p(this.input,t)),n};if(this.password){const e=t.subarray(0,d[this.strength]+2);await async function(t,e,n){await w(t,n,e.subarray(0,d[t.strength]),["decrypt"]);const i=e.subarray(d[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(d[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=p(this.pendingInput,t),n=g(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,i=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(i.length){const t=await c.decrypt(Object.assign({counter:this.counter},l),e.key,i);r=new Uint8Array(t)}let s=!0;if(this.signed){const t=await c.sign(n,e.authentication,this.input.subarray(0,this.input.length-10)),i=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)i[t]!=a[t]&&(s=!1)}return{valid:s,data:r}}}class b{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await c.encrypt(Object.assign({counter:this.counter},l),this.keys.key,r);return x(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=p(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(d[t.strength]));return await w(t,e,n,["encrypt"]),p(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=p(this.pendingInput,t),i=g(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await c.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=p(this.output,t)}const e=await c.sign(n,this.keys.authentication,this.output.subarray(d[this.strength]+2));this.output=null;const i=new Uint8Array(e).subarray(0,10);return{data:p(t,i),signature:i}}}async function w(t,e,n,l){t.counter=new Uint8Array(f);const d=(new TextEncoder).encode(e),h=await c.importKey("raw",d,a,!1,o),b=await c.deriveBits(Object.assign({salt:n},r),h,8*(2*u[t.strength]+2)),w=new Uint8Array(b);t.keys={key:await c.importKey("raw",w.subarray(0,u[t.strength]),i,!0,l),authentication:await c.importKey("raw",w.subarray(u[t.strength],2*u[t.strength]),s,!1,_),passwordVerification:w.subarray(2*u[t.strength])}}function x(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function p(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function g(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class y{constructor(e){this.signature=e.inputSignature,this.encrypted=Boolean(e.inputPassword),this.signed=e.inputSigned,this.compressed=e.inputCompressed,this.inflate=e.inputCompressed&&new e.codecConstructor,this.crc32=e.inputSigned&&new t,this.decrypt=this.encrypted&&new h(e.inputPassword,e.inputSigned,e.inputEncryptionStrength)}async append(t){return this.encrypted&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),!this.encrypted&&this.signed&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}else if(this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class m{constructor(e){this.encrypted=e.outputEncrypted,this.signed=e.outputSigned,this.compressed=e.outputCompressed,this.deflate=e.outputCompressed&&new e.codecConstructor({level:e.level||5}),this.crc32=e.outputSigned&&new t,this.encrypt=this.encrypted&&new b(e.outputPassword,e.outputEncryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted?e=await this.encrypt.append(e):this.signed&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}else this.signed&&(t=this.crc32.get());return{data:e,signature:t}}}const v={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?e.codecConstructor=self.Deflate:e.codecType.startsWith("inflate")&&(e.codecConstructor=self.Inflate),k=function(t){return t.codecType.startsWith("deflate")?new m(t):t.codecType.startsWith("inflate")?new y(t):void 0}(e)},append:async t=>({data:await k.append(t.data)}),flush:()=>k.flush()};let k;function A(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=v[n];if(i)try{const t=await i(e)||{};if(t.type=n,t.data)try{postMessage(t,[t.data.buffer])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const U=[0,1,2,3].concat(...A([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function I(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,l,o,_=-1;for(n.heap_len=0,n.heap_max=573,s=0;s<r;s++)0!==i[2*s]?(n.heap[++n.heap_len]=_=s,n.depth[s]=0):i[2*s+1]=0;for(;n.heap_len<2;)o=n.heap[++n.heap_len]=_<2?++_:0,i[2*o]=1,n.depth[o]=0,n.opt_len--,a&&(n.static_len-=a[2*o+1]);for(t.max_code=_,s=Math.floor(n.heap_len/2);s>=1;s--)n.pqdownheap(i,s);o=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=l,i[2*o]=i[2*s]+i[2*l],n.depth[o]=Math.max(n.depth[s],n.depth[l])+1,i[2*s+1]=i[2*l+1]=o,n.heap[1]=o++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let l,o,_,d,u,f,c=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)o=e.heap[l],d=n[2*n[2*o+1]+1]+1,d>s&&(d=s,c++),n[2*o+1]=d,o>t.max_code||(e.bl_count[d]++,u=0,o>=r&&(u=a[o-r]),f=n[2*o],e.opt_len+=f*(d+u),i&&(e.static_len+=f*(i[2*o+1]+u)));if(0!==c){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,c-=2}while(c>0);for(d=s;0!==d;d--)for(o=e.bl_count[d];0!==o;)_=e.heap[--l],_>t.max_code||(n[2*_+1]!=d&&(e.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),o--)}}(n),function(t,n,i){const a=[];let r,s,l,o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(s=0;s<=n;s++)l=t[2*s+1],0!==l&&(t[2*s]=e(a[l]++,l))}(i,t.max_code,n.bl_count)}}function E(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a}function S(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a}I._length_code=[0,1,2,3,4,5,6,7].concat(...A([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),I.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],I.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],I.d_code=function(t){return t<256?U[t]:U[256+(t>>>7)]},I.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],I.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],I.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],E.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],E.static_l_desc=new E(E.static_ltree,I.extra_lbits,257,286,15),E.static_d_desc=new E(E.static_dtree,I.extra_dbits,0,30,15),E.static_bl_desc=new E(null,I.extra_blbits,0,19,7);const C=[new S(0,0,0,0,0),new S(4,4,8,4,1),new S(4,5,16,8,1),new S(4,6,32,32,1),new S(4,4,16,16,2),new S(8,16,32,32,2),new S(8,16,128,128,2),new S(8,32,128,256,2),new S(32,128,258,1024,2),new S(32,258,258,4096,2)],j=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function M(t,e,n,i){const a=t[2*e],r=t[2*n];return a<r||a==r&&i[e]<=i[n]}function D(){const t=this;let e,n,i,a,r,s,l,o,_,d,u,f,c,h,b,w,x,p,g,y,m,v,k,A,U,S,D,O,P,T,z,B,V;const q=new I,K=new I,R=new I;let W,H,L,F,G,J,N,Q;function X(){let e;for(e=0;e<286;e++)z[2*e]=0;for(e=0;e<30;e++)B[2*e]=0;for(e=0;e<19;e++)V[2*e]=0;z[512]=1,t.opt_len=t.static_len=0,L=G=0}function Y(t,e){let n,i=-1,a=t[1],r=0,s=7,l=4;0===a&&(s=138,l=3),t[2*(e+1)+1]=65535;for(let o=0;o<=e;o++)n=a,a=t[2*(o+1)+1],++r<s&&n==a||(r<l?V[2*n]+=r:0!==n?(n!=i&&V[2*n]++,V[32]++):r<=10?V[34]++:V[36]++,r=0,i=n,0===a?(s=138,l=3):n==a?(s=6,l=3):(s=7,l=4))}function Z(e){t.pending_buf[t.pending++]=e}function $(t){Z(255&t),Z(t>>>8&255)}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<<Q&65535,$(N),N=n>>>16-Q,Q+=i-16):(N|=t<<Q&65535,Q+=i)}function et(t,e){const n=2*t;tt(65535&e[n],65535&e[n+1])}function nt(t,e){let n,i,a=-1,r=t[1],s=0,l=7,o=4;for(0===r&&(l=138,o=3),n=0;n<=e;n++)if(i=r,r=t[2*(n+1)+1],!(++s<l&&i==r)){if(s<o)do{et(i,V)}while(0!=--s);else 0!==i?(i!=a&&(et(i,V),s--),et(16,V),tt(s-3,2)):s<=10?(et(17,V),tt(s-3,3)):(et(18,V),tt(s-11,7));s=0,a=i,0===r?(l=138,o=3):i==r?(l=6,o=3):(l=7,o=4)}}function it(){16==Q?($(N),N=0,Q=0):Q>=8&&(Z(255&N),N>>>=8,Q-=8)}function at(e,n){let i,a,r;if(t.pending_buf[F+2*L]=e>>>8&255,t.pending_buf[F+2*L+1]=255&e,t.pending_buf[W+L]=255&n,L++,0===e?z[2*n]++:(G++,e--,z[2*(I._length_code[n]+256+1)]++,B[2*I.d_code(e)]++),0==(8191&L)&&D>2){for(i=8*L,a=m-x,r=0;r<30;r++)i+=B[2*r]*(5+I.extra_dbits[r]);if(i>>>=3,G<Math.floor(L/2)&&i<Math.floor(a/2))return!0}return L==H-1}function rt(e,n){let i,a,r,s,l=0;if(0!==L)do{i=t.pending_buf[F+2*l]<<8&65280|255&t.pending_buf[F+2*l+1],a=255&t.pending_buf[W+l],l++,0===i?et(a,e):(r=I._length_code[a],et(r+256+1,e),s=I.extra_lbits[r],0!==s&&(a-=I.base_length[r],tt(a,s)),i--,r=I.d_code(i),et(r,n),s=I.extra_dbits[r],0!==s&&(i-=I.base_dist[r],tt(i,s)))}while(l<L);et(256,e),J=e[513]}function st(){Q>8?$(N):Q>0&&Z(255&N),N=0,Q=0}function lt(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(o.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function ot(e,n,i){let a,r,s=0;D>0?(q.build_tree(t),K.build_tree(t),s=function(){let e;for(Y(z,q.max_code),Y(B,K.max_code),R.build_tree(t),e=18;e>=3&&0===V[2*I.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?lt(e,n,i):r==a?(tt(2+(i?1:0),3),rt(E.static_ltree,E.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i<n;i++)tt(V[2*I.bl_order[i]+1],3);nt(z,t-1),nt(B,e-1)}(q.max_code+1,K.max_code+1,s+1),rt(z,B)),X(),i&&st()}function _t(t){ot(x>=0?x:-1,m-x,t),x=m,e.flush_pending()}function dt(){let t,n,i,a;do{if(a=_-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){o.set(o.subarray(r,r+r),0),v-=r,m-=r,x-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0}while(0!=--t);t=r,i=t;do{n=65535&d[--i],d[i]=n>=r?n-r:0}while(0!=--t);a+=r}if(0===e.avail_in)return;t=e.read_buf(o,m+k,a),k+=t,k>=3&&(f=255&o[m],f=(f<<w^255&o[m+1])&b)}while(k<262&&0!==e.avail_in)}function ut(t){let e,n,i=U,a=m,s=A;const _=m>r-262?m-(r-262):0;let u=T;const f=l,c=m+258;let h=o[a+s-1],b=o[a+s];A>=P&&(i>>=2),u>k&&(u=k);do{if(e=t,o[e+s]==b&&o[e+s-1]==h&&o[e]==o[a]&&o[++e]==o[a+1]){a+=2,e++;do{}while(o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&a<c);if(n=258-(c-a),a=c-258,n>s){if(v=t,s=n,n>=u)break;h=o[a+s-1],b=o[a+s]}}}while((t=65535&d[t&f])>_&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,q.dyn_tree=z,q.stat_desc=E.static_l_desc,K.dyn_tree=B,K.stat_desc=E.static_d_desc,R.dyn_tree=V,R.stat_desc=E.static_bl_desc,N=0,Q=0,J=8,X(),function(){_=2*r,u[c-1]=0;for(let t=0;t<c-1;t++)u[t]=0;S=C[D].max_lazy,P=C[D].good_length,T=C[D].nice_length,U=C[D].max_chain,m=0,x=0,k=0,p=A=2,y=0,f=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],z=[],B=[],V=[],t.pqdownheap=function(e,n){const i=t.heap,a=i[n];let r=n<<1;for(;r<=t.heap_len&&(r<t.heap_len&&M(e,i[r+1],i[r],t.depth)&&r++,!M(e,a,i[r],t.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a},t.deflateInit=function(e,n,a,_,f,x){return _||(_=8),f||(f=8),x||(x=0),e.msg=null,-1==n&&(n=6),f<1||f>9||8!=_||a<9||a>15||n<0||n>9||x<0||x>2?-2:(e.dstate=t,s=a,r=1<<s,l=r-1,h=f+7,c=1<<h,b=c-1,w=Math.floor((h+3-1)/3),o=new Uint8Array(2*r),d=[],u=[],H=1<<f+6,t.pending_buf=new Uint8Array(4*H),i=4*H,F=Math.floor(H/2),W=3*H,D=n,O=x,ft(e))},t.deflateEnd=function(){return 42!=n&&113!=n&&666!=n?-2:(t.pending_buf=null,u=null,d=null,o=null,t.dstate=null,113==n?-3:0)},t.deflateParams=function(t,e,n){let i=0;return-1==e&&(e=6),e<0||e>9||n<0||n>2?-2:(C[D].func!=C[e].func&&0!==t.total_in&&(i=t.deflate(1)),D!=e&&(D=e,S=C[D].max_lazy,P=C[D].good_length,T=C[D].nice_length,U=C[D].max_chain),O=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,_=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>r-262&&(s=r-262,_=i-s),o.set(e.subarray(_,_+s),0),m=s,x=s,f=255&o[0],f=(f<<w^255&o[1])&b,a=0;a<=s-3;a++)f=(f<<w^255&o[a+2])&b,d[a&l]=u[f],u[f]=a;return 0},t.deflate=function(_,h){let U,I,M,P,T;if(h>4||h<0)return-2;if(!_.next_out||!_.next_in&&0!==_.avail_in||666==n&&4!=h)return _.msg=j[4],-2;if(0===_.avail_out)return _.msg=j[7],-5;var z;if(e=_,P=a,a=h,42==n&&(I=8+(s-8<<4)<<8,M=(D-1&255)>>1,M>3&&(M=3),I|=M<<6,0!==m&&(I|=32),I+=31-I%31,n=113,Z((z=I)>>8&255),Z(255&z)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=P&&4!=h)return e.msg=j[7],-5;if(666==n&&0!==e.avail_in)return _.msg=j[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(T=-1,C[D].func){case 0:T=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(dt(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=x+a,(0===m||m>=n)&&(k=m-n,m=n,_t(!1),0===e.avail_out))return 0;if(m-x>=r-262&&(_t(!1),0===e.avail_out))return 0}return _t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:T=function(t){let n,i=0;for(;;){if(k<262){if(dt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<w^255&o[m+2])&b,i=65535&u[f],d[m&l]=u[f],u[f]=m),0!==i&&(m-i&65535)<=r-262&&2!=O&&(p=ut(i)),p>=3)if(n=at(m-v,p-3),k-=p,p<=S&&k>=3){p--;do{m++,f=(f<<w^255&o[m+2])&b,i=65535&u[f],d[m&l]=u[f],u[f]=m}while(0!=--p);m++}else m+=p,p=0,f=255&o[m],f=(f<<w^255&o[m+1])&b;else n=at(0,255&o[m]),k--,m++;if(n&&(_t(!1),0===e.avail_out))return 0}return _t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 2:T=function(t){let n,i,a=0;for(;;){if(k<262){if(dt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<w^255&o[m+2])&b,a=65535&u[f],d[m&l]=u[f],u[f]=m),A=p,g=v,p=2,0!==a&&A<S&&(m-a&65535)<=r-262&&(2!=O&&(p=ut(a)),p<=5&&(1==O||3==p&&m-v>4096)&&(p=2)),A>=3&&p<=A){i=m+k-3,n=at(m-1-g,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<<w^255&o[m+2])&b,a=65535&u[f],d[m&l]=u[f],u[f]=m)}while(0!=--A);if(y=0,p=2,m++,n&&(_t(!1),0===e.avail_out))return 0}else if(0!==y){if(n=at(0,255&o[m-1]),n&&_t(!1),m++,k--,0===e.avail_out)return 0}else y=1,m++,k--}return 0!==y&&(n=at(0,255&o[m-1]),y=0),_t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h)}if(2!=T&&3!=T||(n=666),0==T||2==T)return 0===e.avail_out&&(a=-1),0;if(1==T){if(1==h)tt(2,3),et(256,E.static_ltree),it(),1+J+10-Q<9&&(tt(2,3),et(256,E.static_ltree),it()),J=7;else if(lt(0,0,!1),3==h)for(U=0;U<c;U++)u[U]=0;if(e.flush_pending(),0===e.avail_out)return a=-1,0}}return 4!=h?0:1}}function O(){const t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}function P(t){const e=new O,n=512,i=new Uint8Array(n);let a=t?t.level:-1;void 0===a&&(a=-1),e.deflateInit(a),e.next_out=i,this.append=function(t,a){let r,s,l=0,o=0,_=0;const d=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,r=e.deflate(0),0!=r)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?d.push(new Uint8Array(i)):d.push(new Uint8Array(i.subarray(0,e.next_out_index)))),_+=e.next_out_index,a&&e.next_in_index>0&&e.next_in_index!=l&&(a(e.next_in_index),l=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(_),d.forEach((function(t){s.set(t,o),o+=t.length})),s}},this.flush=function(){let t,a,r=0,s=0;const l=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&l.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),l.forEach((function(t){a.set(t,r),r+=t.length})),a}}O.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new D,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const T=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],z=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],B=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],V=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],K=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function W(){let t,e,n,i,a,r;function s(t,e,s,l,o,_,d,u,f,c,h){let b,w,x,p,g,y,m,v,k,A,U,I,E,S,C;A=0,g=s;do{n[t[e+A]]++,A++,g--}while(0!==g);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(v=u[0],y=1;y<=15&&0===n[y];y++);for(m=y,v<y&&(v=y),g=15;0!==g&&0===n[g];g--);for(x=g,v>g&&(v=g),u[0]=v,S=1<<y;y<g;y++,S<<=1)if((S-=n[y])<0)return-3;if((S-=n[g])<0)return-3;for(n[g]+=S,r[1]=y=0,A=1,E=2;0!=--g;)r[E]=y+=n[A],E++,A++;g=0,A=0;do{0!==(y=t[e+A])&&(h[r[y]++]=g),A++}while(++g<s);for(s=r[x],r[0]=g=0,A=0,p=-1,I=-v,a[0]=0,U=0,C=0;m<=x;m++)for(b=n[m];0!=b--;){for(;m>I+v;){if(p++,I+=v,C=x-I,C=C>v?v:C,(w=1<<(y=m-I))>b+1&&(w-=b+1,E=m,y<C))for(;++y<C&&!((w<<=1)<=n[++E]);)w-=n[E];if(C=1<<y,c[0]+C>1440)return-3;a[p]=U=c[0],c[0]+=C,0!==p?(r[p]=g,i[0]=y,i[1]=v,y=g>>>I-v,i[2]=U-a[p-1]-y,f.set(i,3*(a[p-1]+y))):d[0]=U}for(i[1]=m-I,A>=s?i[0]=192:h[A]<l?(i[0]=h[A]<256?0:96,i[2]=h[A++]):(i[0]=_[h[A]-l]+16+64,i[2]=o[h[A++]-l]),w=1<<m-I,y=g>>>I;y<C;y+=w)f.set(i,3*(U+y));for(y=1<<m-1;0!=(g&y);y>>>=1)g^=y;for(g^=y,k=(1<<I)-1;(g&k)!=r[p];)p--,I-=v,k=(1<<I)-1}return 0!==S&&1!=x?-5:0}function l(s){let l;for(t||(t=[],e=[],n=new Int32Array(16),i=[],a=new Int32Array(15),r=new Int32Array(16)),e.length<s&&(e=[]),l=0;l<s;l++)e[l]=0;for(l=0;l<16;l++)n[l]=0;for(l=0;l<3;l++)i[l]=0;a.set(n.subarray(0,15),0),r.set(n.subarray(0,16),0)}this.inflate_trees_bits=function(n,i,a,r,o){let _;return l(19),t[0]=0,_=s(n,0,19,19,null,null,a,i,r,t,e),-3==_?o.msg="oversubscribed dynamic bit lengths tree":-5!=_&&0!==i[0]||(o.msg="incomplete dynamic bit lengths tree",_=-3),_},this.inflate_trees_dynamic=function(n,i,a,r,o,_,d,u,f){let c;return l(288),t[0]=0,c=s(a,0,n,257,V,q,_,r,u,t,e),0!=c||0===r[0]?(-3==c?f.msg="oversubscribed literal/length tree":-4!=c&&(f.msg="incomplete literal/length tree",c=-3),c):(l(288),c=s(a,n,i,0,K,R,d,o,u,t,e),0!=c||0===o[0]&&n>257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)}}function H(){const t=this;let e,n,i,a,r=0,s=0,l=0,o=0,_=0,d=0,u=0,f=0,c=0,h=0;function b(t,e,n,i,a,r,s,l){let o,_,d,u,f,c,h,b,w,x,p,g,y,m,v,k;h=l.next_in_index,b=l.avail_in,f=s.bitb,c=s.bitk,w=s.write,x=w<s.read?s.read-w-1:s.end-w,p=T[t],g=T[e];do{for(;c<20;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;if(o=f&p,_=n,d=i,k=3*(d+o),0!==(u=_[k]))for(;;){if(f>>=_[k+1],c-=_[k+1],0!=(16&u)){for(u&=15,y=_[k+2]+(f&T[u]),f>>=u,c-=u;c<15;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;for(o=f&g,_=a,d=r,k=3*(d+o),u=_[k];;){if(f>>=_[k+1],c-=_[k+1],0!=(16&u)){for(u&=15;c<u;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;if(m=_[k+2]+(f&T[u]),f>>=u,c-=u,x-=y,w>=m)v=w-m,w-v>0&&2>w-v?(s.window[w++]=s.window[v++],s.window[w++]=s.window[v++],y-=2):(s.window.set(s.window.subarray(v,v+2),w),w+=2,v+=2,y-=2);else{v=w-m;do{v+=s.end}while(v<0);if(u=s.end-v,y>u){if(y-=u,w-v>0&&u>w-v)do{s.window[w++]=s.window[v++]}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),w),w+=u,v+=u,u=0;v=0}}if(w-v>0&&y>w-v)do{s.window[w++]=s.window[v++]}while(0!=--y);else s.window.set(s.window.subarray(v,v+y),w),w+=y,v+=y,y=0;break}if(0!=(64&u))return l.msg="invalid distance code",y=l.avail_in-b,y=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,-3;o+=_[k+2],o+=f&T[u],k=3*(d+o),u=_[k]}break}if(0!=(64&u))return 0!=(32&u)?(y=l.avail_in-b,y=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,1):(l.msg="invalid literal/length code",y=l.avail_in-b,y=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,-3);if(o+=_[k+2],o+=f&T[u],k=3*(d+o),0===(u=_[k])){f>>=_[k+1],c-=_[k+1],s.window[w++]=_[k+2],x--;break}}else f>>=_[k+1],c-=_[k+1],s.window[w++]=_[k+2],x--}while(x>=258&&b>=10);return y=l.avail_in-b,y=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,0}t.init=function(t,r,s,l,o,_){e=0,u=t,f=r,i=s,c=l,a=o,h=_,n=null},t.proc=function(t,w,x){let p,g,y,m,v,k,A,U=0,I=0,E=0;for(E=w.next_in_index,m=w.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v<t.read?t.read-v-1:t.end-v;;)switch(e){case 0:if(k>=258&&m>=10&&(t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,x=b(u,f,i,c,a,h,t,w),E=w.next_in_index,m=w.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v<t.read?t.read-v-1:t.end-v,0!=x)){e=1==x?7:9;break}l=u,n=i,s=c,e=1;case 1:for(p=l;I<p;){if(0===m)return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x);x=0,m--,U|=(255&w.read_byte(E++))<<I,I+=8}if(g=3*(s+(U&T[p])),U>>>=n[g+1],I-=n[g+1],y=n[g],0===y){o=n[g+2],e=6;break}if(0!=(16&y)){_=15&y,r=n[g+2],e=2;break}if(0==(64&y)){l=y,s=g/3+n[g+2];break}if(0!=(32&y)){e=7;break}return e=9,w.msg="invalid literal/length code",x=-3,t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x);case 2:for(p=_;I<p;){if(0===m)return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x);x=0,m--,U|=(255&w.read_byte(E++))<<I,I+=8}r+=U&T[p],U>>=p,I-=p,l=f,n=a,s=h,e=3;case 3:for(p=l;I<p;){if(0===m)return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x);x=0,m--,U|=(255&w.read_byte(E++))<<I,I+=8}if(g=3*(s+(U&T[p])),U>>=n[g+1],I-=n[g+1],y=n[g],0!=(16&y)){_=15&y,d=n[g+2],e=4;break}if(0==(64&y)){l=y,s=g/3+n[g+2];break}return e=9,w.msg="invalid distance code",x=-3,t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x);case 4:for(p=_;I<p;){if(0===m)return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x);x=0,m--,U|=(255&w.read_byte(E++))<<I,I+=8}d+=U&T[p],U>>=p,I-=p,e=5;case 5:for(A=v-d;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k&&(t.write=v,x=t.inflate_flush(w,x),v=t.write,k=v<t.read?t.read-v-1:t.end-v,v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k)))return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x);t.window[v++]=t.window[A++],k--,A==t.end&&(A=0),r--}e=0;break;case 6:if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k&&(t.write=v,x=t.inflate_flush(w,x),v=t.write,k=v<t.read?t.read-v-1:t.end-v,v==t.end&&0!==t.read&&(v=0,k=v<t.read?t.read-v-1:t.end-v),0===k)))return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x);x=0,t.window[v++]=o,k--,e=0;break;case 7:if(I>7&&(I-=8,m++,E--),t.write=v,x=t.inflate_flush(w,x),v=t.write,k=v<t.read?t.read-v-1:t.end-v,t.read!=t.write)return t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x);e=8;case 8:return x=1,t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x);case 9:return x=-3,t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x);default:return x=-2,t.bitb=U,t.bitk=I,w.avail_in=m,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=v,t.inflate_flush(w,x)}},t.free=function(){}}W.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=z,i[0]=B,0};const L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function F(t,e){const n=this;let i,a=0,r=0,s=0,l=0;const o=[0],_=[0],d=new H;let u=0,f=new Int32Array(4320);const c=new W;n.bitk=0,n.bitb=0,n.window=new Uint8Array(e),n.end=e,n.read=0,n.write=0,n.reset=function(t,e){e&&(e[0]=0),6==a&&d.free(t),a=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(t,null),n.inflate_flush=function(t,e){let i,a,r;return a=t.next_out_index,r=n.read,i=(r<=n.write?n.write:n.end)-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,w,x,p,g,y,m;for(x=t.next_in_index,p=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g;;){let v,k,A,U,I,E,S,C;switch(a){case 0:for(;w<3;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}switch(h=7&b,u=1&h,h>>>1){case 0:b>>>=3,w-=3,h=7&w,b>>>=h,w-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],W.inflate_trees_fixed(v,k,A,U),d.init(v[0],k[0],A[0],0,U[0],0),b>>>=3,w-=3,a=6;break;case 2:b>>>=3,w-=3,a=3;break;case 3:return b>>>=3,w-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;w<32;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if((~b>>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);r=65535&b,b=w=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);if(0===y&&(g==n.end&&0!==n.read&&(g=0,y=g<n.read?n.read-g-1:n.end-g),0===y&&(n.write=g,e=n.inflate_flush(t,e),g=n.write,y=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,y=g<n.read?n.read-g-1:n.end-g),0===y)))return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);if(e=0,h=r,h>p&&(h=p),h>y&&(h=y),n.window.set(t.read_buf(x,h),g),x+=h,p-=h,g+=h,y-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;w<14;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if(s=h=16383&b,(31&h)>29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length<h)i=[];else for(m=0;m<h;m++)i[m]=0;b>>>=14,w-=14,l=0,a=4;case 4:for(;l<4+(s>>>10);){for(;w<3;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}i[L[l++]]=7&b,b>>>=3,w-=3}for(;l<19;)i[L[l++]]=0;if(o[0]=7,h=c.inflate_trees_bits(i,o,_,f,t),0!=h)return-3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);l=0,a=5;case 5:for(;h=s,!(l>=258+(31&h)+(h>>5&31));){let r,d;for(h=o[0];w<h;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if(h=f[3*(_[0]+(b&T[h]))+1],d=f[3*(_[0]+(b&T[h]))+2],d<16)b>>>=h,w-=h,i[l++]=d;else{for(m=18==d?7:d-14,r=18==d?11:3;w<h+m;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if(b>>>=h,w-=h,r+=b&T[m],b>>>=m,w-=m,m=l,h=s,m+r>258+(31&h)+(h>>5&31)||16==d&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);d=16==d?i[m-1]:0;do{i[m++]=d}while(0!=--r);l=m}}if(_[0]=-1,I=[],E=[],S=[],C=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,C,f,t),0!=h)return-3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);d.init(I[0],E[0],f,S[0],f,C[0]),a=6;case 6:if(n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),x=t.next_in_index,p=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g,0===u){a=0;break}a=7;case 7:if(n.write=g,e=n.inflate_flush(t,e),g=n.write,y=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);a=8;case 8:return e=1,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);case 9:return e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);default:return e=-2,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e)}}},n.free=function(t){n.reset(t,null),n.window=null,f=null},n.set_dictionary=function(t,e,i){n.window.set(t.subarray(e,e+i),0),n.read=n.write=i},n.sync_point=function(){return 1==a?1:0}}const G=[0,0,255,255];function J(){const t=this;function e(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):-2}t.mode=0,t.method=0,t.was=[0],t.need=0,t.marker=0,t.wbits=0,t.inflateEnd=function(e){return t.blocks&&t.blocks.free(e),t.blocks=null,0},t.inflateInit=function(n,i){return n.msg=null,t.blocks=null,i<8||i>15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new F(n,1<<i),e(n),0)},t.inflate=function(t,e){let n,i;if(!t||!t.istate||!t.next_in)return-2;const a=t.istate;for(e=4==e?-5:0,n=-5;;)switch(a.mode){case 0:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,8!=(15&(a.method=t.read_byte(t.next_in_index++)))){a.mode=13,t.msg="unknown compression method",a.marker=5;break}if(8+(a.method>>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const r=t.istate;return a>=1<<r.wbits&&(a=(1<<r.wbits)-1,i=n-a),r.blocks.set_dictionary(e,i,a),r.mode=7,0},t.inflateSync=function(t){let n,i,a,r,s;if(!t||!t.istate)return-2;const l=t.istate;if(13!=l.mode&&(l.mode=13,l.marker=0),0===(n=t.avail_in))return-5;for(i=t.next_in_index,a=l.marker;0!==n&&a<4;)t.read_byte(i)==G[a]?a++:a=0!==t.read_byte(i)?0:4-a,i++,n--;return t.total_in+=i-t.next_in_index,t.next_in_index=i,t.avail_in=n,l.marker=a,4!=a?-3:(r=t.total_in,s=t.total_out,e(t),t.total_in=r,t.total_out=s,l.mode=7,0)},t.inflateSyncPoint=function(t){return t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():-2}}function N(){}function Q(){const t=new N,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,a){const r=[];let s,l,o=0,_=0,d=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&-5===s){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?r.push(new Uint8Array(e)):r.push(new Uint8Array(e.subarray(0,t.next_out_index)))),d+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=o&&(a(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return l=new Uint8Array(d),r.forEach((function(t){l.set(t,_),_+=t.length})),l}},this.flush=function(){t.inflateEnd()}}N.prototype={inflateInit:function(t){const e=this;return e.istate=new J,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=P,self.Inflate=Q}}).toString()+")()"]));t({workerScripts:{inflate:[e],deflate:[e]}})}; | ||
import{configure as t}from"./core/zip-core.js";export default()=>{const e=(()=>{class t{constructor(){this.crc=-1,this.table=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}return t})()}append(t){const e=this.table;let n=0|this.crc;for(let i=0,a=0|t.length;i<a;i++)n=n>>>8^e[255&(n^t[i])];this.crc=n}get(){return~this.crc}}const e={name:"PBKDF2"},n={name:"HMAC"},i={name:"AES-CTR"},a=Object.assign({hash:n},e),r=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},e),s=Object.assign({hash:"SHA-1"},n),o=Object.assign({length:16},i),l=["deriveBits"],_=["sign"],d=[8,12,16],u=[16,24,32],f=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=crypto.subtle;class h{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await c.decrypt(Object.assign({counter:this.counter},o),this.keys.key,t);return x(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=p(this.input,t)),n};if(this.password){const e=t.subarray(0,d[this.strength]+2);await async function(t,e,n){await w(t,n,e.subarray(0,d[t.strength]),["decrypt"]);const i=e.subarray(d[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(d[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=p(this.pendingInput,t),n=g(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,i=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(i.length){const t=await c.decrypt(Object.assign({counter:this.counter},o),e.key,i);r=new Uint8Array(t)}let s=!0;if(this.signed){const t=await c.sign(n,e.authentication,this.input.subarray(0,this.input.length-10)),i=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)i[t]!=a[t]&&(s=!1)}return{valid:s,data:r}}}class b{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await c.encrypt(Object.assign({counter:this.counter},o),this.keys.key,r);return x(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=p(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(d[t.strength]));return await w(t,e,n,["encrypt"]),p(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=p(this.pendingInput,t),i=g(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await c.encrypt(Object.assign({counter:this.counter},o),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=p(this.output,t)}const e=await c.sign(n,this.keys.authentication,this.output.subarray(d[this.strength]+2));this.output=null;const i=new Uint8Array(e).subarray(0,10);return{data:p(t,i),signature:i}}}async function w(t,e,n,o){t.counter=new Uint8Array(f);const d=(new TextEncoder).encode(e),h=await c.importKey("raw",d,a,!1,l),b=await c.deriveBits(Object.assign({salt:n},r),h,8*(2*u[t.strength]+2)),w=new Uint8Array(b);t.keys={key:await c.importKey("raw",w.subarray(0,u[t.strength]),i,!0,o),authentication:await c.importKey("raw",w.subarray(u[t.strength],2*u[t.strength]),s,!1,_),passwordVerification:w.subarray(2*u[t.strength])}}function x(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function p(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function g(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class y{constructor(e){this.signature=e.inputSignature,this.encrypted=Boolean(e.inputPassword),this.signed=e.inputSigned,this.compressed=e.inputCompressed,this.inflate=e.inputCompressed&&new e.codecConstructor,this.crc32=e.inputSigned&&new t,this.decrypt=this.encrypted&&new h(e.inputPassword,e.inputSigned,e.inputEncryptionStrength)}async append(t){return this.encrypted&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),!this.encrypted&&this.signed&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}else if(this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class v{constructor(e){this.encrypted=e.outputEncrypted,this.signed=e.outputSigned,this.compressed=e.outputCompressed,this.deflate=e.outputCompressed&&new e.codecConstructor({level:e.level||5}),this.crc32=e.outputSigned&&new t,this.encrypt=this.encrypted&&new b(e.outputPassword,e.outputEncryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted?e=await this.encrypt.append(e):this.signed&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}else this.signed&&(t=this.crc32.get());return{data:e,signature:t}}}const m={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?e.codecConstructor=self.Deflate:e.codecType.startsWith("inflate")&&(e.codecConstructor=self.Inflate),k=function(t){return t.codecType.startsWith("deflate")?new v(t):t.codecType.startsWith("inflate")?new y(t):void 0}(e)},append:async t=>({data:await k.append(t.data)}),flush:()=>k.flush()};let k;function A(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=m[n];if(i)try{const t=await i(e)||{};if(t.type=n,t.data)try{postMessage(t,[t.data.buffer])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const U=[0,1,2,3].concat(...A([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function I(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,o,l,_=-1;for(n.heap_len=0,n.heap_max=573,s=0;s<r;s++)0!==i[2*s]?(n.heap[++n.heap_len]=_=s,n.depth[s]=0):i[2*s+1]=0;for(;n.heap_len<2;)l=n.heap[++n.heap_len]=_<2?++_:0,i[2*l]=1,n.depth[l]=0,n.opt_len--,a&&(n.static_len-=a[2*l+1]);for(t.max_code=_,s=Math.floor(n.heap_len/2);s>=1;s--)n.pqdownheap(i,s);l=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,_,d,u,f,c=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],d=n[2*n[2*l+1]+1]+1,d>s&&(d=s,c++),n[2*l+1]=d,l>t.max_code||(e.bl_count[d]++,u=0,l>=r&&(u=a[l-r]),f=n[2*l],e.opt_len+=f*(d+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==c){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,c-=2}while(c>0);for(d=s;0!==d;d--)for(l=e.bl_count[d];0!==l;)_=e.heap[--o],_>t.max_code||(n[2*_+1]!=d&&(e.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),l--)}}(n),function(t,n,i){const a=[];let r,s,o,l=0;for(r=1;r<=15;r++)a[r]=l=l+i[r-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(a[o]++,o))}(i,t.max_code,n.bl_count)}}function E(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a}function S(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a}I._length_code=[0,1,2,3,4,5,6,7].concat(...A([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),I.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],I.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],I.d_code=function(t){return t<256?U[t]:U[256+(t>>>7)]},I.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],I.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],I.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],E.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],E.static_l_desc=new E(E.static_ltree,I.extra_lbits,257,286,15),E.static_d_desc=new E(E.static_dtree,I.extra_dbits,0,30,15),E.static_bl_desc=new E(null,I.extra_blbits,0,19,7);const j=[new S(0,0,0,0,0),new S(4,4,8,4,1),new S(4,5,16,8,1),new S(4,6,32,32,1),new S(4,4,16,16,2),new S(8,16,32,32,2),new S(8,16,128,128,2),new S(8,32,128,256,2),new S(32,128,258,1024,2),new S(32,258,258,4096,2)],C=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function M(t,e,n,i){const a=t[2*e],r=t[2*n];return a<r||a==r&&i[e]<=i[n]}function O(){const t=this;let e,n,i,a,r,s,o,l,_,d,u,f,c,h,b,w,x,p,g,y,v,m,k,A,U,S,O,D,P,R,T,z,B;const L=new I,V=new I,q=new I;let K,W,H,F,G,J,N,Q;function X(){let e;for(e=0;e<286;e++)T[2*e]=0;for(e=0;e<30;e++)z[2*e]=0;for(e=0;e<19;e++)B[2*e]=0;T[512]=1,t.opt_len=t.static_len=0,H=G=0}function Y(t,e){let n,i=-1,a=t[1],r=0,s=7,o=4;0===a&&(s=138,o=3),t[2*(e+1)+1]=65535;for(let l=0;l<=e;l++)n=a,a=t[2*(l+1)+1],++r<s&&n==a||(r<o?B[2*n]+=r:0!==n?(n!=i&&B[2*n]++,B[32]++):r<=10?B[34]++:B[36]++,r=0,i=n,0===a?(s=138,o=3):n==a?(s=6,o=3):(s=7,o=4))}function Z(e){t.pending_buf[t.pending++]=e}function $(t){Z(255&t),Z(t>>>8&255)}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<<Q&65535,$(N),N=n>>>16-Q,Q+=i-16):(N|=t<<Q&65535,Q+=i)}function et(t,e){const n=2*t;tt(65535&e[n],65535&e[n+1])}function nt(t,e){let n,i,a=-1,r=t[1],s=0,o=7,l=4;for(0===r&&(o=138,l=3),n=0;n<=e;n++)if(i=r,r=t[2*(n+1)+1],!(++s<o&&i==r)){if(s<l)do{et(i,B)}while(0!=--s);else 0!==i?(i!=a&&(et(i,B),s--),et(16,B),tt(s-3,2)):s<=10?(et(17,B),tt(s-3,3)):(et(18,B),tt(s-11,7));s=0,a=i,0===r?(o=138,l=3):i==r?(o=6,l=3):(o=7,l=4)}}function it(){16==Q?($(N),N=0,Q=0):Q>=8&&(Z(255&N),N>>>=8,Q-=8)}function at(e,n){let i,a,r;if(t.pending_buf[F+2*H]=e>>>8&255,t.pending_buf[F+2*H+1]=255&e,t.pending_buf[K+H]=255&n,H++,0===e?T[2*n]++:(G++,e--,T[2*(I._length_code[n]+256+1)]++,z[2*I.d_code(e)]++),0==(8191&H)&&O>2){for(i=8*H,a=v-x,r=0;r<30;r++)i+=z[2*r]*(5+I.extra_dbits[r]);if(i>>>=3,G<Math.floor(H/2)&&i<Math.floor(a/2))return!0}return H==W-1}function rt(e,n){let i,a,r,s,o=0;if(0!==H)do{i=t.pending_buf[F+2*o]<<8&65280|255&t.pending_buf[F+2*o+1],a=255&t.pending_buf[K+o],o++,0===i?et(a,e):(r=I._length_code[a],et(r+256+1,e),s=I.extra_lbits[r],0!==s&&(a-=I.base_length[r],tt(a,s)),i--,r=I.d_code(i),et(r,n),s=I.extra_dbits[r],0!==s&&(i-=I.base_dist[r],tt(i,s)))}while(o<H);et(256,e),J=e[513]}function st(){Q>8?$(N):Q>0&&Z(255&N),N=0,Q=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let a,r,s=0;O>0?(L.build_tree(t),V.build_tree(t),s=function(){let e;for(Y(T,L.max_code),Y(z,V.max_code),q.build_tree(t),e=18;e>=3&&0===B[2*I.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?ot(e,n,i):r==a?(tt(2+(i?1:0),3),rt(E.static_ltree,E.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i<n;i++)tt(B[2*I.bl_order[i]+1],3);nt(T,t-1),nt(z,e-1)}(L.max_code+1,V.max_code+1,s+1),rt(T,z)),X(),i&&st()}function _t(t){lt(x>=0?x:-1,v-x,t),x=v,e.flush_pending()}function dt(){let t,n,i,a;do{if(a=_-k-v,0===a&&0===v&&0===k)a=r;else if(-1==a)a--;else if(v>=r+r-262){l.set(l.subarray(r,r+r),0),m-=r,v-=r,x-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0}while(0!=--t);t=r,i=t;do{n=65535&d[--i],d[i]=n>=r?n-r:0}while(0!=--t);a+=r}if(0===e.avail_in)return;t=e.read_buf(l,v+k,a),k+=t,k>=3&&(f=255&l[v],f=(f<<w^255&l[v+1])&b)}while(k<262&&0!==e.avail_in)}function ut(t){let e,n,i=U,a=v,s=A;const _=v>r-262?v-(r-262):0;let u=R;const f=o,c=v+258;let h=l[a+s-1],b=l[a+s];A>=P&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==b&&l[e+s-1]==h&&l[e]==l[a]&&l[++e]==l[a+1]){a+=2,e++;do{}while(l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&a<c);if(n=258-(c-a),a=c-258,n>s){if(m=t,s=n,n>=u)break;h=l[a+s-1],b=l[a+s]}}}while((t=65535&d[t&f])>_&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,L.dyn_tree=T,L.stat_desc=E.static_l_desc,V.dyn_tree=z,V.stat_desc=E.static_d_desc,q.dyn_tree=B,q.stat_desc=E.static_bl_desc,N=0,Q=0,J=8,X(),function(){_=2*r,u[c-1]=0;for(let t=0;t<c-1;t++)u[t]=0;S=j[O].max_lazy,P=j[O].good_length,R=j[O].nice_length,U=j[O].max_chain,v=0,x=0,k=0,p=A=2,y=0,f=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],T=[],z=[],B=[],t.pqdownheap=function(e,n){const i=t.heap,a=i[n];let r=n<<1;for(;r<=t.heap_len&&(r<t.heap_len&&M(e,i[r+1],i[r],t.depth)&&r++,!M(e,a,i[r],t.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a},t.deflateInit=function(e,n,a,_,f,x){return _||(_=8),f||(f=8),x||(x=0),e.msg=null,-1==n&&(n=6),f<1||f>9||8!=_||a<9||a>15||n<0||n>9||x<0||x>2?-2:(e.dstate=t,s=a,r=1<<s,o=r-1,h=f+7,c=1<<h,b=c-1,w=Math.floor((h+3-1)/3),l=new Uint8Array(2*r),d=[],u=[],W=1<<f+6,t.pending_buf=new Uint8Array(4*W),i=4*W,F=Math.floor(W/2),K=3*W,O=n,D=x,ft(e))},t.deflateEnd=function(){return 42!=n&&113!=n&&666!=n?-2:(t.pending_buf=null,u=null,d=null,l=null,t.dstate=null,113==n?-3:0)},t.deflateParams=function(t,e,n){let i=0;return-1==e&&(e=6),e<0||e>9||n<0||n>2?-2:(j[O].func!=j[e].func&&0!==t.total_in&&(i=t.deflate(1)),O!=e&&(O=e,S=j[O].max_lazy,P=j[O].good_length,R=j[O].nice_length,U=j[O].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,_=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>r-262&&(s=r-262,_=i-s),l.set(e.subarray(_,_+s),0),v=s,x=s,f=255&l[0],f=(f<<w^255&l[1])&b,a=0;a<=s-3;a++)f=(f<<w^255&l[a+2])&b,d[a&o]=u[f],u[f]=a;return 0},t.deflate=function(_,h){let U,I,M,P,R;if(h>4||h<0)return-2;if(!_.next_out||!_.next_in&&0!==_.avail_in||666==n&&4!=h)return _.msg=C[4],-2;if(0===_.avail_out)return _.msg=C[7],-5;var T;if(e=_,P=a,a=h,42==n&&(I=8+(s-8<<4)<<8,M=(O-1&255)>>1,M>3&&(M=3),I|=M<<6,0!==v&&(I|=32),I+=31-I%31,n=113,Z((T=I)>>8&255),Z(255&T)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=P&&4!=h)return e.msg=C[7],-5;if(666==n&&0!==e.avail_in)return _.msg=C[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(R=-1,j[O].func){case 0:R=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(dt(),0===k&&0==t)return 0;if(0===k)break}if(v+=k,k=0,n=x+a,(0===v||v>=n)&&(k=v-n,v=n,_t(!1),0===e.avail_out))return 0;if(v-x>=r-262&&(_t(!1),0===e.avail_out))return 0}return _t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:R=function(t){let n,i=0;for(;;){if(k<262){if(dt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<w^255&l[v+2])&b,i=65535&u[f],d[v&o]=u[f],u[f]=v),0!==i&&(v-i&65535)<=r-262&&2!=D&&(p=ut(i)),p>=3)if(n=at(v-m,p-3),k-=p,p<=S&&k>=3){p--;do{v++,f=(f<<w^255&l[v+2])&b,i=65535&u[f],d[v&o]=u[f],u[f]=v}while(0!=--p);v++}else v+=p,p=0,f=255&l[v],f=(f<<w^255&l[v+1])&b;else n=at(0,255&l[v]),k--,v++;if(n&&(_t(!1),0===e.avail_out))return 0}return _t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 2:R=function(t){let n,i,a=0;for(;;){if(k<262){if(dt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<w^255&l[v+2])&b,a=65535&u[f],d[v&o]=u[f],u[f]=v),A=p,g=m,p=2,0!==a&&A<S&&(v-a&65535)<=r-262&&(2!=D&&(p=ut(a)),p<=5&&(1==D||3==p&&v-m>4096)&&(p=2)),A>=3&&p<=A){i=v+k-3,n=at(v-1-g,A-3),k-=A-1,A-=2;do{++v<=i&&(f=(f<<w^255&l[v+2])&b,a=65535&u[f],d[v&o]=u[f],u[f]=v)}while(0!=--A);if(y=0,p=2,v++,n&&(_t(!1),0===e.avail_out))return 0}else if(0!==y){if(n=at(0,255&l[v-1]),n&&_t(!1),v++,k--,0===e.avail_out)return 0}else y=1,v++,k--}return 0!==y&&(n=at(0,255&l[v-1]),y=0),_t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h)}if(2!=R&&3!=R||(n=666),0==R||2==R)return 0===e.avail_out&&(a=-1),0;if(1==R){if(1==h)tt(2,3),et(256,E.static_ltree),it(),1+J+10-Q<9&&(tt(2,3),et(256,E.static_ltree),it()),J=7;else if(ot(0,0,!1),3==h)for(U=0;U<c;U++)u[U]=0;if(e.flush_pending(),0===e.avail_out)return a=-1,0}}return 4!=h?0:1}}function D(){const t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}function P(t){const e=new D,n=512,i=new Uint8Array(n);let a=t?t.level:-1;void 0===a&&(a=-1),e.deflateInit(a),e.next_out=i,this.append=function(t,a){let r,s,o=0,l=0,_=0;const d=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,r=e.deflate(0),0!=r)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?d.push(new Uint8Array(i)):d.push(new Uint8Array(i.subarray(0,e.next_out_index)))),_+=e.next_out_index,a&&e.next_in_index>0&&e.next_in_index!=o&&(a(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(_),d.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,a,r=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),o.forEach((function(t){a.set(t,r),r+=t.length})),a}}D.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new O,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const R=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],T=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],z=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],B=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],L=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],V=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function K(){let t,e,n,i,a,r;function s(t,e,s,o,l,_,d,u,f,c,h){let b,w,x,p,g,y,v,m,k,A,U,I,E,S,j;A=0,g=s;do{n[t[e+A]]++,A++,g--}while(0!==g);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(m=u[0],y=1;y<=15&&0===n[y];y++);for(v=y,m<y&&(m=y),g=15;0!==g&&0===n[g];g--);for(x=g,m>g&&(m=g),u[0]=m,S=1<<y;y<g;y++,S<<=1)if((S-=n[y])<0)return-3;if((S-=n[g])<0)return-3;for(n[g]+=S,r[1]=y=0,A=1,E=2;0!=--g;)r[E]=y+=n[A],E++,A++;g=0,A=0;do{0!==(y=t[e+A])&&(h[r[y]++]=g),A++}while(++g<s);for(s=r[x],r[0]=g=0,A=0,p=-1,I=-m,a[0]=0,U=0,j=0;v<=x;v++)for(b=n[v];0!=b--;){for(;v>I+m;){if(p++,I+=m,j=x-I,j=j>m?m:j,(w=1<<(y=v-I))>b+1&&(w-=b+1,E=v,y<j))for(;++y<j&&!((w<<=1)<=n[++E]);)w-=n[E];if(j=1<<y,c[0]+j>1440)return-3;a[p]=U=c[0],c[0]+=j,0!==p?(r[p]=g,i[0]=y,i[1]=m,y=g>>>I-m,i[2]=U-a[p-1]-y,f.set(i,3*(a[p-1]+y))):d[0]=U}for(i[1]=v-I,A>=s?i[0]=192:h[A]<o?(i[0]=h[A]<256?0:96,i[2]=h[A++]):(i[0]=_[h[A]-o]+16+64,i[2]=l[h[A++]-o]),w=1<<v-I,y=g>>>I;y<j;y+=w)f.set(i,3*(U+y));for(y=1<<v-1;0!=(g&y);y>>>=1)g^=y;for(g^=y,k=(1<<I)-1;(g&k)!=r[p];)p--,I-=m,k=(1<<I)-1}return 0!==S&&1!=x?-5:0}function o(s){let o;for(t||(t=[],e=[],n=new Int32Array(16),i=[],a=new Int32Array(15),r=new Int32Array(16)),e.length<s&&(e=[]),o=0;o<s;o++)e[o]=0;for(o=0;o<16;o++)n[o]=0;for(o=0;o<3;o++)i[o]=0;a.set(n.subarray(0,15),0),r.set(n.subarray(0,16),0)}this.inflate_trees_bits=function(n,i,a,r,l){let _;return o(19),t[0]=0,_=s(n,0,19,19,null,null,a,i,r,t,e),-3==_?l.msg="oversubscribed dynamic bit lengths tree":-5!=_&&0!==i[0]||(l.msg="incomplete dynamic bit lengths tree",_=-3),_},this.inflate_trees_dynamic=function(n,i,a,r,l,_,d,u,f){let c;return o(288),t[0]=0,c=s(a,0,n,257,B,L,_,r,u,t,e),0!=c||0===r[0]?(-3==c?f.msg="oversubscribed literal/length tree":-4!=c&&(f.msg="incomplete literal/length tree",c=-3),c):(o(288),c=s(a,n,i,0,V,q,d,l,u,t,e),0!=c||0===l[0]&&n>257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)}}function W(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,_=0,d=0,u=0,f=0,c=0,h=0;function b(t,e,n,i,a,r,s,o){let l,_,d,u,f,c,h,b,w,x,p,g,y,v,m,k;h=o.next_in_index,b=o.avail_in,f=s.bitb,c=s.bitk,w=s.write,x=w<s.read?s.read-w-1:s.end-w,p=R[t],g=R[e];do{for(;c<20;)b--,f|=(255&o.read_byte(h++))<<c,c+=8;if(l=f&p,_=n,d=i,k=3*(d+l),0!==(u=_[k]))for(;;){if(f>>=_[k+1],c-=_[k+1],0!=(16&u)){for(u&=15,y=_[k+2]+(f&R[u]),f>>=u,c-=u;c<15;)b--,f|=(255&o.read_byte(h++))<<c,c+=8;for(l=f&g,_=a,d=r,k=3*(d+l),u=_[k];;){if(f>>=_[k+1],c-=_[k+1],0!=(16&u)){for(u&=15;c<u;)b--,f|=(255&o.read_byte(h++))<<c,c+=8;if(v=_[k+2]+(f&R[u]),f>>=u,c-=u,x-=y,w>=v)m=w-v,w-m>0&&2>w-m?(s.window[w++]=s.window[m++],s.window[w++]=s.window[m++],y-=2):(s.window.set(s.window.subarray(m,m+2),w),w+=2,m+=2,y-=2);else{m=w-v;do{m+=s.end}while(m<0);if(u=s.end-m,y>u){if(y-=u,w-m>0&&u>w-m)do{s.window[w++]=s.window[m++]}while(0!=--u);else s.window.set(s.window.subarray(m,m+u),w),w+=u,m+=u,u=0;m=0}}if(w-m>0&&y>w-m)do{s.window[w++]=s.window[m++]}while(0!=--y);else s.window.set(s.window.subarray(m,m+y),w),w+=y,m+=y,y=0;break}if(0!=(64&u))return o.msg="invalid distance code",y=o.avail_in-b,y=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,-3;l+=_[k+2],l+=f&R[u],k=3*(d+l),u=_[k]}break}if(0!=(64&u))return 0!=(32&u)?(y=o.avail_in-b,y=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,1):(o.msg="invalid literal/length code",y=o.avail_in-b,y=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,-3);if(l+=_[k+2],l+=f&R[u],k=3*(d+l),0===(u=_[k])){f>>=_[k+1],c-=_[k+1],s.window[w++]=_[k+2],x--;break}}else f>>=_[k+1],c-=_[k+1],s.window[w++]=_[k+2],x--}while(x>=258&&b>=10);return y=o.avail_in-b,y=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,o.avail_in=b,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=w,0}t.init=function(t,r,s,o,l,_){e=0,u=t,f=r,i=s,c=o,a=l,h=_,n=null},t.proc=function(t,w,x){let p,g,y,v,m,k,A,U=0,I=0,E=0;for(E=w.next_in_index,v=w.avail_in,U=t.bitb,I=t.bitk,m=t.write,k=m<t.read?t.read-m-1:t.end-m;;)switch(e){case 0:if(k>=258&&v>=10&&(t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,x=b(u,f,i,c,a,h,t,w),E=w.next_in_index,v=w.avail_in,U=t.bitb,I=t.bitk,m=t.write,k=m<t.read?t.read-m-1:t.end-m,0!=x)){e=1==x?7:9;break}o=u,n=i,s=c,e=1;case 1:for(p=o;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8}if(g=3*(s+(U&R[p])),U>>>=n[g+1],I-=n[g+1],y=n[g],0===y){l=n[g+2],e=6;break}if(0!=(16&y)){_=15&y,r=n[g+2],e=2;break}if(0==(64&y)){o=y,s=g/3+n[g+2];break}if(0!=(32&y)){e=7;break}return e=9,w.msg="invalid literal/length code",x=-3,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);case 2:for(p=_;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8}r+=U&R[p],U>>=p,I-=p,o=f,n=a,s=h,e=3;case 3:for(p=o;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8}if(g=3*(s+(U&R[p])),U>>=n[g+1],I-=n[g+1],y=n[g],0!=(16&y)){_=15&y,d=n[g+2],e=4;break}if(0==(64&y)){o=y,s=g/3+n[g+2];break}return e=9,w.msg="invalid distance code",x=-3,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);case 4:for(p=_;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8}d+=U&R[p],U>>=p,I-=p,e=5;case 5:for(A=m-d;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k&&(t.write=m,x=t.inflate_flush(w,x),m=t.write,k=m<t.read?t.read-m-1:t.end-m,m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k)))return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);t.window[m++]=t.window[A++],k--,A==t.end&&(A=0),r--}e=0;break;case 6:if(0===k&&(m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k&&(t.write=m,x=t.inflate_flush(w,x),m=t.write,k=m<t.read?t.read-m-1:t.end-m,m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k)))return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,t.window[m++]=l,k--,e=0;break;case 7:if(I>7&&(I-=8,v++,E--),t.write=m,x=t.inflate_flush(w,x),m=t.write,k=m<t.read?t.read-m-1:t.end-m,t.read!=t.write)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);e=8;case 8:return x=1,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);case 9:return x=-3,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);default:return x=-2,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x)}},t.free=function(){}}K.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=T,i[0]=z,0};const H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function F(t,e){const n=this;let i,a=0,r=0,s=0,o=0;const l=[0],_=[0],d=new W;let u=0,f=new Int32Array(4320);const c=new K;n.bitk=0,n.bitb=0,n.window=new Uint8Array(e),n.end=e,n.read=0,n.write=0,n.reset=function(t,e){e&&(e[0]=0),6==a&&d.free(t),a=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(t,null),n.inflate_flush=function(t,e){let i,a,r;return a=t.next_out_index,r=n.read,i=(r<=n.write?n.write:n.end)-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,w,x,p,g,y,v;for(x=t.next_in_index,p=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g;;){let m,k,A,U,I,E,S,j;switch(a){case 0:for(;w<3;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}switch(h=7&b,u=1&h,h>>>1){case 0:b>>>=3,w-=3,h=7&w,b>>>=h,w-=h,a=1;break;case 1:m=[],k=[],A=[[]],U=[[]],K.inflate_trees_fixed(m,k,A,U),d.init(m[0],k[0],A[0],0,U[0],0),b>>>=3,w-=3,a=6;break;case 2:b>>>=3,w-=3,a=3;break;case 3:return b>>>=3,w-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;w<32;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if((~b>>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);r=65535&b,b=w=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);if(0===y&&(g==n.end&&0!==n.read&&(g=0,y=g<n.read?n.read-g-1:n.end-g),0===y&&(n.write=g,e=n.inflate_flush(t,e),g=n.write,y=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,y=g<n.read?n.read-g-1:n.end-g),0===y)))return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);if(e=0,h=r,h>p&&(h=p),h>y&&(h=y),n.window.set(t.read_buf(x,h),g),x+=h,p-=h,g+=h,y-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;w<14;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if(s=h=16383&b,(31&h)>29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length<h)i=[];else for(v=0;v<h;v++)i[v]=0;b>>>=14,w-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;w<3;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}i[H[o++]]=7&b,b>>>=3,w-=3}for(;o<19;)i[H[o++]]=0;if(l[0]=7,h=c.inflate_trees_bits(i,l,_,f,t),0!=h)return-3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,d;for(h=l[0];w<h;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if(h=f[3*(_[0]+(b&R[h]))+1],d=f[3*(_[0]+(b&R[h]))+2],d<16)b>>>=h,w-=h,i[o++]=d;else{for(v=18==d?7:d-14,r=18==d?11:3;w<h+v;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if(b>>>=h,w-=h,r+=b&R[v],b>>>=v,w-=v,v=o,h=s,v+r>258+(31&h)+(h>>5&31)||16==d&&v<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);d=16==d?i[v-1]:0;do{i[v++]=d}while(0!=--r);o=v}}if(_[0]=-1,I=[],E=[],S=[],j=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,j,f,t),0!=h)return-3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);d.init(I[0],E[0],f,S[0],f,j[0]),a=6;case 6:if(n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),x=t.next_in_index,p=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g,0===u){a=0;break}a=7;case 7:if(n.write=g,e=n.inflate_flush(t,e),g=n.write,y=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);a=8;case 8:return e=1,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);case 9:return e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);default:return e=-2,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e)}}},n.free=function(t){n.reset(t,null),n.window=null,f=null},n.set_dictionary=function(t,e,i){n.window.set(t.subarray(e,e+i),0),n.read=n.write=i},n.sync_point=function(){return 1==a?1:0}}const G=[0,0,255,255];function J(){const t=this;function e(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):-2}t.mode=0,t.method=0,t.was=[0],t.need=0,t.marker=0,t.wbits=0,t.inflateEnd=function(e){return t.blocks&&t.blocks.free(e),t.blocks=null,0},t.inflateInit=function(n,i){return n.msg=null,t.blocks=null,i<8||i>15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new F(n,1<<i),e(n),0)},t.inflate=function(t,e){let n,i;if(!t||!t.istate||!t.next_in)return-2;const a=t.istate;for(e=4==e?-5:0,n=-5;;)switch(a.mode){case 0:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,8!=(15&(a.method=t.read_byte(t.next_in_index++)))){a.mode=13,t.msg="unknown compression method",a.marker=5;break}if(8+(a.method>>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const r=t.istate;return a>=1<<r.wbits&&(a=(1<<r.wbits)-1,i=n-a),r.blocks.set_dictionary(e,i,a),r.mode=7,0},t.inflateSync=function(t){let n,i,a,r,s;if(!t||!t.istate)return-2;const o=t.istate;if(13!=o.mode&&(o.mode=13,o.marker=0),0===(n=t.avail_in))return-5;for(i=t.next_in_index,a=o.marker;0!==n&&a<4;)t.read_byte(i)==G[a]?a++:a=0!==t.read_byte(i)?0:4-a,i++,n--;return t.total_in+=i-t.next_in_index,t.next_in_index=i,t.avail_in=n,o.marker=a,4!=a?-3:(r=t.total_in,s=t.total_out,e(t),t.total_in=r,t.total_out=s,o.mode=7,0)},t.inflateSyncPoint=function(t){return t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():-2}}function N(){}function Q(){const t=new N,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,a){const r=[];let s,o,l=0,_=0,d=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&-5===s){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?r.push(new Uint8Array(e)):r.push(new Uint8Array(e.subarray(0,t.next_out_index)))),d+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(d),r.forEach((function(t){o.set(t,_),_+=t.length})),o}},this.flush=function(){t.inflateEnd()}}N.prototype={inflateInit:function(t){const e=this;return e.istate=new J,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=P,self.Inflate=Q}}).toString();if(void 0!==URL.createObjectURL){const n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));t({workerScripts:{inflate:[n],deflate:[n]}})}}; |
@@ -6,3 +6,3 @@ { | ||
"license": "BSD-3-Clause", | ||
"version": "2.2.5", | ||
"version": "2.2.6", | ||
"keywords": [ | ||
@@ -9,0 +9,0 @@ "zip", |
@@ -15,6 +15,15 @@ import { terser } from "rollup-plugin-terser"; | ||
format: "esm", | ||
intro: "import { configure } from './core/zip-core.js'; export default () => { const uri = URL.createObjectURL(new Blob(['(' + (() => {", | ||
outro: "}).toString() + ')()'])); configure({ workerScripts: { inflate: [uri], deflate: [uri] } }); };", | ||
intro: ` | ||
import { configure } from "./core/zip-core.js"; | ||
export default () => { | ||
const code = (() => {`, | ||
outro: ` | ||
}).toString(); | ||
if (typeof URL.createObjectURL != "undefined") { | ||
const uri = URL.createObjectURL(new Blob(["(" + code + ")()"], { type : "text/javascript" })); | ||
configure({ workerScripts: { inflate: [uri], deflate: [uri] } }); | ||
} | ||
};`, | ||
plugins: [terser()] | ||
}] | ||
}]; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1786891
28394