2 lines
27 KiB
JavaScript
2 lines
27 KiB
JavaScript
|
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */(function(v,z){typeof exports=="object"&&typeof module<"u"?z(exports):typeof define=="function"&&define.amd?define(["exports"],z):z((v=typeof globalThis<"u"?globalThis:v||self).pako={})})(this,function(v){"use strict";function z(e){let s=e.length;for(;--s>=0;)e[s]=0}const oe=256,Ae=286,H=30,M=15,de=new Uint8Array([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]),ae=new Uint8Array([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]),ra=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Ee=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Z=new Array(576);z(Z);const P=new Array(60);z(P);const j=new Array(512);z(j);const K=new Array(256);z(K);const ue=new Array(29);z(ue);const se=new Array(H);function fe(e,s,a,r,n){this.static_tree=e,this.extra_bits=s,this.extra_base=a,this.elems=r,this.max_length=n,this.has_stree=e&&e.length}let Ze,Ue,Re;function ce(e,s){this.dyn_tree=e,this.max_code=0,this.stat_desc=s}z(se);const Se=e=>e<256?j[e]:j[256+(e>>>7)],Y=(e,s)=>{e.pending_buf[e.pending++]=255&s,e.pending_buf[e.pending++]=s>>>8&255},p=(e,s,a)=>{e.bi_valid>16-a?(e.bi_buf|=s<<e.bi_valid&65535,Y(e,e.bi_buf),e.bi_buf=s>>16-e.bi_valid,e.bi_valid+=a-16):(e.bi_buf|=s<<e.bi_valid&65535,e.bi_valid+=a)},k=(e,s,a)=>{p(e,a[2*s],a[2*s+1])},Te=(e,s)=>{let a=0;do a|=1&e,e>>>=1,a<<=1;while(--s>0);return a>>>1},Le=(e,s,a)=>{const r=new Array(16);let n,i,_=0;for(n=1;n<=M;n++)_=_+a[n-1]<<1,r[n]=_;for(i=0;i<=s;i++){let t=e[2*i+1];t!==0&&(e[2*i]=Te(r[t]++,t))}},Fe=e=>{let s;for(s=0;s<Ae;s++)e.dyn_ltree[2*s]=0;for(s=0;s<H;s++)e.dyn_dtree[2*s]=0;for(s=0;s<19;s++)e.bl_tree[2*s]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Oe=e=>{e.bi_valid>8?Y(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},De=(e,s,a,r)=>{const n=2*s,i=2*a;return e[n]<e[i]||e[n]===e[i]&&r[s]<=r[a]},pe=(e,s,a)=>{const r=e.heap[a];let n=a<<1;for(;n<=e.heap_len&&(n<e.heap_len&&De(s,e.heap[n+1],e.heap[n],e.depth)&&n++,!De(s,r,e.heap[n],e.depth));)e.heap[a]=e.heap[n],a=n,n<<=1;e.heap[a]=r},Ne=(e,s,a)=>{let r,n,i,_,t=0;if(e.sym_next!==0)do r=255&e.pending_buf[e.sym_buf+t++],r+=(255&e.pending_buf[e.sym_buf+t++])<<8,n=e.pending_buf[e.sym_buf+t++],r===0?k(e,n,s):(i=K[n],k(e,i+oe+1,s),_=de[i],_!==0&&(n-=ue[i],p(e,n,_)),r--,i=Se(r),k(e,i,a),_=ae[i],_!==0&&(r-=se[i],p(e,r,_)));while(t<e.sym_next);k(e,256,s)},ge=(e,s)=>{const a=s.dyn_tree,r=s.stat_desc.static_tree,n=s.stat_desc.has_stree,i=s.stat_desc.elems;let _,t,h,l=-1;for(e.heap_len=0,e.heap_max=573,_=0;_<i;_++)a[2*_]!==0?(e.heap[++e.heap_len]=l=_,e.depth[_]=0):a[2*_+1]=0;for(;e.heap_len<2;)h=e.heap[++e.heap_len]=l<2?++l:0,a[2*h]=1,e.depth[h]=0,e.opt_len--,n&&(e.static_len-=r[2*h+1]);for(s.max_code=l,_=e.heap_len>>1;_>=1;_--)pe(e,a,_);h=i;do _=e.heap[1],e.heap[1]=e.heap[e.heap_len--],pe(e,a,1),t=e.heap[1],e.heap[--e.heap_max]=_,e.heap[--e.heap_max]=t,a[2*h]=a[2*_]+a[2*t],e.depth[h]=(e.depth[_]>=e.depth[t]?e.depth[_]:e.depth[t])+1,a[2*_+1]=a[2*t+1]=h,e.heap[1]=h++,pe(e,a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((u,d)=>{const m=d.dyn_tree,V=d.max_code,_e=d.stat_desc.static_tree,Na=d.stat_desc.has_stree,Ia=d.stat_desc.extra_bits,na=d.stat_desc.extra_base,$=d.stat_desc.max_length;let ee,y,B,f,le,xe,he=0;for(f=0;f<=M;f++)u.bl_count[f]=0;for(m[2*u.heap[u.heap_max]+1]=0,ee=u.heap_max+1;ee<573;ee++)y=u.heap[ee],f=m[2*m[2*y+1]+1]+1,f>$&&(f=$,he++),m[2*y+1]=f,y>V||(u.bl_count[f]++,le=0,y>=na&&(le=Ia[y-na]),xe=m[2*y],u.opt_len+=xe*(f+le),Na&&(u.static_len+=xe*(_e[2*y+1]+le)));if(he!==0){do{for(f=$-1;u.bl_count[f]===0;)f--;u.bl_count[f]--,u.bl_count[f+1]+=2,u.bl_count[$]--,he-=2}while(he>0);for(f=$;f!==0;f--)for(y=u.bl_count[f];y!==0;)B=u.heap[--ee],B>V||(m[2*B+1]!==f&&(u.opt_len+=(f-m[2*B+1])*m[2*B],m[2*B+1]=f),y--)}})(e,s),Le(a,l,e.bl_count)},Ie=(e,s,a)=>{let r,n,i=-1,_=s[1],t=0,h=7,l=4;for(_===0&&(h=138,l=3),s[2*(a+1)+1]=65535,r=0;r<=a;r++)n=_,_=s[2*(r+1)+1],++t<h&&n===_||(t<l?e.bl_tree[2*n]+=t:n!==0?(n!==i&&e.bl_tree[2*n]++,e.bl_tree[32]++):t<=10?e.bl_tre
|