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