////////////////////////////////////////////////////////////////////// // Pano2VR 5.2 beta/15832 HTML5/CSS3 & WebGL Panorama Player // // License: Shaun McNerney // // (c) 2017, Garden Gnome Software, http://ggnome.com // ////////////////////////////////////////////////////////////////////// function G(){var m="perspective",g=["Webkit","Moz","O","ms","Ms"],h;for(h=0;hf;)f+=360;for(;180k&&(k=a.f.c);this.Fb||(this.Fb=new m.ra,this.Fb.yj(this.pan,this.j));0!=this.mode&&1!=this.mode|| !c||this.Oc&&this.Oc.gain.setValueAtTime(this.level*a.V*this.ja,c.currentTime);if(2==this.mode&&c){var w=.5*Math.cos(f*Math.PI/180)+.5;this.Dc=Math.sqrt(w)*this.ja*this.level*a.V;this.Ec=Math.sqrt(w)*this.ja*this.level*a.V;this.sc=Math.sqrt(1-w)*this.ja*this.level*a.V;this.tc=Math.sqrt(1-w)*this.ja*this.level*a.V;this.Wf()}if(3==this.mode){0>f?f<-this.zb?f+=this.zb:f=0:f=f>this.zb?f-this.zb:0;w=this.level;b=Math.abs(b);b=bk||0>y){var h=w*l*a.V;c?(this.Dc= h*this.ja,this.Ec=h*this.ja,this.tc=this.sc=0,this.Wf()):this.a.volume=w*l*a.V}else if(h=1-Math.abs(f/k),c){var g=w*(l+(1-l)*y*h)*a.V,h=w*l*a.V;0<=f?(this.Dc=g*this.ja,this.Ec=h*this.ja):(this.Dc=h*this.ja,this.Ec=g*this.ja);2*Math.abs(f)f?f=f>-this.zb?0:f+this.zb:f=f no audio buffer -> playWhenReady"),this.Ci=!0)};a.prototype.Ih=function(){var a=this.h.Ga.currentTime-this.bg;this.re();this.ee=a};a.prototype.re= function(){this.vb&&this.ge&&(this.kh=!0,this.vb.disconnect(),this.vb.stop(0),this.vb=null);this.bg=this.ee=0;this.ge=!1};a.prototype.Ol=function(){var a=this.h.Ga;return this.ee?this.ee:this.bg?a.currentTime-this.bg:0};a.prototype.Pl=function(a){this.re();this.ee=a;this.Hc()};a.prototype.addElement=function(){var a=-1,c=this,b=this.h,f=this.h.Ga;try{for(var l=!1,k=0;ka.loop&&(a.a.b="none"));a.a.volume=a.level*c.V;1<=a.loop&&(a.Kc=a.loop-1);(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&0<=a.loop&&(a.a.autoplay=!0,a.dk=!0,a.autoplay=!0);c.I.push(this);c.ig?c.U.appendChild(a.a):(a.a.style.position= "absolute",a.yc&&(a.a.width=a.yc),a.Pc&&(a.a.height=a.Pc),c.A.appendChild(a.a),a.Bh());a.a.onclick=function(){a.Qc()};a.a.addEventListener("ended",function(){a.Eo()},!1)}catch(l){c.O(l)}};a.prototype.registerElement=function(a,c){this.Vc=!0;this.a=c;this.id=a;this.level=1;this.h.I.push(this)};a.prototype.rd=function(){var a=this.h;a.ig&&(a.G.deleteTexture(this.gc),this.gc=0,a.U.removeChild(this.a));a.nl&&a.A.removeChild(this.a);this.a=null};return a}(h);m.Nk=h;h=function(b){function a(a){b.call(this, a);this.url="";this.kb=this.Da=this.va=0;this.f=50;this.Qa=0;this.wf=!1;this.Pc=this.yc=100;this.gd=1}__extends(a,b);a.prototype.Cb=function(a){b.prototype.Cb.call(this,a);var c;if(c=a.getAttributeNode("url"))this.url=c.nodeValue.toString();if(c=a.getAttributeNode("rotx"))this.va=Number(c.nodeValue);if(c=a.getAttributeNode("roty"))this.Da=Number(c.nodeValue);if(c=a.getAttributeNode("rotz"))this.kb=Number(c.nodeValue);if(c=a.getAttributeNode("fov"))this.f=Number(c.nodeValue);if(c=a.getAttributeNode("width"))this.yc= Number(c.nodeValue);if(c=a.getAttributeNode("height"))this.Pc=Number(c.nodeValue);this.gd=(c=a.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=a.getAttributeNode("clickmode"))this.Qa=Number(c.nodeValue);if(c=a.getAttributeNode("handcursor"))this.wf=1==Number(c.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(c=a.getAttributeNode("url"))&&(this.url=c.nodeValue.toString()),a=a.nextSibling};a.prototype.uf=function(){this.sf=!1;this.a.style[this.h.Nc]="none"};a.prototype.Qc=function(){1!== this.Qa&&4!==this.Qa||this.tf(!this.wb)};a.prototype.tf=function(a){var c=this.h;if(1===this.Qa||4===this.Qa)this.wb=a,this.h.ub?(a=this.h.ga)&&a.activateSound(this.id,this.wb?1:0):(this.a.style.zIndex=this.wb?(c.mg+8E4).toString():c.mg.toString(),this.a.style[c.Nc]="all 1s ease 0s",this.sf=!0,c.hl())};a.prototype.addElement=function(){var a=this,c=this.h;try{a.a=document.createElement("img");a.a.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");a.a.setAttribute("class", "ggmedia");a.a.hidden=!0;c.De&&a.a.setAttribute("id",c.De+a.id);a.a.ondragstart=function(){return!1};if(1===a.Qa||4===a.Qa)a.a.addEventListener(c.sl(),function(){a.uf()},!1),a.a.addEventListener("transitionend",function(){a.uf()},!1);a.a.setAttribute("src",c.Vb(a.url));a.yc&&(a.a.width=a.yc);a.Pc&&(a.a.height=a.Pc);c.Va.push(a);a.a.style.position="absolute";a.Qc&&(a.a.onclick=function(){a.Qc()});c.A.appendChild(a.a)}catch(b){c.O("Error addimage:"+b)}};a.prototype.rd=function(){this.h.A.removeChild(this.a); this.a=null};return a}(g);m.Cl=h;g=function(b){function a(a){b.call(this,a);this.alpha=this.kj=50;this.type=0;this.color=16777215}__extends(a,b);a.prototype.Cb=function(a){b.prototype.Cb.call(this,a);var c;if(c=a.getAttributeNode("blinding"))this.kj=Number(c.nodeValue);if(c=a.getAttributeNode("alpha"))this.alpha=Number(c.nodeValue);if(c=a.getAttributeNode("type"))this.type=Number(c.nodeValue);if(c=a.getAttributeNode("color"))this.color=1*Number(c.nodeValue)};return a}(g);m.Dl=g;g=function(){function b(a){this.type= "empty";this.Uk=this.id=this.target=this.description=this.title=this.url="";this.wh=100;this.Ig=20;this.xh=!1;this.a=null;this.cb=this.na=this.j=this.pan=0;this.Rb=a.w.Rb;this.Ob=a.w.Ob;this.Qb=a.w.Qb;this.Nb=a.w.Nb;this.Ce=a.w.Ce;this.kg=[]}b.prototype.ye=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.j;this.url=this.url;this.target=this.target;this.title=this.title;this.description=this.description;this.skinid=this.Uk;this.obj=this.a};b.prototype.Cb=function(a){var d;if(d=a.getAttributeNode("url"))this.url= d.nodeValue.toString();if(d=a.getAttributeNode("target"))this.target=d.nodeValue.toString();if(d=a.getAttributeNode("title"))this.title=d.nodeValue.toString();if(d=a.getAttributeNode("description"))this.description=d.nodeValue.toString();if(d=a.getAttributeNode("id"))this.id=d.nodeValue.toString();if(d=a.getAttributeNode("skinid"))this.Uk=d.nodeValue.toString();if(d=a.getAttributeNode("width"))this.wh=Number(d.nodeValue);if(d=a.getAttributeNode("height"))this.Ig=Number(d.nodeValue);if(d=a.getAttributeNode("wordwrap"))this.xh= 1==Number(d.nodeValue);d=a.getAttributeNode("pan");this.pan=1*(d?Number(d.nodeValue):0);d=a.getAttributeNode("tilt");this.j=1*(d?Number(d.nodeValue):0);if(d=a.getAttributeNode("bordercolor"))this.Rb=1*Number(d.nodeValue);if(d=a.getAttributeNode("backgroundcolor"))this.Ob=1*Number(d.nodeValue);if(d=a.getAttributeNode("borderalpha"))this.Qb=1*Number(d.nodeValue);if(d=a.getAttributeNode("backgroundalpha"))this.Nb=1*Number(d.nodeValue);if(d=a.getAttributeNode("handcursor"))this.Ce=1==Number(d.nodeValue); for(a=a.firstChild;a;){if("vertex"==a.nodeName){var c={pan:0,j:0};d=a.getAttributeNode("pan");c.pan=1*(d?Number(d.nodeValue):0);d=a.getAttributeNode("tilt");c.j=1*(d?Number(d.nodeValue):0);this.kg.push(c)}a=a.nextSibling}this.ye()};return b}();m.Pg=g})(ggP2VR||(ggP2VR={})); (function(m){var g=function(){function h(b,a){this.x=b;this.y=a}h.prototype.Wa=function(b,a){this.x=b;this.y=a};h.prototype.jd=function(b,a,d){var c=a.y-b.y;this.x=b.x+(a.x-b.x)*d;this.y=b.y+c*d};h.prototype.Nl=function(b,a,d,c,e){var f;f=new h;f.jd(b,d,e);b=new h;b.jd(d,c,e);d=new h;d.jd(c,a,e);a=new h;a.jd(f,b,e);f=new h;f.jd(b,d,e);b=new h;b.jd(a,f,e);this.x=b.x;this.y=b.y};h.prototype.Fh=function(b,a,d,c,e){var f=new h,l=.5,k=.25;do{f.Nl(b,a,d,c,l);var w=f.x-e,l=0a;a++)2>a%3&&(k[a]*=b);l.bufferData(l.ARRAY_BUFFER,new Float32Array(k),l.STATIC_DRAW);this.Sd=l.createBuffer();l.bindBuffer(l.ARRAY_BUFFER,this.Sd);var w=[1,0,0,0,0,1,1,1];l.bufferData(l.ARRAY_BUFFER,new Float32Array(w),l.STATIC_DRAW);this.Jc=l.createBuffer();l.bindBuffer(l.ELEMENT_ARRAY_BUFFER, this.Jc);var h=[0,1,2,0,2,3];l.bufferData(l.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),l.STATIC_DRAW);var k=[],h=[],w=[],g=new m.ra;for(b=0;6>b;b++){c=b%3;e=3>b?1:0;for(d=0;4>d;d++){g.x=-1;g.y=-1;g.z=1;for(a=0;ag.x?.33:0)+.33*c,(0>g.y?0:.5)+.5*e);if(4>b)for(a=0;ae;e++)a=c.createTexture(),this.Rc++, a.Ie=null,a.be=null,a.Rj=!1,c.bindTexture(c.TEXTURE_2D,a),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),d.we[e]&&(b=new Image,b.crossOrigin=d.crossOrigin,b.src=d.Vb(d.we[e]),a.Ie=b,b.addEventListener&&b.addEventListener("load",this.fi(a),!1),d.Gb.push(b)),this.Sa.push(a);for(e=0;6>e;e++)d.wg[e]&& (b=new Image,b.crossOrigin=d.crossOrigin,b.src=d.Vb(d.wg[e]),b.addEventListener?b.addEventListener("load",this.fi(this.Sa[e]),!1):b.onload=this.fi(this.Sa[e]),this.Sa[e].be=b,d.Gb.push(b));for(e=0;eb;b++)this.Yf(b),a.bindBuffer(a.ARRAY_BUFFER,this.Oh),a.vertexAttribPointer(this.D.Z,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,this.Sd),a.vertexAttribPointer(this.D.wa,2,a.FLOAT,!1,0,0),6<=this.Sa.length&&this.Sa[b].loaded&&(a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this.Sa[b]),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.Jc),a.uniform1i(this.D.Ne,0),a.uniformMatrix4fv(this.D.Lf,!1,this.ca),a.uniformMatrix4fv(this.D.Fd, !1,this.$a),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0))}};h.prototype.rh=function(){var b=this.h;if(b.g.Ke&&6>16&255)/255,(a>>8&255)/255,(a>>0&255)/255,1)}};h.prototype.Yf=function(b){var a=this.h;m.T.Cd(this.ca);m.T.rotate(this.ca,-a.L.c*Math.PI/180,[0,0,1]);m.T.rotate(this.ca,-a.j.c*Math.PI/180,[1,0,0]);m.T.rotate(this.ca,(180-a.pan.c)*Math.PI/180,[0,1,0]);a.Ca&&(m.T.rotate(this.ca,-a.Ca.pitch*Math.PI/180,[1,0,0]),m.T.rotate(this.ca, a.Ca.L*Math.PI/180,[0,0,1]));4>b?m.T.rotate(this.ca,-Math.PI/2*b,[0,1,0]):m.T.rotate(this.ca,Math.PI/2*(5==b?1:-1),[1,0,0])};h.prototype.no=function(b){var a=this;return function(){a.h.xa=!0;a.h.Lc=!0;b.loaded=!0;b.Ii=0;b.Hd=0;var d=a.h.G;a.ka&&a.ka--;0==a.ka&&a.h.M&&a.h.M.ggLoadedLevels&&a.h.M.ggLoadedLevels();d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,1);if(null!=b.g&&b.g.complete){b.gb=d.createTexture();a.h.Rc++;d.bindTexture(d.TEXTURE_2D,b.gb);try{d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE, b.g)}catch(c){d.texImage2D(d.TEXTURE_2D,0,d.RGBA,1,1,0,d.RGBA,d.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),a.h.O(c)}}a.h.update()}};h.prototype.dn=function(b){var a=this;return function(){a.h.xa=!0;a.h.Lc=!0;var d=a.h.g;try{if(null!=b&&b.complete){var c=d.H[d.H.length-1],e=d.Ja;c.height=c.width=b.width-2*e;c.K=c.da=1;for(var f=0;6>f;f++){var l=new m.Bd;l.J=document.createElement("canvas");a.h.ea?(l.J.width=c.width+2*e,l.J.height=c.height+2*e):(l.J.width=d.F+2*e,l.J.height=d.F+2*e);l.Ma=l.J.getContext("2d"); l.J.style[a.h.Ta+"Origin"]="0% 0%";l.J.style.overflow="hidden";l.J.style.position="absolute";l.g=b;var k=c.width+2*e,w=c.height+2*e;l.Ma&&l.Ma.drawImage(b,0,f*w,k,w,0,0,k,w);if(a.h.ea&&a.h.G){var g=a.h.G;g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,1);l.gb=g.createTexture();a.h.Rc++;g.bindTexture(g.TEXTURE_2D,l.gb);try{g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,l.J)}catch(h){a.h.O(h)}g.bindTexture(g.TEXTURE_2D,null);g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,0)}a.h.Cc&&(l.J.Ad=-1,a.h.A.insertBefore(l.J, a.h.A.firstChild));c.W[f]=l}c.loaded=!0}}catch(h){a.h.O(h)}a.h.update()}};h.prototype.dl=function(b){var a=this;return function(){a.h.xa=!0;a.h.Lc=!0;a.ka&&a.ka--;0==a.ka&&a.h.M&&a.h.M.ggLoadedLevels&&a.h.M.ggLoadedLevels();b.g=null}};h.prototype.Io=function(){var b=this.h,a=b.g,d=b.g.H;b.Wd&&(b.zc(0),b.$c());if(b.G){var c=b.G;c.useProgram(this.D);this.rh();c.clear(c.DEPTH_BUFFER_BIT);c.enable(c.DEPTH_TEST);m.T.Cd(this.$a);m.T.perspective(b.Jb(),b.hb.width/b.hb.height,.1,100,this.$a);c.uniformMatrix4fv(this.D.Fd, !1,this.$a);this.Eb=0;b.jl();b.ri();var e=b.Wh(),f;for(f=d.length-1;f>=e;){var l=d[f],k=1;f==d.length-1&&0==a.Ja&&(k=a.F/(a.F-.5));for(var w=0;6>w;w++){var g;g=this.h.eb.Za[w];var h=g.Ge;if(g.pc&&0x;x++)q[x]=0==x%3?k*t*(-2*q[x]/l.width+1):1==x%3?k*t*(-2*q[x]/l.height+1):t;c.bufferData(c.ARRAY_BUFFER,new Float32Array(q),c.STATIC_DRAW)}}else h=!1;v.visible=g.pc}r.ni= h}}f--}for(w=0;6>w;w++)if(g=b.eb.Za[w],g.pc)for(h=g.Ge,this.Yf(w),c.uniform1i(this.D.Ne,0),c.uniformMatrix4fv(this.D.Fd,!1,this.$a),c.uniformMatrix4fv(this.D.Lf,!1,this.ca),c.enableVertexAttribArray(this.D.Z),c.enableVertexAttribArray(this.D.wa),c.bindBuffer(c.ARRAY_BUFFER,this.Sd),c.vertexAttribPointer(this.D.wa,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.Jc),c.useProgram(this.D),f=e;f<=d.length-1;){l=d[f];if(g.pc&&0f?A.Qf(-90*f):A.he(5==f?90:-90);k.Ca&&(A.eh(k.Ca.L),A.he(-k.Ca.pitch));A.Qf(-k.pan.c);A.he(k.j.c);A.eh(k.L.c);for(f=0;f<=e;f++)for(var z=0;z<=e;z++)u=2*(n+z*r)-1,t=2*(d+f*p)-1,B.x=1*u,B.y=1*t,B.z=-1,B.normalize(),A.cn(B),u=this.Lj(B, g,k.ya()),0!=k.ec&&1>x&&(u=u&&this.Lj(B,v,k.ec),g.x=g.x*x+v.x*(1-x),g.y=g.y*x+v.y*(1-x)),u?-1E10g.x&&-1E10g.y?-2g.x&&-2g.y&&(a+=g.x,c+=g.y,q++):g.x=NaN:g.x=NaN,b.Sc[b.Hg++]=g.x,b.Sc[b.Hg++]=g.y;0k;k++)isNaN(b.Sc[2*c[0]])&&(e=!1);if(e){for(var g=!1,h=!1,n=!1,m=!1,k=0;4> k;k++){var p=b.Sc[2*c[k]];pp;p++)for(var u=0;u=f;){var q={},h=d[l],x=null;0>n-l),p,-(0!=b.ec)?.3:.1),z.visible=0b.f.c&&lb?m.T.rotate(this.ca,-Math.PI/2*b,[0,1,0]):m.T.rotate(this.ca,Math.PI/2*(5==b?1:-1),[1,0,0]);c.uniformMatrix4fv(c.getUniformLocation(a,"matRotate"),!1,this.ca)};h.prototype.mn=function(){var b=this.h;if(b.G){var a=b.G,d,c=this.Hk;a.useProgram(c);this.sh(0,c);a.uniform2f(a.getUniformLocation(c,"uCanvasDimensions"),b.m.width,b.m.height);1==b.o.format&&(d=a.getUniformLocation(c, "srcScale"),a.uniform2f(d,-.5/Math.PI,(b.o.ai?-1:1)/Math.PI));14==b.o.format&&(d=a.getUniformLocation(c,"srcScale"),a.uniform2f(d,1-2*b.o.pe/(b.o.width/3),1-2*b.o.pe/(b.o.height/2)));d=a.getUniformLocation(c,"srcOffset");a.uniform2f(d,.5,.5);this.Xi(c);d=a.getUniformLocation(c,"cubeTexture");a.uniform1i(d,0);d=a.getAttribLocation(c,"aVertexPosition");a.disableVertexAttribArray(0);a.disableVertexAttribArray(1);a.disableVertexAttribArray(2);a.enableVertexAttribArray(d);a.bindBuffer(a.ARRAY_BUFFER,this.bh); a.vertexAttribPointer(d,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,b.o.gc);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.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.Jc);a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)}};h.prototype.Xi=function(b){var a=this.h,d=a.G,c=this.h.m, e=c.width/c.height;switch(a.f.mode){case 1:e=1;break;case 2:e=c.width/Math.sqrt(c.width*c.width+c.height*c.height);break;case 3:4*c.height/3l;l++)this.Sa[l].be.complete?this.vg[l]||(f=!0):c=!1,this.Sa[l].Ie.complete||(e=!1);if(e||c)if(!e||c||!this.qc||f){l=Math.round(b.hc/b.Re);e=(b.hc-l)/2;b.O("paint cube single - isMain: "+c+" overlap: "+e);this.ve=0;this.qc||(this.qc=a.createTexture());b.Rc++;a.bindTexture(a.TEXTURE_CUBE_MAP, this.qc);a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);f=document.createElement("canvas");f.width=l;f.height=l;for(var k=f.getContext("2d"),l=0;6>l;l++){var g=d[l];this.Sa[g].be.complete?this.vg[g]||(k.drawImage(this.Sa[g].be,-e,-e),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+l,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f),this.vg[g]=!0):(k.drawImage(this.Sa[g].Ie,-e,-e,b.hc,b.hc), a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+l,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f))}this.Af=!c}};h.prototype.$l=function(){var b=this.h,a=this.h.g,d=b.g.H,c=b.G,e,f;e=d.length-1;if(!(0>e)){d[e].Je&&e--;var l=512;b.Og&&(l=256);!b.Pf&&2<=b.devicePixelRatio&&(l=512);for((f=c.getParameter(c.MAX_CUBE_MAP_TEXTURE_SIZE))&&fe)){l=d[e];b.O("paint cube level "+e);this.ve=e;d=b.g.Ja;e=0l.width&&(1500n;n++){for(var m=0;me;e++)for(var f=0;fa;a++)for(var d=0;da;a++)this.Yf(0),d.bindBuffer(d.ARRAY_BUFFER, b.o.aj),d.vertexAttribPointer(this.D.Z,3,d.FLOAT,!1,0,0),d.bindBuffer(d.ARRAY_BUFFER,b.o.lh),d.vertexAttribPointer(this.D.wa,2,d.FLOAT,!1,0,0),d.activeTexture(d.TEXTURE0),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,b.o.ji),d.uniform1i(this.D.Ne,0),d.uniformMatrix4fv(this.D.Lf,!1,this.ca),d.uniformMatrix4fv(this.D.Fd,!1,this.$a),d.drawElements(d.TRIANGLES,36,d.UNSIGNED_SHORT,0)}};h.prototype.Ao=function(){var b=this.h,a=b.G,d=b.o;if(0=d.w.mode&&(e=0);3==d.w.mode&&(e=d.w.na);for(b=0;b>16&255)/255,(a>>8&255)/255,(a&255)/255);var h=c.getUniformLocation(this.pd,"uAlpha");c.uniform1f(h,f.Qb* k);c.vertexAttribPointer(this.pd.Z,3,c.FLOAT,!1,0,0);c.drawArrays(c.LINE_LOOP,0,g.length/3);a=f.Ob;c.uniform3f(l,(a>>16&255)/255,(a>>8&255)/255,(a&255)/255);c.uniform1f(h,f.Nb*k);c.enable(c.STENCIL_TEST);c.clearStencil(0);c.clear(c.STENCIL_BUFFER_BIT);c.colorMask(!1,!1,!1,!1);c.stencilFunc(c.ALWAYS,1,1);c.stencilOp(c.INCR,c.INCR,c.INCR);c.drawArrays(c.TRIANGLE_FAN,0,g.length/3);c.colorMask(!0,!0,!0,!0);c.stencilFunc(c.EQUAL,1,1);c.stencilOp(c.ZERO,c.ZERO,c.ZERO);c.drawArrays(c.TRIANGLE_FAN,0,g.length/ 3);c.disable(c.BLEND);c.enable(c.DEPTH_TEST);c.disable(c.STENCIL_TEST);c.useProgram(this.D)}}}}};h.prototype.Wi=function(){var b=this.h,a=b.g;if(b.m.width!=b.A.offsetWidth||b.m.height!=b.A.offsetHeight)b.m.width=b.A.offsetWidth,b.m.height=b.A.offsetHeight;b.Wd&&(b.zc(0),b.$c());if(b.G){var d=b.G;this.rh();d.clear(d.COLOR_BUFFER_BIT|d.DEPTH_BUFFER_BIT);d.disable(d.DEPTH_TEST);d.disable(d.CULL_FACE);d.useProgram(this.kf);var c=d.getUniformLocation(this.kf,"uRect");d.uniform2f(d.getUniformLocation(this.kf, "uCanvasDimensions"),b.m.width,b.m.height);d.activeTexture(d.TEXTURE0);var e;d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,this.Jc);e=d.getAttribLocation(this.kf,"aVertexPosition");d.disableVertexAttribArray(0);d.disableVertexAttribArray(1);d.disableVertexAttribArray(2);d.enableVertexAttribArray(e);d.bindBuffer(d.ARRAY_BUFFER,this.Sd);d.vertexAttribPointer(e,2,d.FLOAT,!1,0,0);b.Eb=0;var f,l;l=100/b.f.c;f=a.width/a.height;e=b.m.height*l*f;l*=b.m.height;f=(b.pan.c/100/f-.5)*e+b.m.width/2;for(var k=(b.j.c/100- .5)*l+b.m.height/2,g,h,n,r=0;a.H.length>=r+2&&a.H[r+1].width>e;)r++;var p,u;u=[];for(p=a.H.length-1;p>=r;){var t=a.H[p],v;t.cache?(v={Ua:0,qb:0},v.rb=t.K-1,v.sb=t.da-1):(v={},g=-k/l*(t.height/b.g.F),h=(-f+b.m.width)/e*(t.width/b.g.F),n=(-k+b.m.height)/l*(t.height/b.g.F),v.Ua=Math.min(Math.max(0,Math.floor(-f/e*(t.width/b.g.F))),t.K-1),v.qb=Math.min(Math.max(0,Math.floor(g)),t.da-1),v.rb=Math.min(Math.max(0,Math.floor(h)),t.K-1),v.sb=Math.min(Math.max(0,Math.floor(n)),t.da-1));u[p]=v;var q=!0;for(h= v.qb;h<=v.sb;h++)for(g=v.Ua;g<=v.rb;g++){n=g+h*t.K;var x=t.W[n];x||(x=new m.Bd,t.W[n]=x);this.ka=r;){t=a.H[p];if(u[p]&&0<=u[p].Ua)for(v=u[p],h=v.qb;h<=v.sb;h++)for(g=v.Ua;g<=v.rb;g++)n=g+h*t.K,(x=t.W[n])&&x.g&&x.g.complete&&(d.uniform4f(c,f+(-a.Ja+a.F*g)*e/t.width,k+(-a.Ja+a.F*h)*l/t.height,x.g.width*e/t.width,x.g.height*l/t.height),x&&x.gb&&(d.bindBuffer(d.ELEMENT_ARRAY_BUFFER, this.Jc),d.bindTexture(d.TEXTURE_2D,x.gb),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0)));p--}this.Ji()}};h.prototype.dh=function(){var b=this.h.G;if(b&&this.Sa)for(;0a;a++)this.Za[a]=new g}b.prototype.Yl=function(a,d,c,b){for(var f=0;6>f;f++){var l;if(l=this.Za[f]){var k;k=[];k.push(new m.ra(-1,-1,-1,0,0));k.push(new m.ra(1,-1,-1,1,0));k.push(new m.ra(1,1,-1,1,1));k.push(new m.ra(-1,1,-1,0,1));for(var g=0;gf?k[g].Da(-Math.PI/2*f):k[g].va(Math.PI/2*(4===f?-1:1)),b&&(k[g].kb(b.L* Math.PI/180),k[g].va(-b.pitch*Math.PI/180)),k[g].Da(-a*Math.PI/180),k[g].va(d*Math.PI/180),k[g].kb(c*Math.PI/180);l.pc=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"); b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);this.Fa=b.createProgram();b.attachShader(this.Fa,a);b.attachShader(this.Fa,d);b.linkProgram(this.Fa);b.getProgramParameter(this.Fa,b.LINK_STATUS)||alert("Could not initialise shaders");this.Fa.Z=b.getAttribLocation(this.Fa,"aVertexPosition");b.enableVertexAttribArray(this.Fa.Z);this.Fa.wa=b.getAttribLocation(this.Fa,"aTextureCoord");b.enableVertexAttribArray(this.Fa.wa);d=b.createShader(b.FRAGMENT_SHADER); b.shaderSource(d,"#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"); b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);this.La=b.createProgram();b.attachShader(this.La,a);b.attachShader(this.La,d);b.linkProgram(this.La);b.getProgramParameter(this.La,b.LINK_STATUS)||alert("Could not initialise shaders");this.La.Z=b.getAttribLocation(this.La,"aVertexPosition");b.enableVertexAttribArray(this.La.Z);this.La.wa=b.getAttribLocation(this.La,"aTextureCoord");b.enableVertexAttribArray(this.La.wa)};g.prototype.zc=function(){var b= this.h.G;if(!b)return!1;if(this.Mb=b.createFramebuffer()){b.bindFramebuffer(b.FRAMEBUFFER,this.Mb);this.Mb.width=1024;this.Mb.height=1024;this.le=b.createTexture();b.bindTexture(b.TEXTURE_2D,this.le);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,this.Mb.width,this.Mb.height,0,b.RGBA,b.UNSIGNED_BYTE,null);var a=b.createRenderbuffer();b.bindRenderbuffer(b.RENDERBUFFER,a);b.renderbufferStorage(b.RENDERBUFFER, b.DEPTH_COMPONENT16,this.Mb.width,this.Mb.height);b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,this.le,0);b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,a);b.bindTexture(b.TEXTURE_2D,null);b.bindRenderbuffer(b.RENDERBUFFER,null);b.bindFramebuffer(b.FRAMEBUFFER,null);this.ab=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.ab);b.bufferData(b.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),b.STATIC_DRAW);this.ab.Ac=3;this.ab.Ed=4;this.Le= b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.Le);b.bufferData(b.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),b.STATIC_DRAW);return!0}return!1};g.prototype.yk=function(b){var a=this.h.G,d=this.h.hb;if(this.Ld){a.useProgram(this.ma);a.bindBuffer(a.ARRAY_BUFFER,this.ab);a.vertexAttribPointer(this.ma.Z,this.ab.Ac,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.Le);a.vertexAttribPointer(this.ma.wa,2,a.FLOAT,!1,0,0);a.enableVertexAttribArray(this.ma.Z);a.enableVertexAttribArray(this.ma.wa);a.activeTexture(a.TEXTURE0); a.bindTexture(a.TEXTURE_2D,this.le);var d=1+(this.mb-1)*b,c=a.getUniformLocation(this.ma,"uAlpha");a.uniform1f(c,1);c=a.getUniformLocation(this.ma,"uZoomIn");a.uniform1i(c,1);var c=a.getUniformLocation(this.ma,"uZoomCenter"),e=.5+(this.ng-.5)*Math.sqrt(b),f=.5+(this.og-.5)*Math.sqrt(b);0>e-.5/d&&(e=.5/d);0>f-.5/d&&(f=.5/d);1e-.5/this.mb&&(e=.5/this.mb);0>f-.5/this.mb&&(f=.5/this.mb);1>16&255)/255,(this.qg>>8&255)/255,(this.qg&255)/255),c=a.getUniformLocation(this.Pa,"uZoomIn"),a.uniform1i(c,1==this.Ya||2==this.Ya?1:0),c=a.getUniformLocation(this.Pa,"uZoomCenter"),a.uniform2f(c,e,f),e=a.getUniformLocation(this.Pa,"uZoomFactor"),a.uniform1f(e,this.mb),a.uniform1i(a.getUniformLocation(this.Pa,"uSampler"),0);else if("irisround"==this.type||"irisrectangular"==this.type){a.useProgram(this.Fa);a.bindBuffer(a.ARRAY_BUFFER,this.ab);a.vertexAttribPointer(this.Fa.Z,this.ab.Ac,a.FLOAT, !1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.Le);a.vertexAttribPointer(this.Fa.wa,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,this.le);var l;1==this.Ya||2==this.Ya?l=c=.5:(c=this.ng,l=this.og);var k=c*d.width,g=l*d.height,k=Math.max(k,d.width-k),g=Math.max(g,d.height-g);"irisround"==this.type?a.uniform1f(a.getUniformLocation(this.Fa,"uRadius"),(Math.sqrt(k*k+g*g)+this.Xc)*b):(k>g?(g=d.height/d.width*k+this.Xc,k+=this.Xc):(k=d.width/d.height*g+this.Xc,g+=this.Xc),a.uniform2f(a.getUniformLocation(this.Fa, "uRectDim"),k*b,g*b));b=a.getUniformLocation(this.Fa,"uSoftEdge");a.uniform1f(b,this.Xc);a.uniform1i(a.getUniformLocation(this.Fa,"uRound"),"irisround"==this.type?1:0);a.uniform2f(a.getUniformLocation(this.Fa,"uIrisCenter"),c*d.width,l*d.height);c=a.getUniformLocation(this.Fa,"uZoomIn");a.uniform1i(c,1==this.Ya||2==this.Ya?1:0);c=a.getUniformLocation(this.Fa,"uZoomCenter");a.uniform2f(c,e,f);e=a.getUniformLocation(this.Fa,"uZoomFactor");a.uniform1f(e,this.mb);a.uniform1i(a.getUniformLocation(this.Fa, "uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)a.useProgram(this.La),a.bindBuffer(a.ARRAY_BUFFER,this.ab),a.vertexAttribPointer(this.La.Z,this.ab.Ac,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,this.Le),a.vertexAttribPointer(this.La.wa,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this.le),a.uniform1f(a.getUniformLocation(this.La,"uPercent"),3>this.Rh?b*(d.width+ this.Xc):b*(d.height+this.Xc)),b=a.getUniformLocation(this.La,"uSoftEdge"),a.uniform1f(b,this.Xc),a.uniform1i(a.getUniformLocation(this.La,"uDirection"),this.Rh),a.uniform2f(a.getUniformLocation(this.La,"uCanvasDimensions"),d.width,d.height),c=a.getUniformLocation(this.La,"uZoomIn"),a.uniform1i(c,1==this.Ya||2==this.Ya?1:0),c=a.getUniformLocation(this.La,"uZoomCenter"),a.uniform2f(c,e,f),e=a.getUniformLocation(this.La,"uZoomFactor"),a.uniform1f(e,this.mb),a.uniform1i(a.getUniformLocation(this.La, "uSampler"),0);a.drawArrays(a.TRIANGLE_STRIP,0,this.ab.Ed);a.useProgram(this.h.la.D);a.disable(a.BLEND);a.enable(a.DEPTH_TEST)}};return g}();m.yl=g})(ggP2VR||(ggP2VR={})); (function(m){var g=function(){function g(b){this.eg=[];this.h=b;this.enabled=!1;this.lb=2;this.qj=!1}g.prototype.Vh=function(b){if(2==b.mode||3==b.mode||5==b.mode){var a=this.h.Ga.currentTime,d=b.oc.gain.value,c=b.mc.gain.value,e=b.nc.gain.value;b.lc.gain.linearRampToValueAtTime(b.lc.gain.value,a);b.lc.gain.linearRampToValueAtTime(0,a+this.lb);b.oc.gain.linearRampToValueAtTime(d,a);b.oc.gain.linearRampToValueAtTime(0,a+this.lb);b.mc.gain.linearRampToValueAtTime(c,a);b.mc.gain.linearRampToValueAtTime(0, a+this.lb);b.nc.gain.linearRampToValueAtTime(e,a);b.nc.gain.linearRampToValueAtTime(0,a+this.lb)}else a=this.h.Ga.currentTime,b.Oc.gain.linearRampToValueAtTime(b.Oc.gain.value,a),b.Oc.gain.linearRampToValueAtTime(0,a+this.lb);b.Bg=!0;setTimeout(function(){b.rd()},1E3*this.lb+5)};g.prototype.jo=function(){for(var b=0;bd.ja&&(d.ja=b)}1==b&&clearInterval(this.eo)};return g}();m.zl=g})(ggP2VR||(ggP2VR={})); (function(m){var g=function(){function g(b){this.Ff=[];this.Ic=null;this.Kb=[];this.Hb=[];this.Lb=[];this.Oi=!0;this.h=b;this.Zl()}g.prototype.zf=function(){var b=this.h.G,a=b.createShader(b.VERTEX_SHADER);b.shaderSource(a,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");b.compileShader(a);b.getShaderParameter(a,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(a)),a=null);var d=b.createShader(b.FRAGMENT_SHADER);b.shaderSource(d,"#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"); b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);this.Pb=b.createProgram();b.attachShader(this.Pb,a);b.attachShader(this.Pb,d);b.linkProgram(this.Pb);b.getProgramParameter(this.Pb,b.LINK_STATUS)||alert("Could not initialise shaders");this.Pb.Z=b.getAttribLocation(this.Pb,"aVertexPosition");b.enableVertexAttribArray(this.Pb.Z);d=b.createShader(b.VERTEX_SHADER);a=b.createShader(b.VERTEX_SHADER);b.shaderSource(d,"#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"); b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);b.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"); b.compileShader(a);b.getShaderParameter(a,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(a)),d=null);var c=b.createShader(b.FRAGMENT_SHADER);b.shaderSource(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCircleTexturePosition;\nuniform vec3 uCircleColor;\nuniform float uCircleRadius;\nuniform float uCircleAlpha;\nuniform float uCircleSoftness;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 diff = uCircleTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromCircleCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float softnessDistance = uCircleRadius * (1.0 - uCircleSoftness);\n if (distFromCircleCenter > uCircleRadius)\n {\n\t gl_FragColor = vec4(uCircleColor, 0.0);\n }\n else if (distFromCircleCenter <= (softnessDistance))\n {\n\t float factor = distFromCircleCenter / softnessDistance;\n\t gl_FragColor = vec4(uCircleColor, pow((1.0 - (0.2 * factor)) * uCircleAlpha, 1.8));\n }\n else\n {\n\t float factor = (distFromCircleCenter - softnessDistance) / (uCircleRadius - softnessDistance);\n\t gl_FragColor = vec4(uCircleColor, pow((0.8 - (0.8 * factor)) * uCircleAlpha, 1.8));\n }\n}\n"); b.compileShader(c);b.getShaderParameter(c,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(c)),c=null);this.oa=b.createProgram();b.attachShader(this.oa,d);b.attachShader(this.oa,c);b.linkProgram(this.oa);b.getProgramParameter(this.oa,b.LINK_STATUS)||alert("Could not initialise shaders");this.oa.Z=b.getAttribLocation(this.oa,"aVertexPosition");b.enableVertexAttribArray(this.oa.Z);d=b.createShader(b.FRAGMENT_SHADER);b.shaderSource(d,"#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"); b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);this.jb=b.createProgram();b.attachShader(this.jb,a);b.attachShader(this.jb,d);b.linkProgram(this.jb);b.getProgramParameter(this.jb,b.LINK_STATUS)||alert("Could not initialise shaders");this.jb.Z=b.getAttribLocation(this.jb,"aVertexPosition")};g.prototype.zc=function(){var b=this.h.G;this.fd=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.fd);b.bufferData(b.ARRAY_BUFFER,new Float32Array([-1,-1,0,1, -1,0,1,1,0,-1,1,0]),b.STATIC_DRAW);this.fd.Ac=3;this.fd.Ed=4;this.Ae=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.Ae);for(var a=[0,0,0],d=2*Math.PI/6,c=Math.PI/180*35,e=1,f=c;f<=c+2*Math.PI;f+=d)a.push(Math.sin(f)),a.push(-Math.cos(f)),a.push(0),e++;b.bufferData(b.ARRAY_BUFFER,new Float32Array(a),b.STATIC_DRAW);this.Ae.Ac=3;this.Ae.Ed=e;this.Kk=b.createTexture();b.bindTexture(b.TEXTURE_2D,this.Kk);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_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);a=document.createElement("canvas");a.width=100;a.height=1;d=a.getContext("2d");d.width=100;d.height=1;c=d.createLinearGradient(0,0,100,0);c.addColorStop(0,this.h.fa(16777215,0));c.addColorStop(.88,this.h.fa(0,0));c.addColorStop(.9,this.h.fa(16654848,1));c.addColorStop(.92,this.h.fa(16776448,1));c.addColorStop(.94,this.h.fa(4849466,1));c.addColorStop(.96,this.h.fa(131071, 1));c.addColorStop(.98,this.h.fa(8190,1));c.addColorStop(1,this.h.fa(0,0));d.fillStyle=c;d.fillRect(0,0,100,1);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,a)};g.prototype.yn=function(){for(;0e.z){var p,u;u=-f/e.z;p=e.x*u;u*=e.y;Math.abs(p)k?l:k,r=n.kj/100*((v-c)/v);0>r&&(r=0);if(this.h.ea){b.useProgram(this.Pb);b.bindBuffer(b.ARRAY_BUFFER,this.h.N.ab);b.vertexAttribPointer(this.Pb.Z,this.h.N.ab.Ac,b.FLOAT,!1,0,0); var q=b.getUniformLocation(this.Pb,"uCanvasDimensions");b.uniform2f(q,b.drawingBufferWidth,b.drawingBufferHeight);b.uniform2f(b.getUniformLocation(this.Pb,"uFlareCenterPosition"),b.drawingBufferWidth/l*p,k-b.drawingBufferHeight/k*u);b.uniform1f(b.getUniformLocation(this.Pb,"uBlindingValue"),r);q=b.getUniformLocation(this.Pb,"uAspectRatio");b.uniform1f(q,this.h.N.dg?b.drawingBufferWidth/b.drawingBufferHeight:b.drawingBufferWidth/b.drawingBufferHeight/(l/k));b.drawArrays(b.TRIANGLE_STRIP,0,this.h.N.ab.Ed)}else q= this.R.createRadialGradient(p,u,1,p,u,t),q.addColorStop(0,"rgba(255, 255, 255, "+r+")"),q.addColorStop(.5,"rgba(255, 255, 255, "+.8*r+")"),q.addColorStop(1,"rgba(255, 255, 255, "+.6*r+")"),this.R.fillStyle=q,this.R.fillRect(0,0,this.R.width,this.R.height);if(0!=Number(n.type)&&!this.h.N.dg){var r=l/2-p,t=k/2-u,x=1,B=Number(n.type)-1;c<.35*v&&(x=c/(.35*v),x*=x);c>.7*v&&(x=(v-c)/(.3*v));x*=n.alpha/100;if(0 a&&(a=0);var z=A.color;if(8==B||9==B||10==B)z=n.color;if(this.h.ea)b.useProgram(this.oa),b.bindBuffer(b.ARRAY_BUFFER,this.Ae),b.vertexAttribPointer(this.oa.Z,this.Ae.Ac,b.FLOAT,!1,0,0),q=b.getUniformLocation(this.oa,"uCanvasDimensions2"),b.uniform2f(q,b.drawingBufferWidth,b.drawingBufferHeight),b.uniform2f(b.getUniformLocation(this.oa,"uCirclePosition"),b.drawingBufferWidth/l*(p+r*A.i),b.drawingBufferWidth/l*(k-(u+t*A.i))),b.uniform2f(b.getUniformLocation(this.oa,"uCircleTexturePosition"),b.drawingBufferWidth/ l*(p+r*A.i),k-(u+t*A.i)),b.uniform1f(b.getUniformLocation(this.oa,"uCircleRadius"),v),b.uniform3f(b.getUniformLocation(this.oa,"uCircleColor"),(z>>16&255)/255,(z>>8&255)/255,(z&255)/255),b.uniform1f(b.getUniformLocation(this.oa,"uCircleAlpha"),a),b.uniform1f(b.getUniformLocation(this.oa,"uCircleSoftness"),.1),q=b.getUniformLocation(this.oa,"uAspectRatio"),b.uniform1f(q,b.drawingBufferWidth/b.drawingBufferHeight/(l/k)),b.drawArrays(b.TRIANGLE_FAN,0,this.Ae.Ed);else{this.R.save();this.R.translate(p+ r*A.i,u+t*A.i);q=this.R.createRadialGradient(0,0,1,0,0,1.1*v);q.addColorStop(0,this.h.fa(z,a));q.addColorStop(.65,this.h.fa(z,.9*a));q.addColorStop(.8,this.h.fa(z,.7*a));q.addColorStop(1,this.h.fa(z,.2*a));this.R.beginPath();var z=2*Math.PI/6,A=Math.PI/180*35,C=!0;for(a=A;a<=A+2*Math.PI;a+=z)C?(this.R.moveTo(v*Math.sin(a),v*Math.cos(a)),C=!1):this.R.lineTo(v*Math.sin(a),v*Math.cos(a));this.R.closePath();this.R.fillStyle=q;this.R.fill();this.R.restore()}}if(0a&&(a=0);z=A.color;if(8==B||9==B||10==B)z=n.color;this.h.ea?(b.useProgram(this.oa),b.bindBuffer(b.ARRAY_BUFFER,this.fd),b.vertexAttribPointer(this.oa.Z,this.fd.Ac,b.FLOAT,!1,0,0),q=b.getUniformLocation(this.oa,"uCanvasDimensions2"),b.uniform2f(q,b.drawingBufferWidth,b.drawingBufferHeight),q=b.getUniformLocation(this.oa,"uCirclePosition"),b.uniform2f(q,b.drawingBufferWidth/l*(p+r*A.i),b.drawingBufferWidth/l*(k-(u+t*A.i))),q=b.getUniformLocation(this.oa,"uCircleTexturePosition"), b.uniform2f(q,b.drawingBufferWidth/l*(p+r*A.i),k-(u+t*A.i)),q=b.getUniformLocation(this.oa,"uCircleRadius"),b.uniform1f(q,v),b.uniform3f(b.getUniformLocation(this.oa,"uCircleColor"),(z>>16&255)/255,(z>>8&255)/255,(z&255)/255),b.uniform1f(b.getUniformLocation(this.oa,"uCircleAlpha"),a),b.uniform1f(b.getUniformLocation(this.oa,"uCircleSoftness"),A.u),q=b.getUniformLocation(this.oa,"uAspectRatio"),b.uniform1f(q,b.drawingBufferWidth/b.drawingBufferHeight/(l/k)),b.drawArrays(b.TRIANGLE_FAN,0,this.fd.Ed)): (this.R.save(),this.R.translate(p+r*A.i,u+t*A.i),q=this.R.createRadialGradient(0,0,1,0,0,v),q.addColorStop(0,this.h.fa(z,a)),q.addColorStop(1-A.u,this.h.fa(z,.8*a)),q.addColorStop(1,this.h.fa(z,0)),this.R.beginPath(),this.R.arc(0,0,v,0,2*Math.PI,!1),this.R.closePath(),this.R.fillStyle=q,this.R.fill(),this.R.restore())}if(0a&&(a=0),this.h.ea?(b.useProgram(this.jb),b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D, this.Kk),b.bindBuffer(b.ARRAY_BUFFER,this.fd),b.vertexAttribPointer(this.jb.Z,this.fd.Ac,b.FLOAT,!1,0,0),q=b.getUniformLocation(this.jb,"uCanvasDimensions2"),b.uniform2f(q,l,k),q=b.getUniformLocation(this.jb,"uCirclePosition"),b.uniform2f(q,p+r*n.i,k-(u+t*n.i)),q=b.getUniformLocation(this.jb,"uRingTexturePosition"),b.uniform2f(q,b.drawingBufferWidth/l*(p+r*n.i),k-(u+t*n.i)),q=b.getUniformLocation(this.jb,"uCircleRadius"),b.uniform1f(q,v),b.uniform2f(b.getUniformLocation(this.jb,"uRingPosition"),p+ r*n.i,k-(u+t*n.i)),b.uniform1f(b.getUniformLocation(this.jb,"uRingRadius"),v),b.uniform1f(b.getUniformLocation(this.jb,"uRingAlpha"),a),q=b.getUniformLocation(this.jb,"uAspectRatio"),b.uniform1f(q,b.drawingBufferWidth/b.drawingBufferHeight/(l/k)),b.uniform1i(b.getUniformLocation(this.jb,"uSampler"),0),b.drawArrays(b.TRIANGLE_FAN,0,this.fd.Ed)):(this.R.save(),this.R.translate(p+r*n.i,u+t*n.i),q=this.R.createRadialGradient(0,0,0,0,0,v),q.addColorStop(0,this.h.fa(16777215,0)),q.addColorStop(.88,this.h.fa(0, 0)),q.addColorStop(.9,this.h.fa(16654848,a)),q.addColorStop(.92,this.h.fa(16776448,a)),q.addColorStop(.94,this.h.fa(4849466,a)),q.addColorStop(.96,this.h.fa(131071,a)),q.addColorStop(.98,this.h.fa(8190,a)),q.addColorStop(1,this.h.fa(0,0)),this.R.beginPath(),this.R.arc(0,0,v,0,2*Math.PI,!1),this.R.closePath(),this.R.fillStyle=q,this.R.fill(),this.R.restore())}this.h.ea&&(b.useProgram(this.h.la.D),b.disable(b.BLEND),b.enable(b.DEPTH_TEST))}}}};return g}();m.wl=g})(ggP2VR||(ggP2VR={}));var O=!1; (function(m){var g=function(){return function(){this.f=this.j=this.pan=0}}(),h=function(){function b(a,d){this.pan={c:0,Na:0,min:0,max:360,d:0,yi:0,cd:0};this.j={c:0,Na:0,min:-90,max:90,d:0,cd:0};this.L={c:0,Na:0,min:-180,max:180,d:0};this.kc={pan:0,j:-90,L:0,f:170,Ab:9};this.f={c:70,Na:70,min:1,Kf:0,max:170,si:360,ti:270,He:0,d:0,mode:0,Yk:0,sj:0};this.Ca={L:0,pitch:0};this.m={width:10,height:10};this.ib=0;this.Ph=new m.ra;this.crossOrigin="anonymous";this.Xa=this.Yg=4;this.Rc=this.mg=this.Mf=this.ec= 0;this.Y={start:{x:0,y:0},ba:{x:0,y:0},od:{x:0,y:0},c:{x:0,y:0},aa:{x:0,y:0}};this.X={fb:!1,xj:0,startTime:0,start:{x:0,y:0},ba:{x:0,y:0},od:{x:0,y:0},c:{x:0,y:0},aa:{x:0,y:0}};this.Yh=!0;this.ua={enabled:!0,ba:{x:0,y:0},aa:{x:0,y:0},Ki:0,f:{active:!1,Ub:0}};this.o={src:[],pe:4,width:640,height:480,md:!1,Ng:!1,Zk:!1,Vd:"loop",a:HTMLVideoElement=null,bl:!1,gc:WebGLTexture=null,aj:WebGLBuffer=null,lh:WebGLBuffer=null,ji:WebGLBuffer=null,format:1,Gg:0,ai:1};this.ae=0;this.ga=this.sa=this.Aa=this.U=this.Sb= this.nb=this.A=null;this.Xd="pano";this.$h="flashcontainer";this.Qh="";this.control=null;this.Gb=[];this.xa=!1;this.zg=1;this.M=null;this.Md=this.bf=this.xf=!1;this.$e=0;this.bd=.02;this.Dh=0;this.Eh=!1;this.Ch=this.pg=this.af=this.oe=this.hj=0;this.yb="";this.Me=this.rc=!1;this.Zg=0;this.wg=[];this.we=[];this.Re=this.hc=1;this.df=1024;this.Pf=!1;this.qk=200;this.ka=0;this.wd=5;this.ii=this.cl=this.Eb=0;this.s={enabled:!1,timeout:5,active:!1,cg:!1,speed:.4,nh:0,Wg:0,xi:!0,$i:!1,ad:!1,ij:!1,vi:!1, Si:!1,startTime:0,nd:0,Cg:!1,xg:!1,Rg:0};this.v={active:!1,ne:!1,speed:.1,pan:0,j:0,L:0,f:70,vd:70,ik:0,kk:0,jk:0,hk:0,Ab:0,Of:0,li:0,Zi:!1,wi:!1,gj:0,fj:0};this.Oa=null;this.Xe={};this.jg={};this.w={mode:1,Df:-1,na:0,cb:0,Gc:.05,Rb:255,Qb:1,Ob:255,Nb:.3,Ce:!0,Ui:{enabled:!0,width:180,height:20,Vi:0,Ti:1,background:!0,Ob:16777215,Nb:1,Rb:0,Qb:1,Gh:3,Hh:1,xh:!0},bb:[],Db:[],Bc:[],ih:[]};this.ta=null;this.P=[];this.S=[];this.I=[];this.Va=[];this.Te=[];this.Ka=[];this.Ha=[];this.V=1;this.la=this.yd= this.ue=null;this.jf={};this.addListener=function(a,d){(this.jf[a]=this.jf[a]||[]).push(d)};this.el=function(a,d){var b=this.jf[a],l,k;if(b)for(k=0,l=b.length;kk&&(k=0),1b||p.push(a[n]),p.push(h);b=l}return p};this.Pi=0;this.Qg=-1;this.rf=function(a){return a?a.pageX||a.pageY?{x:a.pageX,y:a.pageY}:a.clientX||a.clientY?{x:a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:a.clientY+document.body.scrollTop+document.documentElement.scrollTop}:a.touches&&a.touches[0]?{x:a.touches[0].pageX,y:a.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.Vg= 1;this.fm=this.Dg=this.fk=this.Uh=this.Gi=this.ah=0;this.ze=!0;this.ob=new m.Pg(this);this.ob.Ce=!1;this.uj();this.Oe(this.ob);this.checkLoaded=this.Gb;this.isLoaded=!1;d&&d.hasOwnProperty("useFlash")&&d.useFlash&&(this.ub=!0,this.ea=this.Cc=!1,d.hasOwnProperty("flashPlayerId")?this.Xd=d.flashPlayerId:this.Xd="pano",d.hasOwnProperty("flashContainerId")?this.$h=d.flashContainerId:this.$h=a+"flash");this.pa();this.ub||(this.Ba=new m.wl(this));this.pj(a);this.Ll();this.userdata=this.Xe=this.Ag();this.emptyHotspot= this.ob;this.mouse=this.qa;this.zn();this.N=new m.yl(this);this.Ea=new m.zl(this);this.la=new m.Fl(this)}b.prototype.Wc=function(a,d,c){var b=d?Number(d):0;if(0!=a&&4!=a&&12!=a&&9!=a)this.Uc("Unsupported projection type: "+a);else if(d&&0!==b&&4!==b&&12!==b&&9!==b)this.Uc("Unsupported projection2 type: "+b);else if(a==b&&(b=0),this.Mf=c?Number(c):1,this.Xa!=a||this.ec!=b)this.Xa=a,this.ec=b,this.la.Jg()};b.prototype.ya=function(){return 0==this.Xa?4:this.Xa};b.prototype.Kh=function(a,d){if(0!=a&& 4!=a&&12!=a&&9!=a)this.Uc("Unsupported projection type: "+a);else if(this.ea||0==a||4==a||this.Uc("Projection changes require WebGL!"),this.ya()!=a){var c={};c.pan=this.pan.c;c.tilt=this.j.c;c.fov=this.f.c;c.projection=a;c.timingFunction=3;c.speed=d;var b=this.qf(a);c.fov=Math.min(b,c.fov);this.Ug(c)}};b.prototype.uj=function(){var a;this.devicePixelRatio=window.devicePixelRatio||1;this.ak=navigator.userAgent.match(/(MSIE)/g)?!0:!1;this.Lg=navigator.userAgent.match(/(Firefox)/g)?!0:!1;if(this.Dd= navigator.userAgent.match(/(Safari)/g)?!0:!1)a=navigator.userAgent.indexOf("Safari"),this.td=navigator.userAgent.substring(a+7),a=navigator.userAgent.indexOf("Version"),-1!=a&&(this.td=navigator.userAgent.substring(a+8)),this.td=this.td.substring(0,this.td.indexOf(" ")),this.td=this.td.substring(0,this.td.indexOf(".")),this.Li=!0;if(this.$j=navigator.userAgent.match(/(Chrome)/g)?!0:!1)this.Dd=!1;this.$d=navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1;this.ck=navigator.userAgent.match(/(iPhone|iPod)/g)? !0:!1;this.Kg=navigator.userAgent.match(/(android)/i)?!0:!1;this.bk=navigator.userAgent.match(/(IEMobile)/i)?!0:!1;this.Og=this.$d||this.Kg||this.bk;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.Uj=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);a=["Webkit","Moz","O","ms","Ms"];var d;this.Ia="";this.Nc="transition";this.Ta="transform";this.ed="perspective";for(d=0;dNumber(this.td))&&(this.Ga=null);this.vh=this.ck?this.Dd&&this.Li&&10<=Number(this.td)?!0:!1:!0};b.prototype.O=function(a){if(O){var d=document.getElementById("debug");d&&(d.innerHTML=a.toString()+"
");window.console&&window.console.log(a)}};b.prototype.Uc=function(a){var d=document.getElementById("debug");d&&(d.innerHTML=a+"
");window.console&&window.console.log(a)};b.prototype.zn=function(){this.requestAnimationFrame=function(){var a=window.requestAnimationFrame|| window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;return a?a:function(a){window.setTimeout(a,10)}}()};b.prototype.Pk=function(a){this.qk=a};b.prototype.En=function(a){this.crossOrigin=a};b.prototype.Gn=function(a){this.De=a};b.prototype.Bm=function(){return this.Zg};b.prototype.Dn=function(a){this.xd=a};b.prototype.jm=function(){return this.xd};b.prototype.qm=function(){return this.Og};b.prototype.om=function(){return this.s.active}; b.prototype.In=function(a){this.Og=!!a};b.prototype.Eg=function(){return this.isLoaded};b.prototype.dd=function(){return 1*this.m.height/(2*Math.tan(Math.PI/180*(this.Jb()/2)))};b.prototype.Rk=function(a,d){this.isFullscreen&&(a=window.innerWidth,d=window.innerHeight);var c=a-this.margin.left-this.margin.right,b=d-this.margin.top-this.margin.bottom;if(!(10>c||10>b)){var f=window.devicePixelRatio||1;this.Pf&&(f=1);this.A.style.width=c+"px";this.A.style.height=b+"px";this.A.style.left=this.margin.left+ "px";this.A.style.top=this.margin.top+"px";if(this.ea)try{this.nb&&(this.nb.style.position="absolute",this.nb.style.display="inline",this.nb.style.width=c+"px",this.nb.style.height=b+"px",this.nb.width=c*f,this.nb.height=b*f),this.G&&(this.hb.width=c*f,this.hb.height=b*f,this.G.viewport(0,0,this.G.drawingBufferWidth,this.G.drawingBufferHeight))}catch(l){alert(l)}this.Sb&&(this.Sb.style.width=a+"px",this.Sb.style.height=d+"px",this.Sb.width=a,this.Sb.height=d);this.Aa&&(this.Aa.style.width=a+"px", this.Aa.style.height=d+"px",this.sa.style.width=a+"px",this.sa.style.height=d+"px",this.sa.width=a,this.sa.height=d,this.sa.style.left=this.margin.left+"px",this.sa.style.top=this.margin.top+"px",this.M&&this.M!=this.Aa&&(this.M.style.width=a+"px",this.M.style.height=d+"px"));this.Ba&&(c=this.Ba.Ic,c.style.width=a+"px",c.style.height=d+"px",c.width=a,c.height=d,c.style.left=this.margin.left+"px",c.style.top=this.margin.top+"px");this.xf&&(this.xa=!0);c=this.A.offsetWidth;b=this.A.offsetHeight;if(this.m.width!= c||this.m.height!=b)this.m.width=c,this.m.height=b;this.Do();this.M&&this.M.ggUpdateSize&&this.M.ggUpdateSize(a,d)}};b.prototype.me=function(){this.Yi=!0};b.prototype.$c=function(){this.Rk(this.ue.offsetWidth,this.ue.offsetHeight)};b.prototype.Nm=function(){var a={width:0,height:0};a.width=this.m.width;a.height=this.m.height;return a};b.prototype.Yd=function(){var a={x:0,y:0},d=this.A;if(d.offsetParent){do a.x+=d.offsetLeft,a.y+=d.offsetTop,d=d.offsetParent;while(d)}return a};b.prototype.Un=function(a){this.Oa= a};b.prototype.Kn=function(a,d,c,b){this.margin.left=a;this.margin.top=d;this.margin.right=c;this.margin.bottom=b;this.Oa=this.skinObj;this.me()};b.prototype.Ul=function(a){0==a&&(this.B.kd=!1);1==a&&(this.B.kd=!0);2==a&&(this.B.kd=this.B.kd?!1:!0)};b.prototype.Lm=function(){return 1==this.B.kd?1:0};b.prototype.mj=function(a,d){this.w.mode=1==d&&0d.z?(n= -c/d.z,a=d.x*n,n*=d.y,Math.abs(a)d.z?(n=-c/d.z,a=this.m.width/2+d.x*n,n=this.m.height/2+d.y*n):n=a=0,d.fc=a,d.Bb=n;h.Gd=p}}}};b.prototype.km=function(){for(var a=[],d=0;dd&&(d=0);1>16&255)+","+(a>>8&255)+","+(a&255)+","+d+")"};b.prototype.kn=function(){var a,d;if(this.sa&&(this.w.Df!=this.w.mode&&(this.w.Df=this.w.mode,this.sa.style.visibility= 0=this.w.mode&&(c=0);3==this.w.mode&&(c=this.w.na);for(a=0;ac!=f.Bb>c&&d<(f.fc-k.fc)*(c-k.Bb)/(f.Bb-k.Bb)+k.fc&&(l=!l)}return l};b.prototype.Mh=function(a,d){var c=-1;if((0<=this.w.mode|| 0c.width?this.f.c/2:4==d?180*Math.atan(4*c.height/(3*c.width)*Math.tan(this.f.c/2*Math.PI/180))/Math.PI:4*c.height/(3*c.width)*(this.f.c/2)}return 2*a};b.prototype.mm=function(a,d){a||(a=this.Jb());d||(d=this.ya());return 4==d?180*Math.atan(this.Nd()*Math.tan(a/2*Math.PI/180))/Math.PI:a*this.Nd()};b.prototype.Nd=function(){return this.m.width/ this.m.height};b.prototype.Xf=function(a){a/=2;var d,c=this.ya();switch(this.f.mode){case 0:this.f.c=2*a;break;case 1:a=4==c?180*Math.atan(this.m.width/this.m.height*Math.tan(a*Math.PI/180))/Math.PI:this.m.width/this.m.height*a;this.f.c=2*a;break;case 2:d=Math.sqrt(this.m.width*this.m.width+this.m.height*this.m.height);a=4==c?180*Math.atan(d/this.m.height*Math.tan(a*Math.PI/180))/Math.PI:d/this.m.height*a;this.f.c=2*a;break;case 3:4*this.m.height/3>this.m.width||(d=3*this.m.width/(4*this.m.height), a=4==c?180*Math.atan(d*Math.tan(a*Math.PI/180))/Math.PI:d*a),this.f.c=2*a}};b.prototype.tg=function(){var a=new g;a.pan=this.pan.c;a.j=this.j.c;a.f=this.f.c;this.te(a);this.te(a);this.te(a);this.pan.c=a.pan;this.j.c=a.j;this.f.c=a.f};b.prototype.te=function(a){var d,c,b=this.m.width/this.m.height;if(2==this.ib){0b&&(a.f=b);50a.j-c&&(a.j=-50+c));d>f?a.pan=0:(a.pan+d>f&&(a.pan=f-d,this.s.active&&(this.s.speed=-this.s.speed,this.pan.d=0)),a.pan-d<-f&&(a.pan=-f+d,this.s.active&&(this.s.speed=-this.s.speed,this.pan.d=0)))}else{0f&&(a.f=f);12==this.ya()&&(2*d>l&&(a.f=l/b),c=this.Jb()/2,2*c>l&&(a.f=l),c=this.Jb()/2,d=b*c);2*c>this.j.max-this.j.min&&180>this.j.max-this.j.min&&(c=(this.j.max-this.j.min)/2,this.Xf(2*c));90>this.j.max?a.j+c>this.j.max&&(a.j=this.j.max-c):a.j>this.j.max&&(a.j=this.j.max);-90b){var f=90,l=Math.tan(c*Math.PI/180),k=Math.tan((Math.abs(a.j)+c)*Math.PI/180),k=Math.sqrt(k*k+1)/Math.sqrt(l*l+1);c=180*Math.atan(k*Math.tan(d*Math.PI/180))/Math.PI;2*c>b&&(k=Math.tan(b*Math.PI/360)/Math.tan(d*Math.PI/180),b=k*Math.sqrt(l*l+1),k=Math.sqrt(b*b-1),f=180/Math.PI*Math.atan(k));a.pan+c>this.pan.max&&(a.pan=this.pan.max-c,this.s.active&&(this.s.speed=-this.s.speed,this.pan.d=0));a.pan-cf&&(a.j=f-d);a.j-d<-f&&(a.j=-f+d)}}};b.prototype.update=function(a){void 0===a&&(a=0);this.xa=!0;a&&(this.zg=a)};b.prototype.rm=function(){return this.ga?!!this.ga.isTileLoading:0a;a++){var c,b;if(c=this.eb.Za[a])b="",this.rc?(b+="translate3d("+this.m.width/2+"px,"+this.m.height/2+"px,0px) ",b+="perspective("+d+"px) ",b+="translate3d(0px,0px,"+d+"px) "):b+="translate3d("+this.m.width/2+"px,"+this.m.height/2+"px,"+d+"px) ",b+="rotateZ("+Number(this.L.c).toFixed(10)+"deg) ",b+="rotateX("+Number(this.j.c).toFixed(10)+"deg) ",b+="rotateY("+Number(-this.pan.c).toFixed(10)+"deg) ", c.Pj&&(b+=c.Pj,c.pc||(b="translate3d(-10px,-10px,0px) scale(0.001,0.001)"),c.J.style[this.Ta]=b)}};b.prototype.vo=function(){this.tg();var a;this.Sb&&(a=this.Sb.getContext("2d"));if(this.m.width!==this.A.offsetWidth||this.m.height!==this.A.offsetHeight)this.m.width=this.A.offsetWidth,this.m.height=this.A.offsetHeight;if(a){var d=a.canvas.width/2,c=a.canvas.height/2,b=a.createRadialGradient(d,c,5,d,c,Math.max(d,c));b.addColorStop(0,"#333");b.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height); a.fillStyle=b;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.c.toFixed(1),d,c-60);a.fillText("Tilt: "+this.j.c.toFixed(1),d,c-30);a.fillText("Fov: "+this.f.c.toFixed(1),d,c+0);a.fillText("Node: "+this.Hj(),d,c+30);a.fillText("Title: "+this.Xe.title,d,c+60)}};b.prototype.wo=function(){this.tg();if(this.m.width!==this.A.offsetWidth||this.m.height!==this.A.offsetHeight)this.m.width=this.A.offsetWidth,this.m.height=this.A.offsetHeight;this.ga&&this.ga.setPan&& (this.ga.setPan(this.pan.c),this.ga.setTilt(this.j.c),this.ga.setFov(this.f.c))};b.prototype.Wi=function(){this.sa.style.visibility="inherit";this.$||(this.$=this.sa.getContext("2d"));if(this.$.width!=this.m.width||this.$.height!=this.m.height)this.$.width=this.m.width,this.$.height=this.m.height;this.$.clear?this.$.clear():this.$.clearRect(0,0,this.sa.width,this.sa.height);this.Eb=0;var a,d,c;d=100/this.f.c;c=this.g.width/this.g.height;var b=this.m.height*d*c;d*=this.m.height;a=(this.pan.c/100/c- .5)*b+this.m.width/2;for(var f=(this.j.c/100-.5)*d+this.m.height/2,l,k,g,h,n=0;this.g.H.length>=n+2&&this.g.H[n+1].width>b;)n++;var r,p;p=[];for(r=this.g.H.length-1;r>=n;){c=this.g.H[r];var u;if(c.cache)u={Ua:0,qb:0},u.rb=c.K-1,u.sb=c.da-1;else{u={};var t=-f/d*(c.height/this.g.F);l=(-a+this.m.width)/b*(c.width/this.g.F);k=(-f+this.m.height)/d*(c.height/this.g.F);u.Ua=Math.min(Math.max(0,Math.floor(-a/b*(c.width/this.g.F))),c.K-1);u.qb=Math.min(Math.max(0,Math.floor(t)),c.da-1);u.rb=Math.min(Math.max(0, Math.floor(l)),c.K-1);u.sb=Math.min(Math.max(0,Math.floor(k)),c.da-1)}p[r]=u;var v=!0;for(k=u.qb;k<=u.sb;k++)for(l=u.Ua;l<=u.rb;l++)h=l+k*c.K,t=c.W[h],t||(t=new m.Bd,c.W[h]=t),this.ka=n;){c=this.g.H[r];if(p[r]&&0<=p[r].Ua)for(u=p[r],k=u.qb;k<=u.sb;k++)for(l=u.Ua;l<=u.rb;l++)h=l+k*c.K,(t=c.W[h])||(t=c.W[h]=new m.Bd),t.g&&t.g.complete&&this.$.drawImage(t.g,a+(-this.g.Ja+this.g.F*l)*b/c.width,f+(-this.g.Ja+this.g.F*k)*d/c.height,t.g.width*b/c.width,t.g.height*d/c.height),t.visible=!0;r--}for(b=0;b=this.w.mode&&(b=0),3==this.w.mode&&(b=this.w.na),g=0;gthis.eb.Za.length))for(var a=0;6>a;a++){var d;d=this.eb.Za[a];var c;c=[];c.push(new m.ra(-1,-1,-1,0,0));c.push(new m.ra(1,-1,-1,1,0));c.push(new m.ra(1,1,-1,1,1));c.push(new m.ra(-1,1,-1,0,1));for(var b=0;4>b;b++)4>a?c[b].Da(-Math.PI/2*a):c[b].va(Math.PI/2*(4==a?-1:1)),this.Ca&&(c[b].kb(this.Ca.L* Math.PI/180),c[b].va(-this.Ca.pitch*Math.PI/180)),c[b].Da(-this.pan.c*Math.PI/180),c[b].va(this.j.c*Math.PI/180),c[b].kb(this.L.c*Math.PI/180);c=this.Nh(c);d.pc=0=a+2&&!this.g.H[a+1].Je&&this.g.H[a+1].width>c;)a++;return a};b.prototype.zo=function(){var a=!1,d,c,b;if(this.m.width!==this.A.offsetWidth||this.m.height!==this.A.offsetHeight)this.m.width= this.A.offsetWidth,this.m.height=this.A.offsetHeight,this.A.style[this.Ta+"OriginX"]=this.m.width/2+"px",this.A.style[this.Ta+"OriginY"]=this.m.height/2+"px",a=!0;var f=Math.round(this.dd());if(this.Ef!=f||a)this.Ef=f,this.rc||(this.A.style[this.ed]=f+"px",this.A.style[this.ed+"Origin"]="50% 50%");this.Eb=0;if(0d;d++){var k;k=this.eb.Za[d];k.pc&&(l=l+d+",")}l=this.Wh();var g;for(g=this.g.H.length-1;g>=l;){var a=this.g.H[g],h=1;g==this.g.H.length- 1&&0==this.g.Ja&&(h=this.g.F/(this.g.F-2));for(d=0;6>d;d++){k=this.eb.Za[d];var n=k.Ge;if(k.pc&&0=g);)p=p.nextSibling;this.A.insertBefore(n.J,p);n.Ma=n.J.getContext("2d")}else if(this.cl< this.qk){this.cl++;n.J=document.createElement("canvas");n.J.width=this.g.F+2*this.g.Ja;n.J.height=this.g.F+2*this.g.Ja;n.Ma=n.J.getContext("2d");n.J.style[this.Ta+"Origin"]="0% 0%";n.J.style.overflow="hidden";n.J.style.position="absolute";for(p=this.A.firstChild;p&&p.Ad&&(-1==p.Ad||p.Ad>=g);)p=p.nextSibling;this.A.insertBefore(n.J,p)}n.J&&(this.ii++,n.g=new Image,n.g.crossOrigin=this.crossOrigin,n.g.style[this.Ta+"Origin"]="0% 0%",n.g.style.position="absolute",n.g.style.overflow="hidden",n.J.Ad=g, n.g.onload=this.lo(n),n.g.onerror=this.mh(n),n.g.onabort=this.mh(n),n.g.setAttribute("src",this.ke(d,g,c,b)),a.cache&&this.Gb.push(n.g),0==this.ka&&this.M&&this.M.ggReLoadedLevels&&this.M.ggReLoadedLevels(),this.ka++,this.xa=!0)}else this.Eb++;if(n.J){p="";this.rc?(p+="translate3d("+this.m.width/2+"px,"+this.m.height/2+"px,0px) ",p+=" perspective("+f+"px) ",p+="translate3d(0px,0px,"+f+"px) "):p+="translate3d("+this.m.width/2+"px,"+this.m.height/2+"px,"+f+"px) ";p+="rotateZ("+Number(this.L.c).toFixed(10)+ "deg) ";p+="rotateX("+Number(this.j.c).toFixed(10)+"deg) ";p+="rotateY("+Number(-this.pan.c).toFixed(10)+"deg) ";this.Ca&&(p+="rotateX("+Number(-this.Ca.pitch).toFixed(10)+"deg) ",p+="rotateZ("+Number(this.Ca.L).toFixed(10)+"deg) ");var p=4>d?p+("rotateY("+-90*d+"deg) "):p+("rotateX("+(4==d?-90:90)+"deg) "),u;this.Me?(u=this.df/this.g.F*(this.g.F/a.width)*(2*g+1),u=this.Dd?2/Math.tan(this.f.c*Math.PI/360)*u:2*u,p+=" scale("+u*h*h+")"):u=1/(h*h);p+=" translate3d("+(1/h*c*this.g.F-this.g.Ja-a.width/ 2)+"px,";p+=1/h*b*this.g.F-this.g.Ja-a.width/2+"px,";p+=-a.width*u/2+"px)";k.pc&&(n.visible=!0,n.J?n.J.style[this.Ta]=p:n.g&&(n.g.style[this.Ta]=p))}}}}g--}for(f=0;fg;g++)l=this.Id(l,"c",a),l=this.Id(l,"s",k),l=this.Id(l,"r",d),l=this.Id(l,"l",f),l=this.Id(l,"x",c),l=this.Id(l,"y",b),l=this.Id(l,"v",b),l=this.Id(l,"h",c);return this.Vb(l)};b.prototype.ci=function(){return this.pan.c};b.prototype.zm=function(){return this.v.pan};b.prototype.Am=function(){for(var a=this.pan.c;-180>a;)a+=360;for(;180a;)a+=360;for(;180c?this.v.f=Number(c):this.v.f=this.f.c;this.v.speed=!isNaN(b)&&0=k?(this.Vf(d,c,b),this.Wc(f)):(a=new m.ek,a.Ra="__AutoMove",a.Zf=this.pan.c,a.ag=this.j.c,a.ud=this.f.c,a.$f=this.Xa,a.Jd=d,a.Kd=c,a.Qe=b,a.Yc=f,a.xe=!1,a.Td=!1,a.Ud=!1,0==l&&(a.Td=!0),1==l&&(a.xe=!0,a.Td=!0),2==l&&(a.Ud=!0),a.speed=k,this.v.fj=this.C,this.C=this.Ej(a),this.v.gj=(new Date).getTime(),this.v.Zi=!0,this.v.active=!0,this.v.ne=!1,this.v.pan= d,this.v.j=c,this.v.f=b)};b.prototype.$m=function(a){this.moveTo(this.pan.Na,this.j.Na,this.f.Na,a)};b.prototype.an=function(a,d){var c={};c.pan=this.pan.Na;c.tilt=this.j.Na;c.fov=this.f.Na;c.projection=this.Yg;c.timingFunction=d;c.speed=a;this.Ug(c)};b.prototype.Hl=function(a,d,c,b){var f=new m.Pg(this);f.type="point";f.pan=d;f.j=c;f.id=a;f.a={};f.a.player=this;f.ye();f.a.hotspot=f;f.a.__div=document.createElement("div");f.a.__div.appendChild(b);this.P.push(f);f.a.__div.style.position="absolute"; f.a.__div.style.left="-1000px";f.a.__div.style.top="-1000px";this.Aa.insertBefore(f.a.__div,this.Aa.firstChild);this.xa=!0};b.prototype.xo=function(a,d,c){for(var b=0;bc;)c+=360;e=e.Kl()}var f={};f.pan=c;f.tilt=e;return f};b.prototype.ld=function(a){return a==this.control?!0:a&&void 0!==a.ggPermeable&&0==a.ggPermeable?!1:a&&a.ggType&&("container"==a.ggType||"cloner"==a.ggType||"timer"==a.ggType)?!0:!1};b.prototype.Lh=function(a,b){var c=this.dd(),e,f,l;for(e=0;en;n++){switch(n){case 0:h.Wa(-r,-p,-1);break;case 1:h.Wa(r,-p,-1);break;case 2:h.Wa(r,p,-1);break;case 3:h.Wa(-r,p,-1)}h.va(-k.j*Math.PI/180);h.Da(k.pan*Math.PI/180);h.Da(-this.pan.c*Math.PI/180);h.va(this.j.c*Math.PI/180); h.kb(this.L.c*Math.PI/180);g.push(h.clone())}g=this.Nh(g);if(0h.z?(l=-c/h.z,f=this.m.width/2+h.x*l,l=this.m.height/2+h.y*l):l=f=0,h.fc=f,h.Bb=l;if(this.Tj(g,a,b))return k}}return null};b.prototype.Mg=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};b.prototype.Zm=function(a){this.il(a);if(this.Mc)this.Mc.onclick();this.yd=null;if(!this.B.xb){a=a? a:window.event;if((a.which||0==a.which||1==a.which)&&this.ld(a.target)){var b;(b=this.Lh(this.qa.x,this.qa.y))&&b.Qc&&(this.yd=b);this.ql(a.pageX,a.pageY);this.X.fb=!0;this.X.startTime=(new Date).getTime();a.preventDefault();this.pa()}this.Y.aa.x=0;this.Y.aa.y=0}};b.prototype.We=function(a,b){var c=this.w.Ui;c.enabled&&(this.za!=this.ob&&0<=a&&0<=b&&""!=this.za.title?(this.ta.innerHTML=this.za.title,this.ta.style.color=this.fa(c.Vi,c.Ti),c.background?this.ta.style.backgroundColor=this.fa(c.Ob,c.Nb): this.ta.style.backgroundColor="transparent",this.ta.style.border="solid "+this.fa(c.Rb,c.Qb)+" "+c.Hh+"px",this.ta.style.borderRadius=c.Gh+"px",this.ta.style.textAlign="center",0a-this.X.startTime&&0<=b&&20>b&&(this.yd&&this.yd.Qc(),(b=this.Mh(this.qa.x,this.qa.y))&&this.fl(b),b=Math.abs(this.Y.od.x-this.Y.ba.x)+Math.abs(this.Y.od.y-this.Y.ba.y),700>a-this.Cf&&0<=b&&20>b?(this.B.Sh&&this.ph(),this.Cf=0):this.Cf=a,this.Y.od.x=this.Y.ba.x,this.Y.od.y=this.Y.ba.y)}};b.prototype.rk=function(a){if(!this.B.Tg&&(a=a?a:window.event,this.ld(a.target))){var b=a.detail?-1* a.detail:a.wheelDelta/40;this.B.Yj&&(b=-b);a.axis&&(-1==this.Qg?this.Qg=a.axis:this.Qg!=a.axis&&(b=0));var c=0Math.abs(a.wheelDeltaY)&&(b=0);0!=b&&(this.ef(c*this.B.Wk,!0),this.update());a.preventDefault();this.pa()}};b.prototype.to=function(a){a||(a=window.event);var b=a.touches,c=this.Yd();this.qa.x=b[0].pageX-c.x;this.qa.y=b[0].pageY-c.y;this.Se=this.yd=null;this.Yh&&(this.Yh=!1,this.gm());if(!this.B.xb){if(!this.X.fb&&b[0]){this.X.startTime= (new Date).getTime();this.X.start.x=b[0].pageX;this.X.start.y=b[0].pageY;this.X.ba.x=b[0].pageX;this.X.ba.y=b[0].pageY;this.ic=b[0].target;if(this.ld(a.target)){var e;(e=this.Lh(this.qa.x,this.qa.y))&&e.Qc&&(this.yd=e);if(e=this.Mh(this.qa.x,this.qa.y))this.O(e),this.Se=e,this.fh(e),e=this.rf(a),this.We(e.x-c.x,e.y-c.y);this.ql(b[0].pageX,b[0].pageY);this.X.xj=b[0].identifier;this.X.fb=!0;a.preventDefault();this.pa()}if(this.ic){c=this.ic;for(e=!1;c&&c!=this.control;){if(c.onmouseover)c.onmouseover(); c.onmousedown&&!e&&(c.onmousedown(),e=!0);c=c.parentNode}e&&a.preventDefault()}}1this.f.max&&(this.ua.f.Ub=this.f.max),this.ua.f.Ubb){a.preventDefault();e=!0;this.ld(this.ic)&&this.yd&&this.yd.Qc();if(this.ic)for(b=this.ic,g=!1;b&&b!=this.control;)b.onclick&&!g&&(b.onclick(),g=!0,e=!1),b=b.parentNode;b=Math.abs(this.X.od.x-this.X.ba.x)+Math.abs(this.X.od.y-this.X.ba.y);if(700>f-this.Cf&&0<=b&&20>b){a.preventDefault();if(this.ld(this.ic)&& this.B.Sh){var k=this;setTimeout(function(){k.ph()},1)}if(this.ic)for(b=this.ic,g=!1;b&&b!=this.control;)b.ondblclick&&!g&&(b.ondblclick(),g=!0,e=!1),b=b.parentNode;this.Cf=0}else this.Cf=f;this.X.od.x=this.X.ba.x;this.X.od.y=this.X.ba.y}if(this.ic)for(a.preventDefault(),b=this.ic,g=!1;b&&b!=this.control;){if(b.onmouseout)b.onmouseout();b.onmouseup&&!g&&(b.onmouseup(),g=!0);b=b.parentNode}a=this.rf(a);this.We(a.x-c.x,a.y-c.y);this.Se&&e&&this.fl(this.Se);this.ic=null;this.X.fb=!1;this.fh(this.ob); this.Se=null}};b.prototype.qo=function(a){var b=this.Yd();this.B.xb||(this.X.fb=!1);this.Se=null;this.fh(this.ob);a=this.rf(a);this.We(a.x-b.x,a.y-b.y)};b.prototype.Tm=function(){return null!=this.ic||this.X.fb};b.prototype.sk=function(a){!this.ce&&window.MSGesture&&(this.O("setup gesture"),this.ce=new MSGesture,this.ce.target=this.control);this.ce&&this.ce.addPointer(a.pointerId)};b.prototype.Gj=function(a){this.gi=!0;this.Vg=1;this.B.xb||(a.touches?(this.ic=a.touches.target,this.ld(a.target)&&(a.preventDefault(), this.f.He=this.f.c,this.pa())):(a.preventDefault(),this.f.He=this.f.c,this.pa()))};b.prototype.im=function(a){!this.B.xb&&this.ld(a.target)&&(a.preventDefault(),this.ua.f.active=!0,this.ua.f.Ub=this.f.He/Math.sqrt(a.scale),4==this.ya()&&this.ua.f.Ub>this.f.max&&(this.ua.f.Ub=this.f.max),this.update(),this.pa())};b.prototype.bn=function(a){this.B.xb||(a.preventDefault(),1!=a.scale&&(this.ua.f.active=!0,this.Vg*=a.scale,this.ua.f.Ub=this.f.He/Math.sqrt(this.Vg),4==this.ya()&&this.ua.f.Ub>this.f.max&& (this.ua.f.Ub=this.f.max),this.update(),this.pa()))};b.prototype.Fj=function(a){this.B.xb||(this.ua.f.active=!1,a.preventDefault(),this.pa(),this.ce&&this.ce.reset&&this.ce.reset())};b.prototype.Um=function(a){this.B.Gf||(this.isFullscreen&&a.preventDefault(),this.ae=a.keyCode,this.pa())};b.prototype.Vm=function(a){this.ae&&(this.ae=0,a.preventDefault(),this.pa())};b.prototype.gn=function(){this.ae=0};b.prototype.Xg=function(){this.isFullscreen&&(this.Mg()||this.exitFullscreen(),this.Mg()&&(this.U.style.left= "0px",this.U.style.top="0px"))};b.prototype.fl=function(a){this.Oa&&this.Oa.hotspotProxyClick&&this.Oa.hotspotProxyClick(a.id);""!=a.url&&(this.zi(a.url,a.target),this.We(-1,-1))};b.prototype.zd=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.f.c,90)/360))};b.prototype.zk=function(){var a=this;setTimeout(function(){a.zk()},100);9!=a.ah||a.Zj||requestAnimationFrame(function(){a.Uc("restart recover timer")});10h;)h+=360}c=h-k;2!=this.ib&&(180c&&(c+=360));this.pan.c=this.pan.c+c*this.bd}else this.pan.c=h;break;case 1:k=this.j.c;this.Md?(e=h-k,this.j.c=this.j.c+e*this.bd):this.j.c=h;break;case 2:k=this.f.c,this.Md?(f=h-k,this.f.c=this.f.c+f*this.bd):this.f.c= h}}b=this.ya();for(g=Math.floor(a);!this.Be(g,3)&&0a?(b=this.qf(this.af),this.f.c>b?this.pg=a:(a=(a-this.pg)/this.Ch,a=Math.min(1,a),this.Wc(this.Xa,this.af,1-a))):0==g.lb||k>g.lb-.3?this.Wc(g.value):(a=k/g.lb,this.Wc(b,g.value,1-a));this.Md&&(c=Math.sqrt(c*c+e*e+f*f),.3>c&&(this.Md=!1,this.bd=.02,this.$e=0),0this.$e&&(this.bd+=.01,this.bd=Math.min(this.bd,1)),this.$e=c);this.update()};b.prototype.nn=function(a){var b, c=this.v.speed;this.v.li&&(c=c*(a.getTime()-this.v.li)/60,5c&&(c=.2));this.v.li=a.getTime();this.s.Cg&&(this.la.ready()||4==this.Xa)&&this.Eg()&&(this.s.Cg=!1,this.s.active=!0,this.pb.sd=!0,this.pb.Xh=!1);if(this.v.active||0!=this.v.Ab&&this.la.ready()){if(this.v.Zi&&"__AutoMove"==this.C.Ra)if(b=a.getTime()-this.v.gj,c=b/100,c>=this.C.length){if(this.Ha.splice(this.Ha.indexOf(this.C),1),this.v.active=!1,this.C=this.v.fj,this.v.Ab=0,b=this.s.ad,this.Vf(this.v.pan,this.v.j,this.v.f),this.v.wi&& (this.v.wi=!1,this.s.vi=!0,this.s.active=!0,this.s.ad=b),this.onMoveComplete)this.onMoveComplete()}else this.Qk(c);else{this.pan.d=this.v.pan-this.pan.c;if(360==this.pan.max-this.pan.min){for(;-180>this.pan.d;)this.pan.d+=360;for(;1805*b?b/e:.2,this.pan.d*=e,this.j.d*=e,this.f.d*=e;this.pan.c+=this.pan.d;this.j.c+=this.j.d;this.L.c+= this.L.d;this.f.c+=this.f.d;0!=this.v.Ab&&(this.v.Ab!=this.Xa?(c=this.qf(this.v.Ab),this.pf()>c?(this.f.c+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.j.d*this.j.d+this.L.d*this.L.d)/b,1))*b,this.f.d)-this.f.d,this.v.f=this.f.c):(this.ec=this.Xa,this.Xa=this.v.Ab,this.O("New projection from Target:"+this.Xa),this.Mf=this.v.Of=0,this.la.Jg())):1>this.v.Of?(this.v.Of=Math.min(1,this.v.Of+.05*c),this.Mf=this.v.Of):(this.ec=0,this.v.Ab=0,this.la.Jg()))}this.Ee=a.getTime();this.update()}else if(this.s.active){b= a.getTime()-this.s.startTime;this.s.Rgthis.o.a.duration-this.o.a.currentTime&&(this.Eh=!0);e>=10*this.oe;)e-=10*this.oe;if(!f&&c>=this.C.length||f&&!b&&c>=this.C.length||f&&b&&this.C.Ra!=this.C.uk&&c>=this.C.length){this.bf=!1;if(this.pb.sd){this.pb.sd=!1;this.pb.Xh=!0;this.s.active=this.N.Od;this.Ha.splice(this.Ha.indexOf(this.C),1);0k.pan;)k.pan+= 360;k.tilt=e.value;k.fov=f.value;k.projection=g?g.value:4;k.timingFunction=3;k.speed=1;this.v.wi=!0;this.Ug(k);this.s.active=!0;this.s.ad=b}}else if(0=1E3*this.s.Wg){if(1=this.Ka.length&&(b=0),c=this.Ka[b];this.s.startTime=a.getTime();this.s.nd=a.getTime();this.s.timeout=0;this.de("{"+c+"}");this.s.active=!0;this.N.Od=!0}}else b= a.getTime(),e=c=1E3/60,0!=this.s.nd&&(e=b-this.s.nd),this.j.d=this.s.nh*(0-this.j.c)/100,this.f.d=this.s.nh*(this.f.Na-this.f.c)/100,this.pan.d=.95*this.pan.d+-this.s.speed*this.zd()*.05,c=e/c,this.pan.c+=this.pan.d*c,this.j.c+=this.j.d*c,this.f.c+=this.f.d*c,this.s.nd=b,this.update();3E31E3*this.s.timeout&&(this.s.cg&&this.Eg()||!this.s.cg)&&(this.s.active=!0,this.s.startTime=a.getTime(),this.s.nd=0,this.pan.d=0,this.j.d=0,this.f.d=0),!this.ua.enabled||0!=this.ae||this.X.fb||0==this.pan.d&&0==this.j.d&&0==this.f.d||(this.pan.d*=.9,this.j.d*=.9,this.f.d*=.9,this.pan.c+=this.pan.d,this.j.c+=this.j.d,this.ef(this.f.d),1E-4>this.pan.d*this.pan.d+this.j.d*this.j.d+this.f.d*this.f.d&&(this.pan.d=0,this.j.d=0,this.f.d=0), this.update())};b.prototype.pn=function(a){var b=this.N;if(b.Ld){var c=a.getTime()-b.ul,c=c/(1E3*b.tl);if(1<=c){b.Ld=!1;for(c=0;c=1E3*b.bm&&(b.yg=!1):(b.current+=b.Gc,0>b.current&&(b.current=0,b.Gc=-b.Gc,b.yg=!0,b.Th=a.getTime()),1b.Db[a]?(b.Db[a]+=.05,b.Bc[a]b.Db[a]&&(b.Db[a]=b.Bc[a],-1!=b.ih.indexOf(b.bb[a])&&(b.ih.splice(b.ih.indexOf(b.bb[a]),1),b.bb.splice(a,1),b.Bc.splice(a,1),b.Db.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;ac.na?(c.na+=b.Gc,c.cbc.na&&(c.na=c.cb)),this.update())}3==b.mode&&b.cb!=b.na&&(b.cb>b.na?(b.na+=b.Gc,b.cbb.na&&(b.na=b.cb)),this.update())};b.prototype.sn=function(){var a=this.ua;this.X.fb&&(this.B.kd?(a.aa.x=.4*(this.Y.ba.x-a.ba.x),a.aa.y=.4*(this.Y.ba.y-a.ba.y),a.ba.x+=a.aa.x,a.ba.y+=a.aa.y):(a.aa.x=.1*-this.Y.aa.x*this.B.sensitivity/8,a.aa.y=.1*-this.Y.aa.y*this.B.sensitivity/8),this.ol(a.aa.x,a.aa.y),this.update());a.f.active&&(this.lj(.4*(a.f.Ub-this.f.c)),.001>Math.abs(a.f.Ub-this.f.c)/this.f.c&&(a.f.active=!1),this.update());if(a.enabled&&(0!=a.aa.x||0!=a.aa.y)&&!this.X.fb){var b= .9*(1-a.Ki);a.aa.x=b*a.aa.x;a.aa.y=b*a.aa.y;.01>a.aa.x*a.aa.x+a.aa.y*a.aa.y?(a.aa.x=0,a.aa.y=0):(this.ol(a.aa.x,a.aa.y),this.update())}};b.prototype.on=function(){if(this.B.Mk&&this.B.kd){var a=new g;a.pan=this.pan.c;a.j=this.j.c;a.f=this.f.c;this.te(a);this.te(a);this.te(a);var b=a.pan-this.pan.c,c=a.j-this.j.c,a=a.f-this.f.c;if(0!=b||0!=c||0!=a){var e;e=.2+.9*Math.min((Math.abs(b)+Math.abs(c)+Math.abs(a))/Math.abs(Math.min(this.f.c,100))*.3,1);this.pan.c+=b*e;this.j.c+=c*e;this.f.c+=a*e;this.ua.Ki= .3;this.update()}else this.ua.Ki=0}else this.tg();if(2!=this.ib){for(;360this.pan.c;)this.pan.c+=360}};b.prototype.qn=function(){if(0!=this.ae){var a=this.B.sensitivity/8;switch(this.ae){case 37:case 65:this.rg(a*this.zd(),!0);break;case 38:case 87:this.sg(a*this.zd(),!0);break;case 39:case 68:this.rg(-a*this.zd(),!0);break;case 40:case 83:this.sg(-a*this.zd(),!0);break;case 43:case 107:case 16:case 81:this.B.pi||this.ef(-a,!0);break;case 17:case 18:case 109:case 45:case 91:case 69:this.B.pi|| this.ef(a,!0)}this.update()}};b.prototype.rn=function(){if(!this.Eg()&&this.xf&&5>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,b+=String.fromCharCode(c),64!=g&&(b+=String.fromCharCode(e)),64!=k&&(b+=String.fromCharCode(f));while(hb&&(b=0),b>c.cf.duration&&(b=c.cf.duration-.1),c.Pl(b)):c.a&&(0>b&&(b=0),b>c.a.duration&&(b=c.a.duration-.1),c.a.currentTime=b))};b.prototype.Xn=function(a,b){if(this.ub){var c=this.ga;c&&c.setVolume(a,b)}else try{var e=Number(b);1e&&(e=0);"_videopanorama"===a&&this.o.a&&(this.o.a.volume=e);if("_main"===a){this.V=e;for(c=0;cc&&(c=0);this.V=c;for(e=0;ec&&(c=0);g.level=c;g.a&&null!=g.a.volume&&(g.a.volume=c*this.V)}}}catch(k){this.O(k)}};b.prototype.$k=function(){try{for(var a=this,b=!1,c=!1,e=0;ef&&(f=this.hc);for(e=0;6>e;e++){c=this.eb.Za[e];a?(c.width=this.df,c.height=this.df):(c.J=document.createElement("canvas"),c.J.width=this.hc,c.J.height=this.hc,c.width=this.hc, c.height=this.hc,c.Ma=c.J.getContext("2d"));b="position:absolute;";b+="left: 0px;";b+="top: 0px;";b+="width: "+f+"px;";b+="height: "+f+"px;";a&&(b+="outline: 1px solid transparent;");b+=this.Ia+"transform-origin: 0% 0%;";b+="-webkit-user-select: none;";b+=this.Ia+"transform: ";var g;g="";var k=1;this.Me&&(k=100);g=4>e?g+("rotateY("+-90*e+"deg)"):g+("rotateX("+(4==e?-90:90)+"deg)");this.Me&&(g+=" scale("+k+")");g+=" translate3d("+-f/2+"px,"+-f/2+"px,"+-f*k/(2*this.Re)+"px)";b+=g+";";c.Pj=g;a||(c.J.setAttribute("style", b),this.A.insertBefore(c.J,this.A.firstChild))}if(!a){for(e=0;6>e;e++)c=this.eb.Za[e],""!=this.we[e]&&(c.qd=new Image,c.qd.crossOrigin=this.crossOrigin,c.qd.onload=this.rj(c),c.qd.setAttribute("src",this.Vb(this.we[e])),this.Gb.push(c.qd));for(e=0;6>e;e++)c=this.eb.Za[e],c.loaded=!1,c.g=new Image,c.g.crossOrigin=this.crossOrigin,c.g.onload=this.rj(c),c.g.setAttribute("src",this.Vb(this.wg[e])),this.Gb.push(c.g)}};b.prototype.dh=function(){var a;this.ua.aa.x=0;this.ua.aa.y=0;if(this.Cc){for(a=0;a< this.eb.Za.length;a++)this.eb.Za[a].J&&this.eb.Za[a].J.setAttribute&&(this.eb.Za[a].J.setAttribute("src",this.vj),this.A.removeChild(this.eb.Za[a].J));if(this.g.H){for(a=0;aa.Ig?a.wh:a.Ig};b.prototype.Fi=function(a,b){var c=(new DOMParser).parseFromString(a,"text/xml");this.Qh=a;this.Dk(c,b);this.ga&&(this.O("Apply to Flash player"),this.ga.readConfigString(this.Qh), this.ga.setLocked(!0),this.ga.setSlaveMode(!0))};b.prototype.Ck=function(a,b,c){try{var e;e=new XMLHttpRequest;e.open("GET",a,!1);e.send(null);if(e.responseXML){var f=a.lastIndexOf("/");0<=f&&(this.xd=a.substr(0,f+1));2<=arguments.length&&null!=b&&(this.xd=b);this.Fi(e.responseText,c)}else alert("Error loading panorama XML")}catch(g){alert("Error:"+g)}};b.prototype.wn=function(a,b,c,e){var f;f=new XMLHttpRequest;var g=this;f.onload=function(k){if(4<=f.readyState)if(f.responseXML){var h=a.lastIndexOf("/"); 0<=h&&(g.xd=a.substr(0,h+1));3<=arguments.length&&null!=c&&(g.xd=c);g.Fi(f.responseText,e);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+f.statusText)};f.onerror=function(){console.error("Error loading XML:"+f.statusText)};f.open("GET",a,!0);f.send(null)};b.prototype.Jh=function(a){var b="";"{"==a.charAt(0)&&(b=a.substr(1,a.length-2));a={oldNodeId:this.Tb,nodeId:b};this.el("beforechangenodeid",a);""!=this.Tb&&-1==this.bj.indexOf(this.Tb)&&this.bj.push(this.Tb); this.gk=this.Tb;this.Tb=b;this.O("change active node: "+b);this.Oa&&this.Oa.changeActiveNode&&this.Oa.changeActiveNode("{"+b+"}");this.el("changenodeid",a)};b.prototype.Hj=function(){return this.Tb};b.prototype.Jj=function(){if(0=this.Ka.length&&(a=0);return this.Ka[a]}return""};b.prototype.Fm=function(){if(0a&&(a=this.Ka.length-1);return this.Ka[a]}return""};b.prototype.tm=function(){return this.gk}; b.prototype.en=function(a){return-1!=this.bj.indexOf(a)};b.prototype.Dk=function(a,b){var c=a.firstChild;this.Te=[];this.Ka=[];if("tour"==c.nodeName){this.Bf=!0;var e="",f;(f=c.getAttributeNode("start"))&&(e=f.nodeValue.toString());this.hasOwnProperty("startNode")&&this.startNode&&(e=String(this.startNode),this.startNode="");for(var c=c.firstChild,g="",k="";c;){if("panorama"==c.nodeName){if(f=c.getAttributeNode("id"))g=f.nodeValue.toString(),""==e&&(e=g),""==k&&(k=g),this.Te[g]=c,this.Ka.push(g); for(f=c.firstChild;f;)"userdata"==f.nodeName&&(this.jg[g]=this.Ag(f)),f=f.nextSibling}c=c.nextSibling}this.Te.hasOwnProperty(e)||(this.Uc("Start node "+e+" not found!"),e=k);this.Ei(this.Te[e],b);this.Jh("{"+e+"}")}else this.Bf=!1,this.Ei(c,b),this.Jh(""),this.Ka.push("")};b.prototype.Ei=function(a,b){this.Ik();this.Ba&&this.Ba.yn();this.Oe(this.ob);this.dh();this.Ef=0;for(var c=a.firstChild,e,f,g=0;c;){if("view"==c.nodeName){if(e=c.getAttributeNode("fovmode"))this.f.mode=Number(e.nodeValue);e=c.getAttributeNode("pannorth"); this.pan.yi=1*(e?e.nodeValue:0);for(var k=c.firstChild;k;){"start"==k.nodeName&&(e=k.getAttributeNode("pan"),this.pan.c=Number(e?e.nodeValue:0),this.pan.Na=this.pan.c,e=k.getAttributeNode("tilt"),this.j.c=Number(e?e.nodeValue:0),this.j.Na=this.j.c,e=k.getAttributeNode("roll"),this.L.c=Number(e?e.nodeValue:0),this.L.Na=this.L.c,e=k.getAttributeNode("fov"),this.f.c=Number(e?e.nodeValue:70),this.f.Na=this.f.c,e=k.getAttributeNode("projection"),this.Yg=Number(e?e.nodeValue:4),this.Wc(this.Yg));"min"== k.nodeName&&(e=k.getAttributeNode("pan"),this.pan.min=1*(e?e.nodeValue:0),e=k.getAttributeNode("tilt"),this.j.min=1*(e?e.nodeValue:-90),e=k.getAttributeNode("fov"),this.f.min=1*(e?e.nodeValue:5),1E-20>this.f.min&&(this.f.min=1E-20),e=k.getAttributeNode("fovpixel"),this.f.Kf=1*(e?e.nodeValue:0));if("max"==k.nodeName){e=k.getAttributeNode("pan");this.pan.max=1*(e?e.nodeValue:0);e=k.getAttributeNode("tilt");this.j.max=1*(e?e.nodeValue:90);e=k.getAttributeNode("fov");this.f.max=1*(e?e.nodeValue:120); 180<=this.f.max&&(this.f.max=179.9);if(e=k.getAttributeNode("fovstereographic"))this.f.ti=1*e.nodeValue;if(e=k.getAttributeNode("fovfisheye"))this.f.si=1*e.nodeValue;if(e=k.getAttributeNode("scaletofit"))this.B.Ok=1==e.nodeValue}if("flyin"==k.nodeName){if(e=k.getAttributeNode("projection"))this.kc.Ab=Number(e.nodeValue);if(e=k.getAttributeNode("pan"))this.kc.pan=parseFloat(e.nodeValue);if(e=k.getAttributeNode("tilt"))this.kc.j=parseFloat(e.nodeValue);if(e=k.getAttributeNode("fov"))this.kc.f=parseFloat(e.nodeValue)}k= k.nextSibling}}if("autorotate"==c.nodeName){if(e=c.getAttributeNode("speed"))this.s.speed=1*e.nodeValue;if(e=c.getAttributeNode("delay"))this.s.timeout=1*e.nodeValue;if(e=c.getAttributeNode("returntohorizon"))this.s.nh=1*e.nodeValue;if(e=c.getAttributeNode("nodedelay"))this.s.Wg=1*e.nodeValue;if(e=c.getAttributeNode("noderandom"))this.s.xi=1==e.nodeValue;this.ze&&(this.s.enabled=!0,this.s.active=!1);if(e=c.getAttributeNode("startloaded"))this.s.cg=1==e.nodeValue,this.s.cg&&(this.s.active=!1);if(e= c.getAttributeNode("useanimation"))this.s.$i=1==e.nodeValue;if(e=c.getAttributeNode("syncanimationwithvideo"))this.s.Si=1==e.nodeValue}if("animation"==c.nodeName){if(e=c.getAttributeNode("syncanimationwithvideo"))this.s.Si=1==e.nodeValue;if(e=c.getAttributeNode("useinautorotation"))this.s.$i=1==e.nodeValue;this.Ha=[];for(k=c.firstChild;k;){if("clip"==k.nodeName){this.C=new m.pk;if(e=k.getAttributeNode("animtitle"))this.C.Po=e.nodeValue.toString();if(e=k.getAttributeNode("cliptitle"))this.C.Ra=e.nodeValue.toString(); if(e=k.getAttributeNode("nodeid"))this.C.Qo=e.nodeValue.toString();if(e=k.getAttributeNode("length"))this.C.length=Number(e.nodeValue);if(e=k.getAttributeNode("animtype"))this.C.Il=Number(e.nodeValue);if(e=k.getAttributeNode("nextcliptitle"))this.C.uk=e.nodeValue.toString();if(e=k.getAttributeNode("nextclipnodeid"))this.C.tk=e.nodeValue.toString();if(e=k.getAttributeNode("transitiontype"))this.C.uo=Number(e.nodeValue);var h=k.firstChild;for(this.C.ia=[];h;){if("keyframe"==h.nodeName){var y=new m.wc; if(e=h.getAttributeNode("time"))y.time=Number(e.nodeValue);if(e=h.getAttributeNode("value"))y.value=Number(e.nodeValue);if(e=h.getAttributeNode("transitiontime"))y.lb=Number(e.nodeValue);e=h.getAttributeNode("type");var n=0;e&&(y.type=Number(e.nodeValue),n=Number(e.nodeValue));if(e=h.getAttributeNode("property"))y.tb=Number(e.nodeValue);if(1==n||2==n){if(e=h.getAttributeNode("bezierintime"))y.Pd=Number(e.nodeValue);if(e=h.getAttributeNode("bezierinvalue"))y.Fc=Number(e.nodeValue);if(e=h.getAttributeNode("bezierouttime"))y.Qd= Number(e.nodeValue);if(e=h.getAttributeNode("bezieroutvalue"))y.Rd=Number(e.nodeValue)}this.C.ia.push(y)}h=h.nextSibling}this.yb==this.C.Ra&&(e=this.C.ia,this.Vf(e[0].value,e[1].value,e[2].value));this.Ha.push(this.C)}k=k.nextSibling}}"input"==c.nodeName&&(f||(f=c));if(f)for(k=0;6>k;k++)e=f.getAttributeNode("prev"+k+"url"),this.we[k]=e?String(e.nodeValue):"";"altinput"==c.nodeName&&(k=0,(e=c.getAttributeNode("screensize"))&&(k=1*e.nodeValue),0g&&(g=k,f=c));if("control"==c.nodeName&& this.ze){if(e=c.getAttributeNode("simulatemass"))this.ua.enabled=1==e.nodeValue;if(e=c.getAttributeNode("rubberband"))this.B.Mk=1==e.nodeValue;if(e=c.getAttributeNode("locked"))this.B.xb=1==e.nodeValue;e&&(this.B.Gf=1==e.nodeValue);if(e=c.getAttributeNode("lockedmouse"))this.B.xb=1==e.nodeValue;if(e=c.getAttributeNode("lockedkeyboard"))this.B.Gf=1==e.nodeValue;if(e=c.getAttributeNode("lockedkeyboardzoom"))this.B.pi=1==e.nodeValue;if(e=c.getAttributeNode("lockedwheel"))this.B.Tg=1==e.nodeValue;if(e= c.getAttributeNode("invertwheel"))this.B.Yj=1==e.nodeValue;if(e=c.getAttributeNode("speedwheel"))this.B.Wk=1*e.nodeValue;if(e=c.getAttributeNode("invertcontrol"))this.B.kd=1==e.nodeValue;if(e=c.getAttributeNode("sensitivity"))this.B.sensitivity=1*e.nodeValue,1>this.B.sensitivity&&(this.B.sensitivity=1);if(e=c.getAttributeNode("dblclickfullscreen"))this.B.Sh=1==e.nodeValue;if(e=c.getAttributeNode("contextfullscreen"))this.B.hf=1==e.nodeValue;if(e=c.getAttributeNode("contextprojections"))this.B.ug= 1==e.nodeValue;if(e=c.getAttributeNode("hideabout"))this.B.yf=1==e.nodeValue;for(k=c.firstChild;k;)"menulink"==k.nodeName&&(h={text:"",url:""},e=k.getAttributeNode("text"),h.text=e.nodeValue,e=k.getAttributeNode("url"),h.url=e.nodeValue,this.Jf.push(h)),k=k.nextSibling}if("transition"==c.nodeName){if(e=c.getAttributeNode("enabled"))this.N.enabled=1==e.nodeValue;if(e=c.getAttributeNode("blendtime"))this.N.jj=e.nodeValue;if(e=c.getAttributeNode("blendcolor"))this.N.qg=e.nodeValue.toString();if(e=c.getAttributeNode("type"))this.N.type= e.nodeValue.toString();if(e=c.getAttributeNode("softedge"))this.N.Xc=1*e.nodeValue;if(e=c.getAttributeNode("zoomin"))this.N.Ya=e.nodeValue;if(e=c.getAttributeNode("zoomout"))this.N.uc=e.nodeValue;if(e=c.getAttributeNode("zoomfov"))this.N.yh=e.nodeValue;if(e=c.getAttributeNode("zoomspeed"))this.N.Ze=e.nodeValue;if(e=c.getAttributeNode("zoomoutpause"))this.N.zh=1==e.nodeValue}if("soundstransition"==c.nodeName){if(e=c.getAttributeNode("enabled"))this.Ea.enabled=1==e.nodeValue;if(e=c.getAttributeNode("transitiontime"))this.Ea.lb= 1*e.nodeValue;if(e=c.getAttributeNode("crossfade"))this.Ea.qj=1==e.nodeValue}if("flyintransition"==c.nodeName){if(e=c.getAttributeNode("enabled"))this.pb.enabled=1==e.nodeValue&&this.ea;if(e=c.getAttributeNode("speed"))this.pb.speed=1*e.nodeValue}"userdata"==c.nodeName&&(this.userdata=this.Xe=this.Ag(c));if("hotspots"==c.nodeName)for(k=c.firstChild;k;){if("label"==k.nodeName&&this.ze){h=this.w.Ui;if(e=k.getAttributeNode("enabled"))h.enabled=1==e.nodeValue;if(e=k.getAttributeNode("width"))h.width= 1*e.nodeValue;if(e=k.getAttributeNode("height"))h.height=1*e.nodeValue;if(e=k.getAttributeNode("textcolor"))h.Vi=1*e.nodeValue;if(e=k.getAttributeNode("textalpha"))h.Ti=1*e.nodeValue;if(e=k.getAttributeNode("background"))h.background=1==e.nodeValue;if(e=k.getAttributeNode("backgroundalpha"))h.Nb=1*e.nodeValue;if(e=k.getAttributeNode("backgroundcolor"))h.Ob=1*e.nodeValue;if(e=k.getAttributeNode("border"))h.Hh=1*e.nodeValue;if(e=k.getAttributeNode("bordercolor"))h.Rb=1*e.nodeValue;if(e=k.getAttributeNode("borderalpha"))h.Qb= 1*e.nodeValue;if(e=k.getAttributeNode("borderradius"))h.Gh=1*e.nodeValue;if(e=k.getAttributeNode("wordwrap"))h.xh=1==e.nodeValue}if("polystyle"==k.nodeName&&this.ze){if(e=k.getAttributeNode("mode"))this.w.mode=1*e.nodeValue;if(e=k.getAttributeNode("bordercolor"))this.w.Rb=1*e.nodeValue;if(e=k.getAttributeNode("backgroundcolor"))this.w.Ob=1*e.nodeValue;if(e=k.getAttributeNode("borderalpha"))this.w.Qb=1*e.nodeValue;if(e=k.getAttributeNode("backgroundalpha"))this.w.Nb=1*e.nodeValue;if(e=k.getAttributeNode("handcursor"))this.w.Ce= 1==e.nodeValue}e=void 0;"hotspot"==k.nodeName&&(e=new m.Pg(this),e.type="point",e.Cb(k),this.P.push(e));"polyhotspot"==k.nodeName&&(e=new m.Pg(this),e.type="poly",e.Cb(k),this.P.push(e));k=k.nextSibling}if("sounds"==c.nodeName||"media"==c.nodeName)for(k=c.firstChild;k;)"sound"!=k.nodeName||this.vk||(e=new m.El(this),e.Cb(k),this.ub||e.addElement()),"video"==k.nodeName&&(e=new m.Nk(this),e.Cb(k),this.ub||e.addElement()),"image"==k.nodeName&&(e=new m.Cl(this),e.Cb(k),this.ub||e.addElement()),"lensflare"== k.nodeName&&this.Ba&&(e=new m.Dl(this),e.Cb(k),this.Ba.Ff.push(e)),k=k.nextSibling;c=c.nextSibling}b&&""!=b&&(c=b.toString().split("/"),4k;k++)(e=f.getAttributeNode("tile"+k+"url"))&&(this.wg[k]=String(e.nodeValue)),e=f.getAttributeNode("tile"+ k+"url1");for(k=0;6>k;k++)(e=f.getAttributeNode("prev"+k+"url"))&&(this.we[k]=String(e.nodeValue));if(e=f.getAttributeNode("tilesize"))this.hc=1*e.nodeValue;if(e=f.getAttributeNode("canvassize"))this.df=Number(e.nodeValue);if(e=f.getAttributeNode("tilescale"))this.Re=1*e.nodeValue;if(e=f.getAttributeNode("leveltileurl"))this.g.nk=e.nodeValue;if(e=f.getAttributeNode("leveltilesize"))this.g.F=Number(e.nodeValue);if(e=f.getAttributeNode("levelbias"))this.g.lk=Number(e.nodeValue);if(e=f.getAttributeNode("levelbiashidpi"))this.g.mk= Number(e.nodeValue);e=f.getAttributeNode("overlap");this.Ca.L=0;this.Ca.pitch=0;e&&(this.g.Ja=Number(e.nodeValue));if(e=f.getAttributeNode("levelingroll"))this.Ca.L=Number(e.nodeValue);if(e=f.getAttributeNode("levelingpitch"))this.Ca.pitch=Number(e.nodeValue);this.ib=0;(e=f.getAttributeNode("flat"))&&1==e.nodeValue&&(this.ib=2);e=f.getAttributeNode("width");this.g.width=1*(e?e.nodeValue:1);e=f.getAttributeNode("height");this.g.height=1*(e?e.nodeValue:this.g.width);this.o.src=[];this.g.H=[];for(k= f.firstChild;k;){if("preview"==k.nodeName){if(e=k.getAttributeNode("color"))this.g.Ke=e.nodeValue;if(e=k.getAttributeNode("strip"))this.g.Bk=1==e.nodeValue}if("video"==k.nodeName){if(e=k.getAttributeNode("format"))"3x2"==e.nodeValue&&(this.o.format=14),"equirectangular"==e.nodeValue&&(this.o.format=1);if(e=k.getAttributeNode("flipy"))this.o.ai=Number(e.nodeValue);if(e=k.getAttributeNode("startmuted"))this.o.Zk=1==e.nodeValue;if(e=k.getAttributeNode("bleed"))this.o.pe=Number(e.nodeValue);if(e=k.getAttributeNode("endaction"))this.o.Vd= String(e.nodeValue);if(e=k.getAttributeNode("width"))this.o.width=Number(e.nodeValue);if(e=k.getAttributeNode("height"))this.o.height=Number(e.nodeValue);for(f=k.firstChild;f;)"source"==f.nodeName&&(e=f.getAttributeNode("url"))&&this.o.src.push(e.nodeValue.toString()),f=f.nextSibling}if("level"==k.nodeName){f=new m.wk;e=k.getAttributeNode("width");f.width=1*(e?e.nodeValue:1);e=k.getAttributeNode("height");f.height=1*(e?e.nodeValue:f.width);if(e=k.getAttributeNode("preload"))f.cache=1==e.nodeValue; if(e=k.getAttributeNode("preview"))f.Je=1==e.nodeValue;f.K=Math.floor((f.width+this.g.F-1)/this.g.F);f.da=Math.floor((f.height+this.g.F-1)/this.g.F);this.g.H.push(f)}k=k.nextSibling}this.g.mi=this.g.H.length}this.hg&&(this.ea=this.Cc=!1,this.Sb||(this.O("dummy rendering"),this.Sb=document.createElement("canvas"),this.Sb.width=100,this.Sb.height=100,this.Sb.id="dummycanvas",this.A.appendChild(this.Sb)),this.$c());this.ea&&this.G&&(this.la.Wj(this.Re),this.la.Xj());this.Cc&&(0a;a++)for(c=a%3*l+r.o.pe,e=c+l-2*r.o.pe,f=4,3>a&&(f+=l),d=f+l-2*r.o.pe,b=0;4>b;b++){h.x=-1;h.y=-1;h.z=1;for(var n=0;na.time&&this.C.ia[b].timee;)e+=360;for(;360v)for(;p<=h&&t>v;)t=new m.jc,t.Fh(q,x,A,B,p),t=t.y,p++;else p=1;p>=.8*h&&(r=p=Math.round(.8*h));0==p&&(p=1);var z;4==a.$f?z=120: z=this.qf(a.$f);v=a.Qe;if(v>z)for(;u>p&&v>z;)t=new m.jc,t.Fh(q,x,A,B,u),v=t.y,u--}q=new m.wc;q.time=0;q.tb=0;q.value=a.Zf;q.type=1;q.Qd=h/3;q.Rd=a.xe?a.Zf:a.Zf+e/3;b.ia.push(q);q=new m.wc;q.time=0;q.tb=1;q.value=a.ag;q.type=1;q.Qd=h/3;q.Rd=a.xe?a.ag:a.ag+f/3;b.ia.push(q);q=new m.wc;q.time=0;q.tb=2;q.value=a.ud;q.type=1;q.Qd=h/3;q.Rd=a.xe?a.ud:a.ud+g/3;b.ia.push(q);q=new m.wc;q.time=0;q.tb=3;q.value=a.$f;q.type=0;q.lb=0;b.ia.push(q);c&&(q=new m.wc,q.time=p,q.tb=3,q.value=a.Yc,q.type=0,q.lb=u-p,b.ia.push(q)); q=new m.wc;q.time=h;q.tb=0;q.value=a.Jd;q.type=1;q.Pd=2*h/3;a.Td&&!a.Ud?q.Fc=a.Jd:q.Fc=a.Jd-e/3;a.Ud&&(q.Qd=h+y,q.Rd=q.value+y/h*e);b.ia.push(q);q=new m.wc;q.time=h;q.tb=1;q.value=a.Kd;q.type=1;q.Pd=2*h/3;a.Td&&!a.Ud?q.Fc=a.Kd:q.Fc=a.Kd-f/3;a.Ud&&(q.Qd=h+y,q.Rd=q.value+y/h*f);b.ia.push(q);q=new m.wc;q.time=r;q.tb=2;q.value=n;q.type=1;q.Pd=2*r/3;a.Td?q.Fc=n:q.Fc=n-g/3;b.ia.push(q);a.Ud&&(q=new m.wc,q.time=h+w,q.tb=0,q.value=a.Jd,q.type=1,q.Pd=h+w-y,q.Fc=a.Jd,b.ia.push(q),q=new m.wc,q.time=h+w,q.tb= 1,q.value=a.Kd,q.type=1,q.Pd=h+w-y,q.Fc=a.Kd,b.ia.push(q));this.Ha.push(b);return b};b.prototype.Go=function(){this.o.a&&this.o.a.play()};b.prototype.Ho=function(){this.o.a&&(this.o.a.pause(),this.o.a.currentTime=0)};b.prototype.Fo=function(){this.o.a&&this.o.a.pause()};b.prototype.Wn=function(a){this.o.a&&(0>a&&(a=0),a>this.o.a.duration&&(a=this.o.a.duration-.1),this.o.a.currentTime=a,this.update())};b.prototype.Km=function(){return this.o.a?this.o.a.currentTime:0};b.prototype.Jm=function(){if(this.o.a)return this.o.a}; b.prototype.Vn=function(a){if(this.o.a){var b=!this.o.a.paused&&!this.o.a.ended,c=this.o.a.currentTime;this.o.a.pause();isNaN(parseInt(a,10))?this.o.a.src=String(a):this.o.a.src=this.o.src[parseInt(a,10)];b&&(this.o.a.onloadedmetadata=function(){this.currentTime=c;this.play();this.onloadedmetadata=null});this.o.a.currentTime=c}};b.prototype.cm=function(){this.vk=!0};return b}();m.b=h})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=G;window.ggHasWebGL=N;window.pano2vrPlayer=ggP2VR.b; ggP2VR.b.prototype.readConfigString=ggP2VR.b.prototype.Fi;ggP2VR.b.prototype.readConfigUrl=ggP2VR.b.prototype.Ck;ggP2VR.b.prototype.readConfigUrlAsync=ggP2VR.b.prototype.wn;ggP2VR.b.prototype.readConfigXml=ggP2VR.b.prototype.Dk;ggP2VR.b.prototype.openUrl=ggP2VR.b.prototype.zi;ggP2VR.b.prototype.openNext=ggP2VR.b.prototype.de;ggP2VR.b.prototype.setMargins=ggP2VR.b.prototype.Kn;ggP2VR.b.prototype.addListener=ggP2VR.b.prototype.addListener;ggP2VR.b.prototype.removeEventListener=ggP2VR.b.prototype.removeEventListener; ggP2VR.b.prototype.detectBrowser=ggP2VR.b.prototype.uj;ggP2VR.b.prototype.initWebGL=ggP2VR.b.prototype.zc;ggP2VR.b.prototype.getPercentLoaded=ggP2VR.b.prototype.Bm;ggP2VR.b.prototype.setBasePath=ggP2VR.b.prototype.Dn;ggP2VR.b.prototype.getBasePath=ggP2VR.b.prototype.jm;ggP2VR.b.prototype.setViewerSize=ggP2VR.b.prototype.Rk;ggP2VR.b.prototype.getViewerSize=ggP2VR.b.prototype.Nm;ggP2VR.b.prototype.setSkinObject=ggP2VR.b.prototype.Un;ggP2VR.b.prototype.changeViewMode=ggP2VR.b.prototype.Ul; ggP2VR.b.prototype.getViewMode=ggP2VR.b.prototype.Lm;ggP2VR.b.prototype.changePolygonMode=ggP2VR.b.prototype.mj;ggP2VR.b.prototype.setPolygonMode=ggP2VR.b.prototype.mj;ggP2VR.b.prototype.getPolygonMode=ggP2VR.b.prototype.Dm;ggP2VR.b.prototype.showOnePolyHotspot=ggP2VR.b.prototype.Tk;ggP2VR.b.prototype.hideOnePolyHotspot=ggP2VR.b.prototype.Sj;ggP2VR.b.prototype.changePolyHotspotColor=ggP2VR.b.prototype.Sl;ggP2VR.b.prototype.toggleOnePolyHotspot=ggP2VR.b.prototype.po; ggP2VR.b.prototype.changeViewState=ggP2VR.b.prototype.Vl;ggP2VR.b.prototype.getViewState=ggP2VR.b.prototype.Mm;ggP2VR.b.prototype.setRenderFlags=ggP2VR.b.prototype.Mn;ggP2VR.b.prototype.getRenderFlags=ggP2VR.b.prototype.Gm;ggP2VR.b.prototype.setMaxTileCount=ggP2VR.b.prototype.Pk;ggP2VR.b.prototype.getVFov=ggP2VR.b.prototype.Jb;ggP2VR.b.prototype.setVFov=ggP2VR.b.prototype.Xf;ggP2VR.b.prototype.getHFov=ggP2VR.b.prototype.mm;ggP2VR.b.prototype.updatePanorama=ggP2VR.b.prototype.gg; ggP2VR.b.prototype.isTouching=ggP2VR.b.prototype.Tm;ggP2VR.b.prototype.getIsMobile=ggP2VR.b.prototype.qm;ggP2VR.b.prototype.setIsMobile=ggP2VR.b.prototype.In;ggP2VR.b.prototype.getIsAutorotating=ggP2VR.b.prototype.om;ggP2VR.b.prototype.getIsLoaded=ggP2VR.b.prototype.Eg;ggP2VR.b.prototype.getIsTileLoading=ggP2VR.b.prototype.rm;ggP2VR.b.prototype.getLastActivity=ggP2VR.b.prototype.sm;ggP2VR.b.prototype.getPan=ggP2VR.b.prototype.ci;ggP2VR.b.prototype.getPanNorth=ggP2VR.b.prototype.Fg; ggP2VR.b.prototype.getPanDest=ggP2VR.b.prototype.zm;ggP2VR.b.prototype.getPanN=ggP2VR.b.prototype.Am;ggP2VR.b.prototype.setPan=ggP2VR.b.prototype.gh;ggP2VR.b.prototype.setPanNorth=ggP2VR.b.prototype.Mi;ggP2VR.b.prototype.changePan=ggP2VR.b.prototype.rg;ggP2VR.b.prototype.changePanLog=ggP2VR.b.prototype.Rl;ggP2VR.b.prototype.getTilt=ggP2VR.b.prototype.ei;ggP2VR.b.prototype.getTiltDest=ggP2VR.b.prototype.Im;ggP2VR.b.prototype.setTilt=ggP2VR.b.prototype.hh;ggP2VR.b.prototype.changeTilt=ggP2VR.b.prototype.sg; ggP2VR.b.prototype.changeTiltLog=ggP2VR.b.prototype.Tl;ggP2VR.b.prototype.getFov=ggP2VR.b.prototype.pf;ggP2VR.b.prototype.getFovDest=ggP2VR.b.prototype.lm;ggP2VR.b.prototype.setFov=ggP2VR.b.prototype.Rf;ggP2VR.b.prototype.changeFov=ggP2VR.b.prototype.lj;ggP2VR.b.prototype.changeFovLog=ggP2VR.b.prototype.ef;ggP2VR.b.prototype.getRoll=ggP2VR.b.prototype.Hm;ggP2VR.b.prototype.setRoll=ggP2VR.b.prototype.Nn;ggP2VR.b.prototype.setPanTilt=ggP2VR.b.prototype.Ln;ggP2VR.b.prototype.setPanTiltFov=ggP2VR.b.prototype.Vf; ggP2VR.b.prototype.setDefaultView=ggP2VR.b.prototype.Fn;ggP2VR.b.prototype.setLocked=ggP2VR.b.prototype.Jn;ggP2VR.b.prototype.setLockedMouse=ggP2VR.b.prototype.Tf;ggP2VR.b.prototype.setLockedKeyboard=ggP2VR.b.prototype.Sf;ggP2VR.b.prototype.setLockedWheel=ggP2VR.b.prototype.Uf;ggP2VR.b.prototype.moveTo=ggP2VR.b.prototype.moveTo;ggP2VR.b.prototype.moveToEx=ggP2VR.b.prototype.Ug;ggP2VR.b.prototype.moveToDefaultView=ggP2VR.b.prototype.$m;ggP2VR.b.prototype.moveToDefaultViewEx=ggP2VR.b.prototype.an; ggP2VR.b.prototype.addHotspotElements=ggP2VR.b.prototype.ej;ggP2VR.b.prototype.playSound=ggP2VR.b.prototype.fe;ggP2VR.b.prototype.playPauseSound=ggP2VR.b.prototype.Ak;ggP2VR.b.prototype.playStopSound=ggP2VR.b.prototype.un;ggP2VR.b.prototype.pauseSound=ggP2VR.b.prototype.Bi;ggP2VR.b.prototype.activateSound=ggP2VR.b.prototype.Gl;ggP2VR.b.prototype.soundGetTime=ggP2VR.b.prototype.bo;ggP2VR.b.prototype.soundSetTime=ggP2VR.b.prototype.co;ggP2VR.b.prototype.isPlaying=ggP2VR.b.prototype.Tc; ggP2VR.b.prototype.stopSound=ggP2VR.b.prototype.al;ggP2VR.b.prototype.setVolume=ggP2VR.b.prototype.Xn;ggP2VR.b.prototype.changeVolume=ggP2VR.b.prototype.Wl;ggP2VR.b.prototype.removeHotspots=ggP2VR.b.prototype.Ik;ggP2VR.b.prototype.addHotspot=ggP2VR.b.prototype.Hl;ggP2VR.b.prototype.updateHotspot=ggP2VR.b.prototype.xo;ggP2VR.b.prototype.removeHotspot=ggP2VR.b.prototype.xn;ggP2VR.b.prototype.setActiveHotspot=ggP2VR.b.prototype.Oe;ggP2VR.b.prototype.getPointHotspotIds=ggP2VR.b.prototype.Cm; ggP2VR.b.prototype.getHotspot=ggP2VR.b.prototype.nm;ggP2VR.b.prototype.setFullscreen=ggP2VR.b.prototype.Pe;ggP2VR.b.prototype.toggleFullscreen=ggP2VR.b.prototype.ph;ggP2VR.b.prototype.enterFullscreen=ggP2VR.b.prototype.dm;ggP2VR.b.prototype.exitFullscreen=ggP2VR.b.prototype.exitFullscreen;ggP2VR.b.prototype.getIsFullscreen=ggP2VR.b.prototype.pm;ggP2VR.b.prototype.startAutorotate=ggP2VR.b.prototype.Xk;ggP2VR.b.prototype.stopAutorotate=ggP2VR.b.prototype.ko;ggP2VR.b.prototype.toggleAutorotate=ggP2VR.b.prototype.oo; ggP2VR.b.prototype.startAnimation=ggP2VR.b.prototype.ho;ggP2VR.b.prototype.createLayers=ggP2VR.b.prototype.pj;ggP2VR.b.prototype.removePanorama=ggP2VR.b.prototype.dh;ggP2VR.b.prototype.getScreenResolution=ggP2VR.b.prototype.Mj;ggP2VR.b.prototype.getMaxScreenResolution=ggP2VR.b.prototype.Ij;ggP2VR.b.prototype.getNodeIds=ggP2VR.b.prototype.wm;ggP2VR.b.prototype.getNodeUserdata=ggP2VR.b.prototype.bi;ggP2VR.b.prototype.getNodeLatLng=ggP2VR.b.prototype.xm;ggP2VR.b.prototype.getNodeTitle=ggP2VR.b.prototype.ym; ggP2VR.b.prototype.getCurrentNode=ggP2VR.b.prototype.Hj;ggP2VR.b.prototype.getNextNode=ggP2VR.b.prototype.Jj;ggP2VR.b.prototype.getPrevNode=ggP2VR.b.prototype.Fm;ggP2VR.b.prototype.getLastVisitedNode=ggP2VR.b.prototype.tm;ggP2VR.b.prototype.getCurrentPointHotspots=ggP2VR.b.prototype.km;ggP2VR.b.prototype.getPositionAngles=ggP2VR.b.prototype.Em;ggP2VR.b.prototype.getPositionRawAngles=ggP2VR.b.prototype.Kj;ggP2VR.b.prototype.nodeVisited=ggP2VR.b.prototype.en;ggP2VR.b.prototype.setElementIdPrefix=ggP2VR.b.prototype.Gn; ggP2VR.b.prototype.videoPanoPlay=ggP2VR.b.prototype.Go;ggP2VR.b.prototype.videoPanoStop=ggP2VR.b.prototype.Ho;ggP2VR.b.prototype.videoPanoPause=ggP2VR.b.prototype.Fo;ggP2VR.b.prototype.getVideoPanoTime=ggP2VR.b.prototype.Km;ggP2VR.b.prototype.setVideoPanoTime=ggP2VR.b.prototype.Wn;ggP2VR.b.prototype.getVideoPanoObject=ggP2VR.b.prototype.Jm;ggP2VR.b.prototype.setVideoPanoSource=ggP2VR.b.prototype.Vn;ggP2VR.b.prototype.getMediaObject=ggP2VR.b.prototype.um;ggP2VR.b.prototype.registerVideoElement=ggP2VR.b.prototype.Ek; ggP2VR.b.prototype.disableSoundLoading=ggP2VR.b.prototype.cm;ggP2VR.b.prototype.setCrossOrigin=ggP2VR.b.prototype.En;ggP2VR.b.prototype.setProjection=ggP2VR.b.prototype.Wc;ggP2VR.b.prototype.getProjection=ggP2VR.b.prototype.ya;ggP2VR.b.prototype.changeProjection=ggP2VR.b.prototype.Kh;ggP2VR.b.prototype.changeProjectionEx=ggP2VR.b.prototype.Kh;ggP2VR.b.prototype.changeLensflares=ggP2VR.b.prototype.Ql;