From 388d9090ce05b0c022bae74c60c4ce42943c500e Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Thu, 11 Feb 2021 22:14:55 +0000 Subject: [PATCH] Updated fflate to 0.6.2 and removed fflate-deflate. --- editor/js/Menubar.File.js | 2 +- editor/js/libs/fflate-deflate.min.module.js | 7 ------- editor/sw.js | 1 - examples/js/libs/fflate.min.js | 3 +-- examples/jsm/libs/fflate.module.min.js | 2 +- 5 files changed, 3 insertions(+), 12 deletions(-) delete mode 100644 editor/js/libs/fflate-deflate.min.module.js diff --git a/editor/js/Menubar.File.js b/editor/js/Menubar.File.js index 9666b6f658f01f..dd0ef65dfc821a 100644 --- a/editor/js/Menubar.File.js +++ b/editor/js/Menubar.File.js @@ -1,6 +1,6 @@ import * as THREE from '../../build/three.module.js'; -import { zipSync, strToU8 } from './libs/fflate-deflate.min.module.js'; +import { zipSync, strToU8 } from '../../examples/jsm/libs/fflate.module.min.js'; import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js'; diff --git a/editor/js/libs/fflate-deflate.min.module.js b/editor/js/libs/fflate-deflate.min.module.js deleted file mode 100644 index 705fbea7545669..00000000000000 --- a/editor/js/libs/fflate-deflate.min.module.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! -fflate - fast JavaScript compression/decompression - -Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE -Subset included: synchronous deflate, synchronous zip -*/ -"use strict";var r=Uint8Array,n=Uint16Array,e=Uint32Array,t=new r([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,0,0,0]),f=new 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,0,0]),a=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=function(r,t){for(var f=new n(31),a=0;a<31;++a)f[a]=t+=1<>>1|(21845&h)<<1;g=(61680&(g=(52428&g)>>>2|(13107&g)<<2))>>>4|(3855&g)<<4,s[h]=((65280&g)>>>8|(255&g)<<8)>>>1}var w=function(r,e,t){for(var f=r.length,a=0,o=new n(e);a>>u]=l}else for(v=new n(f),a=0;a>>15-r[a];return v},d=new r(288);for(h=0;h<144;++h)d[h]=8;for(h=144;h<256;++h)d[h]=9;for(h=256;h<280;++h)d[h]=7;for(h=280;h<288;++h)d[h]=8;var m=new r(32);for(h=0;h<32;++h)m[h]=5;var p=w(d,9,0),y=w(m,5,0),M=function(r){return(r/8>>0)+(7&r&&1)},b=function(r,n,e){e<<=7&n;var t=n/8>>0;r[t]|=e,r[t+1]|=e>>>8},x=function(r,n,e){e<<=7&n;var t=n/8>>0;r[t]|=e,r[t+1]|=e>>>8,r[t+2]|=e>>>16},A=function(e,t){for(var f=[],a=0;ag&&(g=v[a].s);var w=new n(g+1),d=U(f[s-1],w,0);if(d>t){a=0;var m=0,p=d-t,y=1<t))break;m+=y-(1<>>=p;m>0;){var b=v[a].s;w[b]=0&&m;--a){var x=v[a].s;w[x]==t&&(--w[x],++m)}d=t}return[new r(w),d]},U=function(r,n,e){return-1==r.s?Math.max(U(r.l,n,e+1),U(r.r,n,e+1)):n[r.s]=e},D=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new n(++e),f=0,a=r[0],o=1,v=function(r){t[f++]=r},i=1;i<=e;++i)if(r[i]==a&&i!=e)++o;else{if(!a&&o>2){for(;o>138;o-=138)v(32754);o>2&&(v(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(v(a),--o;o>6;o-=6)v(8304);o>2&&(v(o-3<<5|8208),o=0)}for(;o--;)v(a);o=1,a=r[i]}return[t.subarray(0,f),e]},S=function(r,n){for(var e=0,t=0;t>>8,r[f+2]=255^r[f],r[f+3]=255^r[f+1];for(var a=0;a4&&!K[a[N-1]];--N);var O,P,Q,R,V=h+5<<3,W=S(i,d)+S(u,m)+l,X=S(i,U)+S(u,C)+l+14+3*N+S(G,K)+(2*G[16]+3*G[17]+7*G[18]);if(V<=W&&V<=X)return T(e,g,r.subarray(s,s+h));if(b(e,g,1+(X15&&(b(e,g,rr[I]>>>5&127),g+=rr[I]>>>12)}}}else O=p,P=d,Q=y,R=m;for(I=0;I255){nr=v[I]>>>18&31,x(e,g,O[nr+257]),g+=P[nr+257],nr>7&&(b(e,g,v[I]>>>23&31),g+=t[nr]);var er=31&v[I];x(e,g,Q[er]),g+=R[er],er>3&&(x(e,g,v[I]>>>5&8191),g+=f[er])}else x(e,g,O[v[I]]),g+=P[v[I]];return x(e,g,O[256]),g+P[256]},z=new e([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),C=new r(0),E=function(a,o,v,i,l,s){var h=a.length,g=new r(i+h+5*(1+Math.floor(h/7e3))+l),w=g.subarray(i,g.length-l),d=0;if(!o||h<8)for(var m=0;m<=h;m+=65535){var p=m+65535;p>>13,x=8191&y,A=(1<7e3||G>24576)&&O>423){d=k(a,w,0,H,Y,j,B,G,J,m-J,d),G=q=B=0,J=m;for(var P=0;P<286;++P)Y[P]=0;for(P=0;P<30;++P)j[P]=0}var Q=2,R=0,V=x,W=L-N&32767;if(O>2&&K==F(m-W))for(var X=Math.min(b,O)-1,Z=Math.min(32767,m),$=Math.min(258,O);W<=Z&&--V&&L!=N;){if(a[m+Q]==a[m+Q-W]){for(var _=0;_<$&&a[m+_]==a[m+_-W];++_);if(_>Q){if(Q=_,R=W,_>X)break;var rr=Math.min(W,_-2),nr=0;for(P=0;Pnr&&(nr=tr,N=er)}}}W+=(L=N)-(N=U[L])+32768&32767}if(R){H[G++]=268435456|u[Q]<<18|c[R];var fr=31&u[Q],ar=31&c[R];B+=t[fr]+f[ar],++Y[257+fr],++j[ar],I=m+Q,++q}else H[G++]=a[m],++Y[a[m]]}}d=k(a,w,s,H,Y,j,B,G,J,m-J,d),s||(d=T(w,d,C))}return function(t,f,a){(null==f||f<0)&&(f=0),(null==a||a>t.length)&&(a=t.length);var o=new(t instanceof n?n:t instanceof e?e:r)(a-f);return o.set(t.subarray(f,a)),o}(g,0,i+M(d)+l)},F=function(r,n,e,t,f){return E(r,null==n.level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+n.mem,e,t,!f)},H=function(r,n,e){for(;e;++n)r[n]=e,e>>>=8};export var zlibSync=function(r,n){void 0===n&&(n={});var e=function(){var r=1,n=0;return{p:function(e){for(var t=r,f=n,a=e.length,o=0;o!=a;){for(var v=Math.min(o+5552,a);o>>8<<16|(255&n)<<8|n>>>8)+2*((255&r)<<23)}}}();e.p(r);var t=F(r,n,2,4);return function(r,n){var e=n.level,t=0==e?0:e<6?1:9==e?3:2;r[0]=120,r[1]=t<<6|(t?32-2*t:1)}(t,n),H(t,t.length-4,e.d()),t};var Y=function(n,e,t,f){for(var a in n){var o=n[a],v=e+a;o instanceof r?t[v]=[o,f]:Array.isArray(o)?t[v]=[o[0],mrg(f,o[1])]:Y(o,v+"/",t,f)}};function j(n,e){var t=n.length;if(!e&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(n);for(var f=new r(n.length+(n.length>>>1)),a=0,o=function(r){f[a++]=r},v=0;vf.length){var i=new r(a+8+(t-v<<1));i.set(f),f=i}var u=n.charCodeAt(v);u<128||e?o(u):u<2048?(o(192|u>>>6),o(128|63&u)):u>55295&&u<57344?(o(240|(u=65536+(1047552&u)|1023&n.charCodeAt(++v))>>>18),o(128|u>>>12&63),o(128|u>>>6&63),o(128|63&u)):(o(224|u>>>12),o(128|u>>>6&63),o(128|63&u))}return slc(f,0,a)}export var strToU8=j;for(var q=function(r,n,e,t,f,a,o,v,i,u){var l=a.length,c=t.length;H(r,n,null!=i?33639248:67324752),n+=4,null!=i&&(r[n]=20,n+=2),r[n]=20,n+=2,r[n++]=8==u&&(1==v.level?6:v.level<6?4:9==v.level?2:0),r[n++]=o&&8,r[n]=u,n+=2;var s=new Date(v.mtime||Date.now()),h=s.getFullYear()-1980;if(h<0||h>119)throw"date not in range 1980-2099";H(r,n,2*(h<<24)|s.getMonth()+1<<21|s.getDate()<<16|s.getHours()<<11|s.getMinutes()<<5|s.getSeconds()>>>1),H(r,n+=4,e),H(r,n+4,c),H(r,n+8,f),H(r,n+12,l),n+=16,null!=i&&(H(r,n+=10,i),n+=4),r.set(a,n),n+=l,null==i&&r.set(t,n)},B=new e(256),G=0;G<256;++G){for(var I=G,J=9;--J;)I=(1&I&&3988292384)^I>>>1;B[G]=I}var K=function(){var r=4294967295;return{p:function(n){for(var e=r,t=0;t>>8;r=e},d:function(){return 4294967295^r}}};export var zipSync=function(n,e){void 0===e&&(e={});var t={},f=[];Y(n,"",t,e);var a=0,o=0;for(var v in t){var i=t[v],u=i[0],l=i[1],c=0==l.level?0:8,s=j(v),h=s.length;if(s.length>65535)throw"filename too long";var g=c?F(u,l,0,0):u,w=g.length,d=K();d.p(u),f.push({t:c,d:g,m:u.length,c:d.d(),u:v.length!=h,n:s,o:a,p:l}),a+=30+h+w,o+=76+2*h+w}for(var m=new r(o+22),p=a,y=o-a,M=0;M Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE -Subset included: synchronous unzip, gunzip, and unzlib */ -!function(f){typeof exports=="object"&&typeof module!="undefined"?module.exports=f():typeof define=='function'&&define.amd?define([],f):(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"&&self).fflate=f()}(function(_e){"use strict";var _e={},r=Uint8Array,n=Uint16Array,e=Uint32Array,t=new r([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,0,0,0]),a=new 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,0,0]),i=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=function(r,t){for(var a=new n(31),i=0;i<31;++i)a[i]=t+=1<>>1|(21845&h)<<1;s=(61680&(s=(52428&s)>>>2|(13107&s)<<2))>>>4|(3855&s)<<4,w[h]=((65280&s)>>>8|(255&s)<<8)>>>1}var d=function(r,e){for(var t=r.length,a=0,i=new n(e);a>>u]=v;return f},p=new r(288);for(h=0;h<144;++h)p[h]=8;for(h=144;h<256;++h)p[h]=9;for(h=256;h<280;++h)p[h]=7;for(h=280;h<288;++h)p[h]=8;var g=new r(32);for(h=0;h<32;++h)g[h]=5;var y=d(p,9),b=d(g,5),x=function(r){for(var n=r[0],e=1;en&&(n=r[e]);return n},z=function(r,n,e){var t=n/8>>0;return(r[t]|r[t+1]<<8)>>>(7&n)&e},C=function(r,n){var e=n/8>>0;return(r[e]|r[e+1]<<8|r[e+2]<<16)>>>(7&n)},m=function(r){return(r/8>>0)+(7&r&&1)},S=function(t,a,i){(null==a||a<0)&&(a=0),(null==i||i>t.length)&&(i=t.length);var o=new(t instanceof n?n:t instanceof e?e:r)(i-a);return o.set(t.subarray(a,i)),o},F=function(n,e){var o=n.length,f=!e;e||(e=new r(3*o));var v,c,w,h,s=function(n){var t=e.length;if(n>t){var a=new r(Math.max(2*t,n));a.set(e),e=a}},p=0,g=0,F=0;if(p&&!v)return e;var E=8*o;do{p=z(n,g,1);var O=z(n,g+1,3);if(g+=3,O){if(1==O)v=y,c=b,w=9,h=5;else{if(2!=O)throw"invalid block type";var U=z(n,g,31)+257,k=z(n,g+10,15)+4,A=U+z(n,g+5,31)+1;g+=14;for(var D=new r(A),T=new r(19),M=0;M>>4)<16)D[M++]=Y;else{var H=0,I=0;for(16==Y?(I=3+z(n,g,3),g+=2,H=D[M-1]):17==Y?(I=3+z(n,g,7),g+=3):18==Y&&(I=11+z(n,g,127),g+=7);I--;)D[M++]=H}}var J=D.subarray(0,U),K=D.subarray(U);w=x(J),h=x(K),v=d(J,w),c=d(K,h)}if(g>E)throw"unexpected EOF";f&&s(F+131072);for(var L=(1<>>4;if((g+=15&H)>E)throw"unexpected EOF";if(!H)throw"invalid length/literal";if(P<256)e[F++]=P;else{if(256==P)break;var Q=P-254;if(P>264){var R=t[M=P-257];Q=z(n,g,(1<>>4;if(!V)throw"invalid distance";g+=15&V;K=l[W];if(W>3){R=a[W];K+=C(n,g)&(1<E)throw"unexpected EOF";f&&s(F+131072);for(var X=F+Q;Fo)throw"unexpected EOF";f&&s(F+Z),e.set(n.subarray(Y,$),F),F+=Z,g=8*$}}while(!p);return F==e.length?e:S(e,0,F)},E=function(r,n){return r[n]|r[n+1]<<8},O=function(r,n){return(r[n]|r[n+1]<<8|r[n+2]<<16)+2*(r[n+3]<<23)},U=function(r){if(31!=r[0]||139!=r[1]||8!=r[2])throw"invalid gzip data";var n=r[3],e=10;4&n&&(e+=r[10]|2+(r[11]<<8));for(var t=(n>>3&1)+(n>>4&1);t>0;t-=!r[e++]);return e+(2&n)},k=function(r){var n=r.length;return(r[n-4]|r[n-3]<<8|r[n-2]<<16)+2*(r[n-1]<<23)},A=function(r){if(8!=(15&r[0])||r[0]>>>4>7||(r[0]<<8|r[1])%31)throw"invalid zlib data";if(32&r[1])throw"invalid zlib data: preset dictionaries not supported"};function D(r,n){return F(r,n)}function T(n,e){return F(n.subarray(U(n),-8),e||new r(k(n)))}_e.gunzipSync=T;function M(r,n){return F((A(r),r.subarray(2,-4)),n)}_e.unzlibSync=M;function j(r,n){var e="";if(!n&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(r);for(var t=0;t>10,56320|1023&a))}return e}_e.strFromU8=j;var q=function(r,n){return n+30+E(r,n+26)+E(r,n+28)},B=function(r,n,e){var t=E(r,n+28),a=j(r.subarray(n+46,n+46+t),!(2048&E(r,n+8))),i=n+46+t,o=e?G(r,i):[O(r,n+20),O(r,n+24),O(r,n+42)],f=o[0],u=o[1],v=o[2];return[E(r,n+10),f,u,a,i+E(r,n+30)+E(r,n+32),v]},G=function(r,n){for(;1!=E(r,n);n+=4+E(r,n+2));return[O(r,n+12),O(r,n+4),O(r,n+20)]};_e.unzipSync=function(n){for(var e={},t=n.length-22;101010256!=O(n,t);--t)if(!t||n.length-t>65558)throw"invalid zip file";var a=E(n,t+8);if(!a)return{};var i=O(n,t+16),o=4294967295==i;if(o){if(t=O(n,t-12),101075792!=O(n,t))throw"invalid zip file";a=O(n,t+32),i=O(n,t+48)}for(var f=0;f>>1|(21845&d)<<1;v[d]=((65280&(g=(61680&(g=(52428&g)>>>2|(13107&g)<<2))>>>4|(3855&g)<<4))>>>8|(255&g)<<8)>>>1}var w=function(t,n,e){for(var i=t.length,o=0,a=new r(n);o>>u]=h}else for(s=new r(i),o=0;o>>15-t[o]);return s},y=new n(288);for(d=0;d<144;++d)y[d]=8;for(d=144;d<256;++d)y[d]=9;for(d=256;d<280;++d)y[d]=7;for(d=280;d<288;++d)y[d]=8;var m=new n(32);for(d=0;d<32;++d)m[d]=5;var b=w(y,9,0),x=w(y,9,1),z=w(m,5,0),k=w(m,5,1),M=function(t){for(var n=t[0],r=1;rn&&(n=t[r]);return n},A=function(t,n,r){var e=n/8|0;return(t[e]|t[e+1]<<8)>>(7&n)&r},S=function(t,n){var r=n/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&n)},D=function(t){return(t/8|0)+(7&t&&1)},C=function(t,i,o){(null==i||i<0)&&(i=0),(null==o||o>t.length)&&(o=t.length);var a=new(t instanceof r?r:t instanceof e?e:n)(o-i);return a.set(t.subarray(i,o)),a},U=function(t,r,e){var s=t.length;if(!s||e&&!e.l&&s<5)return r||new n(0);var f=!r||e,h=!e||e.i;e||(e={}),r||(r=new n(3*s));var c=function(t){var e=r.length;if(t>e){var i=new n(Math.max(2*e,t));i.set(r),r=i}},p=e.f||0,v=e.p||0,d=e.b||0,g=e.l,y=e.d,m=e.m,b=e.n,z=8*s;do{if(!g){e.f=p=A(t,v,1);var U=A(t,v+1,3);if(v+=3,!U){var O=t[(H=D(v)+4)-4]|t[H-3]<<8,T=H+O;if(T>s){if(h)throw"unexpected EOF";break}f&&c(d+O),r.set(t.subarray(H,T),d),e.b=d+=O,e.p=v=8*T;continue}if(1==U)g=x,y=k,m=9,b=5;else{if(2!=U)throw"invalid block type";var Z=A(t,v,31)+257,I=A(t,v+10,15)+4,F=Z+A(t,v+5,31)+1;v+=14;for(var E=new n(F),G=new n(19),P=0;Pz)break;var q=w(G,j,1);for(P=0;P>>4)<16)E[P++]=H;else{var B=0,J=0;for(16==H?(J=3+A(t,v,3),v+=2,B=E[P-1]):17==H?(J=3+A(t,v,7),v+=3):18==H&&(J=11+A(t,v,127),v+=7);J--;)E[P++]=B}}var K=E.subarray(0,Z),L=E.subarray(Z);m=M(K),b=M(L),g=w(K,m,1),y=w(L,b,1)}if(v>z)throw"unexpected EOF"}f&&c(d+131072);for(var N=(1<>>4;if((v+=15&B)>z)throw"unexpected EOF";if(!B)throw"invalid length/literal";if(V<256)r[d++]=V;else{if(256==V){g=null;break}var W=V-254;V>264&&(W=A(t,v,(1<<(tt=i[P=V-257]))-1)+u[P],v+=tt);var X=y[S(t,v)&Q],$=X>>>4;if(!X)throw"invalid distance";if(v+=15&X,L=l[$],$>3){var tt=o[$];L+=S(t,v)&(1<z)throw"unexpected EOF";f&&c(d+131072);for(var nt=d+W;d>>8},T=function(t,n,r){var e=n/8|0;t[e]|=r<<=7&n,t[e+1]|=r>>>8,t[e+2]|=r>>>16},Z=function(t,e){for(var i=[],o=0;ov&&(v=s[o].s);var d=new r(v+1),g=I(i[l-1],d,0);if(g>e){o=0;var w=0,y=g-e,m=1<e))break;w+=m-(1<>>=y;w>0;){var x=s[o].s;d[x]=0&&w;--o){var z=s[o].s;d[z]==e&&(--d[z],++w)}g=e}return[new n(d),g]},I=function(t,n,r){return-1==t.s?Math.max(I(t.l,n,r+1),I(t.r,n,r+1)):n[t.s]=r},F=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new r(++n),i=0,o=t[0],a=1,s=function(t){e[i++]=t},f=1;f<=n;++f)if(t[f]==o&&f!=n)++a;else{if(!o&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(o),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(o);a=1,o=t[f]}return[e.subarray(0,i),n]},E=function(t,n){for(var r=0,e=0;e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var o=0;o4&&!H[a[B-1]];--B);var J,K,L,N,Q=p+5<<3,R=E(f,y)+E(u,m)+h,V=E(f,g)+E(u,M)+h+14+3*B+E(j,H)+(2*j[16]+3*j[17]+7*j[18]);if(Q<=R&&Q<=V)return G(n,v,t.subarray(l,l+p));if(O(n,v,1+(V15&&(O(n,v,tt[_]>>>5&127),v+=tt[_]>>>12)}}else J=b,K=y,L=z,N=m;for(_=0;_255){var nt;T(n,v,J[257+(nt=s[_]>>>18&31)]),v+=K[nt+257],nt>7&&(O(n,v,s[_]>>>23&31),v+=i[nt]);var rt=31&s[_];T(n,v,L[rt]),v+=N[rt],rt>3&&(T(n,v,s[_]>>>5&8191),v+=o[rt])}else T(n,v,J[s[_]]),v+=K[s[_]];return T(n,v,J[256]),v+K[256]},j=new e([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_=new n(0),q=function(t,a,s,f,u,c){var l=t.length,v=new n(f+l+5*(1+Math.ceil(l/7e3))+u),d=v.subarray(f,v.length-u),g=0;if(!a||l<8)for(var w=0;w<=l;w+=65535){var y=w+65535;y>>13,x=8191&m,z=(1<7e3||E>24576)&&K>423){g=P(t,d,0,O,T,Z,F,E,H,w-H,g),E=I=F=0,H=w;for(var L=0;L<286;++L)T[L]=0;for(L=0;L<30;++L)Z[L]=0}var N=2,Q=0,R=x,V=B-J&32767;if(K>2&&Y==U(w-V))for(var W=Math.min(b,K)-1,X=Math.min(32767,w),$=Math.min(258,K);V<=X&&--R&&B!=J;){if(t[w+N]==t[w+N-V]){for(var tt=0;tt<$&&t[w+tt]==t[w+tt-V];++tt);if(tt>N){if(N=tt,Q=V,tt>W)break;var nt=Math.min(V,tt-2),rt=0;for(L=0;Lrt&&(rt=it,J=et)}}}V+=(B=J)-(J=k[B])+32768&32767}if(Q){O[E++]=268435456|h[N]<<18|p[Q];var ot=31&h[N],at=31&p[Q];F+=i[ot]+o[at],++T[257+ot],++Z[at],q=w+N,++I}else O[E++]=t[w],++T[t[w]]}}g=P(t,d,c,O,T,Z,F,E,H,w-H,g),!c&&7&g&&(g=G(d,g+1,_))}return C(v,0,f+D(g)+u)},H=function(){for(var t=new e(256),n=0;n<256;++n){for(var r=n,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[n]=r}return t}(),Y=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}},B=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,o=r.length,a=0;a!=o;){for(var s=Math.min(a+2655,o);a>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return((t%=65521)>>>8<<16|(255&(n%=65521))<<8|n>>>8)+2*((255&t)<<23)}}},J=function(t,n,r,e,i){return q(t,null==n.level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+n.mem,r,e,!i)},K=function(t,n){var r={};for(var e in t)r[e]=t[e];for(var e in n)r[e]=n[e];return r},L=function(t,n,r){for(var e=t(),i=""+t,o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/ /g,"").split(","),a=0;a>>=8},ct=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&ht(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},lt=function(t){if(31!=t[0]||139!=t[1]||8!=t[2])throw"invalid gzip data";var n=t[3],r=10;4&n&&(r+=t[10]|2+(t[11]<<8));for(var e=(n>>3&1)+(n>>4&1);e>0;e-=!t[r++]);return r+(2&n)},pt=function(t){var n=t.length;return(t[n-4]|t[n-3]<<8|t[n-2]<<16)+2*(t[n-1]<<23)},vt=function(t){return 10+(t.filename&&t.filename.length+1||0)},dt=function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;t[0]=120,t[1]=e<<6|(e?32-2*e:1)},gt=function(t){if(8!=(15&t[0])||t[0]>>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(32&t[1])throw"invalid zlib data: preset dictionaries not supported"};function wt(t,n){return n||"function"!=typeof t||(n=t,t={}),this.ondata=n,t}var yt=function(){function t(t,n){n||"function"!=typeof t||(n=t,t={}),this.ondata=n,this.o=t||{}}return t.prototype.p=function(t,n){this.ondata(J(t,this.o,0,0,!n),n)},t.prototype.push=function(t,n){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=n,this.p(t,n||!1)},t}();_e.Deflate=yt;var mt=function(){return function(t,n){at([W,function(){return[ot,yt]}],this,wt.call(this,t,n),(function(t){var n=new yt(t.data);onmessage=ot(n)}),6)}}();function bt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[W],(function(t){return rt(xt(t.data[0],t.data[1]))}),0,r)}function xt(t,n){return J(t,n||{},0,0)}_e.AsyncDeflate=mt,_e.deflate=bt,_e.deflateSync=xt;var zt=function(){function t(t){this.s={},this.p=new n(0),this.ondata=t}return t.prototype.e=function(t){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var r=this.p.length,e=new n(r+t.length);e.set(this.p),e.set(t,r),this.p=e},t.prototype.c=function(t){this.d=this.s.i=t||!1;var n=this.s.b,r=U(this.p,this.o,this.s);this.ondata(C(r,n,this.s.b),this.d),this.o=C(r,this.s.b-32768),this.s.b=this.o.length,this.p=C(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(t,n){this.e(t),this.c(n)},t}();_e.Inflate=zt;var kt=function(){return function(t){this.ondata=t,at([V,function(){return[ot,zt]}],this,0,(function(){var t=new zt;onmessage=ot(t)}),7)}}();function Mt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[V],(function(t){return rt(At(t.data[0],et(t.data[1])))}),1,r)}function At(t,n){return U(t,n)}_e.AsyncInflate=kt,_e.inflate=Mt,_e.inflateSync=At;var St=function(){function t(t,n){this.c=Y(),this.l=0,this.v=1,yt.call(this,t,n)}return t.prototype.push=function(t,n){yt.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){this.c.p(t),this.l+=t.length;var r=J(t,this.o,this.v&&vt(this.o),n&&8,!n);this.v&&(ct(r,this.o),this.v=0),n&&(ht(r,r.length-8,this.c.d()),ht(r,r.length-4,this.l)),this.ondata(r,n)},t}();_e.Gzip=St,_e.Compress=St;var Dt=function(){return function(t,n){at([W,X,function(){return[ot,yt,St]}],this,wt.call(this,t,n),(function(t){var n=new St(t.data);onmessage=ot(n)}),8)}}();function Ct(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[W,X,function(){return[Ut]}],(function(t){return rt(Ut(t.data[0],t.data[1]))}),2,r)}function Ut(t,n){n||(n={});var r=Y(),e=t.length;r.p(t);var i=J(t,n,vt(n),8),o=i.length;return ct(i,n),ht(i,o-8,r.d()),ht(i,o-4,e),i}_e.AsyncGzip=Dt,_e.AsyncCompress=Dt,_e.gzip=Ct,_e.compress=Ct,_e.gzipSync=Ut,_e.compressSync=Ut;var Ot=function(){function t(t){this.v=1,zt.call(this,t)}return t.prototype.push=function(t,n){if(zt.prototype.e.call(this,t),this.v){var r=this.p.length>3?lt(this.p):4;if(r>=this.p.length&&!n)return;this.p=this.p.subarray(r),this.v=0}if(n){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}zt.prototype.c.call(this,n)},t}();_e.Gunzip=Ot;var Tt=function(){return function(t){this.ondata=t,at([V,$,function(){return[ot,zt,Ot]}],this,0,(function(){var t=new Ot;onmessage=ot(t)}),9)}}();function Zt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[V,$,function(){return[It]}],(function(t){return rt(It(t.data[0]))}),3,r)}function It(t,r){return U(t.subarray(lt(t),-8),r||new n(pt(t)))}_e.AsyncGunzip=Tt,_e.gunzip=Zt,_e.gunzipSync=It;var Ft=function(){function t(t,n){this.c=B(),this.v=1,yt.call(this,t,n)}return t.prototype.push=function(t,n){yt.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){this.c.p(t);var r=J(t,this.o,this.v&&2,n&&4,!n);this.v&&(dt(r,this.o),this.v=0),n&&ht(r,r.length-4,this.c.d()),this.ondata(r,n)},t}();_e.Zlib=Ft;var Et=function(){return function(t,n){at([W,tt,function(){return[ot,yt,Ft]}],this,wt.call(this,t,n),(function(t){var n=new Ft(t.data);onmessage=ot(n)}),10)}}();function Gt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[W,tt,function(){return[Pt]}],(function(t){return rt(Pt(t.data[0],t.data[1]))}),4,r)}function Pt(t,n){n||(n={});var r=B();r.p(t);var e=J(t,n,2,4);return dt(e,n),ht(e,e.length-4,r.d()),e}_e.AsyncZlib=Et,_e.zlib=Gt,_e.zlibSync=Pt;var jt=function(){function t(t){this.v=1,zt.call(this,t)}return t.prototype.push=function(t,n){if(zt.prototype.e.call(this,t),this.v){if(this.p.length<2&&!n)return;this.p=this.p.subarray(2),this.v=0}if(n){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}zt.prototype.c.call(this,n)},t}();_e.Unzlib=jt;var _t=function(){return function(t){this.ondata=t,at([V,nt,function(){return[ot,zt,jt]}],this,0,(function(){var t=new jt;onmessage=ot(t)}),11)}}();function qt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[V,nt,function(){return[Ht]}],(function(t){return rt(Ht(t.data[0],et(t.data[1])))}),5,r)}function Ht(t,n){return U((gt(t),t.subarray(2,-4)),n)}_e.AsyncUnzlib=_t,_e.unzlib=qt,_e.unzlibSync=Ht;var Yt=function(){function t(t){this.G=Ot,this.I=zt,this.Z=jt,this.ondata=t}return t.prototype.push=function(t,r){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(t,r);else{if(this.p&&this.p.length){var e=new n(this.p.length+t.length);e.set(this.p),e.set(t,this.p.length)}else this.p=t;if(this.p.length>2){var i=this,o=function(){i.ondata.apply(i,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(o):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(o):new this.Z(o),this.s.push(this.p,r),this.p=null}}},t}();_e.Decompress=Yt;var Bt=function(){function t(t){this.G=Tt,this.I=kt,this.Z=_t,this.ondata=t}return t.prototype.push=function(t,n){Yt.prototype.push.call(this,t,n)},t}();function Jt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return 31==t[0]&&139==t[1]&&8==t[2]?Zt(t,n,r):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?Mt(t,n,r):qt(t,n,r)}function Kt(t,n){return 31==t[0]&&139==t[1]&&8==t[2]?It(t,n):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?At(t,n):Ht(t,n)}_e.AsyncDecompress=Bt,_e.decompress=Jt,_e.decompressSync=Kt;var Lt=function(t,r,e,i){for(var o in t){var a=t[o],s=r+o;a instanceof n?e[s]=[a,i]:Array.isArray(a)?e[s]=[a[0],K(i,a[1])]:Lt(a,s+"/",e,i)}},Nt="undefined"!=typeof TextEncoder&&new TextEncoder,Qt="undefined"!=typeof TextDecoder&&new TextDecoder,Rt=0;try{Qt.decode(_,{stream:!0}),Rt=1}catch(t){}var Vt=function(t){for(var n="",r=0;;){var e=t[r++],i=(e>127)+(e>223)+(e>239);if(r+i>t.length)return[n,C(t,r-1)];i?3==i?(e=((15&e)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536,n+=String.fromCharCode(55296|e>>10,56320|1023&e)):n+=String.fromCharCode(1&i?(31&e)<<6|63&t[r++]:(15&e)<<12|(63&t[r++])<<6|63&t[r++]):n+=String.fromCharCode(e)}},Wt=function(){function t(t){this.ondata=t,Rt?this.t=new TextDecoder:this.p=_}return t.prototype.push=function(t,r){if(!this.ondata)throw"no callback";if(r||(r=!1),this.t)return this.ondata(this.t.decode(t,{stream:!r}),r);var e=new n(this.p.length+t.length);e.set(this.p),e.set(t,this.p.length);var i=Vt(e),o=i[0],a=i[1];if(r&&a.length)throw"invalid utf-8 data";this.p=a,this.ondata(o,r)},t}();_e.DecodeUTF8=Wt;var Xt=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){if(!this.ondata)throw"no callback";this.ondata($t(t),n||!1)},t}();function $t(t,r){if(r){for(var e=new n(t.length),i=0;i>1)),s=0,f=function(t){a[s++]=t};for(i=0;ia.length){var u=new n(s+8+(o-i<<1));u.set(a),a=u}var h=t.charCodeAt(i);h<128||r?f(h):h<2048?(f(192|h>>>6),f(128|63&h)):h>55295&&h<57344?(f(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++i))>>>18),f(128|h>>>12&63),f(128|h>>>6&63),f(128|63&h)):(f(224|h>>>12),f(128|h>>>6&63),f(128|63&h))}return C(a,0,s)}function tn(t,n){if(n){for(var r="",e=0;e65535)throw"extra field too long";n+=e+4}return n},sn=function(t,n,r,e,i,o,a,s){var f=e.length,u=r.extra,h=s&&s.length,c=an(u);ht(t,n,null!=a?33639248:67324752),n+=4,null!=a&&(t[n++]=20,t[n++]=r.os),t[n]=20,n+=2,t[n++]=r.flag<<1|(null==o&&8),t[n++]=i&&8,t[n++]=255&r.compression,t[n++]=r.compression>>8;var l=new Date(null==r.mtime?Date.now():r.mtime),p=l.getFullYear()-1980;if(p<0||p>119)throw"date not in range 1980-2099";if(ht(t,n,2*(p<<24)|l.getMonth()+1<<21|l.getDate()<<16|l.getHours()<<11|l.getMinutes()<<5|l.getSeconds()>>>1),n+=4,null!=o&&(ht(t,n,r.crc),ht(t,n+4,o),ht(t,n+8,r.size)),ht(t,n+12,f),ht(t,n+14,c),n+=16,null!=a&&(ht(t,n,h),ht(t,n+6,r.attrs),ht(t,n+10,a),n+=14),t.set(e,n),n+=f,c)for(var v in u){var d=u[v],g=d.length;ht(t,n,+v),ht(t,n+2,g),t.set(d,n+4),n+=4+g}return h&&(t.set(s,n),n+=h),n},fn=function(t,n,r,e,i){ht(t,n,101010256),ht(t,n+8,r),ht(t,n+10,r),ht(t,n+12,e),ht(t,n+16,i)},un=function(){function t(t){this.filename=t,this.c=Y(),this.size=0,this.compression=0}return t.prototype.process=function(t,n){this.ondata(null,t,n)},t.prototype.push=function(t,n){if(!this.ondata)throw"no callback - add to ZIP archive before pushing";this.c.p(t),this.size+=t.length,n&&(this.crc=this.c.d()),this.process(t,n||!1)},t}();_e.ZipPassThrough=un;var hn=function(){function t(t,n){var r=this;n||(n={}),un.call(this,t),this.d=new yt(n,(function(t,n){r.ondata(null,t,n)})),this.compression=8,this.flag=nn(n.level)}return t.prototype.process=function(t,n){try{this.d.push(t,n)}catch(t){this.ondata(t,null,n)}},t.prototype.push=function(t,n){un.prototype.push.call(this,t,n)},t}();_e.ZipDeflate=hn;var cn=function(){function t(t,n){var r=this;n||(n={}),un.call(this,t),this.d=new mt(n,(function(t,n,e){r.ondata(t,n,e)})),this.compression=8,this.flag=nn(n.level),this.terminate=this.d.terminate}return t.prototype.process=function(t,n){this.d.push(t,n)},t.prototype.push=function(t,n){un.prototype.push.call(this,t,n)},t}();_e.AsyncZipDeflate=cn;var ln=function(){function t(t){this.ondata=t,this.u=[],this.d=1}return t.prototype.add=function(t){var r=this;if(2&this.d)throw"stream finished";var e=$t(t.filename),i=e.length,o=t.comment,a=o&&$t(o),s=i!=t.filename.length||a&&o.length!=a.length,f=i+an(t.extra)+30;if(i>65535)throw"filename too long";var u=new n(f);sn(u,0,t,e,s);var h=[u],c=function(){for(var t=0,n=h;t65535&&M("filename too long",null),k)if(g<16e4)try{M(null,xt(u,v))}catch(t){M(t,null)}else c.push(bt(u,v,M));else M(null,u)},d=0;d65535)throw"filename too long";var w=c?xt(u,h):u,y=w.length,m=Y();m.p(u),i.push(K(h,{size:u.length,crc:m.d(),c:w,f:M,m:v,u:l!=s.length||v&&p.length!=d,o:o,compression:c})),o+=30+l+g+y,a+=76+2*(l+g)+(d||0)+y}for(var b=new n(a+22),x=o,z=a-o,k=0;k0){var i=Math.min(this.c,t.length),o=t.subarray(0,i);if(this.c-=i,this.d?this.d.push(o,!this.c):this.k[0].push(o),(t=t.subarray(i)).length)return this.push(t,r)}else{var a=0,s=0,f=void 0,u=void 0;this.p.length?t.length?((u=new n(this.p.length+t.length)).set(this.p),u.set(t,this.p.length)):u=this.p:u=t;for(var h=u.length,c=this.c,l=c&&this.d,p=function(){var t,n=ft(u,s);if(67324752==n){a=1,f=s,v.d=null,v.c=0;var r=st(u,s+6),i=st(u,s+8),o=2048&r,l=8&r,p=st(u,s+26),d=st(u,s+28);if(h>s+30+p+d){var g=[];v.k.unshift(g),a=2;var w=ft(u,s+18),y=ft(u,s+22),m=tn(u.subarray(s+30,s+=30+p),!o);4294967295==w?(t=l?[-2]:on(u,s),w=t[0],y=t[1]):l&&(w=-1),s+=d,v.c=w;var b={name:m,compression:i,start:function(){if(!b.ondata)throw"no callback";if(w){var t=e.o[i];if(!t)throw"unknown compression type "+i;var n=w<0?new t(m):new t(m,w,y);n.ondata=function(t,n,r){b.ondata(t,n,r)};for(var r=0,o=g;r=0&&(b.size=w,b.originalSize=y),v.onfile(b)}return"break"}if(c){if(134695760==n)return f=s+=12+(-2==c&&8),a=2,v.c=0,"break";if(33639248==n)return f=s-=4,a=2,v.c=0,"break"}},v=this;s65558)return void r("invalid zip file",null);var s=st(t,a+8);s||r(null,{});var f=s,u=ft(t,a+16),h=4294967295==u;if(h){if(a=ft(t,a-12),101075792!=ft(t,a))return void r("invalid zip file",null);f=s=ft(t,a+32),u=ft(t,a+48)}for(var c=function(a){var f=en(t,u,h),c=f[0],l=f[1],p=f[2],v=f[3],d=f[4],g=rn(t,f[5]);u=d;var w=function(t,n){t?(i(),r(t,null)):(o[v]=n,--s||r(null,o))};if(c)if(8==c){var y=t.subarray(g,g+l);if(l<32e4)try{w(null,At(y,new n(p)))}catch(t){w(t,null)}else e.push(Mt(y,{size:p},w))}else w("unknown compression type "+c,null);else w(null,C(t,g,g+l))},l=0;l65558)throw"invalid zip file";var i=st(t,e+8);if(!i)return{};var o=ft(t,e+16),a=4294967295==o;if(a){if(e=ft(t,e-12),101075792!=ft(t,e))throw"invalid zip file";i=ft(t,e+32),o=ft(t,e+48)}for(var s=0;s Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE */ -var t={},n=Uint8Array,r=Uint16Array,i=Uint32Array,e=new n([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,0,0,0]),o=new n([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,0,0]),a=new n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=function(t,n){for(var e=new r(31),o=0;o<31;++o)e[o]=n+=1<>>1|(21845&d)<<1;g=(61680&(g=(52428&g)>>>2|(13107&g)<<2))>>>4|(3855&g)<<4,v[d]=((65280&g)>>>8|(255&g)<<8)>>>1}var y=function(t,n,i){for(var e=t.length,o=0,a=new r(n);o>>u]=h}else for(f=new r(e),o=0;o>>15-t[o];return f},w=new n(288);for(d=0;d<144;++d)w[d]=8;for(d=144;d<256;++d)w[d]=9;for(d=256;d<280;++d)w[d]=7;for(d=280;d<288;++d)w[d]=8;var m=new n(32);for(d=0;d<32;++d)m[d]=5;var b=y(w,9,0),x=y(w,9,1),z=y(m,5,0),S=y(m,5,1),k=function(t){for(var n=t[0],r=1;rn&&(n=t[r]);return n},M=function(t,n,r){var i=n/8>>0;return(t[i]|t[i+1]<<8)>>>(7&n)&r},C=function(t,n){var r=n/8>>0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>>(7&n)},U=function(t){return(t/8>>0)+(7&t&&1)},A=function(t,e,o){(null==e||e<0)&&(e=0),(null==o||o>t.length)&&(o=t.length);var a=new(t instanceof r?r:t instanceof i?i:n)(o-e);return a.set(t.subarray(e,o)),a},O=function(t,r,i){var f=t.length,s=!r||i,h=!i||i.i;i||(i={}),r||(r=new n(3*f));var c=function(t){var i=r.length;if(t>i){var e=new n(Math.max(2*i,t));e.set(r),r=e}},p=i.f||0,v=i.p||0,d=i.b||0,g=i.l,w=i.d,m=i.m,b=i.n,z=8*f;do{if(!g){i.f=p=M(t,v,1);var O=M(t,v+1,3);if(v+=3,!O){var T=t[(H=U(v)+4)-4]|t[H-3]<<8,D=H+T;if(D>f){if(h)throw"unexpected EOF";break}s&&c(d+T),r.set(t.subarray(H,D),d),i.b=d+=T,i.p=v=8*D;continue}if(1==O)g=x,w=S,m=9,b=5;else{if(2!=O)throw"invalid block type";var F=M(t,v,31)+257,E=M(t,v+10,15)+4,I=F+M(t,v+5,31)+1;v+=14;for(var Z=new n(I),j=new n(19),G=0;Gz)break;var B=y(j,L,1);for(G=0;G>>4)<16)Z[G++]=H;else{var W=0,Y=0;for(16==H?(Y=3+M(t,v,3),v+=2,W=Z[G-1]):17==H?(Y=3+M(t,v,7),v+=3):18==H&&(Y=11+M(t,v,127),v+=7);Y--;)Z[G++]=W}}var q=Z.subarray(0,F),J=Z.subarray(F);m=k(q),b=k(J),g=y(q,m,1),w=y(J,b,1)}if(v>z)throw"unexpected EOF"}s&&c(d+131072);for(var K=(1<>>4;if((v+=15&W)>z)throw"unexpected EOF";if(!W)throw"invalid length/literal";if(V<256)r[d++]=V;else{if(256==V){g=null;break}var X=V-254;if(V>264){var $=e[G=V-257];X=M(t,v,(1<<$)-1)+u[G],v+=$}var _=w[C(t,v)&N],tt=_>>>4;if(!_)throw"invalid distance";v+=15&_;J=l[tt];if(tt>3){$=o[tt];J+=C(t,v)&(1<<$)-1,v+=$}if(v>z)throw"unexpected EOF";s&&c(d+131072);for(var nt=d+X;d>0;t[i]|=r,t[i+1]|=r>>>8},D=function(t,n,r){r<<=7&n;var i=n/8>>0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},F=function(t,i){for(var e=[],o=0;ov&&(v=f[o].s);var d=new r(v+1),g=E(e[l-1],d,0);if(g>i){o=0;var y=0,w=g-i,m=1<i))break;y+=m-(1<>>=w;y>0;){var x=f[o].s;d[x]=0&&y;--o){var z=f[o].s;d[z]==i&&(--d[z],++y)}g=i}return[new n(d),g]},E=function(t,n,r){return-1==t.s?Math.max(E(t.l,n,r+1),E(t.r,n,r+1)):n[t.s]=r},I=function(t){for(var n=t.length;n&&!t[--n];);for(var i=new r(++n),e=0,o=t[0],a=1,f=function(t){i[e++]=t},s=1;s<=n;++s)if(t[s]==o&&s!=n)++a;else{if(!o&&a>2){for(;a>138;a-=138)f(32754);a>2&&(f(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(f(o),--a;a>6;a-=6)f(8304);a>2&&(f(a-3<<5|8208),a=0)}for(;a--;)f(o);a=1,o=t[s]}return[i.subarray(0,e),n]},Z=function(t,n){for(var r=0,i=0;i>>8,t[e+2]=255^t[e],t[e+3]=255^t[e+1];for(var o=0;o4&&!H[a[W-1]];--W);var Y,q,J,K,N=p+5<<3,Q=Z(s,w)+Z(u,m)+h,V=Z(s,g)+Z(u,k)+h+14+3*W+Z(L,H)+(2*L[16]+3*L[17]+7*L[18]);if(N<=Q&&N<=V)return j(n,v,t.subarray(l,l+p));if(T(n,v,1+(V15&&(T(n,v,tt[R]>>>5&127),v+=tt[R]>>>12)}}}else Y=b,q=w,J=z,K=m;for(R=0;R255){nt=f[R]>>>18&31;D(n,v,Y[nt+257]),v+=q[nt+257],nt>7&&(T(n,v,f[R]>>>23&31),v+=e[nt]);var rt=31&f[R];D(n,v,J[rt]),v+=K[rt],rt>3&&(D(n,v,f[R]>>>5&8191),v+=o[rt])}else D(n,v,Y[f[R]]),v+=q[f[R]];return D(n,v,Y[256]),v+q[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),R=new n(0),B=function(t,a,f,s,u,c){var l=t.length,v=new n(s+l+5*(1+Math.ceil(l/7e3))+u),d=v.subarray(s,v.length-u),g=0;if(!a||l<8)for(var y=0;y<=l;y+=65535){var w=y+65535;w>>13,x=8191&m,z=(1<7e3||Z>24576)&&q>423){g=G(t,d,0,T,D,F,I,Z,H,y-H,g),Z=E=I=0,H=y;for(var J=0;J<286;++J)D[J]=0;for(J=0;J<30;++J)F[J]=0}var K=2,N=0,Q=x,V=W-Y&32767;if(q>2&&P==O(y-V))for(var X=Math.min(b,q)-1,$=Math.min(32767,y),_=Math.min(258,q);V<=$&&--Q&&W!=Y;){if(t[y+K]==t[y+K-V]){for(var tt=0;tt<_&&t[y+tt]==t[y+tt-V];++tt);if(tt>K){if(K=tt,N=V,tt>X)break;var nt=Math.min(V,tt-2),rt=0;for(J=0;Jrt&&(rt=et,Y=it)}}}V+=(W=Y)-(Y=S[W])+32768&32767}if(N){T[Z++]=268435456|h[K]<<18|p[N];var ot=31&h[K],at=31&p[N];I+=e[ot]+o[at],++D[257+ot],++F[at],B=y+K,++E}else T[Z++]=t[y],++D[t[y]]}}g=G(t,d,c,T,D,F,I,Z,H,y-H,g),!c&&7&g&&(g=j(d,g+1,R))}return A(v,0,s+U(g)+u)},H=function(){for(var t=new i(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&3988292384)^r>>>1;t[n]=r}return t}(),P=function(){var t=4294967295;return{p:function(n){for(var r=t,i=0;i>>8;t=r},d:function(){return 4294967295^t}}},W=function(){var t=1,n=0;return{p:function(r){for(var i=t,e=n,o=r.length,a=0;a!=o;){for(var f=Math.min(a+5552,o);a>>8<<16|(255&n)<<8|n>>>8)+2*((255&t)<<23)}}},Y=function(t,n,r,i,e){return B(t,null==n.level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+n.mem,r,i,!e)},q=function(t,n){var r={};for(var i in t)r[i]=t[i];for(var i in n)r[i]=n[i];return r},J=function(t,n,r){for(var i=t(),e=t.toString(),o=e.slice(e.indexOf("[")+1,e.lastIndexOf("]")).replace(/ /g,"").split(","),a=0;a>>=8},ht=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&ut(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},ct=function(t){if(31!=t[0]||139!=t[1]||8!=t[2])throw"invalid gzip data";var n=t[3],r=10;4&n&&(r+=t[10]|2+(t[11]<<8));for(var i=(n>>3&1)+(n>>4&1);i>0;i-=!t[r++]);return r+(2&n)},lt=function(t){var n=t.length;return(t[n-4]|t[n-3]<<8|t[n-2]<<16)+2*(t[n-1]<<23)},pt=function(t){return 10+(t.filename&&t.filename.length+1||0)},vt=function(t,n){var r=n.level,i=0==r?0:r<6?1:9==r?3:2;t[0]=120,t[1]=i<<6|(i?32-2*i:1)},dt=function(t){if(8!=(15&t[0])||t[0]>>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(32&t[1])throw"invalid zlib data: preset dictionaries not supported"};function gt(t,n){return n||"function"!=typeof t||(n=t,t={}),this.ondata=n,t}var yt=function(){function t(t,n){n||"function"!=typeof t||(n=t,t={}),this.ondata=n,this.o=t||{}}return t.prototype.p=function(t,n){this.ondata(Y(t,this.o,0,0,!n),n)},t.prototype.push=function(t,n){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=n,this.p(t,n||!1)},t}();export{yt as Deflate};var wt=function(){return function(t,n){ot([V,function(){return[et,yt]}],this,gt.call(this,t,n),(function(t){var n=new yt(t.data);onmessage=et(n)}),6)}}();export{wt as AsyncDeflate};export function deflate(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[V],(function(t){return nt(deflateSync(t.data[0],t.data[1]))}),0,r)}export function deflateSync(t,n){return void 0===n&&(n={}),Y(t,n,0,0)}var mt=function(){function t(t){this.s={},this.p=new n(0),this.ondata=t}return t.prototype.e=function(t){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var r=this.p.length,i=new n(r+t.length);i.set(this.p),i.set(t,r),this.p=i},t.prototype.c=function(t){this.d=this.s.i=t||!1;var n=this.s.b,r=O(this.p,this.o,this.s);this.ondata(A(r,n,this.s.b),this.d),this.o=A(r,this.s.b-32768),this.s.b=this.o.length,this.p=A(this.p,this.s.p/8>>0),this.s.p&=7},t.prototype.push=function(t,n){this.e(t),this.c(n)},t}();export{mt as Inflate};var bt=function(){return function(t){this.ondata=t,ot([Q,function(){return[et,mt]}],this,0,(function(){var t=new mt;onmessage=et(t)}),7)}}();export{bt as AsyncInflate};export function inflate(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[Q],(function(t){return nt(inflateSync(t.data[0],rt(t.data[1])))}),1,r)}export function inflateSync(t,n){return O(t,n)}var xt=function(){function t(t,n){this.c=P(),this.l=0,this.v=1,yt.call(this,t,n)}return t.prototype.push=function(t,n){yt.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){this.c.p(t),this.l+=t.length;var r=Y(t,this.o,this.v&&pt(this.o),n&&8,!n);this.v&&(ht(r,this.o),this.v=0),n&&(ut(r,r.length-8,this.c.d()),ut(r,r.length-4,this.l)),this.ondata(r,n)},t}();export{xt as Gzip};var zt=function(){return function(t,n){ot([V,X,function(){return[et,yt,xt]}],this,gt.call(this,t,n),(function(t){var n=new xt(t.data);onmessage=et(n)}),8)}}();export{zt as AsyncGzip};export function gzip(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[V,X,function(){return[gzipSync]}],(function(t){return nt(gzipSync(t.data[0],t.data[1]))}),2,r)}export function gzipSync(t,n){void 0===n&&(n={});var r=P(),i=t.length;r.p(t);var e=Y(t,n,pt(n),8),o=e.length;return ht(e,n),ut(e,o-8,r.d()),ut(e,o-4,i),e}var St=function(){function t(t){this.v=1,mt.call(this,t)}return t.prototype.push=function(t,n){if(mt.prototype.e.call(this,t),this.v){var r=ct(this.p);if(r>=this.p.length&&!n)return;this.p=this.p.subarray(r),this.v=0}if(n){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}mt.prototype.c.call(this,n)},t}();export{St as Gunzip};var kt=function(){return function(t){this.ondata=t,ot([Q,$,function(){return[et,mt,St]}],this,0,(function(){var t=new St;onmessage=et(t)}),9)}}();export{kt as AsyncGunzip};export function gunzip(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[Q,$,function(){return[gunzipSync]}],(function(t){return nt(gunzipSync(t.data[0]))}),3,r)}export function gunzipSync(t,r){return O(t.subarray(ct(t),-8),r||new n(lt(t)))}var Mt=function(){function t(t,n){this.c=W(),this.v=1,yt.call(this,t,n)}return t.prototype.push=function(t,n){yt.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){this.c.p(t);var r=Y(t,this.o,this.v&&2,n&&4,!n);this.v&&(vt(r,this.o),this.v=0),n&&ut(r,r.length-4,this.c.d()),this.ondata(r,n)},t}();export{Mt as Zlib};var Ct=function(){return function(t,n){ot([V,_,function(){return[et,yt,Mt]}],this,gt.call(this,t,n),(function(t){var n=new Mt(t.data);onmessage=et(n)}),10)}}();export{Ct as AsyncZlib};export function zlib(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[V,_,function(){return[zlibSync]}],(function(t){return nt(zlibSync(t.data[0],t.data[1]))}),4,r)}export function zlibSync(t,n){void 0===n&&(n={});var r=W();r.p(t);var i=Y(t,n,2,4);return vt(i,n),ut(i,i.length-4,r.d()),i}var Ut=function(){function t(t){this.v=1,mt.call(this,t)}return t.prototype.push=function(t,n){if(mt.prototype.e.call(this,t),this.v){if(this.p.length<2&&!n)return;this.p=this.p.subarray(2),this.v=0}if(n){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}mt.prototype.c.call(this,n)},t}();export{Ut as Unzlib};var At=function(){return function(t){this.ondata=t,ot([Q,tt,function(){return[et,mt,Ut]}],this,0,(function(){var t=new Ut;onmessage=et(t)}),11)}}();export{At as AsyncUnzlib};export function unzlib(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return it(t,n,[Q,tt,function(){return[unzlibSync]}],(function(t){return nt(unzlibSync(t.data[0],rt(t.data[1])))}),5,r)}export function unzlibSync(t,n){return O((dt(t),t.subarray(2,-4)),n)}export{gzip as compress,zt as AsyncCompress};export{gzipSync as compressSync,xt as Compress};var Ot=function(){function t(t){this.G=St,this.I=mt,this.Z=Ut,this.ondata=t}return t.prototype.push=function(t,r){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(t,r);else{if(this.p&&this.p.length){var i=new n(this.p.length+t.length);i.set(this.p),i.set(t,this.p.length)}else this.p=t;if(this.p.length>2){var e=this,o=function(){e.ondata.apply(e,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(o):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(o):new this.Z(o),this.s.push(this.p,r),this.p=null}}},t}();export{Ot as Decompress};var Tt=function(){function t(t){this.G=kt,this.I=bt,this.Z=At,this.ondata=t}return t.prototype.push=function(t,n){Ot.prototype.push.call(this,t,n)},t}();export{Tt as AsyncDecompress};export function decompress(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return 31==t[0]&&139==t[1]&&8==t[2]?gunzip(t,n,r):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?inflate(t,n,r):unzlib(t,n,r)}export function decompressSync(t,n){return 31==t[0]&&139==t[1]&&8==t[2]?gunzipSync(t,n):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?inflateSync(t,n):unzlibSync(t,n)}var Dt=function(t,r,i,e){for(var o in t){var a=t[o],f=r+o;a instanceof n?i[f]=[a,e]:Array.isArray(a)?i[f]=[a[0],q(e,a[1])]:Dt(a,f+"/",i,e)}},Ft="undefined"!=typeof TextEncoder&&new TextEncoder,Et="undefined"!=typeof TextDecoder&&new TextDecoder,It=0;try{Et.decode(R,{stream:!0}),It=1}catch(t){}var Zt=function(t){for(var n="",r=0;;){var i=t[r++],e=(i>127)+(i>223)+(i>239);if(r+e>t.length)return[n,t.slice(r-1)];e?3==e?(i=((15&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536,n+=String.fromCharCode(55296|i>>10,56320|1023&i)):n+=1&e?String.fromCharCode((31&i)<<6|63&t[r++]):String.fromCharCode((15&i)<<12|(63&t[r++])<<6|63&t[r++]):n+=String.fromCharCode(i)}},jt=function(){function t(t){this.ondata=t,It?this.t=new TextDecoder:this.p=R}return t.prototype.push=function(t,r){if(!this.ondata)throw"no callback";if(r||(r=!1),this.t)return this.ondata(this.t.decode(t,{stream:!r}),r);var i=new n(this.p.length+t.length);i.set(this.p),i.set(t,this.p.length);var e=Zt(i),o=e[0],a=e[1];if(r&&a.length)throw"invalid utf-8 data";this.p=a,this.ondata(o,r)},t}();export{jt as DecodeUTF8};var Gt=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){if(!this.ondata)throw"no callback";this.ondata(strToU8(t),n||!1)},t}();export{Gt as EncodeUTF8};export function strToU8(t,r){if(r){for(var i=new n(t.length),e=0;e>1)),f=0,s=function(t){a[f++]=t};for(e=0;ea.length){var u=new n(f+8+(o-e<<1));u.set(a),a=u}var h=t.charCodeAt(e);h<128||r?s(h):h<2048?(s(192|h>>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++e))>>>18),s(128|h>>>12&63),s(128|h>>>6&63),s(128|63&h)):(s(224|h>>>12),s(128|h>>>6&63),s(128|63&h))}return A(a,0,f)}export function strFromU8(t,n){if(n){for(var r="",i=0;i>8;var s=new Date(null==r.mtime?Date.now():r.mtime),u=s.getFullYear()-1980;if(u<0||u>119)throw"date not in range 1980-2099";return ut(t,n,2*(u<<24)|s.getMonth()+1<<21|s.getDate()<<16|s.getHours()<<11|s.getMinutes()<<5|s.getSeconds()>>>1),n+=4,null!=o&&(ut(t,n,r.crc),ut(t,n+4,o),ut(t,n+8,r.size)),ut(t,n+12,f),n+=16,null!=a&&(ut(t,n+6,r.attrs),ut(t,n+10,a),n+=14),t.set(i,n),n+f},Wt=function(t,n,r,i,e){ut(t,n,101010256),ut(t,n+8,r),ut(t,n+10,r),ut(t,n+12,i),ut(t,n+16,e)},Yt=function(){function t(t){this.filename=t,this.c=P(),this.size=0,this.compression=0}return t.prototype.process=function(t,n){this.ondata(null,t,n)},t.prototype.push=function(t,n){if(!this.ondata)throw"no callback - add to ZIP archive before pushing";this.c.p(t),this.size+=t.length,n&&(this.crc=this.c.d()),this.process(t,n||!1)},t}();export{Yt as ZipPassThrough};var qt=function(){function t(t,n){var r=this;void 0===n&&(n={}),Yt.call(this,t),this.d=new yt(n,(function(t,n){r.ondata(null,t,n)})),this.compression=8,this.flag=Lt(n.level)}return t.prototype.process=function(t,n){try{this.d.push(t,n)}catch(t){this.ondata(t,null,n)}},t.prototype.push=function(t,n){Yt.prototype.push.call(this,t,n)},t}();export{qt as ZipDeflate};var Jt=function(){function t(t,n){var r=this;void 0===n&&(n={}),Yt.call(this,t),this.d=new wt(n,(function(t,n,i){r.ondata(t,n,i)})),this.compression=8,this.flag=Lt(n.level),this.terminate=this.d.terminate}return t.prototype.process=function(t,n){this.d.push(t,n)},t.prototype.push=function(t,n){Yt.prototype.push.call(this,t,n)},t}();export{Jt as AsyncZipDeflate};var Kt=function(){function t(t){this.ondata=t,this.u=[],this.d=1}return t.prototype.add=function(t){var r=this;if(2&this.d)throw"stream finished";var i=strToU8(t.filename),e=i.length,o=e!=t.filename.length,a=e+30;if(e>65535)throw"filename too long";var f=new n(a);Pt(f,0,t,i,o);var s=[f],u=function(){for(var t=0,n=s;t65535&&b("filename too long",null),m)if(g<16e4)try{b(null,deflateSync(u,v))}catch(t){b(t,null)}else c.push(deflate(u,v,b));else b(null,u)},d=0;d65535)throw"filename too long";var p=c?deflateSync(u,h):u,v=p.length,d=P();d.p(u),e.push(q(h,{size:u.length,crc:d.d(),c:p,f:b,u:l!=f.length,o:o,compression:c})),o+=30+l+v,a+=76+2*l+v}for(var g=new n(a+22),y=o,w=a-o,m=0;ms+30+c+l){var v=[];d.k.unshift(v),f=2,u=s;var g=ft(h,s+18),y=strFromU8(h.subarray(s+30,s+=30+c),!o);if(a&&(g=-1),4294967295==g&&(g=Ht(h,s)[0]),!d.o[r])return d.onfile("unknown compression type "+r,y,null),"break";d.c=g;var w={start:function(){if(!w.ondata)throw"no callback";if(g){var t=new i.o[r];t.ondata=function(t,n,r){w.ondata(t,n,r)};for(var e=0,o=v;e65558)return void r("invalid zip file",null);var f=at(t,a+8);f||r(null,{});var s=f,u=ft(t,a+16),h=4294967295==u;if(h){if(a=ft(t,a-12),101075792!=ft(t,a))return void r("invalid zip file",null);s=f=ft(t,a+32),u=ft(t,a+48)}for(var c=function(a){var s=Bt(t,u,h),c=s[0],l=s[1],p=s[2],v=s[3],d=s[4],g=s[5],y=Rt(t,g);u=d;var w=function(t,n){t?(e(),r(t,null)):(o[v]=n,--f||r(null,o))};if(c)if(8==c){var m=t.subarray(y,y+l);if(l<32e4)try{w(null,inflateSync(m,new n(p)))}catch(t){w(t,null)}else i.push(inflate(m,{size:p},w))}else w("unknown compression type "+c,null);else w(null,A(t,y,y+l))},l=0;l65558)throw"invalid zip file";var e=at(t,i+8);if(!e)return{};var o=ft(t,i+16),a=4294967295==o;if(a){if(i=ft(t,i-12),101075792!=ft(t,i))throw"invalid zip file";e=ft(t,i+32),o=ft(t,i+48)}for(var f=0;f>>1|(T&21845)<<1;ir=(ir&52428)>>>2|(ir&13107)<<2,ir=(ir&61680)>>>4|(ir&3855)<<4,Ur[T]=((ir&65280)>>>8|(ir&255)<<8)>>>1}for(var V=function(n,r,t){for(var e=n.length,i=0,a=new R(r);i>>h]=s}else for(f=new R(e),i=0;i>>15-n[i]);return f},tr=new A(288),T=0;T<144;++T)tr[T]=8;for(var T=144;T<256;++T)tr[T]=9;for(var T=256;T<280;++T)tr[T]=7;for(var T=280;T<288;++T)tr[T]=8;for(var vr=new A(32),T=0;T<32;++T)vr[T]=5;var xn=V(tr,9,0),An=V(tr,9,1),Dn=V(vr,5,0),Mn=V(vr,5,1),Gr=function(n){for(var r=n[0],t=1;tr&&(r=n[t]);return r},X=function(n,r,t){var e=r/8|0;return(n[e]|n[e+1]<<8)>>(r&7)&t},Or=function(n,r){var t=r/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(r&7)},Cr=function(n){return(n/8|0)+(n&7&&1)},$=function(n,r,t){(r==null||r<0)&&(r=0),(t==null||t>n.length)&&(t=n.length);var e=new(n instanceof R?R:n instanceof nr?nr:A)(t-r);return e.set(n.subarray(r,t)),e},Fr=function(n,r,t){var e=n.length;if(!e||t&&!t.l&&e<5)return r||new A(0);var i=!r||t,a=!t||t.i;t||(t={}),r||(r=new A(e*3));var o=function(Tr){var Dr=r.length;if(Tr>Dr){var hr=new A(Math.max(Dr*2,Tr));hr.set(r),r=hr}},f=t.f||0,h=t.p||0,s=t.b||0,u=t.l,l=t.d,p=t.m,y=t.n,c=e*8;do{if(!u){t.f=f=X(n,h,1);var g=X(n,h+1,3);if(h+=3,g)if(g==1)u=An,l=Mn,p=9,y=5;else if(g==2){var m=X(n,h,31)+257,D=X(n,h+10,15)+4,C=m+X(n,h+5,31)+1;h+=14;for(var U=new A(C),x=new A(19),v=0;vc)break;for(var K=V(x,E,1),v=0;v>>4;if(w<16)U[v++]=w;else{var Z=0,B=0;for(w==16?(B=3+X(n,h,3),h+=2,Z=U[v-1]):w==17?(B=3+X(n,h,7),h+=3):w==18&&(B=11+X(n,h,127),h+=7);B--;)U[v++]=Z}}var G=U.subarray(0,m),k=U.subarray(m);p=Gr(G),y=Gr(k),u=V(G,p,1),l=V(k,y,1)}else throw"invalid block type";else{var w=Cr(h)+4,M=n[w-4]|n[w-3]<<8,z=w+M;if(z>e){if(a)throw"unexpected EOF";break}i&&o(s+M),r.set(n.subarray(w,z),s),t.b=s+=M,t.p=h=z*8;continue}if(h>c)throw"unexpected EOF"}i&&o(s+131072);for(var O=(1<>>4;if(h+=Z&15,h>c)throw"unexpected EOF";if(!Z)throw"invalid length/literal";if(Q<256)r[s++]=Q;else if(Q==256){u=null;break}else{var W=Q-254;if(Q>264){var v=Q-257,d=ur[v];W=X(n,h,(1<>>4;if(!_)throw"invalid distance";h+=_&15;var k=zn[j];if(j>3){var d=lr[j];k+=Or(n,h)&(1<c)throw"unexpected EOF";i&&o(s+131072);for(var q=s+W;s>>8},cr=function(n,r,t){t<<=r&7;var e=r/8|0;n[e]|=t,n[e+1]|=t>>>8,n[e+2]|=t>>>16},Er=function(n,r){for(var t=[],e=0;ep&&(p=a[e].s);var y=new R(p+1),c=Pr(t[u-1],y,0);if(c>r){var e=0,g=0,w=c-r,M=1<r)g+=M-(1<>>=w;g>0;){var m=a[e].s;y[m]=0&&g;--e){var D=a[e].s;y[D]==r&&(--y[D],++g)}c=r}return[new A(y),c]},Pr=function(n,r,t){return n.s==-1?Math.max(Pr(n.l,r,t+1),Pr(n.r,r,t+1)):r[n.s]=t},Vr=function(n){for(var r=n.length;r&&!n[--r];);for(var t=new R(++r),e=0,i=n[0],a=1,o=function(h){t[e++]=h},f=1;f<=r;++f)if(n[f]==i&&f!=r)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=n[f]}return[t.subarray(0,e),r]},pr=function(n,r){for(var t=0,e=0;e>>8,n[i+2]=n[i]^255,n[i+3]=n[i+1]^255;for(var a=0;a4&&!S[Mr[I-1]];--I);var Z=s+5<<3,B=pr(i,tr)+pr(a,vr)+o,G=pr(i,p)+pr(a,g)+o+14+3*I+pr(x,S)+(2*x[16]+3*x[17]+7*x[18]);if(Z<=B&&Z<=G)return Sr(r,u,n.subarray(h,h+s));var k,O,H,N;if(b(r,u,1+(G15&&(b(r,u,_[v]>>>5&127),u+=_[v]>>>12)}}else k=xn,O=tr,H=Dn,N=vr;for(var v=0;v255){var j=e[v]>>>18&31;cr(r,u,k[j+257]),u+=O[j+257],j>7&&(b(r,u,e[v]>>>23&31),u+=ur[j]);var q=e[v]&31;cr(r,u,H[q]),u+=N[q],q>3&&(cr(r,u,e[v]>>>5&8191),u+=lr[q])}else cr(r,u,k[e[v]]),u+=O[e[v]];return cr(r,u,k[256]),u+O[256]},Un=new nr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),er=new A(0),Cn=function(n,r,t,e,i,a){var o=n.length,f=new A(e+o+5*(1+Math.ceil(o/7e3))+i),h=f.subarray(e,f.length-i),s=0;if(!r||o<8)for(var u=0;u<=o;u+=65535){var l=u+65535;l>>13,c=p&8191,g=(1<7e3||S>24576)&&k>423){s=Xr(n,h,0,C,U,x,E,S,I,u-I,s),S=v=E=0,I=u;for(var O=0;O<286;++O)U[O]=0;for(var O=0;O<30;++O)x[O]=0}var H=2,N=0,Q=c,W=B-G&32767;if(k>2&&Z==D(u-W))for(var d=Math.min(y,k)-1,_=Math.min(32767,u),j=Math.min(258,k);W<=_&&--Q&&B!=G;){if(n[u+H]==n[u+H-W]){for(var q=0;qH){if(H=q,N=W,q>d)break;for(var Tr=Math.min(W,q-2),Dr=0,O=0;ODr&&(Dr=vn,G=hr)}}}B=G,G=w[B],W+=B-G+32768&32767}if(N){C[S++]=268435456|Ir[H]<<18|Qr[N];var cn=Ir[H]&31,pn=Qr[N]&31;E+=ur[cn]+lr[pn],++U[257+cn],++x[pn],K=u+H,++v}else C[S++]=n[u],++U[n[u]]}}s=Xr(n,h,a,C,U,x,E,S,I,u-I,s),!a&&s&7&&(s=Sr(h,s+1,er))}return $(f,0,e+Cr(s)+i)},Fn=function(){for(var n=new nr(256),r=0;r<256;++r){for(var t=r,e=9;--e;)t=(t&1&&3988292384)^t>>>1;n[r]=t}return n}(),gr=function(){var n=-1;return{p:function(r){for(var t=n,e=0;e>>8;n=t},d:function(){return~n}}},$r=function(){var n=1,r=0;return{p:function(t){for(var e=n,i=r,a=t.length,o=0;o!=a;){for(var f=Math.min(o+2655,a);o>16),i=(i&65535)+15*(i>>16)}n=e,r=i},d:function(){return n%=65521,r%=65521,(n>>>8<<16|(r&255)<<8|r>>>8)+((n&255)<<23)*2}}},sr=function(n,r,t,e,i){return Cn(n,r.level==null?6:r.level,r.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):12+r.mem,t,e,!i)},Zr=function(n,r){var t={};for(var e in n)t[e]=n[e];for(var e in r)t[e]=r[e];return t},Sn=function(n,r,t){for(var e=n(),i=n.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/ /g,"").split(","),o=0;o>>=8},_r=function(n,r){var t=r.filename;if(n[0]=31,n[1]=139,n[2]=8,n[8]=r.level<2?4:r.level==9?2:0,n[9]=3,r.mtime!=0&&F(n,4,Math.floor(new Date(r.mtime||Date.now())/1e3)),t){n[3]=8;for(var e=0;e<=t.length;++e)n[e+10]=t.charCodeAt(e)}},br=function(n){if(n[0]!=31||n[1]!=139||n[2]!=8)throw"invalid gzip data";var r=n[3],t=10;r&4&&(t+=n[10]|(n[11]<<8)+2);for(var e=(r>>3&1)+(r>>4&1);e>0;e-=!n[t++]);return t+(r&2)},Gn=function(n){var r=n.length;return(n[r-4]|n[r-3]<<8|n[r-2]<<16)+2*(n[r-1]<<23)},rn=function(n){return 10+(n.filename&&n.filename.length+1||0)},nn=function(n,r){var t=r.level,e=t==0?0:t<6?1:t==9?3:2;n[0]=120,n[1]=e<<6|(e?32-2*e:1)},On=function(n){if((n[0]&15)!=8||n[0]>>>4>7||(n[0]<<8|n[1])%31)throw"invalid zlib data";if(n[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function tn(n,r){return!r&&typeof n=="function"&&(r=n,n={}),this.ondata=r,n}var rr=function(){function n(r,t){!t&&typeof r=="function"&&(t=r,r={}),this.ondata=t,this.o=r||{}}return n.prototype.p=function(r,t){this.ondata(sr(r,this.o,0,0,!t),t)},n.prototype.push=function(r,t){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=t,this.p(r,t||!1)},n}(),En=function(){function n(r,t){zr([yr,function(){return[L,rr]}],this,tn.call(this,r,t),function(e){var i=new rr(e.data);onmessage=L(i)},6)}return n}();function Pn(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[yr],function(e){return ar(kr(e.data[0],e.data[1]))},0,t)}function kr(n,r){return sr(n,r||{},0,0)}var J=function(){function n(r){this.s={},this.p=new A(0),this.ondata=r}return n.prototype.e=function(r){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var t=this.p.length,e=new A(t+r.length);e.set(this.p),e.set(r,t),this.p=e},n.prototype.c=function(r){this.d=this.s.i=r||!1;var t=this.s.b,e=Fr(this.p,this.o,this.s);this.ondata($(e,t,this.s.b),this.d),this.o=$(e,this.s.b-32768),this.s.b=this.o.length,this.p=$(this.p,this.s.p/8|0),this.s.p&=7},n.prototype.push=function(r,t){this.e(r),this.c(t)},n}(),en=function(){function n(r){this.ondata=r,zr([wr,function(){return[L,J]}],this,0,function(){var t=new J;onmessage=L(t)},7)}return n}();function an(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[wr],function(e){return ar(xr(e.data[0],Lr(e.data[1])))},1,t)}function xr(n,r){return Fr(n,r)}var qr=function(){function n(r,t){this.c=gr(),this.l=0,this.v=1,rr.call(this,r,t)}return n.prototype.push=function(r,t){rr.prototype.push.call(this,r,t)},n.prototype.p=function(r,t){this.c.p(r),this.l+=r.length;var e=sr(r,this.o,this.v&&rn(this.o),t&&8,!t);this.v&&(_r(e,this.o),this.v=0),t&&(F(e,e.length-8,this.c.d()),F(e,e.length-4,this.l)),this.ondata(e,t)},n}(),Rn=function(){function n(r,t){zr([yr,kn,function(){return[L,rr,qr]}],this,tn.call(this,r,t),function(e){var i=new qr(e.data);onmessage=L(i)},8)}return n}();function qn(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[yr,kn,function(){return[Hr]}],function(e){return ar(Hr(e.data[0],e.data[1]))},2,t)}function Hr(n,r){r||(r={});var t=gr(),e=n.length;t.p(n);var i=sr(n,r,rn(r),8),a=i.length;return _r(i,r),F(i,a-8,t.d()),F(i,a-4,e),i}var Wr=function(){function n(r){this.v=1,J.call(this,r)}return n.prototype.push=function(r,t){if(J.prototype.e.call(this,r),this.v){var e=this.p.length>3?br(this.p):4;if(e>=this.p.length&&!t)return;this.p=this.p.subarray(e),this.v=0}if(t){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}J.prototype.c.call(this,t)},n}(),Hn=function(){function n(r){this.ondata=r,zr([wr,Bn,function(){return[L,J,Wr]}],this,0,function(){var t=new Wr;onmessage=L(t)},9)}return n}();function Wn(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[wr,Bn,function(){return[Yr]}],function(e){return ar(Yr(e.data[0]))},3,t)}function Yr(n,r){return Fr(n.subarray(br(n),-8),r||new A(Gn(n)))}var on=function(){function n(r,t){this.c=$r(),this.v=1,rr.call(this,r,t)}return n.prototype.push=function(r,t){rr.prototype.push.call(this,r,t)},n.prototype.p=function(r,t){this.c.p(r);var e=sr(r,this.o,this.v&&2,t&&4,!t);this.v&&(nn(e,this.o),this.v=0),t&&F(e,e.length-4,this.c.d()),this.ondata(e,t)},n}(),nt=function(){function n(r,t){zr([yr,Tn,function(){return[L,rr,on]}],this,tn.call(this,r,t),function(e){var i=new on(e.data);onmessage=L(i)},10)}return n}();function tt(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[yr,Tn,function(){return[fn]}],function(e){return ar(fn(e.data[0],e.data[1]))},4,t)}function fn(n,r){r||(r={});var t=$r();t.p(n);var e=sr(n,r,2,4);return nn(e,r),F(e,e.length-4,t.d()),e}var jr=function(){function n(r){this.v=1,J.call(this,r)}return n.prototype.push=function(r,t){if(J.prototype.e.call(this,r),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}if(t){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}J.prototype.c.call(this,t)},n}(),Yn=function(){function n(r){this.ondata=r,zr([wr,In,function(){return[L,J,jr]}],this,0,function(){var t=new jr;onmessage=L(t)},11)}return n}();function jn(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[wr,In,function(){return[Jr]}],function(e){return ar(Jr(e.data[0],Lr(e.data[1])))},5,t)}function Jr(n,r){return Fr((On(n),n.subarray(2,-4)),r)}var Jn=function(){function n(r){this.G=Wr,this.I=J,this.Z=jr,this.ondata=r}return n.prototype.push=function(r,t){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(r,t);else{if(this.p&&this.p.length){var e=new A(this.p.length+r.length);e.set(this.p),e.set(r,this.p.length)}else this.p=r;if(this.p.length>2){var i=this,a=function(){i.ondata.apply(i,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(a):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(a):new this.Z(a),this.s.push(this.p,t),this.p=null}}},n}(),et=function(){function n(r){this.G=Hn,this.I=en,this.Z=Yn,this.ondata=r}return n.prototype.push=function(r,t){Jn.prototype.push.call(this,r,t)},n}();function it(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return n[0]==31&&n[1]==139&&n[2]==8?Wn(n,r,t):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?an(n,r,t):jn(n,r,t)}function at(n,r){return n[0]==31&&n[1]==139&&n[2]==8?Yr(n,r):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?xr(n,r):Jr(n,r)}var sn=function(n,r,t,e){for(var i in n){var a=n[i],o=r+i;a instanceof A?t[o]=[a,e]:Array.isArray(a)?t[o]=[a[0],Zr(e,a[1])]:sn(a,o+"/",t,e)}},Kn=typeof TextEncoder!="undefined"&&new TextEncoder,hn=typeof TextDecoder!="undefined"&&new TextDecoder,Nn=0;try{hn.decode(er,{stream:!0}),Nn=1}catch(n){}var Qn=function(n){for(var r="",t=0;;){var e=n[t++],i=(e>127)+(e>223)+(e>239);if(t+i>n.length)return[r,$(n,t-1)];i?i==3?(e=((e&15)<<18|(n[t++]&63)<<12|(n[t++]&63)<<6|n[t++]&63)-65536,r+=String.fromCharCode(55296|e>>10,56320|e&1023)):i&1?r+=String.fromCharCode((e&31)<<6|n[t++]&63):r+=String.fromCharCode((e&15)<<12|(n[t++]&63)<<6|n[t++]&63):r+=String.fromCharCode(e)}},ot=function(){function n(r){this.ondata=r,Nn?this.t=new TextDecoder:this.p=er}return n.prototype.push=function(r,t){if(!this.ondata)throw"no callback";if(t||(t=!1),this.t)return this.ondata(this.t.decode(r,{stream:!t}),t);var e=new A(this.p.length+r.length);e.set(this.p),e.set(r,this.p.length);var i=Qn(e),a=i[0],o=i[1];if(t&&o.length)throw"invalid utf-8 data";this.p=o,this.ondata(a,t)},n}(),ft=function(){function n(r){this.ondata=r}return n.prototype.push=function(r,t){if(!this.ondata)throw"no callback";this.ondata(or(r),t||!1)},n}();function or(n,r){if(r){for(var t=new A(n.length),e=0;e>1)),o=0,f=function(u){a[o++]=u},e=0;ea.length){var h=new A(o+8+(i-e<<1));h.set(a),a=h}var s=n.charCodeAt(e);s<128||r?f(s):s<2048?(f(192|s>>>6),f(128|s&63)):s>55295&&s<57344?(s=65536+(s&1023<<10)|n.charCodeAt(++e)&1023,f(240|s>>>18),f(128|s>>>12&63),f(128|s>>>6&63),f(128|s&63)):(f(224|s>>>12),f(128|s>>>6&63),f(128|s&63))}return $(a,0,o)}function un(n,r){if(r){for(var t="",e=0;e65535)throw"extra field too long";r+=e+4}return r},Ar=function(n,r,t,e,i,a,o,f){var h=e.length,s=t.extra,u=f&&f.length,l=fr(s);F(n,r,o!=null?33639248:67324752),r+=4,o!=null&&(n[r++]=20,n[r++]=t.os),n[r]=20,r+=2,n[r++]=t.flag<<1|(a==null&&8),n[r++]=i&&8,n[r++]=t.compression&255,n[r++]=t.compression>>8;var p=new Date(t.mtime==null?Date.now():t.mtime),y=p.getFullYear()-1980;if(y<0||y>119)throw"date not in range 1980-2099";if(F(n,r,(y<<24)*2|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>>1),r+=4,a!=null&&(F(n,r,t.crc),F(n,r+4,a),F(n,r+8,t.size)),F(n,r+12,h),F(n,r+14,l),r+=16,o!=null&&(F(n,r,u),F(n,r+6,t.attrs),F(n,r+10,o),r+=14),n.set(e,r),r+=h,l)for(var c in s){var g=s[c],w=g.length;F(n,r,+c),F(n,r+2,w),n.set(g,r+4),r+=4+w}return u&&(n.set(f,r),r+=u),r},ln=function(n,r,t,e,i){F(n,r,101010256),F(n,r+8,t),F(n,r+10,t),F(n,r+12,e),F(n,r+16,i)},Br=function(){function n(r){this.filename=r,this.c=gr(),this.size=0,this.compression=0}return n.prototype.process=function(r,t){this.ondata(null,r,t)},n.prototype.push=function(r,t){if(!this.ondata)throw"no callback - add to ZIP archive before pushing";this.c.p(r),this.size+=r.length,t&&(this.crc=this.c.d()),this.process(r,t||!1)},n}(),st=function(){function n(r,t){var e=this;t||(t={}),Br.call(this,r),this.d=new rr(t,function(i,a){e.ondata(null,i,a)}),this.compression=8,this.flag=Vn(t.level)}return n.prototype.process=function(r,t){try{this.d.push(r,t)}catch(e){this.ondata(e,null,t)}},n.prototype.push=function(r,t){Br.prototype.push.call(this,r,t)},n}(),ht=function(){function n(r,t){var e=this;t||(t={}),Br.call(this,r),this.d=new En(t,function(i,a,o){e.ondata(i,a,o)}),this.compression=8,this.flag=Vn(t.level),this.terminate=this.d.terminate}return n.prototype.process=function(r,t){this.d.push(r,t)},n.prototype.push=function(r,t){Br.prototype.push.call(this,r,t)},n}(),ut=function(){function n(r){this.ondata=r,this.u=[],this.d=1}return n.prototype.add=function(r){var t=this;if(this.d&2)throw"stream finished";var e=or(r.filename),i=e.length,a=r.comment,o=a&&or(a),f=i!=r.filename.length||o&&a.length!=o.length,h=i+fr(r.extra)+30;if(i>65535)throw"filename too long";var s=new A(h);Ar(s,0,r,e,f);var u=[s],l=function(){for(var w=0,M=u;w65535&&Z("filename too long",null),!I)Z(null,z);else if(C<16e4)try{Z(null,kr(z,m))}catch(B){Z(B,null)}else u.push(Pn(z,m,Z))},c=0;c65535)throw"filename too long";var M=u?kr(h,s):h,z=M.length,m=gr();m.p(h),e.push(Zr(s,{size:h.length,crc:m.d(),c:M,f:l,m:c,u:p!=o.length||c&&y.length!=g,o:i,compression:u})),i+=30+p+w+z,a+=76+2*(p+w)+(g||0)+z}for(var D=new A(a+22),C=i,U=a-i,x=0;x0){var i=Math.min(this.c,r.length),a=r.subarray(0,i);if(this.c-=i,this.d?this.d.push(a,!this.c):this.k[0].push(a),r=r.subarray(i),r.length)return this.push(r,t)}else{var o=0,f=0,h=void 0,s=void 0;this.p.length?r.length?(s=new A(this.p.length+r.length),s.set(this.p),s.set(r,this.p.length)):s=this.p:s=r;for(var u=s.length,l=this.c,p=l&&this.d,y=function(){var M,z=P(s,f);if(z==67324752){o=1,h=f,c.d=null,c.c=0;var m=Y(s,f+6),D=Y(s,f+8),C=m&2048,U=m&8,x=Y(s,f+26),v=Y(s,f+28);if(u>f+30+x+v){var E=[];c.k.unshift(E),o=2;var S=P(s,f+18),K=P(s,f+22),I=un(s.subarray(f+30,f+=30+x),!C);S==4294967295?(M=U?[-2]:Ln(s,f),S=M[0],K=M[1]):U&&(S=-1),f+=v,c.c=S;var Z={name:I,compression:D,start:function(){if(!Z.ondata)throw"no callback";if(!S)Z.ondata(null,er,!0);else{var B=e.o[D];if(!B)throw"unknown compression type "+D;var G=S<0?new B(I):new B(I,S,K);G.ondata=function(N,Q,W){Z.ondata(N,Q,W)};for(var k=0,O=E;k=0&&(Z.size=S,Z.originalSize=K),c.onfile(Z)}return"break"}else if(l){if(z==134695760)return h=f+=12+(l==-2&&8),o=2,c.c=0,"break";if(z==33639248)return h=f-=4,o=2,c.c=0,"break"}},c=this;f65558){r("invalid zip file",null);return}var o=Y(n,a+8);o||r(null,{});var f=o,h=P(n,a+16),s=h==4294967295;if(s){if(a=P(n,a-12),P(n,a)!=101075792){r("invalid zip file",null);return}f=o=P(n,a+32),h=P(n,a+48)}for(var u=function(p){var y=$n(n,h,s),c=y[0],g=y[1],w=y[2],M=y[3],z=y[4],m=y[5],D=Xn(n,m);h=z;var C=function(x,v){x?(e(),r(x,null)):(i[M]=v,--o||r(null,i))};if(!c)C(null,$(n,D,D+g));else if(c==8){var U=n.subarray(D,D+g);if(g<32e4)try{C(null,xr(U,new A(w)))}catch(x){C(x,null)}else t.push(an(U,{size:w},C))}else C("unknown compression type "+c,null)},l=0;l65558)throw"invalid zip file";var e=Y(n,t+8);if(!e)return{};var i=P(n,t+16),a=i==4294967295;if(a){if(t=P(n,t-12),P(n,t)!=101075792)throw"invalid zip file";e=P(n,t+32),i=P(n,t+48)}for(var o=0;o