UNPKG

blk-server

Version:
77 lines 122 kB
(function(){var h=void 0,k=!0,n=null,q=!1;function aa(){return function(){}}function ba(a){return function(b){this[a]=b}}function r(a){return function(){return this[a]}}function ca(a){return function(){return a}}var s,u=this;function da(a,b){var c=a.split("."),d=u;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&ea(b)?d[e]=b:d=d[e]?d[e]:d[e]={}}function ga(a){a=a.split(".");for(var b=u,c;c=a.shift();)if(b[c]!=n)b=b[c];else return n;return b}function w(){} function ha(a){return a} function ia(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"== b&&"undefined"==typeof a.call)return"object";return b}function ea(a){return a!==h}function ja(a){var b=ia(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ka(a){return"string"==typeof a}function la(a){return a[ma]||(a[ma]=++na)}var ma="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),na=0;function oa(a,b,c){return a.call.apply(a.bind,arguments)} function qa(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function x(a,b,c){x=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?oa:qa;return x.apply(n,arguments)}var ra=Date.now||function(){return+new Date}; function y(a,b){function c(){}c.prototype=b.prototype;a.c=b.prototype;a.prototype=new c;a.prototype.constructor=a};function sa(a,b){this.attributes=[new ta(3,0),new ta(2,24)];this.Kl=a;this.Ul=b}function ta(a,b){this.size=a;this.type=5126;this.dm=q;this.im=32;this.offset=b};function ua(){};function va(a){this.length=a.length||a;for(var b=0;b<this.length;b++)this[b]=a[b]||0}va.prototype.BYTES_PER_ELEMENT=4;va.prototype.set=function(a,b){b=b||0;for(var c=0;c<a.length&&b+c<this.length;c++)this[b+c]=a[c]};va.prototype.toString=Array.prototype.join;"undefined"==typeof Float32Array&&(va.BYTES_PER_ELEMENT=4,va.prototype.BYTES_PER_ELEMENT=va.prototype.BYTES_PER_ELEMENT,va.prototype.set=va.prototype.set,va.prototype.toString=va.prototype.toString,da("Float32Array",va));function wa(a){this.length=a.length||a;for(var b=0;b<this.length;b++)this[b]=a[b]||0}wa.prototype.BYTES_PER_ELEMENT=8;wa.prototype.set=function(a,b){b=b||0;for(var c=0;c<a.length&&b+c<this.length;c++)this[b+c]=a[c]};wa.prototype.toString=Array.prototype.join;if("undefined"==typeof Float64Array){try{wa.BYTES_PER_ELEMENT=8}catch(xa){}wa.prototype.BYTES_PER_ELEMENT=wa.prototype.BYTES_PER_ELEMENT;wa.prototype.set=wa.prototype.set;wa.prototype.toString=wa.prototype.toString;da("Float64Array",wa)};function z(){return new Float32Array(3)}function ya(a,b,c){var d=z();A(d,a,b,c);return d}function A(a,b,c,d){a[0]=b;a[1]=c;a[2]=d}function za(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2]}function Aa(a,b,c){c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2]}function Ba(a,b,c){c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b}function Ca(a){var b=a[0],c=a[1];a=a[2];return Math.sqrt(b*b+c*c+a*a)}function Da(a,b){var c=a[0]-b[0],d=a[1]-b[1],e=a[2]-b[2];return c*c+d*d+e*e} function Ea(a,b,c){var d=b[0]-a[0],e=b[1]-a[1];a=b[2]-a[2];(b=Math.sqrt(d*d+e*e+a*a))?(b=1/b,c[0]=d*b,c[1]=e*b,c[2]=a*b):c[0]=c[1]=c[2]=0}function Fa(a,b){return a.length==b.length&&a[0]==b[0]&&a[1]==b[1]&&a[2]==b[2]};function Ga(){var a=z(),b=z();this.min=a;this.max=b}function Pa(a,b,c,d,e,f){var g=new Ga;g.min[0]=a<d?a:d;g.min[1]=b<e?b:e;g.min[2]=c<f?c:f;g.max[0]=a<d?d:a;g.max[1]=b<e?e:b;g.max[2]=c<f?f:c;return g} function Qa(a,b,c){var d=a.min;a=a.max;var e=Ra[0];e[0]=Math.abs(b[3]);e[1]=Math.abs(b[4]);e[2]=Math.abs(b[5]);var f=0,g=1,j=2;e[0]<e[2]&&(f=2,j=0);e[1]<e[j]?(g=j,j=1):e[1]>e[f]&&(g=f,f=1);var i=0,l=Number.MAX_VALUE,m=b[3+f],p=(d[f]-b[f])/m,f=(a[f]-b[f])/m;p>f&&(m=p,p=f,f=m);if(!(p>l||f<i)){p>i&&(i=p);f<l&&(l=f);if(1E-6>e[g]){if(b[g]<d[g]||b[g]>a[g]||b[j]<d[j]||b[j]>a[j])return}else{m=b[3+g];p=(d[g]-b[g])/m;f=(a[g]-b[g])/m;p>f&&(m=p,p=f,f=m);if(p>l||f<i)return;p>i&&(i=p);f<l&&(l=f);if(1E-6>e[j]){if(b[j]< d[j]||b[j]>a[j])return}else{m=b[3+j];p=(d[j]-b[j])/m;f=(a[j]-b[j])/m;p>f&&(m=p,p=f,f=m);if(p>l||f<i)return;p>i&&(i=p)}}c&&(c[0]=b[0]+b[3]*i,c[1]=b[1]+b[4]*i,c[2]=b[2]+b[5]*i)}}var Ra=[z(),z(),z()];function B(){return new Float32Array(4)}function Sa(a,b,c,d){var e=B();Ta(e,a,b,c,d);return e}function Ta(a,b,c,d,e){a[0]=b;a[1]=c;a[2]=d;a[3]=e}function Ua(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3]}function Va(a,b){var c=1/256;b[0]=a[0]*c;b[1]=a[1]*c;b[2]=a[2]*c;b[3]=a[3]*c};function Wa(){var a=new Float32Array(16);a[0]=a[5]=a[10]=a[15]=1;return a}function Xa(a,b,c,d,e,f,g,j,i){a[0]=b;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=c;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=d;a[11]=e;a[12]=f;a[13]=g;a[14]=j;a[15]=i} function Ya(a,b,c){var d=a[0],e=a[1],f=a[2],g=a[3],j=a[4],i=a[5],l=a[6],m=a[7],p=a[8],t=a[9],v=a[10],F=a[11],I=a[12],G=a[13],J=a[14];a=a[15];var M=b[0],fa=b[1],W=b[2],pa=b[3],Ha=b[4],Ia=b[5],Ja=b[6],Ka=b[7],La=b[8],Ma=b[9],Na=b[10],Oa=b[11],K=b[12],sd=b[13],td=b[14];b=b[15];c[0]=d*M+j*fa+p*W+I*pa;c[1]=e*M+i*fa+t*W+G*pa;c[2]=f*M+l*fa+v*W+J*pa;c[3]=g*M+m*fa+F*W+a*pa;c[4]=d*Ha+j*Ia+p*Ja+I*Ka;c[5]=e*Ha+i*Ia+t*Ja+G*Ka;c[6]=f*Ha+l*Ia+v*Ja+J*Ka;c[7]=g*Ha+m*Ia+F*Ja+a*Ka;c[8]=d*La+j*Ma+p*Na+I*Oa;c[9]=e*La+ i*Ma+t*Na+G*Oa;c[10]=f*La+l*Ma+v*Na+J*Oa;c[11]=g*La+m*Ma+F*Na+a*Oa;c[12]=d*K+j*sd+p*td+I*b;c[13]=e*K+i*sd+t*td+G*b;c[14]=f*K+l*sd+v*td+J*b;c[15]=g*K+m*sd+F*td+a*b} function Za(a,b){var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],j=a[5],i=a[6],l=a[7],m=a[8],p=a[9],t=a[10],v=a[11],F=a[12],I=a[13],G=a[14],J=a[15],M=c*j-d*g,fa=c*i-e*g,W=c*l-f*g,pa=d*i-e*j,Ha=d*l-f*j,Ia=e*l-f*i,Ja=m*I-p*F,Ka=m*G-t*F,La=m*J-v*F,Ma=p*G-t*I,Na=p*J-v*I,Oa=t*J-v*G,K=M*Oa-fa*Na+W*Ma+pa*La-Ha*Ka+Ia*Ja;0!=K&&(K=1/K,b[0]=(j*Oa-i*Na+l*Ma)*K,b[1]=(-d*Oa+e*Na-f*Ma)*K,b[2]=(I*Ia-G*Ha+J*pa)*K,b[3]=(-p*Ia+t*Ha-v*pa)*K,b[4]=(-g*Oa+i*La-l*Ka)*K,b[5]=(c*Oa-e*La+f*Ka)*K,b[6]=(-F*Ia+G*W-J*fa)*K,b[7]=(m*Ia-t* W+v*fa)*K,b[8]=(g*Na-j*La+l*Ja)*K,b[9]=(-c*Na+d*La-f*Ja)*K,b[10]=(F*Ha-I*W+J*M)*K,b[11]=(-m*Ha+p*W-v*M)*K,b[12]=(-g*Ma+j*Ka-i*Ja)*K,b[13]=(c*Ma-d*Ka+e*Ja)*K,b[14]=(-F*pa+I*fa-G*M)*K,b[15]=(m*pa-p*fa+t*M)*K)}function $a(a,b,c){var d=b[0],e=b[1];b=b[2];var f=1/(d*a[3]+e*a[7]+b*a[11]+a[15]);c[0]=(d*a[0]+e*a[4]+b*a[8]+a[12])*f;c[1]=(d*a[1]+e*a[5]+b*a[9]+a[13])*f;c[2]=(d*a[2]+e*a[6]+b*a[10]+a[14])*f}new Float64Array(3);new Float64Array(3);new Float64Array(4);new Float64Array(4);new Float64Array(4);new Float64Array(16);function ab(){this.name=n;this.index=0;this.parent=n;this.children=[];this.transform=Wa();this.Qa=new Ga;this.xd=B()};function bb(a){this.Ph=a;a=a.vd;this.hj=new Float32Array(16*a.length);this.Gl=new Float32Array(16*a.length);this.rl=k;this.reset()}bb.prototype.reset=function(){this.rl=k;for(var a=this.Ph.vd,b=0,c=0;b<a.length;b++,c+=16)for(var d=a[b],e=0;16>e;e++)this.hj[c+e]=d.transform[e]};function C(){0!=cb&&(this.Sl=Error().stack,db[la(this)]=this)}var cb=0,db={};C.prototype.rf=q;C.prototype.qf=function(){if(!this.rf&&(this.rf=k,this.d(),0!=cb)){var a=la(this);delete db[a]}};function D(a,b){a.Ld||(a.Ld=[]);a.Ld.push(b)}C.prototype.d=function(){this.Ld&&eb.apply(n,this.Ld);if(this.Wh)for(;this.Wh.length;)this.Wh.shift()()};function fb(a){a&&"function"==typeof a.qf&&a.qf()}function eb(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];ja(d)?eb.apply(n,d):fb(d)}};function gb(a){Error.captureStackTrace?Error.captureStackTrace(this,gb):this.stack=Error().stack||"";a&&(this.message=String(a))}y(gb,Error);gb.prototype.name="CustomError";function hb(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function ib(a){if(!jb.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(kb,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(lb,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(mb,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(nb,"&quot;"));return a}var kb=/&/g,lb=/</g,mb=/>/g,nb=/\"/g,jb=/[&<>\"]/;function ob(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^ra()).toString(36)}Math.random();function pb(a){C.call(this);this.id=a;this.Qa=new Ga;this.xd=B();this.Hj=n;this.Kk=[];this.vd=[];this.Nl={}}y(pb,C);pb.prototype.rj=function(){return new bb(this)};function qb(){this.yk=new ua;this.primitiveType=4;this.Vl=this.vj=0};function rb(){var a=new pb("pumpkin"),b=a.Qa,c=[-0.5,-1,0,0.5,1,0.5],d=b.min,b=b.max;if(c.length){var e=0;A(d,c[e],c[e+1],c[e+2]);A(b,c[e],c[e+1],c[e+2]);e++;for(var f=1;f<c.length/3;f++,e++)c[e]<d[0]?d[0]=c[e]:c[e]>b[0]&&(b[0]=c[e]),c[e+1]<d[1]?d[1]=c[e+1]:c[e+1]>b[1]&&(b[1]=c[e+1]),c[e+2]<d[2]?d[2]=c[e+2]:c[e+2]>b[2]&&(b[2]=c[e+2])}else A(d,0,0,0),A(b,0,0,0);Ta(a.xd,0,0,0,1);c=Sa(96,112,112,128);d=Sa(112,112,128,128);b=Sa(96,96,112,112);Va(c,c);Va(d,d);Va(b,b);c=new Float32Array([-0.5,-1,0.5,0, 0,1,c[2],c[3],0.5,-1,0.5,0,0,1,c[0],c[3],0.5,1,0.5,0,0,1,c[0],c[1],-0.5,1,0.5,0,0,1,c[2],c[1],-0.5,-1,-0.5,0,0,-1,d[0],d[3],-0.5,1,-0.5,0,0,-1,d[0],d[1],0.5,1,-0.5,0,0,-1,d[2],d[1],0.5,-1,-0.5,0,0,-1,d[2],d[3],-0.5,1,-0.5,0,1,0,b[2],b[1],-0.5,1,0.5,0,1,0,b[2],b[3],0.5,1,0.5,0,1,0,b[0],b[3],0.5,1,-0.5,0,1,0,b[0],b[1],-0.5,-1,-0.5,0,-1,0,c[0],c[1],0.5,-1,-0.5,0,-1,0,c[2],c[1],0.5,-1,0.5,0,-1,0,c[2],c[3],-0.5,-1,0.5,0,-1,0,c[0],c[3],0.5,-1,-0.5,1,0,0,c[0],c[3],0.5,1,-0.5,1,0,0,c[0],c[1],0.5,1,0.5,1, 0,0,c[2],c[1],0.5,-1,0.5,1,0,0,c[2],c[3],-0.5,-1,-0.5,-1,0,0,c[2],c[3],-0.5,-1,0.5,-1,0,0,c[0],c[3],-0.5,1,0.5,-1,0,0,c[0],c[1],-0.5,1,-0.5,-1,0,0,c[2],c[1]]);d=new Uint16Array(36);for(f=e=b=0;6>b;b++,e+=6,f+=4)d[e+0]=0+f,d[e+1]=1+f,d[e+2]=2+f,d[e+3]=0+f,d[e+4]=2+f,d[e+5]=3+f;a.Hj=new sa(c.buffer,d);c=new qb;a.Kk.push(c);c.primitiveType=4;c.vj=36;c=new ab;c.index=a.vd.length;c.name=n;c.parent=n;a.vd.push(c);d=c.Qa;b=a.Qa;za(d.min,b.min);za(d.max,b.max);Ua(c.xd,a.xd);return a};var sb=Array.prototype,tb=sb.indexOf?function(a,b,c){return sb.indexOf.call(a,b,c)}:function(a,b,c){c=c==n?0:0>c?Math.max(0,a.length+c):c;if(ka(a))return!ka(b)||1!=b.length?-1:a.indexOf(b,c);for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},ub=sb.forEach?function(a,b,c){sb.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=ka(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},vb=sb.filter?function(a,b,c){return sb.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f= 0,g=ka(a)?a.split(""):a,j=0;j<d;j++)if(j in g){var i=g[j];b.call(c,i,j,a)&&(e[f++]=i)}return e},wb=sb.map?function(a,b,c){return sb.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=ka(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},xb=sb.some?function(a,b,c){return sb.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=ka(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return k;return q}; function yb(a){if("array"!=ia(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function zb(a,b){var c=tb(a,b),d;(d=0<=c)&&sb.splice.call(a,c,1);return d}function Ab(a){return sb.concat.apply(sb,arguments)}function Bb(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}function Cb(a,b){sb.sort.call(a,b||Db)}function Db(a,b){return a>b?1:a<b?-1:0};var Eb=u.postMessage?[u]:[];function E(a){for(var b=0;b<Eb.length;b++){for(var c=Array(arguments.length),d=0;d<c.length;d++)c[d]=arguments[d];try{Eb[b].postMessage({type:"gf_log",args:c},n)}catch(e){}}}if(u.console)var Fb=u.console,E=x(Fb.log,Fb);function Gb(){C.call(this);this.Yc={}}y(Gb,C);Gb.prototype.d=function(){for(var a in this.Yc)fb(this.Yc[a]);this.Yc={};Gb.c.d.call(this)};Gb.prototype.update=aa();function Hb(a){Gb.call(this);this.zc=a;this.Rh={}}y(Hb,Gb);function Ib(a){Hb.call(this,a);this.Rh.pumpkin={id:"pumpkin",qj:rb}}y(Ib,Hb);function Jb(){this.uh="improved";this.re=0};function Kb(){this.p=Array(256)}function Lb(a,b){a.p[b.id]=b};function Mb(a,b,c,d,e,f,g){this.Dc=a;this.Qg=b;this.Rg=c;this.Sg=d;this.X=e;this.sf=f;this.$h=g};function Nb(a,b,c,d){this.map=a;this.x=b;this.y=c;this.l=d;this.Qa=Pa(b,c,d,b+16,c+128,d+16);this.state=Ob;this.Qb=k;this.version=this.Ea=0;this.X=new Uint16Array(32768);this.fm=this.kb=n}var Ob=0;Nb.prototype.fill=function(a){for(var b=0;32768>b;b++)this.X[b]=a[b];this.Qb=k;this.state=2;this.map.de(this);this.map.Re(this)};Nb.prototype.ja=function(a,b,c,d){b=(a&15)+16*(c&15)+256*(b&127);a=this.X[b];this.X[b]=d;a!=d&&!this.Qb&&(d=this.Qb,this.Qb=k,this.kb=n,d||this.map.Re(this));return a}; Nb.prototype.Gf=function(a){var b=Pb[0];Qa(this.Qa,a,b);var c=Math.floor(b[0]),d=Math.floor(b[1]),e=Math.floor(b[2]),f=0==a[3]?0:0>a[3]?-1:1,g=0==a[4]?0:0>a[4]?-1:1,j=0==a[5]?0:0>a[5]?-1:1,i=(c+(0<f?1:0)-b[0])/a[3],l=(d+(0<g?1:0)-b[1])/a[4],m=(e+(0<j?1:0)-b[2])/a[5];isNaN(i)&&(i=Number.POSITIVE_INFINITY);isNaN(l)&&(l=Number.POSITIVE_INFINITY);isNaN(m)&&(m=Number.POSITIVE_INFINITY);var p=f/a[3],t=g/a[4],v=j/a[5];isNaN(p)&&(p=Number.POSITIVE_INFINITY);isNaN(t)&&(t=Number.POSITIVE_INFINITY);isNaN(v)&& (v=Number.POSITIVE_INFINITY);for(var F=this.X,I=b=0;256>I;I++){var G=c-this.x,J=d-this.y,M=e-this.l;if(0<=G&&(16>G&&0<=J&&128>J&&0<=M&&16>M)&&(b=F[G+16*M+256*J],b>>8))break;i<l&&i<m?(i+=p,c+=f):l<m?(l+=t,d+=g):(m+=v,e+=j)}return b?(f=Qb,g=c+1,j=d+1,i=e+1,A(f.min,c,d,e),A(f.max,g,j,i),f=z(),Qa(Qb,a,f),new Mb(this,c,d,e,b,Math.sqrt(Da(a,f)),f)):n};var Pb=[z(),z()],Qb=new Ga;function Rb(){C.call(this);this.ma={};this.Ib=[];this.Be=this.Li=0}y(Rb,C);s=Rb.prototype;s.d=function(){this.Ib.length=0;Rb.c.d.call(this)};s.update=function(){for(;this.Ib.length;){var a=this.Ib.shift();Sb(this,a)}};s.get=function(a,b,c){return 0!=b>>7?n:this.ma[(a>>4&65535)<<16|c>>4&65535]||n};s.add=function(a){this.ma[(a.x>>4&65535)<<16|a.l>>4&65535]=a;0<a.Ea||this.Ib.push(a);this.Li++;this.Be+=65792};s.remove=function(a){Sb(this,a);0<a.Ea||zb(this.Ib,a)}; function Sb(a,b){delete a.ma[(b.x>>4&65535)<<16|b.l>>4&65535];a.Be-=65792;a.Li--}s.be=function(a){this.Ib.push(a)};s.ce=function(a){zb(this.Ib,a)};function Tb(){C.call(this);this.jl=ya(0,191/255,1);this.Il=ya(110/255,110/255,110/255);this.km=ya(1,1,-0.5);this.jm=ya(130/255,130/255,130/255);this.Cj=ya(1,1,1);za(this.Cj,this.jl)}y(Tb,C);Tb.prototype.update=aa();function Ub(a,b,c,d,e){this.id=a;this.name=b;this.yk=c;this.u=d;this.hm=0;this.Zl=1;this.lm=0;this.Jl=e};function Vb(a,b,c,d,e){Ub.call(this,a,b,c,d,e)}y(Vb,Ub);function Wb(a,b){var c=Sa(0,0,0,0);this.u=a;this.Hl=b||n;this.gm=n;this.color=c||B()};var Xb=new Wb(17,"block_gravel"),Yb=new Wb(17,"block_stone"),Zb=new Wb(17,"block_wood"),$b=new Wb(97,"block_stone"),ac=new Wb(17,"block_cloth");function bc(){Ub.call(this,6,"Red Cloth",ac,17,129)}y(bc,Vb);function cc(){Ub.call(this,7,"Green Cloth",ac,17,145)}y(cc,Vb);function dc(){Ub.call(this,8,"Yellow Cloth",ac,17,162)}y(dc,Vb);function ec(){Ub.call(this,9,"Blue Cloth",ac,17,177)}y(ec,Vb);function fc(){Ub.call(this,3,"Brick",Yb,17,7)}y(fc,Vb);function gc(){Ub.call(this,1,"Dirt",Xb,17,2)}y(gc,Vb);function hc(){Ub.call(this,5,"Glass",$b,17,49)}y(hc,Vb);function ic(){Ub.call(this,2,"Stone",Yb,17,1)}y(ic,Vb);function jc(){Ub.call(this,4,"Wood",Zb,17,4)}y(jc,Vb);function kc(){C.call(this);this.v=new Kb;Lb(this.v,new gc);Lb(this.v,new ic);Lb(this.v,new fc);Lb(this.v,new jc);Lb(this.v,new hc);Lb(this.v,new bc);Lb(this.v,new cc);Lb(this.v,new dc);Lb(this.v,new ec);this.lh=new Tb;D(this,this.lh);this.Oa=[];this.pb=new Rb;D(this,this.pb)}y(kc,C);s=kc.prototype;s.d=function(){kc.c.d.call(this)};s.update=function(a){this.lh.update(a);this.pb.update(a)}; s.Ub=function(a,b,c){var d=this.pb.get(a,b,c);if(d)return d;d=new Nb(this,a&-16,b&-128,c&-16);this.pb.add(d);this.pe(d);return d};s.de=function(a){for(var b=0;b<this.Oa.length;b++){var c=this.Oa[b],d=c.Ra,e=a.Qa,f=d.min,d=d.max,g=e.min,e=e.max;-1!=(d[0]<g[0]||f[0]>e[0]||d[1]<g[1]||f[1]>e[1]||d[2]<g[2]||f[2]>e[2]?-1:f[0]>g[0]||e[0]>d[0]||f[1]>g[1]||e[1]>d[1]||f[2]>g[2]||e[2]>d[2]?0:1)&&c.de(a)}};s.Re=w;s.be=function(a){this.pb.be(a)};s.ce=function(a){this.pb.ce(a)};s.pe=w; s.ja=function(a,b,c,d){var e=this.pb.get(a,b,c);if(e){if(2!=e.state)return E("setBlock before chunk fully loaded - inconsistent state!"),0}else return 0;e=e.ja(a,b,c,d);if(e!=d)for(d=0;d<this.Oa.length;d++)for(var f=this.Oa[d],g=a,j=b,i=c,l=0;l<f.m.length;l++)f.m[l].Gh(g,j,i,0);return e};function lc(a,b){this.Mh=a;this.v=b}lc.prototype.Rd=w;function mc(a,b){lc.call(this,a,b)}y(mc,lc);mc.prototype.Rd=function(a,b,c,d,e){if(0>=c&&0<=c){a=b+16;for(c=d+16;b<a;b++)for(var f=d;f<c;f++)e.ja(b,0,f,256)}};function nc(a){this.Db=oc(32);this.Eb=oc(32);this.Fb=oc(32);this.Zg=1;a=ea(a)?a:ra();this.Db-=oc(a);0>this.Db&&(this.Db+=1);this.Eb-=oc(a);0>this.Eb&&(this.Eb+=1);this.Fb-=oc(a);0>this.Fb&&(this.Fb+=1);for(a=0;100>a;a++)this.random()}function oc(a){a=a.toString();for(var b=4022871197,c=0;c<a.length;c++)var b=b+a.charCodeAt(c),d=0.02519603282416938*b,b=d>>>0,d=d-b,d=d*b,b=d>>>0,d=d-b,b=b+4294967296*d;return 2.3283064365386963E-10*(b>>>0)} nc.prototype.random=function(){var a=2091639*this.Db+2.3283064365386963E-10*this.Zg;this.Db=this.Eb;this.Eb=this.Fb;return this.Fb=a-(this.Zg=a|0)};function pc(a){this.Yb=new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);this.fc=new Uint8Array(512);for(var b=0;256>b;b++)this.fc[b]=this.fc[256+b]=~~(255*a.random())}function qc(a,b,c,d){a=a.Yb;return a[3*b]*c+a[3*b+1]*d} pc.prototype.ib=function(a,b){var c,d,e;e=(a+b)*0.5*(Math.sqrt(3)-1);var f=Math.floor(a+e),g=Math.floor(b+e),j=(3-Math.sqrt(3))/6;e=(f+g)*j;c=a-(f-e);var i=b-(g-e),l,m;c>i?(l=1,m=0):(l=0,m=1);d=c-l+j;var p=i-m+j;e=c-1+2*j;var j=i-1+2*j,t=f&255,g=g&255,v=this.fc,f=v[t+v[g]]%12;l=v[t+l+v[g+m]]%12;m=v[t+1+v[g+1]]%12;t=0.5-c*c-i*i;0>t?c=0:(t*=t,c=t*t*qc(this,f,c,i));i=0.5-d*d-p*p;0>i?d=0:(i*=i,d=i*i*qc(this,l,d,p));p=0.5-e*e-j*j;0>p?e=0:(p*=p,e=p*p*qc(this,m,e,j));return 70*(c+d+e)};function rc(a,b){lc.call(this,a,b);var c=new nc(a.re);this.Qf=new pc(c)}y(rc,lc);rc.prototype.Rd=function(a,b,c,d,e){a=this.Qf;for(c=0;16>c;c++)for(var f=b+c,g=0;16>g;g++){var j=d+g,i=0.5*a.ib(0.0010*f,0.0010*j),i=i+0.25*a.ib(0.0020*(f+100),0.0020*j),i=i+0.25*a.ib(0.01*(f+100),0.01*j),l=25.6*i+64|0;1>l&&(l=1);e.ja(c,l,g,257);var j=e,m=c&15,i=0,l=l-1&127,p=g&15;if(i>l)var t=i,i=l,l=t;for(m=m+16*p+256*i;i<=l;i++,m+=256)j.X[m]=256}};function sc(a,b){this.xh=b||15;this.Yb=new Float32Array(512);this.fc=new Uint8Array(256);for(var c=0;256>c;c++){var d=2*Math.PI*a.random();this.Yb[c]=Math.cos(d);this.Yb[256+c]=Math.sin(d);this.fc[c]=~~(255*a.random())}} sc.prototype.ib=function(a,b){for(var c=a/this.xh,d=b/this.xh,e=~~c,f=~~d,g=0;4>g;g++){var j=e+g%2,i=f+~~(g/2),l=i+this.fc[j]&255;tc[g]=this.Yb[l]*(c-j)+this.Yb[256+l]*(d-i)}c-=~~c;d-=~~d;c=3*Math.pow(c,2)-2*Math.pow(c,3);e=tc[0]+c*(tc[1]-tc[0]);return e+(3*Math.pow(d,2)-2*Math.pow(d,3))*(tc[2]+c*(tc[3]-tc[2])-e)};var tc=new Float32Array(4);function uc(a,b){lc.call(this,a,b);var c=new nc(a.re);this.Qf=new sc(c,15)}y(uc,lc);uc.prototype.Rd=function(a,b,c,d,e){a=this.Qf;c=b+16;for(var f=d+16;b<c;b++)for(var g=d;g<f;g++){var j;j=a;var i=b+1E3,l=g+1E3;j=(j.ib(i+16,l+16)*(16-i)*(16-l)+j.ib(i,l+16)*i*(16-l)+j.ib(i,l)*i*l+j.ib(i+16,l)*(16-i)*l)/256;j=Math.max(0,Math.min(15,j/1E3|0));for(i=0;i<=64+j;i++)l=256,i>=64+j&&(l|=1),e.ja(b,i,g,l)}};var vc={flat:mc,noise:uc,improved:rc};function wc(){this.X=new Uint16Array(32768);this.Dl=new Uint16Array(32768)}wc.prototype.ya=function(){this.X.set(this.Dl)};wc.prototype.end=r("X");wc.prototype.ja=function(a,b,c,d){this.X[(a&15)+16*(c&15)+256*(b&127)]=d};var H;try{var xc=require("microtime");H=function(){return 1E3*xc.nowDouble()}}catch(yc){var zc=u.process.hrtime;H=function(){var a=zc();return 1E3*a[0]+a[1]/1E6}};function Ac(a,b){for(var c in a)b.call(h,a[c],c,a)}function Bc(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Cc(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Dc(a){var b={},c;for(c in a)b[c]=a[c];return b}var Ec="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); function Fc(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<Ec.length;f++)c=Ec[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};function Gc(a){if("function"==typeof a.ra)return a.ra();if(ka(a))return a.split("");if(ja(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Bc(a)}function Hc(a,b,c){if("function"==typeof a.forEach)a.forEach(b,c);else if(ja(a)||ka(a))ub(a,b,c);else{var d;if("function"==typeof a.Za)d=a.Za();else if("function"!=typeof a.ra)if(ja(a)||ka(a)){d=[];for(var e=a.length,f=0;f<e;f++)d.push(f)}else d=Cc(a);else d=h;for(var e=Gc(a),f=e.length,g=0;g<f;g++)b.call(c,e[g],d&&d[g],a)}};function Ic(a,b){this.Jh=a;this.Jg=b}Ic.prototype.getKey=r("Jh");Ic.prototype.w=function(){return new Ic(this.Jh,this.Jg)};function Jc(a){this.Ca=[];if(a)a:{var b,c;if(a instanceof Jc){if(b=a.Za(),c=a.ra(),0>=a.ga()){a=this.Ca;for(var d=0;d<b.length;d++)a.push(new Ic(b[d],c[d]));break a}}else b=Cc(a),c=Bc(a);for(d=0;d<b.length;d++)Kc(this,b[d],c[d])}}function Kc(a,b,c){var d=a.Ca;d.push(new Ic(b,c));b=d.length-1;a=a.Ca;for(c=a[b];0<b;)if(d=b-1>>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c}s=Jc.prototype; s.remove=function(){var a=this.Ca,b=a.length,c=a[0];if(!(0>=b)){if(1==b)yb(a);else{a[0]=a.pop();for(var a=0,b=this.Ca,d=b.length,e=b[a];a<d>>1;){var f=2*a+1,g=2*a+2,f=g<d&&b[g].getKey()<b[f].getKey()?g:f;if(b[f].getKey()>e.getKey())break;b[a]=b[f];a=f}b[a]=e}return c.Jg}};s.ra=function(){for(var a=this.Ca,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].Jg);return b};s.Za=function(){for(var a=this.Ca,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b}; s.Ob=function(a){return xb(this.Ca,function(b){return b.getKey()==a})};s.w=function(){return new Jc(this)};s.ga=function(){return this.Ca.length};s.clear=function(){yb(this.Ca)};function Lc(){Jc.call(this)}y(Lc,Jc);Lc.prototype.Nd=function(a,b){Kc(this,a,b)};function Mc(a,b,c){C.call(this);this.vh=b;this.Xc=c;this.Td=new Lc;this.jc=q;this.bd=n;this.df=new wc}y(Mc,C);Mc.prototype.d=function(){this.jc&&(this.jc=q,u.clearTimeout(this.bd),this.bd=n);Mc.c.d.call(this)};Mc.prototype.update=aa();Mc.prototype.pe=function(a,b){var c=ea(b)?b:Number.MAX_VALUE;a.state=1;var d=this.Xc,e=new L,f=new Nc(e,Oc,a.x,a.y,a.l);f.Dc=a;f.ic=c;d.ia.push(f);d.ec||d.cb();d.Nf=k;N(e,aa(),function(){this.Td.Nd(c,a);this.jc||(this.jc=k,this.bd=u.setTimeout(x(this.fi,this),5))},this)}; Mc.prototype.fi=function(){for(var a=H();this.Td.ga();){var b=this.Td.remove(),c=new nc(this.vh.Mh.re);this.df.ya();this.vh.Rd(c,b.x,b.y,b.l,this.df);b.fill(this.df.end());if(16<H()-a)break}this.Td.ga()?(this.jc=k,this.bd=u.setTimeout(x(this.fi,this),5)):(this.jc=q,this.bd=n)};function Pc(){C.call(this)}y(Pc,C);Pc.prototype.update=aa();/* Portions of this code are from MochiKit, received by The Closure Authors under the MIT license. All other code is Copyright 2005-2009 The Closure Authors. All Rights Reserved. */ function L(a,b){this.se=[];this.Vh=a;this.jh=b||n}s=L.prototype;s.ub=q;s.Oc=q;s.Ze=q;s.gj=q;s.rg=q;s.$e=0;s.cancel=function(a){if(this.ub)this.fd instanceof L&&this.fd.cancel();else{if(this.O){var b=this.O;delete this.O;a?b.cancel(a):(b.$e--,0>=b.$e&&b.cancel())}this.Vh?this.Vh.call(this.jh,this):this.rg=k;this.ub||this.b(new Qc(this))}};s.eh=function(a,b){this.Ze=q;Rc(this,a,b)};function Rc(a,b,c){a.ub=k;a.fd=c;a.Oc=!b;Sc(a)}function Tc(a){if(a.ub){if(!a.rg)throw new Uc(a);a.rg=q}} s.e=function(a){Tc(this);Rc(this,k,a)};s.b=function(a){Tc(this);Rc(this,q,a)};function N(a,b,c,d){a.se.push([b,c,d]);a.ub&&Sc(a);return a}function Vc(a){return xb(a.se,function(a){return"function"==ia(a[1])})} function Sc(a){a.Bg&&(a.ub&&Vc(a))&&(u.clearTimeout(a.Bg),delete a.Bg);a.O&&(a.O.$e--,delete a.O);for(var b=a.fd,c=q,d=q;a.se.length&&!a.Ze;){var e=a.se.shift(),f=e[0],g=e[1],e=e[2];if(f=a.Oc?g:f)try{var j=f.call(e||a.jh,b);ea(j)&&(a.Oc=a.Oc&&(j==b||j instanceof Error),a.fd=b=j);b instanceof L&&(d=k,a.Ze=k)}catch(i){b=i,a.Oc=k,Vc(a)||(c=k)}}a.fd=b;d&&(N(b,x(a.eh,a,k),x(a.eh,a,q)),b.gj=k);c&&(a.Bg=u.setTimeout(function(){throw b;},0))}function Wc(a){var b=new L;b.e(a);return b} function Uc(a){gb.call(this);this.ea=a}y(Uc,gb);Uc.prototype.message="Deferred has already fired";Uc.prototype.name="AlreadyCalledError";function Qc(a){gb.call(this);this.ea=a}y(Qc,gb);Qc.prototype.message="Deferred was cancelled";Qc.prototype.name="CancelledError";function Xc(a,b,c,d,e,f){L.call(this,e,f);this.p=a;this.mf=[];this.ph=!!b;this.yj=!!c;this.oj=!!d;for(b=0;b<a.length;b++)N(a[b],x(this.yh,this,b,k),x(this.yh,this,b,q));0==a.length&&!this.ph&&this.e(this.mf)}y(Xc,L);Xc.prototype.Uh=0;Xc.prototype.yh=function(a,b,c){this.Uh++;this.mf[a]=[b,c];this.ub||(this.ph&&b?this.e([a,c]):this.yj&&!b?this.b(c):this.Uh==this.p.length&&this.e(this.mf));this.oj&&!b&&(c=n);return c};Xc.prototype.b=function(a){Xc.c.b.call(this,a);ub(this.p,function(a){a.cancel()})};function Yc(a,b){kc.call(this);var c;(c=vc[a.uh])||(c=vc.flat);c=new c(a,this.v);this.Mh=a;this.Xc=b;D(this,this.Xc);this.jb=new Pc;D(this,this.jb);this.ff=new Mc(0,c,b);D(this,this.ff);this.Md=[]}y(Yc,kc);Yc.prototype.update=function(a){Yc.c.update.call(this,a);this.jb.update(a);this.ff.update(a);this.flush();this.Xc.update(a)};Yc.prototype.Re=function(a){this.Md.push(a);a.Ea||a.map.ce(a);a.Ea++}; Yc.prototype.flush=function(){for(var a=[],b=0;b<this.Md.length;b++){var c=this.Md[b];a.push(Zc(this.Xc,c));c.Qb=q;c.Ea--;c.Ea||c.map.be(c)}this.Md.length=0;return new Xc(a)};Yc.prototype.pe=function(a){for(var b=Number.MAX_VALUE,c=0;c<this.Oa.length;c++){var d=this.Oa[c],e=a.x-d.za[0],d=a.l-d.za[2],e=e*e+d*d;e<b&&(b=e)}b==Number.MAX_VALUE&&(b=h);this.ff.pe(a,b)};function $c(a){this.factory=a;this.la=this.Ae=0}$c.prototype.getTime=r("Ae");$c.prototype.read=function(a){var b=this.factory.u;b&2&&(this.Ae=a.q()/1E3);b&4||(this.la=a.q())};$c.prototype.write=function(a){var b=this.factory.u;b&2&&a.r(1E3*this.Ae|0);b&4||a.r(this.la)};$c.prototype.Ab=function(){this.factory.Ab(this)};function ad(a){$c.call(this,a);this.vg=0;this.Vd=q}y(ad,$c);ad.prototype.read=function(a){ad.c.read.call(this,a);this.vg=a.q()/1E3;this.Vd=q}; ad.prototype.write=function(a){ad.c.write.call(this,a);a.r(1E3*this.vg|0)};function bd(a){$c.call(this,a);this.Uf=0}y(bd,$c);bd.prototype.read=function(a){bd.c.read.call(this,a);this.Uf=a.q()};bd.prototype.write=function(a){bd.c.write.call(this,a);a.r(this.Uf)};function O(a,b,c,d){C.call(this);this.W=a;this.factory=b;this.ba=n;this.B=c;this.Ba=d;this.O=n;this.H=[];this.R=0;this.g=cd(b,this);this.hd=[]}y(O,C);s=O.prototype;s.d=function(){var a=this.getParent();a&&(zb(a.H,this),a.Mb(this));this.factory.xe.push(this.g);for(a=0;a<this.hd.length;a++)this.factory.xe.push(this.hd[a]);O.c.d.call(this)}; function dd(a,b){for(var c="",d=0;d<b;d++)c+="..";E(c+"Entity "+a.B+" / type "+a.factory.xa+(a.ba?" / owner "+a.ba.a:""));if(a.H.length)for(d=0;d<a.H.length;d++)dd(a.H[d],b+1)}s.aa=r("W");s.getParent=r("O");function ed(a,b){if(a.O!=b){var c=a.O;a.O=b;if(!(a.Ba&fd)){var d=a.lf(0);d.Uf=b?b.B:0;gd(a.W,d)}a.Tf(c,b);c&&(zb(c.H,a),c.Mb(a));b&&b.Qe(a)}}s.Qe=function(a){this.H.push(a);this.Fd(a)};s.Tf=w;s.Fd=w;s.Mb=w;s.Af=ca(n);s.read=function(a){this.g.read(a)};s.fg=function(a){this.g.fg(a)};s.write=function(a){this.g.write(a)}; s.Lg=function(a){this.g.Lg(a)};function hd(a,b){if(a.Ba&id){1==a.hd.length&&(a.hd[0].time=b);var c=cd(a.factory,a);c.time=b;a.g.kf(c);a.hd.push(c)}}s.Eh=w;s.lf=function(a){a=jd(this.W.Ia[a]||n);a.la=this.B;return a};s.fa=aa();function kd(a,b,c){a.rf||ld(a.W.jb,b,c===h?0:c,a.update,a)}s.Yf=aa();s.Pk=w;s.ed=function(){this.R=0;this.g.ed()};var fd=1,id=8;function md(){this.yc=[];this.f=0}md.prototype.compact=aa();md.prototype.ga=r("f");md.prototype.ob=function(a){this.yc[this.f++]=a};function nd(a){for(var b=0;b<a.f;b++){var c=a.yc[b];c.factory.Ab(c)}a.f=0};function od(){this.buffer=new Uint8Array(512);this.offset=0;this.S=new Float32Array(16);this.$=new Uint8Array(this.S.buffer);this.Bj=(this.Kc=u.Float64Array?new Float64Array(1):n)?new Uint8Array(this.Kc.buffer):n}s=od.prototype;s.Wa=function(){this.offset=0};s.finish=function(){for(var a=new Uint8Array(this.offset),b=0;b<this.offset;b++)a[b]=this.buffer[b];this.offset=0;return a.buffer}; function pd(a,b){if(a.offset+b>a.buffer.length){var c=a.offset+b,d=a.buffer.length;do d+=1024;while(d<c);c=new Uint8Array(d);for(d=0;d<a.offset;d++)c[d]=a.buffer[d];a.buffer=c}}function qd(a,b){pd(a,2);a.buffer[a.offset++]=b>>8;a.buffer[a.offset++]=b}function rd(a,b){pd(a,4);a.buffer[a.offset++]=b>>24;a.buffer[a.offset++]=b>>16;a.buffer[a.offset++]=b>>8;a.buffer[a.offset++]=b}function P(a,b){pd(a,1);a.buffer[a.offset++]=b}function ud(a,b){pd(a,2);a.buffer[a.offset++]=b>>8;a.buffer[a.offset++]=b} s.K=function(a){pd(this,4);this.buffer[this.offset++]=a>>24;this.buffer[this.offset++]=a>>16;this.buffer[this.offset++]=a>>8;this.buffer[this.offset++]=a};s.r=function(a){pd(this,5);for(a&=4294967295;a&4294967168;)this.buffer[this.offset++]=a&127|128,a>>>=7;this.buffer[this.offset++]=a&127};s.Oe=function(a){this.r(a<<1^a>>31)}; s.Qi=function(a){pd(this,4);this.S[0]=a;this.buffer[this.offset++]=this.$[0];this.buffer[this.offset++]=this.$[1];this.buffer[this.offset++]=this.$[2];this.buffer[this.offset++]=this.$[3]};s.Bl=function(a){pd(this,12);this.S[0]=a[0];this.S[1]=a[1];this.S[2]=a[2];for(a=0;12>a;a++)this.buffer[this.offset++]=this.$[a]};s.Cl=function(a){pd(this,16);this.S[0]=a[0];this.S[1]=a[1];this.S[2]=a[2];this.S[3]=a[3];for(a=0;16>a;a++)this.buffer[this.offset++]=this.$[a]}; s.n=function(a){65535<=a.length&&(a=a.substr(0,65535));pd(this,4+3*a.length);ud(this,a.length);var b=this.offset;this.offset+=2;for(var c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);128>e?(this.buffer[this.offset++]=e,c++):2048>e?(this.buffer[this.offset++]=e>>6|192,this.buffer[this.offset++]=e&63|128,c+=2):(this.buffer[this.offset++]=e>>12|224,this.buffer[this.offset++]=e>>6&63|128,this.buffer[this.offset++]=e&63|128,c+=3)}a=this.offset;this.offset=b;ud(this,c);this.offset=a};var vd=n; function Q(){vd||(vd=new od);return vd};function wd(){this.Yg=this.zd=this.qm=this.Tl=this.Nh=this.Oh=this.ud=0}wd.prototype.w=function(){return new wd};wd.prototype.toString=ca("[stats]");var xd,yd,zd,Ad,Bd;function Cd(){return u.navigator?u.navigator.userAgent:n}Ad=zd=yd=xd=q;var Dd;if(Dd=Cd()){var Ed=u.navigator;xd=0==Dd.indexOf("Opera");yd=!xd&&-1!=Dd.indexOf("MSIE");zd=!xd&&-1!=Dd.indexOf("WebKit");Ad=!xd&&!zd&&"Gecko"==Ed.product}var Fd=xd,Gd=yd,Hd=Ad,Id=zd,Jd,Kd=u.navigator;Jd=Kd&&Kd.platform||"";Bd=-1!=Jd.indexOf("Mac");var Ld=-1!=Jd.indexOf("Win");function Md(){var a=u.document;return a?a.documentMode:h}var Nd; a:{var Od="",Pd;if(Fd&&u.opera)var Qd=u.opera.version,Od="function"==typeof Qd?Qd():Qd;else if(Hd?Pd=/rv\:([^\);]+)(\)|;)/:Gd?Pd=/MSIE\s+([^\);]+)(\)|;)/:Id&&(Pd=/WebKit\/(\S+)/),Pd)var Rd=Pd.exec(Cd()),Od=Rd?Rd[1]:"";if(Gd){var Sd=Md();if(Sd>parseFloat(Od)){Nd=String(Sd);break a}}Nd=Od}var Td={}; function Ud(a){var b;if(!(b=Td[a])){b=0;for(var c=hb(String(Nd)).split("."),d=hb(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",j=d[f]||"",i=RegExp("(\\d*)(\\D*)","g"),l=RegExp("(\\d*)(\\D*)","g");do{var m=i.exec(g)||["","",""],p=l.exec(j)||["","",""];if(0==m[0].length&&0==p[0].length)break;b=((0==m[1].length?0:parseInt(m[1],10))<(0==p[1].length?0:parseInt(p[1],10))?-1:(0==m[1].length?0:parseInt(m[1],10))>(0==p[1].length?0:parseInt(p[1],10))?1:0)||((0==m[2].length)< (0==p[2].length)?-1:(0==m[2].length)>(0==p[2].length)?1:0)||(m[2]<p[2]?-1:m[2]>p[2]?1:0)}while(0==b)}b=Td[a]=0<=b}return b}var Vd=u.document,Wd=!Vd||!Gd?h:Md()||("CSS1Compat"==Vd.compatMode?parseInt(Nd,10):5);(function(){var a;return Ld?(a=/Windows NT ([0-9.]+)/,(a=a.exec(Cd()))?a[1]:"0"):Bd?(a=/10[_.][0-9_.]+/,(a=a.exec(Cd()))?a[0].replace(/_/g,"."):"10"):""})();function Xd(){this.Oi="";this.type=Yd;this.platform=Zd;this.$c="";this.Hc=$d}Xd.prototype.w=function(){var a=new Xd;a.Oi=this.Oi;a.type=this.type;a.platform=this.platform;a.$c=this.$c;a.Hc=this.Hc;return a};Xd.prototype.toString=function(){return[this.type,this.platform+this.$c,this.Hc].join("/")};var Yd="unknown",Zd="other",$d="desktop";function ae(){this.sd="none";this.rd="0";this.qa="User"}ae.prototype.w=function(){var a=new ae;a.sd=this.sd;a.rd=this.rd;a.qa=this.qa;return a};ae.prototype.toString=ca("[user]");function be(a,b,c,d,e){this.a=a||"";this.Q=b||0;this.u=c||0;this.info=d||new ae;this.pd=e||new Xd;this.nf=0;this.i=new wd;this.data=this.da=n}be.prototype.toString=function(){return this.info.qa+" ("+this.a+"/"+this.Q+")"};function ce(a){return new be(a.a,a.Q,a.u,a.info.w(),a.pd.w())};function de(a){this.ka=a;this.Ta=0;this.Gd=[];this.qb=0;this.Jd=[];this.rb=0;this.Ce=[];this.Jb=0;this.Kd=[];this.sb=0}de.prototype.ya=ba("Ta");de.prototype.ob=function(a){this.Gd[this.qb++]=a}; de.prototype.finish=function(a){var b=Q();P(b,30);var c=0;b.r(1E3*a|0);b.r(this.Ta);b.r(this.rb);b.r(this.Jb);b.r(this.sb);b.r(this.qb);for(a=0;a<this.rb;a++){var d=this.Jd[a];this.Jd[a]=n;c=b.offset;b.r(d.B>>1);b.r(d.factory.xa);b.r(d.Ba);var e=d.ba;b.r(e?e.Q:0);e=d.getParent();b.r(e?e.B:0);d.write(b);this.ka.Od++;this.ka.Rb+=b.offset-c}for(a=this.rb=0;a<this.Jb;a++)d=this.Ce[a],this.Ce[a]=n,c=b.offset,b.r(d.B>>1),d.Lg(b),this.ka.Qd++,this.ka.Tb+=b.offset-c;for(a=this.Jb=0;a<this.sb;a++)d=this.Kd[a], this.Kd[a]=n,c=b.offset,b.r(d.B>>1),this.ka.Pd++,this.ka.Sb+=b.offset-c;for(a=this.sb=0;a<this.qb;a++)d=this.Gd[a],this.Gd[a]=n,c=b.offset,b.r(d.factory.xa),d.write(b),this.ka.ee++,this.ka.cc+=b.offset-c;this.qb=0;return b.finish()};de.prototype.Wa=function(){for(var a=this.Ta=0;a<this.rb;a++)this.Jd[a]=n;for(a=this.rb=0;a<this.Jb;a++)this.Ce[a]=n;for(a=this.Jb=0;a<this.sb;a++)this.Kd[a]=n;for(a=this.sb=0;a<this.qb;a++)this.Gd[a]=n;this.qb=0};function ee(a,b,c){C.call(this);this.Ga=a;this.V=b;this.vc=c;this.Ta=this.Kh=0;this.sa=new md;this.ta=new md;this.yg={};this.Ee={};this.De=[];this.tk=0;this.Na=new de(a.i)}y(ee,C);ee.prototype.$a=r("vc");ee.prototype.compact=function(){this.sa.compact();this.ta.compact()};function fe(a,b){var c=b.Ba;if(!(c&fd)&&!(c&64&&b.ba!=a.vc)){var c=b.B,d=0;a.yg[c]||(d|=1,a.yg[c]=k);var e=a.Ee[c]|0,d=e|d|b.R;e||a.De.push(b);e!=d&&(a.Ee[c]=d)}} ee.prototype.flush=function(a){this.tk=a;var b=this.Na;b.ya(this.Ta);var c=this.Ta!=this.Kh;this.Kh=this.Ta;var d=this.ta.yc,e=this.ta.ga();if(e){for(var f=0;f<e;f++){var g=d[f];(0==g.la||this.yg[g.la])&&b.ob(g)}this.ta.f=0}for(f=0;f<this.De.length;f++)d=this.De[f],e=d.B,g=this.Ee[e],delete this.Ee[e],g&&5!=(g&5)&&(g&4?b.Kd[b.sb++]=d:g&1?b.Jd[b.rb++]=d:g&2&&(b.Ce[b.Jb++]=d));c||0<b.qb+b.rb+b.Jb+b.sb?this.V.send(b.finish(a),this.vc):b.Wa();this.De.length=0};function ge(a,b,c){ee.call(this,a,b,c)}y(ge,ee);var he=new function(){this.l=this.y=this.x=0};function ie(){var a=Q();P(a,74);return a.finish()};function je(a){C.call(this);this.pi=a}y(je,C);function ke(a){C.call(this);this.al=a;this.jg=[[],[],[],[],[]];this.Mi=[]}y(ke,C);function ld(a,b,c,d,e){var f=a.Mi.pop()||new le;f.ic=b;f.ig=a.al.A.vb;f.ze=-1==c?0:0==c?f.ig+0.0010:c;f.e=d;f.bf=e||u;a=a.jg[b];b=0;for(c=a.length;b<c;)d=b+c>>1,0<f.ze-a[d].ze?b=d+1:c=d;a.splice(b,0,f)}var me=Number.MAX_VALUE; ke.prototype.update=function(a){a=a.time;for(var b=H(),c=this.jg.length-1;0<=c;c--){for(var d=this.jg[c];d.length;){var e=d[0];if(e.ze>a)break;d.shift();var f=a-e.ig,g=e.e,j=e.bf;e.e=e.bf=n;this.Mi.push(e);g.call(j,a,f)}if(H()-b>=me)break}};function le(){this.ic=ne;this.ze=this.ig=0;this.bf=this.e=n}var ne=0;function oe(){this.Vc=this.Da=this.Yd=this.Jk=this.mk=this.cc=this.ee=this.Zb=this.Rc=this.Sb=this.Pd=this.Tb=this.Qd=this.Rb=this.Od=0}oe.prototype.update=function(a){this.Da+=this.Rb;this.Da+=this.Tb;this.Da+=this.Sb;this.Yd+=this.Zb;this.Da+=this.cc;1<=a-this.Vc&&(this.Vc=a,this.mk=this.Yd,this.Jk=this.Da,this.Da=this.Yd=0);this.ee=this.cc=this.Rc=this.Zb=this.Pd=this.Sb=this.Qd=this.Tb=this.Od=this.Rb=0};function pe(a,b,c){this.xa=a;this.nj=b;this.u=c;this.Cg=[]}function jd(a){return a.Cg.length?(a=a.Cg.pop(),a.la=0,a):new a.nj(a)}pe.prototype.Ab=function(a){this.Cg.push(a)};function qe(a){qe[" "](a);return a}qe[" "]=w;var re=!!u.wtf&&2==u.wtf.trace.API_VERSION,se=re?u.wtf.trace.appendScopeData:w,te=re?u.wtf.trace.instrument:ha,ue=re?u.wtf.trace.instrumentType:ha;function ve(a,b){je.call(this,a);this.i=new oe;this.jb=new ke(a);D(this,this.jb);this.Ke=[];this.Ia={};this.uf={};this.Pf=b;this.s={};this.nc=n;this.pa=Array(256);this.oa=0;var c=new pe(0,bd,0);this.Ia[c.xa]=c}y(ve,je);function we(a,b){a.uf[b.xa]=b}function xe(a){var b=a.Pf;a.Pf+=2;return b}s=ve.prototype;s.na=function(a,b){var c=this.uf[a].na(this,xe(this),b);this.Lb(c);return c};s.Lb=function(a){this.s[a.B]=a;var b=!!a.R;a.R|=1;b||(this.pa[this.oa++]=a);a.Ba&128&&(this.nc=a)}; s.qh=function(a,b){for(var c in this.s)a.call(b||u,this.s[Number(c)])};s.gb=function(a,b){if(!(a.R&4)){switch(b||ye){default:case ye:for(var c=a.H.length-1;0<=c;c--){var d=a.H[c];a.Mb(d);a.W.gb(d)}if(d=a.Af())for(c=0;c<d.length;c++)a.W.gb(d[c]);break;case ze:for(c=0;c<a.H.length;c++)ed(a.H[c],n);if(d=a.Af())for(c=0;c<d.length;c++)ed(d[c],n);case Ae:}delete this.s[a.B];c=!!a.R;a.R|=4;c||(this.pa[this.oa++]=a);fb(a)}};s.lf=function(a){a=jd(this.Ia[a]||n);a.la=0;return a}; s.Jc=function(a,b){for(var c=0;c<b;c++){var d=a[c],e=d.la;0==e?this.fa(d):(e=this.s[e]||n)&&e.fa(d);d instanceof ad&&(d.Vd=k)}};s.fa=w;s.bi=function(){for(var a=0;a<this.oa;a++){var b=this.pa[a];b.Yf()}for(a=0;a<this.oa;a++){b=this.pa[a];this.pa[a]=n;if(b.R&1)for(var c=0;c<this.Ke.length;c++)this.Ke[c].Wl(b);if(b.R&4)for(c=0;c<this.Ke.length;c++)this.Ke[c].Xl(b);b.ed()}this.oa=0};s.$f=function(a){for(var b=0;b<this.oa;b++){var c=this.pa[b];c.Pk(a);this.ci(a,c)}};s.ci=w; s.hc=function(){for(var a=0;a<this.oa;a++){var b=this.pa[a];this.pa[a]=n;b.ed()}this.oa=0};var ye=0,ze=1,Ae=2,ve=ue(ve,"gf.sim.Simulator",{qh:"forEachEntity",Jc:"executeCommands",bi:"postNetworkUpdateEntities",$f:"postTickUpdateEntities",hc:"postUpdate"});function Be(){this.Th=1;this.Ag=[];this.Hb=0;this.Rf=[];this.dc=0;this.Yh=[];this.Sf=0}Be.prototype.compact=aa();Be.prototype.ob=function(a){this.Rf[this.dc++]=a;a instanceof ad&&(a.ri=this.Th++,a.Vd=q,this.Yh[this.Sf++]=a)}; Be.prototype.write=function(a){a.r(this.Th-1);var b=this.dc;a.r(this.dc);for(var c=0;c<this.dc;c++){var d=this.Rf[c];this.Rf[c]=n;a.r(d.factory.xa);d.write(a);d instanceof ad?this.Ag[this.Hb++]=d:d.factory.Ab(d)}this.Sf=this.dc=0;1500<this.Hb&&E("massive backup of commands, dying");return b};function R(a,b){ve.call(this,a,1);this.V=b;Ce(b.yb,30,this.Ah,this);this.Zd=[];this.sa=new md;this.ta=new Be;this.Uc=0}y(R,ve);R.prototype.d=function(){R.c.d.call(this)};R.prototype.$a=function(a){return this.V.Kb[a]||n};R.prototype.Lb=function(a){R.c.Lb.call(this,a);a.Ba&(4|id)&&this.Zd.push(a)};R.prototype.gb=function(a,b){R.c.gb.call(this,a,b);a.Ba&(4|id)&&zb(this.Zd,a)};R.Ui=20; R.prototype.update=function(a){var b=De(this.pi.A)+this.pi.A.Ec;this.Fh(b-0.5);this.Jc(this.sa.yc,this.sa.ga());nd(this.sa);this.jb.update(a);this.$f(a);this.qi(a);this.hc(a);this.Fc(a)};R.prototype.Fh=function(a){for(var b=0;b<this.Zd.length;b++)this.Zd[b].Eh(a);a=this.ta;this.Jc(a.Ag,a.Hb);this.Jc(a.Yh,a.Sf)};R.prototype.qi=function(a){if(this.ta.dc&&a.time-this.Uc>=1/R.Ui){this.Uc=a.time;a=Q();P(a,31);var b=this.ta.write(a);this.i.ee+=b;this.i.cc+=a.offset;this.V.send(a.finish())}};R.Pe=15; R.prototype.Fc=function(a){a.time-this.If<R.Pe||(this.If=a.time,this.sa.compact(),this.ta.compact())}; R.prototype.Ah=function(a,b,c){b=c.q()/1E3;var d=c.q(),e=c.q(),f=c.q(),g=c.q();a=c.q();this.i.Od+=e;this.i.Qd+=f;this.i.Pd+=g;this.i.Rc+=a;var j=this.ta,i=j.Ag,l=j.Hb;if(l)if(i[l-1].ri<=d){for(var m=0;m<l;m++){var p=i[m];p.factory.Ab(p)}j.Hb=0}else{for(var t=l,m=0;m<l;m++){p=i[m];if(p.ri>d){t=m;break}p.factory.Ab(p)}i.splice(0,t);j.Hb-=t}for(d=0;d<this.oa;d++)j=this.pa[d],this.pa[d]=n,j.ed();this.oa=0;i=n;for(d=j=0;d<e;d++){var j=c.offset,m=c.q()<<1,v=c.q(),p=c.q(),t=c.q(),l=c.q(),v=this.uf[v]||n; if(!v)return q;(t=t?this.V.Ig[t]||n:n)&&(t!=this.V.$l()&&p&4)&&(p&=-5);m=v.na(this,m,p);m.ba=t;m.read(c);this.i.Rb+=c.offset-j;hd(m,b);this.Lb(m);l&&(i||(i=[]),i.push([m,l]))}for(d=0;d<f;d++){j=c.offset;m=c.q()<<1;m=this.s[m]||n;if(!m)return q;m.fg(c);this.i.Tb+=c.offset-j;hd(m,b)}for(d=0;d<g;d++){j=c.offset;m=c.q()<<1;this.i.Sb+=c.offset-j;m=this.s[m]||n;if(!m)return q;this.gb(m,Ae)}if(i)for(d=0;d<i.length;d++){m=i[d][0];b=this.s[i[d][1]]||n;if(!b)return q;ed(m,b)}this.bi();for(d=0;d<a;d++){j=c.offset; b=c.q();b=this.Ia[b]||n;if(!b)return q;b=jd(b);b.read(c);this.i.Zb+=c.offset-j;this.sa.ob(b)}return k};R=ue(R,"gf.sim.ClientSimulator",{update:"update",Fh:"interpolateEntities",qi:"sendPendingCommands_",Fc:"compact_",Ah:"handleSyncSimulation_"});function Ee(a,b,c){ve.call(this,a,2);this.V=b;this.V.U.push(this);Ce(this.V.yb,31,this.zh,this);this.Hk=c;this.m=[];this.kd={};this.gf=new md}y(Ee,ve);s=Ee.prototype;s.d=function(){eb(this.m);Ee.c.d.call(this)};s.$a=function(a){return this.V.Kb[a]||n};s.Se=function(a){this.m.push(a);var b=a.$a();b&&(this.kd[b.a]=a);this.qh(function(b){fe(a,b)},this)};s.li=function(a){var b=a.$a();b&&delete this.kd[b.a];zb(this.m,a);fb(a)}; s.update=function(a){for(var b=0;b<this.m.length;b++){var c=this.m[b];c.Ga.Jc(c.sa.yc,c.sa.ga());nd(c.sa)}this.jb.update(a);this.$f(a);this.hc(a);this.Fc(a)};s.fa=aa();function gd(a,b,c){for(var d=0;d<a.m.length;d++){var e=a.m[d];if(!(c&&e.$a()==c))a:{if(0!=b.la){var f=e.Ga.s[b.la]||n;if(f.Ba&64&&f.ba!=e.vc)break a}e.ta.ob(b)}}a.gf.ob(b)}s.ci=function(a,b){if(!(b.Ba&fd))for(var c=0;c<this.m.length;c++)fe(this.m[c],b)}; s.hc=function(a){for(var b=0;b<this.m.length;b++)this.m[b].flush(a.time);nd(this.gf);Ee.c.hc.call(this,a)};Ee.Pe=15;s=Ee.prototype;s.Fc=function(a){if(!(a.time-this.If<Ee.Pe)){this.If=a.time;this.gf.compact();for(a=0;a<this.m.length;a++)this.m[a].compact()}};s.Ua=w;s.of=w;s.Fg=function(a){var b=this.kd[a.a]||n;b||(b=new this.Hk(this,this.V,a),this.Se(b))};s.Gg=function(a){(a=this.kd[a.a]||n)&&this.li(a)};s.Hg=w; s.zh=function(a,b,c){if(!a.G)return q;b=this.kd[a.G.a]||n;if(!b)return q;var d=c.q(),e=c.q();this.i.Rc+=e;this.i.Zb+=a.data.length;for(var f=0;f<e;f++){var g=c.q(),g=this.Ia[g]||n;if(!g)return q;g=jd(g);g.read(c);var j=0==g.la;j||(j=this.s[g.la]||n,j=!j||j.ba!=a.G);if(j)return g.Ab(),q;b.sa.ob(g)}b.Ta=d;return k};Ee=ue(Ee,"gf.sim.ServerSimulator",{update:"update",hc:"postUpdate",Fc:"compact_",zh:"handleExecCommands_"});function Fe(a){return Ge(a.W.nc.g)};function He(a,b,c,d){O.call(this,a,b,c,d);this.th=n}y(He,O);function Ie(a){ad.call(this,a);this.Yk=this.Wf=this.Mg=this.lg=this.kg=this.nb=this.zg=0}y(Ie,ad);var Je=360*(1/32767)*Math.PI/180;Ie.prototype.read=function(a){Ie.c.read.call(this,a);this.zg=Ke(a);this.nb=Ke(a);this.nb&1&&(this.kg=Le(a),this.lg=Le(a));this.Mg=Me(a);this.Wf=Me(a)};Ie.prototype.write=function(a){Ie.c.write.call(this,a);P(a,this.zg);P(a,this.nb);this.nb&1&&(ud(a,this.kg),ud(a,this.lg));qd(a,this.Mg);qd(a,this.Wf)};function Ne(a){$c.call(this,a);this.Ve=0}y(Ne,$c);Ne.prototype.read=function(a){Ne.c.read.call(this,a);this.Ve=a.ji()};Ne.prototype.write=function(a){Ne.c.write.call(this,a);a.Qi(this.Ve)};function Oe(a){$c.call(this,a);this.data=this.l=this.y=this.x=0}y(Oe,$c);Oe.prototype.read=function(a){Oe.c.read.call(this,a);this.x=a.ke();this.y=a.ke();this.l=a.ke();this.data=Le(a)};Oe.prototype.write=function(a){Oe.c.write.call(this,a);a.Oe(this.x);a.Oe(this.y);a.Oe(this.l);ud(a,this.data)};function Pe(a){ad.call(this,a);this.xg=0}y(Pe,ad);Pe.prototype.read=function(a){Pe.c.read.call(this,a);this.xg=a.ca()};Pe.prototype.write=function(a){Pe.c.write.call(this,a);a.K(this.xg)};var Qe=ad.El;function Re(a,b){var c=a[0],d=a[1],e=a[2],f=a[3],g=2*c,j=2*d,i=2*e,l=g*f,m=j*f,f=i*f,g=g*c,p=j*c,c=i*c,j=j*d,d=i*d,e=i*e;b[0]=1-(j+e);b[1]=p+f;b[2]=c-m;b[3]=0;b[4]=p-f;b[5]=1-(g+e);b[6]=d+l;b[7]=0;b[8]=c+m;b[9]=d-l;b[10]=1-(g+j);b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1} function Se(a,b,c,d){var e=a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3];if(1<e||-1>e)return Ua(d,b),d;var f=1;0>e&&(f=-1,e=-e);var g=Math.acos(e);if(1E-6>=g)return Ua(d,b),d;var j=1/Math.sin(g),e=Math.sin((1-c)*g)*j;c=f*Math.sin(c*g)*j;d[0]=a[0]*e+b[0]*c;d[1]=a[1]*e+b[1]*c;d[2]=a[2]*e+b[2]*c;d[3]=a[3]*e+b[3]*c;return d};function Te(a,b,c,d){O.call(this,a,b,c,d);this.mb=k;this.Ac=B();this.ql=new Float32Array(16);this.g.Di(ya(1,1,1))}y(Te,O);Te.prototype.Yf=function(){Te.c.Yf.call(this);this.mb=k}; function Ue(a,b){if(a.mb&&a.mb){a.mb=q;var c=a.g,d=c.gc,e=c.Fa,f=c.qe;a.Ac[0]=d[0];a.Ac[1]=d[1];a.Ac[2]=d[2];a.Ac[3]=c.wd*Math.max(f[0],Math.max(f[1],f[2]));c=a.ql;Re(e,c);var e=f[0],g=f[1],f=f[2],j=c[1],i=c[2],l=c[3],m=c[4],p=c[5],t=c[6],v=c[7],F=c[8],I=c[9],G=c[10],J=c[11],M=c[12],fa=c[13],W=c[14],pa=c[15];c[0]*=e;c[1]=j*e;c[2]=i*e;c[3]=l*e;c[4]=m*g;c[5]=p*g;c[6]=t*g;c[7]=v*g;c[8]=F*f;c[9]=I*f;c[10]=G*f;c[11]=J*f;c[12]=M;c[13]=fa;c[14]=W;c[15]=pa;e=d[0];g=d[1];d=d[2];f=c[1];j=c[2];i=c[3];l=c[4]; m=c[5];p=c[6];t=c[7];v=c[8];F=c[9];I=c[10];G=c[11];J=c[12];M=c[13];fa=c[14];W=c[15];c[0]+=e*i;c[1]=f+g*i;c[2]=j+d*i;c[3]=i;c[4]=l+e*t;c[5]=m+g*t;c[6]=p+d*t;c[7]=t;c[8]=v+e*G;c[9]=F+g*G;c[10]=I+d*G;c[11]=G;c[12]=J+e*W;c[13]=M+g*W;c[14]=fa+d*W;c[15]=W;a.getParent()}Ua(b,a.Ac)} Te.prototype.Bd=function(a){var b=this.g,c=a.Je,d=b.gc;Re(b.Fa,c);if(c==c){var b=c[1],e=c[2],f=c[3],g=c[6],j=c[7],i=c[11];c[1]=c[4];c[2]=c[8];c[3]=c[12];c[4]=b;c[6]=c[9];c[7]=c[13];c[8]=e;c[9]=g;c[11]=c[14];c[12]=f;c[13]=j;c[14]=i}else c[0]=c[0],c[1]=c[4],c[2]=c[8],c[3]=c[12],c[4]=c[1],c[5]=c[5],c[6]=c[9],c[7]=c[13],c[8]=c[2],c[9]=c[6],c[10]=c[10],c[11]=c[14],c[12]=c[3],c[13]=c[7],c[14]=c[11],c[15]=c[15];b=-d[0];e=-d[1];d=-d[2];f=c[1]*b+c[5]*e+c[9]*d+c[13];g=c[2]*b+c[6]*e+c[10]*d+c[14];j=c[3]*b+c[7]* e+c[11]*d+c[15];c[12]=c[0]*b+c[4]*e+c[8]*d+c[12];c[13]=f;c[14]=g;c[15]=j;a.fe&&(a.fe=q,c=2/a.width,d=2/-a.height,Xa(a.Ik,c,d,1,0,-1,1,0,1),c=a.Pa===h?a.width/a.height:a.Pa,d=a.Fk,b=a.wf,f=Math.PI/4/2,e=b-d,g=Math.sin(f),0==e||(0==g||0==c)||(f=Math.cos(f)/g,Xa(a.cg,f/c,f,-(b+d)/e,-1,0,0,-(2*d*b)/e,0)),Ya(a.cg,a.Je,a.ld),Za(a.ld,a.ac));Ya(a.cg,a.Je,a.ld);Za(a.Je,a.Hh);Za(a.ld,a.ac);d=a.ld;c=a.sh;Ta(c[0],d[3]+d[0],d[7]+d[4],d[11]+d[8],d[15]+d[12]);Ta(c[1],d[3]-d[0],d[7]-d[4],d[11]-d[8],d[15]-d[12]); Ta(c[2],d[3]-d[1],d[7]-d[5],d[11]-d[9],d[15]-d[13]);Ta(c[3],d[3]+d[1],d[7]+d[5],d[11]+d[9],d[15]+d[13]);Ta(c[4],d[3]+d[2],d[7]+d[6],d[11]+d[10],d[15]+d[14]);Ta(c[5],d[3]-d[2],d[7]-d[6],d[11]-d[10],d[15]-d[14]);for(d=0;d<c.length;d++)b=c[d],e=1/Math.sqrt(b[0]*b[0]+b[1]*b[1]+b[2]*b[2]),b[0]*=e,b[1]*=e,b[2]*=e,b[3]*=e;A(a.position,0,0,0);c=a.Hh;d=f=a.position;b=f[0];e=f[1];f=f[2];d[0]=b*c[0]+e*c[4]+f*c[8]+c[12];d[1]=b*c[1]+e*c[5]+f*c[9]+c[13];d[2]=b*c[2]+e*c[6]+f*c[10]+c[14];c=2*(0.5/a.width)-1;d=1- 2*(0.5/a.height);b=Ve[0];e=Ve[1];A(b,c,d,-1);A(e,c,d,1);$a(a.ac,b,b);$a(a.ac,e,e);Ea(b,e,a.direction);a=c=a.direction;a[0]=-c[0];a[1]=-c[1];a[2]=-c[2]};function We(a,b,c,d){Te.call(this,a,b,c,d);this.bb=n;this.le=q}y(We,Te);We.prototype.d=function(){fb(this.bb);this.bb=n;We.c.d.call(this)};We.prototype.Uk=function(){var a=this.g.Nc();if(this.le){this.bb&&(fb(this.bb),this.bb=n);if(a){a:{var b=this.W.nc.th.Qh,c=b.Yc[a];if(!c){c=b.Rh[a];c=!c?n:c.qj(b.zc);if(!c){a=n;break a}b.Yc[a]=c}a=c.rj()}this.bb=a}this.le=q}};We.prototype.Nc=function(){return this.g.Nc()}; We.prototype.ve=function(a){this.g.ve(a);a=this.g.Nc();a=a.length?a:n;if(a!=(this.bb?this.bb.Ph.id:n)&&!this.le)this.le=k,ld(this.W.jb,ne,0,this.Uk,this)};function Xe(a,b,c,d){We.call(this,a,b,c,d)}y(Xe,We);function Ye(){this.buffer=new Uint8Array(0);this.offset=0;this.S=new Float32Array(16);this.$=new Uint8Array(this.S.buffer);this.Bj=(this.Kc=u.Float64Array?new Float64Array(1):n)?new Uint8Array(this.Kc.buffer):n}s=Ye.prototype;s.ya=function(a,b){this.buffer=a instanceof Uint8Array?a:new Uint8Array(a);this.offset=b};function Me(a){var b=a.buffer[a.offset++];a=a.buffer[a.offset++];b=b<<8|a;return 32767<b?b-65536:b} function Ze(a){var b=a.buffer[a.offset++],c=a.buffer[a.offset++],d=a.buffer[a.offset++];a=a.buffer[a.offset++];b=b<<24|c<<16|d<<8|a;return 2147483647<b?b-4294967296:b}function Ke(a){return a.buffer[a.offset++]}function Le(a){var b=a.buffer[a.offset++];a=a.buffer[a.offset++];return b<<8|a}s.ca=function(){var a=this.buffer[this.offset++],b=this.buffer[this.offset++],c=this.buffer[this.offset++],d=this.buffer[this.offset++];return a<<24|b<<16|c<<8|d}; s.q=function(){for(var a=0,b=0,c;(c=this.buffer[this.offset++]&255)&128;)a|=(c&127)<<b,b+=7;return a|c<<b};s.ke=function(){var a=this.q();return(a<<31>>31^a)>>1^a&-2147483648};s.ji=function(){this.$[0]=this.buffer[this.offset++];this.$[1]=this.buffer[this.offset++];this.$[2]=this.buffer[this.offset++];this.$[3]=this.buffer[this.offset++];return this.S[0]};s.Sk=function(){for(var a=0;12>a;a++)this.$[a]=this.buffer[this.offset++];return this.S}; s.Tk=function(){for(var a=0;16>a;a++)this.$[a]=this.buffer[this.offset++];return this.S};s.F=function(){var a=Le(this);Le(this);for(var b=Array(a),c=0;c<a;){var d=this.buffer[this.offset++];if(128>d)b[c++]=String.fromCharCode(d);else if(191<d&&224>d){var e=this.buffer[this.offset++];b[c++]=String.fromCharCode((d&31)<<6|e&63)}else{var e=this.buffer[this.offset++],f=this.buffer[this.offset++];b[c++]=String.fromCharCode((d&15)<<12|(e&63)<<6|f&63)}}return b.join("")};var $e=n; function af(){$e||($e=new Ye);return $e};function bf(a,b,c){var d=a>>24&255,e=a>>16&255,f=a>>8&255;a&=255;return(d+c*((b>>24&255)-d)&255)<<24|(e+c*((b>>16&255)-e)&255)<<16|(f+c*((b>>8&255)-f)&255)<<8|a+c*((b&255)-a)&255};function S(a,b){this.Ma=a;this.Zc=0;this.u=b}S.prototype.wh=function(a){var b=T(a,this.j);return"target."+T(a,this.k)+"(source."+b+"());"};S.prototype.Wb=function(a){var b=T(a,this.j);return"result."+T(a,this.k)+"(target."+b+"());