>>=1,r<<=1}while(--e>0);return r>>>1}function Y(t,e,r){var n,i,a=new Array(y+1),o=0;for(n=1;n<=y;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=W(a[s]++,s))}}function q(t){var e;for(e=0;e8?j(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function K(t,e,r,n){var i=2*e,a=2*r;return t[i]>1;r>=1;r--)G(t,a,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,G(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,a,o,s,u=e.dyn_tree,h=e.max_code,f=e.stat_desc.static_tree,l=e.stat_desc.has_stree,c=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(a=0;a<=y;a++)t.bl_count[a]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;rp&&(a=p,m++),u[2*n+1]=a,n>h||(t.bl_count[a]++,o=0,n>=d&&(o=c[n-d]),s=u[2*n],t.opt_len+=s*(a+o),l&&(t.static_len+=s*(f[2*n+1]+o)));if(0!==m){do{for(a=p-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(n=t.bl_count[a];0!==n;)(i=t.heap[--r])>h||(u[2*i+1]!==a&&(t.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),n--)}}(t,e),Y(a,h,t.bl_count)}function $(t,e,r){var n,i,a=-1,o=e[1],s=0,u=7,h=4;for(0===o&&(u=138,h=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=e[2*(n+1)+1],++s>=7;n0?(t.strm.data_type===s&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return a;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(e=32;e=3&&0===t.bl_tree[2*T[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),u=t.opt_len+3+7>>>3,(h=t.static_len+3+7>>>3)<=u&&(u=h)):u=h=r+5,r+4<=u&&-1!==e?et(t,e,r,n):t.strategy===i||h===u?(Z(t,(f<<1)+(n?1:0),3),V(t,R,I)):(Z(t,(l<<1)+(n?1:0),3),function(t,e,r,n){var i;for(Z(t,e-257,5),Z(t,r-1,5),Z(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(B[r]+d+1)]++,t.dyn_dtree[2*N(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){Z(t,f<<1,3),H(t,b,R),function(t){16===t.bi_valid?(j(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},function(t,e,r){"use strict";var n=r(78),i=r(4),a=r(38),o=r(40),s=r(20),u=r(39),h=r(81),f=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==o.Z_OK)throw new Error(s[r]);if(this.header=new h,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=a.string2buf(e.dictionary):"[object ArrayBuffer]"===f.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==o.Z_OK))throw new Error(s[r])}function c(t,e){var r=new l(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}l.prototype.push=function(t,e){var r,s,u,h,l,c=this.strm,d=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=e===~~e?e:!0===e?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof t?c.input=a.binstring2buf(t):"[object ArrayBuffer]"===f.call(t)?c.input=new Uint8Array(t):c.input=t,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new i.Buf8(d),c.next_out=0,c.avail_out=d),(r=n.inflate(c,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===o.Z_BUF_ERROR&&!0===m&&(r=o.Z_OK,m=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),this.ended=!0,!1;c.next_out&&(0!==c.avail_out&&r!==o.Z_STREAM_END&&(0!==c.avail_in||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(u=a.utf8border(c.output,c.next_out),h=c.next_out-u,l=a.buf2string(c.output,u),c.next_out=h,c.avail_out=d-h,h&&i.arraySet(c.output,c.output,u,h,0),this.onData(l)):this.onData(i.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(m=!0)}while((c.avail_in>0||0===c.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),c.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=l,e.inflate=c,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,c(t,e)},e.ungzip=c},function(t,e,r){"use strict";var n=r(4),i=r(36),a=r(37),o=r(79),s=r(80),u=0,h=1,f=2,l=4,c=5,d=6,p=0,m=1,g=2,v=-2,y=-3,_=-4,w=-5,b=8,k=1,S=2,x=3,E=4,A=5,C=6,T=7,R=8,I=9,O=10,B=11,z=12,P=13,D=14,L=15,F=16,U=17,M=18,N=19,j=20,Z=21,H=22,W=23,Y=24,q=25,X=26,K=27,G=28,V=29,J=30,$=31,Q=32,tt=852,et=592,rt=15;function nt(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function it(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function at(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=k,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(tt),e.distcode=e.distdyn=new n.Buf32(et),e.sane=1,e.back=-1,p):v}function ot(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,at(t)):v}function st(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?v:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,ot(t))):v}function ut(t,e){var r,n;return t?(n=new it,t.state=n,n.window=null,(r=st(t,e))!==p&&(t.state=null),r):v}var ht,ft,lt=!0;function ct(t){if(lt){var e;for(ht=new n.Buf32(512),ft=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(h,t.lens,0,288,ht,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(f,t.lens,0,32,ft,0,t.work,{bits:5}),lt=!1}t.lencode=ht,t.lenbits=9,t.distcode=ft,t.distbits=5}function dt(t,e,r,i){var a,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(n.arraySet(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),n.arraySet(o.window,e,r-i,a,o.wnext),(i-=a)?(n.arraySet(o.window,e,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=a(r.check,Ct,2,0),st=0,ut=0,r.mode=S;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&st)<<8)+(st>>8))%31){t.msg="incorrect header check",r.mode=J;break}if((15&st)!==b){t.msg="unknown compression method",r.mode=J;break}if(ut-=4,kt=8+(15&(st>>>=4)),0===r.wbits)r.wbits=kt;else if(kt>r.wbits){t.msg="invalid window size",r.mode=J;break}r.dmax=1<>8&1),512&r.flags&&(Ct[0]=255&st,Ct[1]=st>>>8&255,r.check=a(r.check,Ct,2,0)),st=0,ut=0,r.mode=x;case x:for(;ut<32;){if(0===at)break t;at--,st+=tt[rt++]<>>8&255,Ct[2]=st>>>16&255,Ct[3]=st>>>24&255,r.check=a(r.check,Ct,4,0)),st=0,ut=0,r.mode=E;case E:for(;ut<16;){if(0===at)break t;at--,st+=tt[rt++]<>8),512&r.flags&&(Ct[0]=255&st,Ct[1]=st>>>8&255,r.check=a(r.check,Ct,2,0)),st=0,ut=0,r.mode=A;case A:if(1024&r.flags){for(;ut<16;){if(0===at)break t;at--,st+=tt[rt++]<>>8&255,r.check=a(r.check,Ct,2,0)),st=0,ut=0}else r.head&&(r.head.extra=null);r.mode=C;case C:if(1024&r.flags&&((lt=r.length)>at&&(lt=at),lt&&(r.head&&(kt=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,tt,rt,lt,kt)),512&r.flags&&(r.check=a(r.check,tt,lt,rt)),at-=lt,rt+=lt,r.length-=lt),r.length))break t;r.length=0,r.mode=T;case T:if(2048&r.flags){if(0===at)break t;lt=0;do{kt=tt[rt+lt++],r.head&&kt&&r.length<65536&&(r.head.name+=String.fromCharCode(kt))}while(kt&<>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=z;break;case O:for(;ut<32;){if(0===at)break t;at--,st+=tt[rt++]<>>=7&ut,ut-=7&ut,r.mode=K;break}for(;ut<3;){if(0===at)break t;at--,st+=tt[rt++]<>>=1)){case 0:r.mode=D;break;case 1:if(ct(r),r.mode=j,e===d){st>>>=2,ut-=2;break t}break;case 2:r.mode=U;break;case 3:t.msg="invalid block type",r.mode=J}st>>>=2,ut-=2;break;case D:for(st>>>=7&ut,ut-=7&ut;ut<32;){if(0===at)break t;at--,st+=tt[rt++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=J;break}if(r.length=65535&st,st=0,ut=0,r.mode=L,e===d)break t;case L:r.mode=F;case F:if(lt=r.length){if(lt>at&&(lt=at),lt>ot&&(lt=ot),0===lt)break t;n.arraySet(et,tt,rt,lt,it),at-=lt,rt+=lt,ot-=lt,it+=lt,r.length-=lt;break}r.mode=z;break;case U:for(;ut<14;){if(0===at)break t;at--,st+=tt[rt++]<>>=5,ut-=5,r.ndist=1+(31&st),st>>>=5,ut-=5,r.ncode=4+(15&st),st>>>=4,ut-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=J;break}r.have=0,r.mode=M;case M:for(;r.have>>=3,ut-=3}for(;r.have<19;)r.lens[Tt[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,xt={bits:r.lenbits},St=s(u,r.lens,0,19,r.lencode,0,r.work,xt),r.lenbits=xt.bits,St){t.msg="invalid code lengths set",r.mode=J;break}r.have=0,r.mode=N;case N:for(;r.have>>16&255,yt=65535&At,!((gt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[rt++]<>>=gt,ut-=gt,r.lens[r.have++]=yt;else{if(16===yt){for(Et=gt+2;ut>>=gt,ut-=gt,0===r.have){t.msg="invalid bit length repeat",r.mode=J;break}kt=r.lens[r.have-1],lt=3+(3&st),st>>>=2,ut-=2}else if(17===yt){for(Et=gt+3;ut>>=gt)),st>>>=3,ut-=3}else{for(Et=gt+7;ut>>=gt)),st>>>=7,ut-=7}if(r.have+lt>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=J;break}for(;lt--;)r.lens[r.have++]=kt}}if(r.mode===J)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=J;break}if(r.lenbits=9,xt={bits:r.lenbits},St=s(h,r.lens,0,r.nlen,r.lencode,0,r.work,xt),r.lenbits=xt.bits,St){t.msg="invalid literal/lengths set",r.mode=J;break}if(r.distbits=6,r.distcode=r.distdyn,xt={bits:r.distbits},St=s(f,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,xt),r.distbits=xt.bits,St){t.msg="invalid distances set",r.mode=J;break}if(r.mode=j,e===d)break t;case j:r.mode=Z;case Z:if(at>=6&&ot>=258){t.next_out=it,t.avail_out=ot,t.next_in=rt,t.avail_in=at,r.hold=st,r.bits=ut,o(t,ft),it=t.next_out,et=t.output,ot=t.avail_out,rt=t.next_in,tt=t.input,at=t.avail_in,st=r.hold,ut=r.bits,r.mode===z&&(r.back=-1);break}for(r.back=0;vt=(At=r.lencode[st&(1<>>16&255,yt=65535&At,!((gt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[rt++]<>_t)])>>>16&255,yt=65535&At,!(_t+(gt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[rt++]<>>=_t,ut-=_t,r.back+=_t}if(st>>>=gt,ut-=gt,r.back+=gt,r.length=yt,0===vt){r.mode=X;break}if(32&vt){r.back=-1,r.mode=z;break}if(64&vt){t.msg="invalid literal/length code",r.mode=J;break}r.extra=15&vt,r.mode=H;case H:if(r.extra){for(Et=r.extra;ut>>=r.extra,ut-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=W;case W:for(;vt=(At=r.distcode[st&(1<>>16&255,yt=65535&At,!((gt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[rt++]<>_t)])>>>16&255,yt=65535&At,!(_t+(gt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[rt++]<>>=_t,ut-=_t,r.back+=_t}if(st>>>=gt,ut-=gt,r.back+=gt,64&vt){t.msg="invalid distance code",r.mode=J;break}r.offset=yt,r.extra=15&vt,r.mode=Y;case Y:if(r.extra){for(Et=r.extra;ut>>=r.extra,ut-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=J;break}r.mode=q;case q:if(0===ot)break t;if(lt=ft-ot,r.offset>lt){if((lt=r.offset-lt)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=J;break}lt>r.wnext?(lt-=r.wnext,pt=r.wsize-lt):pt=r.wnext-lt,lt>r.length&&(lt=r.length),mt=r.window}else mt=et,pt=it-r.offset,lt=r.length;lt>ot&&(lt=ot),ot-=lt,r.length-=lt;do{et[it++]=mt[pt++]}while(--lt);0===r.length&&(r.mode=Z);break;case X:if(0===ot)break t;et[it++]=r.length,ot--,r.mode=Z;break;case K:if(r.wrap){for(;ut<32;){if(0===at)break t;at--,st|=tt[rt++]<>>=w=_>>>24,p-=w,0===(w=_>>>16&255))A[a++]=65535&_;else{if(!(16&w)){if(0==(64&w)){_=m[(65535&_)+(d&(1<>>=w,p-=w),p<15&&(d+=E[n++]<>>=w=_>>>24,p-=w,!(16&(w=_>>>16&255))){if(0==(64&w)){_=g[(65535&_)+(d&(1<u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,k>(w=a-o)){if((w=k-w)>f&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(S=0,x=c,0===l){if(S+=h-w,w2;)A[a++]=x[S++],A[a++]=x[S++],A[a++]=x[S++],b-=3;b&&(A[a++]=x[S++],b>1&&(A[a++]=x[S++]))}else{S=a-k;do{A[a++]=A[S++],A[a++]=A[S++],A[a++]=A[S++],b-=3}while(b>2);b&&(A[a++]=A[S++],b>1&&(A[a++]=A[S++]))}break}}break}}while(n>3,d&=(1<<(p-=b<<3))-1,t.next_in=n,t.next_out=a,t.avail_in=n=1&&0===D[A];A--);if(C>A&&(C=A),0===A)return h[f++]=20971520,h[f++]=20971520,c.bits=1,0;for(E=1;E0&&(0===t||1!==A))return-1;for(L[1]=0,S=1;S<15;S++)L[S+1]=L[S]+D[S];for(x=0;x852||2===t&&O>592)return 1;for(;;){_=S-R,l[x]y?(w=F[U+l[x]],b=z[P+l[x]]):(w=96,b=0),d=1<>R)+(p-=d)]=_<<24|w<<16|b|0}while(0!==p);for(d=1<>=1;if(0!==d?(B&=d-1,B+=d):B=0,x++,0==--D[S]){if(S===A)break;S=e[r+l[x]]}if(S>C&&(B&g)!==m){for(0===R&&(R=C),v+=E,I=1<<(T=S-R);T+R852||2===t&&O>592)return 1;h[m=B&g]=C<<24|T<<16|v-f|0}}return 0!==B&&(h[v+B]=S-R<<24|64<<16|0),c.bits=C,0}},function(t,e,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(t,e,r){"use strict";var n=r(0),i=r(1),a=r(6),o=r(19),s=r(41),u=function(t,e){var r,n="";for(r=0;r>>=8;return n},h=function(t,e,r,i,h,f){var l,c,d=t.file,p=t.compression,m=f!==a.utf8encode,g=n.transformTo("string",f(d.name)),v=n.transformTo("string",a.utf8encode(d.name)),y=d.comment,_=n.transformTo("string",f(y)),w=n.transformTo("string",a.utf8encode(y)),b=v.length!==d.name.length,k=w.length!==y.length,S="",x="",E="",A=d.dir,C=d.date,T={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(T.crc32=t.crc32,T.compressedSize=t.compressedSize,T.uncompressedSize=t.uncompressedSize);var R=0;e&&(R|=8),m||!b&&!k||(R|=2048);var I,O,B,z=0,P=0;A&&(z|=16),"UNIX"===h?(P=798,z|=(I=d.unixPermissions,O=A,B=I,I||(B=O?16893:33204),(65535&B)<<16)):(P=20,z|=63&(d.dosPermissions||0)),l=C.getUTCHours(),l<<=6,l|=C.getUTCMinutes(),l<<=5,l|=C.getUTCSeconds()/2,c=C.getUTCFullYear()-1980,c<<=4,c|=C.getUTCMonth()+1,c<<=5,c|=C.getUTCDate(),b&&(x=u(1,1)+u(o(g),4)+v,S+="up"+u(x.length,2)+x),k&&(E=u(1,1)+u(o(_),4)+w,S+="uc"+u(E.length,2)+E);var D="";return D+="\n\0",D+=u(R,2),D+=p.magic,D+=u(l,2),D+=u(c,2),D+=u(T.crc32,4),D+=u(T.compressedSize,4),D+=u(T.uncompressedSize,4),D+=u(g.length,2),D+=u(S.length,2),{fileRecord:s.LOCAL_FILE_HEADER+D+g+S,dirRecord:s.CENTRAL_FILE_HEADER+u(P,2)+D+u(_.length,2)+"\0\0\0\0"+u(z,4)+u(i,4)+g+S+_}},f=function(t){return s.DATA_DESCRIPTOR+u(t.crc32,4)+u(t.compressedSize,4)+u(t.uncompressedSize,4)};function l(t,e,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(l,i),l.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,i.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},l.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=h(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=h(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:f(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t0)this.isSignature(e,a.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){this.reader=n(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=u},function(t,e,r){"use strict";var n=r(44);function i(t){n.call(this,t)}r(0).inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=i},function(t,e,r){"use strict";var n=r(45);function i(t){n.call(this,t)}r(0).inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=i},function(t,e,r){"use strict";var n=r(42),i=r(0),a=r(18),o=r(19),s=r(6),u=r(35),h=r(3);function f(t,e){this.options=t,this.loadOptions=e}f.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in u)if(u.hasOwnProperty(e)&&u[e].magic===t)return u[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===t&&(this.dosPermissions=63&this.externalFileAttributes),3===t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index{const e=this.canvasImage.width/this.imageElement.width,r=this.canvasImage.height/this.imageElement.height,n=Math.floor(t.offsetX/e),i=Math.floor(t.offsetY/r);console.log("CLICK X:"+n+" Y:"+i),this.animationData.originX=n,this.animationData.originY=i,this.canvasData.widthRatio=e,this.canvasData.heightRatio=r,this.orginInfo.innerText="Origin X: "+this.animationData.originX+" Y: "+this.animationData.originY},this.animationData=t,this.canvasData=e,this.canvasImage=r,this.imageElement=n,this.orginInfo=i,this.ResizeCanvas(),this.UpdateCanvasDataSize();const a=this.canvasImage.getContext("2d");a.fillRect(0,0,this.targetImageSize,this.targetImageSize),a.imageSmoothingEnabled=!1,this.canvasImage.addEventListener("click",this.mouseDown)}ResizeCanvas(){const t=this.imageElement.height/this.imageElement.width,e=this.targetImageSize/t,r=this.targetImageSize;console.log("hwratio = "+t),this.canvasImage.width=e,this.canvasImage.height=r,this.UpdateCanvasDataSize()}UpdateCanvasDataSize(){this.canvasData.width=this.canvasImage.width,this.canvasData.height=this.canvasImage.height}}},function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});class i{}e.FileHandler=i,i.ProcessImages=t=>new Promise((e,r)=>n(void 0,void 0,void 0,(function*(){const r=[];for(let e=0;enew Promise((e,r)=>{const n=new FileReader;n.onload=t=>{e(t.target.result)},n.onerror=r,n.readAsDataURL(t)})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.FrameHandler=class{constructor(t,e,r,n,i,a){this.start=0,this.filenames=[],this.currentFrame=0,this.windowAnimationUpdate=t=>{0===this.start&&(this.start=t);const e=t-this.start;this.playingAnimation&&e>1e3/this.animationData.frameRate&&(this.AdvanceFrames(1),this.start=0),this.RefreshImage(),window.requestAnimationFrame(this.windowAnimationUpdate)},this.animationData=t,this.canvasData=e,this.htmlCanvasElement=r,this.canvasContext=n,this.frameNumberDiv=i,window.requestAnimationFrame(this.windowAnimationUpdate),this.imageElement=a}GetCurrentFrame(){return this.currentFrame}loadFrames(t){this.filenames=t,this.currentFrame=0,this.RefreshImage()}AdvanceFrames(t){this.currentFrame+=t,this.currentFrame%=this.filenames.length,this.currentFrame<0&&(this.currentFrame=this.filenames.length-1),this.GoToFrame(this.currentFrame)}GoToFrame(t){this.currentFrame=t,this.RefreshImage()}TogglePlayingAnimation(){this.playingAnimation=!this.playingAnimation,console.log("playingAnimation = ",this.playingAnimation)}StopPlayingAnimation(){this.playingAnimation=!1}GetFilenames(){return this.filenames}RefreshImage(){if(0===this.filenames.length)this.frameNumberDiv.className="warning",this.frameNumberDiv.innerText="No images uploaded yet";else{this.canvasContext.clearRect(0,0,this.htmlCanvasElement.width,this.htmlCanvasElement.height),this.canvasContext.imageSmoothingEnabled=!1,this.imageElement.src=this.filenames[this.currentFrame],this.canvasContext.drawImage(this.imageElement,0,0,this.htmlCanvasElement.width,this.htmlCanvasElement.height);const t=500,e=this.animationData.originX*this.canvasData.widthRatio,r=this.animationData.originY*this.canvasData.heightRatio;this.canvasContext.beginPath(),this.canvasContext.moveTo(e,r-t),this.canvasContext.lineTo(e,r+t),this.canvasContext.moveTo(e-t,r),this.canvasContext.lineTo(e+t,r),this.canvasContext.stroke(),this.frameNumberDiv.className="instruction",this.frameNumberDiv.innerText="Frame "+(this.currentFrame+1).toString()+" / "+this.filenames.length.toString()}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.PinHandler=class{constructor(t,e){this.pins=1,this.addPinButton=t,this.pinSettingsDiv=e,this.UpdatePinSettingsDiv(),this.addPinButton.addEventListener("click",this.AddPinButtonPressed)}UpdatePinSettingsDiv(){let t="";for(let e=0;e';this.pinSettingsDiv.innerHTML=t}AddPinButtonPressed(){this.pins+=1,this.UpdatePinSettingsDiv()}}}]);
\ No newline at end of file
diff --git a/dist/index.html b/dist/index.html
index e65f05f..4e5a625 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -22,7 +22,10 @@
-
+
Name:
Click image to set Origin
diff --git a/help b/help
new file mode 100644
index 0000000..7538cec
--- /dev/null
+++ b/help
@@ -0,0 +1 @@
+pnpm run start:dev
\ No newline at end of file
diff --git a/pnpm-debug.log b/pnpm-debug.log
new file mode 100644
index 0000000..dd9b102
--- /dev/null
+++ b/pnpm-debug.log
@@ -0,0 +1,22 @@
+{
+ "0 debug pnpm:scope": {
+ "selected": 1,
+ "workspacePrefix": null
+ },
+ "1 error pnpm": {
+ "message": {
+ "errno": 1,
+ "code": "ELIFECYCLE",
+ "pkgid": "animationtool@1.0.0",
+ "stage": "start:dev",
+ "script": "webpack-dev-server --config webpack/dev.config.js",
+ "pkgname": "animationtool"
+ },
+ "err": {
+ "name": "Error",
+ "message": "animationtool@1.0.0 start:dev: `webpack-dev-server --config webpack/dev.config.js`\nExit status 1",
+ "code": "ELIFECYCLE",
+ "stack": "Error: animationtool@1.0.0 start:dev: `webpack-dev-server --config webpack/dev.config.js`\nExit status 1\n at EventEmitter.proc.on (C:\\Users\\tekno\\AppData\\Roaming\\npm\\node_modules\\pnpm\\lib\\node_modules\\@zkochan\\npm-lifecycle\\index.js:302:16)\n at EventEmitter.emit (events.js:198:13)\n at ChildProcess.
(C:\\Users\\tekno\\AppData\\Roaming\\npm\\node_modules\\pnpm\\lib\\node_modules\\@zkochan\\npm-lifecycle\\lib\\spawn.js:55:14)\n at ChildProcess.emit (events.js:198:13)\n at maybeClose (internal/child_process.js:982:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)"
+ }
+ }
+}
\ No newline at end of file