////////////////////////////////////////////////////////////////////// // Pano2VR 6.0.1/17227 HTML5/CSS3 & WebGL Panorama Player // // License: BKYM.COM // // (c) 2018, Garden Gnome Software, http://ggnome.com // ////////////////////////////////////////////////////////////////////// var G="function"==typeof Object.defineProperties?Object.defineProperty:function(m,f,h){m!=Array.prototype&&m!=Object.prototype&&(m[f]=h.value)},N="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function O(m,f){if(f){var h=N;m=m.split(".");for(var d=0;dh&&(h=Math.max(0,b+h));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(h=Number(h||0);hd;)d+= 360;for(;180p&&(p=a.f.c);this.Rb||(this.Rb=new m.wa,this.Rb.Kk(this.pan,this.i));0!=this.mode&&1!=this.mode||!c||this.dd&&this.dd.gain.setValueAtTime(this.level*a.V*this.la,c.currentTime);if(2==this.mode&&c){var t=.5*Math.cos(d*Math.PI/180)+.5;this.Uc=Math.sqrt(t)*this.la*this.level*a.V;this.Vc=Math.sqrt(t)*this.la*this.level*a.V;this.Dc=Math.sqrt(1-t)*this.la*this.level*a.V;this.Ec=Math.sqrt(1-t)*this.la*this.level*a.V;this.Rg()}if(3==this.mode){0> d?d<-this.tb?d+=this.tb:d=0:d=d>this.tb?d-this.tb:0;var g=this.level;b=Math.abs(b);b=bp||0>h)t=g*e*a.V,c?(this.Uc=t*this.la,this.Vc=t*this.la,this.Ec=this.Dc=0,this.Rg()):this.b.volume=g*e*a.V;else if(t=1-Math.abs(d/p),c){var f=g*(e+(1-e)*h*t)*a.V;t=g*e*a.V;0<=d?(this.Uc=f*this.la,this.Vc=t*this.la):(this.Uc=t*this.la,this.Vc=f*this.la);2*Math.abs(d)d?d=d>-this.tb?0:d+this.tb:d=d no audio buffer -> playWhenReady"),this.xj=!0)};b.prototype.Hi=function(){var a=this.g.xa.currentTime-this.Vg;this.Se();this.ze=a};b.prototype.Se=function(){this.Gb&&this.Be&&(this.stopped=!0,this.Gb.disconnect(),this.Gb.stop(0),this.Gb=null);this.Vg=this.ze=0;this.Be=!1};b.prototype.en=function(){var a=this.g.xa;return this.ze?this.ze:this.Vg?a.currentTime-this.Vg:0};b.prototype.fn=function(a){this.Se();this.ze=a;this.Yc()};b.prototype.addElement=function(){var a= -1,c=this,b=this.g,d=this.g.xa;try{for(var e=!1,p=0;pa.loop&&(a.b.preload="none"));a.b.volume=a.level*c.V;1<=a.loop&&(a.sc=a.loop-1);if((1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&0<=a.loop){a.b.autoplay=!0;a.ul=!0;a.autoplay=!0;var e=a.b.play();if(void 0!==e)e.then(function(){})["catch"](function(){a.Nj&&(a.b.muted=!0,a.b.play())})}c.I.push(this);c.fh?c.T.appendChild(a.b):(a.b.style.position="absolute",a.Ic&&(a.b.width=a.Ic),a.fd&&(a.b.height=a.fd),c.D.appendChild(a.b),this.g.dg&&this.Nj?this.bk=!0:a.oh());a.b.addEventListener("ended", function(){a.nq()},!1)}catch(p){c.M(p)}};b.prototype.registerElement=function(a,c){this.md=!0;this.b=c;this.id=a;this.level=1;this.g.I.push(this)};b.prototype.Gd=function(){var a=this.g;a.fh&&(a.H.deleteTexture(this.oc),this.oc=0,a.T.removeChild(this.b));a.Cm&&a.D.removeChild(this.b);this.b=null};return b}(h);m.hk=h;h=function(d){function b(a){a=d.call(this,a)||this;a.url="";a.va=0;a.Da=0;a.kb=0;a.f=50;a.Ua=0;a.rg=!1;a.Ic=100;a.fd=100;a.xd=1;return a}__extends(b,d);b.prototype.Ob=function(a){d.prototype.Ob.call(this, a);var c;if(c=a.getAttributeNode("url"))this.url=c.nodeValue.toString();if(c=a.getAttributeNode("rotx"))this.va=Number(c.nodeValue);if(c=a.getAttributeNode("roty"))this.Da=Number(c.nodeValue);if(c=a.getAttributeNode("rotz"))this.kb=Number(c.nodeValue);if(c=a.getAttributeNode("fov"))this.f=Number(c.nodeValue);if(c=a.getAttributeNode("width"))this.Ic=Number(c.nodeValue);if(c=a.getAttributeNode("height"))this.fd=Number(c.nodeValue);this.xd=(c=a.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c= a.getAttributeNode("clickmode"))this.Ua=Number(c.nodeValue);if(c=a.getAttributeNode("handcursor"))this.rg=1==Number(c.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(c=a.getAttributeNode("url"))&&(this.url=c.nodeValue.toString()),a=a.nextSibling};b.prototype.og=function(){this.mg=!1;this.b.style[this.g.cd]="none"};b.prototype.re=function(){1!==this.Ua&&4!==this.Ua||this.ng(!this.eb)};b.prototype.ng=function(a){var c=this.g;if(1===this.Ua||4===this.Ua)this.eb=a,this.g.Fb?(a=this.g.ia)&&a.activateSound(this.id, this.eb?1:0):(this.eb?(this.b.style.pointerEvents="auto",this.b.style.cursor="pointer",this.b.style.zIndex=(c.kh+8E4).toString()):(this.b.style.pointerEvents="none",this.b.style.cursor="default",this.b.style.zIndex=c.kh.toString()),this.b.style[c.cd]="all 1s ease 0s",this.mg=!0,c.wm())};b.prototype.addElement=function(){var a=this,c=this.g;try{a.b=document.createElement("img");a.b.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");a.b.setAttribute("class","ggmedia"); a.b.hidden=!0;a.b.addEventListener("click",function(a){a.stopPropagation()});c.ef&&a.b.setAttribute("id",c.ef+a.id);a.b.ondragstart=function(){return!1};if(1===a.Ua||4===a.Ua)a.b.addEventListener(c.Im(),function(){a.og()},!1),a.b.addEventListener("transitionend",function(){a.og()},!1);a.b.setAttribute("src",c.kc(a.url));a.Ic&&(a.b.width=a.Ic);a.fd&&(a.b.height=a.fd);c.Sa.push(a);a.b.style.position="absolute";c.D.appendChild(a.b)}catch(k){c.M("Error addimage:"+k)}};b.prototype.Gd=function(){this.g.D.removeChild(this.b); this.b=null};return b}(f);m.Rm=h;f=function(d){function b(a){a=d.call(this,a)||this;a.nk=50;a.alpha=50;a.type=0;a.color=16777215;return a}__extends(b,d);b.prototype.Ob=function(a){d.prototype.Ob.call(this,a);var c;if(c=a.getAttributeNode("blinding"))this.nk=Number(c.nodeValue);if(c=a.getAttributeNode("alpha"))this.alpha=Number(c.nodeValue);if(c=a.getAttributeNode("type"))this.type=Number(c.nodeValue);if(c=a.getAttributeNode("color"))this.color=Number(c.nodeValue)};return b}(f);m.Sm=f;f=function(){function d(b){this.type= "empty";this.Lj=this.id=this.target=this.description=this.title=this.url="";this.jh=100;this.qg=20;this.zi=!1;this.b=null;this.vb=this.Nb=this.nb=this.pa=this.i=this.pan=0;this.visible=!0;this.hc=b.A.hc;this.ec=b.A.ec;this.gc=b.A.gc;this.dc=b.A.dc;this.bf=b.A.bf;this.Mf=[]}d.prototype.Ye=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.i;this.url=this.url;this.target=this.target;this.title=this.title;this.description=this.description;this.skinid=this.Lj;this.obj=this.b};d.prototype.Ob= function(b){var a;if(a=b.getAttributeNode("url"))this.url=a.nodeValue.toString();if(a=b.getAttributeNode("target"))this.target=a.nodeValue.toString();if(a=b.getAttributeNode("title"))this.title=a.nodeValue.toString();if(a=b.getAttributeNode("description"))this.description=a.nodeValue.toString();if(a=b.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=b.getAttributeNode("skinid"))this.Lj=a.nodeValue.toString();if(a=b.getAttributeNode("width"))this.jh=Number(a.nodeValue);if(a=b.getAttributeNode("height"))this.qg= Number(a.nodeValue);if(a=b.getAttributeNode("wordwrap"))this.zi=1==Number(a.nodeValue);this.pan=(a=b.getAttributeNode("pan"))?Number(a.nodeValue):0;this.i=(a=b.getAttributeNode("tilt"))?Number(a.nodeValue):0;if(a=b.getAttributeNode("bordercolor"))this.hc=Number(a.nodeValue);if(a=b.getAttributeNode("backgroundcolor"))this.ec=Number(a.nodeValue);if(a=b.getAttributeNode("borderalpha"))this.gc=Number(a.nodeValue);if(a=b.getAttributeNode("backgroundalpha"))this.dc=Number(a.nodeValue);if(a=b.getAttributeNode("handcursor"))this.bf= 1==Number(a.nodeValue);for(b=b.firstChild;b;){if("polystring"==b.nodeName){a=b.textContent.toString().split("|");for(var c=0;cb;b++)2>b%3&&(l[b]*=d);k.bufferData(k.ARRAY_BUFFER,new Float32Array(l),k.STATIC_DRAW);this.je=k.createBuffer();k.bindBuffer(k.ARRAY_BUFFER,this.je);var e=[1,0,0,0,0,1,1,1];k.bufferData(k.ARRAY_BUFFER,new Float32Array(e),k.STATIC_DRAW);this.$c=k.createBuffer();k.bindBuffer(k.ELEMENT_ARRAY_BUFFER, this.$c);var p=[0,1,2,0,2,3];k.bufferData(k.ELEMENT_ARRAY_BUFFER,new Uint16Array(p),k.STATIC_DRAW);l=[];p=[];e=[];var f=new m.wa;for(d=0;6>d;d++){var g=d%3;var q=3>d?1:0;for(a=0;4>a;a++){f.x=-1;f.y=-1;f.z=1;for(b=0;bf.x?.33:0)+.33*g,(0>f.y?0:.5)+.5*q);if(4>d)for(b=0;ba;a++){var c=b.createTexture();this.gd++; c.pf=null;c.ve=null;c.hl=!1;b.bindTexture(b.TEXTURE_2D,c);b.texImage2D(b.TEXTURE_2D,0,b.RGB,1,1,0,b.RGB,b.UNSIGNED_BYTE,null);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);if(d.We[a]){var k=new Image;k.crossOrigin=d.crossOrigin;k.src=d.kc(d.We[a]);c.pf=k;k.addEventListener&&k.addEventListener("load",this.fj(c),!1);d.Sb.push(k)}this.Va.push(c)}for(a=0;6>a;a++)d.uh[a]&& (k=new Image,k.crossOrigin=d.crossOrigin,k.src=d.kc(d.uh[a]),k.addEventListener?k.addEventListener("load",this.fj(this.Va[a]),!1):k.onload=this.fj(this.Va[a]),this.Va[a].ve=k,d.Sb.push(k));for(a=0;ad;d++)this.Cf(d),b.bindBuffer(b.ARRAY_BUFFER,this.Qi),b.vertexAttribPointer(this.F.Z,3,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,this.je),b.vertexAttribPointer(this.F.Ca,2,b.FLOAT,!1,0,0),6<=this.Va.length&&this.Va[d].loaded&&(b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,this.Va[d]),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.$c),b.uniform1i(this.F.vf,0),b.uniformMatrix4fv(this.F.Jg,!1,this.ma),b.uniformMatrix4fv(this.F.Vd, !1,this.sb),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0))}};f.prototype.ui=function(){var d=this.g;if(d.h.rf&&6>16&255)/255,(b>>8&255)/255,(b>>0&255)/255,1)}};f.prototype.Cf=function(d,b){void 0===b&&(b=1);var a=this.g;m.$.te(this.ma);m.$.rotate(this.ma,b*-a.O.c*Math.PI/180,[0,0,1]);m.$.rotate(this.ma,b*-a.i.c*Math.PI/180,[1,0,0]);-1==b?m.$.rotate(this.ma,-a.pan.c*Math.PI/180,[0,1,0]):m.$.rotate(this.ma,(180-a.pan.c)*Math.PI/180,[0,1,0]); a.$a&&(m.$.rotate(this.ma,-a.$a.pitch*Math.PI/180,[1,0,0]),m.$.rotate(this.ma,a.$a.O*Math.PI/180,[0,0,1]));4>d?m.$.rotate(this.ma,-Math.PI/2*d,[0,1,0]):m.$.rotate(this.ma,Math.PI/2*(5==d?1:-1),[1,0,0])};f.prototype.Wp=function(d){var b=this;return function(){b.Vi.push(d)}};f.prototype.un=function(d){this.g.Ea=!0;this.g.ad=!0;d.loaded=!0;d.Dj=0;d.Xd=0;var b=this.g.H;this.Bk();b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,1);if(null!=d.h&&d.h.complete){d.gb=b.createTexture();this.g.gd++;b.bindTexture(b.TEXTURE_2D, d.gb);try{b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,d.h)}catch(a){b.texImage2D(b.TEXTURE_2D,0,b.RGBA,1,1,0,b.RGBA,b.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.g.M(a)}}this.g.update(2)};f.prototype.Bk=function(){this.g.Qb&&this.g.Qb--};f.prototype.vn=function(){if(0l;l++){var e=new m.Kd;e.K=document.createElement("canvas");b.g.Y?(e.K.width=c.width+2*k,e.K.height=c.height+2*k):(e.K.width=a.G+2*k,e.K.height=a.G+2*k);e.Pa=e.K.getContext("2d");e.K.style[b.g.Ra+"Origin"]="0% 0%";e.K.style.overflow="hidden";e.K.style.position="absolute";e.h=d;var p=c.width+2*k,f=c.height+2*k;e.Pa&&e.Pa.drawImage(d,0,l*f,p,f,0,0,p,f);if(b.g.Y&&b.g.H){var g=b.g.H;g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,1);e.gb=g.createTexture();b.g.gd++;g.bindTexture(g.TEXTURE_2D, e.gb);try{g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,e.K)}catch(q){b.g.M(q)}g.bindTexture(g.TEXTURE_2D,null);g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,0)}b.g.Tc&&(e.K.Sd=-1,b.g.D.insertBefore(e.K,b.g.D.firstChild));c.U[l]=e}c.loaded=!0}}catch(q){b.g.M(q)}b.g.update(2)}};f.prototype.sm=function(d){var b=this;return function(){b.g.Ea=!0;b.g.ad=!0;b.Bk();d.h=null}};f.prototype.rq=function(){var d=this.g,b=d.h,a=d.h.J;d.ne&&(d.Jc(0),d.Sc());if(d.H){var c=d.H;c.useProgram(this.F);this.ui();c.clear(c.DEPTH_BUFFER_BIT); c.enable(c.DEPTH_TEST);m.$.te(this.sb);m.$.perspective(d.Jb(),d.rb.width/d.rb.height,.1,100,this.sb);c.uniformMatrix4fv(this.F.Vd,!1,this.sb);d.ym();d.qj();var k=d.Yi();var l=a.length-1;for(d.pc=0;l>=k;){var e=a[l],p=1;l==a.length-1&&0==b.Ja&&(p=b.G/(b.G-.5));for(var f=0;6>f;f++){var g=d.ob.cb[f];var q=g.mf;if(g.fb&&0A;A++)x[A]=0==A%3?p*v*(-2*x[A]/e.width+1):1==A%3?p*v*(-2*x[A]/e.height+ 1):v;c.bufferData(c.ARRAY_BUFFER,new Float32Array(x),c.STATIC_DRAW)}}else q=!1;u.visible=g.fb}n.oj=q}}l--}for(f=0;6>f;f++)if(g=d.ob.cb[f],g.fb)for(q=g.mf,this.Cf(f),c.uniform1i(this.F.vf,0),c.uniformMatrix4fv(this.F.Vd,!1,this.sb),c.uniformMatrix4fv(this.F.Jg,!1,this.ma),c.enableVertexAttribArray(this.F.Z),c.enableVertexAttribArray(this.F.Ca),c.bindBuffer(c.ARRAY_BUFFER,this.je),c.vertexAttribPointer(this.F.Ca,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.$c), c.useProgram(this.F),l=k;l<=a.length-1;){e=a[l];if(g.fb&&0l?A.Ce(-90*l):A.Hd(5==l?90:-90);p.$a&&(A.De(p.$a.O),A.Hd(-p.$a.pitch));A.Ce(-p.pan.c);A.Hd(p.i.c);A.De(p.O.c);for(l=0;l<=k;l++)for(var w= 0;w<=k;w++){var B=2*(q+w*n)-1;var z=2*(a+l*h)-1;x.x=1*B;x.y=1*z;x.z=-1;x.normalize();A.Lo(x);B=this.$k(x,f,p.ra());0!=p.nc&&1>u&&(B=B&&this.$k(x,r,p.nc),f.x=f.x*u+r.x*(1-u),f.y=f.y*u+r.y*(1-u));B?-1E10f.x&&-1E10f.y?-2f.x&&-2f.y&&(b+=f.x,c+=f.y,v++):f.x=NaN:f.x=NaN;d.hd[d.Fh++]=f.x;d.hd[d.Fh++]=f.y}0p;p++)isNaN(d.hd[2*c[0]])&&(k=!1);if(k){var f=!1,g=!1,q=!1,n=!1;for(p=0;4>p;p++){var h=d.hd[2*c[p]];hh;h++)for(var r=0;r=l;){var x={};g=a[p];var A=null;0>q-p),h,-(0!=d.nc)?.3:.1);z.visible=0d.f.c&&pd.we){d.M("Excided painted tiles");this.mi=!1;break}z.gb&&(f=h=b.G,v==g.L-1&&(h=g.width-b.G*v),r==g.ea-1&&(f=g.height-b.G*r),h=(h+2*b.Ja)/b.G,f=(f+2*b.Ja)/b.G,c.bindTexture(c.TEXTURE_2D,z.gb),c.uniform2f(c.getUniformLocation(k,"uCanvasDimensions"),d.o.width,d.o.height),q=c.getUniformLocation(k,"srcScale"),c.uniform2f(q,.5*g.width/b.G/h,.5*g.height/b.G/f), q=c.getUniformLocation(k,"srcOffset"),c.uniform2f(q,(.5*g.width+b.Ja-b.G*v)/b.G/h,-(.5*g.height+b.Ja-b.G*r)/b.G/f+1),q=c.getUniformLocation(k,"zOffset"),c.uniform1f(q,(p+1)/(a.length+5)),h=c.getAttribLocation(k,"aVertexPosition"),c.disableVertexAttribArray(0),c.disableVertexAttribArray(1),c.disableVertexAttribArray(2),c.enableVertexAttribArray(h),c.activeTexture(c.TEXTURE0),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D, c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.bindBuffer(c.ARRAY_BUFFER,this.wo),c.vertexAttribPointer(h,2,c.FLOAT,!1,0,0),c.bufferData(c.ARRAY_BUFFER,new Float32Array(z.hd),c.DYNAMIC_DRAW),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.vo),c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(z.se),c.DYNAMIC_DRAW),c.drawElements(c.TRIANGLES,z.yd,c.UNSIGNED_SHORT,0),e++)}p++}c.disable(c.CULL_FACE);c.cullFace(c.FRONT_AND_BACK);d.ad=!1}};f.prototype.vi=function(d, b){var a=this.g.H;m.$.te(this.ma);this.Cf(d,-1);a.uniformMatrix4fv(a.getUniformLocation(b,"matRotate"),!1,this.ma)};f.prototype.Wo=function(){var d=this.g;if(d.H){var b=d.H,a=this.Yl;b.useProgram(a);this.vi(0,a);b.uniform2f(b.getUniformLocation(a,"uCanvasDimensions"),d.o.width,d.o.height);if(1==d.s.format){var c=b.getUniformLocation(a,"srcScale");b.uniform2f(c,-.5/Math.PI,(d.s.bj?-1:1)/Math.PI)}14==d.s.format&&(c=b.getUniformLocation(a,"srcScale"),b.uniform2f(c,1-2*d.s.Pe/(d.s.width/3),1-2*d.s.Pe/ (d.s.height/2)));c=b.getUniformLocation(a,"srcOffset");b.uniform2f(c,.5,.5);this.Wj(a);c=b.getUniformLocation(a,"cubeTexture");b.uniform1i(c,0);c=b.getAttribLocation(a,"aVertexPosition");b.disableVertexAttribArray(0);b.disableVertexAttribArray(1);b.disableVertexAttribArray(2);b.enableVertexAttribArray(c);b.bindBuffer(b.ARRAY_BUFFER,this.di);b.vertexAttribPointer(c,2,b.FLOAT,!1,0,0);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,d.s.oc);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE); b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.$c);b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0)}};f.prototype.Wj=function(d){var b=this.g,a=b.H,c=this.g.o,k=c.width/c.height;switch(b.f.mode){case 1:k=1;break;case 2:k=c.width/Math.sqrt(c.width*c.width+c.height*c.height);break;case 3:4*c.height/3e;e++)this.Va[e].ve.complete?this.th[e]||(l=!0):c=!1,this.Va[e].pf.complete||(k=!1);if(k||c)if(!k||c||!this.yc||l){e=Math.round(d.qc/d.Ff);k=(d.qc-e)/2;d.M("paint cube single - isMain: "+c+" overlap: "+k);this.Ve=0;this.yc||(this.yc=b.createTexture());d.gd++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.yc);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL, 1);l=document.createElement("canvas");l.width=e;l.height=e;var p=l.getContext("2d");for(e=0;6>e;e++){var f=a[e];this.Va[f].ve.complete?this.th[f]||(p.drawImage(this.Va[f].ve,-k,-k),b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,l),this.th[f]=!0):(p.drawImage(this.Va[f].pf,-k,-k,d.qc,d.qc),b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,l))}this.vg=!c}};f.prototype.sn=function(){var d=this.g,b=this.g.h,a=d.h.J,c=d.H,k;var l=a.length-1;if(!(0> l)){a[l].qf&&l--;var e=512;d.ug&&(e=256);!d.uf&&2<=d.devicePixelRatio&&(e=512);for((k=c.getParameter(c.MAX_CUBE_MAP_TEXTURE_SIZE))&&kl){e=a[l];d.M("paint cube level "+l);this.Ve=l;a=d.h.Ja;l=0e.width&&(1500g;g++){for(var h=0;hk;k++)for(var l=0;lb;b++)for(var a=0;a1.1*d.qm)for(this.Qd.sort(function(a,c){return c.zg-a.zg});this.Qd.length>d.qm;)p=this.Qd.pop(),p.gb&&(a.deleteTexture(p.gb),d.gd--,p.gb=0),p.h=null,p.af&&(a.deleteBuffer(p.af),p.af=0),e=p.level.U.indexOf(p),d.M("delete "+e+" "+(c-p.zg)),delete p.level.U[e]}; f.prototype.lq=function(){var d=this.g;if(d.H){var b=this.g.H;b.disable(b.DEPTH_TEST);var a;for(a=0;ab;b++)this.Cf(0),a.bindBuffer(a.ARRAY_BUFFER,d.s.$j),a.vertexAttribPointer(this.F.Z,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,d.s.oi),a.vertexAttribPointer(this.F.Ca,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,d.s.jj),a.uniform1i(this.F.vf,0),a.uniformMatrix4fv(this.F.Jg,!1,this.ma),a.uniformMatrix4fv(this.F.Vd, !1,this.sb),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};f.prototype.jq=function(){var d=this.g,b=d.H,a=d.s;if(0=a.A.mode&&(k=0);3==a.A.mode&& (k=a.A.pa);for(d=0;d>16&255)/255,(b>>8&255)/255,(b&255)/255);var g=c.getUniformLocation(this.Ed,"uAlpha");c.uniform1f(g,l.gc*p);c.vertexAttribPointer(this.Ed.Z,3,c.FLOAT,!1,0,0);c.drawArrays(c.LINE_LOOP,0,f.length/3);b=l.ec;c.uniform3f(e,(b>>16&255)/255,(b>>8&255)/255,(b&255)/255);c.uniform1f(g,l.dc*p);c.enable(c.STENCIL_TEST);c.clearStencil(0);c.clear(c.STENCIL_BUFFER_BIT);c.colorMask(!1,!1,!1,!1);c.stencilFunc(c.ALWAYS, 1,1);c.stencilOp(c.INCR,c.INCR,c.INCR);c.drawArrays(c.TRIANGLE_FAN,0,f.length/3);c.colorMask(!0,!0,!0,!0);c.stencilFunc(c.EQUAL,1,1);c.stencilOp(c.ZERO,c.ZERO,c.ZERO);c.drawArrays(c.TRIANGLE_FAN,0,f.length/3);c.disable(c.BLEND);c.enable(c.DEPTH_TEST);c.disable(c.STENCIL_TEST);c.useProgram(this.F)}}}}};f.prototype.Vj=function(){var d=this.g,b=d.h;if(d.o.width!=d.D.offsetWidth||d.o.height!=d.D.offsetHeight)d.o.width=d.D.offsetWidth,d.o.height=d.D.offsetHeight;d.ne&&(d.Jc(0),d.Sc());if(d.H){var a=d.H; this.ui();a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.useProgram(this.eg);var c=a.getUniformLocation(this.eg,"uRect");a.uniform2f(a.getUniformLocation(this.eg,"uCanvasDimensions"),d.o.width,d.o.height);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.$c);var k=a.getAttribLocation(this.eg,"aVertexPosition");a.disableVertexAttribArray(0);a.disableVertexAttribArray(1);a.disableVertexAttribArray(2);a.enableVertexAttribArray(k);a.bindBuffer(a.ARRAY_BUFFER, this.je);a.vertexAttribPointer(k,2,a.FLOAT,!1,0,0);d.pc=0;var l=100/d.f.c;var e=b.width/b.height;k=d.o.height*l*e;l*=d.o.height;e=(d.pan.c/100/e-.5)*k+d.o.width/2;for(var p=(d.i.c/100-.5)*l+d.o.height/2,f,g,h,n=0;b.J.length>=n+2&&b.J[n+1].width>k;)n++;var y;var r=[];for(y=b.J.length-1;y>=n;){var v=b.J[y];if(v.cache){var u={Ya:0,zb:0};u.Bb=v.L-1;u.Cb=v.ea-1}else{u={};f=-p/l*(v.height/d.h.G);g=(-e+d.o.width)/k*(v.width/d.h.G);var x=(-p+d.o.height)/l*(v.height/d.h.G);u.Ya=Math.min(Math.max(0,Math.floor(-e/ k*(v.width/d.h.G))),v.L-1);u.zb=Math.min(Math.max(0,Math.floor(f)),v.ea-1);u.Bb=Math.min(Math.max(0,Math.floor(g)),v.L-1);u.Cb=Math.min(Math.max(0,Math.floor(x)),v.ea-1)}r[y]=u;var A=!0;for(g=u.zb;g<=u.Cb;g++)for(f=u.Ya;f<=u.Bb;f++)h=f+g*v.L,x=v.U[h],x||(x=new m.Kd,v.U[h]=x),this.xh()?x.h||(this.Qh(x,v,d.He(0,y,f,g)),d.Ea=!0):this.g.pc++,x.h&&x.h.complete||(A=!1),x.visible=!0;u.oj=A;y--}for(y=b.J.length-1;y>=n;){v=b.J[y];if(r[y]&&0<=r[y].Ya)for(u=r[y],g=u.zb;g<=u.Cb;g++)for(f=u.Ya;f<=u.Bb;f++)h=f+ g*v.L,(x=v.U[h])&&x.h&&x.h.complete&&(d=e+(-b.Ja+b.G*f)*k/v.width,a.uniform4f(c,d,p+(-b.Ja+b.G*g)*l/v.height,x.h.width*k/v.width,x.h.height*l/v.height),x&&x.gb&&(a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.$c),a.bindTexture(a.TEXTURE_2D,x.gb),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.drawElements(a.TRIANGLES, 6,a.UNSIGNED_SHORT,0)));y--}this.Ej()}};f.prototype.ei=function(){var d=this.g.H;if(d&&this.Va)for(;0b;b++)this.cb[b]=new f}d.prototype.qn=function(b,a,c,d){for(var k=0;6>k;k++){var e;if(e=this.cb[k]){var f=[];f.push(new m.wa(-1,-1,-1,0,0));f.push(new m.wa(1,-1,-1,1,0));f.push(new m.wa(1,1,-1,1,1));f.push(new m.wa(-1,1,-1,0,1));for(var t=0;tk?f[t].Da(-Math.PI/2*k):f[t].va(Math.PI/2*(4===k?-1:1)),d&&(f[t].kb(d.O* Math.PI/180),f[t].va(-d.pitch*Math.PI/180)),f[t].Da(-b*Math.PI/180),f[t].va(a*Math.PI/180),f[t].kb(c*Math.PI/180);e.fb=0 uRadius) {\n alpha = 1.0;\n } else {\n alpha = 1.0 - ((uRadius - distFromCenter) / uSoftEdge);\n };\n }\n else {\n float alphaFromLeft = 1.0 - ((gl_FragCoord.x -(uIrisCenter.x - uRectDim.x)) / uSoftEdge);\n float alphaFromRight = 1.0 - (((uIrisCenter.x + uRectDim.x) - gl_FragCoord.x) / uSoftEdge);\n float alphaFromTop = 1.0 - ((gl_FragCoord.y -(uIrisCenter.y - uRectDim.y)) / uSoftEdge);\n float alphaFromBottom = 1.0 - (((uIrisCenter.y + uRectDim.y) - gl_FragCoord.y) / uSoftEdge);\n alpha = max(max(alphaFromLeft, alphaFromRight), max(alphaFromTop, alphaFromBottom));\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Ha=d.createProgram();d.attachShader(this.Ha,b);d.attachShader(this.Ha,a);d.linkProgram(this.Ha);d.getProgramParameter(this.Ha,d.LINK_STATUS)||alert("Could not initialise shaders");this.Ha.Z=d.getAttribLocation(this.Ha,"aVertexPosition");d.enableVertexAttribArray(this.Ha.Z);this.Ha.Ca=d.getAttribLocation(this.Ha,"aTextureCoord");d.enableVertexAttribArray(this.Ha.Ca);a=d.createShader(d.FRAGMENT_SHADER); d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uPercent;\nuniform int uDirection;\nuniform vec2 uCanvasDimensions;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n float alpha = 0.0;\n if (uDirection == 1) {\n\t if (gl_FragCoord.x > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.x) / uSoftEdge);\n }\n }\n if (uDirection == 2) {\n\t if (gl_FragCoord.x < uCanvasDimensions.x - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.x - (uCanvasDimensions.x - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 3) {\n\t if (gl_FragCoord.y < uCanvasDimensions.y - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.y - (uCanvasDimensions.y - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 4) {\n\t if (gl_FragCoord.y > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.y) / uSoftEdge);\n }\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Na=d.createProgram();d.attachShader(this.Na,b);d.attachShader(this.Na,a);d.linkProgram(this.Na);d.getProgramParameter(this.Na,d.LINK_STATUS)||alert("Could not initialise shaders");this.Na.Z=d.getAttribLocation(this.Na,"aVertexPosition");d.enableVertexAttribArray(this.Na.Z);this.Na.Ca=d.getAttribLocation(this.Na,"aTextureCoord");d.enableVertexAttribArray(this.Na.Ca)};f.prototype.Jc=function(){var d= this.g.H;if(!d)return!1;if(this.ac=d.createFramebuffer()){d.bindFramebuffer(d.FRAMEBUFFER,this.ac);this.ac.width=1024;this.ac.height=1024;this.Je=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.Je);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,this.ac.width,this.ac.height,0,d.RGBA,d.UNSIGNED_BYTE,null);var b=d.createRenderbuffer();d.bindRenderbuffer(d.RENDERBUFFER,b);d.renderbufferStorage(d.RENDERBUFFER, d.DEPTH_COMPONENT16,this.ac.width,this.ac.height);d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,this.Je,0);d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,b);d.bindTexture(d.TEXTURE_2D,null);d.bindRenderbuffer(d.RENDERBUFFER,null);d.bindFramebuffer(d.FRAMEBUFFER,null);this.jb=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.jb);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),d.STATIC_DRAW);this.jb.Lc=3;this.jb.Ud=4;this.sf= d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.sf);d.bufferData(d.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),d.STATIC_DRAW);return!0}return!1};f.prototype.Nl=function(d){var b=this.g.H,a=this.g.rb;if(this.sd){b.useProgram(this.oa);b.bindBuffer(b.ARRAY_BUFFER,this.jb);b.vertexAttribPointer(this.oa.Z,this.jb.Lc,b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,this.sf);b.vertexAttribPointer(this.oa.Ca,2,b.FLOAT,!1,0,0);b.enableVertexAttribArray(this.oa.Z);b.enableVertexAttribArray(this.oa.Ca);b.activeTexture(b.TEXTURE0); b.bindTexture(b.TEXTURE_2D,this.Je);a=1+(this.yb-1)*d;var c=b.getUniformLocation(this.oa,"uAlpha");b.uniform1f(c,1);c=b.getUniformLocation(this.oa,"uZoomIn");b.uniform1i(c,1);c=b.getUniformLocation(this.oa,"uZoomCenter");var k=.5+(this.lh-.5)*Math.sqrt(d),l=.5+(this.mh-.5)*Math.sqrt(d);0>k-.5/a&&(k=.5/a);0>l-.5/a&&(l=.5/a);1k-.5/this.yb&&(k=.5/this.yb);0>l-.5/this.yb&&(l=.5/this.yb);1>16&255)/255,(this.Qe>>8&255)/255,(this.Qe&255)/255),c=b.getUniformLocation(this.Ta,"uZoomIn"),b.uniform1i(c,1==this.Oa||2==this.Oa?1:0),c=b.getUniformLocation(this.Ta,"uZoomCenter"),b.uniform2f(c,k,l),k=b.getUniformLocation(this.Ta,"uZoomFactor"),b.uniform1f(k,this.yb),b.uniform1i(b.getUniformLocation(this.Ta,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){b.useProgram(this.Ha);b.bindBuffer(b.ARRAY_BUFFER, this.jb);b.vertexAttribPointer(this.Ha.Z,this.jb.Lc,b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,this.sf);b.vertexAttribPointer(this.Ha.Ca,2,b.FLOAT,!1,0,0);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,this.Je);if(1==this.Oa||2==this.Oa||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var e=c=.5;else c=this.lh,e=this.mh;var f=c*a.width,t=e*a.height;f=Math.max(f,a.width-f);t=Math.max(t,a.height-t);"irisround"==this.type||"irisroundcenter"==this.type?b.uniform1f(b.getUniformLocation(this.Ha, "uRadius"),(Math.sqrt(f*f+t*t)+this.Cc)*d):(f>t?(t=a.height/a.width*f+this.Cc,f+=this.Cc):(f=a.width/a.height*t+this.Cc,t+=this.Cc),b.uniform2f(b.getUniformLocation(this.Ha,"uRectDim"),f*d,t*d));d=b.getUniformLocation(this.Ha,"uSoftEdge");b.uniform1f(d,this.Cc);b.uniform1i(b.getUniformLocation(this.Ha,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);b.uniform2f(b.getUniformLocation(this.Ha,"uIrisCenter"),c*a.width,e*a.height);c=b.getUniformLocation(this.Ha,"uZoomIn");b.uniform1i(c, 1==this.Oa||2==this.Oa?1:0);c=b.getUniformLocation(this.Ha,"uZoomCenter");b.uniform2f(c,k,l);k=b.getUniformLocation(this.Ha,"uZoomFactor");b.uniform1f(k,this.yb);b.uniform1i(b.getUniformLocation(this.Ha,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)b.useProgram(this.Na),b.bindBuffer(b.ARRAY_BUFFER,this.jb),b.vertexAttribPointer(this.Na.Z,this.jb.Lc,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER, this.sf),b.vertexAttribPointer(this.Na.Ca,2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,this.Je),b.uniform1f(b.getUniformLocation(this.Na,"uPercent"),3>this.Ti?d*(a.width+this.Cc):d*(a.height+this.Cc)),d=b.getUniformLocation(this.Na,"uSoftEdge"),b.uniform1f(d,this.Cc),b.uniform1i(b.getUniformLocation(this.Na,"uDirection"),this.Ti),b.uniform2f(b.getUniformLocation(this.Na,"uCanvasDimensions"),a.width,a.height),c=b.getUniformLocation(this.Na,"uZoomIn"),b.uniform1i(c,1==this.Oa|| 2==this.Oa?1:0),c=b.getUniformLocation(this.Na,"uZoomCenter"),b.uniform2f(c,k,l),k=b.getUniformLocation(this.Na,"uZoomFactor"),b.uniform1f(k,this.yb),b.uniform1i(b.getUniformLocation(this.Na,"uSampler"),0);b.drawArrays(b.TRIANGLE_STRIP,0,this.jb.Ud);b.useProgram(this.g.na.F);b.disable(b.BLEND);b.enable(b.DEPTH_TEST)}};return f}();m.Nm=f})(ggP2VR||(ggP2VR={})); (function(m){var f=function(){function f(d){this.Zg=[];this.g=d;this.enabled=!1;this.xb=2;this.yk=!1}f.prototype.Gk=function(d){if(2==d.mode||3==d.mode||5==d.mode){var b=this.g.xa.currentTime,a=d.xc.gain.value,c=d.vc.gain.value,k=d.wc.gain.value;d.uc.gain.linearRampToValueAtTime(d.uc.gain.value,b);d.uc.gain.linearRampToValueAtTime(0,b+this.xb);d.xc.gain.linearRampToValueAtTime(a,b);d.xc.gain.linearRampToValueAtTime(0,b+this.xb);d.vc.gain.linearRampToValueAtTime(c,b);d.vc.gain.linearRampToValueAtTime(0, b+this.xb);d.wc.gain.linearRampToValueAtTime(k,b);d.wc.gain.linearRampToValueAtTime(0,b+this.xb)}else b=this.g.xa.currentTime,d.dd.gain.linearRampToValueAtTime(d.dd.gain.value,b),d.dd.gain.linearRampToValueAtTime(0,b+this.xb);d.yh=!0;setTimeout(function(){d.Gd()},1E3*this.xb+5)};f.prototype.Sp=function(){for(var d=0;da.la&&(a.la=d)}1==d&&clearInterval(this.Np)};return f}();m.Om=f})(ggP2VR||(ggP2VR={})); (function(m){var f=function(){function f(d){this.Dg=[];this.Zc=null;this.Zb=[];this.Tb=[];this.$b=[];this.Kj=!0;this.g=d;this.rn()}f.prototype.sg=function(){var d=this.g.H,b=d.createShader(d.VERTEX_SHADER);d.shaderSource(b,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");d.compileShader(b);d.getShaderParameter(b,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(b)),b=null);var a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCanvasDimensions;\nuniform vec2 uFlareCenterPosition;\nuniform float uBlindingValue;\nuniform float uAspectRatio;\nvoid main(void) {\n float canvasDiag = sqrt( (uCanvasDimensions.x * uCanvasDimensions.x) + (uCanvasDimensions.y * uCanvasDimensions.y) );\n vec2 diff = uFlareCenterPosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromFlarePoint = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = (distFromFlarePoint / canvasDiag) / 10.0;\n gl_FragColor = vec4(1.0, 1.0, 1.0, pow(((1.0 - factor) * 0.8) * uBlindingValue, 2.0));\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.fc=d.createProgram();d.attachShader(this.fc,b);d.attachShader(this.fc,a);d.linkProgram(this.fc);d.getProgramParameter(this.fc,d.LINK_STATUS)||alert("Could not initialise shaders");this.fc.Z=d.getAttribLocation(this.fc,"aVertexPosition");d.enableVertexAttribArray(this.fc.Z);a=d.createShader(d.VERTEX_SHADER);b=d.createShader(d.VERTEX_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);d.shaderSource(b,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n"); d.compileShader(b);d.getShaderParameter(b,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(b)),a=null);var c=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCircleTexturePosition;\nuniform vec3 uCircleColor;\nuniform float uCircleRadius;\nuniform float uCircleAlpha;\nuniform float uCircleSoftness;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 diff = uCircleTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromCircleCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float softnessDistance = uCircleRadius * (1.0 - uCircleSoftness);\n if (distFromCircleCenter > uCircleRadius)\n {\n\t gl_FragColor = vec4(uCircleColor, 0.0);\n }\n else if (distFromCircleCenter <= (softnessDistance))\n {\n\t float factor = distFromCircleCenter / softnessDistance;\n\t gl_FragColor = vec4(uCircleColor, pow((1.0 - (0.2 * factor)) * uCircleAlpha, 1.8));\n }\n else\n {\n\t float factor = (distFromCircleCenter - softnessDistance) / (uCircleRadius - softnessDistance);\n\t gl_FragColor = vec4(uCircleColor, pow((0.8 - (0.8 * factor)) * uCircleAlpha, 1.8));\n }\n}\n"); d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);this.qa=d.createProgram();d.attachShader(this.qa,a);d.attachShader(this.qa,c);d.linkProgram(this.qa);d.getProgramParameter(this.qa,d.LINK_STATUS)||alert("Could not initialise shaders");this.qa.Z=d.getAttribLocation(this.qa,"aVertexPosition");d.enableVertexAttribArray(this.qa.Z);a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uRingTexturePosition;\nuniform float uRingRadius;\nuniform float uRingAlpha;\nuniform float uAspectRatio;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec2 diff = uRingTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromRingCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = distFromRingCenter / uRingRadius;\n if (distFromRingCenter > uRingRadius)\n {\n\t gl_FragColor = vec4(1.0, 1.0, 1.0, 0.0);\n }\n else\n {\n vec4 textureColor = texture2D(uSampler, vec2(factor / uAspectRatio, 0.5));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uRingAlpha);\n }\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.wb=d.createProgram();d.attachShader(this.wb,b);d.attachShader(this.wb,a);d.linkProgram(this.wb);d.getProgramParameter(this.wb,d.LINK_STATUS)||alert("Could not initialise shaders");this.wb.Z=d.getAttribLocation(this.wb,"aVertexPosition")};f.prototype.Jc=function(){var d=this.g.H;this.wd=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.wd);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1, -1,0,1,1,0,-1,1,0]),d.STATIC_DRAW);this.wd.Lc=3;this.wd.Ud=4;this.Ze=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Ze);for(var b=[0,0,0],a=2*Math.PI/6,c=Math.PI/180*35,k=1,l=c;l<=c+2*Math.PI;l+=a)b.push(Math.sin(l)),b.push(-Math.cos(l)),b.push(0),k++;d.bufferData(d.ARRAY_BUFFER,new Float32Array(b),d.STATIC_DRAW);this.Ze.Lc=3;this.Ze.Ud=k;this.am=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.am);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER, d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE);b=document.createElement("canvas");b.width=100;b.height=1;a=b.getContext("2d");a.width=100;a.height=1;c=a.createLinearGradient(0,0,100,0);c.addColorStop(0,this.g.fa(16777215,0));c.addColorStop(.88,this.g.fa(0,0));c.addColorStop(.9,this.g.fa(16654848,1));c.addColorStop(.92,this.g.fa(16776448,1));c.addColorStop(.94,this.g.fa(4849466,1));c.addColorStop(.96,this.g.fa(131071, 1));c.addColorStop(.98,this.g.fa(8190,1));c.addColorStop(1,this.g.fa(0,0));a.fillStyle=c;a.fillRect(0,0,100,1);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,b)};f.prototype.hp=function(){for(;0a.z){l=-c/a.z;k=a.x*l;l*=a.y;var y=Math.max(f,t);Math.abs(k)t?f:t;y=n.nk/100*((u-v)/u);0>y&&(y=0);if(this.g.Y){d.useProgram(this.fc);d.bindBuffer(d.ARRAY_BUFFER,this.g.B.jb);d.vertexAttribPointer(this.fc.Z,this.g.B.jb.Lc, d.FLOAT,!1,0,0);var x=d.getUniformLocation(this.fc,"uCanvasDimensions");d.uniform2f(x,d.drawingBufferWidth,d.drawingBufferHeight);d.uniform2f(d.getUniformLocation(this.fc,"uFlareCenterPosition"),d.drawingBufferWidth/f*k,t-d.drawingBufferHeight/t*l);d.uniform1f(d.getUniformLocation(this.fc,"uBlindingValue"),y);x=d.getUniformLocation(this.fc,"uAspectRatio");d.uniform1f(x,this.g.B.Yg?d.drawingBufferWidth/d.drawingBufferHeight:d.drawingBufferWidth/d.drawingBufferHeight/(f/t));d.drawArrays(d.TRIANGLE_STRIP, 0,this.g.B.jb.Ud)}else x=this.S.createRadialGradient(k,l,1,k,l,r),x.addColorStop(0,"rgba(255, 255, 255, "+y+")"),x.addColorStop(.5,"rgba(255, 255, 255, "+.8*y+")"),x.addColorStop(1,"rgba(255, 255, 255, "+.6*y+")"),this.S.fillStyle=x,this.S.fillRect(0,0,this.S.width,this.S.height);if(0!=Number(n.type)&&!this.g.B.Yg){y=f/2-k;r=t/2-l;var A=1,w=Number(n.type)-1;v<.35*u&&(A=v/(.35*u),A*=A);v>.7*u&&(A=(u-v)/(.3*u));A*=n.alpha/100;if(0z&&(z=0);var C=B.color;if(8==w||9==w||10==w)C=n.color;if(this.g.Y)d.useProgram(this.qa),d.bindBuffer(d.ARRAY_BUFFER,this.Ze),d.vertexAttribPointer(this.qa.Z,this.Ze.Lc,d.FLOAT,!1,0,0),x=d.getUniformLocation(this.qa,"uCanvasDimensions2"),d.uniform2f(x,d.drawingBufferWidth,d.drawingBufferHeight),d.uniform2f(d.getUniformLocation(this.qa,"uCirclePosition"),d.drawingBufferWidth/f*(k+y*B.j),d.drawingBufferWidth/f*(t-(l+r*B.j))),d.uniform2f(d.getUniformLocation(this.qa,"uCircleTexturePosition"), d.drawingBufferWidth/f*(k+y*B.j),t-(l+r*B.j)),d.uniform1f(d.getUniformLocation(this.qa,"uCircleRadius"),u),d.uniform3f(d.getUniformLocation(this.qa,"uCircleColor"),(C>>16&255)/255,(C>>8&255)/255,(C&255)/255),d.uniform1f(d.getUniformLocation(this.qa,"uCircleAlpha"),z),d.uniform1f(d.getUniformLocation(this.qa,"uCircleSoftness"),.1),x=d.getUniformLocation(this.qa,"uAspectRatio"),d.uniform1f(x,d.drawingBufferWidth/d.drawingBufferHeight/(f/t)),d.drawArrays(d.TRIANGLE_FAN,0,this.Ze.Ud);else{this.S.save(); this.S.translate(k+y*B.j,l+r*B.j);x=this.S.createRadialGradient(0,0,1,0,0,1.1*u);x.addColorStop(0,this.g.fa(C,z));x.addColorStop(.65,this.g.fa(C,.9*z));x.addColorStop(.8,this.g.fa(C,.7*z));x.addColorStop(1,this.g.fa(C,.2*z));this.S.beginPath();C=2*Math.PI/6;B=Math.PI/180*35;var D=!0;for(z=B;z<=B+2*Math.PI;z+=C)D?(this.S.moveTo(u*Math.sin(z),u*Math.cos(z)),D=!1):this.S.lineTo(u*Math.sin(z),u*Math.cos(z));this.S.closePath();this.S.fillStyle=x;this.S.fill();this.S.restore()}}if(0z&&(z=0);C=B.color;if(8==w||9==w||10==w)C=n.color;this.g.Y?(d.useProgram(this.qa),d.bindBuffer(d.ARRAY_BUFFER,this.wd),d.vertexAttribPointer(this.qa.Z,this.wd.Lc,d.FLOAT,!1,0,0),x=d.getUniformLocation(this.qa,"uCanvasDimensions2"),d.uniform2f(x,d.drawingBufferWidth,d.drawingBufferHeight),x=d.getUniformLocation(this.qa,"uCirclePosition"),d.uniform2f(x,d.drawingBufferWidth/f*(k+y*B.j),d.drawingBufferWidth/f*(t-(l+r*B.j))),x=d.getUniformLocation(this.qa, "uCircleTexturePosition"),d.uniform2f(x,d.drawingBufferWidth/f*(k+y*B.j),t-(l+r*B.j)),x=d.getUniformLocation(this.qa,"uCircleRadius"),d.uniform1f(x,u),d.uniform3f(d.getUniformLocation(this.qa,"uCircleColor"),(C>>16&255)/255,(C>>8&255)/255,(C&255)/255),d.uniform1f(d.getUniformLocation(this.qa,"uCircleAlpha"),z),d.uniform1f(d.getUniformLocation(this.qa,"uCircleSoftness"),B.v),x=d.getUniformLocation(this.qa,"uAspectRatio"),d.uniform1f(x,d.drawingBufferWidth/d.drawingBufferHeight/(f/t)),d.drawArrays(d.TRIANGLE_FAN, 0,this.wd.Ud)):(this.S.save(),this.S.translate(k+y*B.j,l+r*B.j),x=this.S.createRadialGradient(0,0,1,0,0,u),x.addColorStop(0,this.g.fa(C,z)),x.addColorStop(1-B.v,this.g.fa(C,.8*z)),x.addColorStop(1,this.g.fa(C,0)),this.S.beginPath(),this.S.arc(0,0,u,0,2*Math.PI,!1),this.S.closePath(),this.S.fillStyle=x,this.S.fill(),this.S.restore())}if(0z&&(z=0),this.g.Y?(d.useProgram(this.wb),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D, this.am),d.bindBuffer(d.ARRAY_BUFFER,this.wd),d.vertexAttribPointer(this.wb.Z,this.wd.Lc,d.FLOAT,!1,0,0),x=d.getUniformLocation(this.wb,"uCanvasDimensions2"),d.uniform2f(x,f,t),x=d.getUniformLocation(this.wb,"uCirclePosition"),d.uniform2f(x,k+y*n.j,t-(l+r*n.j)),x=d.getUniformLocation(this.wb,"uRingTexturePosition"),d.uniform2f(x,d.drawingBufferWidth/f*(k+y*n.j),t-(l+r*n.j)),x=d.getUniformLocation(this.wb,"uCircleRadius"),d.uniform1f(x,u),d.uniform2f(d.getUniformLocation(this.wb,"uRingPosition"),k+ y*n.j,t-(l+r*n.j)),d.uniform1f(d.getUniformLocation(this.wb,"uRingRadius"),u),d.uniform1f(d.getUniformLocation(this.wb,"uRingAlpha"),z),x=d.getUniformLocation(this.wb,"uAspectRatio"),d.uniform1f(x,d.drawingBufferWidth/d.drawingBufferHeight/(f/t)),d.uniform1i(d.getUniformLocation(this.wb,"uSampler"),0),d.drawArrays(d.TRIANGLE_FAN,0,this.wd.Ud)):(this.S.save(),this.S.translate(k+y*n.j,l+r*n.j),x=this.S.createRadialGradient(0,0,0,0,0,u),x.addColorStop(0,this.g.fa(16777215,0)),x.addColorStop(.88,this.g.fa(0, 0)),x.addColorStop(.9,this.g.fa(16654848,z)),x.addColorStop(.92,this.g.fa(16776448,z)),x.addColorStop(.94,this.g.fa(4849466,z)),x.addColorStop(.96,this.g.fa(131071,z)),x.addColorStop(.98,this.g.fa(8190,z)),x.addColorStop(1,this.g.fa(0,0)),this.S.beginPath(),this.S.arc(0,0,u,0,2*Math.PI,!1),this.S.closePath(),this.S.fillStyle=x,this.S.fill(),this.S.restore())}this.g.Y&&(d.useProgram(this.g.na.F),d.disable(d.BLEND),d.enable(d.DEPTH_TEST))}}}};return f}();m.Mm=f})(ggP2VR||(ggP2VR={}));var W=!1; (function(m){var f=function(){return function(){this.f=this.i=this.pan=0}}(),h=function(){return function(){this.Oi=-1E7}}(),d=function(){function b(a,c){this.Co="TGljZW5zZTogQktZTS5DT00=";this.pan={c:0,Qa:0,min:0,max:360,d:0,uj:0,Gc:0};this.i={c:0,Qa:0,min:-90,max:90,d:0,Gc:0};this.O={c:0,Qa:0,min:-180,max:180,d:0};this.tc={pan:0,i:-90,O:0,f:170,Eb:9};this.f={c:70,Qa:70,min:1,Hg:0,max:170,rj:360,sj:270,nf:0,d:0,mode:0,mm:0,Ak:0};this.$a={O:0,pitch:0};this.o={width:10,height:10};this.ib=0;this.Ri=new m.wa;this.crossOrigin= "anonymous";this.Ka=this.$h=4;this.gd=this.kh=this.Kg=this.nc=0;this.X={start:{x:0,y:0},da:{x:0,y:0},Dd:{x:0,y:0},c:{x:0,y:0},ca:{x:0,y:0}};this.R={Xa:!1,Ik:0,startTime:0,start:{x:0,y:0},da:{x:0,y:0},Dd:{x:0,y:0},c:{x:0,y:0},ca:{x:0,y:0}};this.dg=!0;this.Ba={enabled:!0,da:{x:0,y:0},ca:{x:0,y:0},Fj:0,f:{active:!1,jc:0}};this.hb={alpha:0,beta:0,gamma:0,orientation:0,Ol:0,gi:!0,cg:0};this.pg={alpha:0,beta:0,gamma:0,orientation:0};this.s={src:[],Pe:4,width:640,height:480,jd:!1,Kh:!1,Oj:!0,nm:!1,me:"loop", b:HTMLVideoElement=null,pm:!1,oc:WebGLTexture=null,$j:WebGLBuffer=null,oi:WebGLBuffer=null,jj:WebGLBuffer=null,format:1,Eh:0,bj:1};this.Nh=0;this.ia=this.ya=this.Fa=this.T=this.ic=this.ab=this.D=null;this.oe="pano";this.aj="flashcontainer";this.Si="";this.control=null;this.Sb=[];this.Ea=!1;this.$f=1;this.ka=null;this.Ld=this.Me=this.cf=!1;this.Pf=0;this.ud=.02;this.Ci=0;this.Di=!1;this.Bi=this.qh=this.Qf=this.Le=this.mk=0;this.lk=-1;this.Mb="";this.tf=this.Bc=!1;this.ai=0;this.uh=[];this.We=[];this.Ff= this.qc=1;this.Uf=1024;this.uf=!1;this.we=200;this.Qb=0;this.Xg=5;this.pc=0;this.qm=50;this.ij=this.rm=0;this.l={enabled:!1,timeout:5,active:!1,Wg:!1,speed:.4,ri:0,Yh:0,tj:!0,gh:!1,Jf:!1,rh:"",Md:"Animation01",Oe:!1,Uh:!1,Rj:!1,startTime:0,kd:0,fg:!1,vh:!1,Ph:0,Cd:0,Bg:0,Cg:0,Ag:0,Cl:0};this.u={active:!1,aborted:!1,speed:.1,pan:0,i:0,O:0,f:70,Jd:70,Bg:0,Cg:0,Dl:0,Ag:0,Eb:0,Ng:0,mj:0,Yj:!1,Ig:!1,kk:0,jk:0,Gh:!1};this.jf={pan:-1,i:-1,f:-1};this.Al=0;this.aa=null;this.Kf={};this.hh={};this.Pd=[];this.Sh= {};this.Ac={};this.lf={};this.A={mode:1,xg:-1,pa:0,nb:0,Xc:.05,hc:255,gc:1,ec:255,dc:.3,bf:!0,Tj:{enabled:!0,width:180,height:20,Uj:0,Sj:1,background:!0,ec:16777215,dc:1,hc:0,gc:1,Fi:3,Gi:1,zi:!0},lb:[],Pb:[],Pc:[],li:[]};this.Aa=null;this.P=[];this.N=[];this.I=[];this.Sa=[];this.Ie=[];this.Ma=[];this.za=[];this.Qc=[];this.ce=[];this.Ee=[];this.V=1;this.na=this.nd=this.Hb=this.Od=null;this.ag={};this.qd={};this.h=new m.Pm;this.So={target:0,current:0,Xc:.01,wn:2,Wi:0,wh:!1,cn:!1};this.margin={left:0, top:0,right:0,bottom:0};this.C={ue:!1,Do:!1,Ab:!1,ld:!1,Ad:!0,ol:!1,lm:1,cm:!1,Ui:!0,Zf:!0,sh:!1,df:!1,dm:!0,sensitivity:8};this.Gg=[];this.ad=!0;this.ta={x:0,y:0};this.fh=this.Fb=this.bh=this.Tc=this.Y=!1;this.xi=this.Cm=!0;this.hj=!1;this.ne=!0;this.dh=this.gj=!1;this.Dm=!0;this.Ia=this.Nd="";this.cd="transition";this.Ra="transform";this.vd="perspective";this.Dk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC"; this.rb={width:0,height:0};this.Nk=new m.wa;this.Mk=new m.wa;this.Ok=new m.wa;this.Pk=new m.wa;this.Lk=new m.wa;this.gf=!1;this.Bl=this.Wa="";this.ak=[];this.ti=[];this.ug=this.ql=this.tg=this.rl=this.Bd=this.kj=this.Gj=this.Kc=this.ff=this.pl=this.lj=this.sl=this.tl=this.wl=!1;this.eh=!0;this.fi=this.Ih=!1;this.kl=[];this.devicePixelRatio=1;this.ga=this.B=null;this.Vf=!1;this.La=null;this.qb={enabled:!1,speed:1,od:!1,Zi:!0};this.Kl=!1;this.Rh="<>";this.ob=new m.Qm;this.Xj=!1;this.Yf=function(a, c){if(0==a.length)return a;var b;var d=[];var k=c.bi(a[0])-0;for(b=0;bh&&(h=0);1k||d.push(a[e]);d.push(v)}k=f}return d};this.Sl=new f;this.Mj=0;this.Oh=-1;this.kg=function(a){return a?a.pageX||a.pageY?{x:a.pageX,y:a.pageY}:a.clientX||a.clientY?{x:a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:a.clientY+ document.body.scrollTop+document.documentElement.scrollTop}:a.touches&&a.touches[0]?{x:a.touches[0].pageX,y:a.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.Wh=1;this.Bn=this.Bh=this.yl=this.Xi=this.Bj=this.ci=0;this.zl=!1;this.Rd=!0;this.pb=new m.nh(this);this.pb.bf=!1;this.Ck();if(7=c&&(this.ga.blendtime= c));a.hasOwnProperty("waitfortransition")&&(this.ga.zoomoutpause=1==a.waitfortransition);a.hasOwnProperty("zoomedfov")&&(c=Number(a.zoomedfov),.01<=c&&50>=c&&(this.ga.zoomfov=c));a.hasOwnProperty("zoomspeed")&&(c=Number(a.zoomspeed),.01<=c&&99>=c&&(this.ga.zoomspeed=c));a.hasOwnProperty("dipcolor")&&(this.ga.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),0<=a&&1E3>=a&&(this.ga.softedge=a));this.Vf||this.Pi()};b.prototype.Oc=function(a,c,b){var d=c?Number(c):0;if(0!=a&& 4!=a&&12!=a&&9!=a)this.Mc("Unsupported projection type: "+a);else if(c&&0!==d&&4!==d&&12!==d&&9!==d)this.Mc("Unsupported projection2 type: "+d);else if(a==d&&(d=0),this.Kg=b?Number(b):1,this.Ka!=a||this.nc!=d)this.Ka=a,this.nc=d,this.na.Hh()};b.prototype.ra=function(){return 0==this.Ka?4:this.Ka};b.prototype.Ki=function(a,c){if(0!=a&&4!=a&&12!=a&&9!=a)this.Mc("Unsupported projection type: "+a);else if(this.Y||0==a||4==a||this.Mc("Projection changes require WebGL!"),this.ra()!=a){var b={};b.pan=this.pan.c; b.tilt=this.i.c;b.fov=this.f.c;b.projection=a;b.timingFunction=3;b.speed=c;a=this.jg(a);b.fov=Math.min(a,b.fov);this.Vh(b)}};b.prototype.addListener=function(a,c){(this.ag[a]=this.ag[a]||[]).push(c)};b.prototype.ha=function(a,c){if(a=this.ag[a])for(var b=a.length,d=0;d>4;e=(e&15)<<4|f>>2;var g=(f&3)<<6|t;c+=String.fromCharCode(d);64!=f&&(c+=String.fromCharCode(e));64!=t&&(c+=String.fromCharCode(g))}while(b>3&7];if(!(f&64&&t)||e+ t>b)return null;for(f&=63>>t;0Number(this.pd))&&(this.xa=null);this.Kc&&!this.Bd&&12<=Number(this.pd)&&(this.xa=null);this.eh=this.rl?this.Kc&&this.Gj&&10<=Number(this.pd)?!0:!1:!0};b.prototype.M=function(a){if(W){var c=document.getElementById("gg_debug");c&&(c.innerHTML=a.toString()+"
");window.console&&window.console.log(a)}};b.prototype.Mc=function(a){var c= document.getElementById("gg_debug");c&&(c.innerHTML=a+"
");window.console&&window.console.log(a)};b.prototype.gm=function(a){this.we=a};b.prototype.mp=function(a){this.crossOrigin=a};b.prototype.op=function(a){this.ef=a};b.prototype.fo=function(){return this.ai};b.prototype.lp=function(a){this.Nd=a};b.prototype.Fn=function(){return this.Nd};b.prototype.On=function(){return this.ug};b.prototype.Pn=function(){return this.gf};b.prototype.Ln=function(){return this.l.active};b.prototype.pp=function(a){this.ug= !!a};b.prototype.Ch=function(){return this.isLoaded};b.prototype.Nn=function(){return!this.isLoaded};b.prototype.ed=function(){return Number(this.o.height)/(2*Math.tan(Math.PI/180*(this.Jb()/2)))};b.prototype.im=function(a,c){this.isFullscreen&&(a=window.innerWidth,c=window.innerHeight);var b=a-this.margin.left-this.margin.right,d=c-this.margin.top-this.margin.bottom;if(!(10>b||10>d)){var e=window.devicePixelRatio||1;this.uf&&(e=1);this.D.style.width=b+"px";this.D.style.height=d+"px";this.D.style.left= this.margin.left+"px";this.D.style.top=this.margin.top+"px";if(this.Y)try{this.ab&&(this.ab.style.position="absolute",this.ab.style.display="inline",this.ab.style.width=b+"px",this.ab.style.height=d+"px",this.ab.width=b*e,this.ab.height=d*e),this.H&&(this.rb.width=b*e,this.rb.height=d*e,this.H.viewport(0,0,this.H.drawingBufferWidth,this.H.drawingBufferHeight))}catch(p){alert(p)}this.ic&&(this.ic.style.width=a+"px",this.ic.style.height=c+"px",this.ic.width=a,this.ic.height=c);this.Fa&&(this.Fa.style.width= a+"px",this.Fa.style.height=c+"px",this.ya.style.width=a+"px",this.ya.style.height=c+"px",this.ya.width=a,this.ya.height=c,this.ya.style.left=this.margin.left+"px",this.ya.style.top=this.margin.top+"px",this.ka&&this.ka!=this.Fa&&(this.ka.style.width=a+"px",this.ka.style.height=c+"px"));this.Ga&&(b=this.Ga.Zc,b.style.width=a+"px",b.style.height=c+"px",b.width=a,b.height=c,b.style.left=this.margin.left+"px",b.style.top=this.margin.top+"px");this.cf&&(this.Ea=!0);b=this.D.offsetWidth;d=this.D.offsetHeight; if(this.o.width!=b||this.o.height!=d)this.o.width=b,this.o.height=d;this.mq();this.ka&&this.ka.ggUpdateSize&&this.ka.ggUpdateSize(a,c);this.ha("sizechanged",{jh:a,qg:c})}};b.prototype.Ke=function(){this.Xj=!0};b.prototype.Sc=function(){this.im(this.Od.offsetWidth,this.Od.offsetHeight)};b.prototype.to=function(){var a={width:0,height:0};a.width=this.o.width;a.height=this.o.height;return a};b.prototype.qe=function(){var a={x:0,y:0},c=this.D;if(c.offsetParent){do a.x+=c.offsetLeft,a.y+=c.offsetTop,c= c.offsetParent;while(c)}return a};b.prototype.Bp=function(a){this.aa=a};b.prototype.rp=function(a,c,b,d){this.margin.left=a;this.margin.top=c;this.margin.right=b;this.margin.bottom=d;this.aa=this.skinObj;this.Ke()};b.prototype.ln=function(a){0==a&&(this.C.Ad=!1);1==a&&(this.C.Ad=!0);2==a&&(this.C.Ad=!this.C.Ad);this.ha("viewmodechanged",{})};b.prototype.ro=function(){return 1==this.C.Ad?1:0};b.prototype.sk=function(a,c){this.A.mode=1==c&&0a.z?(y=-c/a.z,n=a.x*y,y*=a.y,Math.abs(n)a.z?(y=-c/a.z,n=this.o.width/2+a.x*y,y=this.o.height/2+a.y*y):y=n=0,a.Nb=n,a.vb=y;g.Wd=r}}}};b.prototype.Hn=function(){for(var a=[],c=0;cc&&(c=0);1>16&255)+","+(a>>8&255)+","+(a&255)+","+c+")"};b.prototype.Uo=function(){var a;if(this.ya&&(this.A.xg!=this.A.mode&&(this.A.xg=this.A.mode,this.ya.style.visibility=0=this.A.mode&&(c=0);3==this.A.mode&&(c=this.A.pa);for(a=0;ab!=d.vb>b&&c<(d.Nb-h.Nb)*(b-h.vb)/(d.vb-h.vb)+h.Nb&&(k=!k)}return k};b.prototype.Mi=function(a,c){var b=-1;if((0<=this.A.mode||0b.width?this.f.c/2:4==c?180*Math.atan(4*b.height/(3*b.width)*Math.tan(this.f.c/ 2*Math.PI/180))/Math.PI:4*b.height/(3*b.width)*(this.f.c/2)}return 2*a};b.prototype.Jn=function(a,c){a||(a=this.Jb());c||(c=this.ra());return 4==c?180*Math.atan(this.ee()*Math.tan(a/2*Math.PI/180))/Math.PI:a*this.ee()};b.prototype.ee=function(){return this.o.width/this.o.height};b.prototype.Sg=function(a){a/=2;var c=this.ra();switch(this.f.mode){case 0:this.f.c=2*a;break;case 1:a=4==c?180*Math.atan(this.o.width/this.o.height*Math.tan(a*Math.PI/180))/Math.PI:this.o.width/this.o.height*a;this.f.c=2* a;break;case 2:var b=Math.sqrt(this.o.width*this.o.width+this.o.height*this.o.height);a=4==c?180*Math.atan(b/this.o.height*Math.tan(a*Math.PI/180))/Math.PI:b/this.o.height*a;this.f.c=2*a;break;case 3:4*this.o.height/3>this.o.width?this.f.c=2*a:(b=3*this.o.width/(4*this.o.height),a=4==c?180*Math.atan(b*Math.tan(a*Math.PI/180))/Math.PI:b*a,this.f.c=2*a)}};b.prototype.Xf=function(){var a=this.Sl;a.pan=this.pan.c;a.i=this.i.c;a.f=this.f.c;this.Ue(a);this.Ue(a);this.Ue(a);this.pan.c=a.pan;this.i.c=a.i; this.f.c=a.f};b.prototype.Ue=function(a){var c=this.o.width/this.o.height;if(2==this.ib){if(0c&&(a.f=c);50a.i-d&&(a.i=-50+d));b>e?a.pan=0:(a.pan+b>e&&(a.pan=e-b,this.l.active&&(this.l.speed=-this.l.speed, this.pan.d=0)),a.pan-b<-e&&(a.pan=-e+b,this.l.active&&(this.l.speed=-this.l.speed,this.pan.d=0)))}else{0e&&(a.f=e);12==this.ra()&& (2*b>f&&(a.f=f/c),d=this.Jb()/2,2*d>f&&(a.f=f),d=this.Jb()/2,b=c*d);2*d>this.i.max-this.i.min&&180>this.i.max-this.i.min&&(d=(this.i.max-this.i.min)/2,this.Sg(2*d));90>this.i.max?a.i+d>this.i.max&&(a.i=this.i.max-d):a.i>this.i.max&&(a.i=this.i.max);-90c){e=90;f=Math.tan(d*Math.PI/180);var h=Math.tan((Math.abs(a.i)+d)*Math.PI/180);h=Math.sqrt(h*h+1)/Math.sqrt(f*f+1);d=180*Math.atan(h* Math.tan(b*Math.PI/180))/Math.PI;2*d>c&&(h=Math.tan(c*Math.PI/360)/Math.tan(b*Math.PI/180),c=h*Math.sqrt(f*f+1),h=Math.sqrt(c*c-1),e=180/Math.PI*Math.atan(h));a.pan+d>this.pan.max&&(a.pan=this.pan.max-d,this.l.active&&(this.l.speed=-this.l.speed,this.pan.d=0));a.pan-de&&(a.i=e-b);a.i-b<-e&&(a.i=-e+b)}}};b.prototype.update=function(a){void 0===a&&(a=0);this.Ea=!0;a&&(this.$f=Math.max(1*a,this.$f))}; b.prototype.Vk=function(){return this.ia?!!this.ia.isTileLoading:0a;a++){var b;if(b=this.ob.cb[a]){var d="";this.Bc?(d+="translate3d("+this.o.width/2+"px,"+this.o.height/2+"px,0px) ", d+="perspective("+c+"px) ",d+="translate3d(0px,0px,"+c+"px) "):d+="translate3d("+this.o.width/2+"px,"+this.o.height/2+"px,"+c+"px) ";d+="rotateZ("+Number(this.O.c).toFixed(10)+"deg) ";d+="rotateX("+Number(this.i.c).toFixed(10)+"deg) ";d+="rotateY("+Number(-this.pan.c).toFixed(10)+"deg) ";b.fl&&(d+=b.fl,b.fb||(d="translate3d(-10px,-10px,0px) scale(0.001,0.001)"),b.K.style[this.Ra]=d)}}};b.prototype.eq=function(){this.Xf();var a;this.ic&&(a=this.ic.getContext("2d"));if(this.o.width!==this.D.offsetWidth|| this.o.height!==this.D.offsetHeight)this.o.width=this.D.offsetWidth,this.o.height=this.D.offsetHeight;if(a){var c=a.canvas.width/2,b=a.canvas.height/2,d=a.createRadialGradient(c,b,5,c,b,Math.max(c,b));d.addColorStop(0,"#333");d.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);a.fillStyle=d;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.c.toFixed(1),c,b-60);a.fillText("Tilt: "+this.i.c.toFixed(1),c,b-30);a.fillText("Fov: "+this.f.c.toFixed(1), c,b);a.fillText("Node: "+this.Tk(),c,b+30);a.fillText("Title: "+this.Kf.title,c,b+60)}};b.prototype.fq=function(){this.Xf();if(this.o.width!==this.D.offsetWidth||this.o.height!==this.D.offsetHeight)this.o.width=this.D.offsetWidth,this.o.height=this.D.offsetHeight;this.ia&&this.ia.setPan&&(this.ia.setPan(this.pan.c),this.ia.setTilt(this.i.c),this.ia.setFov(this.f.c))};b.prototype.Vj=function(){this.ya.style.visibility="inherit";this.ba||(this.ba=this.ya.getContext("2d"));if(this.ba.width!=this.o.width|| this.ba.height!=this.o.height)this.ba.width=this.o.width,this.ba.height=this.o.height;this.ba.clear?this.ba.clear():this.ba.clearRect(0,0,this.ya.width,this.ya.height);this.pc=0;var a=100/this.f.c;var c=this.h.width/this.h.height;var b=this.o.height*a*c;a*=this.o.height;var d=(this.pan.c/100/c-.5)*b+this.o.width/2;for(var e=(this.i.c/100-.5)*a+this.o.height/2,f,h,g,q,n=0;this.h.J.length>=n+2&&this.h.J[n+1].width>b;)n++;var y;var r=[];for(y=this.h.J.length-1;y>=n;){c=this.h.J[y];if(c.cache){var v= {Ya:0,zb:0};v.Bb=c.L-1;v.Cb=c.ea-1}else{v={};var u=-e/a*(c.height/this.h.G);f=(-d+this.o.width)/b*(c.width/this.h.G);h=(-e+this.o.height)/a*(c.height/this.h.G);v.Ya=Math.min(Math.max(0,Math.floor(-d/b*(c.width/this.h.G))),c.L-1);v.zb=Math.min(Math.max(0,Math.floor(u)),c.ea-1);v.Bb=Math.min(Math.max(0,Math.floor(f)),c.L-1);v.Cb=Math.min(Math.max(0,Math.floor(h)),c.ea-1)}r[y]=v;var x=!0;for(h=v.zb;h<=v.Cb;h++)for(f=v.Ya;f<=v.Bb;f++)q=f+h*c.L,u=c.U[q],u||(u=new m.Kd,c.U[q]=u),this.Qb=n;){c=this.h.J[y];if(r[y]&&0<=r[y].Ya)for(v=r[y],h=v.zb;h<=v.Cb;h++)for(f=v.Ya;f<=v.Bb;f++)q=f+h*c.L,(u=c.U[q])||(u=c.U[q]=new m.Kd),u.h&&u.h.complete&&(q=d+(-this.h.Ja+this.h.G*f)*b/c.width,this.ba.drawImage(u.h, q,e+(-this.h.Ja+this.h.G*h)*a/c.height,u.h.width*b/c.width,u.h.height*a/c.height)),u.visible=!0;y--}for(b=0;b=this.A.mode&&(b=0),3==this.A.mode&&(b=this.A.pa),g=0;gthis.ob.cb.length))for(var a=0;6>a;a++){var c=this.ob.cb[a];var b=[];b.push(new m.wa(-1,-1,-1,0,0));b.push(new m.wa(1,-1,-1,1,0));b.push(new m.wa(1,1,-1,1,1));b.push(new m.wa(-1,1,-1,0,1));for(var d=0;4>d;d++)4>a?b[d].Da(-Math.PI/ 2*a):b[d].va(Math.PI/2*(4==a?-1:1)),this.$a&&(b[d].kb(this.$a.O*Math.PI/180),b[d].va(-this.$a.pitch*Math.PI/180)),b[d].Ce(-this.pan.c),b[d].Hd(this.i.c),b[d].De(this.O.c);b=this.Ni(b);c.fb=0=a+2&&!this.h.J[a+1].qf&&this.h.J[a+1].width>b;)a++;return a};b.prototype.iq=function(){var a=!1,c,b,d;if(this.o.width!==this.D.offsetWidth||this.o.height!==this.D.offsetHeight)this.o.width= this.D.offsetWidth,this.o.height=this.D.offsetHeight,this.D.style[this.Ra+"OriginX"]=this.o.width/2+"px",this.D.style[this.Ra+"OriginY"]=this.o.height/2+"px",a=!0;var e=Math.round(this.ed());if(this.yg!=e||a)this.yg=e,this.Bc||(this.D.style[this.vd]=e+"px",this.D.style[this.vd+"Origin"]="50% 50%");this.pc=0;if(0c;c++){var h=this.ob.cb[c];h.fb&&(f=f+c+",")}f=this.Yi();var g;for(g=this.h.J.length-1;g>=f;){a=this.h.J[g];var q=1;g==this.h.J.length- 1&&0==this.h.Ja&&(q=this.h.G/(this.h.G-2));for(c=0;6>c;c++){h=this.ob.cb[c];var n=h.mf;if(h.fb&&0=g);)r=r.nextSibling;this.D.insertBefore(n.K,r);n.Pa=n.K.getContext("2d")}else if(this.rm< this.we){this.rm++;n.K=document.createElement("canvas");n.K.width=this.h.G+2*this.h.Ja;n.K.height=this.h.G+2*this.h.Ja;n.Pa=n.K.getContext("2d");n.K.style[this.Ra+"Origin"]="0% 0%";n.K.style.overflow="hidden";n.K.style.position="absolute";for(r=this.D.firstChild;r&&r.Sd&&(-1==r.Sd||r.Sd>=g);)r=r.nextSibling;this.D.insertBefore(n.K,r)}n.K&&(this.ij++,n.h=new Image,n.h.crossOrigin=this.crossOrigin,n.h.style[this.Ra+"Origin"]="0% 0%",n.h.style.position="absolute",n.h.style.overflow="hidden",n.K.Sd=g, n.h.onload=this.Up(n),n.h.onerror=this.pi(n),n.h.onabort=this.pi(n),n.h.setAttribute("src",this.He(c,g,b,d)),a.cache&&this.Sb.push(n.h),this.Qb++,this.Ea=!0)}else this.pc++;if(n.K){r="";this.Bc?(r+="translate3d("+this.o.width/2+"px,"+this.o.height/2+"px,0px) ",r+=" perspective("+e+"px) ",r+="translate3d(0px,0px,"+e+"px) "):r+="translate3d("+this.o.width/2+"px,"+this.o.height/2+"px,"+e+"px) ";r+="rotateZ("+Number(this.O.c).toFixed(10)+"deg) ";r+="rotateX("+Number(this.i.c).toFixed(10)+"deg) ";r+="rotateY("+ Number(-this.pan.c).toFixed(10)+"deg) ";this.$a&&(r+="rotateX("+Number(-this.$a.pitch).toFixed(10)+"deg) ",r+="rotateZ("+Number(this.$a.O).toFixed(10)+"deg) ");r=4>c?r+("rotateY("+-90*c+"deg) "):r+("rotateX("+(4==c?-90:90)+"deg) ");if(this.tf){var v=this.h.G/a.width*(2*g+1)*(this.Uf/this.h.G);v=this.Kc?2/Math.tan(this.f.c*Math.PI/360)*v:2*v;r+=" scale("+v*q*q+")"}else v=1/(q*q);r+=" translate3d("+(1/q*b*this.h.G-this.h.Ja-a.width/2)+"px,";r+=1/q*d*this.h.G-this.h.Ja-a.width/2+"px,";r+=-a.width*v/ 2+"px)";h.fb&&(n.visible=!0,n.K?n.K.style[this.Ra]=r:n.h&&(n.h.style[this.Ra]=r))}}}}g--}for(e=0;ec||100>b)b=c=100;var d=window.devicePixelRatio||1;this.uf&&(d=1);this.D.style.width=c+"px";this.D.style.height=b+"px";this.ab.style.width=c+"px";this.ab.style.height=b+"px";this.ab.width= c*d;this.ab.height=b*d;this.ab.style.display="none";this.ab.style.touchAction="none";this.D.insertBefore(this.ab,this.D.firstChild);a={stencil:!0,depth:!0};a.alpha=this.Kc?!0:!1;this.Bd&&10<=this.kl[0]&&(a.antialias=!1,a.alpha=!1);this.H=this.ab.getContext("webgl",a);this.H||(this.H=this.ab.getContext("experimental-webgl",a));if(this.H){var e=this.H;this.rb.width=c*d;this.rb.height=b*d;e.clearColor(0,0,0,0);e.enable(this.H.DEPTH_TEST);e.viewport(0,0,500,500);e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT); 4096<=e.getParameter(e.MAX_TEXTURE_SIZE)&&!this.ug&&(this.we=1f;f++)k=this.Yd(k,"c",a),k=this.Yd(k,"s",l),k=this.Yd(k,"r",c),k=this.Yd(k,"l",e),k=this.Yd(k,"x",b),k=this.Yd(k, "y",d),k=this.Yd(k,"v",d),k=this.Yd(k,"h",b);return this.kc(k)};b.prototype.lg=function(){return this.pan.c};b.prototype.eo=function(){return this.u.pan};b.prototype.Yk=function(){for(var a=this.pan.c;-180>a;)a+=360;for(;180a;)a+=360;for(;180b?this.u.f=Number(b):this.u.f=this.f.c;this.u.speed=!isNaN(d)&&0=h?(this.ii(c,b,d),this.Oc(e)):(a=new m.ck,a.bb="__AutoMove",a.Df=this.Yk(),a.Ug=this.i.c,a.Id=this.f.c, a.Tg=this.Ka,a.Rc=c,a.$d=b,a.Ef=d,a.rd=e,a.Xe=!1,a.ke=!1,a.le=!1,0==f&&(a.ke=!0),1==f&&(a.Xe=!0,a.ke=!0),2==f&&(a.le=!0),a.speed=h,this.u.jk=this.w,this.w=this.Qk(a),this.u.kk=(new Date).getTime(),this.u.Yj=!0,this.u.active=!0,this.u.aborted=!1,this.u.pan=c,this.u.i=b,this.u.f=d,this.Ld=!1)};b.prototype.Io=function(a){this.moveTo(this.pan.Qa,this.i.Qa,this.f.Qa,a)};b.prototype.Jo=function(a,c){var b={};b.pan=this.pan.Qa;b.tilt=this.i.Qa;b.fov=this.f.Qa;b.projection=this.$h;b.timingFunction=c;b.speed= a;this.Vh(b)};b.prototype.Xm=function(a,c,b,d){var e=new m.nh(this);e.type="point";e.pan=c;e.i=b;e.id=a;e.b={};e.b.player=this;e.Ye();e.b.hotspot=e;e.b.__div=document.createElement("div");e.b.__div.appendChild(d);this.P.push(e);e.b.__div.style.position="absolute";e.b.__div.style.left="-1000px";e.b.__div.style.top="-1000px";this.Fa.insertBefore(e.b.__div,this.Fa.firstChild);this.Ea=!0};b.prototype.gq=function(a,c,b){for(var d=0;d a;)a+=360;c=b.an()}b={};b.pan=a;b.tilt=c;return b};b.prototype.zc=function(a){return a==this.control||a&&void 0!==a.ggPermeableMap&&1==a.ggPermeableMap?!0:a&&void 0!==a.ggPermeable&&0==a.ggPermeable?!1:a&&a.ggType&&("container"==a.ggType||"cloner"==a.ggType||"timer"==a.ggType)?!0:!1};b.prototype.Li=function(a,c){var b=this.ed(),d,e;for(d=0;dq;q++){switch(q){case 0:g.Za(-e,-n,0);break;case 1:g.Za(e,-n,0);break;case 2:g.Za(e,n,0);break;case 3:g.Za(-e,n,0)}g.va(f.va*Math.PI/180);g.Da(-f.Da*Math.PI/180);g.kb(f.kb*Math.PI/180);g.z=g.z-1;g.va(-f.i*Math.PI/180);g.Da(f.pan*Math.PI/180);g.Da(-this.pan.c*Math.PI/180);g.va(this.i.c*Math.PI/180);g.kb(this.O.c* Math.PI/180);h.push(g.clone())}h=this.Ni(h);if(0g.z?(n=-b/g.z,e=this.o.width/2+g.x*n,n=this.o.height/2+g.y*n):n=e=0,g.Nb=e,g.vb=n;if(this.jl(h,a,c))return f}}return null};b.prototype.Jh=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};b.prototype.Ho=function(a){this.xm(a);if(this.bd)this.bd.onclick();this.dg&&(this.dg=!1,this.Jk());this.Hb=null;if(!this.C.Ab){a= a?a:window.event;if(a.which||0==a.which||1==a.which){var c=(new Date).getTime();if(this.nd){this.Hb=this.nd;this.R.Xa=!0;this.R.startTime=c;a.stopPropagation();return}if(this.zc(a.target)){var b;(b=this.Li(this.ta.x,this.ta.y))&&b.re&&(this.Hb=b);this.Gm(a.pageX,a.pageY);this.R.Xa=!0;this.R.startTime=c;a.preventDefault();this.ua()}}this.X.ca.x=0;this.X.ca.y=0}};b.prototype.If=function(a,c){var b=this.A.Tj;b.enabled&&(this.sa!=this.pb&&0<=a&&0<=c&&""!=this.sa.title?(this.Aa.innerHTML=this.sa.title, this.Aa.style.color=this.fa(b.Uj,b.Sj),b.background?this.Aa.style.backgroundColor=this.fa(b.ec,b.dc):this.Aa.style.backgroundColor="transparent",this.Aa.style.border="solid "+this.fa(b.hc,b.gc)+" "+b.Gi+"px",this.Aa.style.borderRadius=b.Fi+"px",this.Aa.style.textAlign="center",0a-this.R.startTime&&0<=c&&20>c){var b=this.Mi(this.ta.x,this.ta.y);b&&this.tm(b);c=Math.abs(this.X.Dd.x-this.X.da.x)+Math.abs(this.X.Dd.y-this.X.da.y);700>a- this.wg&&0<=c&&20>c?(b?this.um(b):this.C.Ui&&this.si(),this.wg=0):this.wg=a;this.X.Dd.x=this.X.da.x;this.X.Dd.y=this.X.da.y}}};b.prototype.Hl=function(a){if(!this.C.ld&&(a=a?a:window.event,this.zc(a.target))){var c=a.detail?-1*a.detail:a.wheelDelta/40;this.C.ol&&(c=-c);a.axis&&(-1==this.Oh?this.Oh=a.axis:this.Oh!=a.axis&&(c=0));var b=0Math.abs(a.wheelDeltaY)&&(c=0);0!=c&&(this.Ji(b*this.C.lm,!0),this.update());a.preventDefault();this.ua()}}; b.prototype.bq=function(a){a||(a=window.event);var c=a.touches,b=this.qe();this.ta.x=c[0].pageX-b.x;this.ta.y=c[0].pageY-b.y;this.ae=this.Hb=null;this.dg&&(this.dg=!1,this.Jk());if(!this.C.Ab){var d=(new Date).getTime();if(this.nd)this.Hb=this.nd,this.R.Xa=!0,this.R.startTime=d,a.preventDefault();else{if(!this.R.Xa&&c[0]){this.R.startTime=d;this.R.start.x=c[0].pageX;this.R.start.y=c[0].pageY;this.R.da.x=c[0].pageX;this.R.da.y=c[0].pageY;this.mb=c[0].target;if(this.zc(this.mb)){(d=this.Li(this.ta.x, this.ta.y))&&d.re&&(this.Hb=d);if(d=this.Mi(this.ta.x,this.ta.y))this.M(d),this.ae=d,this.hi(d),d=this.kg(a),this.If(d.x-b.x,d.y-b.y);this.Gm(c[0].pageX,c[0].pageY);this.R.Ik=c[0].identifier;this.R.Xa=!0;a.preventDefault();this.ua()}if(this.mb){b=this.mb;for(d=!1;b&&b!=this.control;){if(b.onmouseover)b.onmouseover();b.onmousedown&&!d&&(b.onmousedown(),d=!0);b=b.parentNode}d&&a.preventDefault()}}1this.f.max&&(this.Ba.f.jc=this.f.max),this.Ba.f.jce){b=!0;this.zc(this.mb)&&(a.preventDefault(),this.Hb&&(this.Hb.re(), this.Hb.eb?this.nd=this.Hb:this.nd=null));if(this.mb){for(e=this.mb;e&&e!=this.control;)e.onclick&&(e.onclick(),f=!0,b=!1),e=e.parentNode;f&&a.preventDefault()}e=Math.abs(this.R.Dd.x-this.R.da.x)+Math.abs(this.R.Dd.y-this.R.da.y);if(700>d-this.wg&&0<=e&&20>e){if(this.zc(this.mb))if(a.preventDefault(),this.ae)this.um(this.ae);else if(this.C.Ui){var h=this;setTimeout(function(){h.si()},1)}if(this.mb){for(e=this.mb;e&&e!=this.control;)e.ondblclick&&(e.ondblclick(),f=!0,b=!1),e=e.parentNode;f&&a.preventDefault()}this.wg= 0}else this.wg=d;this.R.Dd.x=this.R.da.x;this.R.Dd.y=this.R.da.y}if(this.mb)for(e=this.mb;e&&e!=this.control;){if(e.onmouseout)e.onmouseout();if(e.onmouseup)e.onmouseup();e=e.parentNode}a=this.kg(a);this.If(a.x-c.x,a.y-c.y);this.ae&&b&&this.tm(this.ae);this.mb=null;this.R.Xa=!1;this.hi(this.pb);this.ae=null}};b.prototype.Zp=function(a){var c=this.qe();this.C.Ab||(this.R.Xa=!1);this.ae=null;this.hi(this.pb);a=this.kg(a);this.If(a.x-c.x,a.y-c.y)};b.prototype.vl=function(){return null!=this.mb||this.R.Xa}; b.prototype.Il=function(a){!this.xe&&window.MSGesture&&(this.M("setup gesture"),this.xe=new MSGesture,this.xe.target=this.control);this.xe&&this.xe.addPointer(a.pointerId)};b.prototype.Sk=function(a){this.gj=!0;this.Wh=1;this.C.Ab||this.C.ld||(a.touches?(this.mb=a.touches.target,this.zc(a.target)&&(a.preventDefault(),this.f.nf=this.f.c,this.ua())):(a.preventDefault(),this.f.nf=this.f.c,this.ua()))};b.prototype.Dn=function(a){this.C.Ab||this.C.ld||!this.zc(a.target)||(a.preventDefault(),this.Ba.f.active= !0,this.Ba.f.jc=this.f.nf/Math.sqrt(a.scale),4==this.ra()&&this.Ba.f.jc>this.f.max&&(this.Ba.f.jc=this.f.max),this.update(),this.ua())};b.prototype.Ko=function(a){this.C.Ab||this.C.ld||(a.preventDefault(),1!=a.scale&&(this.Ba.f.active=!0,this.Wh*=a.scale,this.Ba.f.jc=this.f.nf/Math.sqrt(this.Wh),4==this.ra()&&this.Ba.f.jc>this.f.max&&(this.Ba.f.jc=this.f.max),this.update(),this.ua()))};b.prototype.Rk=function(a){this.C.Ab||this.C.ld||(this.Ba.f.active=!1,a.preventDefault(),this.ua(),this.xe&&this.xe.reset&& this.xe.reset())};b.prototype.zo=function(a){this.C.ue||(this.isFullscreen&&a.preventDefault(),this.Nh=a.keyCode,this.ua())};b.prototype.Ao=function(a){this.Nh&&(this.Nh=0,a.preventDefault())};b.prototype.Qo=function(){this.Nh=0};b.prototype.Zh=function(){this.isFullscreen&&(this.Jh()||this.exitFullscreen(),this.Jh()&&(this.T.style.left="0px",this.T.style.top="0px"))};b.prototype.Ro=function(a,c,b,d){d?(this.pg.alpha=a,this.pg.beta=c,this.pg.gamma=b,this.pg.gamma+=90):(this.hb.alpha=a,this.hb.beta= c,this.hb.gamma=b,this.hb.gamma+=90);this.hb.orientation=window.orientation?parseInt(""+window.orientation,10):0;b=new m.ek;a=this.hb;b.Ce(-a.alpha);b.De(-a.beta);b.Hd(-a.gamma);b.De(90-a.orientation);1>b.Db?-1this.hb.cg&&(this.hb.cg+=1,e=.1*this.hb.cg);b=-b+this.hb.Ol;this.zf(e*b+(1-e)*this.lg());this.Af(e*a+(1-e)*this.Dh());this.Dm?this.Ij(e*c+(1-e)*this.al()):this.Ij(0);this.Xf();this.u.active=d}};b.prototype.tm=function(a){this.aa&&this.aa.hotspotProxyClick&&this.aa.hotspotProxyClick(a.id,a.url);""!=a.url&&(this.vj(a.url,a.target),this.If(-1,-1))};b.prototype.um=function(a){this.aa&&this.aa.hotspotProxyDoubleClick&&this.aa.hotspotProxyDoubleClick(a.id,a.url)}; b.prototype.Ah=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.f.c,90)/360))};b.prototype.Pl=function(){var a=this;setTimeout(function(){a.Pl()},100);9!=a.ci||a.Ih||window.requestAnimationFrame(function(){a.Lg();a.Mc("restart recover timer")});10g;)g+=360}b=g-h;2!=this.ib&&(180b&&(b+=360));this.pan.c=this.pan.c+b*this.ud}else this.pan.c=g;this.l.Bg=this.pan.c;break;case 1:h=this.i.c;this.Ld&&3!=q.type?(d=g-h,this.i.c=this.i.c+d*this.ud):this.i.c=g;this.l.Cg=this.i.c;break;case 2:h=this.f.c,this.Ld&&3!=q.type?(e=g-h,this.f.c=this.f.c+e*this.ud):this.f.c=g,this.l.Ag=this.f.c}}c=this.ra();for(f=Math.floor(a);!this.$e(f,3)&&0a?(c=this.jg(this.Qf),this.f.c>c?this.qh=a:(q=(a-this.qh)/this.Bi,q=Math.min(1,q),this.Oc(this.Ka,this.Qf,1-q))):(0==f.xb||q>f.xb-.3?this.Oc(f.value):(q/=f.xb,this.Oc(c,f.value,1-q)),this.l.Cl=f.value);this.Ld&&(b=Math.sqrt(b*b+d*d+e*e),.3>b&&(this.Ld=!1,this.ud=.02,this.Pf=0),0this.Pf&&(this.ud+=.01,this.ud=Math.min(this.ud,1)),this.Pf=b);f=Math.floor(a);if(f!=this.lk)for(this.lk=f,a=this.En(f),b=0;bc&&(c=.2));this.u.mj=a.getTime();this.l.fg&&(this.na.ready()||4==this.Ka)&&this.Ch()&&(this.l.fg=!1,this.l.active=!0,this.qb.od=!0,this.qb.Zi=!1);if(this.u.active||0!=this.u.Eb&&this.na.ready()){if(this.u.Yj&&"__AutoMove"==this.w.bb){var b=a.getTime()-this.u.kk;c=b/100;if(c>=this.w.length){if(this.ki(this.w.length), this.za.splice(this.za.indexOf(this.w),1),this.u.active=!1,this.w=this.u.jk,this.u.Eb=0,this.ii(this.u.pan,this.u.i,this.u.f),this.pan.Gc=this.u.pan,this.i.Gc=this.u.i,this.u.Ig&&(this.u.Ig=!1,this.l.Uh=!0,this.l.active=!0,this.ha("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.ki(c)}else{this.pan.d=this.u.pan-this.pan.c;if(360==this.pan.max-this.pan.min){for(;-180>this.pan.d;)this.pan.d+=360;for(;1805*b?b/d:.2,this.pan.d*=d,this.i.d*=d,this.f.d*=d;this.pan.c+=this.pan.d;this.i.c+=this.i.d;this.O.c+=this.O.d;this.f.c+=this.f.d;0!=this.u.Eb&&(this.u.Eb!=this.Ka?(c=this.jg(this.u.Eb),this.cj()>c?(this.f.c+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.i.d*this.i.d+this.O.d*this.O.d)/b,1))*b,this.f.d)-this.f.d,this.u.f=this.f.c):(this.nc=this.Ka,this.Ka=this.u.Eb,this.M("New projection from Target:"+ this.Ka),this.Kg=this.u.Ng=0,this.na.Hh())):1>this.u.Ng?(this.u.Ng=Math.min(1,this.u.Ng+.05*c),this.Kg=this.u.Ng):(this.nc=0,this.u.Eb=0,this.na.Hh()))}this.hf=a.getTime();this.update()}else if(this.l.active){b=a.getTime()-this.l.startTime;this.l.Phthis.s.b.duration-this.s.b.currentTime&&(this.Di=!0);d>=10*this.Le;)d-=10*this.Le;if(!e&& c>=this.w.length||e&&!b&&c>=this.w.length||e&&b&&(this.w.bb!=this.w.Jl||this.w.Xh!=this.Wa)&&c>=this.w.length){this.ki(this.w.length);this.l.Cd=0;this.Me=!1;if(this.qb.od){this.em();return}this.Mb=this.w.Jl;if(this.Mb==this.w.bb&&this.Wa==this.w.Xh){if(1b.pan;)b.pan+=360;b.tilt=d.value;b.fov=e.value;b.projection=f?f.value:4}b.timingFunction=3;b.speed=1;this.u.Ig=!0;this.Vh(b);this.l.active=!0}}else if(0=1E3*this.l.Yh){if(1=this.Ma.length&&(b=0),c=this.Ma[b];this.l.startTime=a.getTime();this.l.kd=a.getTime();this.l.timeout=0;this.ye("{"+c+"}");this.l.active=!0;this.B.fe=!0}}else b=a.getTime(),d=c=1E3/60,0!=this.l.kd&&(d=b-this.l.kd),this.i.d=this.l.ri*(0-this.i.c)/100,this.f.d=this.l.ri*(this.f.Qa-this.f.c)/100,this.pan.d=.95*this.pan.d+-this.l.speed*this.Ah()*.05,c=d/c,this.pan.c+=this.pan.d*c,this.i.c+= this.i.d*c,this.f.c+=this.f.d*c,this.l.kd=b,this.update();3E31E3*this.l.timeout&&!this.l.fg&&(this.l.Wg&&this.Ch()||!this.l.Wg)&&(this.l.active=!0,this.l.startTime=a.getTime(),this.l.kd=0,this.ha("autorotatechanged",{}),this.pan.d= 0,this.i.d=0,this.f.d=0),!this.Ba.enabled||this.R.Xa||0==this.pan.d&&0==this.i.d&&0==this.f.d||(this.u.Gh=!0,this.pan.d*=.9,this.i.d*=.9,this.f.d*=.9,this.pan.c+=this.pan.d,this.i.c+=this.i.d,this.Ji(this.f.d),1E-4>this.pan.d*this.pan.d+this.i.d*this.i.d+this.f.d*this.f.d&&(this.pan.d=0,this.i.d=0,this.f.d=0),this.update())};b.prototype.Zo=function(a){var c=this.B;if(c.sd){var b=a.getTime()-c.Km;b/=1E3*c.Jm;1<=b?(c.sd=!1,this.Hk(),c.Pj=a.getTime(),this.om(),c.be=!0,0==c.bc||c.Of||(4==c.bc?(this.w= this.ig(!0,c.Fe,c.Ge,c.Jd),this.Mb=this.w.bb,this.l.active=!0,this.qb.od=!0):this.moveTo(c.Fe,c.Ge,c.Jd,c.de,0,c.rd))):c.Nl(b)}else c.be&&(b=a.getTime()-c.Pj,b/=1E3*c.Tf,1<=b?(c.be=!1,this.hf=a.getTime(),this.update(),0!=c.bc&&c.Of&&(4==c.bc?(this.w=this.ig(!0,c.Fe,c.Ge,c.Jd),this.Mb=this.w.bb,this.l.active=!0,this.qb.od=!0):this.moveTo(c.Fe,c.Ge,c.Jd,c.de,0,c.rd)),4!=c.bc&&(this.Pg(c.Th),this.Qg(c.yi),this.Og(c.Lh),this.l.active=c.fe,this.ha("autorotatechanged",{}),c.fe=!1),this.l.kd=0,this.ga&& this.Pi(),this.Vf=!1):c.Nl(b));c=this.So;c.cn&&(c.wh?a.getTime()-c.Wi>=1E3*c.wn&&(c.wh=!1):(c.current+=c.Xc,0>c.current&&(c.current=0,c.Xc=-c.Xc,c.wh=!0,c.Wi=a.getTime()),1c.Pb[a]?(c.Pb[a]+=.05,c.Pc[a]c.Pb[a]&&(c.Pb[a]=c.Pc[a],-1!=c.li.indexOf(c.lb[a])&&(c.li.splice(c.li.indexOf(c.lb[a]), 1),c.lb.splice(a,1),c.Pc.splice(a,1),c.Pb.splice(a,1)))));this.update()}if(2==c.mode)for(a=0;ab.pa?(b.pa+=c.Xc,b.nbb.pa&&(b.pa=b.nb)),this.update())}3==c.mode&&c.nb!=c.pa&&(c.nb>c.pa?(c.pa+=c.Xc,c.nbc.pa&&(c.pa=c.nb)),this.update())};b.prototype.ap=function(){var a=this.Ba;this.R.Xa&&(this.C.Ad?(a.ca.x=.4*(this.X.da.x-a.da.x),a.ca.y=.4*(this.X.da.y-a.da.y), a.da.x+=a.ca.x,a.da.y+=a.ca.y):(a.ca.x=.1*-this.X.ca.x*this.C.sensitivity/8,a.ca.y=.1*-this.X.ca.y*this.C.sensitivity/8),this.Em(a.ca.x,a.ca.y),this.update());a.f.active&&(this.qk(.4*(a.f.jc-this.f.c)),.001>Math.abs(a.f.jc-this.f.c)/this.f.c&&(a.f.active=!1),this.update());if(a.enabled&&(0!=a.ca.x||0!=a.ca.y)&&!this.R.Xa){var c=.9*(1-a.Fj);a.ca.x=c*a.ca.x;a.ca.y=c*a.ca.y;this.u.Gh=!0;.01>a.ca.x*a.ca.x+a.ca.y*a.ca.y?(a.ca.x=0,a.ca.y=0):(this.Em(a.ca.x,a.ca.y),this.update())}};b.prototype.Yo=function(){if(this.C.cm&& this.C.Ad){var a=this.Sl;a.pan=this.pan.c;a.i=this.i.c;a.f=this.f.c;this.Ue(a);this.Ue(a);this.Ue(a);var c=a.pan-this.pan.c,b=a.i-this.i.c;a=a.f-this.f.c;if(0!=c||0!=b||0!=a){var d=.2+.9*Math.min((Math.abs(c)+Math.abs(b)+Math.abs(a))/Math.abs(Math.min(this.f.c,90))*.3,1);this.pan.c+=c*d;this.i.c+=b*d;this.f.c+=a*d;this.Ba.Fj=.3;this.update()}else this.Ba.Fj=0}else this.Xf();if(2!=this.ib){for(;360this.pan.c;)this.pan.c+=360}};b.prototype.$o=function(){if(!this.Ch()&& this.cf&&5"+b.pk(this.Rh).replace(/./gm,function(a){return"&#"+a.charCodeAt(0)+";"})),f.setAttribute("style","color: black; text-decoration: none;"), a.appendChild(f),e.appendChild(a));d.T.insertBefore(d.bd,d.T.firstChild);e.onclick=function(){d.bd&&(d.T.removeChild(d.bd),d.bd=null)};e.oncontextmenu=e.onclick}};b.prototype.bn=function(){var a=this;var c=a.Fa;a.control=c;a.control=c;a.zm();setTimeout(function(){a.Lg()},10);setTimeout(function(){a.Pl()},200);setTimeout(function(){a.Ke();a.ah()},10);c.addEventListener&&(c.addEventListener("touchstart",function(c){a.bq(c)},!1),c.addEventListener("touchmove",function(c){a.aq(c)},!1),c.addEventListener("touchend", function(c){a.$p(c)},!1),c.addEventListener("touchcancel",function(c){a.Zp(c)},!1),c.addEventListener("pointerdown",function(c){a.Il(c)},!1),c.addEventListener("MSPointerDown",function(c){a.Il(c)},!1),c.addEventListener("MSGestureStart",function(c){a.Sk(c)},!1),c.addEventListener("MSGestureEnd",function(c){a.Rk(c)},!1),c.addEventListener("MSGestureChange",function(c){a.Ko(c)},!1),c.addEventListener("gesturestart",function(c){a.Sk(c)},!1),c.addEventListener("gesturechange",function(c){a.Dn(c)},!1), c.addEventListener("gestureend",function(c){a.Rk(c)},!1),c.addEventListener("mousedown",function(c){a.Ho(c)},!1),c.addEventListener("mousemove",function(c){a.Go(c)},!1),document.addEventListener("mouseup",function(c){a.Fo(c)},!1),c.addEventListener("mousewheel",function(c){a.Hl(c)},!1),c.addEventListener("DOMMouseScroll",function(c){a.Hl(c)},!1),document.addEventListener("keydown",function(c){a.zo(c)},!1),document.addEventListener("keyup",function(c){a.Ao(c)},!1),window.addEventListener("orientationchange", function(){a.zm()},!1),window.addEventListener("resize",function(){a.Ke()},!1),window.addEventListener("blur",function(){a.Qo()},!1),a.T.addEventListener("webkitfullscreenchange",function(){a.Zh()},!1),document.addEventListener("mozfullscreenchange",function(){a.Zh()},!1),window.addEventListener("webkitfullscreenchange",function(){a.Zh()},!1),document.addEventListener("MSFullscreenChange",function(){a.Zh()},!1));c.oncontextmenu=function(c){void 0===c&&(c=window.event);if(c.target&&!a.zc(c.target))return!0; if(!c.ctrlKey){c=a.kg(c);var b=a.qe();a.Kp(c.x-b.x,c.y-b.y);return!1}return!0};window.addEventListener("deviceorientation",function(c){a.Ro(c.alpha,c.beta,c.gamma,c.absolute)})};b.prototype.ik=function(){for(var a=0;ac&&(c=0),c>a.Rf.duration&&(c=a.Rf.duration-.1),a.fn(c)):a.b&&(0>c&&(c=0),c>a.b.duration&&(c=a.b.duration- .1),a.b.currentTime=c))};b.prototype.Hp=function(a,c){if(this.Fb){var b=this.ia;b&&b.setVolume(a,c)}else try{b=void 0;var d=Number(c);1d&&(d=0);"_videopanorama"===a&&this.s.b&&(this.s.b.volume=d);if("_main"===a){this.V=d;for(b=0;bb&&(b=0);this.V=b;for(d=0;db&&(b=0);f.level=b;f.b&&null!=f.b.volume&&(f.b.volume=b*this.V)}}}catch(t){this.M(t)}};b.prototype.sp=function(a,c){a=this.Ib(a);for(var b=0;bb&&(b=this.qc);for(c=0;6>c;c++){var d=this.ob.cb[c];a?(d.width=this.Uf,d.height=this.Uf):(d.K=document.createElement("canvas"),d.K.width=this.qc,d.K.height=this.qc,d.width=this.qc,d.height=this.qc,d.Pa=d.K.getContext("2d"));var e="position:absolute;";e+="left: 0px;";e+="top: 0px;";e+="width: "+b+"px;";e+="height: "+b+"px;";a&&(e+="outline: 1px solid transparent;");e+=this.Ia+"transform-origin: 0% 0%;";e+="-webkit-user-select: none;";e+=this.Ia+"transform: ";var f="";var h=1;this.tf&& (h=100);f=4>c?f+("rotateY("+-90*c+"deg)"):f+("rotateX("+(4==c?-90:90)+"deg)");this.tf&&(f+=" scale("+h+")");f+=" translate3d("+-b/2+"px,"+-b/2+"px,"+-b*h/(2*this.Ff)+"px)";e+=f+";";d.fl=f;a||(d.K.setAttribute("style",e),this.D.insertBefore(d.K,this.D.firstChild))}if(!a){for(c=0;6>c;c++)d=this.ob.cb[c],""!=this.We[c]&&(d.Fd=new Image,d.Fd.crossOrigin=this.crossOrigin,d.Fd.onload=this.zk(d),d.Fd.setAttribute("src",this.kc(this.We[c])),this.Sb.push(d.Fd));for(c=0;6>c;c++)d=this.ob.cb[c],d.loaded=!1, d.h=new Image,d.h.crossOrigin=this.crossOrigin,d.h.onload=this.zk(d),d.h.setAttribute("src",this.kc(this.uh[c])),this.Sb.push(d.h)}};b.prototype.ei=function(){var a;this.Ba.ca.x=0;this.Ba.ca.y=0;if(this.Tc){for(a=0;aa.qg?a.jh:a.qg};b.prototype.Aj=function(a,b){var c=(new DOMParser).parseFromString(a,"text/xml");this.Si=a;this.Ul(c,b);this.ia&&(this.M("Apply to Flash player"), this.ia.readConfigString(this.Si),this.ia.setLocked(!0),this.ia.setSlaveMode(!0))};b.prototype.Tl=function(a,b,d){try{var c=void 0;c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);if(c.responseXML){var e=a.lastIndexOf("/");0<=e&&(this.Nd=a.substr(0,e+1));2<=arguments.length&&null!=b&&(this.Nd=b);this.Aj(c.responseText,d)}else alert("Error loading panorama XML")}catch(p){alert("Error:"+p)}};b.prototype.fp=function(a,b,d,f){var c=new XMLHttpRequest;var k=this;c.onload=function(e){if(4<=c.readyState)if(c.responseXML){var g= a.lastIndexOf("/");0<=g&&(k.Nd=a.substr(0,g+1));3<=arguments.length&&null!=d&&(k.Nd=d);k.Aj(c.responseText,f);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+c.statusText)};c.onerror=function(){console.error("Error loading XML:"+c.statusText)};c.open("GET",a,!0);c.send(null)};b.prototype.Ii=function(a){var b="";"{"==a.charAt(0)&&(b=a.substr(1,a.length-2));(a=this.Pd[b])&&(b=a);a={oldNodeId:this.Wa,nodeId:b};this.ha("beforechangenodeid",a);""!=this.Wa&& -1==this.ak.indexOf(this.Wa)&&this.ak.push(this.Wa);this.Bl=this.Wa;this.Wa=b;this.M("change active node: "+b);this.aa&&this.aa.changeActiveNode&&this.aa.changeActiveNode("{"+b+"}");this.ha("changenodeid",a)};b.prototype.Tk=function(){return this.Wa};b.prototype.Xk=function(){if(0=this.Ma.length&&(a=0);return this.Ma[a]}return""};b.prototype.ko=function(){if(0a&&(a=this.Ma.length-1);return this.Ma[a]}return""}; b.prototype.Rn=function(){return this.Bl};b.prototype.Oo=function(a){return-1!=this.ak.indexOf(a)};b.prototype.Ul=function(a,b){var c=a.firstChild;this.Ie=[];this.Ma=[];this.Pd=[];for(a=c.firstChild;a;){if("map"==a.nodeName){var d={},e=a.getAttributeNode("title");e&&(d.title=e.nodeValue.toString());e=a.getAttributeNode("type");d.type=e.nodeValue.toString();"web"==d.type?(e=a.getAttributeNode("mapprovider"),d.mapprovider=e.nodeValue.toString(),(e=a.getAttributeNode("mapstyle"))&&(d.mapstyle=e.nodeValue.toString()), (e=a.getAttributeNode("googlecustomstylecode"))&&(d.googlecustomstylecode=e.nodeValue.toString()),(e=a.getAttributeNode("mapurltemplate"))&&(d.mapurltemplate=e.nodeValue.toString()),(e=a.getAttributeNode("mapmaxzoom"))&&(d.mapmaxzoom=Number(e.nodeValue)),(e=a.getAttributeNode("mapkey"))&&(d.mapkey=e.nodeValue.toString()),(e=a.getAttributeNode("styleurl"))&&(d.styleurl=e.nodeValue.toString())):(e=a.getAttributeNode("width"),d.width=Number(e.nodeValue),e=a.getAttributeNode("height"),d.height=Number(e.nodeValue), e=a.getAttributeNode("zoomlevels"),d.zoomlevels=Number(e.nodeValue),e=a.getAttributeNode("tileformat"),d.tileformat=e.nodeValue.toString(),e=a.getAttributeNode("bgcolor"),d.bgcolor=e.nodeValue.toString(),e=a.getAttributeNode("transparent"),d.transparent=1==e.nodeValue,e=a.getAttributeNode("floorplannorth"),d.floorplannorth=Number(e.nodeValue));e=a.getAttributeNode("id");this.Sh[e.nodeValue.toString()]=d}a=a.nextSibling}if("tour"==c.nodeName){this.gf=!0;a="";(e=c.getAttributeNode("start"))&&(a=e.nodeValue.toString()); this.hasOwnProperty("startNode")&&this.startNode&&(a=String(this.startNode),this.startNode="");this.hasOwnProperty("startView")&&this.startView&&("object"===typeof this.startView&&null!==this.startView?b=this.startView:""!=this.startView&&(b=String(this.startView)),this.startView="");d=c.firstChild;var f="";for(c="";d;){if("panorama"==d.nodeName){if(e=d.getAttributeNode("id"))f=e.nodeValue.toString(),""==a&&(a=f),""==c&&(c=f),this.Ie[f]=d,this.Ma.push(f);for(e=d.firstChild;e;){if("userdata"==e.nodeName){var h= this.bg(e);this.hh[f]=h;f==a&&(this.hh._first=h);h.customnodeid&&(this.Pd[h.customnodeid]=f);this.Ac[f]=this.Ek(e);this.lf[f]=this.Fk(e)}e=e.nextSibling}}if("masternode"==d.nodeName)for(e=d.firstChild;e;)"userdata"==e.nodeName&&(h=this.bg(e),this.hh._master=h),e=e.nextSibling;d=d.nextSibling}this.Ie.hasOwnProperty(a)||(e=this.Pd[a])&&(a=e);this.Ie.hasOwnProperty(a)||(this.Mc("Start node "+a+" not found!"),a=c);this.zj(this.Ie[a],b);this.Ii("{"+a+"}");this.Wa=a}else this.gf=!1,this.zj(c,b),this.Ii(""), this.Ma.push("");this.ha("configloaded",{})};b.prototype.zj=function(a,b){var c=this;this.Zl();this.Ga&&this.Ga.hp();this.wf(this.pb);this.ei();this.yg=0;for(var d=a.firstChild,e,f,h=0;d;){if("view"==d.nodeName){if(e=d.getAttributeNode("fovmode"))this.f.mode=Number(e.nodeValue);e=d.getAttributeNode("pannorth");this.pan.uj=1*(e?e.nodeValue:0);for(var g=d.firstChild;g;){"start"==g.nodeName&&(e=g.getAttributeNode("pan"),this.pan.c=Number(e?e.nodeValue:0),this.pan.Qa=this.pan.c,e=g.getAttributeNode("tilt"), this.i.c=Number(e?e.nodeValue:0),this.i.Qa=this.i.c,e=g.getAttributeNode("roll"),this.O.c=Number(e?e.nodeValue:0),this.O.Qa=this.O.c,e=g.getAttributeNode("fov"),this.f.c=Number(e?e.nodeValue:70),this.f.Qa=this.f.c,e=g.getAttributeNode("projection"),this.$h=Number(e?e.nodeValue:4),this.Oc(this.$h));"min"==g.nodeName&&(e=g.getAttributeNode("pan"),this.pan.min=1*(e?e.nodeValue:0),e=g.getAttributeNode("tilt"),this.i.min=1*(e?e.nodeValue:-90),e=g.getAttributeNode("fov"),this.f.min=1*(e?e.nodeValue:5), 1E-20>this.f.min&&(this.f.min=1E-20),e=g.getAttributeNode("fovpixel"),this.f.Hg=1*(e?e.nodeValue:0));if("max"==g.nodeName){e=g.getAttributeNode("pan");this.pan.max=1*(e?e.nodeValue:0);e=g.getAttributeNode("tilt");this.i.max=1*(e?e.nodeValue:90);e=g.getAttributeNode("fov");this.f.max=1*(e?e.nodeValue:120);180<=this.f.max&&(this.f.max=179.9);if(e=g.getAttributeNode("fovstereographic"))this.f.sj=1*e.nodeValue;if(e=g.getAttributeNode("fovfisheye"))this.f.rj=1*e.nodeValue;if(e=g.getAttributeNode("scaletofit"))this.C.dm= 1==e.nodeValue}if("flyin"==g.nodeName){if(e=g.getAttributeNode("projection"))this.tc.Eb=Number(e.nodeValue);if(e=g.getAttributeNode("pan"))this.tc.pan=parseFloat(e.nodeValue);if(e=g.getAttributeNode("tilt"))this.tc.i=parseFloat(e.nodeValue);if(e=g.getAttributeNode("fov"))this.tc.f=parseFloat(e.nodeValue)}g=g.nextSibling}}if("autorotate"==d.nodeName){if(e=d.getAttributeNode("speed"))this.l.speed=1*e.nodeValue;if(e=d.getAttributeNode("delay"))this.l.timeout=1*e.nodeValue;if(e=d.getAttributeNode("returntohorizon"))this.l.ri= 1*e.nodeValue;if(e=d.getAttributeNode("nodedelay"))this.l.Yh=1*e.nodeValue;if(e=d.getAttributeNode("noderandom"))this.l.tj=1==e.nodeValue;this.Rd&&(this.l.enabled=!0,this.l.Oe=!0,this.l.active=!1);this.l.Cd=0;if(e=d.getAttributeNode("startloaded"))this.l.Wg=1==e.nodeValue,this.l.Wg&&(this.l.active=!1);if(e=d.getAttributeNode("useanimation"))this.l.gh=1==e.nodeValue,this.l.Jf=this.l.gh;if(e=d.getAttributeNode("syncanimationwithvideo"))this.l.Rj=1==e.nodeValue}if("animation"==d.nodeName){if(e=d.getAttributeNode("syncanimationwithvideo"))this.l.Rj= 1==e.nodeValue;if(e=d.getAttributeNode("useinautorotation"))this.l.gh=1==e.nodeValue;if(e=d.getAttributeNode("animsequence"))this.l.rh=e.nodeValue,this.Rd&&(this.l.Md=this.l.rh);this.za=[];for(g=d.firstChild;g;){if("clip"==g.nodeName){this.w=new m.dk;if(e=g.getAttributeNode("animtitle"))this.w.Ne=e.nodeValue.toString();if(e=g.getAttributeNode("cliptitle"))this.w.bb=e.nodeValue.toString();if(e=g.getAttributeNode("nodeid"))this.w.yq=e.nodeValue.toString();if(e=g.getAttributeNode("length"))this.w.length= Number(e.nodeValue);if(e=g.getAttributeNode("animtype"))this.w.Zm=Number(e.nodeValue);if(e=g.getAttributeNode("nextcliptitle"))this.w.Jl=e.nodeValue.toString();if(e=g.getAttributeNode("nextclipnodeid"))this.w.Xh=e.nodeValue.toString();if(e=g.getAttributeNode("nextclipstartview"))this.w.No=e.nodeValue.toString();if(e=g.getAttributeNode("transitiontype"))this.w.cq=Number(e.nodeValue);var q=g.firstChild;for(this.w.W=[];q;){if("keyframe"==q.nodeName){var n=new m.Fc;if(e=q.getAttributeNode("time"))n.time= Number(e.nodeValue);if(e=q.getAttributeNode("value"))n.value=Number(e.nodeValue);if(e=q.getAttributeNode("valuestring"))n.Zj=e.nodeValue.toString();if(e=q.getAttributeNode("transitiontime"))n.xb=Number(e.nodeValue);e=q.getAttributeNode("type");var y=0;e&&(n.type=Number(e.nodeValue),y=Number(e.nodeValue));if(e=q.getAttributeNode("property"))n.ub=Number(e.nodeValue);if(e=q.getAttributeNode("additionaltrackid"))n.ph=e.nodeValue.toString();if(1==y||2==y){if(e=q.getAttributeNode("bezierintime"))n.ge=Number(e.nodeValue); if(e=q.getAttributeNode("bezierinvalue"))n.Wc=Number(e.nodeValue);if(e=q.getAttributeNode("bezierouttime"))n.he=Number(e.nodeValue);if(e=q.getAttributeNode("bezieroutvalue"))n.ie=Number(e.nodeValue)}this.w.W.push(n)}q=q.nextSibling}this.za.push(this.w)}g=g.nextSibling}}"input"==d.nodeName&&(f||(f=d));if(f)for(q=0;6>q;q++)e=f.getAttributeNode("prev"+q+"url"),this.We[q]=e?String(e.nodeValue):"";"altinput"==d.nodeName&&(g=0,(e=d.getAttributeNode("screensize"))&&(g=1*e.nodeValue),0 h&&(h=g,f=d));if("control"==d.nodeName&&this.Rd){if(e=d.getAttributeNode("simulatemass"))this.Ba.enabled=1==e.nodeValue;if(e=d.getAttributeNode("rubberband"))this.C.cm=1==e.nodeValue;if(e=d.getAttributeNode("locked"))this.C.Ab=1==e.nodeValue;e&&(this.C.ue=1==e.nodeValue);if(e=d.getAttributeNode("lockedmouse"))this.C.Ab=1==e.nodeValue;if(e=d.getAttributeNode("lockedkeyboard"))this.C.ue=1==e.nodeValue;if(e=d.getAttributeNode("lockedkeyboardzoom"))this.C.Do=1==e.nodeValue;if(e=d.getAttributeNode("lockedwheel"))this.C.ld= 1==e.nodeValue;if(e=d.getAttributeNode("invertwheel"))this.C.ol=1==e.nodeValue;if(e=d.getAttributeNode("speedwheel"))this.C.lm=1*e.nodeValue;if(e=d.getAttributeNode("invertcontrol"))this.C.Ad=1==e.nodeValue;if(e=d.getAttributeNode("sensitivity"))this.C.sensitivity=1*e.nodeValue,1>this.C.sensitivity&&(this.C.sensitivity=1);if(e=d.getAttributeNode("dblclickfullscreen"))this.C.Ui=1==e.nodeValue;if(e=d.getAttributeNode("contextfullscreen"))this.C.Zf=1==e.nodeValue;if(e=d.getAttributeNode("contextprojections"))this.C.sh= 1==e.nodeValue;if(e=d.getAttributeNode("hideabout"))this.C.df=1==e.nodeValue;for(g=d.firstChild;g;)"menulink"==g.nodeName&&(q={text:"",url:""},e=g.getAttributeNode("text"),q.text=e.nodeValue,e=g.getAttributeNode("url"),q.url=e.nodeValue,this.Gg.push(q)),g=g.nextSibling}if("transition"==d.nodeName&&this.Rd){if(e=d.getAttributeNode("enabled"))this.B.enabled=1==e.nodeValue;if(e=d.getAttributeNode("blendtime"))this.B.Tf=1*e.nodeValue;if(e=d.getAttributeNode("blendcolor"))this.B.Qe=e.nodeValue.toString(); if(e=d.getAttributeNode("type"))this.B.type=e.nodeValue.toString();if(e=d.getAttributeNode("softedge"))this.B.Cc=1*e.nodeValue;if(e=d.getAttributeNode("zoomin"))this.B.Oa=1*e.nodeValue;if(e=d.getAttributeNode("zoomout"))this.B.bc=1*e.nodeValue;if(e=d.getAttributeNode("zoomfov"))this.B.Nf=1*e.nodeValue;if(e=d.getAttributeNode("zoomspeed"))this.B.de=1*e.nodeValue;if(e=d.getAttributeNode("zoomoutpause"))this.B.Of=1==e.nodeValue;"cut"==this.B.type&&(this.B.Tf=0)}if("soundstransition"==d.nodeName){if(e= d.getAttributeNode("enabled"))this.La.enabled=1==e.nodeValue;if(e=d.getAttributeNode("transitiontime"))this.La.xb=1*e.nodeValue;if(e=d.getAttributeNode("crossfade"))this.La.yk=1==e.nodeValue}if("flyintransition"==d.nodeName){if(e=d.getAttributeNode("enabled"))this.qb.enabled=1==e.nodeValue&&this.Y;if(e=d.getAttributeNode("speed"))this.qb.speed=1*e.nodeValue}"userdata"==d.nodeName&&(this.userdata=this.Kf=this.bg(d),this.Ac[a.id]||(this.Ac[a.id]=this.Ek(d),this.lf[a.id]=this.Fk(d)));if("hotspots"== d.nodeName)for(g=d.firstChild;g;){if("label"==g.nodeName&&this.Rd){q=this.A.Tj;if(e=g.getAttributeNode("enabled"))q.enabled=1==e.nodeValue;if(e=g.getAttributeNode("width"))q.width=1*e.nodeValue;if(e=g.getAttributeNode("height"))q.height=1*e.nodeValue;if(e=g.getAttributeNode("textcolor"))q.Uj=1*e.nodeValue;if(e=g.getAttributeNode("textalpha"))q.Sj=1*e.nodeValue;if(e=g.getAttributeNode("background"))q.background=1==e.nodeValue;if(e=g.getAttributeNode("backgroundalpha"))q.dc=1*e.nodeValue;if(e=g.getAttributeNode("backgroundcolor"))q.ec= 1*e.nodeValue;if(e=g.getAttributeNode("border"))q.Gi=1*e.nodeValue;if(e=g.getAttributeNode("bordercolor"))q.hc=1*e.nodeValue;if(e=g.getAttributeNode("borderalpha"))q.gc=1*e.nodeValue;if(e=g.getAttributeNode("borderradius"))q.Fi=1*e.nodeValue;if(e=g.getAttributeNode("wordwrap"))q.zi=1==e.nodeValue}if("polystyle"==g.nodeName&&this.Rd){if(e=g.getAttributeNode("mode"))this.A.mode=1*e.nodeValue;if(e=g.getAttributeNode("bordercolor"))this.A.hc=1*e.nodeValue;if(e=g.getAttributeNode("backgroundcolor"))this.A.ec= 1*e.nodeValue;if(e=g.getAttributeNode("borderalpha"))this.A.gc=1*e.nodeValue;if(e=g.getAttributeNode("backgroundalpha"))this.A.dc=1*e.nodeValue;if(e=g.getAttributeNode("handcursor"))this.A.bf=1==e.nodeValue}e=void 0;"hotspot"==g.nodeName&&(e=new m.nh(this),e.type="point",e.Ob(g),this.P.push(e));"polyhotspot"==g.nodeName&&(e=new m.nh(this),e.type="poly",e.Ob(g),this.P.push(e));g=g.nextSibling}if("sounds"==d.nodeName||"media"==d.nodeName)for(g=d.firstChild;g;){if("sound"==g.nodeName&&!this.Kl)for(e= new m.Tm(this),e.Ob(g),this.Fb||e.addElement(),q=0;qq;q++)(e=f.getAttributeNode("tile"+q+"url"))&&(this.uh[q]=String(e.nodeValue)),e=f.getAttributeNode("tile"+q+"url1");for(q=0;6>q;q++)(e=f.getAttributeNode("prev"+q+"url"))&&(this.We[q]=String(e.nodeValue));if(e=f.getAttributeNode("tilesize"))this.qc=1*e.nodeValue;if(e=f.getAttributeNode("canvassize"))this.Uf=Number(e.nodeValue);if(e=f.getAttributeNode("tilescale"))this.Ff= 1*e.nodeValue;if(e=f.getAttributeNode("leveltileurl"))this.h.Gl=e.nodeValue;if(e=f.getAttributeNode("leveltilesize"))this.h.G=Number(e.nodeValue);if(e=f.getAttributeNode("levelbias"))this.h.El=Number(e.nodeValue);if(e=f.getAttributeNode("levelbiashidpi"))this.h.Fl=Number(e.nodeValue);e=f.getAttributeNode("overlap");this.$a.O=0;this.$a.pitch=0;e&&(this.h.Ja=Number(e.nodeValue));if(e=f.getAttributeNode("levelingroll"))this.$a.O=Number(e.nodeValue);if(e=f.getAttributeNode("levelingpitch"))this.$a.pitch= Number(e.nodeValue);this.ib=0;(e=f.getAttributeNode("flat"))&&1==e.nodeValue&&(this.ib=2);e=f.getAttributeNode("width");this.h.width=1*(e?e.nodeValue:1);e=f.getAttributeNode("height");this.h.height=1*(e?e.nodeValue:this.h.width);this.s.src=[];this.h.J=[];for(g=f.firstChild;g;){if("preview"==g.nodeName){if(e=g.getAttributeNode("color"))this.h.rf=e.nodeValue;if(e=g.getAttributeNode("strip"))this.h.Rl=1==e.nodeValue}if("video"==g.nodeName){if(e=g.getAttributeNode("format"))"3x2"==e.nodeValue&&(this.s.format= 14),"equirectangular"==e.nodeValue&&(this.s.format=1);if(e=g.getAttributeNode("flipy"))this.s.bj=Number(e.nodeValue);if(e=g.getAttributeNode("startonload"))this.s.Oj=1==e.nodeValue;if(e=g.getAttributeNode("startmutedmobile"))this.s.nm=1==e.nodeValue;if(e=g.getAttributeNode("bleed"))this.s.Pe=Number(e.nodeValue);if(e=g.getAttributeNode("endaction"))this.s.me=String(e.nodeValue);if(e=g.getAttributeNode("width"))this.s.width=Number(e.nodeValue);if(e=g.getAttributeNode("height"))this.s.height=Number(e.nodeValue); for(q=g.firstChild;q;)"source"==q.nodeName&&(e=q.getAttributeNode("url"))&&this.s.src.push(e.nodeValue.toString()),q=q.nextSibling}if("level"==g.nodeName){f=new m.gk;e=g.getAttributeNode("width");f.width=1*(e?e.nodeValue:1);e=g.getAttributeNode("height");f.height=1*(e?e.nodeValue:f.width);if(e=g.getAttributeNode("preload"))f.cache=1==e.nodeValue;if(e=g.getAttributeNode("preview"))f.qf=1==e.nodeValue;f.L=Math.floor((f.width+this.h.G-1)/this.h.G);f.ea=Math.floor((f.height+this.h.G-1)/this.h.G);this.h.J.push(f)}g= g.nextSibling}this.h.nj=this.h.J.length}this.cf=!0;this.bh&&(this.Y=this.Tc=!1,this.ic||(this.M("dummy rendering"),this.ic=document.createElement("canvas"),this.ic.width=100,this.ic.height=100,this.ic.id="dummycanvas",this.D.appendChild(this.ic)),this.Sc());this.Y&&this.H&&(this.na.ml(this.Ff),this.na.nl());this.Tc&&(0a;a++){var k=a%3*f+r.s.Pe;var g=k+f-2*r.s.Pe;var h=4;3>a&&(h+=f);var l=h+f-2*r.s.Pe;for(b=0;4>b;b++){d.x=-1;d.y=-1;d.z=1;for(var p=0;pa.time&&this.w.W[b].timea.Rc;)a.Rc=a.Rc+360;for(;180f;)f+=360;for(;180x)for(;r<=t&&u>x;)u=new m.rc,u.Ei(w,B,C,z,r),u=u.y,r++;else r=1;r>=.8*t&&(y=r=Math.round(.8*t));0==r&&(r=1);x=void 0;4==a.Tg?x=120:x=this.jg(a.Tg);u=a.Ef;if(u>x)for(;v>r&&u>x;)u=new m.rc,u.Ei(w,B,C,z,v),u=u.y,v--}w=new m.Fc;w.time=0;w.ub= 0;w.value=a.Df;w.type=1;w.he=t/3;w.ie=a.Xe?a.Df:a.Df+f/3;b.W.push(w);w=new m.Fc;w.time=0;w.ub=1;w.value=a.Ug;w.type=1;w.he=t/3;w.ie=a.Xe?a.Ug:a.Ug+e/3;b.W.push(w);w=new m.Fc;w.time=0;w.ub=2;w.value=a.Id;w.type=1;w.he=t/3;w.ie=a.Xe?a.Id:a.Id+h/3;b.W.push(w);w=new m.Fc;w.time=0;w.ub=3;w.value=a.Tg;w.type=0;w.xb=0;b.W.push(w);d&&(w=new m.Fc,w.time=r,w.ub=3,w.value=a.rd,w.type=0,w.xb=v-r,b.W.push(w));w=new m.Fc;w.time=t;w.ub=0;w.value=a.Df+f;w.type=1;w.ge=2*t/3;a.ke&&!a.le?w.Wc=w.value:w.Wc=w.value-f/ 3;a.le&&(w.he=t+q,w.ie=w.value+q/t*f);b.W.push(w);w=new m.Fc;w.time=t;w.ub=1;w.value=a.$d;w.type=1;w.ge=2*t/3;a.ke&&!a.le?w.Wc=a.$d:w.Wc=a.$d-e/3;a.le&&(w.he=t+q,w.ie=w.value+q/t*e);b.W.push(w);w=new m.Fc;w.time=y;w.ub=2;w.value=n;w.type=1;w.ge=2*y/3;a.ke?w.Wc=n:w.Wc=n-h/3;b.W.push(w);a.le&&(w=new m.Fc,w.time=t+g,w.ub=0,w.value=a.Rc,w.type=1,w.ge=t+g-q,w.Wc=a.Rc,b.W.push(w),w=new m.Fc,w.time=t+g,w.ub=1,w.value=a.$d,w.type=1,w.ge=t+g-q,w.Wc=a.$d,b.W.push(w));this.za.push(b);return b};b.prototype.pq= function(){this.s.b&&this.s.b.play()};b.prototype.qq=function(){this.s.b&&(this.s.b.pause(),this.s.b.currentTime=0)};b.prototype.oq=function(){this.s.b&&this.s.b.pause()};b.prototype.Gp=function(a){this.s.b&&(0>a&&(a=0),a>this.s.b.duration&&(a=this.s.b.duration-.1),this.s.b.currentTime=a,this.update())};b.prototype.qo=function(){return this.s.b?this.s.b.currentTime:0};b.prototype.po=function(){if(this.s.b)return this.s.b};b.prototype.Fp=function(a){if(this.s.b){var b=!this.s.b.paused&&!this.s.b.ended, d=this.s.b.currentTime;this.s.b.pause();isNaN(parseInt(a,10))?this.s.b.src=String(a):this.s.b.src=this.s.src[parseInt(a,10)];b&&(this.s.b.onloadedmetadata=function(){this.currentTime=d;this.play();this.onloadedmetadata=null});this.s.b.currentTime=d}};b.prototype.xn=function(){this.Kl=!0};return b}();m.a=d})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=U;window.ggHasWebGL=V;window.pano2vrPlayer=ggP2VR.a;ggP2VR.a.prototype.getVersion=ggP2VR.a.prototype.el;ggP2VR.a.prototype.readConfigString=ggP2VR.a.prototype.Aj; ggP2VR.a.prototype.readConfigUrl=ggP2VR.a.prototype.Tl;ggP2VR.a.prototype.readConfigUrlAsync=ggP2VR.a.prototype.fp;ggP2VR.a.prototype.readConfigXml=ggP2VR.a.prototype.Ul;ggP2VR.a.prototype.openUrl=ggP2VR.a.prototype.vj;ggP2VR.a.prototype.openNext=ggP2VR.a.prototype.ye;ggP2VR.a.prototype.setMargins=ggP2VR.a.prototype.rp;ggP2VR.a.prototype.addListener=ggP2VR.a.prototype.addListener;ggP2VR.a.prototype.on=ggP2VR.a.prototype.addListener;ggP2VR.a.prototype.removeEventListener=ggP2VR.a.prototype.removeEventListener; ggP2VR.a.prototype.detectBrowser=ggP2VR.a.prototype.Ck;ggP2VR.a.prototype.initWebGL=ggP2VR.a.prototype.Jc;ggP2VR.a.prototype.getPercentLoaded=ggP2VR.a.prototype.fo;ggP2VR.a.prototype.setBasePath=ggP2VR.a.prototype.lp;ggP2VR.a.prototype.getBasePath=ggP2VR.a.prototype.Fn;ggP2VR.a.prototype.setViewerSize=ggP2VR.a.prototype.im;ggP2VR.a.prototype.getViewerSize=ggP2VR.a.prototype.to;ggP2VR.a.prototype.setSkinObject=ggP2VR.a.prototype.Bp;ggP2VR.a.prototype.changeViewMode=ggP2VR.a.prototype.ln; ggP2VR.a.prototype.getViewMode=ggP2VR.a.prototype.ro;ggP2VR.a.prototype.changePolygonMode=ggP2VR.a.prototype.sk;ggP2VR.a.prototype.setPolygonMode=ggP2VR.a.prototype.sk;ggP2VR.a.prototype.getPolygonMode=ggP2VR.a.prototype.io;ggP2VR.a.prototype.showOnePolyHotspot=ggP2VR.a.prototype.jm;ggP2VR.a.prototype.hideOnePolyHotspot=ggP2VR.a.prototype.il;ggP2VR.a.prototype.changePolyHotspotColor=ggP2VR.a.prototype.jn;ggP2VR.a.prototype.toggleOnePolyHotspot=ggP2VR.a.prototype.Yp; ggP2VR.a.prototype.changeViewState=ggP2VR.a.prototype.mn;ggP2VR.a.prototype.getViewState=ggP2VR.a.prototype.so;ggP2VR.a.prototype.setRenderFlags=ggP2VR.a.prototype.up;ggP2VR.a.prototype.getRenderFlags=ggP2VR.a.prototype.lo;ggP2VR.a.prototype.setMaxTileCount=ggP2VR.a.prototype.gm;ggP2VR.a.prototype.getVFov=ggP2VR.a.prototype.Jb;ggP2VR.a.prototype.setVFov=ggP2VR.a.prototype.Sg;ggP2VR.a.prototype.getHFov=ggP2VR.a.prototype.Jn;ggP2VR.a.prototype.updatePanorama=ggP2VR.a.prototype.ah; ggP2VR.a.prototype.isTouching=ggP2VR.a.prototype.vl;ggP2VR.a.prototype.getIsMobile=ggP2VR.a.prototype.On;ggP2VR.a.prototype.setIsMobile=ggP2VR.a.prototype.pp;ggP2VR.a.prototype.getIsTour=ggP2VR.a.prototype.Pn;ggP2VR.a.prototype.getIsAutorotating=ggP2VR.a.prototype.Ln;ggP2VR.a.prototype.getIsLoading=ggP2VR.a.prototype.Nn;ggP2VR.a.prototype.getIsLoaded=ggP2VR.a.prototype.Ch;ggP2VR.a.prototype.getIsTileLoading=ggP2VR.a.prototype.Vk;ggP2VR.a.prototype.getLastActivity=ggP2VR.a.prototype.Qn; ggP2VR.a.prototype.getPan=ggP2VR.a.prototype.lg;ggP2VR.a.prototype.getPanNorth=ggP2VR.a.prototype.pe;ggP2VR.a.prototype.getPanDest=ggP2VR.a.prototype.eo;ggP2VR.a.prototype.getPanN=ggP2VR.a.prototype.Yk;ggP2VR.a.prototype.setPan=ggP2VR.a.prototype.zf;ggP2VR.a.prototype.setPanNorth=ggP2VR.a.prototype.Hj;ggP2VR.a.prototype.changePan=ggP2VR.a.prototype.rk;ggP2VR.a.prototype.changePanLog=ggP2VR.a.prototype.hn;ggP2VR.a.prototype.getTilt=ggP2VR.a.prototype.Dh;ggP2VR.a.prototype.getTiltDest=ggP2VR.a.prototype.mo; ggP2VR.a.prototype.setTilt=ggP2VR.a.prototype.Af;ggP2VR.a.prototype.changeTilt=ggP2VR.a.prototype.tk;ggP2VR.a.prototype.changeTiltLog=ggP2VR.a.prototype.kn;ggP2VR.a.prototype.getFov=ggP2VR.a.prototype.cj;ggP2VR.a.prototype.getFovDest=ggP2VR.a.prototype.In;ggP2VR.a.prototype.setFov=ggP2VR.a.prototype.xf;ggP2VR.a.prototype.changeFov=ggP2VR.a.prototype.qk;ggP2VR.a.prototype.changeFovLog=ggP2VR.a.prototype.Ji;ggP2VR.a.prototype.getRoll=ggP2VR.a.prototype.al;ggP2VR.a.prototype.setRoll=ggP2VR.a.prototype.Ij; ggP2VR.a.prototype.setPanTilt=ggP2VR.a.prototype.tp;ggP2VR.a.prototype.setPanTiltFov=ggP2VR.a.prototype.ii;ggP2VR.a.prototype.setDefaultView=ggP2VR.a.prototype.np;ggP2VR.a.prototype.setLocked=ggP2VR.a.prototype.qp;ggP2VR.a.prototype.setLockedMouse=ggP2VR.a.prototype.Pg;ggP2VR.a.prototype.setLockedKeyboard=ggP2VR.a.prototype.Og;ggP2VR.a.prototype.getLockedKeyboard=ggP2VR.a.prototype.Sn;ggP2VR.a.prototype.setLockedWheel=ggP2VR.a.prototype.Qg;ggP2VR.a.prototype.moveTo=ggP2VR.a.prototype.moveTo; ggP2VR.a.prototype.moveToEx=ggP2VR.a.prototype.Vh;ggP2VR.a.prototype.moveToDefaultView=ggP2VR.a.prototype.Io;ggP2VR.a.prototype.moveToDefaultViewEx=ggP2VR.a.prototype.Jo;ggP2VR.a.prototype.addHotspotElements=ggP2VR.a.prototype.ik;ggP2VR.a.prototype.playSound=ggP2VR.a.prototype.Ae;ggP2VR.a.prototype.playPauseSound=ggP2VR.a.prototype.Ql;ggP2VR.a.prototype.playStopSound=ggP2VR.a.prototype.cp;ggP2VR.a.prototype.pauseSound=ggP2VR.a.prototype.wj;ggP2VR.a.prototype.activateSound=ggP2VR.a.prototype.Wm; ggP2VR.a.prototype.soundGetTime=ggP2VR.a.prototype.Lp;ggP2VR.a.prototype.soundSetTime=ggP2VR.a.prototype.Mp;ggP2VR.a.prototype.setMediaVisibility=ggP2VR.a.prototype.sp;ggP2VR.a.prototype.isPlaying=ggP2VR.a.prototype.Ub;ggP2VR.a.prototype.stopSound=ggP2VR.a.prototype.ni;ggP2VR.a.prototype.setVolume=ggP2VR.a.prototype.Hp;ggP2VR.a.prototype.changeVolume=ggP2VR.a.prototype.nn;ggP2VR.a.prototype.removeHotspots=ggP2VR.a.prototype.Zl;ggP2VR.a.prototype.getHotspotsVisible=ggP2VR.a.prototype.Uk; ggP2VR.a.prototype.getCurrentPerspective=ggP2VR.a.prototype.ed;ggP2VR.a.prototype.addHotspot=ggP2VR.a.prototype.Xm;ggP2VR.a.prototype.updateHotspot=ggP2VR.a.prototype.gq;ggP2VR.a.prototype.removeHotspot=ggP2VR.a.prototype.gp;ggP2VR.a.prototype.setActiveHotspot=ggP2VR.a.prototype.wf;ggP2VR.a.prototype.getPointHotspotIds=ggP2VR.a.prototype.ho;ggP2VR.a.prototype.getHotspot=ggP2VR.a.prototype.Kn;ggP2VR.a.prototype.setFullscreen=ggP2VR.a.prototype.yf;ggP2VR.a.prototype.toggleFullscreen=ggP2VR.a.prototype.si; ggP2VR.a.prototype.enterFullscreen=ggP2VR.a.prototype.yn;ggP2VR.a.prototype.exitFullscreen=ggP2VR.a.prototype.exitFullscreen;ggP2VR.a.prototype.getIsFullscreen=ggP2VR.a.prototype.Mn;ggP2VR.a.prototype.startAutorotate=ggP2VR.a.prototype.Qp;ggP2VR.a.prototype.stopAutorotate=ggP2VR.a.prototype.Tp;ggP2VR.a.prototype.toggleAutorotate=ggP2VR.a.prototype.Xp;ggP2VR.a.prototype.startAnimation=ggP2VR.a.prototype.Pp;ggP2VR.a.prototype.createLayers=ggP2VR.a.prototype.xk;ggP2VR.a.prototype.removePanorama=ggP2VR.a.prototype.ei; ggP2VR.a.prototype.getScreenResolution=ggP2VR.a.prototype.bl;ggP2VR.a.prototype.getMaxScreenResolution=ggP2VR.a.prototype.Wk;ggP2VR.a.prototype.getNodeIds=ggP2VR.a.prototype.Yn;ggP2VR.a.prototype.getNodeUserdata=ggP2VR.a.prototype.dj;ggP2VR.a.prototype.getNodeLatLng=ggP2VR.a.prototype.Zn;ggP2VR.a.prototype.getNodeTitle=ggP2VR.a.prototype.bo;ggP2VR.a.prototype.getCurrentNode=ggP2VR.a.prototype.Tk;ggP2VR.a.prototype.getNextNode=ggP2VR.a.prototype.Xk;ggP2VR.a.prototype.getPrevNode=ggP2VR.a.prototype.ko; ggP2VR.a.prototype.getLastVisitedNode=ggP2VR.a.prototype.Rn;ggP2VR.a.prototype.getCurrentPointHotspots=ggP2VR.a.prototype.Hn;ggP2VR.a.prototype.getPositionAngles=ggP2VR.a.prototype.jo;ggP2VR.a.prototype.getPositionRawAngles=ggP2VR.a.prototype.Zk;ggP2VR.a.prototype.nodeVisited=ggP2VR.a.prototype.Oo;ggP2VR.a.prototype.setElementIdPrefix=ggP2VR.a.prototype.op;ggP2VR.a.prototype.videoPanoPlay=ggP2VR.a.prototype.pq;ggP2VR.a.prototype.videoPanoStop=ggP2VR.a.prototype.qq; ggP2VR.a.prototype.videoPanoPause=ggP2VR.a.prototype.oq;ggP2VR.a.prototype.getVideoPanoTime=ggP2VR.a.prototype.qo;ggP2VR.a.prototype.setVideoPanoTime=ggP2VR.a.prototype.Gp;ggP2VR.a.prototype.getVideoPanoObject=ggP2VR.a.prototype.po;ggP2VR.a.prototype.setVideoPanoSource=ggP2VR.a.prototype.Fp;ggP2VR.a.prototype.getMediaObject=ggP2VR.a.prototype.Wn;ggP2VR.a.prototype.registerVideoElement=ggP2VR.a.prototype.Vl;ggP2VR.a.prototype.disableSoundLoading=ggP2VR.a.prototype.xn; ggP2VR.a.prototype.setCrossOrigin=ggP2VR.a.prototype.mp;ggP2VR.a.prototype.setProjection=ggP2VR.a.prototype.Oc;ggP2VR.a.prototype.getProjection=ggP2VR.a.prototype.ra;ggP2VR.a.prototype.changeProjection=ggP2VR.a.prototype.Ki;ggP2VR.a.prototype.changeProjectionEx=ggP2VR.a.prototype.Ki;ggP2VR.a.prototype.changeLensflares=ggP2VR.a.prototype.gn;ggP2VR.a.prototype.setTransition=ggP2VR.a.prototype.Dp;ggP2VR.a.prototype.getMapType=ggP2VR.a.prototype.Vn;ggP2VR.a.prototype.getMapDetails=ggP2VR.a.prototype.Un; ggP2VR.a.prototype.getNodeMapCoords=ggP2VR.a.prototype.$n;ggP2VR.a.prototype.getNodeMapCoordsInPercent=ggP2VR.a.prototype.ao;ggP2VR.a.prototype.getMapContainingNode=ggP2VR.a.prototype.Tn;ggP2VR.a.prototype.addVariable=ggP2VR.a.prototype.Ym;ggP2VR.a.prototype.setVariableOptions=ggP2VR.a.prototype.hm;ggP2VR.a.prototype.setVariableValue=ggP2VR.a.prototype.Zd;ggP2VR.a.prototype.getVariableValue=ggP2VR.a.prototype.oo;ggP2VR.a.prototype.setUseGyro=ggP2VR.a.prototype.Ep;ggP2VR.a.prototype.getUseGyro=ggP2VR.a.prototype.no; ggP2VR.a.prototype.getOS=ggP2VR.a.prototype.co;ggP2VR.a.prototype.getBrowser=ggP2VR.a.prototype.Gn;ggP2VR.a.prototype.triggerEvent=ggP2VR.a.prototype.ha;