////////////////////////////////////////////////////////////////////// // Pano2VR 7.0 beta 4a/19550 HTML5/CSS3 & WebGL Panorama Player // // License: DEPARTAMENTO COMPRAS // // (c) 2022, Garden Gnome Software, https://ggnome.com // ////////////////////////////////////////////////////////////////////// var p="function"==typeof Object.defineProperties?Object.defineProperty:function(y,w,r){if(y==Array.prototype||y==Object.prototype)return y;y[w]=r.value;return y};function aa(y){y=["object"==typeof globalThis&&globalThis,y,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var w=0;wr&&(r=Math.max(0,c+r));if(null==f||f>c)f=c;f=Number(f);0>f&&(f=Math.max(0,c+f));for(r=Number(r||0);r=a}});function ja(y){var w=0;return function(){return w>>0)+"_",c=0;return w}); L("Symbol.iterator",function(y){if(y)return y;y=Symbol("Symbol.iterator");for(var w="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),r=0;rr&&(r=Math.max(r+c,0));rh;)h+=360;for(;180n&&(n=a.fov.m);this.ec||(this.ec=new y.Ra,this.ec.Fn(this.pan,this.u));0!=this.mode&&1!=this.mode||!b||this.mc&&this.mc.gain.setValueAtTime(this.level*a.ba*this.ua,b.currentTime);if(2==this.mode&&b){var q=.5*Math.cos(h*Math.PI/180)+.5;this.Zc=Math.sqrt(q)*this.ua*this.level*a.ba;this.bd=Math.sqrt(q)*this.ua*this.level*a.ba;this.$c=Math.sqrt(1-q)*this.ua*this.level*a.ba;this.ad= Math.sqrt(1-q)*this.ua*this.level*a.ba;this.ji()}if(3==this.mode){h=0>h?h<-this.Ab?h+this.Ab:0:h>this.Ab?h-this.Ab:0;var v=this.level;e=Math.abs(e);e=en||0>t)q=v*m*a.ba,b?(this.Zc=q*this.ua,this.bd=q*this.ua,this.ad=this.$c=0,this.ji()):this.j.volume=v*m*a.ba;else if(q=1-Math.abs(h/n),b){var x=v*(m+(1-m)*t*q)*a.ba;q=v*m*a.ba;0<=h?(this.Zc=x*this.ua,this.bd=q*this.ua):(this.Zc=q*this.ua,this.bd=x*this.ua);2*Math.abs(h)h?h>-this.Ab?0:h+this.Ab:h no audio buffer -> playWhenReady"),this.zt=!0)}; c.prototype.wk=function(){var a=this.o.xa.currentTime-this.pi;this.Of();this.sf=a};c.prototype.Of=function(){this.hc&&this.rg&&(this.stopped=!0,this.hc.disconnect(),this.hc.stop(0),this.hc=null);this.pi=this.sf=0;this.rg=!1};c.prototype.Nq=function(){var a=this.o.xa;return this.sf?this.sf:this.pi?a.currentTime-this.pi:0};c.prototype.Oq=function(a){this.Of();this.sf=a;this.ge()};c.prototype.addElement=function(){var a=-1,b=this,e=this.o,h=this.o.xa;try{for(var m=!1,n=0;na.loop&&(a.j.preload="none"));a.kd&&""!=a.kd&&(a.j.style.kd="url('"+b.ab(a.kd)+"')",a.j.style.webkitMaskImage="url('"+b.ab(a.kd)+"')",a.j.style.maskSize="100% 100%",a.j.style.webkitMaskSize="100% 100%");a.j.volume=a.level*b.ba;1<=a.loop&&(a.pb=a.loop-1);e&&(this.ce=!0);(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&0<=a.loop&&(a.j.autoplay=!0,a.isRunning=!0,a.autoplay=!0,this.o.Ed&&(a.j.muted=!0),a.zm());b.V.push(this);b.Ai?b.$.appendChild(a.j):(a.j.style.position="absolute",a.nc&&(a.j.width=a.nc), a.Oc&&(a.j.height=a.Oc),b.da.appendChild(a.j));a.j.addEventListener("ended",function(){a.Uu()},!1)}catch(n){b.N(n)}};c.prototype.Jd=function(){this.j.poster=this.o.ab(this.o.Xa(this.poster));f.prototype.Jd.call(this)};c.prototype.registerElement=function(a,b){this.ld=!0;this.j=b;this.id=a;this.level=1;this.o.V.push(this)};c.prototype.Be=function(){var a=this.o;a.Ai&&(a.S.deleteTexture(this.texture),this.texture=0);this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=null};return c}(r); y.Sm=r;r=function(f){function c(a){a=f.call(this,a)||this;a.url="";a.Ia=0;a.Ma=0;a.vb=0;a.fov=50;a.Ca=0;a.gg=!1;a.nc=100;a.Oc=100;a.Hc=1;return a}__extends(c,f);c.prototype.tb=function(a){f.prototype.tb.call(this,a);var b;if(b=a.getAttributeNode("url"))this.url=b.nodeValue.toString();if(b=a.getAttributeNode("maskimage"))this.kd=String(b.nodeValue);if(b=a.getAttributeNode("rotx"))this.Ia=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.Ma=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.vb= Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.nc=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.Oc=Number(b.nodeValue);this.Hc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.Ca=Number(b.nodeValue);if(b=a.getAttributeNode("hidepinned"))this.gf=1==Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.gg=1==Number(b.nodeValue);for(a=a.firstChild;a;)"source"== a.nodeName&&(b=a.getAttributeNode("url"))&&(this.url=b.nodeValue.toString()),a=a.nextSibling};c.prototype.qe=function(){this.ne=!1;this.j.style[this.o.Ub]="none";this.gf&&!this.La&&(this.j.style.visibility="hidden")};c.prototype.pe=function(){1!==this.Ca&&4!==this.Ca||this.df(!this.La)};c.prototype.df=function(a){var b=this.o;if(1===this.Ca||4===this.Ca)this.La=a,this.gf&&(this.j.style.visibility="visible",this.j.style.opacity=this.La?"0.0":"1.0"),this.La?(this.j.style.pointerEvents="auto",this.j.style.cursor= "pointer",this.j.style.zIndex=(b.Gf+8E4).toString(),this.j.style[b.Ub]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.pointerEvents="none",this.j.style.cursor="default",this.j.style.zIndex=b.Gf.toString(),this.j.style[b.Ub]="all 1s ease 0s",this.gf&&(this.j.style.opacity="0.0")),this.ne=!0,b.Bm()};c.prototype.addElement=function(){var a=this,b=this.o;try{a.j=document.createElement("img");a.j.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");a.j.setAttribute("class", "ggmedia");a.j.hidden=!0;a.j.addEventListener("click",function(e){e.stopPropagation()});b.se&&a.j.setAttribute("id",b.se+a.id);a.j.ondragstart=function(){return!1};if(1===a.Ca||4===a.Ca)a.j.addEventListener(b.Mm(),function(){a.qe()},!1),a.j.addEventListener("transitionend",function(){a.qe()},!1);a.j.setAttribute("src",b.ab(b.Xa(a.url)));a.nc&&(a.j.width=a.nc);a.Oc&&(a.j.height=a.Oc);b.mb.push(a);a.j.style.position="absolute";a.kd&&""!=a.kd&&(a.j.style.kd="url('"+b.ab(a.kd)+"')",a.j.style.webkitMaskImage= "url('"+b.ab(a.kd)+"')",a.j.style.maskSize="100% 100%",a.j.style.webkitMaskSize="100% 100%");b.da.appendChild(a.j)}catch(e){b.N("Error addimage:"+e)}};c.prototype.Jd=function(){this.j.setAttribute("src",this.o.ab(this.o.Xa(this.url)))};return c}(w);y.uq=r;r=function(f){function c(a){a=f.call(this,a)||this;a.code="";return a}__extends(c,f);c.prototype.tb=function(a){f.prototype.tb.call(this,a);var b;if(b=a.getAttributeNode("rotx"))this.Ia=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.Ma= Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.vb=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.nc=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.Oc=Number(b.nodeValue);this.Hc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.Ca=Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.gg=1==Number(b.nodeValue);if(b=a.getAttributeNode("code"))this.code= b.nodeValue.toString()};c.prototype.qe=function(){this.ne=!1;this.j.style[this.o.Ub]="none"};c.prototype.pe=function(){1!==this.Ca&&4!==this.Ca||this.df(!this.La)};c.prototype.df=function(a){var b=this.o;if(1===this.Ca||4===this.Ca)this.La=a,this.gf&&(this.j.style.visibility="visible",this.j.style.opacity=this.La?"0.0":"1.0"),this.La?(this.j.style.cursor="pointer",this.j.style.zIndex=(b.Gf+8E4).toString(),this.j.style[b.Ub]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.cursor="default", this.j.style.zIndex=b.Gf.toString(),this.j.style[b.Ub]="all 1s ease 0s"),this.ne=!0,b.Bm()};c.prototype.addElement=function(){var a=this,b=this.o;try{a.j=document.createElement("div");this.Zp();a.j.setAttribute("style","max-width:none;");a.j.setAttribute("class","ggmedia");b.se&&a.j.setAttribute("id",b.se+a.id);if(1===a.Ca||4===a.Ca)a.j.addEventListener(b.Mm(),function(){a.qe()},!1),a.j.addEventListener("transitionend",function(){a.qe()},!1);b.Nb.push(a);a.j.style.position="absolute";0==a.Ca?b.Ha.insertBefore(a.j, b.Ha.firstChild):b.da.appendChild(a.j)}catch(e){b.N("Error addwebelement:"+e)}};c.prototype.Zp=function(){var a=this.j.innerHTML,b=this.o.Xa(this.code);b!=a&&(this.j.innerHTML=b)};c.prototype.Jd=function(){this.Zp()};return c}(w);y.xq=r;w=function(f){function c(a){a=f.call(this,a)||this;a.bn=50;a.alpha=50;a.type=0;a.color=16777215;return a}__extends(c,f);c.prototype.tb=function(a){f.prototype.tb.call(this,a);var b;if(b=a.getAttributeNode("blinding"))this.bn=Number(b.nodeValue);if(b=a.getAttributeNode("alpha"))this.alpha= Number(b.nodeValue);if(b=a.getAttributeNode("type"))this.type=Number(b.nodeValue);if(b=a.getAttributeNode("color"))this.color=1*Number(b.nodeValue)};return c}(w);y.vq=w;w=function(){function f(c){this.o=c;this.type="empty";this.lm=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.kk=!1;this.j=null;this.Pl=this.Ol=this.Lb=this.ac=this.gb=this.Da=this.distance=this.u=this.pan=0;this.visible=!0;this.Rb=c.K.Rb;this.Pb=c.K.Pb;this.Qb=c.K.Qb;this.Ob=c.K.Ob;this.re=c.K.re; this.ed="";this.ud=this.Xe=0;this.Df=!1;this.Ri=0;this.vertices=[]}f.prototype.Xf=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.u;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=this.description;this.skinid=this.lm;this.obj=this.j;this.customimage=this.ed;this.customimagewidth=this.Xe;this.customimageheight=this.ud;this.use3D=this.Df;this.distance3D=this.Ri;this.j&&this.j.__div&&(this.div=this.j.__div)};f.prototype.Au=function(){var c= this.url;return"{"==c.charAt(0)?c.substr(1,c.length-2):!1};f.prototype.tb=function(c){var a;if(a=c.getAttributeNode("url"))this.url=a.nodeValue.toString();if(a=c.getAttributeNode("target"))this.target=a.nodeValue.toString();if(a=c.getAttributeNode("title"))this.title=a.nodeValue.toString();if(a=c.getAttributeNode("description"))this.description=a.nodeValue.toString();if(a=c.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=c.getAttributeNode("skinid"))this.lm=a.nodeValue.toString();if(a= c.getAttributeNode("width"))this.w=Number(a.nodeValue);if(a=c.getAttributeNode("height"))this.h=Number(a.nodeValue);if(a=c.getAttributeNode("wordwrap"))this.kk=1==Number(a.nodeValue);a=c.getAttributeNode("pan");this.pan=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("tilt");this.u=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("fov");this.fov=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("distance");this.distance=1*(a?Number(a.nodeValue):0);if(a=c.getAttributeNode("bordercolor"))this.Rb=1* Number(a.nodeValue);if(a=c.getAttributeNode("backgroundcolor"))this.Pb=1*Number(a.nodeValue);if(a=c.getAttributeNode("borderalpha"))this.Qb=1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundalpha"))this.Ob=1*Number(a.nodeValue);if(a=c.getAttributeNode("handcursor"))this.re=1==Number(a.nodeValue);if(a=c.getAttributeNode("customimage"))this.ed=this.o.Qn()+a.nodeValue;if(a=c.getAttributeNode("customimagewidth"))this.Xe=Number(a.nodeValue);if(a=c.getAttributeNode("customimageheight"))this.ud=Number(a.nodeValue); if(a=c.getAttributeNode("use3D"))this.Df=1==Number(a.nodeValue);if(a=c.getAttributeNode("distance3D"))this.Ri=Number(a.nodeValue);for(c=c.firstChild;c;){if("polystring"==c.nodeName){a=c.textContent.toString().split("|");for(var b=0;bc;c++)2>c%3&&(h[c]*=f);e.bufferData(e.ARRAY_BUFFER,new Float32Array(h),e.STATIC_DRAW);this.We=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.We);var m=[1,0,0,0,0,1,1,1];e.bufferData(e.ARRAY_BUFFER,new Float32Array(m),e.STATIC_DRAW);this.td=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, this.td);var n=[0,1,2,0,2,3];e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(n),e.STATIC_DRAW);h=[];n=[];m=[];var q=new y.Ra;for(f=0;6>f;f++){var v=f%3;var t=3>f?1:0;for(a=0;4>a;a++){q.x=-1;q.y=-1;q.z=1;for(c=0;cq.x?.33:0)+.33*v,(0>q.y?0:.5)+.5*t);if(4>f)for(c=0;ca;a++){var b=c.createTexture();this.Nd++;b.uf=null;b.nf=null;b.oo=!1;c.bindTexture(c.TEXTURE_2D,b);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);if(f.eh[a]){var e=new Image;e.crossOrigin=f.crossOrigin;e.src=f.ab(f.eh[a]);b.uf=e;e.addEventListener&&e.addEventListener("load", this.nl(b),!1);f.sd.push(e)}this.$a.push(b)}for(a=0;6>a;a++)f.dh[a]&&(e=new Image,e.crossOrigin=f.crossOrigin,e.src=f.ab(f.dh[a]),e.addEventListener?e.addEventListener("load",this.nl(this.$a[a]),!1):e.onload=this.nl(this.$a[a]),this.$a[a].nf=e,f.sd.push(e));for(a=0;af;f++)this.xg(f),c.bindBuffer(c.ARRAY_BUFFER,this.Kk),c.vertexAttribPointer(this.P.ia,3,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.We),c.vertexAttribPointer(this.P.Ja,2,c.FLOAT,!1,0,0),6<=this.$a.length&&this.$a[f].loaded&&(c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D, this.$a[f]),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.td),c.uniform1i(this.P.ug,0),c.uniformMatrix4fv(this.P.Uh,!1,this.za),c.uniformMatrix4fv(this.P.ye,!1,this.yb),c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0))}};r.prototype.ck=function(){var f=this.o,c=this.O;c.M.Fj&&6>16&255)/255,(c>>8&255)/255,(c>>0&255)/255,1))};r.prototype.xg=function(f,c){void 0===c&&(c=1);var a=this.o;y.ka.identity(this.za);y.ka.rotate(this.za,c*-a.X.m*Math.PI/180,[0, 0,1]);y.ka.rotate(this.za,c*-a.u.m*Math.PI/180,[1,0,0]);-1==c?y.ka.rotate(this.za,-a.pan.m*Math.PI/180,[0,1,0]):y.ka.rotate(this.za,(180-a.pan.m)*Math.PI/180,[0,1,0]);a.Ta&&(y.ka.rotate(this.za,-a.Ta.pitch*Math.PI/180,[1,0,0]),y.ka.rotate(this.za,a.Ta.X*Math.PI/180,[0,0,1]));4>f?y.ka.rotate(this.za,-Math.PI/2*f,[0,1,0]):y.ka.rotate(this.za,Math.PI/2*(5==f?1:-1),[1,0,0])};r.prototype.Bu=function(f){var c=this;return function(){c.Ok.push(f)}};r.prototype.dr=function(f){this.o.qb=!0;this.o.ih=!0;f.loaded= !0;f.Ul=0;f.Ae=0;var c=this.o.S;this.un();c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);if(null!=f.M&&f.M.complete){f.Ib=c.createTexture();this.o.Nd++;c.bindTexture(c.TEXTURE_2D,f.Ib);try{c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,f.M)}catch(a){c.texImage2D(c.TEXTURE_2D,0,c.RGBA,1,1,0,c.RGBA,c.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.o.N(a)}}this.o.update(2)};r.prototype.un=function(){this.o.O.ui&&this.o.O.ui--};r.prototype.er=function(){if(0h;h++){var m=new y.Tg;m.Dc=document.createElement("canvas");c.o.pa?(m.Dc.width=b.width+2*e,m.Dc.height=b.height+2*e):(m.Dc.width=a.W+2*e,m.Dc.height=a.W+2*e);m.rn=m.Dc.getContext("2d");m.Dc.style[c.o.wd+"Origin"]="0% 0%";m.Dc.style.overflow="hidden";m.Dc.style.position="absolute"; m.M=f;var n=b.width+2*e,q=b.height+2*e;m.rn&&m.rn.drawImage(f,0,h*q,n,q,0,0,n,q);if(c.o.pa&&c.o.S){var v=c.o.S;v.pixelStorei(v.UNPACK_FLIP_Y_WEBGL,1);m.Ib=v.createTexture();c.o.Nd++;v.bindTexture(v.TEXTURE_2D,m.Ib);try{v.texImage2D(v.TEXTURE_2D,0,v.RGBA,v.RGBA,v.UNSIGNED_BYTE,m.Dc)}catch(t){c.o.N(t)}v.bindTexture(v.TEXTURE_2D,null);v.pixelStorei(v.UNPACK_FLIP_Y_WEBGL,0)}c.o.Ig&&(m.Dc.fv=-1,c.o.da.insertBefore(m.Dc,c.o.da.firstChild));b.Ka[h]=m}b.loaded=!0;c.o.D.Yc&&("previewtrack"==c.o.D.delay||"videopano"== c.o.D.delay&&!c.o.B.j)&&c.o.Vj(null)}}catch(t){c.o.N(t)}c.o.update(2)}};r.prototype.Tp=function(f){var c=this;return function(){c.o.qb=!0;c.o.ih=!0;c.un();f.M=null}};r.prototype.Yu=function(){var f=this.o,c=this.O,a=c.M,b=a.levels;f.ke&&(f.Qc(0),f.dc());if(f.S){var e=f.S;e.useProgram(this.P);this.ck();e.clear(e.DEPTH_BUFFER_BIT);e.enable(e.DEPTH_TEST);y.ka.identity(this.yb);y.ka.perspective(f.Hb(),f.xb.width/f.xb.height,.1,100,this.yb);e.uniformMatrix4fv(this.P.ye,!1,this.yb);c.Nu();c.Lo();var h= c.Cn();var m=b.length-1;for(c.Zd=0;m>=h;){var n=b[m],q=1;m==b.length-1&&0==a.cb&&(q=a.W/(a.W-.5));for(var v=0;6>v;v++){var t=c.cube.Zf[v];var x=t.$h;if(t.Ic&&0G;G++)A[G]=0==G%3?q*E*(-2*A[G]/n.width+1):1==G%3?q*E*(-2*A[G]/n.height+1):E;e.bufferData(e.ARRAY_BUFFER,new Float32Array(A),e.STATIC_DRAW)}}else x=!1;D.visible=t.Ic}z.Io=x}}m--}for(v= 0;6>v;v++)if(t=c.cube.Zf[v],t.Ic)for(x=t.$h,this.xg(v),e.uniform1i(this.P.ug,0),e.uniformMatrix4fv(this.P.ye,!1,this.yb),e.uniformMatrix4fv(this.P.Uh,!1,this.za),e.enableVertexAttribArray(this.P.ia),e.enableVertexAttribArray(this.P.Ja),e.bindBuffer(e.ARRAY_BUFFER,this.We),e.vertexAttribPointer(this.P.Ja,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.td),e.useProgram(this.P),m=h;m<=b.length-1;){n=b[m];if(t.Ic&&0h?C.xf(-90*h):C.Ud(5==h?90:-90);n.Ta&&(C.yf(n.Ta.X),C.Ud(-n.Ta.pitch));C.xf(-n.pan.m);C.Ud(n.u.m);C.yf(n.X.m);for(h=0;h<=e;h++)for(var F=0;F<=e;F++){var E=2*(v+F*m)-1;var D=2*(a+h*t)-1;z.x=1*E;z.y=1*D;z.z=-1;z.normalize(); C.Xs(z);E=this.io(z,c,n.Z());0!=n.Gc()&&1>x&&(D=this.io(z,b,n.Gc()),E&&D?(c.x=c.x*x+b.x*(1-x),c.y=c.y*x+b.y*(1-x)):!E&&D&&(E=!0,c.x=b.x,c.y=b.y));E||(c.x=NaN);f.fj[f.ll++]=q.width/2+c.x*q.width/2;f.fj[f.ll++]=q.height/2-c.y*q.width/2}this.nu(f,e)};r.prototype.io=function(f,c,a){var b=!0;switch(a){case 0:case 4:a=1/(f.z*this.Tl);c.x=-f.x*a;c.y=f.y*a;0m;m++)isNaN(f.fj[2*a[0]])&&(b=!1);if(b){for(m=0;4>m;m++);b&&(this.kh?(f.jb[f.Na++]=a[0],f.jb[f.Na++]=a[1],f.jb[f.Na++]=a[1],f.jb[f.Na++]=a[3],f.jb[f.Na++]=a[3],f.jb[f.Na++]=a[2],f.jb[f.Na++]=a[2],f.jb[f.Na++]=a[0],f.jb[f.Na++]=a[3],f.jb[f.Na++]=a[0],f.jb[f.Na++]= a[1],f.jb[f.Na++]=a[2]):(f.jb[f.Na++]=a[0],f.jb[f.Na++]=a[3],f.jb[f.Na++]=a[2],f.jb[f.Na++]=a[0],f.jb[f.Na++]=a[1],f.jb[f.Na++]=a[3]))}}};r.prototype.Zu=function(){var f=this.o,c=this.O,a=c.M,b=a.levels;f.ke&&(f.Qc(0),f.dc());if(f.S){var e=f.S,h=this.jp;e.useProgram(h);this.Dm(h);e.enable(e.CULL_FACE);e.cullFace(e.FRONT);e.enable(e.STENCIL_TEST);e.stencilOp(e.KEEP,e.INCR,e.INCR);e.stencilFunc(e.EQUAL,0,255);e.enable(e.BLEND);e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.SRC_ALPHA,e.ONE); y.ka.identity(this.yb);y.ka.perspective(f.Hb(),f.xb.width/f.xb.height,.1,100,this.yb);e.uniformMatrix4fv(e.getUniformLocation(h,"uPMatrix"),!1,this.yb);c.Zd=0;c.Lo();var m=c.Cn(),n=0;var q=b.length-1;for(var v={},t=b[q];t.vf&&0C;C++)for(var F=0;F=m;){var A={};t=b[q];var G=null;0>x-q),C,0!=f.Gc());I.visible=0f.fov.m&&qc.pg){f.N("Exceeded painted tiles");this.Tj=!1;break}I.Ib&&(x=v=a.W,E==t.Y-1&&(v=t.width-a.W*E),F==t.sa-1&&(x=t.height-a.W*F),v=(v+2*a.cb)/a.W,x=(x+2*a.cb)/a.W,e.bindTexture(e.TEXTURE_2D,I.Ib),e.uniform2f(e.getUniformLocation(h,"uCanvasDimensions"),f.C.width,f.C.height),A=e.getUniformLocation(h,"srcScale"),e.uniform2f(A,.5*t.width/a.W/v,.5*t.height/a.W/x),A=e.getUniformLocation(h, "srcOffset"),e.uniform2f(A,(.5*t.width+a.cb-a.W*E)/a.W/v,-(.5*t.height+a.cb-a.W*F)/a.W/x+1),A=e.getUniformLocation(h,"zOffset"),e.uniform1f(A,(q+1)/(b.length+5)),v=e.getAttribLocation(h,"aVertexPosition"),e.disableVertexAttribArray(0),e.disableVertexAttribArray(1),e.disableVertexAttribArray(2),e.enableVertexAttribArray(v),e.activeTexture(e.TEXTURE0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindBuffer(e.ARRAY_BUFFER,this.xs),e.vertexAttribPointer(v,2,e.FLOAT,!1,0,0),e.bufferData(e.ARRAY_BUFFER,new Float32Array(I.fj),e.DYNAMIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.ws),e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(I.jb),e.DYNAMIC_DRAW),this.kh?0==q&&0==C&&e.drawElements(e.LINES,I.Na,e.UNSIGNED_SHORT,0):e.drawElements(e.TRIANGLES,I.Na,e.UNSIGNED_SHORT,0),n++)}q++}e.disable(e.CULL_FACE); e.cullFace(e.FRONT_AND_BACK);f.ih=!1;e.disable(e.STENCIL_TEST)}};r.prototype.dk=function(f,c){var a=this.o.S;y.ka.identity(this.za);this.xg(f,-1);a.uniformMatrix4fv(a.getUniformLocation(c,"matRotate"),!1,this.za)};r.prototype.qt=function(){var f=this.o;if(f.S){var c=f.S,a=this.kp;c.useProgram(a);this.dk(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),f.C.width,f.C.height);var b=c.getUniformLocation(a,"srcOffset");c.uniform2f(b,.5,.5);1==f.B.format&&(b=c.getUniformLocation(a,"srcScale"), f.Ad?(c.uniform2f(b,-.5/Math.PI,(f.B.flipY?-.5:.5)/Math.PI),b=c.getUniformLocation(a,"srcOffset"),f.Ag?c.uniform2f(b,.5,.75):c.uniform2f(b,.5,.25)):c.uniform2f(b,-.5/Math.PI,(f.B.flipY?-1:1)/Math.PI));14==f.B.format&&(b=c.getUniformLocation(a,"srcScale"),c.uniform2f(b,1-2*f.B.Ue/(f.B.width/3),1-2*f.B.Ue/(f.B.height/2)));this.Dm(a);b=c.getUniformLocation(a,"cubeTexture");c.uniform1i(b,0);b=c.getAttribLocation(a,"aVertexPosition");c.disableVertexAttribArray(0);c.disableVertexAttribArray(1);c.disableVertexAttribArray(2); c.enableVertexAttribArray(b);c.bindBuffer(c.ARRAY_BUFFER,this.Jj);c.vertexAttribPointer(b,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,f.B.texture);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.td);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT, 0)}};r.prototype.Dm=function(f){var c=this.o,a=c.S,b=this.o.C,e=1;switch(c.fov.mode){case 0:e=b.width/b.height;break;case 1:e=1;break;case 2:e=b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4*b.height/3m;m++)this.$a[m].nf.complete? this.Oi[m]||(h=!0):b=!1,this.$a[m].uf.complete||(e=!1);if(e||b)if(!e||b||!this.Pc||h){m=Math.round(f.Je/f.Eg);e=(f.Je-m)/2;f.N("paint cube single - isMain: "+b+" overlap: "+e);this.Sf=0;this.Pc||(this.Pc=c.createTexture());f.Nd++;c.bindTexture(c.TEXTURE_CUBE_MAP,this.Pc);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);h=document.createElement("canvas");h.width=m;h.height= m;var n=h.getContext("2d");for(m=0;6>m;m++){var q=a[m];this.$a[q].nf.complete?this.Oi[q]||(n.drawImage(this.$a[q].nf,-e,-e),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,h),this.Oi[q]=!0):(n.drawImage(this.$a[q].uf,-e,-e,f.Je,f.Je),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,h))}this.Fh=!b}};r.prototype.br=function(){var f=this.o,c=this.O.M,a=c.levels,b=f.S,e;var h=a.length-1;if(!(0>h)){a[h].vf&&h--;var m=512;f.Eh&&(m=256);!f.tg&&2<= f.devicePixelRatio&&(m=512);for((e=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&eh){m=a[h];f.N("paint cube level "+h);this.Sf=h;a=c.cb;h=0m.width&&(1500v;v++){for(var t=0;th;h++)for(var m=0;mc;c++)for(var a=0;af;f++)if(!this.$a[f].uf.complete)return!1;return!0};r.prototype.Vl=function(){for(var f= this.o,c=this.O,a=c.M.levels,b=f.S,e=Date.now(),h=a.length-1;0<=h;h--){var m=a[h];if(!m.cache)for(var n in m.Ka)if(m.Ka.hasOwnProperty(n)){var q=m.Ka[n];01.1*c.Sp)for(this.ie.sort(function(v,t){return t.Ih-v.Ih});this.ie.length>c.Sp;)q=this.ie.pop(),q.Ib&&(b.deleteTexture(q.Ib),f.Nd--,q.Ib=0),q.M=null,q.fg&&(b.deleteBuffer(q.fg), q.fg=0),n=q.level.Ka.indexOf(q),f.N("delete "+n+" "+(e-q.Ih)),delete q.level.Ka[n]};r.prototype.Ru=function(){var f=this.o;if(f.S){var c=this.o.S,a;for(a=0;ac;c++)this.xg(0),a.bindBuffer(a.ARRAY_BUFFER,f.B.gk),a.vertexAttribPointer(this.P.ia,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,f.B.ti),a.vertexAttribPointer(this.P.Ja,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,f.B.jj),a.uniform1i(this.P.ug, 0),a.uniformMatrix4fv(this.P.Uh,!1,this.za),a.uniformMatrix4fv(this.P.ye,!1,this.yb),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};r.prototype.Pu=function(){var f=this.o,c=f.S,a=f.B;if(0=a.K.mode&&(e=0);3==a.K.mode&&(e=a.K.Da);for(f=0;f>16&255)/255,(c>>8&255)/255,(c&255)/255);var v=b.getUniformLocation(this.Td,"uAlpha");b.uniform1f(v,h.Qb*n);b.vertexAttribPointer(this.Td.ia,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,q.length/3);c=h.Pb;b.uniform3f(m,(c>>16&255)/255,(c>>8&255)/255,(c&255)/ 255);b.uniform1f(v,h.Ob*n);b.enable(b.STENCIL_TEST);b.clearStencil(0);b.clear(b.STENCIL_BUFFER_BIT);b.colorMask(!1,!1,!1,!1);b.stencilFunc(b.ALWAYS,1,1);b.stencilOp(b.INCR,b.INCR,b.INCR);b.drawArrays(b.TRIANGLE_FAN,0,q.length/3);b.colorMask(!0,!0,!0,!0);b.stencilFunc(b.EQUAL,1,1);b.stencilOp(b.ZERO,b.ZERO,b.ZERO);b.drawArrays(b.TRIANGLE_FAN,0,q.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.P)}}}}};r.prototype.Ou=function(){var f=this.o,c=this.O,a= c.M;if(f.C.width!=f.da.offsetWidth||f.C.height!=f.da.offsetHeight)f.C.width=f.da.offsetWidth,f.C.height=f.da.offsetHeight;f.ke&&(f.Qc(0),f.dc());if(f.S){var b=f.S;this.ck();b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT|b.STENCIL_BUFFER_BIT);b.disable(b.DEPTH_TEST);b.disable(b.CULL_FACE);b.useProgram(this.nh);var e=b.getUniformLocation(this.nh,"uRect");b.uniform2f(b.getUniformLocation(this.nh,"uCanvasDimensions"),f.C.width,f.C.height);b.activeTexture(b.TEXTURE0);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, this.td);var h=b.getAttribLocation(this.nh,"aVertexPosition");b.disableVertexAttribArray(0);b.disableVertexAttribArray(1);b.disableVertexAttribArray(2);b.enableVertexAttribArray(h);b.bindBuffer(b.ARRAY_BUFFER,this.We);b.vertexAttribPointer(h,2,b.FLOAT,!1,0,0);c.Zd=0;var m=100/f.fov.m;var n=a.width/a.height;h=f.C.height*m*n;m*=f.C.height;n=(f.pan.m/100/n-.5)*h+f.C.width/2;for(var q=(f.u.m/100-.5)*m+f.C.height/2,v,t,x,z=0;a.levels.length>=z+2&&a.levels[z+1].width>h;)z++;var C;var F=[];for(C=a.levels.length- 1;C>=z;){var E=a.levels[C];if(E.cache){var D={Nc:0,xd:0};D.Cd=E.Y-1;D.Dd=E.sa-1}else{D={};v=-q/m*(E.height/a.W);t=(-n+f.C.width)/h*(E.width/a.W);var A=(-q+f.C.height)/m*(E.height/a.W);D.Nc=Math.min(Math.max(0,Math.floor(-n/h*(E.width/a.W))),E.Y-1);D.xd=Math.min(Math.max(0,Math.floor(v)),E.sa-1);D.Cd=Math.min(Math.max(0,Math.floor(t)),E.Y-1);D.Dd=Math.min(Math.max(0,Math.floor(A)),E.sa-1)}F[C]=D;var G=!0;for(t=D.xd;t<=D.Dd;t++)for(v=D.Nc;v<=D.Cd;v++)x=v+t*E.Y,A=E.Ka[x],A||(A=new y.Tg,E.Ka[x]=A),this.Si()? A.M||(this.uj(A,E,c.Dg(0,C,v,t)),f.qb=!0):c.Zd++,A.M&&A.M.complete||(G=!1),A.visible=!0;D.Io=G;C--}for(C=a.levels.length-1;C>=z;){E=a.levels[C];if(F[C]&&0<=F[C].Nc)for(D=F[C],t=D.xd;t<=D.Dd;t++)for(v=D.Nc;v<=D.Cd;v++)x=v+t*E.Y,(A=E.Ka[x])&&A.M&&A.M.complete&&(f=n+(-a.cb+a.W*v)*h/E.width,b.uniform4f(e,f,q+(-a.cb+a.W*t)*m/E.height,A.M.width*h/E.width,A.M.height*m/E.height),A&&A.Ib&&(b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.td),b.bindTexture(b.TEXTURE_2D,A.Ib),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER, b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0)));C--}this.Vl()}};r.prototype.wf=function(){var f=this.o.S;if(f&&this.$a)for(;0r;r++)this.Zf[r]=new w}}()})(ggP2VR||(ggP2VR={})); (function(y){y.rq=function(){return function(){this.levels=[];this.Fj="0x000000";this.ep=!1;this.Ko=this.Jo=.4;this.W=512;this.cb=1;this.Bl=0;this.Cl="";this.mp=this.height=this.width=0}}();y.Rm=function(){return function(){this.height=this.width=0;this.vf=this.cache=!1;this.sa=this.Y=0;this.loaded=!1;this.Ka=[]}}();y.Tg=function(){return function(){this.loaded=this.visible=!1;this.Ae=this.Ul=0;this.fj=[];this.ll=0;this.jb=[];this.pj=this.Ih=this.Na=0}}()})(ggP2VR||(ggP2VR={})); (function(y){var w=function(){function r(f,c){this.o=f;this.T=c;var a=this.__div=document.createElement("div");a.ggVisible=!0;var b=document.createElement("img");if(c.ed){var e=c.ed;b.setAttribute("style","position: absolute;width: "+c.Xe+"px; height: "+c.ud+"px;top: -"+c.ud/2+"px;left: -"+c.Xe/2+"px; "+f.hb+"user-select: none; max-width: none;")}else e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA5xJREFUeNqclmlIVFEUx997TjrplFQW2WKBBSYtRFlpWUILSSsRZRQIBdGHCFqIoKIvQRsUFRJC9LEgaSFbMMpcWi1pLzOLsjItKms0U5t5/c/wH7nc5o2jF374xrv87z33nHOPaRsRtbFgDpgJxoD+wATfwDNQDK6CyrCr5OcbhgiGIRsUAZt4QTWoIFXgp9JfAhY7rgdBl8NeBoLDYBloA+dBOagFTcDHcVEgDgwBGWA+OAcugvXgvb5wKMGJoAAMp9BpUA96EBf/Btsf8BI8AWfAErAcpHHDZeriliY2AVwDg8AucAQ0Ag+I4XhTm2Oxz8PT46KMbTx5EZjuJDgAnAVusJUm9DhYwalFcc59sIXXIaceFkowDySBPTRPL20xm+b7zYXa+N3CPrWJ6GuwGySA40HLBHc/GywFhbS5R1lEBrZy7FQwiSaX9pmnqeAYt+KUcew7BVZw/QKTq0ocpYPVvDOXItZCk2xgDIZqL8BR8Ab0VDbr4yZOgLeIwzQx6WiQxcCt1+6sld66L4yYtFSwF4yg2dU7/cEwGW9YVkAwmycp1dzdpvgm0DcCh4kHmxWzBls0uBX4qqmZJ4KzePm1IeJLgjmlC16aDKZpp5Q168B3o6wsSwTHgU+MIUs74RSj6y1d+212HKimJlUE+tFRfJpYtOKNXWmJTASqWf2Bu/R6+4TKHOrOzG4IhptjWgHbGkZvepQ6SQK7oRuCXzjX1DJavBEX1ygfT8FgBqpfm1zRDcEKbR2bsZlkJCdXieB1ZhZ5YtqVgXIPN+m9kbY6hpdb+d9fPncJRmZmqQheZkemJmgxyxykl3XWJEkcAl7N21s7PDcl5ZJ0PAa3wVwmWtVbZafPwQ7wLozYB7ATPNJO56d/LAikP9u+66KNJS1d4IOZp7wU0hfLukUyzgwm70T2N/DOxIy/eFdqawa5DL2NEGwP5k15Ja4woz9glvcomd9NzyvkFcQo5gomaLfm5c0svnKZ2k7q7+FauvR2MJKZR3+sY5WgtvkdG6JyELGhNHMTXyGfLviRJ5Tcd4Dlhle7086Sgp8CqVxDkn4OqHaqacr5ekjy3Q/W0FRNNGmoMtamdzdxsytZC0lqXKhEgWPVVgImg2NgFT1MHOoOk3yLEtgWN5TEOYvoIFI1rGM19//2wpAD7imF7lfwENwAxaASNCj90pcLLKdC2Iyw1M9gnEplMEp5kOU1f8WwKGJm8oUr9f8JMAAVMDM6HSDa9QAAAABJRU5ErkJggg%3D%3D", b.setAttribute("style","position: absolute;width: 28px; height: 28px;top: -14px;left: -14px; "+f.hb+"user-select: none; max-width: none;");b.setAttribute("src",e);b.ondragstart=function(){return!1};a.appendChild(b);e="position:absolute;"+(f.hb+"user-select: none;");e+=f.hb+"touch-callout: none;";e+=f.hb+"tap-highlight-color: rgba(0,0,0,0);";f.Sc&&!f.pa&&(e+=f.hb+"transform: translateZ(9999999px);");a.setAttribute("style",e);a.onclick=function(){f.De(c);f.Il(f.Xa(c.url),c.target);f.fa&&f.fa.hotspotProxyClick&& f.fa.hotspotProxyClick(c.id,c.url);f.H("hsproxyclick",{id:c.id,url:c.url})};a.ondblclick=function(){f.fa&&f.fa.hotspotProxyDoubleClick&&f.fa.hotspotProxyDoubleClick(c.id,c.url);f.H("hsproxydblclick",{id:c.id,url:c.url})};var h=f.K.Zj;if(h.enabled&&""!=c.title){var m=document.createElement("div");e="position:absolute;";e=c.ed?f.cl()?e+("top: -"+(c.ud/2+20)+"px;"):e+("top: "+c.ud/2+"px;"):f.cl()?e+"top:\t -50px;":e+"top:\t 20px;";e=h.kk?e+"white-space: pre-wrap;":e+"white-space: nowrap;";e+=f.hb+"transform-origin: 50% 50%;"; m.setAttribute("style",e+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;");m.style.color=this.o.na(h.$j,h.Yj);m.style.backgroundColor=h.background?this.o.na(h.Pb,h.Ob):"transparent";m.style.border="solid "+this.o.na(h.Rb,h.Qb)+" "+h.Hi+"px";m.style.borderRadius=h.vk+"px";m.style.textAlign="center";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"); f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Qa=f.createProgram();f.attachShader(this.Qa,c);f.attachShader(this.Qa,a);f.linkProgram(this.Qa);f.getProgramParameter(this.Qa,f.LINK_STATUS)||alert("Could not initialise shaders");this.Qa.ia=f.getAttribLocation(this.Qa,"aVertexPosition");f.enableVertexAttribArray(this.Qa.ia);this.Qa.Ja=f.getAttribLocation(this.Qa,"aTextureCoord");f.enableVertexAttribArray(this.Qa.Ja);a=f.createShader(f.FRAGMENT_SHADER); f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uPercent;\nuniform int uDirection;\nuniform vec2 uCanvasDimensions;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n float alpha = 0.0;\n if (uDirection == 1) {\n\t if (gl_FragCoord.x > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.x) / uSoftEdge);\n }\n }\n if (uDirection == 2) {\n\t if (gl_FragCoord.x < uCanvasDimensions.x - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.x - (uCanvasDimensions.x - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 3) {\n\t if (gl_FragCoord.y < uCanvasDimensions.y - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.y - (uCanvasDimensions.y - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 4) {\n\t if (gl_FragCoord.y > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.y) / uSoftEdge);\n }\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n"); f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Wa=f.createProgram();f.attachShader(this.Wa,c);f.attachShader(this.Wa,a);f.linkProgram(this.Wa);f.getProgramParameter(this.Wa,f.LINK_STATUS)||alert("Could not initialise shaders");this.Wa.ia=f.getAttribLocation(this.Wa,"aVertexPosition");f.enableVertexAttribArray(this.Wa.ia);this.Wa.Ja=f.getAttribLocation(this.Wa,"aTextureCoord");f.enableVertexAttribArray(this.Wa.Ja)};r.prototype.Qc=function(){var f= this.o.S;if(!f)return!1;if(this.Ac=f.createFramebuffer()){f.bindFramebuffer(f.FRAMEBUFFER,this.Ac);this.Ac.width=1024;this.Ac.height=1024;this.Cf=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.Cf);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,f.LINEAR);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,this.Ac.width,this.Ac.height,0,f.RGBA,f.UNSIGNED_BYTE,null);var c=f.createRenderbuffer();f.bindRenderbuffer(f.RENDERBUFFER,c);f.renderbufferStorage(f.RENDERBUFFER, f.DEPTH_COMPONENT16,this.Ac.width,this.Ac.height);f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,this.Cf,0);f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,c);f.bindTexture(f.TEXTURE_2D,null);f.bindRenderbuffer(f.RENDERBUFFER,null);f.bindFramebuffer(f.FRAMEBUFFER,null);this.sb=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.sb);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),f.STATIC_DRAW);this.sb.itemSize=3;this.sb.xe= 4;this.sg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.sg);f.bufferData(f.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),f.STATIC_DRAW);return!0}return!1};r.prototype.Kl=function(f){var c=this.o.S,a=this.o.xb;if(this.Fd){c.useProgram(this.Aa);c.bindBuffer(c.ARRAY_BUFFER,this.sb);c.vertexAttribPointer(this.Aa.ia,this.sb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.sg);c.vertexAttribPointer(this.Aa.Ja,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(this.Aa.ia);c.enableVertexAttribArray(this.Aa.Ja); c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.Cf);a=1+(this.Eb-1)*f;var b=c.getUniformLocation(this.Aa,"uAlpha");c.uniform1f(b,1);b=c.getUniformLocation(this.Aa,"uZoomIn");c.uniform1i(b,1);b=c.getUniformLocation(this.Aa,"uZoomCenter");var e=.5+(this.Pg-.5)*Math.sqrt(f),h=.5+(this.Qg-.5)*Math.sqrt(f);0>e-.5/a&&(e=.5/a);0>h-.5/a&&(h=.5/a);1e-.5/this.Eb&&(e=.5/this.Eb);0>h-.5/this.Eb&&(h=.5/this.Eb);1>16&255)/255,(this.Mf>>8&255)/255,(this.Mf&255)/255),b=c.getUniformLocation(this.fb,"uZoomIn"),c.uniform1i(b,1==this.ca||2==this.ca||6==this.ca||7==this.ca?1:0),b=c.getUniformLocation(this.fb,"uZoomCenter"),c.uniform2f(b,e,h),e=c.getUniformLocation(this.fb,"uZoomFactor"),c.uniform1f(e,this.Eb),c.uniform1i(c.getUniformLocation(this.fb,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){c.useProgram(this.Qa); c.bindBuffer(c.ARRAY_BUFFER,this.sb);c.vertexAttribPointer(this.Qa.ia,this.sb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.sg);c.vertexAttribPointer(this.Qa.Ja,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.Cf);if(1==this.ca||2==this.ca||6==this.ca||7==this.ca||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var m=b=.5;else b=this.Pg,m=this.Qg;var n=b*a.width,q=m*a.height;n=Math.max(n,a.width-n);q=Math.max(q,a.height-q);"irisround"==this.type|| "irisroundcenter"==this.type?c.uniform1f(c.getUniformLocation(this.Qa,"uRadius"),(Math.sqrt(n*n+q*q)+this.Xc)*f):(n>q?(q=a.height/a.width*n+this.Xc,n+=this.Xc):(n=a.width/a.height*q+this.Xc,q+=this.Xc),c.uniform2f(c.getUniformLocation(this.Qa,"uRectDim"),n*f,q*f));f=c.getUniformLocation(this.Qa,"uSoftEdge");c.uniform1f(f,this.Xc);c.uniform1i(c.getUniformLocation(this.Qa,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);c.uniform2f(c.getUniformLocation(this.Qa,"uIrisCenter"),b*a.width, m*a.height);b=c.getUniformLocation(this.Qa,"uZoomIn");c.uniform1i(b,1==this.ca||2==this.ca||6==this.ca||7==this.ca?1:0);b=c.getUniformLocation(this.Qa,"uZoomCenter");c.uniform2f(b,e,h);e=c.getUniformLocation(this.Qa,"uZoomFactor");c.uniform1f(e,this.Eb);c.uniform1i(c.getUniformLocation(this.Qa,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)c.useProgram(this.Wa),c.bindBuffer(c.ARRAY_BUFFER, this.sb),c.vertexAttribPointer(this.Wa.ia,this.sb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.sg),c.vertexAttribPointer(this.Wa.Ja,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.Cf),c.uniform1f(c.getUniformLocation(this.Wa,"uPercent"),3>this.Mk?f*(a.width+this.Xc):f*(a.height+this.Xc)),f=c.getUniformLocation(this.Wa,"uSoftEdge"),c.uniform1f(f,this.Xc),c.uniform1i(c.getUniformLocation(this.Wa,"uDirection"),this.Mk),c.uniform2f(c.getUniformLocation(this.Wa, "uCanvasDimensions"),a.width,a.height),b=c.getUniformLocation(this.Wa,"uZoomIn"),c.uniform1i(b,1==this.ca||2==this.ca||6==this.ca||7==this.ca?1:0),b=c.getUniformLocation(this.Wa,"uZoomCenter"),c.uniform2f(b,e,h),e=c.getUniformLocation(this.Wa,"uZoomFactor"),c.uniform1f(e,this.Eb),c.uniform1i(c.getUniformLocation(this.Wa,"uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.sb.xe);c.useProgram(this.o.ra.P);c.disable(c.BLEND);c.enable(c.DEPTH_TEST)}};return r}();y.pq=w})(ggP2VR||(ggP2VR={})); (function(y){var w=function(){function r(f){this.xi=[];this.o=f;this.enabled=!1;this.Db=2;this.qn=!1}r.prototype.An=function(f){if(2==f.mode||3==f.mode||5==f.mode){var c=this.o.xa.currentTime;if(f.Gb&&f.Gb.gain&&f.Yb&&f.Wb&&f.Xb){var a=f.Yb.gain.value,b=f.Wb.gain.value,e=f.Xb.gain.value;f.Gb.gain.linearRampToValueAtTime(f.Gb.gain.value,c);f.Gb.gain.linearRampToValueAtTime(0,c+this.Db);f.Yb.gain.linearRampToValueAtTime(a,c);f.Yb.gain.linearRampToValueAtTime(0,c+this.Db);f.Wb.gain.linearRampToValueAtTime(b, c);f.Wb.gain.linearRampToValueAtTime(0,c+this.Db);f.Xb.gain.linearRampToValueAtTime(e,c);f.Xb.gain.linearRampToValueAtTime(0,c+this.Db)}}else c=this.o.xa.currentTime,f.mc&&f.mc.gain&&(f.mc.gain.linearRampToValueAtTime(f.mc.gain.value,c),f.mc.gain.linearRampToValueAtTime(0,c+this.Db));f.Uk=!0;setTimeout(function(){f.Be()},1E3*this.Db+5)};r.prototype.xu=function(){for(var f=0;fa.ua&&(a.ua=f)}1==f&&clearInterval(this.tu)};return r}();y.qq=w})(ggP2VR||(ggP2VR={})); (function(y){var w=function(){function r(f){this.Mh=[];this.rd=null;this.wc=[];this.ic=[];this.xc=[];this.jm=!0;this.o=f;this.$q()}r.prototype.Bh=function(){var f=this.o.S,c=f.createShader(f.VERTEX_SHADER);f.shaderSource(c,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");f.compileShader(c);f.getShaderParameter(c,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(c)),c=null);var a=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCanvasDimensions;\nuniform vec2 uFlareCenterPosition;\nuniform float uBlindingValue;\nuniform float uAspectRatio;\nvoid main(void) {\n float canvasDiag = sqrt( (uCanvasDimensions.x * uCanvasDimensions.x) + (uCanvasDimensions.y * uCanvasDimensions.y) );\n vec2 diff = uFlareCenterPosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromFlarePoint = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = (distFromFlarePoint / canvasDiag) / 10.0;\n gl_FragColor = vec4(1.0, 1.0, 1.0, pow(((1.0 - factor) * 0.8) * uBlindingValue, 2.0));\n}\n"); f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Cc=f.createProgram();f.attachShader(this.Cc,c);f.attachShader(this.Cc,a);f.linkProgram(this.Cc);f.getProgramParameter(this.Cc,f.LINK_STATUS)||alert("Could not initialise shaders");this.Cc.ia=f.getAttribLocation(this.Cc,"aVertexPosition");f.enableVertexAttribArray(this.Cc.ia);a=f.createShader(f.VERTEX_SHADER);c=f.createShader(f.VERTEX_SHADER);f.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"); f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);f.shaderSource(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n"); f.compileShader(c);f.getShaderParameter(c,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(c)),a=null);var b=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(b,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCircleTexturePosition;\nuniform vec3 uCircleColor;\nuniform float uCircleRadius;\nuniform float uCircleAlpha;\nuniform float uCircleSoftness;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 diff = uCircleTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromCircleCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float softnessDistance = uCircleRadius * (1.0 - uCircleSoftness);\n if (distFromCircleCenter > uCircleRadius)\n {\n\t gl_FragColor = vec4(uCircleColor, 0.0);\n }\n else if (distFromCircleCenter <= (softnessDistance))\n {\n\t float factor = distFromCircleCenter / softnessDistance;\n\t gl_FragColor = vec4(uCircleColor, pow((1.0 - (0.2 * factor)) * uCircleAlpha, 1.8));\n }\n else\n {\n\t float factor = (distFromCircleCenter - softnessDistance) / (uCircleRadius - softnessDistance);\n\t gl_FragColor = vec4(uCircleColor, pow((0.8 - (0.8 * factor)) * uCircleAlpha, 1.8));\n }\n}\n"); f.compileShader(b);f.getShaderParameter(b,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(b)),b=null);this.Ba=f.createProgram();f.attachShader(this.Ba,a);f.attachShader(this.Ba,b);f.linkProgram(this.Ba);f.getProgramParameter(this.Ba,f.LINK_STATUS)||alert("Could not initialise shaders");this.Ba.ia=f.getAttribLocation(this.Ba,"aVertexPosition");f.enableVertexAttribArray(this.Ba.ia);a=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uRingTexturePosition;\nuniform float uRingRadius;\nuniform float uRingAlpha;\nuniform float uAspectRatio;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec2 diff = uRingTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromRingCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = distFromRingCenter / uRingRadius;\n if (distFromRingCenter > uRingRadius)\n {\n\t gl_FragColor = vec4(1.0, 1.0, 1.0, 0.0);\n }\n else\n {\n vec4 textureColor = texture2D(uSampler, vec2(factor / uAspectRatio, 0.5));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uRingAlpha);\n }\n}\n"); f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Bb=f.createProgram();f.attachShader(this.Bb,c);f.attachShader(this.Bb,a);f.linkProgram(this.Bb);f.getProgramParameter(this.Bb,f.LINK_STATUS)||alert("Could not initialise shaders");this.Bb.ia=f.getAttribLocation(this.Bb,"aVertexPosition")};r.prototype.Qc=function(){var f=this.o.S;this.Md=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.Md);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1, -1,0,1,1,0,-1,1,0]),f.STATIC_DRAW);this.Md.itemSize=3;this.Md.xe=4;this.cg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.cg);for(var c=[0,0,0],a=2*Math.PI/6,b=Math.PI/180*35,e=1,h=b;h<=b+2*Math.PI;h+=a)c.push(Math.sin(h)),c.push(-Math.cos(h)),c.push(0),e++;f.bufferData(f.ARRAY_BUFFER,new Float32Array(c),f.STATIC_DRAW);this.cg.itemSize=3;this.cg.xe=e;this.pp=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.pp);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D, f.TEXTURE_MAG_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,f.CLAMP_TO_EDGE);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,f.CLAMP_TO_EDGE);c=document.createElement("canvas");c.width=100;c.height=1;a=c.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.o.na(0,0));b.addColorStop(.88,this.o.na(0,0));b.addColorStop(.9,this.o.na(16654848,1));b.addColorStop(.92,this.o.na(16776448,1));b.addColorStop(.94,this.o.na(4849466,1));b.addColorStop(.96, this.o.na(131071,1));b.addColorStop(.98,this.o.na(8190,1));b.addColorStop(1,this.o.na(0,0));a.fillStyle=b;a.fillRect(0,0,100,1);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,c)};r.prototype.Ct=function(){for(;0a.z){h=-b/a.z;e=a.x*h;h*=a.y;var z=Math.max(n,q);Math.abs(e)q?n:q;z=x.bn/100*((E-F)/E);0>z&&(z=0);if(this.o.pa){f.useProgram(this.Cc);f.bindBuffer(f.ARRAY_BUFFER,this.o.D.sb);f.vertexAttribPointer(this.Cc.ia,this.o.D.sb.itemSize,f.FLOAT,!1,0,0);var D=f.getUniformLocation(this.Cc,"uCanvasDimensions");f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight);f.uniform2f(f.getUniformLocation(this.Cc, "uFlareCenterPosition"),f.drawingBufferWidth/n*e,q-f.drawingBufferHeight/q*h);f.uniform1f(f.getUniformLocation(this.Cc,"uBlindingValue"),z);D=f.getUniformLocation(this.Cc,"uAspectRatio");f.uniform1f(D,this.o.D.wi?f.drawingBufferWidth/f.drawingBufferHeight:f.drawingBufferWidth/f.drawingBufferHeight/(n/q));f.drawArrays(f.TRIANGLE_STRIP,0,this.o.D.sb.xe)}else D=this.aa.createRadialGradient(e,h,1,e,h,C),D.addColorStop(0,"rgba(255, 255, 255, "+z+")"),D.addColorStop(.5,"rgba(255, 255, 255, "+.8*z+")"), D.addColorStop(1,"rgba(255, 255, 255, "+.6*z+")"),this.aa.fillStyle=D,this.aa.fillRect(0,0,this.aa.width,this.aa.height);if(0!=Number(x.type)&&!this.o.D.wi){z=n/2-e;C=q/2-h;var A=1,G=Number(x.type)-1;F<.35*E&&(A=F/(.35*E),A*=A);F>.7*E&&(A=(E-F)/(.3*E));A*=x.alpha/100;if(0H&&(H=0);var I=J.color;if(8==G||9==G||10==G)I=x.color;if(this.o.pa)f.useProgram(this.Ba),f.bindBuffer(f.ARRAY_BUFFER,this.cg), f.vertexAttribPointer(this.Ba.ia,this.cg.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Ba,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),f.uniform2f(f.getUniformLocation(this.Ba,"uCirclePosition"),f.drawingBufferWidth/n*(e+z*J.A),f.drawingBufferWidth/n*(q-(h+C*J.A))),f.uniform2f(f.getUniformLocation(this.Ba,"uCircleTexturePosition"),f.drawingBufferWidth/n*(e+z*J.A),q-(h+C*J.A)),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleRadius"),E),f.uniform3f(f.getUniformLocation(this.Ba, "uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleSoftness"),.1),D=f.getUniformLocation(this.Ba,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.drawArrays(f.TRIANGLE_FAN,0,this.cg.xe);else{this.aa.save();this.aa.translate(e+z*J.A,h+C*J.A);D=this.aa.createRadialGradient(0,0,1,0,0,1.1*E);D.addColorStop(0,this.o.na(I,H));D.addColorStop(.65,this.o.na(I, .9*H));D.addColorStop(.8,this.o.na(I,.7*H));D.addColorStop(1,this.o.na(I,.2*H));this.aa.beginPath();I=2*Math.PI/6;J=Math.PI/180*35;var M=!0;for(H=J;H<=J+2*Math.PI;H+=I)M?(this.aa.moveTo(E*Math.sin(H),E*Math.cos(H)),M=!1):this.aa.lineTo(E*Math.sin(H),E*Math.cos(H));this.aa.closePath();this.aa.fillStyle=D;this.aa.fill();this.aa.restore()}}if(0H&&(H=0);I=J.color;if(8==G||9==G||10==G)I=x.color;this.o.pa?(f.useProgram(this.Ba), f.bindBuffer(f.ARRAY_BUFFER,this.Md),f.vertexAttribPointer(this.Ba.ia,this.Md.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Ba,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),D=f.getUniformLocation(this.Ba,"uCirclePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(e+z*J.A),f.drawingBufferWidth/n*(q-(h+C*J.A))),D=f.getUniformLocation(this.Ba,"uCircleTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(e+z*J.A),q-(h+C*J.A)),D=f.getUniformLocation(this.Ba,"uCircleRadius"), f.uniform1f(D,E),f.uniform3f(f.getUniformLocation(this.Ba,"uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleSoftness"),J.G),D=f.getUniformLocation(this.Ba,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.drawArrays(f.TRIANGLE_FAN,0,this.Md.xe)):(this.aa.save(),this.aa.translate(e+z*J.A,h+C*J.A),D=this.aa.createRadialGradient(0,0,1,0,0,E),D.addColorStop(0, this.o.na(I,H)),D.addColorStop(1-J.G,this.o.na(I,.8*H)),D.addColorStop(1,this.o.na(I,0)),this.aa.beginPath(),this.aa.arc(0,0,E,0,2*Math.PI,!1),this.aa.closePath(),this.aa.fillStyle=D,this.aa.fill(),this.aa.restore())}if(0H&&(H=0),this.o.pa?(f.useProgram(this.Bb),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,this.pp),f.bindBuffer(f.ARRAY_BUFFER,this.Md),f.vertexAttribPointer(this.Bb.ia,this.Md.itemSize, f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Bb,"uCanvasDimensions2"),f.uniform2f(D,n,q),D=f.getUniformLocation(this.Bb,"uCirclePosition"),f.uniform2f(D,e+z*x.A,q-(h+C*x.A)),D=f.getUniformLocation(this.Bb,"uRingTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(e+z*x.A),q-(h+C*x.A)),D=f.getUniformLocation(this.Bb,"uCircleRadius"),f.uniform1f(D,E),f.uniform2f(f.getUniformLocation(this.Bb,"uRingPosition"),e+z*x.A,q-(h+C*x.A)),f.uniform1f(f.getUniformLocation(this.Bb,"uRingRadius"),E),f.uniform1f(f.getUniformLocation(this.Bb, "uRingAlpha"),H),D=f.getUniformLocation(this.Bb,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.uniform1i(f.getUniformLocation(this.Bb,"uSampler"),0),f.drawArrays(f.TRIANGLE_FAN,0,this.Md.xe)):(this.aa.save(),this.aa.translate(e+z*x.A,h+C*x.A),D=this.aa.createRadialGradient(0,0,0,0,0,E),D.addColorStop(0,this.o.na(16777215,0)),D.addColorStop(.88,this.o.na(0,0)),D.addColorStop(.9,this.o.na(16654848,H)),D.addColorStop(.92,this.o.na(16776448,H)),D.addColorStop(.94,this.o.na(4849466, H)),D.addColorStop(.96,this.o.na(131071,H)),D.addColorStop(.98,this.o.na(8190,H)),D.addColorStop(1,this.o.na(0,0)),this.aa.beginPath(),this.aa.arc(0,0,E,0,2*Math.PI,!1),this.aa.closePath(),this.aa.fillStyle=D,this.aa.fill(),this.aa.restore())}this.o.pa&&(f.useProgram(this.o.ra.P),f.disable(f.BLEND),f.enable(f.DEPTH_TEST))}}}};return r}();y.oq=w})(ggP2VR||(ggP2VR={}));var THREE; (function(y){var w=function(){function r(f){this.rb=[];this.Cj=[];this.la={x:0,y:0};this.Wc={x:0,y:0};this.Sh=0;this.session=null;this.Wk=!1;this.Km=this.Jm=this.qf=0;this.rl=this.Lg=!1;this.km=0;this.yg=-5;this.ym=0;this.Ui=this.$f=this.wj=!1;this.o=null;this.Xl=!0;this.dg=1;this.hj=[];this.frustumCulled=!1;this.zh=0;this.Im=null;this.xk=this.hq=!1;this.te=[-1,-1,-1,-1];this.ue=[-1,-1,-1,-1];this.lf=[!1,!1,!1,!1];this.Fc=[];this.rj=[];this.kf=[];this.o=f;var c=this;setTimeout(function(){if(window.WebXRPolyfill&& window.Promise){var a={cardboardConfig:{BUFFER_SCALE:1}};try{new window.WebXRPolyfill(a),f.N("WebXR Polyfill loaded!")}catch(b){f.Uc(b)}}c.Fs()},0);THREE?this.an():console.log("Three.js not available!")}r.prototype.ar=function(){this.init();this.animate()};r.prototype.an=function(){this.um=new THREE.Matrix4;this.Uo=new THREE.Euler};r.prototype.init=function(){"xr"in navigator||console.log("no WebXR support");if(THREE)if(this.ub)console.log("already set up!");else{this.um||this.an();var f=this,c=this.jc= this.o.jc,a=this.Kt=new THREE.Scene,b=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,2E4);a.add(b);108>THREE.REVISION&&(this.frustumCulled=!0);b.position.z=-.01;b.position.y=0;b.position.x=0;this.ub=b=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!0});b.setClearColor(new THREE.Color(0),1);b.setPixelRatio(window.devicePixelRatio);b.setSize(window.innerWidth,window.innerHeight);b.outputEncoding=THREE.sRGBEncoding;b.shadowMap.enabled= !1;c.appendChild(b.domElement);"xr"in navigator&&(b.xr.enabled=!0,b.xr.setReferenceSpaceType("local"));var e=this.Hk=new THREE.Group;e.name="controllerGroup";c=this.Fk=b.xr.getController(0);c.addEventListener("selectstart",function(q){f.Wo(q)});c.addEventListener("selectend",function(q){f.Vo(q)});c.visible=!0;c.userData.Qf=0;e.add(c);var h=this.Gk=b.xr.getController(1);h.addEventListener("selectstart",function(q){f.Wo(q)});h.addEventListener("selectend",function(q){f.Vo(q)});h.visible=!0;h.userData.Qf= 1;e.add(h);e.visible=!1;a.add(e);e=this.Fe=new THREE.Group;e.name="skinGroup";e.translateZ(this.yg);e.visible=!1;a.add(e);e=this.xm=new THREE.Group;e.name="toggleSkinGroup";e.translateZ(this.yg+.1);a.add(e);var m=(new THREE.TextureLoader).load("webxr/vrSkinShow.svg"),n=(new THREE.TextureLoader).load("webxr/vrSkinHide.svg");e=new THREE.PlaneBufferGeometry(.3,.3);m=new THREE.MeshBasicMaterial({map:m});m.transparent=!0;n=new THREE.MeshBasicMaterial({map:n});n.transparent=!0;e=new THREE.Mesh(e,m);e.name= "SkinToggleButton";e.position.y=3.12;e.lv=!1;e.userData.Qs=m;e.userData.Ps=n;e.userData.onclick=function(){f.ii()};this.cc=e;this.xm.add(e);e=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);m=new THREE.LineBasicMaterial({color:14737632});e=new THREE.Line(e,m);e.name="line";e.scale.z=5;c.add(e.clone());h.add(e.clone());this.fi=new THREE.Raycaster;this.la=new THREE.Vector2;this.rf=new THREE.Group;this.rf.name="panoGroup";this.hf=new THREE.Group;this.hf.name= "imageGroup";this.zd=new THREE.Group;this.zd.name="hotspotGroup";this.Ti=new THREE.Group;this.Ti.name="elementGroup";this.Ii=new THREE.Group;this.Ii.name="centerGroup";this.rf.add(this.zd);this.rf.add(this.Ti);this.rf.add(this.hf);a.add(this.rf);a.add(this.Ii);c=document.createElement("canvas");c.width=64;c.height=64;h=c.getContext("2d");h.fillStyle="black";h.lineWidth=3;h.beginPath();h.arc(32,32,10,0,2*Math.PI);h.stroke();c=new THREE.Texture(c);c.encoding=THREE.sRGBEncoding;e=new THREE.PlaneBufferGeometry(2, 2,8);h=new THREE.MeshBasicMaterial({map:c});h.transparent=!0;h=new THREE.Mesh(e,h);h.position.z=-50;this.Ii.add(h);c.needsUpdate=!0;window.addEventListener("resize",function(){f.kt()},!1);document.addEventListener("mouseup",function(){f.gt()},!1);document.addEventListener("mousedown",function(q){f.et(q)},!1);document.addEventListener("mousemove",function(q){f.ft(q)},!1);S&&"undefined"!==typeof __THREE_DEVTOOLS__&&(__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:a})),__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", {detail:b})))}else console.log("Three.js not available!")};r.prototype.Hp=function(){var f=this.o;f.N("VR not found");f.H("vrchanged",{});f.H("playerstatechanged",{})};r.prototype.pu=function(){this.rl=!0;var f=this.o;f.N("XR found");f.H("vrchanged",{});f.H("playerstatechanged",{})};r.prototype.Fs=function(){if(!this.hq){this.hq=!0;var f=this;if("xr"in navigator)navigator.xr.isSessionSupported("immersive-vr").then(function(c){c?f.pu():f.Hp()})["catch"](f.Hp)}};r.prototype.hl=function(){return this.Fe}; r.prototype.kg=function(){return null!=this.session?this.ub.xr.isPresenting:this.o.ae?!0:!1};r.prototype.ff=function(){return this.rl&&THREE};r.prototype.it=function(f){var c=this;this.Di();f.addEventListener("end",function(){c.ht()});console.log("XR Session started.");this.ub.xr.setSession(f);this.Wk=!0;this.session=f;c.o.H("entervr",{session:f})};r.prototype.ht=function(){console.log("XR Session ended.");this.Wk=!1;this.session=null;this.Ek()};r.prototype.Vf=function(){var f=this.o;if(this.rl){if(null=== this.session){var c=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor"]}).then(function(b){c.it(b)})["catch"](function(b){console.log(b);console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!");c.Ek()})}this.zd&&this.zd.translateY(-this.zh);this.zh=0;if(1==this.dg){var a=navigator.userAgent;0<=a.indexOf("OculusBrowser")&&(0<=a.indexOf("Pacific")&&(this.dg=1.7),0<=a.indexOf("Quest")&&(this.dg=1.5))}this.ub.xr.setFramebufferScaleFactor(this.dg); f.Uc("Enter VR - scaled "+this.dg)}else this.Di(),this.o.H("entervr",{session:null})};r.prototype.lt=function(){if(THREE&&this.ub){var f=this.o;f.ae=!0;f.$.style.display="none";f.Ya.style.display="none";this.ub.domElement.style.display="inline";f.H("vrchanged",{});f.H("playerstatechanged",{})}};r.prototype.Ek=function(){if(THREE&&this.ub){var f=this.o;f.ae=!1;f.$.style.display="inline";f.Ya.style.display="inline";this.ub.domElement.style.display="none";f.wg(0);f.dc();f.update();f.H("vrchanged",{}); f.H("playerstatechanged",{});this.o.H("exitvr",{session:null});this.Ck()}};r.prototype.Wf=function(){null!=this.session&&this.session.end()};r.prototype.Up=function(){this.kg()?this.Wf():this.Vf()};r.prototype.kr=function(){var f=0,c=this.o,a=c.O.M;var b=1536;this.ub&&c.N("Canvas: "+b);b*=Math.pow(2,0);if(0=f+2&&!a.levels[f+1].vf&&a.levels[f+1].width>b;)f++;c.N("Level "+f+" - width: "+a.levels[f].width);c.N(a.levels)}return f};r.prototype.ho=function(f){var c= this.o,a=c.O.M,b=c.Le[f];f="";if(b){b=b.firstChild;for(var e;b;)"input"==b.nodeName&&(e=b)&&(e=0b;b++)a=f(a,"c","vr"),a=f(a,"s","vr"),a=f(a,"r",0),a=f(a,"l",0),a=f(a,"x",0),a=f(a,"y",0),a=f(a,"v",0),a=f(a,"h",0);return c.ab(a)};r.prototype.ceilPowerOfTwo=function(f){return Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))};r.prototype.loadTexture= function(f,c,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.o.crossOrigin);var e=this;b.load(c,function(h){var m=e.ceilPowerOfTwo(h.width),n=e.ceilPowerOfTwo(h.height);f.encoding=THREE.sRGBEncoding;if(m==h.width&&n==h.height||!a)f.image=h;else{e.o.N("resizing "+h.width+"/"+h.height+" -> "+m+"/"+n);var q=document.createElement("canvas");q.width=m;q.height=n;q.getContext("2d").drawImage(h,0,0,m,n);f.image=q}f.needsUpdate=!0;f.no=!0;f.oe&&f.oe.no&&(f.wh.visible=!0,f.oe.wh.visible=!0)});this.hj.push(f)}; r.prototype.Di=function(){if(THREE){var f=this.o;if(this.xk)f.N("vr panorama aleady added!");else{var c=this.hf,a=this;f.N("add vr panorama");this.wf();this.camera.layers.enable(1);c.setRotationFromEuler(this.Uo);c.rotateX(f.Ta.pitch*Math.PI/180);c.rotateZ(-f.Ta.X*Math.PI/180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),e=new THREE.Texture,h=new THREE.ImageLoader;h.setCrossOrigin(this.o.crossOrigin);h.load(this.ho(f.Yi()),function(m){e.encoding=THREE.sRGBEncoding;e.image=m;e.needsUpdate= !0});h=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide});b=new THREE.Mesh(b,h);b.scale.x=-1;b.rotateZ(f.Ta.X*Math.PI/180);b.rotateX(-f.Ta.pitch*Math.PI/180);b.rotateY(-90*Math.PI/180);c.add(b);a.Gj=b;a.xk=!0;setTimeout(function(){f.N("Adding Main Pano");a.xk=!1;a.Dq();f.B.j?a.Gq():a.Eq();a.Bq()});this.Et();this.Xl=!0}}};r.prototype.Gq=function(){var f=this.o,c=this.hf,a=2E4/3;if(f.Ad){var b=new THREE.VideoTexture(f.B.j);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping; b.minFilter=THREE.LinearFilter;b.encoding=THREE.sRGBEncoding;var e=new THREE.SphereBufferGeometry(a,60,40);e.scale(-1,1,1);for(var h=e.attributes.uv.array,m=1;m b)for(var n=c.levels[b],q=0;6>q;q++){a[q]=new THREE.Group;for(var v=0;vq?a[q].rotation.y=-q*Math.PI/2:a[q].rotation.x=(4==q?1:-1)*Math.PI/2;e.add(a[q])}else for(c=f.Eg,q=0;6> q;q++)for(a[q]=new THREE.Group,x=0;xq?a[q].rotation.y=-q*Math.PI/2:a[q].rotation.x=(4==q?1:-1)*Math.PI/2,e.add(a[q])};r.prototype.Dq=function(){var f=this.o,c=this.zd;new y.Ra(0,0,-100);for(var a=f.K.Zj,b=0;b=e.distance?5:1>e.distance?1:5>e.distance?e.distance:5;if(e.ed){m=.005;var v=(new THREE.TextureLoader).load(e.ed); v.encoding=THREE.sRGBEncoding;var t=new THREE.MeshBasicMaterial({map:v});if(e.Df){h=2*n*Math.tan(e.fov/2*Math.PI/180);var x=new THREE.PlaneBufferGeometry(h,h*e.ud/e.Xe,1,1);t.transparent=!0;t.opacity=1}else x=new THREE.PlaneBufferGeometry(m*e.Xe,m*e.ud,1,1),t.transparent=!0,t.opacity=.25;q=m*e.ud/2;t.side=THREE.DoubleSide}else x=new THREE.SphereBufferGeometry(.2,16,16),v=(new THREE.TextureLoader).load(this.ho(m)),v.encoding=THREE.sRGBEncoding,t=new THREE.MeshBasicMaterial({map:v}),t.transparent=!0, t.opacity=.25;h=new THREE.Mesh(x,t);m=e.title;if(a.enabled&&""!=m){x=document.createElement("canvas");x.width=256;x.height=32;v=x.getContext("2d");this.vi||(this.vi=document.createElement("canvas"),this.vi.width=x.width,this.vi.height=x.height);var z=this.vi.getContext("2d");z.clearRect(0,0,x.width,x.height);z.font="16px Helvetica";z.textAlign="center";z.textBaseline="top";t=z.measureText(m);var C=t.width;0f.userData.mi+1E3&&(f.userData.onclick?(f.userData.onclick(),f.userData.mi=-1):f.userData.T&&f.userData.T.url&&this.o.md(f.userData.T.url,f.userData.T.target)):f.userData.mi=Date.now();while(!f.userData.stopPropagation&&(f=f.parent))};r.prototype.et=function(f){50>f.clientX&&50>f.clientY&&this.o.Wf();if(0f.position.z&&(f=this.rb[c]);c=f.userData;c.T?(f=c.T,this.o.md(f.url, f.target)):(this.fe(f,"onclick"),this.fe(f,"onmousedown"))}else this.Wc.x=this.la.x,this.Wc.y=this.la.y};r.prototype.animate=function(){var f=this.Mo=this;this.ub&&this.ub.setAnimationLoop(function(){f.render()})};r.prototype.render=function(){if(THREE){var f=null;try{f=this.ub.xr.getCamera(this.camera)}catch(t){}this.Im=f;0==this.zh&&f&&(this.zh=f.position.y,this.zd.translateY(this.zh));var c=this.Mo,a=c.o;if(a.ae){c.Lg=c.Fk.visible||c.Gk.visible?!1:!0;var b=this.ys();this.zs();this.Gj&&0h&&(this.hi(20),this.te[e]=m,this.ue[e]=n),.3h&&(this.ii(!0),this.ue[e]=n,this.te[e]=m),.5m?(b=!0,-1!=this.kf[e]&&(this.kf[e]=-1,this.rj[e]=Date.now()-1E4)):this.kf[e]=0,0!=this.kf[e]&&400< Date.now()-this.rj[e]&&(this.rj[e]=Date.now(),this.hi(20*this.kf[e])),h.buttons[1].pressed?this.lf[e]||(this.lf[e]=!0,this.ii()):this.lf[e]=!1)}c.Hk.visible==(!this.Fc||0==this.Fc.length)&&(c.Hk.visible=!c.Hk.visible);return b};r.prototype.ap=function(f){for(f=f.parent;f;){if(f.selected)return!0;f=f.parent}return!1};r.prototype.zs=function(){var f=this.Mo;f.Cj=f.rb.slice();f.Ck();f.Fk.visible&&f.intersectObjects(f.Fk);f.Gk.visible&&f.intersectObjects(f.Gk);f.Wk||f.Gs();f.Lg&&f.Hs();for(var c=0;c< f.rb.length;c++){var a=f.rb[c];f.Lg&&this.cn(a,!1);-1!=f.Cj.indexOf(a)||this.ap(a)||(this.fe(a,"onmouseover"),this.Fc&&0c;)c+=360;for(;180c;)c+=360;for(;180c&&(this.fov.mode=Number(c),this.Ve(),this.update())};f.prototype.oj=function(){return 2== this.o.zb};f.prototype.zk=function(c,a){this.wb(this.yd()+c);a&&(this.fov.d=c)};f.prototype.Ji=function(c,a){if(!isNaN(c)){var b=c/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);b=this.fov.m*Math.exp(b);this.wb(b);a&&(this.fov.d=c)}};f.prototype.hm=function(c,a){this.ma();isNaN(c)||(this.pan.m=c);isNaN(a)||(this.u.m=a);this.update()};f.prototype.Cp=function(c,a,b){this.ma();!isNaN(c)&&1E7>c&&-1E7a&&-1E7b&&-1E7c.width?1:3*c.width/(4*c.height)}return a};f.prototype.ki=function(c){this.wb(this.dn(c))};f.prototype.dm=function(c){var a=this.Z(),b=1/this.aspect();this.ki(this.Rf(a,b,c))};f.prototype.am=function(c){var a=this.Z(),b=this.aspect();b=1/Math.sqrt(1+b*b);this.ki(this.Rf(a,b,c))};f.prototype.Ve=function(){if(!this.o.ae){var c=this.Ml;c.pan=this.pan.m;c.u=this.u.m;c.fov=this.fov.m;this.Pf(c);this.Pf(c);this.Pf(c);this.pan.m=c.pan;this.u.m= c.u;this.fov.m!=c.fov&&(this.fov.m=c.fov)}};f.prototype.Pf=function(c){var a=this.aspect();var b=this.o.C;var e=this.o,h=e.v;if(this.oj()){if(0a&&(c.fov=a);50c.u-m&&(c.u=-50+m)); b>n?c.pan=0:(c.pan+b>n&&(c.pan=n-b,e.v.active&&(e.v.speed=-e.v.speed,this.pan.d=0)),c.pan-b<-n&&(c.pan=-n+b,h.active&&(h.speed=-h.speed,this.pan.d=0)))}else{0n&&(c.fov=n);12==this.Z()&&(2*b>q&&(c.fov=q/a),m=this.Hb()/2,2*m>q&&(c.fov=q),m=this.Hb()/2,b=a*m);2*m>this.u.max-this.u.min&&180>this.u.max-this.u.min&&(m=(this.u.max-this.u.min)/2,c.fov=this.dn(2*m));90>this.u.max?c.u+m>this.u.max&&(c.u=this.u.max-m):c.u>this.u.max&&(c.u=this.u.max);-90e&&(a=90,n=Math.tan(m* Math.PI/180),q=Math.tan((Math.abs(c.u)+m)*Math.PI/180),q=Math.sqrt(q*q+1)/Math.sqrt(n*n+1),m=180*Math.atan(q*Math.tan(b*Math.PI/180))/Math.PI,2*m>e&&(q=Math.tan(e*Math.PI/360)/Math.tan(b*Math.PI/180),e=q*Math.sqrt(n*n+1),q=Math.sqrt(e*e-1),a=180/Math.PI*Math.atan(q)),c.pan+m>this.pan.max&&(c.pan=this.pan.max-m,h.active&&(h.speed=-h.speed,this.pan.d=0)),c.pan-ma&&(c.u=a-b),c.u-b<-a&&(c.u=-a+b))}};f.prototype.Dg=function(c, a,b,e,h){var m=this.M.Bl-1-a,n=this.M.Cl,q="x";switch(c){case 0:q="f";break;case 1:q="r";break;case 2:q="b";break;case 3:q="l";break;case 4:q="u";break;case 5:q="d";break;case "vr":q="vr"}h&&(c+="l",q+="l");h=this.o.np;for(var v=0;3>v;v++)n=h(n,"c",c),n=h(n,"s",q),n=h(n,"r",a),n=h(n,"l",m),n=h(n,"x",b),n=h(n,"y",e),n=h(n,"v",e),n=h(n,"h",b);return this.o.ab(n)};f.prototype.fs=function(c,a,b){b.Nc=c.width/this.M.W*a.ph;b.xd=c.height/this.M.W*a.qh;b.Cd=c.width/this.M.W*a.Oh;b.Dd=c.height/this.M.W*a.Ph; b.Nc=Math.min(Math.max(0,Math.floor(b.Nc)),c.Y-1);b.xd=Math.min(Math.max(0,Math.floor(b.xd)),c.sa-1);b.Cd=Math.min(Math.max(0,Math.floor(b.Cd)),c.Y-1);b.Dd=Math.min(Math.max(0,Math.floor(b.Dd)),c.sa-1)};f.prototype.Nu=function(){if(!(6>this.cube.Zf.length))for(var c=0;6>c;c++){var a=this.cube.Zf[c];var b=[];b.push(new y.Ra(-1,-1,-1,0,0));b.push(new y.Ra(1,-1,-1,1,0));b.push(new y.Ra(1,1,-1,1,1));b.push(new y.Ra(-1,1,-1,0,1));for(var e=0;4>e;e++)4>c?b[e].Ma(-Math.PI/2*c):b[e].Ia(Math.PI/2*(4==c?-1: 1)),this.Ta&&(b[e].vb(this.Ta.X*Math.PI/180),b[e].Ia(-this.Ta.pitch*Math.PI/180)),b[e].xf(-this.pan.m),b[e].Ud(this.u.m),b[e].yf(this.X.m);b=this.o.Dk(b);a.Ic=0=c+2&&!this.M.levels[c+1].vf&&this.M.levels[c+1].width>e;)c++;return c};f.prototype.st=function(){if(this.o.I.rp&&this.o.I.Pd){var c=this.Ml;c.pan=this.pan.m;c.u=this.u.m;c.fov=this.fov.m;this.Pf(c); this.Pf(c);this.Pf(c);var a=c.pan-this.pan.m,b=c.u-this.u.m;c=c.fov-this.fov.m;if(0!=a||0!=b||0!=c){var e=.2+.9*Math.min((Math.abs(a)+Math.abs(b)+Math.abs(c))/Math.abs(Math.min(this.fov.m,90))*.3,1);this.pan.m+=a*e;this.u.m+=b*e;this.fov.m+=c*e;this.o.ja.Yl=.3;this.update()}else this.o.ja.Yl=0}else this.Ve();if(isNaN(this.pan.m)||1E7this.pan.m)this.pan.m=0;if(isNaN(this.u.m)||1E7this.u.m)this.u.m=0;if(isNaN(this.X.m)||1E7this.X.m)this.X.m=0;if(!this.oj()){for(;360< this.pan.m;)this.pan.m-=360;for(;-360>this.pan.m;)this.pan.m+=360}};return f}();y.sq=r})(ggP2VR||(ggP2VR={}));var S=!1; (function(y){var w=function(){return function(){this.fov=this.u=this.pan=0}}(),r=function(){return function(){this.mn=-1E7;this.so=!1}}(),f=function(){function c(a,b){this.Ls="TGljZW5zZTogREVQQVJUQU1FTlRPIENPTVBSQVM=";this.O=new y.sq(this);this.pan=this.O.pan;this.u=this.O.u;this.X=this.O.X;this.lc=this.O.lc;this.fov=this.O.fov;this.zb=0;this.Ta=this.O.Ta;this.C={width:10,height:10};this.Lk=new y.Ra;this.crossOrigin="anonymous";this.Nd=this.Gf=0;this.Kf=1;this.iq={};this.Ag=this.Ad=!1;this.Pa={};this.ci=this.fh="";this.Nl=[];this.yl= !1;this.ha={start:{x:0,y:0},oa:{x:0,y:0},Rd:{x:0,y:0},m:{x:0,y:0},ga:{x:0,y:0}};this.U={Wc:!1,fd:!1,mj:function(){return this.fd||this.Wc},Dn:0,startTime:0,start:{x:0,y:0},oa:{x:0,y:0},Rd:{x:0,y:0},m:{x:0,y:0},ga:{x:0,y:0},ai:!1,Bg:HTMLElement=null};this.bg=this.ag=!0;this.ja={enabled:!0,oa:{x:0,y:0},ga:{x:0,y:0},Yl:0,fov:{active:!1,kc:0,center:{enabled:!1,x:0,y:0}}};this.kb={alpha:0,beta:0,gamma:0,orientation:0,qf:0,gi:!0,fadeIn:0};this.yh={alpha:0,beta:0,gamma:0,orientation:0};this.B={src:[],Ue:4, width:640,height:480,Tc:!1,lg:!1,Uj:!0,om:!1,je:"loop",Xj:"",j:HTMLVideoElement=null,vm:!1,texture:WebGLTexture=null,gk:WebGLBuffer=null,ti:WebGLBuffer=null,jj:WebGLBuffer=null,format:1,xh:0,flipY:1,pb:function(){return 0},$l:function(){},loop:function(){return!1}};this.qj=0;this.control=this.ob=this.Ha=this.$=this.Ec=this.Ya=this.da=null;this.sd=[];this.qb=!1;this.hh=1;this.ta=null;this.de=this.Ne=this.ef=!1;this.Vg=0;this.Hd=.02;this.sk=0;this.tk=!1;this.rk=this.Ei=this.Wg=this.Jf=this.Zm=0;this.Xm= -1;this.uc="";this.Wl=this.Ce=!1;this.Zh=0;this.dh=[];this.Jk="";this.eh=[];this.Eg=this.Je=1;this.tg=!1;this.v={enabled:!1,timeout:5,active:!1,zg:!1,speed:.4,ak:0,ro:!1,Aj:0,To:!0,qg:"",So:!1,Mg:!1,be:!1,Fi:"",kn:!1,Id:"Animation01",Lf:!1,xj:!1,rm:!1,startTime:0,hd:0,oh:!1,Pi:!1,tj:0,Bd:0,Kh:0,Lh:0,Jh:0,Go:0};this.F={active:!1,aborted:!1,speed:.1,pan:0,u:0,X:0,fov:70,si:70,Kh:0,Lh:0,Ho:0,Jh:0,Kb:0,di:0,Al:0,Fm:!1,Th:!1,Wm:0,Vm:0,ij:!1};this.Hm=null;this.mf={pan:-1,u:-1,fov:-1};this.zl=0;this.ik= this.fa=null;this.Ng={};this.Og={};this.Ef={};this.lb={};this.Sa={};this.he=[];this.Ym={};this.pc={};this.Vc={};this.og={};this.K={mode:1,Hh:-1,Da:0,gb:0,qd:.05,Rb:255,Qb:1,Pb:255,Ob:.3,re:!0,Zj:{enabled:!0,width:180,height:20,$j:0,Yj:1,background:!0,Pb:16777215,Ob:1,Rb:0,Qb:1,vk:3,Hi:1,kk:!0},Mb:[],yc:[],od:[],Sj:[]};this.Ea=null;this.J=[];this.Ip=!1;this.R=[];this.V=[];this.mb=[];this.Nb=[];this.Le=[];this.Va=[];this.ya=[];this.zc=[];this.Me=[];this.Af=[];this.hg=this.Ed=!1;this.ba=1;this.ra=this.ze= this.Sb=this.jc=null;this.lh={};this.bc={};this.Qp=this.Cg="";this.Pp=-1;this.mt={target:0,current:0,qd:.01,delay:2,Qk:0,Qi:!1,Lq:!1};this.margin={left:0,top:0,right:0,bottom:0};this.I={Nh:!1,Ms:!1,oc:!1,ve:!1,Pd:!0,vo:!1,nm:1,rp:!1,Hf:!0,Nk:!0,ah:!0,bh:!0,Ni:!1,ig:!1,sp:!0,sensitivity:8};this.Qh=[];this.ih=!0;this.la={x:0,y:0};this.Ai=this.Jg=this.Ig=this.ae=this.pa=!1;this.fk=this.Tu=!0;this.pl=!1;this.ke=!0;this.Kg=this.ml=this.ol=!1;this.cq=!0;this.gj=!1;this.hb=this.ee="";this.Ub="transition"; this.wd="transform";this.Tf="perspective";this.gr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.xb={width:0,height:0};this.In=new y.Ra;this.Hn=new y.Ra;this.Jn=new y.Ra;this.Kn=new y.Ra;this.Gn=new y.Ra;this.jf=!1;this.Fo=this.wa="";this.hk=[];this.Hl=[];this.Eh=this.wo=this.Ch=this.xo=this.vl=this.Qd=this.Ao=this.tl=this.Zl=this.Sc=this.nj=this.jg=this.ul=this.yo=this.wl= this.Co=this.kl=!1;this.zi=!0;this.Kj=this.lj=!1;this.Ah=[];this.devicePixelRatio=1;this.ea=this.D=null;this.Yg=!1;this.Ua=null;this.Vb={enabled:!1,speed:1,running:!1,finished:!0};this.Gl=!1;this.vj="<>";this.Em=!1;this.$g=function(h,m){if(0==h.length)return h;var n;var q=[];var v=m.Hj(h[0])-0;for(n=0;nC&&(C=0);1v|| q.push(h[t]);q.push(F)}v=z}return q};this.Ml=new w;this.mm=0;this.vc=!1;this.sj=-1;this.Pr=function(h){return h?this.Dh()&&(h.clientX||h.clientY)?{x:h.clientX,y:h.clientY}:h.pageX||h.pageY?{x:h.pageX,y:h.pageY}:h.clientX||h.clientY?{x:h.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:h.clientY+document.body.scrollTop+document.documentElement.scrollTop}:h.touches&&h.touches[0]?{x:h.touches[0].pageX,y:h.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.le=function(h){h=this.Pr(h);var m= this.vh();return{x:h.x-m.x,y:h.y-m.y}};this.zj=1;this.Xi=this.Do=this.Rk=this.Sl=this.Ij=0;this.Eo=!1;this.Ld=!0;this.ln=[5,0,0];this.ib=new y.Ci(this);this.ib.re=!1;this.vn();if(7h&&""!=a[h]&&(e=a[h]))}if(b&&0=b&&(this.ea.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.ea.zoomoutpause=1==a.waitfortransition);a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.ea.zoomfov=b));a.hasOwnProperty("zoomafterinfov")&&(b= Number(a.zoomafterinfov),70<=b&&120>=b&&(this.ea.zoomafterinfov=b));a.hasOwnProperty("zoomafteroutoutfov")&&(b=Number(a.zoomafteroutfov),.01<=b&&70>=b&&(this.ea.zoomafteroutfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.ea.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.ea.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),0<=a&&1E3>=a&&(this.ea.softedge=a));this.Yg||this.Ik()};c.prototype.nb=function(a,b,e){this.O.nb(a,b,e)};c.prototype.Z= function(){return this.O.Z()};c.prototype.uh=function(){return this.O.uh()};c.prototype.Gc=function(){return this.O.Gc()};c.prototype.cj=function(){return this.O.cj()};c.prototype.Ak=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Uc("Unsupported projection type: "+a);else if(this.pa||0==a||4==a||this.Uc("Projection changes require WebGL!"),this.Z()!=a){var e={};e.pan=this.pan.m;e.tilt=this.u.m;e.fov=this.fov.m;e.projection=a;e.timingFunction=3;e.speed=b;a=this.rh(a);e.fov=Math.min(a,e.fov);this.yj(e)}}; c.prototype.addListener=function(a,b){(this.lh[a]=this.lh[a]||[]).push(b)};c.prototype.H=function(a,b){if(a=this.lh[a])for(var e=a.length,h=0;h>4;m=(m&15)<<4|n>>2;var v=(n&3)<<6| q;b+=String.fromCharCode(h);64!=n&&(b+=String.fromCharCode(m));64!=q&&(b+=String.fromCharCode(v))}while(e>3&7];if(!(n&64&&q)||m+q>e)return null;for(n&=63>>q;0Number(this.nd))&&(this.xa=null);this.Sc&&!this.Qd&&12<=Number(this.nd)&&13>Number(this.nd)&&(this.xa=null);this.Sc&&this.Qd&&13==Number(this.Ah[0])&&(1==Number(this.Ah[1])||2<=Number(this.Ah[1]))&&(this.xa=null);this.zi=this.xo?this.Sc&&this.Zl&&10<=Number(this.nd)?!0:!1:!0};c.prototype.N=function(a){if(S){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"
");window.console&& window.console.log(a)}};c.prototype.Lm=function(a){if(S){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"
");window.console&&window.console.warn(a)}};c.prototype.Uc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"
");window.console&&window.console.log(a)};c.prototype.Ap=function(a){this.O.pg=a};c.prototype.setCrossOrigin=function(a){this.crossOrigin=a};c.prototype.Pt=function(a){this.se=a};c.prototype.Yr=function(){return this.Zh};c.prototype.Nt= function(a){this.ee=a};c.prototype.Qn=function(){return this.ee};c.prototype.cl=function(){return this.Eh};c.prototype.Un=function(){return this.gj};c.prototype.Fr=function(){return this.jf};c.prototype.Vr=function(){return this.jf?this.ao().length:1};c.prototype.Cr=function(){return this.v.active};c.prototype.Rt=function(a){this.Eh=!!a};c.prototype.$i=function(){return this.isLoaded};c.prototype.Er=function(){return!this.isLoaded};c.prototype.af=function(){return Number(this.C.height)/(2*Math.tan(Math.PI/ 180*(this.Hb()/2)))};c.prototype.Ep=function(a,b){try{this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var e=a-this.margin.left-this.margin.right,h=b-this.margin.top-this.margin.bottom;if(!(10>e||10>h)){var m=window.devicePixelRatio||1;this.tg&&(m=1);this.da.style.width=e+"px";this.da.style.height=h+"px";this.da.style.left=this.margin.left+"px";this.da.style.top=this.margin.top+"px";if(this.pa)try{this.Ya&&(this.Ya.style.position="absolute",this.Ya.style.display="inline",this.Ya.style.width= e+"px",this.Ya.style.height=h+"px",this.Ya.width=e*m,this.Ya.height=h*m),this.S&&(this.xb.width=e*m,this.xb.height=h*m,this.S.viewport(0,0,this.S.drawingBufferWidth,this.S.drawingBufferHeight))}catch(t){alert(t)}this.Ec&&(this.Ec.style.width=a+"px",this.Ec.style.height=b+"px",this.Ec.width=a,this.Ec.height=b);this.Ha&&(this.Ha.style.width=a+"px",this.Ha.style.height=b+"px",this.ob.style.width=a+"px",this.ob.style.height=b+"px",this.ob.width=a,this.ob.height=b,this.ob.style.left=this.margin.left+"px", this.ob.style.top=this.margin.top+"px",this.ta&&this.ta!=this.Ha&&(this.ta.style.width=a+"px",this.ta.style.height=b+"px"));if(this.Oa){var n=this.Oa.rd;n.style.width=a+"px";n.style.height=b+"px";n.width=a;n.height=b;n.style.left=this.margin.left+"px";n.style.top=this.margin.top+"px"}this.ef&&(this.qb=!0);var q=this.da.offsetWidth,v=this.da.offsetHeight;if(this.C.width!=q||this.C.height!=v)this.C.width=q,this.C.height=v;this.Su();this.ta&&this.ta.ggUpdateSize&&this.ta.ggUpdateSize(a,b);this.H("sizechanged", {w:a,h:b});this.H("playerstatechanged",{})}}catch(t){this.Lm(t)}};c.prototype.$d=function(){this.Em=!0};c.prototype.dc=function(){this.Ep(this.jc.offsetWidth,this.jc.offsetHeight)};c.prototype.qs=function(){var a={width:0,height:0};a.width=this.C.width;a.height=this.C.height;return a};c.prototype.vh=function(){var a={x:0,y:0},b=this.da.getBoundingClientRect();a.x=b.left+window.scrollX;a.y=b.top+window.scrollY;return a};c.prototype.cu=function(a){this.fa=a};c.prototype.St=function(a,b,e,h){this.margin.left= a;this.margin.top=b;this.margin.right=e;this.margin.bottom=h;this.fa=this.skinObj;this.ik=this.vrSkinObj;this.$d()};c.prototype.Uq=function(a){0==a&&(this.I.Pd=!1);1==a&&(this.I.Pd=!0);2==a&&(this.I.Pd=!this.I.Pd);this.H("viewmodechanged",{});this.H("playerstatechanged",{})};c.prototype.os=function(){return 1==this.I.Pd?1:0};c.prototype.gn=function(a,b){this.K.mode=1==b&&0e.index&&(a=b)}return a};c.prototype.Zi=function(){var a="",b;for(b in this.pc){var e=this.pc[b];"file"==e.type&&1E4>e.index&&(a=b)}return a};c.prototype.Sr=function(a,b){"_firstfloorplan"==b&&(b=this.Zi());var e=[];a||(a=this.wa);var h=this.he[a];h&&(a=h);""===a&&0a.z?(z=-b/a.z,x=a.x*z,z*=a.y,Math.abs(x)< this.C.width/2+5E3&&Math.abs(z)a.z?(z=-b/a.z,x=this.C.width/2+a.x*z,z=this.C.height/2+a.y*z):z=x=0,a.ac=x,a.Lb=z;v.tf=C}}}this.H("hotspotsupdated",{})};c.prototype.sr=function(){for(var a=[],b= 0;bb&&(b=0);1>16&255)+","+(a>>8&255)+","+(a&255)+","+b+")"};c.prototype.ot=function(){var a;if(this.ob&&(this.K.Hh!=this.K.mode&&(this.K.Hh=this.K.mode,this.ob.style.visibility=0=this.K.mode&&(b=0);3==this.K.mode&&(b=this.K.Da);for(a=0;ae!=h.Lb>e&&b<(h.ac-q.ac)*(e-q.Lb)/(h.Lb-q.Lb)+q.ac&&(m=!m)}return m};c.prototype.Mi=function(a,b){var e=-1;if((0<=this.K.mode||0b||100>e)e=b=100;var h= window.devicePixelRatio||1;this.tg&&(h=1);this.da.style.width=b+"px";this.da.style.height=e+"px";this.Ya.style.width=b+"px";this.Ya.style.height=e+"px";this.Ya.width=b*h;this.Ya.height=e*h;this.Ya.style.display="none";this.Ya.style.touchAction="none";this.da.insertBefore(this.Ya,this.da.firstChild);var m=this.iq;m.stencil=!0;m.depth=!0;m.powerPreference="high-performance";m.alpha=this.Sc?!0:!1;this.Qd&&10<=this.Ah[0]&&(m.antialias=!1,m.alpha=!1);a={};a.flags=m;a.canvas=this.Ya;this.H("beforewebglcontext", a);this.S=this.Ya.getContext("webgl",m);this.S||(this.S=this.Ya.getContext("experimental-webgl",m));if(this.S){var n=this.S;this.xb.width=b*h;this.xb.height=e*h;n.clearColor(0,0,0,0);n.enable(this.S.DEPTH_TEST);n.viewport(0,0,500,500);n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT);4096<=n.getParameter(n.MAX_TEXTURE_SIZE)&&!this.Eh&&(this.O.pg=1a;)a+=360;for(;180a;)a+=360;for(;180a&&-1E7b&&-1E7e&&-1E7e?Number(e):this.fov.m;this.F.speed=!isNaN(h)&&0=q?(this.vg(b,e,h),this.nb(m)):(a=new y.Nm,a.Za="__AutoMove",a.Ge=this.el(),a.oi=this.u.m,a.Xd=this.fov.m,a.ni=this.Z(),a.Yd= b,a.Ie=e,a.ri=h,a.He=m,a.Uf=!1,a.Ye=!1,a.Ze=!1,0==n&&(a.Ye=!0),1==n&&(a.Uf=!0,a.Ye=!0),2==n&&(a.Ze=!0),a.speed=q,this.F.Vm=this.L,this.L=this.Ln(a),this.F.Wm=(new Date).getTime(),this.F.Fm=!0,this.F.active=!0,this.F.aborted=!1,this.F.pan=b,this.F.u=e,this.F.fov=h,this.de=!1)};c.prototype.Us=function(a){this.moveTo(this.pan.Ga,this.u.Ga,this.fov.Ga,a)};c.prototype.Vs=function(a,b){var e={};e.pan=this.pan.Ga;e.tilt=this.u.Ga;e.fov=this.fov.Ga;e.projection=this.uh();e.timingFunction=b;e.speed=a;this.yj(e)}; c.prototype.Cq=function(a,b,e,h){var m=new y.Ci(this);m.type="point";m.pan=b;m.u=e;m.id=a;m.j={};m.j.player=this;m.Xf();m.j.hotspot=m;m.j.__div=document.createElement("div");m.j.__div.appendChild(h);this.J.push(m);m.j.__div.style.position="absolute";m.j.__div.style.left="-1000px";m.j.__div.style.top="-1000px";m.j.__div.ggVisible=!0;this.Ha.insertBefore(m.j.__div,this.Ha.firstChild);this.qb=!0};c.prototype.Mu=function(a,b,e){for(var h=0;ha;)a+=360;b=h.Jq()}h={};h.pan=a;h.tilt=b;return h};c.prototype.Rc=function(a){return a==this.control||a&&void 0!==a.ggPermeableMap&&1==a.ggPermeableMap?!0:a&&void 0!==a.ggPermeable&&0==a.ggPermeable?!1:a&&a.ggType&&("container"== a.ggType||"cloner"==a.ggType||"timer"==a.ggType)?!0:!1};c.prototype.Bk=function(a,b){var e=this.af(),h,m;for(h=0;ht;t++){switch(t){case 0:v.init(-m,-x,0);break;case 1:v.init(m,-x,0);break;case 2:v.init(m,x,0);break;case 3:v.init(-m,x,0)}v.Ia(n.Ia*Math.PI/180);v.Ma(-n.Ma* Math.PI/180);v.vb(n.vb*Math.PI/180);--v.z;v.Ia(-n.u*Math.PI/180);v.Ma(n.pan*Math.PI/180);v.Ma(-this.pan.m*Math.PI/180);v.Ia(this.u.m*Math.PI/180);v.vb(this.X.m*Math.PI/180);q.push(v.clone())}q=this.Dk(q);if(0v.z?(x=-e/v.z,m=this.C.width/2+v.x*x,x=this.C.height/2+v.y*x):x=m=0,v.ac=m,v.Lb=x;if(y.fc.qo(q,a,b))return n}}return null};c.prototype.ej=function(){return this.V.length+this.mb.length+this.Nb.length};c.prototype.jl=function(a){return aa-this.U.startTime&&0<=b&&20>b){var e=this.Mi(this.la.x,this.la.y);e&&this.Wp(e);b=Math.abs(this.ha.Rd.x-this.ha.oa.x)+Math.abs(this.ha.Rd.y-this.ha.oa.y);var h=this.bj(this.la.x,this.la.y,!0);700>a-this.Gh&&0<=b&&20>b?(e?this.Xp(e):this.I.Nk&&this.bk(),this.H("doubleclick",{pan:-Math.round(100*h.pan)/100,tilt:Math.round(100*h.tilt)/100}),this.Gh=0):(this.H("panoclick",{pan:-Math.round(100* h.pan)/100,tilt:Math.round(100*h.tilt)/100}),this.Gh=a);this.ha.Rd.x=this.ha.oa.x;this.ha.Rd.y=this.ha.oa.y}}};c.prototype.No=function(a){if(!this.I.ve&&!this.vc&&(a=a?a:window.event,this.Rc(a.target))){var b=a.detail?-1*a.detail:a.wheelDelta/40;this.I.vo&&(b=-b);a.axis&&(-1==this.sj?this.sj=a.axis:this.sj!=a.axis&&(b=0));var e=0Math.abs(a.wheelDeltaY)&&(b=0);0!=b&&(this.I.Hf?this.en(e*this.I.nm,this.le(a),!0):this.Ji(e*this.I.nm,!0),this.update()); a.preventDefault();this.ma(!0)}};c.prototype.Iu=function(a){a||(a=window.event);var b=a.touches,e=this.vh();this.la.x=b[0].pageX-e.x;this.la.y=b[0].pageY-e.y;this.Ke=this.Sb=null;window.focus();this.gj||(this.gj=!0,this.H("hastouch",{}),this.H("playerstatechanged",{}));!this.Ao&&(this.ag||this.bg&&this.jg)&&this.Wi();if(!this.I.oc&&!this.vc)if(e=(new Date).getTime(),this.ze)this.Sb=this.ze,this.U.fd=!0,this.U.startTime=e,a.preventDefault(),this.U.ai=!0;else{if(!this.U.fd&&b[0]){this.U.startTime=e; this.U.start.x=b[0].pageX;this.U.start.y=b[0].pageY;this.U.oa.x=b[0].pageX;this.U.oa.y=b[0].pageY;e=this.Cb=b[0].target;if(this.Rc(e)){var h;(h=this.Bk(this.la.x,this.la.y))&&h.pe&&(this.Sb=h);if(h=this.Mi(this.la.x,this.la.y))this.N(h),this.Ke=h,this.Lj(h),h=this.le(a),this.Hg(h.x,h.y,!0);this.gq(b[0].pageX,b[0].pageY);this.U.Dn=b[0].identifier;this.U.fd=!0;a.preventDefault();this.U.ai=!0;this.ma(!0)}if(e){h=!1;if(null!=this.U.Bg)for(var m=this.U.Bg;m&&m!=this.control;){if(m.onmouseout)m.onmouseout(a); m=m.parentNode}m=e;for(var n=!0;m&&m!=this.control;)e!=this.U.Bg&&m.onmouseover&&(m.onmouseover(a),7<=this.Kf&&(h=!0)),m.onmousedown&&(m.onmousedown(a),n=!1,h=!0),m.onclick&&(n=!1),m=m.parentNode;this.U.Bg=n&&7<=this.Kf&&e!=this.U.Bg?e:null;h&&(a.preventDefault(),this.U.ai=!0)}}1this.fov.max&&(this.ja.fov.kc=this.fov.max),this.ja.fov.kch){b=!0;this.Rc(this.Cb)&&(a.preventDefault(),this.Sb&&(this.Sb.pe(),this.ze=this.Sb.La?this.Sb:null));if(this.Cb)for(h=this.Cb;h&&h!=this.control;)h.onclick&&(h.onclick(),"hotspot"!=h.gv&&(m=!0),b=!1),h=h.parentNode;h=Math.abs(this.U.Rd.x-this.U.oa.x)+ Math.abs(this.U.Rd.y-this.U.oa.y);if(700>e-this.Gh&&0<=h&&20>h){if(this.Rc(this.Cb))if(a.preventDefault(),this.Ke)this.Xp(this.Ke);else if(this.I.Nk){var n=this;setTimeout(function(){n.bk()},1)}if(this.Cb)for(h=this.Cb;h&&h!=this.control;)h.ondblclick&&(h.ondblclick(),m=!0,b=!1),h=h.parentNode;this.Gh=0}else this.Gh=e;this.U.Rd.x=this.U.oa.x;this.U.Rd.y=this.U.oa.y}if(this.Cb)for(h=this.Cb;h&&h!=this.control;)this.U.Bg!=this.Cb&&h.onmouseout&&(h.onmouseout(a),7<=this.Kf&&(m=!0)),h.onmouseup&&(h.onmouseup(a), 7<=this.Kf&&(m=!0)),h=h.parentNode;m&&a.preventDefault();this.le(a);this.Ke&&(this.Hg(-1,-1,!0),b&&this.Wp(this.Ke));this.Cb=null;this.U.fd=!1;this.Lj(this.ib);this.Ke=null}};c.prototype.Fu=function(a){this.I.oc||this.vc||(this.U.fd=!1);this.Ke=null;this.Lj(this.ib);this.le(a);this.Hg(-1,-1,!0)};c.prototype.Bo=function(){return null!=this.Cb||this.U.fd||this.U.Wc};c.prototype.Oo=function(a){if(!this.pf&&window.MSGesture){var b=window.MSGesture;this.N("setup gesture");this.pf=new b;this.pf.target= this.control}this.pf&&this.pf.addPointer(a.pointerId)};c.prototype.Nn=function(a){this.ol=!0;this.zj=1;this.I.oc||this.I.ve||this.vc||(a.touches?(this.Cb=a.touches.target,this.Rc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.m,this.ma(!0))):(a.preventDefault(),this.fov.prev=this.fov.m,this.ma(!0)))};c.prototype.mr=function(a){if(!this.I.oc&&!this.I.ve&&!this.vc&&this.Rc(a.target)){a.preventDefault();this.ja.fov.active=!0;this.ja.fov.center.enabled=!0;var b=this.le(a);this.ja.fov.center.x= b.x;this.ja.fov.center.y=b.y;this.ja.fov.kc=this.fov.prev/Math.sqrt(a.scale);4==this.Z()&&2!=this.zb&&this.ja.fov.kc>this.fov.max&&(this.ja.fov.kc=this.fov.max);this.update();this.ma(!0)}};c.prototype.Ws=function(a){this.I.oc||this.I.ve||this.vc||(a.preventDefault(),1!=a.scale&&(this.ja.fov.active=!0,this.zj*=a.scale,this.ja.fov.center.enabled=!0,a=this.le(a),this.ja.fov.center.x=a.x,this.ja.fov.center.y=a.y,this.ja.fov.kc=this.fov.prev/Math.sqrt(this.zj),4==this.Z()&&2!=this.zb&&this.ja.fov.kc>this.fov.max&& (this.ja.fov.kc=this.fov.max),this.update(),this.ma(!0)))};c.prototype.Mn=function(a){this.I.oc||this.I.ve||this.vc||(this.ja.fov.active=!1,a.preventDefault(),this.ma(!0),this.pf&&this.pf.reset&&this.pf.reset())};c.prototype.Is=function(a){this.I.Nh||this.vc||(this.isFullscreen&&a.preventDefault(),this.qj=a.keyCode,this.ma(!0))};c.prototype.Js=function(a){this.qj&&(this.qj=0,a.preventDefault())};c.prototype.dt=function(){this.qj=0};c.prototype.Wh=function(){this.isFullscreen&&(this.Dh()||this.exitFullscreen(), this.Dh()&&(this.$.style.left="0px",this.$.style.top="0px"))};c.prototype.jt=function(a,b,e,h){h?(this.yh.alpha=a,this.yh.beta=b,this.yh.gamma=e,this.yh.gamma+=90):(this.kb.alpha=a,this.kb.beta=b,this.kb.gamma=e,this.kb.gamma+=90);this.kb.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;e=new y.Pm;a=this.kb;e.xf(-a.alpha);e.yf(-a.beta);e.Ud(-a.gamma);e.yf(90-a.orientation);1>e.Jb?-1this.kb.fadeIn&&(this.kb.fadeIn+=1,m=.1*this.kb.fadeIn);e=-e+this.kb.qf;this.Vd(m*e+(1-m)*this.cf());this.Wd(m*a+(1-m)*this.eg());this.cq?this.wg(m*b+(1-m)*this.dj()):this.wg(0);this.Ve();this.F.active=h}};c.prototype.Wp=function(a){this.fa&&this.fa.hotspotProxyClick&& this.fa.hotspotProxyClick(a.id,a.url);this.H("hsproxyclick",{id:this.T.id,url:this.T.url});""!=a.url&&(this.Il(a.url,a.target),this.Hg(-1,-1,!1))};c.prototype.Xp=function(a){this.fa&&this.fa.hotspotProxyDoubleClick&&this.fa.hotspotProxyDoubleClick(a.id,a.url);this.H("hsproxydblclick",{id:this.T.id,url:this.T.url})};c.prototype.$e=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};c.prototype.$o=function(){var a=this;setTimeout(function(){a.$o()},100);9!=a.Ij||a.lj||window.requestAnimationFrame(function(){a.Xh(); a.N("restart recover timer")});10t;)t+=360}e=t-q;2!=this.zb&&(180e&&(e+=360));this.pan.m+=e*this.Hd}else this.pan.m=t;this.v.Kh=this.pan.m;break;case 1:q=this.u.m;this.de&&3!=v.type?(h=t-q,this.u.m+=h*this.Hd):this.u.m=t;this.v.Lh=this.u.m;break;case 2:q=this.fov.m,this.de&&3!=v.type?(m=t-q,this.fov.m+=m*this.Hd):this.fov.m=t,this.v.Jh=this.fov.m}}t=this.Z();for(b=Math.floor(a);!this.bf(b,3)&&0a?(t=this.rh(this.Wg),this.fov.m>t?this.Ei= a:(n=(a-this.Ei)/this.rk,n=Math.min(1,n),this.nb(this.Z(),this.Wg,1-n))):(0==b.Db||n>b.Db-.3?this.nb(b.value):(n/=b.Db,this.nb(t,b.value,1-n)),this.v.Go=b.value);this.de&&(t=Math.sqrt(e*e+h*h+m*m),.3>t&&(this.de=!1,this.Hd=.02,this.Vg=0),0this.Vg&&(this.Hd+=.01,this.Hd=Math.min(this.Hd,1)),this.Vg=t)}e=Math.floor(a);h=this.nr(e);for(m=0;mn.Um)e!=this.Xm&&(t=n.pd,this.bc.hasOwnProperty(t)&&(b=this.bc[t].type,0==b?this.Ee(t,n.Gm):1==b?this.Ee(t,n.value):2==b&&this.Ee(t, "true"==n.Gm)));else if(b=this.bf(this.fo(a,n.eb,n.pd),n.eb,n.pd),t=(t=this.$n(b))?this.On(b,t,a):b.value,n=n.pd.split("|"),2==n.length)for(b=n[0],n=n[1],v=0;v=this.Va.length&&(b=0),a=this.Va[b];while(""!=this.v.qg&&!this.th(a).tags.includes(this.v.qg)&&a!=this.wa);return a};c.prototype.rt=function(a){var b=this.F.speed;this.F.Al&&(b=b*(a.getTime()-this.F.Al)/60);this.F.Al=a.getTime();this.v.oh&&(this.ra.ready()||4==this.Z())&&this.$i()&&(this.v.oh=!1,this.v.active=!0,this.Vb.running=!0,this.Vb.finished=!1);if(this.F.active||0!=this.F.Kb&&this.ra.ready()){if(this.F.Fm&&"__AutoMove"==this.L.Za){var e=a.getTime()-this.F.Wm;b=e/100; if(b>=this.L.length){if(this.li(this.L.length),this.ya.splice(this.ya.indexOf(this.L),1),this.F.active=!1,this.L=this.F.Vm,this.F.Kb=0,this.vg(this.F.pan,this.F.u,this.F.fov),this.pan.Tb=this.F.pan,this.u.Tb=this.F.u,this.F.Th&&(this.F.Th=!1,this.v.xj=!0,this.v.be=!0,this.v.active=!0,this.H("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.li(b)}else{this.pan.d=this.F.pan-this.pan.m;if(360==this.pan.max-this.pan.min){for(;-180>this.pan.d;)this.pan.d+=360;for(;1805*e?e/h:.2,this.pan.d*=h,this.u.d*=h,this.fov.d*=h;this.pan.m+=this.pan.d;this.u.m+=this.u.d;this.X.m+=this.X.d;this.I.Hf&&this.fov.Mc.enabled?this.bm(this.fov.m+this.fov.d,this.fov.Mc):this.fov.m+=this.fov.d;0!=this.F.Kb&&(this.F.Kb!=this.Z()?(b=this.rh(this.F.Kb),this.yd()>b?(this.fov.m+=-Math.max((2.5- 1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.u.d*this.u.d+this.X.d*this.X.d)/e,1))*e,this.fov.d)-this.fov.d,this.F.fov=this.fov.m):(this.nb(this.F.Kb,this.Z(),0),this.N("New projection from Target:"+this.Z()),this.F.di=0,this.ra.kj())):1>this.F.di?(this.F.di=Math.min(1,this.F.di+.05*b),this.nb(this.Z(),this.Gc(),this.F.di)):(this.nb(this.Z(),0,0),this.F.Kb=0,this.ra.kj()))}this.mg=a.getTime();this.update()}else if(this.v.active){e=a.getTime()-this.v.startTime;this.v.tjthis.B.j.duration-this.B.j.currentTime&&(this.tk=!0);h>=10*this.Jf;)h-=10*this.Jf;if(!m&&b>=this.L.length||m&&!e&&b>=this.L.length||m&&e&&(this.L.Za!=this.L.Qo||this.L.Po!=this.wa)&&b>=this.L.length){this.li(this.L.length);this.v.Bd=0;this.Ne=!1;if(this.Vb.running){this.vp();return}if(this.v.kn){e=0;do b=this.Ym[this.L.Oe],h=Math.floor(Math.random()*Object.keys(b).length), h=b[h],this.uc=h.cliptitle,b=h.nodeid,h=h.startview,e++;while(b==this.wa&&10>e)}else this.uc=this.L.Qo,b=this.L.Po,h=this.L.$s;this.uc==this.L.Za&&this.wa==b?1e.pan;)e.pan+=360;e.tilt=h.value;e.fov=m.value;e.projection=n?n.value:4}e.timingFunction=3;e.speed=1;this.F.Th=!0;this.yj(e);this.v.active=!0}}else 0=1E3*this.v.Aj?11E3*this.v.timeout&&!this.v.oh&&(this.v.zg&&this.$i()||!this.v.zg)&&(this.v.active=!0,this.v.startTime=a.getTime(),this.v.hd=0,this.H("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Mc.enabled=!1),!this.ja.enabled||this.U.mj()||0==this.pan.d&&0==this.u.d&&0==this.fov.d||(this.F.ij=!0,this.pan.d*=.9,this.u.d*=.9,this.fov.d*=.9,this.pan.m+=this.pan.d,this.u.m+=this.u.d,this.I.Hf&&this.fov.Mc.enabled?this.en(this.fov.d,this.fov.Mc): this.Ji(this.fov.d),1E-4>this.pan.d*this.pan.d+this.u.d*this.u.d+this.fov.d*this.fov.d&&(this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Mc.enabled=!1),this.update())};c.prototype.Yp=function(a){var b=this.D;b.Yc=!1;"previewtrack"==b.delay||"videopano"==b.delay&&!this.B.j?0=1E3*b.delay&&(b.Qi=!1):(b.current+=b.qd,0>b.current&&(b.current=0,b.qd=-b.qd,b.Qi=!0,b.Qk=a.getTime()),1b.yc[a]?(b.yc[a]+= .05,b.od[a]b.yc[a]&&(b.yc[a]=b.od[a],-1!=b.Sj.indexOf(b.Mb[a])&&(b.Sj.splice(b.Sj.indexOf(b.Mb[a]),1),b.Mb.splice(a,1),b.od.splice(a,1),b.yc.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;ae.Da?(e.Da+=b.qd,e.gbe.Da&&(e.Da=e.gb)),this.update())}3==b.mode&&b.gb!=b.Da&&(b.gb>b.Da?(b.Da+=b.qd,b.gbb.Da&&(b.Da= b.gb)),this.update())};c.prototype.vt=function(){var a=this.ja;this.U.mj()&&(this.I.Pd?(a.ga.x=.4*(this.ha.oa.x-a.oa.x),a.ga.y=.4*(this.ha.oa.y-a.oa.y),a.oa.x+=a.ga.x,a.oa.y+=a.ga.y):(a.ga.x=.1*-this.ha.ga.x*this.I.sensitivity/8,a.ga.y=.1*-this.ha.ga.y*this.I.sensitivity/8),this.eq(a.ga.x,a.ga.y),this.update());a.fov.active&&(this.I.Hf&&a.fov.center.enabled?this.Pq(.4*(a.fov.kc-this.fov.m),a.fov.center):this.zk(.4*(a.fov.kc-this.fov.m)),.001>Math.abs(a.fov.kc-this.fov.m)/this.fov.m&&(a.fov.active= !1),this.update());if(a.enabled&&(0!=a.ga.x||0!=a.ga.y)&&!this.U.mj()){var b=.9*(1-a.Yl);a.ga.x*=b;a.ga.y*=b;this.F.ij=!0;.01>a.ga.x*a.ga.x+a.ga.y*a.ga.y?(a.ga.x=0,a.ga.y=0):(this.eq(a.ga.x,a.ga.y),this.update())}};c.prototype.ut=function(){if(!this.$i()&&this.ef&&5"+c.tn(this.vj).replace(/./gm,function(v){return"&#"+v.charCodeAt(0)+";"})),h.setAttribute("style","color: black; text-decoration: none;"),a.appendChild(h),m.appendChild(a));e.$.insertBefore(e.vd,e.$.firstChild);m.onclick=function(){e.vd&&(e.$.removeChild(e.vd),e.vd=null)};m.oncontextmenu=m.onclick}};c.prototype.Kq=function(){var a=this;var b=a.Ha;a.control=b;a.control=b;setTimeout(function(){a.Xh()},10);setTimeout(function(){a.$o()},200);setTimeout(function(){a.$d();a.yi()},10);b.addEventListener&& (b.addEventListener("touchstart",function(e){a.Iu(e)},!1),b.addEventListener("touchmove",function(e){a.Hu(e)},!1),b.addEventListener("touchend",function(e){a.Gu(e)},!1),b.addEventListener("touchcancel",function(e){a.Fu(e)},!1),b.addEventListener("pointerdown",function(e){a.Oo(e)},!1),b.addEventListener("MSPointerDown",function(e){a.Oo(e)},!1),b.addEventListener("MSGestureStart",function(e){a.Nn(e)},!1),b.addEventListener("MSGestureEnd",function(e){a.Mn(e)},!1),b.addEventListener("MSGestureChange", function(e){a.Ws(e)},!1),b.addEventListener("gesturestart",function(e){a.Nn(e)},!1),b.addEventListener("gesturechange",function(e){a.mr(e)},!1),b.addEventListener("gestureend",function(e){a.Mn(e)},!1),b.addEventListener("mousedown",function(e){a.Ts(e)},!1),b.addEventListener("mousemove",function(e){a.Ss(e)},!1),document.addEventListener("mouseup",function(e){a.Rs(e)},!1),b.addEventListener("mousewheel",function(e){a.No(e)},!1),b.addEventListener("DOMMouseScroll",function(e){a.No(e)},!1),document.addEventListener("keydown", function(e){a.Is(e)},!1),document.addEventListener("keyup",function(e){a.Js(e)},!1),window.addEventListener("resize",function(){a.$d()},!1),a.jc.addEventListener("resize",function(){a.$d()},!1),window.addEventListener("blur",function(){a.dt()},!1),a.$.addEventListener("webkitfullscreenchange",function(){a.Wh()},!1),document.addEventListener("mozfullscreenchange",function(){a.Wh()},!1),window.addEventListener("webkitfullscreenchange",function(){a.Wh()},!1),document.addEventListener("MSFullscreenChange", function(){a.Wh()},!1),document.addEventListener("fullscreenchange",function(){a.Wh()},!1));b.oncontextmenu=function(e){void 0===e&&(e=window.event);return e.target&&!a.Rc(e.target)?!0:e.ctrlKey?!0:(e=a.le(e),a.ou(e.x,e.y),!1)};window.addEventListener("deviceorientation",function(e){a.jt(e.alpha,e.beta,e.gamma,e.absolute);null!=e.alpha&&null!=e.beta&&null!=e.gamma&&0==a.ml&&(a.ml=!0,a.H("gyroavailable",{available:!0}),a.H("playerstatechanged",{}))})};c.prototype.Tm=function(){for(var a=0;ab&&(b=0),b>a.Gi.duration&&(b=a.Gi.duration-.1),a.Oq(b)):a.j&&(0>b&&(b=0),b>a.j.duration&&(b=a.j.duration-.1),a.j.currentTime=b))};c.prototype.ru=function(a,b){a=this.bb(a);0h&&(h=0);"_videopanorama"===a&&this.B.j&&(this.B.j.volume=h);if("_main"===a){this.ba=h;for(e=0;ee&&(e=0);this.ba=e;for(h=0;he&&(e=0);n.level=e;n.j&&null!=n.j.volume&&(n.j.volume=e*this.ba)}}}catch(q){this.N(q)}};c.prototype.Pj=function(a,b){switch(b){case 1:a.muted=!0;break;case 0:a.muted=!1;break;case -1:a.muted=!a.muted}};c.prototype.gm=function(a,b){if("_main"===a||"_all"===a){"_all"==a&&(b=(this.Ed= 1==b||-1==b&&!this.Ed?!0:!1)?1:0);for(var e=0;ea.h?a.w:a.h};c.prototype.Rl=function(a, b){a=(new DOMParser).parseFromString(a,"text/xml");this.gp(a,b)};c.prototype.fp=function(a,b,e){try{var h=void 0;h=new XMLHttpRequest;h.open("GET",a,!1);h.send(null);if(h.responseXML){var m=a.lastIndexOf("/");0<=m&&(this.ee=a.slice(0,m+1));2<=arguments.length&&null!=b&&(this.ee=b);this.Rl(h.responseText,e)}else alert("Error loading panorama XML")}catch(n){alert("Error:"+n)}};c.prototype.At=function(a,b,e,h){var m=new XMLHttpRequest;var n=this;m.onload=function(q){if(4<=m.readyState)if(m.responseXML){var v= a.lastIndexOf("/");0<=v&&(n.ee=a.slice(0,v+1));3<=arguments.length&&null!=e&&(n.ee=e);n.Rl(m.responseText,h);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+m.statusText)};m.onerror=function(){console.error("Error loading XML:"+m.statusText)};m.open("GET",a,!0);m.send(null)};c.prototype.yk=function(a){var b="";"{"==a.charAt(0)&&(b=a.slice(1,a.length-1));(a=this.he[b])&&(b=a);a={oldNodeId:this.wa,nodeId:b};this.H("beforechangenodeid",a);this.kl?this.kl= !1:this.Hl.push(this.wa);""!=this.wa&&-1==this.hk.indexOf(this.wa)&&(this.hk.push(this.wa),this.H("changevisitednodes",{}));this.Fo=this.wa;this.wa=b;this.N("change active node: "+b);this.fa&&this.fa.changeActiveNode&&this.fa.changeActiveNode("{"+b+"}");this.H("changenodeid",a);this.bg=!0};c.prototype.Yi=function(){return this.wa};c.prototype.Qr=function(a){return 0=this.Va.length&&(a=0),this.Va[a]):""};c.prototype.cs=function(a){return 0< this.Va.length?(a||(a=this.wa),a=this.Va.indexOf(a),a--,0>a&&(a=this.Va.length-1),this.Va[a]):""};c.prototype.Ir=function(){return this.Fo};c.prototype.bt=function(a){return-1!=this.hk.indexOf(a)};c.prototype.Yq=function(){this.hk=[];this.H("changevisitednodes",{})};c.prototype.gp=function(a,b){var e=a.firstChild;this.Le=[];this.Va=[];this.he=[];this.hg=!1;var h;if(h=e.getAttributeNode("appversion")){if(h=h.nodeValue.toString().match(/(\d+)\.(\d+)\.?(\d+)?/))this.ln=[parseInt(h[1],10),parseInt(h[2], 10),parseInt(h[3]||"0",10)];this.N(this.ln)}for(a=e.firstChild;a;){if("map"==a.nodeName){var m={};(h=a.getAttributeNode("index"))&&(m.index=Number(h.nodeValue));(h=a.getAttributeNode("title"))&&(m.title=h.nodeValue.toString());h=a.getAttributeNode("type");m.type=h.nodeValue.toString();"web"==m.type?(h=a.getAttributeNode("mapprovider"),m.mapprovider=h.nodeValue.toString(),(h=a.getAttributeNode("mapstyle"))&&(m.mapstyle=h.nodeValue.toString()),(h=a.getAttributeNode("googlecustomstylecode"))&&(m.googlecustomstylecode= h.nodeValue.toString()),(h=a.getAttributeNode("mapurltemplate"))&&(m.mapurltemplate=h.nodeValue.toString()),(h=a.getAttributeNode("mapmaxzoom"))&&(m.mapmaxzoom=Number(h.nodeValue)),(h=a.getAttributeNode("customlayernames"))&&(m.customlayernames=h.nodeValue.toString().split("|")),(h=a.getAttributeNode("customlayerurltemplates"))&&(m.customlayerurltemplates=h.nodeValue.toString().split("|")),(h=a.getAttributeNode("customlayermaxzooms"))&&(m.customlayermaxzooms=h.nodeValue.toString().split("|")),(h= a.getAttributeNode("mapkey"))&&(m.mapkey=h.nodeValue.toString()),(h=a.getAttributeNode("styleurl"))&&(m.styleurl=h.nodeValue.toString()),(h=a.getAttributeNode("mapboxlayernames"))&&(m.mapboxlayernames=h.nodeValue.toString().split("|")),(h=a.getAttributeNode("mapboxlayerstyleurls"))&&(m.mapboxlayerstyleurls=h.nodeValue.toString().split("|")),(h=a.getAttributeNode("googlelayernames"))&&(m.googlelayernames=h.nodeValue.toString().split("|")),(h=a.getAttributeNode("googlelayerstyles"))&&(m.googlelayerstyles= h.nodeValue.toString().split("|")),(h=a.getAttributeNode("maplimits"))&&(m.maplimits=h.nodeValue.toString().split("|"))):(h=a.getAttributeNode("width"),m.width=Number(h.nodeValue),h=a.getAttributeNode("height"),m.height=Number(h.nodeValue),h=a.getAttributeNode("zoomlevels"),m.zoomlevels=Number(h.nodeValue),h=a.getAttributeNode("tileformat"),m.tileformat=h.nodeValue.toString(),h=a.getAttributeNode("bgcolor"),m.bgcolor=h.nodeValue.toString(),h=a.getAttributeNode("crispedges"),m.crispedges=1==h.nodeValue, h=a.getAttributeNode("transparent"),m.transparent=1==h.nodeValue,h=a.getAttributeNode("floorplannorth"),m.floorplannorth=Number(h.nodeValue));h=a.getAttributeNode("id");this.pc[h.nodeValue.toString()]=m}a=a.nextSibling}if("tour"==e.nodeName){this.jf=!0;a="";(h=e.getAttributeNode("start"))&&(a=h.nodeValue.toString());this.hasOwnProperty("startNode")&&this.startNode&&(a=String(this.startNode),this.startNode="");this.hasOwnProperty("startView")&&this.startView&&("object"===typeof this.startView&&null!== this.startView?b=this.startView:""!=this.startView&&(b=String(this.startView)),this.startView="");m=e.firstChild;var n="";for(e="";m;){if("panorama"==m.nodeName){if(h=m.getAttributeNode("id"))n=h.nodeValue.toString(),""==a&&(a=n),""==e&&(e=n),this.Le[n]=m,this.Va.push(n);for(h=m.firstChild;h;){if("userdata"==h.nodeName){var q=this.Yf(h);this.Og[n]=q;n==a&&(this.Og._first=q);q.customnodeid&&(this.he[q.customnodeid]=n);this.Vc[n]=this.xn(h);this.og[n]=this.yn(h);this.Ef[n]=this.zn(h)}if("hotspots"== h.nodeName)for(q=h.firstChild;q;)"hotspot"!=q.nodeName&&"polyhotspot"!=q.nodeName||this.Sk(n,h),q=q.nextSibling;if("sounds"==h.nodeName||"media"==h.nodeName)for(q=h.firstChild;q;){"sound"!=q.nodeName||this.Gl||(this.hg=!0);if("video"==q.nodeName){var v;(v=q.getAttributeNode("level"))&&0this.fov.min&&(this.fov.min=1E-20),m=t.getAttributeNode("fovpixel"),this.fov.Rh=1*(m?m.nodeValue:0));if("max"==t.nodeName){m=t.getAttributeNode("pan");this.pan.max=1*(m?m.nodeValue:0);m=t.getAttributeNode("tilt");this.u.max=1*(m?m.nodeValue: 90);m=t.getAttributeNode("fov");this.fov.max=1*(m?m.nodeValue:120);180<=this.fov.max&&(this.fov.max=179.9);if(m=t.getAttributeNode("fovstereographic"))this.fov.Fl=1*m.nodeValue;if(m=t.getAttributeNode("fovfisheye"))this.fov.El=1*m.nodeValue;if(m=t.getAttributeNode("scaletofit"))this.I.sp=1==m.nodeValue}if("flyin"==t.nodeName){if(m=t.getAttributeNode("projection"))this.lc.Kb=Number(m.nodeValue);if(m=t.getAttributeNode("pan"))this.lc.pan=parseFloat(m.nodeValue);if(m=t.getAttributeNode("tilt"))this.lc.u= parseFloat(m.nodeValue);if(m=t.getAttributeNode("fov"))this.lc.fov=parseFloat(m.nodeValue)}t=t.nextSibling}}if("autorotate"==h.nodeName){if(m=h.getAttributeNode("speed"))this.v.speed=1*m.nodeValue;if(m=h.getAttributeNode("delay"))this.v.timeout=1*m.nodeValue;if(m=h.getAttributeNode("returntohorizon"))this.v.ak=1*m.nodeValue;if(m=h.getAttributeNode("horizonfromdefview"))this.v.ro=1==m.nodeValue;if(m=h.getAttributeNode("nodedelay"))this.v.Aj=1*m.nodeValue;if(m=h.getAttributeNode("noderandom"))this.v.To= 1==m.nodeValue;(m=h.getAttributeNode("nodefilter"))&&!this.v.So&&(this.v.qg=m.nodeValue);this.Ld&&(this.v.enabled=!0,this.v.Lf=!0,this.v.active=!1);this.v.Bd=0;(m=h.getAttributeNode("startloaded"))&&this.Ld&&(this.v.zg=1==m.nodeValue,this.v.zg&&(this.v.active=!1));if(m=h.getAttributeNode("useanimation"))this.v.Mg=1==m.nodeValue,this.v.be=this.v.Mg;if(m=h.getAttributeNode("syncanimationwithvideo"))this.v.rm=1==m.nodeValue}if("animation"==h.nodeName){if(m=h.getAttributeNode("syncanimationwithvideo"))this.v.rm= 1==m.nodeValue;if(m=h.getAttributeNode("useinautorotation"))this.v.Mg=1==m.nodeValue;if(m=h.getAttributeNode("animsequence"))this.v.Fi=m.nodeValue,this.Ld&&(this.v.Id=this.v.Fi);if(m=h.getAttributeNode("clipsrandom"))this.v.kn=1==m.nodeValue;this.ya=[];for(t=h.firstChild;t;){if("clip"==t.nodeName){this.L=new y.Om;if(m=t.getAttributeNode("animtitle"))this.L.Oe=m.nodeValue.toString();if(m=t.getAttributeNode("cliptitle"))this.L.Za=m.nodeValue.toString();if(m=t.getAttributeNode("nodeid"))this.L.jv=m.nodeValue.toString(); if(m=t.getAttributeNode("length"))this.L.length=Number(m.nodeValue);if(m=t.getAttributeNode("animtype"))this.L.Hq=Number(m.nodeValue);if(m=t.getAttributeNode("nextcliptitle"))this.L.Qo=m.nodeValue.toString();if(m=t.getAttributeNode("nextclipnodeid"))this.L.Po=m.nodeValue.toString();if(m=t.getAttributeNode("nextclipstartview"))this.L.$s=m.nodeValue.toString();if(m=t.getAttributeNode("transitiontype"))this.L.Ju=Number(m.nodeValue);var x=t.firstChild;for(this.L.qa=[];x;){if("keyframe"==x.nodeName){var z= new y.dd;if(m=x.getAttributeNode("time"))z.time=Number(m.nodeValue);if(m=x.getAttributeNode("value"))z.value=Number(m.nodeValue);if(m=x.getAttributeNode("valuestring"))z.Gm=m.nodeValue.toString();if(m=x.getAttributeNode("transitiontime"))z.Db=Number(m.nodeValue);m=x.getAttributeNode("type");var C=0;m&&(z.type=Number(m.nodeValue),C=Number(m.nodeValue));if(m=x.getAttributeNode("property"))z.eb=Number(m.nodeValue);if(m=x.getAttributeNode("additionaltrackid"))z.pd=m.nodeValue.toString();if(m=x.getAttributeNode("additionaltracktype"))z.Um= Number(m.nodeValue);if(1==C||2==C){if(m=x.getAttributeNode("bezierintime"))z.Qe=Number(m.nodeValue);if(m=x.getAttributeNode("bezierinvalue"))z.Re=Number(m.nodeValue);if(m=x.getAttributeNode("bezierouttime"))z.Se=Number(m.nodeValue);if(m=x.getAttributeNode("bezieroutvalue"))z.Te=Number(m.nodeValue)}this.L.qa.push(z)}x=x.nextSibling}this.ya.push(this.L);"__VideoPano"==this.L.Za&&(this.Hm=this.L)}t=t.nextSibling}}"input"==h.nodeName&&(n||(n=h));if(n)for(x=0;6>x;x++)m=n.getAttributeNode("prev"+x+"url"), this.eh[x]=m?String(m.nodeValue):"";"altinput"==h.nodeName&&(t=0,(m=h.getAttributeNode("screensize"))&&(t=1*m.nodeValue),0q&&(q=t,n=h));if("control"==h.nodeName&&this.Ld){if(m=h.getAttributeNode("simulatemass"))this.ja.enabled=1==m.nodeValue;if(m=h.getAttributeNode("rubberband"))this.I.rp=1==m.nodeValue;if(m=h.getAttributeNode("zoomcentercursor"))this.I.Hf=1==m.nodeValue;if(m=h.getAttributeNode("locked"))this.I.oc=1==m.nodeValue;m&&(this.I.Nh=1==m.nodeValue);if(m=h.getAttributeNode("lockedmouse"))this.I.oc= 1==m.nodeValue;if(m=h.getAttributeNode("lockedkeyboard"))this.I.Nh=1==m.nodeValue;if(m=h.getAttributeNode("lockedkeyboardzoom"))this.I.Ms=1==m.nodeValue;if(m=h.getAttributeNode("lockedwheel"))this.I.ve=1==m.nodeValue;if(m=h.getAttributeNode("invertwheel"))this.I.vo=1==m.nodeValue;if(m=h.getAttributeNode("speedwheel"))this.I.nm=1*m.nodeValue;if(m=h.getAttributeNode("invertcontrol"))this.I.Pd=1==m.nodeValue;if(m=h.getAttributeNode("sensitivity"))this.I.sensitivity=1*m.nodeValue,1>this.I.sensitivity&& (this.I.sensitivity=1);if(m=h.getAttributeNode("dblclickfullscreen"))this.I.Nk=1==m.nodeValue;if(m=h.getAttributeNode("contextfullscreen"))this.I.ah=1==m.nodeValue;if(m=h.getAttributeNode("contextvr"))this.I.bh=1==m.nodeValue;if(m=h.getAttributeNode("contextprojections"))this.I.Ni=1==m.nodeValue;if(m=h.getAttributeNode("hideabout"))this.I.ig=1==m.nodeValue;for(t=h.firstChild;t;)"menulink"==t.nodeName&&(x={text:"",url:""},m=t.getAttributeNode("text"),x.text=m.nodeValue,m=t.getAttributeNode("url"), x.url=m.nodeValue,this.Qh.push(x)),t=t.nextSibling}if("transition"==h.nodeName&&this.Ld){if(m=h.getAttributeNode("enabled"))this.D.enabled=1==m.nodeValue;if(m=h.getAttributeNode("blendtime"))this.D.Xg=1*m.nodeValue;if(m=h.getAttributeNode("blendcolor"))this.D.Mf=m.nodeValue.toString();if(m=h.getAttributeNode("type"))this.D.type=m.nodeValue.toString();if(m=h.getAttributeNode("delay"))this.D.delay=m.nodeValue.toString();if(m=h.getAttributeNode("softedge"))this.D.Xc=1*m.nodeValue;if(m=h.getAttributeNode("zoomin"))this.D.ca= 1*m.nodeValue;if(m=h.getAttributeNode("zoomout"))this.D.cd=1*m.nodeValue;if(m=h.getAttributeNode("zoomfov"))this.D.nk=1*m.nodeValue;if(m=h.getAttributeNode("zoomafterinfov"))this.D.lk=1*m.nodeValue;if(m=h.getAttributeNode("zoomafteroutfov"))this.D.mk=1*m.nodeValue;if(m=h.getAttributeNode("zoomspeed"))this.D.Sg=1*m.nodeValue;if(m=h.getAttributeNode("zoomoutpause"))this.D.Rg=1==m.nodeValue;"cut"==this.D.type&&(this.D.Xg=0)}if("soundstransition"==h.nodeName){if(m=h.getAttributeNode("enabled"))this.Ua.enabled= 1==m.nodeValue;if(m=h.getAttributeNode("transitiontime"))this.Ua.Db=1*m.nodeValue;if(m=h.getAttributeNode("crossfade"))this.Ua.qn=1==m.nodeValue}if("flyintransition"==h.nodeName){if(m=h.getAttributeNode("enabled"))this.Vb.enabled=1==m.nodeValue&&this.pa;if(m=h.getAttributeNode("speed"))this.Vb.speed=1*m.nodeValue}"userdata"==h.nodeName&&(this.userdata=this.Ng=this.Yf(h),this.Vc[a.id]||(this.Vc[a.id]=this.xn(h),this.og[a.id]=this.yn(h),this.Ef[a.id]=this.zn(h)));"projectuserdata"==h.nodeName&&(this.Og._master= this.Yf(h));"customproperty"==h.nodeName&&this.wn(h);if("translations"==h.nodeName)for((m=h.getAttributeNode("json"))&&this.qk(m.nodeValue.toString()),this.yl||this.fm(window.navigator.language),t=h.firstChild;t;){if("projecttranslation"==t.nodeName){x={};if(m=t.getAttributeNode("langcode"))x.langCode=m.nodeValue;if(m=t.getAttributeNode("langname"))x.langName=m.nodeValue;this.Nl.push(x)}t=t.nextSibling}if("hotspots"==h.nodeName){if(m=h.getAttributeNode("smoothmovement"))this.Ip=1==m.nodeValue;for(t= h.firstChild;t;){if("label"==t.nodeName&&this.Ld){x=this.K.Zj;if(m=t.getAttributeNode("enabled"))x.enabled=1==m.nodeValue;if(m=t.getAttributeNode("width"))x.width=1*m.nodeValue;if(m=t.getAttributeNode("height"))x.height=1*m.nodeValue;if(m=t.getAttributeNode("textcolor"))x.$j=1*m.nodeValue;if(m=t.getAttributeNode("textalpha"))x.Yj=1*m.nodeValue;if(m=t.getAttributeNode("background"))x.background=1==m.nodeValue;if(m=t.getAttributeNode("backgroundalpha"))x.Ob=1*m.nodeValue;if(m=t.getAttributeNode("backgroundcolor"))x.Pb= 1*m.nodeValue;if(m=t.getAttributeNode("border"))x.Hi=1*m.nodeValue;if(m=t.getAttributeNode("bordercolor"))x.Rb=1*m.nodeValue;if(m=t.getAttributeNode("borderalpha"))x.Qb=1*m.nodeValue;if(m=t.getAttributeNode("borderradius"))x.vk=1*m.nodeValue;if(m=t.getAttributeNode("wordwrap"))x.kk=1==m.nodeValue}if("polystyle"==t.nodeName&&this.Ld){if(m=t.getAttributeNode("mode"))this.K.mode=1*m.nodeValue;if(m=t.getAttributeNode("bordercolor"))this.K.Rb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundcolor"))this.K.Pb= 1*m.nodeValue;if(m=t.getAttributeNode("borderalpha"))this.K.Qb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundalpha"))this.K.Ob=1*m.nodeValue;if(m=t.getAttributeNode("handcursor"))this.K.re=1==m.nodeValue}m=void 0;"hotspot"==t.nodeName&&(m=new y.Ci(this),m.type="point",m.tb(t),this.J.push(m),this.Sk(a.id,t));"polyhotspot"==t.nodeName&&(m=new y.Ci(this),m.type="poly",m.tb(t),this.J.push(m),this.Sk(a.id,t));t=t.nextSibling}}if("sounds"==h.nodeName||"media"==h.nodeName)for(t=h.firstChild;t;){if("sound"== t.nodeName&&!this.Gl)for(this.hg=!0,m=new y.wq(this),m.tb(t),m.addElement(),x=0;xx;x++)(m=n.getAttributeNode("prev"+x+"url"))&&(this.eh[x]=String(m.nodeValue));if(m=n.getAttributeNode("tilevrurl"))this.Jk=String(m.nodeValue);if(m=n.getAttributeNode("tilesize"))this.Je=1*m.nodeValue;m=n.getAttributeNode("canvassize");if(m=n.getAttributeNode("tilescale"))this.Eg=1*m.nodeValue;if(m=n.getAttributeNode("leveltileurl"))v.Cl=m.nodeValue;if(m=n.getAttributeNode("leveltilesize"))v.W=Number(m.nodeValue);if(m=n.getAttributeNode("levelbias"))v.Jo= Number(m.nodeValue);if(m=n.getAttributeNode("levelbiashidpi"))v.Ko=Number(m.nodeValue);m=n.getAttributeNode("overlap");this.Ta.X=0;this.Ta.pitch=0;m&&(v.cb=Number(m.nodeValue));if(m=n.getAttributeNode("levelingroll"))this.Ta.X=Number(m.nodeValue);if(m=n.getAttributeNode("levelingpitch"))this.Ta.pitch=Number(m.nodeValue);this.zb=0;(m=n.getAttributeNode("flat"))&&1==m.nodeValue&&(this.zb=2);m=n.getAttributeNode("width");v.width=1*(m?m.nodeValue:1);m=n.getAttributeNode("height");v.height=1*(m?m.nodeValue: v.width);this.B.src=[];v.levels=[];for(t=n.firstChild;t;){if("preview"==t.nodeName){if(m=t.getAttributeNode("color"))v.Fj=m.nodeValue;if(m=t.getAttributeNode("strip"))v.ep=1==m.nodeValue}if("video"==t.nodeName){if(m=t.getAttributeNode("format"))"3x2"==m.nodeValue&&(this.B.format=14),"equirectangular"==m.nodeValue&&(this.B.format=1);if(m=t.getAttributeNode("flipy"))this.B.flipY=Number(m.nodeValue);if(m=t.getAttributeNode("startonload"))this.B.Uj=1==m.nodeValue;if(m=t.getAttributeNode("startmutedmobile"))this.B.om= 1==m.nodeValue;if(m=t.getAttributeNode("bleed"))this.B.Ue=Number(m.nodeValue);if(m=t.getAttributeNode("endaction"))this.B.je=String(m.nodeValue);if(m=t.getAttributeNode("targetview"))this.B.Xj=String(m.nodeValue);if(m=t.getAttributeNode("width"))this.B.width=Number(m.nodeValue);if(m=t.getAttributeNode("height"))this.B.height=Number(m.nodeValue);for(x=t.firstChild;x;)"source"==x.nodeName&&(m=x.getAttributeNode("url"))&&this.B.src.push(m.nodeValue.toString()),x=x.nextSibling}if("level"==t.nodeName){n= new y.Rm;m=t.getAttributeNode("width");n.width=1*(m?m.nodeValue:1);m=t.getAttributeNode("height");n.height=1*(m?m.nodeValue:n.width);if(m=t.getAttributeNode("preload"))n.cache=1==m.nodeValue;if(m=t.getAttributeNode("preview"))n.vf=1==m.nodeValue;n.Y=Math.floor((n.width+v.W-1)/v.W);n.sa=Math.floor((n.height+v.W-1)/v.W);v.levels.push(n)}t=t.nextSibling}v.Bl=v.levels.length}this.ef=!0;this.Jg&&(this.pa=this.Ig=!1,this.Ec||(this.N("dummy rendering"),this.Ec=document.createElement("canvas"),this.Ec.width= 100,this.Ec.height=100,this.Ec.id="dummycanvas",this.da.appendChild(this.Ec)),this.dc());this.pa&&this.S&&(this.ra.to(this.Eg),this.ra.uo());var F=this;0E;E++){var I=E%3*H+F.B.Ue;var M=I+H-2*F.B.Ue;var K=4;3>E&&(K+=H);var O=K+H-2*F.B.Ue;for(D=0;4>D;D++){G.x=-1;G.y=-1;G.z= 1;for(var R=0;Ra.time&&n.timea.Yd;)a.Yd+=360;for(;180h;)h+=360;for(;180D)for(;C<=q&&E>D;)E=new y.Lc,E.uk(A,G,H,J,C),E=E.y,C++;else C=1;C>=.8*q&&(z=C=Math.round(.8*q));0==C&&(C=1);D=4==a.ni?120:this.rh(a.ni);E=a.ri;if(E>D)for(;F>C&&E>D;)E=new y.Lc,E.uk(A,G,H,J,F),E=E.y,F--}A=new y.dd;A.time=0;A.eb=0;A.value=a.Ge;A.type=1;A.Se=q/3;A.Te=a.Uf?a.Ge:a.Ge+h/3;b.qa.push(A);A=new y.dd;A.time=0;A.eb=1;A.value=a.oi;A.type=1;A.Se=q/3;A.Te=a.Uf?a.oi:a.oi+m/3;b.qa.push(A); A=new y.dd;A.time=0;A.eb=2;A.value=a.Xd;A.type=1;A.Se=q/3;A.Te=a.Uf?a.Xd:a.Xd+n/3;b.qa.push(A);A=new y.dd;A.time=0;A.eb=3;A.value=a.ni;A.type=0;A.Db=0;b.qa.push(A);e&&(A=new y.dd,A.time=C,A.eb=3,A.value=a.He,A.type=0,A.Db=F-C,b.qa.push(A));A=new y.dd;A.time=q;A.eb=0;A.value=a.Ge+h;A.type=1;A.Qe=2*q/3;A.Re=a.Ye&&!a.Ze?A.value:A.value-h/3;a.Ze&&(A.Se=q+t,A.Te=A.value+t/q*h);b.qa.push(A);A=new y.dd;A.time=q;A.eb=1;A.value=a.Ie;A.type=1;A.Qe=2*q/3;A.Re=a.Ye&&!a.Ze?a.Ie:a.Ie-m/3;a.Ze&&(A.Se=q+t,A.Te=A.value+ t/q*m);b.qa.push(A);A=new y.dd;A.time=z;A.eb=2;A.value=x;A.type=1;A.Qe=2*z/3;A.Re=a.Ye?x:x-n/3;b.qa.push(A);a.Ze&&(A=new y.dd,A.time=q+v,A.eb=0,A.value=a.Ge+h,A.type=1,A.Qe=q+v-t,A.Re=a.Ge+h,b.qa.push(A),A=new y.dd,A.time=q+v,A.eb=1,A.value=a.Ie,A.type=1,A.Qe=q+v-t,A.Re=a.Ie,b.qa.push(A));this.ya.push(b);return b};c.prototype.Wu=function(){this.B.j&&this.B.j.play()};c.prototype.Xu=function(){this.B.j&&(this.B.j.pause(),this.B.j.currentTime=0)};c.prototype.Vu=function(){this.B.j&&this.B.j.pause()}; c.prototype.ku=function(a){this.B.j&&(0>a&&(a=0),a>this.B.j.duration&&(a=this.B.j.duration-.1),this.B.j.currentTime=a,this.update())};c.prototype.ns=function(){return this.B.j?this.B.j.currentTime:0};c.prototype.ms=function(){if(this.B.j)return this.B.j};c.prototype.ju=function(a){if(this.B.j){var b=!this.B.j.paused&&!this.B.j.ended,e=this.B.j.currentTime;this.B.j.pause();this.B.j.src=isNaN(parseInt(a,10))?String(a):this.B.src[parseInt(a,10)];b&&(this.B.j.onloadedmetadata=function(){this.currentTime= e;this.play();this.onloadedmetadata=null});this.B.j.currentTime=e}};c.prototype.fr=function(){this.Gl=!0};c.prototype.Zr=function(){var a={};a.currentNode=this.Yi();a.position={pan:this.pan.m,tilt:this.u.m,fov:this.fov.m,projection:this.Z()};for(var b=a.variables={},e=0,h=Object.keys(this.bc);e