//////////////////////////////////////////////////////////////////////
// Pano2VR 7.0.5/19996 HTML5/CSS3 & WebGL Panorama Player           //
// License: David G Mehas                                           //
// (c) 2023, Garden Gnome Software, https://ggnome.com              //
//////////////////////////////////////////////////////////////////////

var q="function"==typeof Object.defineProperties?Object.defineProperty:function(y,x,v){if(y==Array.prototype||y==Object.prototype)return y;y[x]=v.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 x=0;x<y.length;++x){var v=y[x];if(v&&v.Math==Math)return v}throw Error("Cannot find global object");}var ba=aa(this);
function ca(y,x){if(x)a:{var v=ba;y=y.split(".");for(var f=0;f<y.length-1;f++){var e=y[f];if(!(e in v))break a;v=v[e]}y=y[y.length-1];f=v[y];x=x(f);x!=f&&null!=x&&q(v,y,{configurable:!0,writable:!0,value:x})}}ca("Array.prototype.includes",function(y){return y?y:function(x,v){var f=this;f instanceof String&&(f=String(f));var e=f.length;v=v||0;for(0>v&&(v=Math.max(v+e,0));v<e;v++){var a=f[v];if(a===x||Object.is(a,x))return!0}return!1}});
var __extends=this&&this.__extends||function(){function y(x,v){y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,e){f.__proto__=e}||function(f,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(f[a]=e[a])};return y(x,v)}return function(x,v){function f(){this.constructor=x}if("function"!==typeof v&&null!==v)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");y(x,v);x.prototype=null===v?Object.create(v):(f.prototype=v.prototype,new f)}}();
function O(){var y="perspective",x=["Webkit","Moz","O","ms","Ms"],v;for(v=0;v<x.length;v++)"undefined"!==typeof document.documentElement.style[x[v]+"Perspective"]&&(y=x[v]+"Perspective");"undefined"!==typeof document.documentElement.style[y]?"webkitPerspective"in document.documentElement.style?(y=document.createElement("style"),x=document.createElement("div"),v=document.head||document.getElementsByTagName("head")[0],y.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",v.appendChild(y),
x.id="ggswhtml5",document.documentElement.appendChild(x),v=5===x.offsetHeight,y.parentNode.removeChild(y),x.parentNode.removeChild(x)):v=!0:v=!1;return v}function X(){var y;if(y=!!window.WebGLRenderingContext)try{var x=document.createElement("canvas");x.width=100;x.height=100;var v=x.getContext("webgl");v||(v=x.getContext("experimental-webgl"));y=!!v}catch(f){y=!1}return y}var ggP2VR;
(function(y){var x=function(){function e(a){this.o=null;this.ye=this.to=this.Na=!1;this.pc=!0;this.od=!1;this.zb=this.Oa=this.Ka=0;this.fov=70;this.Kj=this.Ba=0;this.autoplay=this.jg=this.rf=!1;this.id="";this.u=this.pan=0;this.o=a;this.Pc=this.qc=100;this.Jc=1}e.prototype.yb=function(a){var b;if(b=a.getAttributeNode("id"))this.id=b.nodeValue.toString();if(b=a.getAttributeNode("pan"))this.pan=Number(b.nodeValue);if(b=a.getAttributeNode("tilt"))this.u=Number(b.nodeValue)};e.prototype.Gm=function(a){var b=
"",c=this.o,m=!0;if(c.tj){var h=new y.Ua(0,0,-100);h.Ka(-this.u*Math.PI/180);h.Oa(this.pan*Math.PI/180);h.Oa(-c.pan.m*Math.PI/180);h.Ka(c.u.m*Math.PI/180);h.zb(c.W.m*Math.PI/180);.01<=h.z&&(m=!1)}c.Ne&&(b+="perspective("+a+"px) ");b=b+("translate3d(0px,0px,"+a+"px) rotateZ(")+(c.W.m.toFixed(10)+"deg) ");b+="rotateX("+c.u.m.toFixed(10)+"deg) ";b+="rotateY("+(-c.pan.m).toFixed(10)+"deg) ";b+="rotateY("+this.pan.toFixed(10)+"deg) ";b+="rotateX("+(-this.u).toFixed(10)+"deg) ";a=1E4;h=this.j.videoWidth;
var n=this.j.videoHeight;if(0==h||0==n)h=640,n=480;0<this.qc&&(h=this.qc);0<this.Pc&&(n=this.Pc);0<h&&0<n&&(this.j.width=h,this.j.height=n,this.j.style.width=h+"px",this.j.style.height=n+"px");0<this.fov&&(a=h/(2*Math.tan(this.fov/2*Math.PI/180)));b+="translate3d(0px,0px,"+(-a).toFixed(10)+"px) ";b+="rotateZ("+this.zb.toFixed(10)+"deg) ";b+="rotateY("+(-this.Oa).toFixed(10)+"deg) ";b+="rotateX("+this.Ka.toFixed(10)+"deg) ";this.Jc&&1!=this.Jc&&(b+="scaleY("+this.Jc+") ");b+="translate3d("+-h/2+"px,"+
-n/2+"px,0px) ";this.j.style[c.Bd+"Origin"]="0% 0%";this.Na&&(b="",1==this.Ba&&(b+="scale("+Math.min(c.C.width/h,c.C.height/n)+") "),b+="translate3d("+-h/2+"px,"+-n/2+"px,0px) ");this.Es!=b&&(this.Es=b,this.j.style[c.Bd]=b,this.j.style.visibility=m&&this.pc&&(!this.rf||this.ye||this.Na)?"visible":"hidden",this.ye&&this.to==this.Na&&(this.j.style[c.ac]="all 0s linear 0s"),this.to=this.Na)};e.prototype.Gf=function(a){this.j&&(this.j.style.visibility=a?"visible":"hidden")};e.prototype.ke=function(){var a=
this.o;a.na?(this.j.style.left=a.C.width/2+"px",this.j.style.top=a.C.height/2+"px"):(this.j.style.left=a.margin.left+a.C.width/2+"px",this.j.style.top=a.margin.top+a.C.height/2+"px")};e.prototype.Me=function(){this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=null};e.prototype.Sd=function(){};return e}();y.rv=x;var v=function(e){function a(b){b=e.call(this,b)||this;b.wa=!1;b.jk=[];b.Wp=!1;b.stopped=!1;b.muted=!1;b.Yo=!1;b.Lg=!1;b.Yk=!1;b.Pl=!1;b.Pd=!1;b.kc=null;b.Oi=null;b.yi=0;b.zf=
0;b.ug=!1;b.Lt=!1;b.url=[];b.loop=0;b.level=1;b.Dc=0;b.mode=1;b.bj=10;b.Eb=0;b.Kg=0;b.va=1;b.$c=0;b.ad=0;b.bd=0;b.cd=0;b.Hj=-1;return b}__extends(a,e);a.prototype.Dm=function(){var b=this,c=b.j.play();if(void 0!==c)c.then(function(){b.Nf()})["catch"](function(){b.j.pause();b.Wp&&(b.j.muted=!0,b.j.play())})};a.prototype.Rp=function(){this.wa&&this.stopped?this.stopped=!1:0==this.loop?this.wa?(this.kc=null,this.re()):this.j.play():0<this.tb?(this.tb--,this.wa||(this.j.currentTime=0),this.Yk&&(this.Jb&&
0==this.Jb.gain.value||0==this.vb.gain.value&&0==this.Mb.gain.value&&0==this.Kb.gain.value&&0==this.Lb.gain.value)||(this.wa?(this.kc=null,this.re()):this.j.play())):this.wa&&(this.kc=null,this.ug=!1)};a.prototype.Nf=function(){this.Pd=!1;var b=this.o.qa;b&&(this.wa||7==this.mode||(this.source=b.createMediaElementSource(this.j)),2==this.mode||3==this.mode||5==this.mode?(this.Td=b.createChannelSplitter(2),this.vb=b.createGain(),this.Kb=b.createGain(),this.Lb=b.createGain(),this.Mb=b.createGain(),this.gh=
b.createChannelMerger(2),this.wa||this.source.connect(this.Td),this.Td.connect(this.vb,0),this.Td.connect(this.Kb,0),this.Td.connect(this.Lb,1),this.Td.connect(this.Mb,1),this.vb.connect(this.gh,0,0),this.Kb.connect(this.gh,0,1),this.Lb.connect(this.gh,0,0),this.Mb.connect(this.gh,0,1),this.gh.connect(b.destination),1==this.Hj&&this.aq()):7!=this.mode&&(this.Jb=b.createGain(),this.wa||this.source.connect(this.Jb),this.Jb.connect(b.destination)))};a.prototype.aq=function(){1!=this.Hj||this.Pd||!this.Td||
2!=this.mode&&3!=this.mode&&5!=this.mode||(this.Td.connect(this.Lb,0),this.Td.connect(this.Mb,0))};a.prototype.pi=function(){var b=this.o.qa;this.Na||this.Pl||(this.vb?(this.vb.gain.setValueAtTime(this.$c,b.currentTime),this.Mb.gain.setValueAtTime(this.cd,b.currentTime),this.Kb.gain.setValueAtTime(this.ad,b.currentTime),this.Lb.gain.setValueAtTime(this.bd,b.currentTime)):this.Jb&&this.Jb.gain.setValueAtTime((this.$c+this.cd)/2,b.currentTime+1))};a.prototype.Ip=function(b){var c=this.o.qa;(-1==b?this.muted:
1!=b)?this.muted&&(this.muted=this.j.muted=!1,this instanceof f||this.o.ae(this.id)):(this.muted=this.j.muted=!0,this.o.isPlaying(this.id)&&(this.vb?(this.vb.gain.setValueAtTime(0,c.currentTime+1),this.Mb.gain.setValueAtTime(0,c.currentTime+1),this.Kb.gain.setValueAtTime(0,c.currentTime+1),this.Lb.gain.setValueAtTime(0,c.currentTime+1)):this.Jb&&this.Jb.gain.setValueAtTime(0,c.currentTime+1),this instanceof f||this.o.ci(this.id)))};a.prototype.ik=function(){if(!this.Pd||4==this.mode||6==this.mode){var b=
this.o,c=this.o.qa;if((this.j||this.wa)&&!this.muted){var m,h=this.pan-b.pan.m;for(m=this.u-b.u.m;-180>h;)h+=360;for(;180<h;)h-=360;var n=this.Dc,p=this.bj;0==p&&(p=.01);0>p&&(p=b.fov.m);this.ic||(this.ic=new y.Ua,this.ic.Mn(this.pan,this.u));0!=this.mode&&1!=this.mode||!c||this.Jb&&this.Jb.gain.setValueAtTime(this.level*b.ba*this.va,c.currentTime);if(2==this.mode&&c){var r=.5*Math.cos(h*Math.PI/180)+.5;this.$c=Math.sqrt(r)*this.va*this.level*b.ba;this.cd=Math.sqrt(r)*this.va*this.level*b.ba;this.ad=
Math.sqrt(1-r)*this.va*this.level*b.ba;this.bd=Math.sqrt(1-r)*this.va*this.level*b.ba;this.pi()}if(3==this.mode){h=0>h?h<-this.Eb?h+this.Eb:0:h>this.Eb?h-this.Eb:0;var t=this.level;m=Math.abs(m);m=m<this.Kg?0:m-this.Kg;var w=1-m/p;if(Math.abs(h)>p||0>w)r=t*n*b.ba,c?(this.$c=r*this.va,this.cd=r*this.va,this.bd=this.ad=0,this.pi()):this.j.volume=t*n*b.ba;else if(r=1-Math.abs(h/p),c){var z=t*(n+(1-n)*w*r)*b.ba;r=t*n*b.ba;0<=h?(this.$c=z*this.va,this.cd=r*this.va):(this.$c=r*this.va,this.cd=z*this.va);
2*Math.abs(h)<p?(r=1-Math.abs(2*h)/p,z=t*(n+(1-n)*w*r)*b.ba,r=.5*t*(1-n)*w*(1-r)*b.ba,0<=h?(this.cd=z*this.va,this.bd=r*this.va,this.ad=0):(this.$c=z*this.va,this.ad=r*this.va,this.bd=0)):(r=1-(Math.abs(2*h)-p)/p,z=.5*t*(1-n)*w*r*b.ba,0<=h?(this.bd=z*this.va,this.ad=0):(this.ad=z*this.va,this.bd=0));this.pi()}else this.j.volume=t*(n+(1-n)*w*r)*b.ba}4==this.mode&&(Math.abs(h)<this.Eb&&Math.abs(m)<this.Kg?this.Lg||(this.Lg=!0,this.tb=this.loop-1,b.ve||(this.j.play(),this.Pd&&this.Nf())):this.Lg=!1);
5==this.mode&&(m=180*Math.acos(b.Pk.Nj(this.ic))/Math.PI,m<this.Eb?c?(this.$c=this.level*b.ba*this.va,this.cd=this.level*b.ba*this.va,this.bd=this.ad=0,this.pi()):this.j.volume=this.level*b.ba:c?(m<this.Eb+p?(h=0>h?h>-this.Eb?0:h+this.Eb:h<this.Eb?0:h-this.Eb,z=1-Math.max(m-this.Eb,0)/p,r=Math.max(1-Math.abs(h)*Math.cos(this.u*Math.PI/180)/p,0),0<h?(this.$c=this.level*(z*(1-this.Dc)+this.Dc)*b.ba*this.va,this.cd=this.level*(z*r*(1-this.Dc)+this.Dc)*b.ba*this.va,this.ad=0,this.bd=this.level*z*(1-r)*
b.ba*this.va):(this.$c=this.level*(z*r*(1-this.Dc)+this.Dc)*b.ba*this.va,this.cd=this.level*(z*(1-this.Dc)+this.Dc)*b.ba*this.va,this.ad=this.level*z*(1-r)*b.ba*this.va,this.bd=0)):(z=this.level*this.Dc*b.ba,this.$c=z*this.va,this.cd=z*this.va,this.bd=this.ad=0),this.pi()):(m-=this.Eb,m<p&&0<p?(r=1-Math.abs(m/p),this.j.volume=this.level*(n+(1-n)*r)*b.ba):this.j.volume=n*b.ba));6==this.mode&&(m=180*Math.acos(b.Pk.Nj(this.ic))/Math.PI,Math.abs(m)<this.Eb?this.Lg||(this.Lg=!0,this.tb=this.loop-1,this.wa?
this.ug||this.re():this.j.play()):this.Lg=!1)}}};a.prototype.hr=function(){var b=this;b.kc=this.o.qa.createBufferSource();b.kc.addEventListener("ended",function(){b.Rp()},!1);2==b.mode||3==b.mode||5==b.mode?b.kc.connect(b.Td):b.kc.connect(b.Jb)};a.prototype.re=function(){var b=this.o.qa,c=this.zf;this.Oi?(null==this.kc&&(this.hr(),this.kc.buffer=this.Oi),this.yi=b.currentTime-c,this.zf=0,this.ug=!0,this.stopped=!1,this.kc.start(0,c),this.o.N("buffer Source started")):(this.o.N("bufferSoundPlay() -> no audio buffer -> playWhenReady"),
this.Lt=!0)};a.prototype.Ak=function(){var b=this.o.qa.currentTime-this.yi;this.Rf();this.zf=b};a.prototype.Rf=function(){this.kc&&this.ug&&(this.stopped=!0,this.kc.disconnect(),this.kc.stop(0),this.kc=null);this.yi=this.zf=0;this.ug=!1};a.prototype.Wq=function(){var b=this.o.qa;return this.zf?this.zf:this.yi?b.currentTime-this.yi:0};a.prototype.Xq=function(b){this.Rf();this.zf=b;this.re()};a.prototype.addElement=function(){var b=-1,c=this,m=this.o,h=this.o.qa;try{for(var n=!1,p=0;p<m.X.length;p++)m.X[p].id==
c.id&&(b=p,null==m.X[p].j&&!m.X[p].wa||m.X[p].url.join()!=c.url.join()||m.X[p].loop!=c.loop||m.X[p].mode!=c.mode||(n=!0,m.X[p].pan=c.pan,m.X[p].u=c.u,m.X[p].level=c.level,m.X[p].Dc=c.Dc,m.X[p].bj=c.bj,m.X[p].Eb=c.Eb,m.X[p].Kg=c.Kg));if(n)m.N("Keep playing "+c.id);else{if(0<=b){var r=m.X[b];if(null!=r.j||r.wa)if(h&&m.Za.enabled)m.Za.Ei.push(r),1!=m.D.da&&2!=m.D.da&&6!=m.D.da&&m.Za.Hn(r);else{try{r.wa?r.Ak():r.j.pause()}catch(z){m.N(z)}try{r.Me()}catch(z){m.N(z)}}}h&&(this.Pd=!0);c.j=document.createElement("audio");
c.j.crossOrigin=m.crossOrigin;c.j.setAttribute("class","ggmedia");m.De&&c.j.setAttribute("id",m.De+c.id);for(p=0;p<c.url.length;p++)if(n=void 0,n=document.createElement("source"),""!=c.url[p]&&"#"!=c.url[p]){n.crossOrigin=m.crossOrigin;var t=m.gb(m.Va(c.url[p]));n.setAttribute("src",t);c.j.appendChild(n);c.jk.push(t)}c.j.volume=c.level*m.ba;if(0<c.j.childNodes.length&&(m.$.appendChild(c.j),c.j.addEventListener("ended",function(){c.Rp()},!1),h)){c.Yk=!1;0==c.loop&&c.source&&c.source.mediaElement&&
(c.source.mediaElement.loop=!0);var w=new XMLHttpRequest;w.open("GET",m.gb(c.url[0]),!0);w.responseType="arraybuffer";w.onload=function(){h.decodeAudioData(w.response,function(z){c.Hj=z.numberOfChannels;1==c.Hj&&c.aq()})};w.send()}1<=c.loop&&(c.tb=c.loop-1);0<=b?m.X[b]=c:m.X.push(c);c.ik();this.o.qd||(1!=c.mode&&2!=c.mode&&3!=c.mode&&5!=c.mode||!(0<=c.loop)||h&&m.Za.enabled||(c.wa||(c.j.autoplay=!0,c.Dm()),c.autoplay=!0),0==c.mode&&0<=c.loop&&(c.autoplay=!0,c.Dm()))}}catch(z){this.o.N(z)}};a.prototype.Sd=
function(){for(var b=this.o.isPlaying(this.id),c=0,m=!1,h=0;h<this.j.children.length&&!(this.url.length<=c);h++){var n=this.j.children[h];if("SOURCE"==n.nodeName){var p=this.o.gb(this.o.Va(this.url[c]));this.jk[c]!=p&&(b&&!m&&this.o.ci(this.id),n.setAttribute("src",p),this.jk[c]=p,m=!0);c++}}m&&(this.j.load(),b&&this.o.ae(this.id))};a.prototype.Me=function(){try{this.o.N("Remove Snd:"+this.id),this.wa||(this.o.$.removeChild(this.j),this.j=null)}catch(b){this.o.N(b)}};a.prototype.yb=function(b){e.prototype.yb.call(this,
b);var c;(c=b.getAttributeNode("url"))&&this.url.push(c.nodeValue.toString());if(c=b.getAttributeNode("level"))this.level=Number(c.nodeValue);if(c=b.getAttributeNode("loop"))this.loop=Number(c.nodeValue);if(c=b.getAttributeNode("mode"))this.mode=Number(c.nodeValue);if(c=b.getAttributeNode("nodechangekeep"))this.Yo=1==Number(c.nodeValue);if(c=b.getAttributeNode("field"))this.bj=Number(c.nodeValue);if(c=b.getAttributeNode("ambientlevel"))this.Dc=Number(c.nodeValue);if(c=b.getAttributeNode("pansize"))this.Eb=
Number(c.nodeValue);if(c=b.getAttributeNode("tiltsize"))this.Kg=Number(c.nodeValue);for(b=b.firstChild;b;)"source"==b.nodeName&&(c=b.getAttributeNode("url"))&&this.url.push(c.nodeValue.toString()),b=b.nextSibling};return a}(x);y.me=v;var f=function(e){function a(b){b=e.call(this,b)||this;b.poster="";b.Ka=0;b.Oa=0;b.zb=0;b.fov=50;b.Ba=0;b.Kj=0;b.rf=!1;b.jg=!1;return b}__extends(a,e);a.prototype.Ae=function(){1!=this.Ba&&4!=this.Ba||this.nf(!this.Na);2==this.Ba&&this.o.jp(this.id)};a.prototype.nf=function(b){var c=
this.o,m=c.qa;if(1==this.Ba||4==this.Ba){if(this.Na=b)this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(c.Lf+8E4).toString(),this.j.style[this.o.ac]="all 1s ease 0s",this.j.muted=!1,this.o.isPlaying(this.id)||c.ae(this.id);else{this.j.style.pointerEvents="none";this.j.style.cursor="default";this.j.style.zIndex=c.Lf.toString();this.j.style[this.o.ac]="all 1s ease 0s";this.o.isPlaying(this.id)&&(0==this.Kj?c.$j(this.id):2==this.Kj&&(this.j.muted=!0));this.Pl=!0;var h=
this;setTimeout(function(){h.Pl=!1},1E3)}if(m&&(2==this.mode||3==this.mode||5==this.mode)&&(m=m.currentTime,this.vb&&this.Mb&&this.Kb.gain&&this.Kb&&this.Lb)){var n=this.vb.gain.value,p=this.Mb.gain.value,r=this.Kb.gain.value,t=this.Lb.gain.value;this.Na?(this.vb.gain.linearRampToValueAtTime(n,m),this.vb.gain.linearRampToValueAtTime(this.level*c.ba,m+1),this.Mb.gain.linearRampToValueAtTime(p,m),this.Mb.gain.linearRampToValueAtTime(this.level*c.ba,m+1),this.Kb.gain.linearRampToValueAtTime(r,m),this.Kb.gain.linearRampToValueAtTime(0,
m+1),this.Lb.gain.linearRampToValueAtTime(t,m),this.Lb.gain.linearRampToValueAtTime(0,m+1)):(this.vb.gain.linearRampToValueAtTime(n,m),this.vb.gain.linearRampToValueAtTime(this.$c,m+1),this.Mb.gain.linearRampToValueAtTime(p,m),this.Mb.gain.linearRampToValueAtTime(this.cd,m+1),this.Kb.gain.linearRampToValueAtTime(r,m),this.Kb.gain.linearRampToValueAtTime(this.ad,m+1),this.Lb.gain.linearRampToValueAtTime(t,m),this.Lb.gain.linearRampToValueAtTime(this.bd,m+1))}this.ye=!0;this.o.mq()}2==this.Ba&&(b?this.o.ae(this.id):
this.o.ci(this.id))};a.prototype.Be=function(){this.ye=!1;this.j.style[this.o.ac]="none"};a.prototype.hv=function(){0==this.loop?this.j.play():0<this.tb?(this.tb--,this.j.currentTime=0,this.j.play()):this.isRunning=!1};a.prototype.yb=function(b){e.prototype.yb.call(this,b);var c;if(c=b.getAttributeNode("poster"))this.poster=String(c.nodeValue);if(c=b.getAttributeNode("maskimage"))this.nd=String(c.nodeValue);if(c=b.getAttributeNode("rotx"))this.Ka=Number(c.nodeValue);if(c=b.getAttributeNode("roty"))this.Oa=
Number(c.nodeValue);if(c=b.getAttributeNode("rotz"))this.zb=Number(c.nodeValue);if(c=b.getAttributeNode("fov"))this.fov=Number(c.nodeValue);if(c=b.getAttributeNode("width"))this.qc=Number(c.nodeValue);if(c=b.getAttributeNode("height"))this.Pc=Number(c.nodeValue);this.Jc=(c=b.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=b.getAttributeNode("clickmode"))this.Ba=Number(c.nodeValue);if(c=b.getAttributeNode("popbackmode"))this.Kj=Number(c.nodeValue);if(c=b.getAttributeNode("handcursor"))this.jg=
1==Number(c.nodeValue);if(c=b.getAttributeNode("startmutedmobile"))this.Wp=1==Number(c.nodeValue)};a.prototype.addElement=function(){var b=this,c=this.o,m=this.o.qa;try{b.j=document.createElement("video");b.j.setAttribute("class","ggmedia");b.j.crossOrigin=c.crossOrigin;b.j.hidden=!0;b.j.addEventListener("click",function(r){r.stopPropagation()});c.De&&b.j.setAttribute("id",c.De+b.id);if(c.Hi)b.j.setAttribute("playsinline","playsinline"),b.j.setAttribute("style","display: none; max-width:none;");else if(b.j.setAttribute("style",
"max-width:none;pointer-events:none;"),b.j.setAttribute("playsinline","playsinline"),1==b.Ba||4==b.Ba)b.j.addEventListener(c.Qm(),function(){b.Be()},!1),b.j.addEventListener("transitionend",function(){b.Be()},!1);var h=void 0;for(h=0;h<b.url.length;h++){var n=void 0;n=document.createElement("source");n.crossOrigin=c.crossOrigin;var p=c.gb(c.Va(b.url[h]));n.setAttribute("src",p);b.j.appendChild(n);b.jk.push(p)}""!=b.poster&&(b.j.poster=c.gb(c.Va(b.poster)),0>b.loop&&(b.j.preload="none"));b.nd&&""!=
b.nd&&(b.j.style.nd="url('"+c.gb(b.nd)+"')",b.j.style.webkitMaskImage="url('"+c.gb(b.nd)+"')",b.j.style.maskSize="100% 100%",b.j.style.webkitMaskSize="100% 100%");b.j.volume=b.level*c.ba;1<=b.loop&&(b.tb=b.loop-1);m&&(this.Pd=!0);(1==b.mode||2==b.mode||3==b.mode||5==b.mode)&&0<=b.loop&&(b.j.autoplay=!0,b.isRunning=!0,b.autoplay=!0,this.o.qd&&(b.j.muted=!0),b.Dm());c.U.push(this);c.Hi?c.$.appendChild(b.j):(b.j.style.position="absolute",b.qc&&(b.j.width=b.qc),b.Pc&&(b.j.height=b.Pc),c.ea.appendChild(b.j));
b.j.addEventListener("ended",function(){b.hv()},!1)}catch(r){c.N(r)}};a.prototype.Sd=function(){this.j.poster=this.o.gb(this.o.Va(this.poster));e.prototype.Sd.call(this)};a.prototype.registerElement=function(b,c){this.od=!0;this.j=c;this.id=b;this.level=1;this.o.U.push(this)};a.prototype.Me=function(){var b=this.o;b.Hi&&(b.S.deleteTexture(this.texture),this.texture=0);this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=null};return a}(v);y.Wm=f;v=function(e){function a(b){b=e.call(this,
b)||this;b.url="";b.Ka=0;b.Oa=0;b.zb=0;b.fov=50;b.Ba=0;b.jg=!1;b.qc=100;b.Pc=100;b.Jc=1;return b}__extends(a,e);a.prototype.yb=function(b){e.prototype.yb.call(this,b);var c;if(c=b.getAttributeNode("url"))this.url=c.nodeValue.toString();if(c=b.getAttributeNode("maskimage"))this.nd=String(c.nodeValue);if(c=b.getAttributeNode("rotx"))this.Ka=Number(c.nodeValue);if(c=b.getAttributeNode("roty"))this.Oa=Number(c.nodeValue);if(c=b.getAttributeNode("rotz"))this.zb=Number(c.nodeValue);if(c=b.getAttributeNode("fov"))this.fov=
Number(c.nodeValue);if(c=b.getAttributeNode("width"))this.qc=Number(c.nodeValue);if(c=b.getAttributeNode("height"))this.Pc=Number(c.nodeValue);this.Jc=(c=b.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=b.getAttributeNode("clickmode"))this.Ba=Number(c.nodeValue);if(c=b.getAttributeNode("hidepinned"))this.rf=1==Number(c.nodeValue);if(c=b.getAttributeNode("handcursor"))this.jg=1==Number(c.nodeValue);for(b=b.firstChild;b;)"source"==b.nodeName&&(c=b.getAttributeNode("url"))&&(this.url=c.nodeValue.toString()),
b=b.nextSibling};a.prototype.Be=function(){this.ye=!1;this.j.style[this.o.ac]="none";this.rf&&!this.Na&&(this.j.style.visibility="hidden")};a.prototype.Ae=function(){1!==this.Ba&&4!==this.Ba||this.nf(!this.Na)};a.prototype.nf=function(b){var c=this.o;if(1===this.Ba||4===this.Ba)this.Na=b,this.rf&&(this.j.style.visibility="visible",this.j.style.opacity=this.Na?"0.0":"1.0"),this.Na?(this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(c.Lf+8E4).toString(),this.j.style[c.ac]=
"all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.pointerEvents="none",this.j.style.cursor="default",this.j.style.zIndex=c.Lf.toString(),this.j.style[c.ac]="all 1s ease 0s",this.rf&&(this.j.style.opacity="0.0")),this.ye=!0,c.Fm()};a.prototype.addElement=function(){var b=this,c=this.o;try{b.j=document.createElement("img");b.j.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");b.j.setAttribute("class","ggmedia");b.j.hidden=!0;b.j.addEventListener("click",function(m){m.stopPropagation()});
c.De&&b.j.setAttribute("id",c.De+b.id);b.j.ondragstart=function(){return!1};if(1===b.Ba||4===b.Ba)b.j.addEventListener(c.Qm(),function(){b.Be()},!1),b.j.addEventListener("transitionend",function(){b.Be()},!1);b.j.setAttribute("src",c.gb(c.Va(b.url)));b.qc&&(b.j.width=b.qc);b.Pc&&(b.j.height=b.Pc);c.Xa.push(b);b.j.style.position="absolute";b.nd&&""!=b.nd&&(b.j.style.nd="url('"+c.gb(b.nd)+"')",b.j.style.webkitMaskImage="url('"+c.gb(b.nd)+"')",b.j.style.maskSize="100% 100%",b.j.style.webkitMaskSize=
"100% 100%");c.ea.appendChild(b.j)}catch(m){c.N("Error addimage:"+m)}};a.prototype.Sd=function(){this.j.setAttribute("src",this.o.gb(this.o.Va(this.url)))};return a}(x);y.Eq=v;v=function(e){function a(b){b=e.call(this,b)||this;b.code="";return b}__extends(a,e);a.prototype.yb=function(b){e.prototype.yb.call(this,b);var c;if(c=b.getAttributeNode("rotx"))this.Ka=Number(c.nodeValue);if(c=b.getAttributeNode("roty"))this.Oa=Number(c.nodeValue);if(c=b.getAttributeNode("rotz"))this.zb=Number(c.nodeValue);
if(c=b.getAttributeNode("fov"))this.fov=Number(c.nodeValue);if(c=b.getAttributeNode("width"))this.qc=Number(c.nodeValue);if(c=b.getAttributeNode("height"))this.Pc=Number(c.nodeValue);this.Jc=(c=b.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=b.getAttributeNode("clickmode"))this.Ba=Number(c.nodeValue);if(c=b.getAttributeNode("handcursor"))this.jg=1==Number(c.nodeValue);if(c=b.getAttributeNode("code"))this.code=c.nodeValue.toString()};a.prototype.Be=function(){this.ye=!1;this.j.style[this.o.ac]=
"none"};a.prototype.Ae=function(){1!==this.Ba&&4!==this.Ba||this.nf(!this.Na)};a.prototype.nf=function(b){var c=this.o;if(1===this.Ba||4===this.Ba)this.Na=b,this.rf&&(this.j.style.visibility="visible",this.j.style.opacity=this.Na?"0.0":"1.0"),this.Na?(this.j.style.cursor="pointer",this.j.style.zIndex=(c.Lf+8E4).toString(),this.j.style[c.ac]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.cursor="default",this.j.style.zIndex=c.Lf.toString(),this.j.style[c.ac]="all 1s ease 0s"),this.ye=!0,
c.Fm()};a.prototype.addElement=function(){var b=this,c=this.o;try{b.j=document.createElement("div");this.jq();b.j.setAttribute("style","max-width:none;");b.j.setAttribute("class","ggmedia");c.De&&b.j.setAttribute("id",c.De+b.id);if(1===b.Ba||4===b.Ba)b.j.addEventListener(c.Qm(),function(){b.Be()},!1),b.j.addEventListener("transitionend",function(){b.Be()},!1);c.Ub.push(b);b.j.style.position="absolute";b.j.style.visibility="hidden";0==b.Ba?c.Ia.insertBefore(b.j,c.Ia.firstChild):c.ea.appendChild(b.j)}catch(m){c.N("Error addwebelement:"+
m)}};a.prototype.jq=function(){var b=this.j.innerHTML,c=this.o.Va(this.code);c!=b&&(this.j.innerHTML=c)};a.prototype.Sd=function(){this.jq()};return a}(x);y.Gq=v;x=function(e){function a(b){b=e.call(this,b)||this;b.gn=50;b.alpha=50;b.type=0;b.color=16777215;return b}__extends(a,e);a.prototype.yb=function(b){e.prototype.yb.call(this,b);var c;if(c=b.getAttributeNode("blinding"))this.gn=Number(c.nodeValue);if(c=b.getAttributeNode("alpha"))this.alpha=Number(c.nodeValue);if(c=b.getAttributeNode("type"))this.type=
Number(c.nodeValue);if(c=b.getAttributeNode("color"))this.color=1*Number(c.nodeValue)};return a}(x);y.Fq=x;x=function(){function e(a){this.o=a;this.type="empty";this.pm=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.qk=!1;this.j=null;this.Tl=this.Sl=this.Qb=this.ec=this.kb=this.Ca=this.distance=this.u=this.pan=0;this.visible=!0;this.Yb=a.K.Yb;this.Wb=a.K.Wb;this.Xb=a.K.Xb;this.Vb=a.K.Vb;this.Ce=a.K.Ce;this.gd="";this.yd=this.ff=0;this.Jf=!1;this.Yi=0;this.vertices=
[]}e.prototype.$f=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.pm;this.obj=this.j;this.customimage=this.gd;this.customimagewidth=this.ff;this.customimageheight=this.yd;this.use3D=this.Jf;this.distance3D=this.Yi;this.j&&this.j.__div&&(this.div=this.j.__div)};e.prototype.Ou=function(){var a=this.url;return"{"==a.charAt(0)?a.substr(1,a.length-
2):!1};e.prototype.yb=function(a){var b;if(b=a.getAttributeNode("url"))this.url=b.nodeValue.toString();if(b=a.getAttributeNode("target"))this.target=b.nodeValue.toString();if(b=a.getAttributeNode("title"))this.title=b.nodeValue.toString();if(b=a.getAttributeNode("description"))this.description=b.nodeValue.toString();if(b=a.getAttributeNode("id"))this.id=b.nodeValue.toString();if(b=a.getAttributeNode("skinid"))this.pm=b.nodeValue.toString();if(b=a.getAttributeNode("width"))this.w=Number(b.nodeValue);
if(b=a.getAttributeNode("height"))this.h=Number(b.nodeValue);if(b=a.getAttributeNode("wordwrap"))this.qk=1==Number(b.nodeValue);b=a.getAttributeNode("pan");this.pan=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("tilt");this.u=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("fov");this.fov=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("distance");this.distance=1*(b?Number(b.nodeValue):0);if(b=a.getAttributeNode("bordercolor"))this.Yb=1*Number(b.nodeValue);if(b=a.getAttributeNode("backgroundcolor"))this.Wb=
1*Number(b.nodeValue);if(b=a.getAttributeNode("borderalpha"))this.Xb=1*Number(b.nodeValue);if(b=a.getAttributeNode("backgroundalpha"))this.Vb=1*Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.Ce=1==Number(b.nodeValue);if(b=a.getAttributeNode("customimage"))this.gd=this.o.Xn()+b.nodeValue;if(b=a.getAttributeNode("customimagewidth"))this.ff=Number(b.nodeValue);if(b=a.getAttributeNode("customimageheight"))this.yd=Number(b.nodeValue);if(b=a.getAttributeNode("use3D"))this.Jf=1==Number(b.nodeValue);
if(b=a.getAttributeNode("distance3D"))this.Yi=Number(b.nodeValue);for(a=a.firstChild;a;){if("polystring"==a.nodeName){b=a.textContent.toString().split("|");for(var c=0;c<b.length;c++){var m=b[c].split("/");if(2==m.length){var h={pan:0,u:0};h.pan=Number(m[0]);h.u=Number(m[1]);this.vertices.push(h)}}}"vertex"==a.nodeName&&(h={pan:0,u:0},b=a.getAttributeNode("pan"),h.pan=1*(b?Number(b.nodeValue):0),b=a.getAttributeNode("tilt"),h.u=1*(b?Number(b.nodeValue):0),this.vertices.push(h));a=a.nextSibling}this.$f()};
return e}();y.Ki=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f,e){this.x=f;this.y=e}v.prototype.init=function(f,e){this.x=f;this.y=e};v.prototype.Yd=function(f,e,a){var b=e.y-f.y;this.x=f.x+(e.x-f.x)*a;this.y=f.y+b*a};v.prototype.Vq=function(f,e,a,b,c){var m=new v;m.Yd(f,a,c);f=new v;f.Yd(a,b,c);a=new v;a.Yd(b,e,c);e=new v;e.Yd(m,f,c);m=new v;m.Yd(f,a,c);f=new v;f.Yd(e,m,c);this.x=f.x;this.y=f.y};v.prototype.yk=function(f,e,a,b,c){var m=new v,h=.5,n=.25;do{m.Vq(f,e,a,b,h);var p=m.x-c;h=0<p?h-n:h+n;n/=2}while(.01<Math.abs(p));
this.x=m.x;this.y=m.y};return v}();y.Nc=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f,e,a,b,c){this.x=f;this.y=e;this.z=a;this.Nd=b;this.ic=c}v.prototype.init=function(f,e,a,b,c){this.x=f;this.y=e;this.z=a;this.Nd=b;this.ic=c};v.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+") - ("+this.Nd+","+this.ic+")"};v.prototype.Ka=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.y,b=this.z;this.y=f*a-e*b;this.z=e*a+f*b};v.prototype.Ut=function(){var f=this.y;this.y=-this.z;this.z=f};v.prototype.Tt=function(){var f=this.y;
this.y=this.z;this.z=-f};v.prototype.Oa=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.x,b=this.z;this.x=f*a+e*b;this.z=-e*a+f*b};v.prototype.Vt=function(){var f=this.x;this.x=-this.z;this.z=f};v.prototype.zb=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.x,b=this.y;this.x=f*a-e*b;this.y=e*a+f*b};v.prototype.yp=function(){var f=this.x;this.x=-this.y;this.y=f};v.prototype.ce=function(f){this.Ka(f*Math.PI/180)};v.prototype.Ef=function(f){this.Oa(f*Math.PI/180)};v.prototype.Ff=function(f){this.zb(f*
Math.PI/180)};v.prototype.clone=function(){return new v(this.x,this.y,this.z,this.Nd,this.ic)};v.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};v.prototype.normalize=function(){var f=this.length();0<f&&(f=1/f,this.x*=f,this.y*=f,this.z*=f)};v.prototype.Nj=function(f){return this.x*f.x+this.y*f.y+this.z*f.z};v.prototype.Mn=function(f,e){var a=Math.cos(e*Math.PI/180);this.x=a*Math.sin(f*Math.PI/180);this.y=Math.sin(e*Math.PI/180);this.z=a*Math.cos(f*Math.PI/
180)};v.prototype.Rq=function(){return 180*Math.atan2(-this.x,-this.z)/Math.PI};v.prototype.Sq=function(){return 180*Math.asin(this.y/this.length())/Math.PI};v.prototype.Yd=function(f,e,a){this.x=f.x*a+e.x*(1-a);this.y=f.y*a+e.y*(1-a);this.z=f.z*a+e.z*(1-a);this.Nd=f.Nd*a+e.Nd*(1-a);this.ic=f.ic*a+e.ic*(1-a)};return v}();y.Ua=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(){this.Dp()}v.prototype.Dp=function(){this.tc=1;this.Lc=this.uc=this.Pb=0;this.vc=1;this.wc=this.cc=this.Mc=0;this.dc=1};v.prototype.clone=function(f){this.tc=f.tc;this.Pb=f.Pb;this.uc=f.uc;this.Lc=f.Lc;this.vc=f.vc;this.Mc=f.Mc;this.cc=f.cc;this.wc=f.wc;this.dc=f.dc};v.prototype.mu=function(f){var e=Math.cos(f);f=Math.sin(f);this.tc=1;this.Lc=this.uc=this.Pb=0;this.vc=e;this.Mc=-f;this.cc=0;this.wc=f;this.dc=e};v.prototype.nu=function(f){var e=Math.cos(f);
f=Math.sin(f);this.tc=e;this.Pb=0;this.uc=f;this.Lc=0;this.vc=1;this.Mc=0;this.cc=-f;this.wc=0;this.dc=e};v.prototype.ou=function(f){var e=Math.cos(f);f=Math.sin(f);this.tc=e;this.Pb=-f;this.uc=0;this.Lc=f;this.vc=e;this.wc=this.cc=this.Mc=0;this.dc=1};v.prototype.ju=function(f){this.mu(f*Math.PI/180)};v.prototype.ku=function(f){this.nu(f*Math.PI/180)};v.prototype.lu=function(f){this.ou(f*Math.PI/180)};v.prototype.ce=function(f){this.md||(this.md=new v,this.He=new v);this.md.ju(f);this.He.clone(this);
this.multiply(this.md,this.He)};v.prototype.Ef=function(f){this.md||(this.md=new v,this.He=new v);this.md.ku(f);this.He.clone(this);this.multiply(this.md,this.He)};v.prototype.Ff=function(f){this.md||(this.md=new v,this.He=new v);this.md.lu(f);this.He.clone(this);this.multiply(this.md,this.He)};v.prototype.multiply=function(f,e){this.tc=f.tc*e.tc+f.Pb*e.Lc+f.uc*e.cc;this.Pb=f.tc*e.Pb+f.Pb*e.vc+f.uc*e.wc;this.uc=f.tc*e.uc+f.Pb*e.Mc+f.uc*e.dc;this.Lc=f.Lc*e.tc+f.vc*e.Lc+f.Mc*e.cc;this.vc=f.Lc*e.Pb+
f.vc*e.vc+f.Mc*e.wc;this.Mc=f.Lc*e.uc+f.vc*e.Mc+f.Mc*e.dc;this.cc=f.cc*e.tc+f.wc*e.Lc+f.dc*e.cc;this.wc=f.cc*e.Pb+f.wc*e.vc+f.dc*e.wc;this.dc=f.cc*e.uc+f.wc*e.Mc+f.dc*e.dc};v.prototype.jt=function(f){var e=f.x;var a=f.y;var b=f.z;f.x=e*this.tc+a*this.Pb+b*this.uc;f.y=e*this.Lc+a*this.vc+b*this.Mc;f.z=e*this.cc+a*this.wc+b*this.dc};return v}();y.Tm=x})(ggP2VR||(ggP2VR={}));
(function(y){y.la={create:function(x){var v="undefined"!=typeof Float32Array?new Float32Array(16):Array(16);x&&(v[0]=x[0],v[1]=x[1],v[2]=x[2],v[3]=x[3],v[4]=x[4],v[5]=x[5],v[6]=x[6],v[7]=x[7],v[8]=x[8],v[9]=x[9],v[10]=x[10],v[11]=x[11],v[12]=x[12],v[13]=x[13],v[14]=x[14],v[15]=x[15]);return v},set:function(x,v){v[0]=x[0];v[1]=x[1];v[2]=x[2];v[3]=x[3];v[4]=x[4];v[5]=x[5];v[6]=x[6];v[7]=x[7];v[8]=x[8];v[9]=x[9];v[10]=x[10];v[11]=x[11];v[12]=x[12];v[13]=x[13];v[14]=x[14];v[15]=x[15];return v},identity:function(x){x[0]=
1;x[1]=0;x[2]=0;x[3]=0;x[4]=0;x[5]=1;x[6]=0;x[7]=0;x[8]=0;x[9]=0;x[10]=1;x[11]=0;x[12]=0;x[13]=0;x[14]=0;x[15]=1;return x},multiply:function(x,v,f){f||(f=x);var e=x[0],a=x[1],b=x[2],c=x[3],m=x[4],h=x[5],n=x[6],p=x[7],r=x[8],t=x[9],w=x[10],z=x[11],C=x[12],F=x[13],E=x[14];x=x[15];var D=v[0],A=v[1],G=v[2],J=v[3],H=v[4],I=v[5],L=v[6],K=v[7],M=v[8],Q=v[9],R=v[10],S=v[11],U=v[12],V=v[13],W=v[14];v=v[15];f[0]=D*e+A*m+G*r+J*C;f[1]=D*a+A*h+G*t+J*F;f[2]=D*b+A*n+G*w+J*E;f[3]=D*c+A*p+G*z+J*x;f[4]=H*e+I*m+L*r+
K*C;f[5]=H*a+I*h+L*t+K*F;f[6]=H*b+I*n+L*w+K*E;f[7]=H*c+I*p+L*z+K*x;f[8]=M*e+Q*m+R*r+S*C;f[9]=M*a+Q*h+R*t+S*F;f[10]=M*b+Q*n+R*w+S*E;f[11]=M*c+Q*p+R*z+S*x;f[12]=U*e+V*m+W*r+v*C;f[13]=U*a+V*h+W*t+v*F;f[14]=U*b+V*n+W*w+v*E;f[15]=U*c+V*p+W*z+v*x;return f},translate:function(x,v,f){var e=v[0],a=v[1];v=v[2];if(!f||x==f)return x[12]=x[0]*e+x[4]*a+x[8]*v+x[12],x[13]=x[1]*e+x[5]*a+x[9]*v+x[13],x[14]=x[2]*e+x[6]*a+x[10]*v+x[14],x[15]=x[3]*e+x[7]*a+x[11]*v+x[15],x;var b=x[0],c=x[1],m=x[2],h=x[3],n=x[4],p=x[5],
r=x[6],t=x[7],w=x[8],z=x[9],C=x[10],F=x[11];f[0]=b;f[1]=c;f[2]=m;f[3]=h;f[4]=n;f[5]=p;f[6]=r;f[7]=t;f[8]=w;f[9]=z;f[10]=C;f[11]=F;f[12]=b*e+n*a+w*v+x[12];f[13]=c*e+p*a+z*v+x[13];f[14]=m*e+r*a+C*v+x[14];f[15]=h*e+t*a+F*v+x[15];return f},scale:function(x,v,f){var e=v[0],a=v[1];v=v[2];if(!f||x==f)return x[0]*=e,x[1]*=e,x[2]*=e,x[3]*=e,x[4]*=a,x[5]*=a,x[6]*=a,x[7]*=a,x[8]*=v,x[9]*=v,x[10]*=v,x[11]*=v,x;f[0]=x[0]*e;f[1]=x[1]*e;f[2]=x[2]*e;f[3]=x[3]*e;f[4]=x[4]*a;f[5]=x[5]*a;f[6]=x[6]*a;f[7]=x[7]*a;f[8]=
x[8]*v;f[9]=x[9]*v;f[10]=x[10]*v;f[11]=x[11]*v;f[12]=x[12];f[13]=x[13];f[14]=x[14];f[15]=x[15];return f},rotate:function(x,v,f,e){var a=f[0],b=f[1];f=f[2];var c=Math.sqrt(a*a+b*b+f*f);if(!c)return null;1!=c&&(c=1/c,a*=c,b*=c,f*=c);var m=Math.sin(v),h=Math.cos(v),n=1-h;v=x[0];c=x[1];var p=x[2],r=x[3],t=x[4],w=x[5],z=x[6],C=x[7],F=x[8],E=x[9],D=x[10],A=x[11],G=a*a*n+h,J=b*a*n+f*m,H=f*a*n-b*m,I=a*b*n-f*m,L=b*b*n+h,K=f*b*n+a*m,M=a*f*n+b*m;a=b*f*n-a*m;b=f*f*n+h;e?x!=e&&(e[12]=x[12],e[13]=x[13],e[14]=x[14],
e[15]=x[15]):e=x;e[0]=v*G+t*J+F*H;e[1]=c*G+w*J+E*H;e[2]=p*G+z*J+D*H;e[3]=r*G+C*J+A*H;e[4]=v*I+t*L+F*K;e[5]=c*I+w*L+E*K;e[6]=p*I+z*L+D*K;e[7]=r*I+C*L+A*K;e[8]=v*M+t*a+F*b;e[9]=c*M+w*a+E*b;e[10]=p*M+z*a+D*b;e[11]=r*M+C*a+A*b;return e},wr:function(x,v,f,e,a,b,c){c||(c=y.la.create());var m=v-x,h=e-f,n=b-a;c[0]=2*a/m;c[1]=0;c[2]=0;c[3]=0;c[4]=0;c[5]=2*a/h;c[6]=0;c[7]=0;c[8]=(v+x)/m;c[9]=(e+f)/h;c[10]=-(b+a)/n;c[11]=-1;c[12]=0;c[13]=0;c[14]=-(b*a*2)/n;c[15]=0;return c},perspective:function(x,v,f,e,a){x=
f*Math.tan(x*Math.PI/360);v*=x;return y.la.wr(-v,v,-x,x,f,e,a)},zv:function(x,v,f,e,a,b,c){c||(c=y.la.create());var m=v-x,h=e-f,n=b-a;c[0]=2/m;c[1]=0;c[2]=0;c[3]=0;c[4]=0;c[5]=2/h;c[6]=0;c[7]=0;c[8]=0;c[9]=0;c[10]=-2/n;c[11]=0;c[12]=-(x+v)/m;c[13]=-(e+f)/h;c[14]=-(b+a)/n;c[15]=1;return c}}})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f){this.ya=y.la.create();this.Db=y.la.create();this.Wd=0;this.eb=[];this.Mh=!1;this.um=this.Zk=this.Xl=1;this.Vf=1E6;this.Vi=[!1,!1,!1,!1,!1,!1];this.Xj=!1;this.Sk=[];this.rh=!1;this.Um=8;this.$s=new y.Tm;this.te=[];this.Lm=null;this.o=f;this.L=f.L;if(f.kd||f.Jh)f.L.Am=2}v.prototype.Ih=function(){var f=this.o.S;if(f){var e=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\t\tvoid main(void) {\n\t\t\t\t\t\tgl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n\t\t\t\t\t}");
f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(console&&console.log(f.getShaderInfoLog(e)),alert(f.getShaderInfoLog(e)),e=null);var a=f.createShader(f.VERTEX_SHADER);this.jd(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\n\t\t\t\tattribute vec2 aTextureCoord;\n\t\t\t\tuniform mat4 uMVMatrix;\n\t\t\t\tuniform mat4 uPMatrix;\n\t\t\t\tuniform float uZoffset;\n\t\t\t\tvarying vec2 vTextureCoord;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n\t\t\t\t\tgl_Position.z += uZoffset;\n\t\t\t\t\tvTextureCoord = aTextureCoord;\n\t\t\t\t}");
this.O=f.createProgram();this.pg(this.O,a,e);this.O.ja=f.getAttribLocation(this.O,"aVertexPosition");f.enableVertexAttribArray(this.O.ja);this.O.La=f.getAttribLocation(this.O,"aTextureCoord");f.enableVertexAttribArray(this.O.La);this.O.Ie=f.getUniformLocation(this.O,"uPMatrix");this.O.$h=f.getUniformLocation(this.O,"uMVMatrix");this.O.xg=f.getUniformLocation(this.O,"uSampler");this.O.uk=f.getUniformLocation(this.O,"uZoffset");e=f.createShader(f.VERTEX_SHADER);this.jd(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 0.0, 1.0);\n\t\t\t\t}");
a=f.createShader(f.FRAGMENT_SHADER);this.jd(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform vec3 uColor;\n\t\t\t\tuniform float uAlpha;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_FragColor = vec4(uColor, uAlpha);\n\t\t\t\t}");this.be=f.createProgram();this.pg(this.be,e,a);this.be.ja=f.getAttribLocation(this.be,"aVertexPosition");f.enableVertexAttribArray(this.be.ja);a=f.createShader(f.VERTEX_SHADER);this.jd(a,"precision highp float;\n\t\t\t\tattribute vec3 aVertexPosition;\n\t\t\t\tvarying vec2 vTextureCoord;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tuniform vec4 uRect;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pos = vec2(uRect.x + uRect.z*aVertexPosition.x,uRect.y + uRect.w*aVertexPosition.y);\n\t\t\t\t\tvec2 pointNorm = (pos / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 1.0, 1.0);\n\t\t\t\t\tvTextureCoord.s=aVertexPosition.x;\n\t\t\t\t\tvTextureCoord.t=1.0-aVertexPosition.y;\n\t\t\t\t}");
e=f.createShader(f.FRAGMENT_SHADER);this.jd(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_FragColor = texture2D(uSampler,vTextureCoord);\n\t\t\t\t}");this.vh=f.createProgram();this.pg(this.vh,a,e)}};v.prototype.qj=function(){var f=this.o,e=f.S;if(e){var a=e.createShader(e.FRAGMENT_SHADER);var b=this.jl(13);this.jd(a,b);b=e.createShader(e.VERTEX_SHADER);
this.jd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nuniform float zOffset;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, zOffset, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n");
this.pp=e.createProgram();this.pg(this.pp,b,a);a=e.createShader(e.FRAGMENT_SHADER);b=this.jl(4);this.jd(a,b);b=e.createShader(e.VERTEX_SHADER);this.jd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nuniform float zOffset;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, zOffset, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n");
this.qp=e.createProgram();this.pg(this.qp,b,a);a=e.createShader(e.FRAGMENT_SHADER);b=this.jl(f.A.format);this.jd(a,b);b=e.createShader(e.VERTEX_SHADER);this.jd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 0.0, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n");
this.rp=e.createProgram();this.pg(this.rp,b,a);this.Pj||(this.Pj=e.createBuffer())}else this.o.N("No WebGL to initRemapShader!")};v.prototype.jd=function(f,e){var a=this.o.S;a.shaderSource(f,e);a.compileShader(f);a.getShaderParameter(f,a.COMPILE_STATUS)||(console&&console.log(a.getShaderInfoLog(f)),Y&&alert(a.getShaderInfoLog(f)))};v.prototype.pg=function(f,e,a){var b=this.o.S;b.attachShader(f,e);b.attachShader(f,a);b.linkProgram(f);b.getProgramParameter(f,b.LINK_STATUS)||(alert("Could not initialise shader program"),
console&&console.log(b.getError()));b.useProgram(f)};v.prototype.jl=function(f){var e=this.o;var a="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define M_PI 3.14159265358979323846\nvarying vec2 dst;\nuniform vec2 srcScale;\nuniform vec2 srcOffset;\nuniform float rectDstDistance;\nuniform float fisheyeDistance;\nuniform float stereoDistance;\nuniform float directionBlend;\nuniform mat4 matRotate; // = mat4( 1.0,0.0,0.0,0.0, 0.0,1.0,0.0,0.0, 0.0,0.0,1.0,0.0, 0.0,0.0,0.0,1.0 );\nconst float rectSrcDistance = 1.0;\nuniform vec2 tonemap;\n";
a=(13==f?a+"uniform samplerCube cubeTexture;":a+"uniform sampler2D tileTexture;\n")+"void main()\n{\n";a+="vec4 direction;\n";a+="vec2 src;\n";a+="vec2 srcCord;\n";a+="vec2 texc;\n";var b=this.ro(e.Z());e.Z()!=e.Ic()&&0!=e.Ic()?(e=this.ro(e.Ic()),a+="vec4 direction1,direction2;\n",a+=b.replace("direction=","direction1="),a+=e.replace("direction=","direction2="),a+="direction=normalize(mix(direction1, direction2,1.0-directionBlend));\n"):a+=b;a+="direction=direction*matRotate;\n";13==f&&(a+="direction.z=-direction.z;",
a+="gl_FragColor = textureCube(cubeTexture, direction.xyz);");4==f&&(a+="float iz=1.0/(direction.z * rectSrcDistance);\n",a+="src.x=-direction.x*iz;\n",a+="src.y= direction.y*iz;\n",a+="texc=src * srcScale + srcOffset;\n",a+="if (",a+="(direction.z<0.0) && ",a+="(texc.x>=0.0) && (texc.x<=1.0) && (texc.y>=0.0) && (texc.y<=1.0)) {\n",a=this.rh?a+" gl_FragColor = vec4(0.5,0.5,0,1);\n":a+"  gl_FragColor = texture2D(tileTexture, texc);\n",a+="} else {\n",a=this.rh?a+" gl_FragColor = vec4(0.5,0,0,0.3);\n":
a+"  discard;\n",a+="}\n");1==f&&(a+="src.x=atan(float(-direction.x), float(-direction.z));",a+="src.y=asin(direction.y);\n",a+="texc=src * srcScale + srcOffset;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");14==f&&(a+="vec2 cf;\n",a+="if ((direction.z<0.0) && (direction.z<=-abs(direction.x)) && (direction.z<=-abs(direction.y))) {\n",a+="  src.x=-direction.x/direction.z;\n",a+="  src.y=+direction.y/direction.z;\n",a+="  cf.x=1.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x>=0.0) && (direction.x>=abs(direction.y)) && (direction.x>=abs(direction.z))) {\n",
a+="  src.x=+direction.z/direction.x;\n",a+="  src.y=-direction.y/direction.x;\n",a+="  cf.x=3.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.z>=0.0) && (direction.z>=abs(direction.x)) && (direction.z>=abs(direction.y))) {\n",a+="  src.x=-direction.x/direction.z;\n",a+="  src.y=-direction.y/direction.z;\n",a+="  cf.x=5.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x<=0.0) && (direction.x<=-abs(direction.y)) && (direction.x<=-abs(direction.z))) {\n",a+="  src.x=+direction.z/direction.x;\n",a+="  src.y=+direction.y/direction.x;\n",
a+="  cf.x=1.0;cf.y=1.0;\n",a+="}\n",a+="if ((direction.y>=0.0) && (direction.y>=abs(direction.x)) && (direction.y>=abs(direction.z))) {\n",a+="  src.x=+direction.x/direction.y;\n",a+="  src.y=-direction.z/direction.y;\n",a+="  cf.x=5.0;cf.y=1.0;\n",a+="}\n",a+="if ((direction.y<=0.0) && (direction.y<=-abs(direction.x)) && (direction.y<=-abs(direction.z))) {\n",a+="  src.x=-direction.x/direction.y;\n",a+="  src.y=-direction.z/direction.y;\n",a+="  cf.x=3.0;cf.y=1.0;\n",a+="}\n",a+="texc.x=(cf.x+src.x*srcScale.x) / 6.0;\n",
a+="texc.y=(cf.y+src.y*srcScale.y) / 4.0;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");return a+="}\n"};v.prototype.ro=function(f){var e="";switch(f){case 4:e+="direction.x=dst.x*rectDstDistance;\ndirection.y=dst.y*rectDstDistance;\ndirection.z=-1.0;\n";break;case 12:e+="float r,ph,ro;\nr=length(dst.xy)*0.5;\nro=atan(float(dst.x),float(-dst.y));\nph=r / fisheyeDistance;\ndirection.x= sin(ph) * sin(ro);\ndirection.y=-sin(ph) * cos(ro);\ndirection.z=-cos(ph);\n";break;case 9:e+="float n;\nvec2 ind;\nind=dst*stereoDistance;\nn=1.0 + ind.x*ind.x + ind.y*ind.y;\ndirection.x=2.0*ind.x/n;\ndirection.y=2.0*ind.y/n;\ndirection.z=(n-2.0)/n;\n"}return e+
"direction.w=0.0;\ndirection=normalize(direction);\n"};v.prototype.Ao=function(f){var e,a,b=this.o,c=this.o.S;this.Ok=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.Ok);var m=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];for(e=0;12>e;e++)2>e%3&&(m[e]*=f);c.bufferData(c.ARRAY_BUFFER,new Float32Array(m),c.STATIC_DRAW);this.ef=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.ef);var h=[1,0,0,0,0,1,1,1];c.bufferData(c.ARRAY_BUFFER,new Float32Array(h),c.STATIC_DRAW);this.xd=c.createBuffer();c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,
this.xd);var n=[0,1,2,0,2,3];c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(n),c.STATIC_DRAW);m=[];n=[];h=[];var p=new y.Ua;for(f=0;6>f;f++){var r=f%3;var t=3>f?1:0;for(a=0;4>a;a++){p.x=-1;p.y=-1;p.z=1;for(e=0;e<a;e++)p.yp();h.push((0>p.x?.33:0)+.33*r,(0>p.y?0:.5)+.5*t);if(4>f)for(e=0;e<f;e++)p.Vt();else 5==f?p.Ut():p.Tt();m.push(p.x,p.y,p.z)}e=4*f;n.push(0+e,1+e,2+e,0+e,2+e,3+e)}b.A.lk=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,b.A.lk);c.bufferData(c.ARRAY_BUFFER,new Float32Array(m),c.STATIC_DRAW);
b.A.Ai=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,b.A.Ai);c.bufferData(c.ARRAY_BUFFER,new Float32Array(h),c.STATIC_DRAW);b.A.pj=c.createBuffer();c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,b.A.pj);c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(n),c.STATIC_DRAW);this.Is=c.createBuffer();this.Hs=c.createBuffer()};v.prototype.ql=function(f){var e=this;return function(){try{if(f.ot)return;var a=e.o.S;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);var b=!1;null!=f.wf&&f.wf.complete?f.vo||(a.bindTexture(a.TEXTURE_2D,
f),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f.wf),b=f.vo=!0):null!=f.Bf&&f.Bf.complete&&(a.bindTexture(a.TEXTURE_2D,f),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f.Bf),b=!0);b&&(f.loaded=!0,e.o.D.Zc&&("previewtrack"==e.o.D.delay||"videopano"==e.o.D.delay&&!e.o.A.j)&&e.kp()&&e.o.Zj(null));a.bindTexture(a.TEXTURE_2D,null);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,0)}catch(c){e.o.N(c)}e.o.update(2)}};v.prototype.Bo=function(){var f=this.o,e=f.S;if(this.eb)for(;0<this.eb.length;)e.deleteTexture(this.eb.pop());
this.eb=[];for(var a=0;6>a;a++){var b=e.createTexture();this.Wd++;b.Bf=null;b.wf=null;b.vo=!1;e.bindTexture(e.TEXTURE_2D,b);e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null);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);if(f.lh[a]){var c=new Image;c.crossOrigin=f.crossOrigin;c.src=f.gb(f.lh[a]);b.Bf=c;c.addEventListener&&c.addEventListener("load",
this.ql(b),!1);f.wd.push(c)}this.eb.push(b)}for(a=0;6>a;a++)f.kh[a]&&(c=new Image,c.crossOrigin=f.crossOrigin,c.src=f.gb(f.kh[a]),c.addEventListener?c.addEventListener("load",this.ql(this.eb[a]),!1):c.onload=this.ql(this.eb[a]),this.eb[a].wf=c,f.wd.push(c));for(a=0;a<f.U.length;a++)f.U[a].od||(f.U[a].texture=e.createTexture(),f.Wd++,e.bindTexture(e.TEXTURE_2D,f.U[a].texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null),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));f.A.texture=e.createTexture();f.Wd++;e.bindTexture(e.TEXTURE_2D,f.A.texture);e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null);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.bindTexture(e.TEXTURE_2D,null)};v.prototype.ov=
function(){var f=this.o;if(f.C.width!=f.ea.offsetWidth||f.C.height!=f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.we&&(f.Rc(0),f.hc());if(f.S){var e=f.S;this.gk();e.clear(e.DEPTH_BUFFER_BIT);e.useProgram(this.O);this.Bg(0);e.uniform1i(this.O.xg,0);e.enableVertexAttribArray(this.O.ja);e.enableVertexAttribArray(this.O.La);e.bindBuffer(e.ARRAY_BUFFER,this.ef);e.vertexAttribPointer(this.O.La,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,
this.xd);e.uniform1f(this.O.uk,1E-4);e.vertexAttribPointer(this.O.ja,3,e.FLOAT,!1,0,0);y.la.identity(this.Db);y.la.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);e.uniformMatrix4fv(this.O.Ie,!1,this.Db);for(f=0;6>f;f++)this.Bg(f),e.bindBuffer(e.ARRAY_BUFFER,this.Ok),e.vertexAttribPointer(this.O.ja,3,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.ef),e.vertexAttribPointer(this.O.La,2,e.FLOAT,!1,0,0),6<=this.eb.length&&this.eb[f].loaded&&(e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,
this.eb[f]),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd),e.uniform1i(this.O.xg,0),e.uniformMatrix4fv(this.O.$h,!1,this.ya),e.uniformMatrix4fv(this.O.Ie,!1,this.Db),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0))}};v.prototype.gk=function(){var f=this.o,e=this.L;e.M.Lj&&6<e.M.Lj.length&&(e=parseInt(e.M.Lj),f.S.clearColor((e>>16&255)/255,(e>>8&255)/255,(e>>0&255)/255,1))};v.prototype.Bg=function(f,e){void 0===e&&(e=1);var a=this.o;y.la.identity(this.ya);y.la.rotate(this.ya,e*-a.W.m*Math.PI/180,[0,
0,1]);y.la.rotate(this.ya,e*-a.u.m*Math.PI/180,[1,0,0]);-1==e?y.la.rotate(this.ya,-a.pan.m*Math.PI/180,[0,1,0]):y.la.rotate(this.ya,(180-a.pan.m)*Math.PI/180,[0,1,0]);a.Ya&&(y.la.rotate(this.ya,-a.Ya.pitch*Math.PI/180,[1,0,0]),y.la.rotate(this.ya,a.Ya.W*Math.PI/180,[0,0,1]));4>f?y.la.rotate(this.ya,-Math.PI/2*f,[0,1,0]):y.la.rotate(this.ya,Math.PI/2*(5==f?1:-1),[1,0,0])};v.prototype.Pu=function(f){var e=this;return function(){e.Sk.push(f)}};v.prototype.mr=function(f){this.o.ub=!0;this.o.ph=!0;f.loaded=
!0;f.Yl=0;f.Le=0;var e=this.o.S;this.An();e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);if(null!=f.M&&f.M.complete){f.Ob=e.createTexture();this.o.Wd++;e.bindTexture(e.TEXTURE_2D,f.Ob);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,f.M)}catch(a){e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.o.N(a)}}this.o.update(2)};v.prototype.An=function(){this.o.L.Bi&&this.o.L.Bi--};v.prototype.nr=function(){if(0<this.Sk.length){var f=this.Sk.shift();
this.mr(f)}};v.prototype.kt=function(f){var e=this;return function(){e.o.ub=!0;e.o.ph=!0;var a=e.L.M;try{if(null!=f&&f.complete){var b=a.levels[a.levels.length-1],c=a.ib;b.height=b.width=f.width-2*c;b.Y=b.ta=1;for(var m=0;6>m;m++){var h=new y.Yg;h.Fc=document.createElement("canvas");e.o.na?(h.Fc.width=b.width+2*c,h.Fc.height=b.height+2*c):(h.Fc.width=a.V+2*c,h.Fc.height=a.V+2*c);h.xn=h.Fc.getContext("2d");h.Fc.style[e.o.Bd+"Origin"]="0% 0%";h.Fc.style.overflow="hidden";h.Fc.style.position="absolute";
h.M=f;var n=b.width+2*c,p=b.height+2*c;h.xn&&h.xn.drawImage(f,0,m*p,n,p,0,0,n,p);if(e.o.na&&e.o.S){var r=e.o.S;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1);h.Ob=r.createTexture();e.o.Wd++;r.bindTexture(r.TEXTURE_2D,h.Ob);try{r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,h.Fc)}catch(t){e.o.N(t)}r.bindTexture(r.TEXTURE_2D,null);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,0)}e.o.Ng&&(h.Fc.vv=-1,e.o.ea.insertBefore(h.Fc,e.o.ea.firstChild));b.Ma[m]=h}b.loaded=!0;e.o.D.Zc&&("previewtrack"==e.o.D.delay||"videopano"==
e.o.D.delay&&!e.o.A.j)&&e.o.Zj(null)}}catch(t){e.o.N(t)}e.o.update(2)}};v.prototype.cq=function(f){var e=this;return function(){e.o.ub=!0;e.o.ph=!0;e.An();f.M=null}};v.prototype.mv=function(){var f=this.o,e=this.L,a=e.M,b=a.levels;f.we&&(f.Rc(0),f.hc());if(f.S){var c=f.S;c.useProgram(this.O);this.gk();c.clear(c.DEPTH_BUFFER_BIT);c.enable(c.DEPTH_TEST);y.la.identity(this.Db);y.la.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);c.uniformMatrix4fv(this.O.Ie,!1,this.Db);e.av();e.So();var m=
e.Jn();var h=b.length-1;for(e.ie=0;h>=m;){var n=b[h],p=1;h==b.length-1&&0==a.ib&&(p=a.V/(a.V-.5));for(var r=0;6>r;r++){var t=e.cube.bg[r];var w=t.ei;if(t.pc&&0<w.Ii&&0<w.pk&&0<w.scale||n.cache){t.ub=!1;t.Qf[h]||(t.Qf[h]={fx:0,fy:0,Id:0,Jd:0});var z=t.Qf[h];n.cache?(z.fx=0,z.fy=0,z.Id=n.Y-1,z.Jd=n.ta-1):e.rs(n,w,z);w=!0;for(var C=z.fy;C<=z.Jd;C++)for(var F=z.fx;F<=z.Id;F++){var E=F+C*n.Y+r*n.Y*n.ta,D=n.Ma[E];D||(D=n.Ma[E]=new y.Yg,f.N("create simple "+h+", <"+E+">"));this.Zi()?D.M||(D.Le?D.Le--:(this.zj(D,
n,e.Ig(r,h,F,C)),f.ub=!0)):e.ie++;if(D.Ob){if(!D.hg){E=.5*h+1;D.hg=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,D.hg);var A=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];A[3]=F*a.V-a.ib;A[0]=Math.min((F+1)*a.V,n.width)+a.ib;A[7]=C*a.V-a.ib;A[1]=Math.min((C+1)*a.V,n.height)+a.ib;A[4]=A[1];A[6]=A[3];A[9]=A[0];A[10]=A[7];for(var G=0;12>G;G++)A[G]=0==G%3?p*E*(-2*A[G]/n.width+1):1==G%3?p*E*(-2*A[G]/n.height+1):E;c.bufferData(c.ARRAY_BUFFER,new Float32Array(A),c.STATIC_DRAW)}}else w=!1;D.visible=t.pc}z.Po=w}}h--}for(r=
0;6>r;r++)if(t=e.cube.bg[r],t.pc)for(w=t.ei,this.Bg(r),c.uniform1i(this.O.xg,0),c.uniformMatrix4fv(this.O.Ie,!1,this.Db),c.uniformMatrix4fv(this.O.$h,!1,this.ya),c.enableVertexAttribArray(this.O.ja),c.enableVertexAttribArray(this.O.La),c.bindBuffer(c.ARRAY_BUFFER,this.ef),c.vertexAttribPointer(this.O.La,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.xd),c.useProgram(this.O),h=m;h<=b.length-1;){n=b[h];if(t.pc&&0<w.Ii&&t.Qf[h]&&0<=t.Qf[h].fx){z=t.Qf[h];for(C=
z.fy;C<=z.Jd;C++)for(F=z.fx;F<=z.Id;F++)E=F+C*n.Y+r*n.Y*n.ta,(D=n.Ma[E])&&D.Ob&&(c.uniform1f(this.O.uk,1E-4*(F%2+C%2*2)),c.bindBuffer(c.ARRAY_BUFFER,D.hg),c.vertexAttribPointer(this.O.ja,3,c.FLOAT,!1,0,0),c.bindTexture(c.TEXTURE_2D,D.Ob),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.drawElements(c.TRIANGLES,
6,c.UNSIGNED_SHORT,0)),D.visible=t.pc;z.Po&&(h=b.length)}h++}this.Zl();f.ph=!1}};v.prototype.Zi=function(){return this.L.Bi<this.L.Am};v.prototype.zj=function(f,e,a){var b=this.L,c=this.o;b.Os++;f.M=new Image;f.Yl++;f.Le=1<<f.Yl;f.M.onload=this.Pu(f);f.M.onerror=this.cq(f);f.M.onabort=this.cq(f);f.M.crossOrigin=c.crossOrigin;f.M.setAttribute("src",a);c.N("load "+a);e.cache&&c.wd.push(f.M);b.Bi++};v.prototype.uq=function(){var f=this.o,e=this.L,a=e.M;f.we&&(f.Rc(0),f.hc());if(f.S){var b=f.S;this.gk();
b.clear(b.DEPTH_BUFFER_BIT);b.disable(b.CULL_FACE);b.bindBuffer(b.ARRAY_BUFFER,this.Pj);var c=[0,0];c[2]=f.C.width;c[3]=0;c[4]=f.C.width;c[5]=f.C.height;c[6]=0;c[7]=f.C.height;b.bufferData(b.ARRAY_BUFFER,new Float32Array(c),b.STATIC_DRAW);e.ie=0;if(!this.Qc||this.Mh)0<a.levels.length?this.kr():this.lr();f.A.Tc?this.Ct():(b.enable(b.DEPTH_TEST),b.depthRange(0,1),b.depthFunc(b.LESS),this.Xj=!1,0<a.levels.length&&this.nv(),this.Qc&&!this.Xj&&this.Bt())}};v.prototype.yu=function(f,e,a,b,c,m,h){var n=
this.o;c=this.L.M;var p=n.C,r=a*c.V/e.width,t=(a+1)*c.V/e.width;a=b*c.V/e.height;e=(b+1)*c.V/e.height;c=.1;h&&(c=.2);this.rh&&(c=0);b=(t-r)*c;1<t&&(t=1);1<e&&(e=1);r-=b;a-=b;c=this.Um;h=(t+b-r)/c;t=(e+b-a)/c;e={x:0,y:0};b={x:0,y:0};f.ol=0;var w=n.jj(),z=new y.Ua,C=this.$s;C.Dp();4>m?C.Ef(-90*m):C.ce(5==m?90:-90);n.Ya&&(C.Ff(n.Ya.W),C.ce(-n.Ya.pitch));C.Ef(-n.pan.m);C.ce(n.u.m);C.Ff(n.W.m);for(m=0;m<=c;m++)for(var F=0;F<=c;F++){var E=2*(r+F*h)-1;var D=2*(a+m*t)-1;z.x=1*E;z.y=1*D;z.z=-1;z.normalize();
C.jt(z);E=this.po(z,e,n.Z());0!=n.Ic()&&1>w&&(D=this.po(z,b,n.Ic()),E&&D?(e.x=e.x*w+b.x*(1-w),e.y=e.y*w+b.y*(1-w)):!E&&D&&(E=!0,e.x=b.x,e.y=b.y));E||(e.x=NaN);f.ig[f.ol++]=p.width/2+e.x*p.width/2;f.ig[f.ol++]=p.height/2-e.y*p.width/2}this.zu(f,c)};v.prototype.po=function(f,e,a){var b=!0;switch(a){case 0:case 4:a=1/(f.z*this.Xl);e.x=-f.x*a;e.y=f.y*a;0<f.z&&(b=!1);break;case 9:1==f.z&&(b=!1);a=1/((1-f.z)*this.um);e.x=f.x*a;e.y=-f.y*a;break;case 12:if(a=Math.sqrt(f.x*f.x+f.y*f.y),0==a)e.x=0,e.y=0;else{var c=
2*this.Zk*Math.acos(-f.z)/a;if(2<a)return!1;e.x=c*f.x;e.y=-c*f.y}}return b};v.prototype.zu=function(f,e){for(var a=this.o,b=[],c,m=f.Pa=0;m<e;m++)for(var h=0;h<e;h++){b[0]=m+h*(e+1);b[1]=m+1+h*(e+1);b[2]=m+(h+1)*(e+1);b[3]=m+1+(h+1)*(e+1);c=!0;for(var n=0;4>n;n++)isNaN(f.ig[2*b[0]])&&(c=!1);if(c){var p=!1,r=!1,t=!1,w=!1;for(n=0;4>n;n++){var z=f.ig[2*b[n]];z<a.C.width&&(r=!0);0<=z&&(p=!0);z=f.ig[2*b[n]+1];z<a.C.height&&(t=!0);0<=z&&(w=!0)}if(c=c&&r&&p&&t&&w)this.rh?(f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=
b[1],f.mb[f.Pa++]=b[1],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[2],f.mb[f.Pa++]=b[2],f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[1],f.mb[f.Pa++]=b[2]):(f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[2],f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[1],f.mb[f.Pa++]=b[3])}}};v.prototype.nv=function(){var f=this.o,e=this.L,a=e.M,b=a.levels;f.we&&(f.Rc(0),f.hc());if(f.S){var c=f.S,m=this.qp;c.useProgram(m);this.Hm(m);c.enable(c.CULL_FACE);c.cullFace(c.FRONT);c.enable(c.STENCIL_TEST);
c.stencilOp(c.KEEP,c.INCR,c.INCR);c.stencilFunc(c.EQUAL,0,255);y.la.identity(this.Db);y.la.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);c.uniformMatrix4fv(c.getUniformLocation(m,"uPMatrix"),!1,this.Db);e.ie=0;e.So();var h=e.Jn(),n=0;var p=b.length-1;for(var r={},t=b[p];t.Cf&&0<p;)p--,t=b[p];for(var w=p,z=w,C=0;6>C;C++)for(var F=0;F<t.ta;F++)for(var E=0;E<t.Y;E++){var D=E+F*t.Y+C*t.Y*t.ta;r[D]=1}for(;p>=h;){var A={};t=b[p];var G=null;0<p&&(G=b[p-1]);var J=!0;for(var H in r)if(r.hasOwnProperty(H)){D=
Number(H);var I=t.Ma[D];C=Number(Math.floor(D/(t.Y*t.ta)));F=Math.floor((D-C*t.Y*t.ta)/t.Y);E=Math.floor(D-(F*t.Y+C*t.Y*t.ta));if(6<=C)console.log("Grrr...");else{var L=e.cube.bg[C];L.ub=!1;I||(I=t.Ma[D]=new y.Yg,f.N("create "+ +p+", <"+D+">"));this.yu(I,t,E,F,Math.max(1,this.Um>>w-p),C,0!=f.Ic());I.visible=0<I.Pa||t.cache;I.uj=3;I.Ph=Date.now();I.visible&&!I.Ob&&(J=!1,this.Zi()?I.M||(I.Le?I.Le--:(this.zj(I,t,e.Ig(C,p,E,F)),f.ub=!0)):this.L.ie++);if(G&&(I.visible||G.cache)){I=(E*a.V+1)/t.width;E=
Math.min(1,((E+1)*a.V-1)/t.width);var K=(F*a.V+1)/t.height;F=Math.min(1,((F+1)*a.V-1)/t.height);D=a.V/G.width;L=a.V/G.height;var M=K;K=Math.floor(K*G.height/a.V);do{var Q=I,R=Math.floor(I*G.width/a.V);do{var S=R+K*G.Y+C*G.Y*G.ta;R<G.Y&&K<G.ta?A[S]=1:f.N("Grrrr");R++;Q+=D}while(Q<E);K++;M+=L}while(M<F)}}}J&&(z=p,20>f.fov.m&&p<this.Vf&&(this.Xj=!0));r=A;p--}this.Zl();c.uniform1i(c.getUniformLocation(m,"tileTexture"),0);c.activeTexture(c.TEXTURE0);p=h;for(h=-1;p<=Math.min(z,this.Vf-1);){t=b[p];for(H in t.Ma)if(t.Ma.hasOwnProperty(H)){r=
Number(H);I=t.Ma[r];C=Math.floor(r/(t.Y*t.ta));F=Math.floor((r-C*t.Y*t.ta)/t.Y);E=Math.floor(r-(F*t.Y+C*t.Y*t.ta));h!=C&&(h=C,this.hk(C,m));if(n>e.rg){f.N("Exceeded painted tiles");this.Xj=!1;break}I.Ob&&(w=r=a.V,E==t.Y-1&&(r=t.width-a.V*E),F==t.ta-1&&(w=t.height-a.V*F),r=(r+2*a.ib)/a.V,w=(w+2*a.ib)/a.V,c.bindTexture(c.TEXTURE_2D,I.Ob),c.uniform2f(c.getUniformLocation(m,"uCanvasDimensions"),f.C.width,f.C.height),A=c.getUniformLocation(m,"srcScale"),c.uniform2f(A,.5*t.width/a.V/r,.5*t.height/a.V/w),
A=c.getUniformLocation(m,"srcOffset"),c.uniform2f(A,(.5*t.width+a.ib-a.V*E)/a.V/r,-(.5*t.height+a.ib-a.V*F)/a.V/w+1),A=c.getUniformLocation(m,"zOffset"),c.uniform1f(A,(p+1)/(b.length+5)),r=c.getAttribLocation(m,"aVertexPosition"),c.disableVertexAttribArray(0),c.disableVertexAttribArray(1),c.disableVertexAttribArray(2),c.enableVertexAttribArray(r),c.activeTexture(c.TEXTURE0),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,
c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.bindBuffer(c.ARRAY_BUFFER,this.Is),c.vertexAttribPointer(r,2,c.FLOAT,!1,0,0),c.bufferData(c.ARRAY_BUFFER,new Float32Array(I.ig),c.DYNAMIC_DRAW),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.Hs),c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(I.mb),c.DYNAMIC_DRAW),this.rh?0==p&&0==C&&c.drawElements(c.LINES,I.Pa,c.UNSIGNED_SHORT,0):c.drawElements(c.TRIANGLES,I.Pa,c.UNSIGNED_SHORT,0),n++)}p++}c.disable(c.CULL_FACE);
c.cullFace(c.FRONT_AND_BACK);f.ph=!1;c.disable(c.STENCIL_TEST)}};v.prototype.hk=function(f,e){var a=this.o.S;y.la.identity(this.ya);this.Bg(f,-1);a.uniformMatrix4fv(a.getUniformLocation(e,"matRotate"),!1,this.ya)};v.prototype.Ct=function(){var f=this.o;if(f.S){var e=f.S,a=this.rp;e.useProgram(a);this.hk(0,a);e.uniform2f(e.getUniformLocation(a,"uCanvasDimensions"),f.C.width,f.C.height);var b=e.getUniformLocation(a,"srcOffset");e.uniform2f(b,.5,.5);1==f.A.format&&(b=e.getUniformLocation(a,"srcScale"),
f.Fd?(e.uniform2f(b,-.5/Math.PI,(f.A.flipY?-.5:.5)/Math.PI),b=e.getUniformLocation(a,"srcOffset"),f.Eg?e.uniform2f(b,.5,.75):e.uniform2f(b,.5,.25)):e.uniform2f(b,-.5/Math.PI,(f.A.flipY?-1:1)/Math.PI));14==f.A.format&&(b=e.getUniformLocation(a,"srcScale"),e.uniform2f(b,1-2*f.A.cf/(f.A.width/3),1-2*f.A.cf/(f.A.height/2)));this.Hm(a);b=e.getUniformLocation(a,"cubeTexture");e.uniform1i(b,0);b=e.getAttribLocation(a,"aVertexPosition");e.disableVertexAttribArray(0);e.disableVertexAttribArray(1);e.disableVertexAttribArray(2);
e.enableVertexAttribArray(b);e.bindBuffer(e.ARRAY_BUFFER,this.Pj);e.vertexAttribPointer(b,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,f.A.texture);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.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,
0)}};v.prototype.Hm=function(f){var e=this.o,a=e.S,b=this.o.C,c=1;switch(e.fov.mode){case 0:c=b.width/b.height;break;case 1:c=1;break;case 2:c=b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4*b.height/3<b.width&&(c=4/3)}b=a.getUniformLocation(f,"rectDstDistance");this.Xl=Math.tan(Math.min(e.fov.m,179)/2*Math.PI/180)*c;a.uniform1f(b,this.Xl);b=a.getUniformLocation(f,"fisheyeDistance");this.Zk=180/(e.fov.m*Math.PI*c);a.uniform1f(b,this.Zk);b=a.getUniformLocation(f,"stereoDistance");
this.um=Math.tan(Math.min(e.fov.m,359)/4*Math.PI/180)*c;a.uniform1f(b,this.um);b=a.getUniformLocation(f,"directionBlend");a.uniform1f(b,e.jj())};v.prototype.Bt=function(){var f=this.o,e=f.S,a=this.pp;e.useProgram(a);e.enable(e.STENCIL_TEST);e.stencilOp(e.KEEP,e.INCR,e.INCR);e.stencilFunc(e.EQUAL,0,255);this.hk(0,a);e.uniform2f(e.getUniformLocation(a,"uCanvasDimensions"),f.C.width,f.C.height);f=e.getUniformLocation(a,"srcScale");e.uniform2f(f,1,1);f=e.getUniformLocation(a,"srcOffset");e.uniform2f(f,
0,0);f=e.getUniformLocation(a,"zOffset");e.uniform1f(f,.9999);this.Hm(a);this.hk(0,a);f=e.getUniformLocation(a,"cubeTexture");e.uniform1i(f,0);a=e.getAttribLocation(a,"aVertexPosition");e.disableVertexAttribArray(0);e.disableVertexAttribArray(1);e.disableVertexAttribArray(2);e.enableVertexAttribArray(a);e.bindBuffer(e.ARRAY_BUFFER,this.Pj);e.vertexAttribPointer(a,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_CUBE_MAP,this.Qc);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,
e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0);e.disable(e.STENCIL_TEST)};v.prototype.lr=function(){var f=this.o,e=f.S;e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE);for(var a=[1,3,5,4,0,2],b=!0,c=!0,m=!1,h=0;6>h;h++)this.eb[h].wf.complete?
this.Vi[h]||(m=!0):b=!1,this.eb[h].Bf.complete||(c=!1);if(c||b)if(!c||b||!this.Qc||m){h=Math.round(f.Se/f.Jg);c=(f.Se-h)/2;f.N("paint cube single - isMain: "+b+" overlap: "+c);this.Vf=0;this.Qc||(this.Qc=e.createTexture());f.Wd++;e.bindTexture(e.TEXTURE_CUBE_MAP,this.Qc);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);m=document.createElement("canvas");m.width=h;m.height=
h;var n=m.getContext("2d");for(h=0;6>h;h++){var p=a[h];this.eb[p].wf.complete?this.Vi[p]||(n.drawImage(this.eb[p].wf,-c,-c),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+h,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,m),this.Vi[p]=!0):(n.drawImage(this.eb[p].Bf,-c,-c,f.Se,f.Se),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+h,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,m))}this.Mh=!b}};v.prototype.kr=function(){var f=this.o,e=this.L.M,a=e.levels,b=f.S,c;var m=a.length-1;if(!(0>m)){a[m].Cf&&m--;var h=512;f.Lh&&(h=256);!f.wg&&2<=
f.devicePixelRatio&&(h=512);for((c=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&c<h&&(h=c);0<m&&a[m-1].width<=h;)m--;h=a[m];if(0!=h.Y){c=m;var n=this.fr(m);this.Mh&&n&&(this.Mh=!1);n||(m=a.length-1,h=a[m],n||(h.Cf?(n=h.loaded,this.Hl(m-1)&&(--m,n=!0)):n=this.Hl(m)),this.Mh=!0);this.Hl(c);if(n&&this.Vf>m){h=a[m];f.N("paint cube level "+m);this.Vf=m;a=e.ib;m=0<a||1<h.Y||1<h.ta;n=c=void 0;m&&(n=document.createElement("canvas"),n.width=h.width,n.height=h.height,2048>h.width&&(1500<h.width?(n.width=2048,
n.height=2048):700<h.width?(n.width=1024,n.height=1024):(n.width=512,n.height=512)),c=n.getContext("2d"));this.Qc=b.createTexture();f.Wd++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.Qc);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,1);var p=[1,3,5,4,0,2];e=e.V;for(var r=0;6>r;r++){for(var t=0;t<h.ta;t++)for(var w=0;w<h.Y;w++){var z=w+t*h.Y+p[r]*h.Y*h.ta,C=h.Ma[z],F=C.M;C.Fc&&
(F=C.Fc);F?m?(z=n.width/h.width,c.drawImage(F,z*(w*e-a),z*(t*e-a),z*F.width,z*F.height)):b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,F):(f.N("WTF?!"),f.N(z),f.N(C))}m&&b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,n)}}}}};v.prototype.Hl=function(f){var e=this.o,a=this.L,b=a.M.levels[f];if(0==b.Y)return!1;var c=!0;b.cache=!0;for(var m=0;6>m;m++)for(var h=0;h<b.ta;h++)for(var n=0;n<b.Y;n++){var p=n+h*b.Y+m*b.Y*b.ta,r=b.Ma[p];r||(r=b.Ma[p]=
new y.Yg);this.Zi()?r.M||(r.Le?r.Le--:(this.zj(r,b,a.Ig(m,f,n,h)),e.ub=!0)):a.ie++;r.Ob||(c=!1,e.ub=!0)}c&&(b.loaded=!0);return c};v.prototype.fr=function(f){f=this.L.M.levels[f];if(0==f.Y)return!1;for(var e=0;6>e;e++)for(var a=0;a<f.ta;a++)for(var b=0;b<f.Y;b++){var c=f.Ma[b+a*f.Y+e*f.Y*f.ta];if(!c||!c.Ob)return!1}return f.loaded=!0};v.prototype.ready=function(){return null!=this.Qc};v.prototype.kp=function(){for(var f=0;6>f;f++)if(!this.eb[f].Bf.complete)return!1;return!0};v.prototype.Zl=function(){for(var f=
this.o,e=this.L,a=e.M.levels,b=f.S,c=Date.now(),m=a.length-1;0<=m;m--){var h=a[m];if(!h.cache)for(var n in h.Ma)if(h.Ma.hasOwnProperty(n)){var p=h.Ma[n];0<p.uj&&p.uj--;p.visible||0<p.uj?(p.visible&&(p.Ph=c),p=this.te.indexOf(p),-1!==p&&this.te.splice(p,1)):-1===this.te.indexOf(p)&&(p.level=h,this.te.push(p))}}if(this.te.length>1.1*e.bq)for(this.te.sort(function(r,t){return t.Ph-r.Ph});this.te.length>e.bq;)p=this.te.pop(),p.Ob&&(b.deleteTexture(p.Ob),f.Wd--,p.Ob=0),p.M=null,p.hg&&(b.deleteBuffer(p.hg),
p.hg=0),n=p.level.Ma.indexOf(p),f.N("delete <"+n+"> "+(c-p.Ph)),delete p.level.Ma[n]};v.prototype.ev=function(){var f=this.o;if(f.S){var e=this.o.S,a;for(a=0;a<f.U.length;a++){var b=f.U[a];if(!b.od){y.la.identity(this.ya);y.la.rotate(this.ya,-f.W.m*Math.PI/180,[0,0,1]);y.la.rotate(this.ya,-f.u.m*Math.PI/180,[1,0,0]);y.la.rotate(this.ya,(180-f.pan.m)*Math.PI/180,[0,1,0]);y.la.rotate(this.ya,b.pan*Math.PI/180,[0,1,0]);y.la.rotate(this.ya,-b.u*Math.PI/180,[1,0,0]);y.la.translate(this.ya,[0,0,1]);y.la.rotate(this.ya,
b.zb*Math.PI/180,[0,0,1]);y.la.rotate(this.ya,-b.Oa*Math.PI/180,[0,1,0]);y.la.rotate(this.ya,b.Ka*Math.PI/180,[1,0,0]);var c=Math.tan(b.fov/2*Math.PI/180),m=b.aspect;m||(m=16/9);y.la.scale(this.ya,[c,c/m,1]);y.la.translate(this.ya,[0,0,-1]);e.bindBuffer(e.ARRAY_BUFFER,this.Ok);e.vertexAttribPointer(this.O.ja,3,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.ef);e.vertexAttribPointer(this.O.La,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,b.texture);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.ELEMENT_ARRAY_BUFFER,this.xd);e.uniform1i(this.O.xg,0);e.uniformMatrix4fv(this.O.$h,!1,this.ya);e.uniformMatrix4fv(this.O.Ie,!1,this.Db);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0)}}}};v.prototype.dv=function(){var f=this.o,e;if(f.C.width!=f.ea.offsetWidth||f.C.height!=
f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.we&&(f.Rc(0),f.hc());if(f.S){var a=f.S;a.useProgram(this.O);y.la.identity(this.Db);y.la.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);a.uniformMatrix4fv(this.O.Ie,!1,this.Db);this.Bg(0);a.uniform1i(this.O.xg,0);a.uniformMatrix4fv(this.O.Ie,!1,this.Db);a.uniformMatrix4fv(this.O.$h,!1,this.ya);a.enableVertexAttribArray(this.O.ja);a.enableVertexAttribArray(this.O.La);a.bindBuffer(a.ARRAY_BUFFER,this.ef);a.vertexAttribPointer(this.O.La,
2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.xd);a.uniform1f(this.O.uk,1E-4);a.vertexAttribPointer(this.O.ja,3,a.FLOAT,!1,0,0);a.bindTexture(a.TEXTURE_2D,f.A.texture);for(e=0;1>e;e++)this.Bg(0),a.bindBuffer(a.ARRAY_BUFFER,f.A.lk),a.vertexAttribPointer(this.O.ja,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,f.A.Ai),a.vertexAttribPointer(this.O.La,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,f.A.pj),a.uniform1i(this.O.xg,
0),a.uniformMatrix4fv(this.O.$h,!1,this.ya),a.uniformMatrix4fv(this.O.Ie,!1,this.Db),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};v.prototype.cv=function(){var f=this.o,e=f.S,a=f.A;if(0<f.U.length)for(var b=0;b<f.U.length;b++){var c=f.U[b];if(!c.od&&c.isRunning&&c.Eh!=c.j.currentTime&&(c.Eh=c.j.currentTime,!c.aspect&&0<c.j.videoHeight&&(c.aspect=c.j.videoWidth/c.j.videoHeight),f.Hi))try{c.texture&&(e.bindTexture(e.TEXTURE_2D,c.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,e.RGB,e.UNSIGNED_BYTE,
c.j),f.update())}catch(h){f.N(h)}}if(a.j&&(b=Number(a.j.currentTime),a.Eh!=b)){a.Eh=b;try{var m=0<a.j.readyState;f.tj&&a.Tc&&(m=m&&0<a.j.currentTime);a.texture&&a.ng&&m&&(a.Tc=!0,a.width=a.j.videoWidth,a.height=a.j.videoHeight,e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,f.A.flipY),e.bindTexture(e.TEXTURE_2D,a.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,e.RGB,e.UNSIGNED_BYTE,a.j),a.zm=!0,f.update())}catch(h){f.N(h)}}};v.prototype.gp=function(){var f,e,a=this.o,b=this.o.S;a.sb.style.visibility="hidden";a.K.Oh!=
a.K.mode&&(a.K.Oh=a.K.mode);if((0<=a.K.mode||0<a.K.Rb.length)&&!a.D.Di){var c=1;0>=a.K.mode&&(c=0);3==a.K.mode&&(c=a.K.Ca);for(f=0;f<a.J.length;f++){var m=a.J[f];if("poly"==m.type){var h=m.Af,n=c;2==a.K.mode&&(n=m.Ca);var p=a.K.Rb.indexOf(m.id);-1!=p&&(n=a.K.Bc[p]);if(0<h.length){p=[];for(e=0;e<h.length;e++)p.push(h[e].ec),p.push(h[e].Qb),p.push(0);b.useProgram(this.be);b.enable(b.BLEND);b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,b.SRC_ALPHA,b.ONE);b.disable(b.DEPTH_TEST);this.Lm||(this.Lm=
b.createBuffer());b.bindBuffer(b.ARRAY_BUFFER,this.Lm);b.bufferData(b.ARRAY_BUFFER,new Float32Array(p),b.STATIC_DRAW);b.uniform2f(b.getUniformLocation(this.be,"uCanvasDimensions"),a.C.width,a.C.height);h=b.getUniformLocation(this.be,"uColor");e=m.Yb;b.uniform3f(h,(e>>16&255)/255,(e>>8&255)/255,(e&255)/255);var r=b.getUniformLocation(this.be,"uAlpha");b.uniform1f(r,m.Xb*n);b.vertexAttribPointer(this.be.ja,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,p.length/3);e=m.Wb;b.uniform3f(h,(e>>16&255)/255,
(e>>8&255)/255,(e&255)/255);b.uniform1f(r,m.Vb*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,p.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,p.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.O)}}}}};v.prototype.bv=function(){var f=
this.o,e=this.L,a=e.M;if(f.C.width!=f.ea.offsetWidth||f.C.height!=f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.we&&(f.Rc(0),f.hc());if(f.S){var b=f.S;this.gk();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.vh);var c=b.getUniformLocation(this.vh,"uRect");b.uniform2f(b.getUniformLocation(this.vh,"uCanvasDimensions"),f.C.width,f.C.height);b.activeTexture(b.TEXTURE0);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,
this.xd);var m=b.getAttribLocation(this.vh,"aVertexPosition");b.disableVertexAttribArray(0);b.disableVertexAttribArray(1);b.disableVertexAttribArray(2);b.enableVertexAttribArray(m);b.bindBuffer(b.ARRAY_BUFFER,this.ef);b.vertexAttribPointer(m,2,b.FLOAT,!1,0,0);e.ie=0;var h=100/f.fov.m;var n=a.width/a.height;m=f.C.height*h*n;h*=f.C.height;n=(f.pan.m/100/n-.5)*m+f.C.width/2;for(var p=(f.u.m/100-.5)*h+f.C.height/2,r,t,w,z=0;a.levels.length>=z+2&&a.levels[z+1].width>m;)z++;var C;var F=[];for(C=a.levels.length-
1;C>=z;){var E=a.levels[C];if(E.cache){var D={fx:0,fy:0};D.Id=E.Y-1;D.Jd=E.ta-1}else{D={};r=-p/h*(E.height/a.V);t=(-n+f.C.width)/m*(E.width/a.V);var A=(-p+f.C.height)/h*(E.height/a.V);D.fx=Math.min(Math.max(0,Math.floor(-n/m*(E.width/a.V))),E.Y-1);D.fy=Math.min(Math.max(0,Math.floor(r)),E.ta-1);D.Id=Math.min(Math.max(0,Math.floor(t)),E.Y-1);D.Jd=Math.min(Math.max(0,Math.floor(A)),E.ta-1)}F[C]=D;var G=!0;for(t=D.fy;t<=D.Jd;t++)for(r=D.fx;r<=D.Id;r++)w=r+t*E.Y,A=E.Ma[w],A||(A=new y.Yg,E.Ma[w]=A),this.Zi()?
A.M||(this.zj(A,E,e.Ig(0,C,r,t)),f.ub=!0):e.ie++,A.M&&A.M.complete||(G=!1),A.visible=!0;D.Po=G;C--}for(C=a.levels.length-1;C>=z;){E=a.levels[C];if(F[C]&&0<=F[C].fx)for(D=F[C],t=D.fy;t<=D.Jd;t++)for(r=D.fx;r<=D.Id;r++)w=r+t*E.Y,(A=E.Ma[w])&&A.M&&A.M.complete&&(f=n+(-a.ib+a.V*r)*m/E.width,b.uniform4f(c,f,p+(-a.ib+a.V*t)*h/E.height,A.M.width*m/E.width,A.M.height*h/E.height),A&&A.Ob&&(b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.xd),b.bindTexture(b.TEXTURE_2D,A.Ob),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.Zl()}};v.prototype.Df=function(){var f=this.o.S;if(f&&this.eb)for(;0<this.eb.length;){var e=this.eb.pop();e.ot=!0;f.deleteTexture(e)}this.Qc&&(f.deleteTexture(this.Qc),this.Qc=null);this.Vf=1E6;this.Vi=[!1,!1,!1,!1,!1,!1]};return v}();y.Hq=x})(ggP2VR||
(ggP2VR={}));(function(y){var x=function(){return function(){this.ei={xh:1,yh:1,Vh:0,Wh:0,Ii:0,pk:0,scale:1};this.pc=!0;this.Qf=[]}}();y.Dq=function(){return function(){var v;this.bg=Array(6);for(v=0;6>v;v++)this.bg[v]=new x}}()})(ggP2VR||(ggP2VR={}));
(function(y){y.Bq=function(){return function(){this.levels=[];this.Lj="0x000000";this.lp=!1;this.Ro=this.Qo=.4;this.V=512;this.ib=1;this.Fl=0;this.Gl="";this.tp=this.height=this.width=0}}();y.Vm=function(){return function(){this.height=this.width=0;this.Cf=this.cache=!1;this.ta=this.Y=0;this.loaded=!1;this.Ma=[]}}();y.Yg=function(){return function(){this.loaded=this.visible=!1;this.Le=this.Yl=0;this.ig=[];this.ol=0;this.mb=[];this.uj=this.Ph=this.Pa=0}}()})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f,e){this.o=f;this.P=e;var a=this.__div=document.createElement("div");a.ggVisible=!0;var b=document.createElement("img");if(e.gd){var c=e.gd;b.setAttribute("style","position: absolute; width: "+e.ff+"px; height: "+e.yd+"px; top: -"+e.yd/2+"px; left: -"+e.ff/2+"px; cursor: pointer; "+f.lb+"user-select: none; max-width: none;")}else c="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; cursor: pointer; "+f.lb+"user-select: none; max-width: none;");b.setAttribute("src",c);b.ondragstart=function(){return!1};a.appendChild(b);c="position:absolute;"+(f.lb+"user-select: none;");c+=f.lb+"touch-callout: none;";c+=f.lb+"tap-highlight-color: rgba(0,0,0,0);";f.Sc&&!f.na&&(c+=f.lb+"transform: translateZ(9999999px);");a.setAttribute("style",c);a.onclick=function(){f.Oe(e);f.Ml(f.Va(e.url),e.target);
f.ga&&f.ga.hotspotProxyClick&&f.ga.hotspotProxyClick(e.id,e.url);f.H("hsproxyclick",{id:e.id,url:e.url})};a.ondblclick=function(){f.ga&&f.ga.hotspotProxyDoubleClick&&f.ga.hotspotProxyDoubleClick(e.id,e.url);f.H("hsproxydblclick",{id:e.id,url:e.url})};var m=f.K.ck;if(m.enabled&&""!=e.title){var h=document.createElement("div");c="position:absolute;";c=e.gd?f.hl()?c+("top: -"+(e.yd/2+20)+"px;"):c+("top: "+e.yd/2+"px;"):f.hl()?c+"top:\t -50px;":c+"top:\t 20px;";c=m.qk?c+"white-space: pre-wrap;":c+"white-space: nowrap;";
c+=f.lb+"transform-origin: 50% 50%;";h.setAttribute("style",c+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;");h.style.color=this.o.oa(m.dk,m.bk);h.style.backgroundColor=m.background?this.o.oa(m.Wb,m.Vb):"transparent";h.style.border="solid "+this.o.oa(m.Yb,m.Xb)+" "+m.Pi+"px";h.style.borderRadius=m.zk+"px";h.style.textAlign="center";0<m.width?(h.style.left=-m.width/2+"px",h.style.width=m.width+"px"):h.style.width="auto";h.style.height=0<m.height?m.height+"px":"auto";h.style.overflow=
"hidden";h.innerHTML=f.Va(e.title);h.classList.add("ggskin");h.classList.add("ggdefaulthotspot");a.addEventListener("mouseover",function(){0==m.width&&(h.style.left=-h.offsetWidth/2+"px");h.style.visibility="inherit";f.ga&&f.ga.hotspotProxyOver&&f.ga.hotspotProxyOver(e.id,e.url);f.H("hsproxyover",{id:e.id,url:e.url})});a.addEventListener("mouseout",function(){h.style.visibility="hidden";f.ga&&f.ga.hotspotProxyOut&&f.ga.hotspotProxyOut(e.id,e.url);f.H("hsproxyout",{id:e.id,url:e.url})});a.appendChild(h);
this.fq=h}a.addEventListener("mouseover",function(){f.Oe(e)});a.addEventListener("mouseout",function(){f.Oe(null)})}v.prototype.Fs=function(){this.fq&&(this.fq.innerHTML=this.o.Va(this.P.title))};return v}();y.xq=x})(ggP2VR||(ggP2VR={}));
(function(y){y.ed=function(){return function(){this.value=this.time=0;this.Km="";this.bf=this.af=this.$e=this.Ze=this.qb=this.type=this.Gb=0;this.td="";this.Ym=0}}();y.Sm=function(){return function(){this.Xu=this.Qq=this.length=0}}();y.Rm=function(){return function(){}}()})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f){this.o=f;this.enabled=!1;this.dh=1;this.Pf=0;this.type="crossdissolve";this.dd=this.da=this.Yc=0;this.tk=20;this.rk=90;this.sk=20;this.Xg=1;this.Wg=!1;this.xm=this.wm=this.Yp=0;this.zi=70;this.wq=0;this.Hb=this.vq=1;this.Vg=this.Ug=.5;this.Ye=this.oe=!1;this.Qk=1}v.prototype.Ih=function(){var f=this.o.S,e=f.createShader(f.VERTEX_SHADER);f.shaderSource(e,"attribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying vec2 vTextureCoord;\nuniform bool uZoomIn;\nuniform float uZoomFactor;\nuniform vec2 uZoomCenter;\nvoid main(void) {\n\t gl_Position = vec4(aVertexPosition, 1.0);\n\t if(!uZoomIn) {\n\t \n\t   vTextureCoord = aTextureCoord;\n\t }\n\t else {\n\t   vTextureCoord = (aTextureCoord - vec2(0.5, 0.5)) * (1.0/uZoomFactor) + uZoomCenter;\n\t }\n}\n");
f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),e=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 vec2 vTextureCoord;\nuniform float uAlpha;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uAlpha);\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.za=f.createProgram();f.attachShader(this.za,e);f.attachShader(this.za,a);f.linkProgram(this.za);f.getProgramParameter(this.za,f.LINK_STATUS)||alert("Could not initialise shaders");this.za.ja=f.getAttribLocation(this.za,"aVertexPosition");f.enableVertexAttribArray(this.za.ja);this.za.La=f.getAttribLocation(this.za,"aTextureCoord");f.enableVertexAttribArray(this.za.La);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 uColorPercent;\nuniform float uAlpha;\nuniform vec3 uDipColor;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x * (1.0 - uColorPercent) + uDipColor.x * uColorPercent, textureColor.y * (1.0 - uColorPercent) + uDipColor.y * uColorPercent, textureColor.z * (1.0 - uColorPercent) + uDipColor.z * uColorPercent, uAlpha);\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.jb=f.createProgram();f.attachShader(this.jb,e);f.attachShader(this.jb,a);f.linkProgram(this.jb);f.getProgramParameter(this.jb,f.LINK_STATUS)||alert("Could not initialise shaders");this.jb.ja=f.getAttribLocation(this.jb,"aVertexPosition");f.enableVertexAttribArray(this.jb.ja);this.jb.La=f.getAttribLocation(this.jb,"aTextureCoord");f.enableVertexAttribArray(this.jb.La);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 bool uRound;\nuniform float uRadius;\nuniform vec2 uRectDim;\nuniform vec2 uIrisCenter;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n float alpha = 0.0;\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n if (uRound) {\n\t  vec2 diff = uIrisCenter - gl_FragCoord.xy;\n\t   float distFromCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n\t   if (distFromCenter > 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.Ta=f.createProgram();f.attachShader(this.Ta,e);f.attachShader(this.Ta,a);f.linkProgram(this.Ta);f.getProgramParameter(this.Ta,f.LINK_STATUS)||alert("Could not initialise shaders");this.Ta.ja=f.getAttribLocation(this.Ta,"aVertexPosition");f.enableVertexAttribArray(this.Ta.ja);this.Ta.La=f.getAttribLocation(this.Ta,"aTextureCoord");f.enableVertexAttribArray(this.Ta.La);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.ab=f.createProgram();f.attachShader(this.ab,e);f.attachShader(this.ab,a);f.linkProgram(this.ab);f.getProgramParameter(this.ab,f.LINK_STATUS)||alert("Could not initialise shaders");this.ab.ja=f.getAttribLocation(this.ab,"aVertexPosition");f.enableVertexAttribArray(this.ab.ja);this.ab.La=f.getAttribLocation(this.ab,"aTextureCoord");f.enableVertexAttribArray(this.ab.La)};v.prototype.Rc=function(){var f=
this.o.S;if(!f)return!1;if(this.Cc=f.createFramebuffer()){f.bindFramebuffer(f.FRAMEBUFFER,this.Cc);this.Cc.width=1024;this.Cc.height=1024;this.If=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.If);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.Cc.width,this.Cc.height,0,f.RGBA,f.UNSIGNED_BYTE,null);var e=f.createRenderbuffer();f.bindRenderbuffer(f.RENDERBUFFER,e);f.renderbufferStorage(f.RENDERBUFFER,
f.DEPTH_COMPONENT16,this.Cc.width,this.Cc.height);f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,this.If,0);f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,e);f.bindTexture(f.TEXTURE_2D,null);f.bindRenderbuffer(f.RENDERBUFFER,null);f.bindFramebuffer(f.FRAMEBUFFER,null);this.xb=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.xb);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),f.STATIC_DRAW);this.xb.itemSize=3;this.xb.numberOfItems=
4;this.vg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.vg);f.bufferData(f.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),f.STATIC_DRAW);return!0}return!1};v.prototype.Ol=function(f){var e=this.o.S,a=this.o.Cb;if(this.Md){e.useProgram(this.za);e.bindBuffer(e.ARRAY_BUFFER,this.xb);e.vertexAttribPointer(this.za.ja,this.xb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.vg);e.vertexAttribPointer(this.za.La,2,e.FLOAT,!1,0,0);e.enableVertexAttribArray(this.za.ja);e.enableVertexAttribArray(this.za.La);
e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.If);a=1+(this.Hb-1)*f;var b=e.getUniformLocation(this.za,"uAlpha");e.uniform1f(b,1);b=e.getUniformLocation(this.za,"uZoomIn");e.uniform1i(b,1);b=e.getUniformLocation(this.za,"uZoomCenter");var c=.5+(this.Ug-.5)*Math.sqrt(f),m=.5+(this.Vg-.5)*Math.sqrt(f);0>c-.5/a&&(c=.5/a);0>m-.5/a&&(m=.5/a);1<c+.5/a&&(c=1-.5/a);1<m+.5/a&&(m=1-.5/a);e.uniform2f(b,c,m);c=e.getUniformLocation(this.za,"uZoomFactor");e.uniform1f(c,a);e.uniform1i(e.getUniformLocation(this.za,
"uSampler"),0);e.drawArrays(e.TRIANGLE_STRIP,0,this.xb.numberOfItems);e.useProgram(this.o.sa.O)}else{this.o.Fi();e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.SRC_ALPHA,e.ONE);e.enable(e.BLEND);e.disable(e.DEPTH_TEST);c=.5+(this.Ug-.5);m=.5+(this.Vg-.5);0>c-.5/this.Hb&&(c=.5/this.Hb);0>m-.5/this.Hb&&(m=.5/this.Hb);1<c+.5/this.Hb&&(c=1-.5/this.Hb);1<m+.5/this.Hb&&(m=1-.5/this.Hb);if("crossdissolve"==this.type)e.useProgram(this.za),e.bindBuffer(e.ARRAY_BUFFER,this.xb),e.vertexAttribPointer(this.za.ja,
this.xb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.vg),e.vertexAttribPointer(this.za.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.If),b=e.getUniformLocation(this.za,"uAlpha"),e.uniform1f(b,1-f),b=e.getUniformLocation(this.za,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.za,"uZoomCenter"),e.uniform2f(b,c,m),c=e.getUniformLocation(this.za,"uZoomFactor"),e.uniform1f(c,this.Hb),e.uniform1i(e.getUniformLocation(this.za,
"uSampler"),0);else if("diptocolor"==this.type)e.useProgram(this.jb),e.bindBuffer(e.ARRAY_BUFFER,this.xb),e.vertexAttribPointer(this.jb.ja,this.xb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.vg),e.vertexAttribPointer(this.jb.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.If),e.uniform1f(e.getUniformLocation(this.jb,"uColorPercent"),Math.min(2*f,1)),b=e.getUniformLocation(this.jb,"uAlpha"),e.uniform1f(b,1-Math.max(2*(f-.5),0)),e.uniform3f(e.getUniformLocation(this.jb,
"uDipColor"),(this.Pf>>16&255)/255,(this.Pf>>8&255)/255,(this.Pf&255)/255),b=e.getUniformLocation(this.jb,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.jb,"uZoomCenter"),e.uniform2f(b,c,m),c=e.getUniformLocation(this.jb,"uZoomFactor"),e.uniform1f(c,this.Hb),e.uniform1i(e.getUniformLocation(this.jb,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){e.useProgram(this.Ta);
e.bindBuffer(e.ARRAY_BUFFER,this.xb);e.vertexAttribPointer(this.Ta.ja,this.xb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.vg);e.vertexAttribPointer(this.Ta.La,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.If);if(1==this.da||2==this.da||6==this.da||7==this.da||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var h=b=.5;else b=this.Ug,h=this.Vg;var n=b*a.width,p=h*a.height;n=Math.max(n,a.width-n);p=Math.max(p,a.height-p);"irisround"==this.type||
"irisroundcenter"==this.type?e.uniform1f(e.getUniformLocation(this.Ta,"uRadius"),(Math.sqrt(n*n+p*p)+this.Yc)*f):(n>p?(p=a.height/a.width*n+this.Yc,n+=this.Yc):(n=a.width/a.height*p+this.Yc,p+=this.Yc),e.uniform2f(e.getUniformLocation(this.Ta,"uRectDim"),n*f,p*f));f=e.getUniformLocation(this.Ta,"uSoftEdge");e.uniform1f(f,this.Yc);e.uniform1i(e.getUniformLocation(this.Ta,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);e.uniform2f(e.getUniformLocation(this.Ta,"uIrisCenter"),b*a.width,
h*a.height);b=e.getUniformLocation(this.Ta,"uZoomIn");e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0);b=e.getUniformLocation(this.Ta,"uZoomCenter");e.uniform2f(b,c,m);c=e.getUniformLocation(this.Ta,"uZoomFactor");e.uniform1f(c,this.Hb);e.uniform1i(e.getUniformLocation(this.Ta,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)e.useProgram(this.ab),e.bindBuffer(e.ARRAY_BUFFER,
this.xb),e.vertexAttribPointer(this.ab.ja,this.xb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.vg),e.vertexAttribPointer(this.ab.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.If),e.uniform1f(e.getUniformLocation(this.ab,"uPercent"),3>this.Qk?f*(a.width+this.Yc):f*(a.height+this.Yc)),f=e.getUniformLocation(this.ab,"uSoftEdge"),e.uniform1f(f,this.Yc),e.uniform1i(e.getUniformLocation(this.ab,"uDirection"),this.Qk),e.uniform2f(e.getUniformLocation(this.ab,
"uCanvasDimensions"),a.width,a.height),b=e.getUniformLocation(this.ab,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.ab,"uZoomCenter"),e.uniform2f(b,c,m),c=e.getUniformLocation(this.ab,"uZoomFactor"),e.uniform1f(c,this.Hb),e.uniform1i(e.getUniformLocation(this.ab,"uSampler"),0);e.drawArrays(e.TRIANGLE_STRIP,0,this.xb.numberOfItems);e.useProgram(this.o.sa.O);e.disable(e.BLEND);e.enable(e.DEPTH_TEST)}};return v}();y.zq=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f){this.Ei=[];this.o=f;this.enabled=!1;this.Gb=2;this.wn=!1}v.prototype.Hn=function(f){if(2==f.mode||3==f.mode||5==f.mode){var e=this.o.qa.currentTime;if(f.vb&&f.vb.gain&&f.Mb&&f.Kb&&f.Lb){var a=f.Mb.gain.value,b=f.Kb.gain.value,c=f.Lb.gain.value;f.vb.gain.linearRampToValueAtTime(f.vb.gain.value,e);f.vb.gain.linearRampToValueAtTime(0,e+this.Gb);f.Mb.gain.linearRampToValueAtTime(a,e);f.Mb.gain.linearRampToValueAtTime(0,e+this.Gb);f.Kb.gain.linearRampToValueAtTime(b,
e);f.Kb.gain.linearRampToValueAtTime(0,e+this.Gb);f.Lb.gain.linearRampToValueAtTime(c,e);f.Lb.gain.linearRampToValueAtTime(0,e+this.Gb)}}else e=this.o.qa.currentTime,f.Jb&&f.Jb.gain&&(f.Jb.gain.linearRampToValueAtTime(f.Jb.gain.value,e),f.Jb.gain.linearRampToValueAtTime(0,e+this.Gb));f.Yk=!0;setTimeout(function(){f.Me()},1E3*this.Gb+5)};v.prototype.Lu=function(){for(var f=0;f<this.o.X.length;f++){var e=this.o.X[f];!e.stopped&&!this.o.isPlaying(e.id)&&-1<e.loop&&4!=e.mode&&6!=e.mode&&(e.wa?e.re():
(e.Pd&&e.Nf(),e.j.play(),e.j.currentTime=0))}};v.prototype.tr=function(){var f=(this.o.qa.currentTime-this.Hu)/this.Gb;f=Math.min(1,f);for(var e=0;e<this.o.X.length;e++){var a=this.o.X[e];this.o.isPlaying(a.id)&&1>a.va&&(a.va=f)}1==f&&clearInterval(this.Gu)};return v}();y.Aq=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f){this.Th=[];this.vd=null;this.zc=[];this.lc=[];this.Ac=[];this.nm=!0;this.o=f;this.ir()}v.prototype.Ih=function(){var f=this.o.S,e=f.createShader(f.VERTEX_SHADER);f.shaderSource(e,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),e=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.Ec=f.createProgram();f.attachShader(this.Ec,e);f.attachShader(this.Ec,a);f.linkProgram(this.Ec);f.getProgramParameter(this.Ec,f.LINK_STATUS)||alert("Could not initialise shaders");this.Ec.ja=f.getAttribLocation(this.Ec,"aVertexPosition");f.enableVertexAttribArray(this.Ec.ja);a=f.createShader(f.VERTEX_SHADER);e=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(e,"#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(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),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.Aa=f.createProgram();f.attachShader(this.Aa,a);f.attachShader(this.Aa,b);f.linkProgram(this.Aa);f.getProgramParameter(this.Aa,f.LINK_STATUS)||alert("Could not initialise shaders");this.Aa.ja=f.getAttribLocation(this.Aa,"aVertexPosition");f.enableVertexAttribArray(this.Aa.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 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.Fb=f.createProgram();f.attachShader(this.Fb,e);f.attachShader(this.Fb,a);f.linkProgram(this.Fb);f.getProgramParameter(this.Fb,f.LINK_STATUS)||alert("Could not initialise shaders");this.Fb.ja=f.getAttribLocation(this.Fb,"aVertexPosition")};v.prototype.Rc=function(){var f=this.o.S;this.Ud=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.Ud);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,
-1,0,1,1,0,-1,1,0]),f.STATIC_DRAW);this.Ud.itemSize=3;this.Ud.numberOfItems=4;this.dg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.dg);for(var e=[0,0,0],a=2*Math.PI/6,b=Math.PI/180*35,c=1,m=b;m<=b+2*Math.PI;m+=a)e.push(Math.sin(m)),e.push(-Math.cos(m)),e.push(0),c++;f.bufferData(f.ARRAY_BUFFER,new Float32Array(e),f.STATIC_DRAW);this.dg.itemSize=3;this.dg.numberOfItems=c;this.xp=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.xp);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);e=document.createElement("canvas");e.width=100;e.height=1;a=e.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.o.oa(0,0));b.addColorStop(.88,this.o.oa(0,0));b.addColorStop(.9,this.o.oa(16654848,1));b.addColorStop(.92,this.o.oa(16776448,1));b.addColorStop(.94,this.o.oa(4849466,1));b.addColorStop(.96,
this.o.oa(131071,1));b.addColorStop(.98,this.o.oa(8190,1));b.addColorStop(1,this.o.oa(0,0));a.fillStyle=b;a.fillRect(0,0,100,1);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,e)};v.prototype.Ot=function(){for(;0<this.Th.length;)this.Th.pop()};v.prototype.ir=function(){var f=[],e=[],a=[];var b={radius:14,alpha:.2,color:11390415,B:.27};f.push(b);b={radius:20,alpha:.25,color:11390415,B:.4};f.push(b);b={radius:10,alpha:.2,color:12442332,B:.6};f.push(b);b={radius:15,alpha:.2,color:11390415,
B:.8};f.push(b);b={radius:10,alpha:.2,color:12442332,B:1.5};f.push(b);b={radius:15,alpha:.2,color:11390415,B:1.8};f.push(b);b={radius:8,alpha:.2,color:12575203,G:.8,B:.7};e.push(b);b={radius:7,alpha:.4,color:12575203,G:.5,B:1.6};e.push(b);b={radius:5,alpha:.4,color:12575203,G:.6,B:.9};e.push(b);b={radius:8,alpha:.3,color:12575203,G:.4,B:1.1};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:30,alpha:.3,color:11390415,B:.5};f.push(b);b={radius:10,alpha:.3,color:11390415,
B:1};f.push(b);b={radius:20,alpha:.3,color:11390415,B:1.3};f.push(b);b={radius:10,alpha:.3,color:11390415,B:1.5};f.push(b);b={radius:15,alpha:.3,color:11390415,B:1.8};f.push(b);b={radius:10,alpha:.3,color:15506856,G:.8,B:.7};e.push(b);b={radius:20,alpha:.5,color:15506856,G:.5,B:1.6};e.push(b);b={radius:5,alpha:.5,color:15506856,G:.6,B:.9};e.push(b);b={radius:60,alpha:.4,color:15506856,G:.2,B:1.1};e.push(b);a.push({radius:220,alpha:.035,B:2});this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=
[];a=[];b={radius:30,alpha:.5,color:15465727,B:.5};f.push(b);b={radius:40,alpha:.28,color:15726842,B:.8};f.push(b);b={radius:25,alpha:.32,color:15726842,B:1.1};f.push(b);b={radius:15,alpha:.25,color:15726842,B:1.35};f.push(b);b={radius:10,alpha:.28,color:15465727,B:1.65};f.push(b);b={radius:10,alpha:.45,color:15465727,G:.8,B:.7};e.push(b);b={radius:7,alpha:.5,color:15465727,G:.4,B:.9};e.push(b);b={radius:40,alpha:.4,color:15465727,G:.3,B:.38};e.push(b);b={radius:50,alpha:.4,color:15465727,G:.5,B:1.25};
e.push(b);b={radius:18,alpha:.2,color:15465727,G:.5,B:1.25};e.push(b);b={radius:10,alpha:.34,color:15726842,G:.8,B:1.5};e.push(b);b={radius:38,alpha:.37,color:15465727,G:.3,B:-.5};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:16,alpha:.5,color:16363159,B:.1};f.push(b);b={radius:26,alpha:.3,color:16091819,B:.32};f.push(b);b={radius:29,alpha:.2,color:16091819,B:1.32};f.push(b);b={radius:20,alpha:.18,color:16363159,B:1.53};f.push(b);b={radius:27,alpha:.13,color:16425092,
B:1.6};f.push(b);b={radius:20,alpha:.1,color:16091819,B:1.75};f.push(b);b={radius:12,alpha:.45,color:16312238,G:.45,B:.2};e.push(b);b={radius:8,alpha:.25,color:16434209,G:.7,B:.33};e.push(b);b={radius:9,alpha:.25,color:16091819,G:.4,B:.7};e.push(b);b={radius:7,alpha:.2,color:16091819,G:.4,B:.85};e.push(b);b={radius:60,alpha:.23,color:16091819,G:.55,B:1.05};e.push(b);b={radius:37,alpha:.1,color:16091819,G:.55,B:1.22};e.push(b);b={radius:10,alpha:.25,color:16363159,G:.65,B:1.38};e.push(b);b={radius:7,
alpha:.2,color:16434209,G:.5,B:1.45};e.push(b);b={radius:3,alpha:.2,color:16416033,G:.5,B:1.78};e.push(b);b={radius:6,alpha:.18,color:16434209,G:.45,B:1.9};e.push(b);b={radius:4,alpha:.14,color:16766514,G:.45,B:2.04};e.push(b);b={radius:30,alpha:.14,color:16766514,G:.8,B:.04};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:9,alpha:.3,color:14346999,G:.3,B:.3};e.push(b);b={radius:5,alpha:.5,color:14148072,G:.8,B:.6};e.push(b);b={radius:3,alpha:.37,color:14346999,
G:.66,B:.8};e.push(b);b={radius:45,alpha:.2,color:14346999,G:.36,B:1.2};e.push(b);b={radius:13,alpha:.2,color:14346999,G:.36,B:1.23};e.push(b);b={radius:11,alpha:.2,color:14148072,G:.36,B:1.28};e.push(b);b={radius:27,alpha:.16,color:14346999,G:.36,B:1.55};e.push(b);b={radius:6,alpha:.36,color:14148072,G:.8,B:1.7};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:24,alpha:.2,color:15186464,B:.2};f.push(b);b={radius:7,alpha:.26,color:15186464,B:.35};f.push(b);b={radius:23,
alpha:.18,color:15186464,B:.65};f.push(b);b={radius:13,alpha:.2,color:15186464,B:.8};f.push(b);b={radius:11,alpha:.15,color:15186464,B:1.4};f.push(b);b={radius:15,alpha:.11,color:15451904,B:1.6};f.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,B:.22};e.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,B:.4};e.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,B:.45};e.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,B:.5};e.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,B:.88};e.push(b);
b={radius:140,alpha:.18,color:15579138,G:.32,B:.95};e.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,B:1.1};e.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,B:1.2};e.push(b);b={radius:55,alpha:.2,color:15451904,G:.45,B:1.33};e.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,B:1.42};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:10933495,B:.32};f.push(b);b={radius:14,alpha:.3,color:11007484,B:.36};f.push(b);b={radius:10,alpha:.3,color:4037331,
B:.58};f.push(b);b={radius:14,alpha:.22,color:8835068,B:.68};f.push(b);b={radius:10,alpha:.27,color:11007484,B:.82};f.push(b);b={radius:11,alpha:.27,color:10867450,B:1};f.push(b);b={radius:9,alpha:.2,color:6158332,B:1.05};f.push(b);b={radius:10,alpha:.17,color:10867450,B:1.78};f.push(b);b={radius:10,alpha:.3,color:4037331,B:-.23};f.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,B:.175};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,B:.46};e.push(b);b={radius:3,alpha:.3,color:10867450,G:.35,
B:.5};e.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,B:.75};e.push(b);b={radius:3,alpha:.25,color:4031699,G:.25,B:.75};e.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,B:.9};e.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,B:1.3};e.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,B:1.62};e.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,B:1.6};e.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,B:1.83};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,B:-.18};e.push(b);this.zc.push(f);
this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:16389120,B:.32};f.push(b);b={radius:26,alpha:.22,color:16389120,B:.4};f.push(b);b={radius:26,alpha:.25,color:16389120,B:.65};f.push(b);b={radius:18,alpha:.3,color:16389120,B:1.23};f.push(b);b={radius:14,alpha:.26,color:16389120,B:1.33};f.push(b);b={radius:17,alpha:.18,color:16389120,B:1.7};f.push(b);b={radius:30,alpha:.16,color:16389120,B:2.15};f.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,B:1.45};e.push(b);b={radius:7,
alpha:.5,color:15628151,G:.3,B:1.5};e.push(b);b={radius:3,alpha:.5,color:15628151,G:.3,B:1.52};e.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,B:1.745};e.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,B:1.8};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:10933495,B:.32};f.push(b);b={radius:14,alpha:.3,color:11007484,B:.36};f.push(b);b={radius:10,alpha:.3,color:4037331,B:.58};f.push(b);b={radius:14,alpha:.22,color:8835068,B:.68};f.push(b);
b={radius:10,alpha:.27,color:11007484,B:.82};f.push(b);b={radius:11,alpha:.27,color:10867450,B:1};f.push(b);b={radius:9,alpha:.2,color:6158332,B:1.05};f.push(b);b={radius:10,alpha:.17,color:10867450,B:1.78};f.push(b);b={radius:10,alpha:.3,color:4037331,B:-.23};f.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,B:.175};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,B:.46};e.push(b);b={radius:3,alpha:.3,color:10867450,G:.35,B:.5};e.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,B:.75};e.push(b);
b={radius:3,alpha:.25,color:4031699,G:.25,B:.75};e.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,B:.9};e.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,B:1.3};e.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,B:1.62};e.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,B:1.6};e.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,B:1.83};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,B:-.18};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:16389120,
B:.32};f.push(b);b={radius:26,alpha:.22,color:16389120,B:.4};f.push(b);b={radius:26,alpha:.25,color:16389120,B:.65};f.push(b);b={radius:18,alpha:.3,color:16389120,B:1.23};f.push(b);b={radius:14,alpha:.26,color:16389120,B:1.33};f.push(b);b={radius:17,alpha:.18,color:16389120,B:1.7};f.push(b);b={radius:30,alpha:.16,color:16389120,B:2.15};f.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,B:1.45};e.push(b);b={radius:7,alpha:.5,color:15628151,G:.3,B:1.5};e.push(b);b={radius:3,alpha:.5,color:15628151,
G:.3,B:1.52};e.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,B:1.745};e.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,B:1.8};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:24,alpha:.2,color:15186464,B:.2};f.push(b);b={radius:7,alpha:.26,color:15186464,B:.35};f.push(b);b={radius:23,alpha:.18,color:15186464,B:.65};f.push(b);b={radius:13,alpha:.2,color:15186464,B:.8};f.push(b);b={radius:11,alpha:.15,color:15186464,B:1.4};f.push(b);b={radius:15,alpha:.11,color:15451904,
B:1.6};f.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,B:.22};e.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,B:.4};e.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,B:.45};e.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,B:.5};e.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,B:.88};e.push(b);b={radius:140,alpha:.18,color:15579138,G:.32,B:.95};e.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,B:1.1};e.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,B:1.2};e.push(b);b={radius:55,
alpha:.2,color:15451904,G:.45,B:1.33};e.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,B:1.42};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a)};v.prototype.zt=function(){if(this.nm){var f=this.o.S,e,a=new y.Ua(0,0,-100),b=this.o.lf(),c=0,m=0,h=!1;if(this.o.na){var n=this.o.Cb.width;var p=this.o.Cb.height;this.o.D.Di&&(n=this.o.D.Cc.width,p=this.o.D.Cc.height)}else{this.aa||(this.aa=this.vd.getContext("2d"));if(this.aa.width!==this.o.C.width||this.aa.height!==this.o.C.height)this.aa.width=
this.o.C.width,this.aa.height=this.o.C.height;this.aa.clear?this.aa.clear():this.aa.clearRect(0,0,this.vd.width,this.vd.height);n=this.aa.width;p=this.aa.height}var r=Math.sqrt(n*n+p*p),t=r/800;for(e=0;e<this.Th.length;e++){var w=this.Th[e];a.init(0,0,-100);a.Ka(-w.u*Math.PI/180);a.Oa(w.pan*Math.PI/180);a.Oa(-this.o.pan.m*Math.PI/180);a.Ka(this.o.u.m*Math.PI/180);a.zb(this.o.W.m*Math.PI/180);if(-.01>a.z){m=-b/a.z;c=a.x*m;m*=a.y;var z=Math.max(n,p);Math.abs(c)<z/2+100&&Math.abs(m)<z/2+100&&(h=!0,c+=
n/2,m+=p/2)}if(h){this.o.na&&(f.blendFunc(f.SRC_ALPHA,f.ONE),f.enable(f.BLEND),f.disable(f.DEPTH_TEST));z=n/2;var C=p/2;var F=Math.sqrt((z-c)*(z-c)+(C-m)*(C-m));var E=r/2;C=n>p?n:p;z=w.gn/100*((E-F)/E);0>z&&(z=0);if(this.o.na){f.useProgram(this.Ec);f.bindBuffer(f.ARRAY_BUFFER,this.o.D.xb);f.vertexAttribPointer(this.Ec.ja,this.o.D.xb.itemSize,f.FLOAT,!1,0,0);var D=f.getUniformLocation(this.Ec,"uCanvasDimensions");f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight);f.uniform2f(f.getUniformLocation(this.Ec,
"uFlareCenterPosition"),f.drawingBufferWidth/n*c,p-f.drawingBufferHeight/p*m);f.uniform1f(f.getUniformLocation(this.Ec,"uBlindingValue"),z);D=f.getUniformLocation(this.Ec,"uAspectRatio");f.uniform1f(D,this.o.D.Di?f.drawingBufferWidth/f.drawingBufferHeight:f.drawingBufferWidth/f.drawingBufferHeight/(n/p));f.drawArrays(f.TRIANGLE_STRIP,0,this.o.D.xb.numberOfItems)}else D=this.aa.createRadialGradient(c,m,1,c,m,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(w.type)&&!this.o.D.Di){z=n/2-c;C=p/2-m;var A=1,G=Number(w.type)-1;F<.35*E&&(A=F/(.35*E),A*=A);F>.7*E&&(A=(E-F)/(.3*E));A*=w.alpha/100;if(0<this.zc[G].length)for(F=0;F<this.zc[G].length;F++){var J=this.zc[G][F];E=J.radius*t;var H=J.alpha*A;0>H&&(H=0);var I=J.color;if(8==G||9==G||10==G)I=w.color;if(this.o.na)f.useProgram(this.Aa),f.bindBuffer(f.ARRAY_BUFFER,
this.dg),f.vertexAttribPointer(this.Aa.ja,this.dg.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Aa,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),f.uniform2f(f.getUniformLocation(this.Aa,"uCirclePosition"),f.drawingBufferWidth/n*(c+z*J.B),f.drawingBufferWidth/n*(p-(m+C*J.B))),f.uniform2f(f.getUniformLocation(this.Aa,"uCircleTexturePosition"),f.drawingBufferWidth/n*(c+z*J.B),p-(m+C*J.B)),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleRadius"),E),f.uniform3f(f.getUniformLocation(this.Aa,
"uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleSoftness"),.1),D=f.getUniformLocation(this.Aa,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/p)),f.drawArrays(f.TRIANGLE_FAN,0,this.dg.numberOfItems);else{this.aa.save();this.aa.translate(c+z*J.B,m+C*J.B);D=this.aa.createRadialGradient(0,0,1,0,0,1.1*E);D.addColorStop(0,this.o.oa(I,H));D.addColorStop(.65,
this.o.oa(I,.9*H));D.addColorStop(.8,this.o.oa(I,.7*H));D.addColorStop(1,this.o.oa(I,.2*H));this.aa.beginPath();I=2*Math.PI/6;J=Math.PI/180*35;var L=!0;for(H=J;H<=J+2*Math.PI;H+=I)L?(this.aa.moveTo(E*Math.sin(H),E*Math.cos(H)),L=!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(0<this.lc[G].length)for(F=0;F<this.lc[G].length;F++){J=this.lc[G][F];E=J.radius*t;H=J.alpha*A;0>H&&(H=0);I=J.color;if(8==G||9==G||10==G)I=w.color;this.o.na?
(f.useProgram(this.Aa),f.bindBuffer(f.ARRAY_BUFFER,this.Ud),f.vertexAttribPointer(this.Aa.ja,this.Ud.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Aa,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),D=f.getUniformLocation(this.Aa,"uCirclePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*J.B),f.drawingBufferWidth/n*(p-(m+C*J.B))),D=f.getUniformLocation(this.Aa,"uCircleTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*J.B),p-(m+C*J.B)),D=f.getUniformLocation(this.Aa,
"uCircleRadius"),f.uniform1f(D,E),f.uniform3f(f.getUniformLocation(this.Aa,"uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleSoftness"),J.G),D=f.getUniformLocation(this.Aa,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/p)),f.drawArrays(f.TRIANGLE_FAN,0,this.Ud.numberOfItems)):(this.aa.save(),this.aa.translate(c+z*J.B,m+C*J.B),D=this.aa.createRadialGradient(0,
0,1,0,0,E),D.addColorStop(0,this.o.oa(I,H)),D.addColorStop(1-J.G,this.o.oa(I,.8*H)),D.addColorStop(1,this.o.oa(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(0<this.Ac[G].length)for(F=0;F<this.Ac[G].length;F++)w=this.Ac[G][F],E=w.radius*t,H=w.alpha*A,0>H&&(H=0),this.o.na?(f.useProgram(this.Fb),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,this.xp),f.bindBuffer(f.ARRAY_BUFFER,this.Ud),f.vertexAttribPointer(this.Fb.ja,
this.Ud.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Fb,"uCanvasDimensions2"),f.uniform2f(D,n,p),D=f.getUniformLocation(this.Fb,"uCirclePosition"),f.uniform2f(D,c+z*w.B,p-(m+C*w.B)),D=f.getUniformLocation(this.Fb,"uRingTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*w.B),p-(m+C*w.B)),D=f.getUniformLocation(this.Fb,"uCircleRadius"),f.uniform1f(D,E),f.uniform2f(f.getUniformLocation(this.Fb,"uRingPosition"),c+z*w.B,p-(m+C*w.B)),f.uniform1f(f.getUniformLocation(this.Fb,"uRingRadius"),
E),f.uniform1f(f.getUniformLocation(this.Fb,"uRingAlpha"),H),D=f.getUniformLocation(this.Fb,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/p)),f.uniform1i(f.getUniformLocation(this.Fb,"uSampler"),0),f.drawArrays(f.TRIANGLE_FAN,0,this.Ud.numberOfItems)):(this.aa.save(),this.aa.translate(c+z*w.B,m+C*w.B),D=this.aa.createRadialGradient(0,0,0,0,0,E),D.addColorStop(0,this.o.oa(16777215,0)),D.addColorStop(.88,this.o.oa(0,0)),D.addColorStop(.9,this.o.oa(16654848,H)),D.addColorStop(.92,
this.o.oa(16776448,H)),D.addColorStop(.94,this.o.oa(4849466,H)),D.addColorStop(.96,this.o.oa(131071,H)),D.addColorStop(.98,this.o.oa(8190,H)),D.addColorStop(1,this.o.oa(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.na&&(f.useProgram(this.o.sa.O),f.disable(f.BLEND),f.enable(f.DEPTH_TEST))}}}};return v}();y.yq=x})(ggP2VR||(ggP2VR={}));var THREE;
(function(y){var x=function(){function v(f){this.wb=[];this.Ij=[];this.ca={x:0,y:0};this.Wc={x:0,y:0};this.Zh=0;this.session=null;this.$k=!1;this.Om=this.Nm=this.yf=0;this.vl=this.Qg=!1;this.om=0;this.Cg=-5;this.Cm=0;this.aj=this.cg=this.Bj=!1;this.o=null;this.am=!0;this.fg=1;this.nj=[];this.frustumCulled=!1;this.Gh=0;this.Mm=null;this.Cn=!0;this.Bk=this.sq=!1;this.Ee=[-1,-1,-1,-1];this.Fe=[-1,-1,-1,-1];this.uf=[!1,!1,!1,!1];this.Hc=[];this.wj=[];this.tf=[];this.o=f;var e=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)}}e.Rs()},0);THREE?this.fn():console.log("Three.js not available!")}v.prototype.jr=function(){this.init();this.animate()};v.prototype.fn=function(){this.ym=new THREE.Matrix4;this.ap=new THREE.Euler};v.prototype.init=function(){"xr"in navigator||console.log("no WebXR support");if(THREE)if(this.Sa)console.log("already set up!");else{this.ym||this.fn();var f=this,e=this.o,
a=this.mc=e.mc,b=this.Wt=new THREE.Scene,c=this.Cu=new THREE.Scene,m=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,2E4);b.add(m);108>THREE.REVISION&&(this.frustumCulled=!0);m.position.z=-.01;m.position.y=0;m.position.x=0;this.Sa=m=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!1});m.setClearColor(new THREE.Color(0),1);m.setPixelRatio(window.devicePixelRatio);m.setSize(window.innerWidth,window.innerHeight);m.outputEncoding=
THREE.sRGBEncoding;m.shadowMap.enabled=!1;a.appendChild(m.domElement);"xr"in navigator&&(m.xr.enabled=!0,m.xr.setReferenceSpaceType("local"));var h=this.Lk=new THREE.Group;h.name="controllerGroup";h.renderOrder=3E3;a=this.Jk=m.xr.getController(0);a.addEventListener("selectstart",function(z){f.cp(z)});a.addEventListener("selectend",function(z){f.bp(z)});a.visible=!0;a.userData.Tf=0;h.add(a);var n=this.Kk=m.xr.getController(1);n.addEventListener("selectstart",function(z){f.cp(z)});n.addEventListener("selectend",
function(z){f.bp(z)});n.visible=!0;n.userData.Tf=1;h.add(n);h.visible=!1;var p=this.Qe=new THREE.Group;p.name="skinGroup";p.translateZ(this.Cg);p.visible=!1;p.renderOrder=1E3;c.add(p);p=this.Bm=new THREE.Group;p.name="toggleSkinGroup";p.translateZ(this.Cg+.1);p.renderOrder=1100;c.add(p);c.add(h);p=(new THREE.TextureLoader).load("webxr/vrSkinShow.svg");var r=(new THREE.TextureLoader).load("webxr/vrSkinHide.svg");h=new THREE.PlaneBufferGeometry(.3,.3);p=new THREE.MeshBasicMaterial({map:p});p.transparent=
!0;r=new THREE.MeshBasicMaterial({map:r});r.transparent=!0;h=new THREE.Mesh(h,p);h.name="SkinToggleButton";h.position.y=3.12;h.Av=!1;h.userData.ct=p;h.userData.bt=r;h.userData.onclick=function(){f.oi()};this.Tb=h;this.Tb.visible=!1;this.Bm.add(h);h=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);p=new THREE.LineBasicMaterial({color:14737632});h=new THREE.Line(h,p);h.name="line";h.scale.z=5;a.add(h.clone());n.add(h.clone());this.li=new THREE.Raycaster;
this.ca=new THREE.Vector2;this.Je=new THREE.Group;this.Je.name="panoGroup";e.kd||(this.Je.renderOrder=1);this.sf=new THREE.Group;this.sf.name="imageGroup";this.Ed=new THREE.Group;this.Ed.name="hotspotGroup";this.$i=new THREE.Group;this.$i.name="elementGroup";this.eh=new THREE.Group;this.eh.name="centerGroup";e.kd||(this.eh.renderOrder=2E3);this.Je.add(this.$i);this.Je.add(this.Ed);this.Je.add(this.sf);b.add(this.Je);b.add(this.eh);h=new THREE.BufferGeometry;e=[];a=[];for(n=0;20>n;n++)p=2*n*Math.PI/
20,r=Math.cos(p),p=Math.sin(p),a.push(.03*r,.03*p,0),a.push(.05*r,.05*p,0);for(n=0;20>n;n++){p=2*n;r=2*n+1;var t=(n+1)%20*2+1,w=(n+1)%20*2;e.push(p,r,w);e.push(r,t,w)}h.setIndex(e);h.setAttribute("position",new THREE.Float32BufferAttribute(a,3));e=new THREE.MeshBasicMaterial({color:"black",side:THREE.DoubleSide});e=new THREE.Mesh(h,e);e.position.z=-5;this.eh.add(e);window.addEventListener("resize",function(){f.wt()},!1);document.addEventListener("mouseup",function(){f.st()},!1);document.addEventListener("mousedown",
function(z){f.qt(z)},!1);document.addEventListener("mousemove",function(z){f.rt(z)},!1);Y&&"undefined"!==typeof __THREE_DEVTOOLS__&&(__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:b})),__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:c})),__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:m})))}else console.log("Three.js not available!")};v.prototype.Pp=function(){var f=this.o;f.N("VR not found");f.H("vrchanged",{});f.H("playerstatechanged",{})};
v.prototype.Bu=function(){this.vl=!0;var f=this.o;f.N("XR found");f.H("vrchanged",{});f.H("playerstatechanged",{})};v.prototype.Rs=function(){if(!this.sq){this.sq=!0;var f=this;if("xr"in navigator)navigator.xr.isSessionSupported("immersive-vr").then(function(e){e?f.Bu():f.Pp()})["catch"](f.Pp)}};v.prototype.kl=function(){return this.Qe};v.prototype.mg=function(){return null!=this.session?this.Sa.xr.isPresenting:this.o.le?!0:!1};v.prototype.qf=function(){return this.vl&&THREE};v.prototype.ut=function(f){var e=
this;this.Li();f.addEventListener("end",function(){e.tt()});console.log("XR Session started.");this.Sa.xr.setSession(f);this.$k=!0;this.session=f;e.o.H("entervr",{session:f})};v.prototype.tt=function(){console.log("XR Session ended.");this.$k=!1;this.session=null;this.Ik()};v.prototype.Yf=function(){var f=this.o;if(this.vl){if(null===this.session){var e=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor"]}).then(function(b){e.ut(b)})["catch"](function(b){console.log(b);
console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!");e.Ik()})}this.Ed&&this.Ed.translateY(-this.Gh);this.Gh=0;if(1==this.fg){var a=navigator.userAgent;0<=a.indexOf("OculusBrowser")&&(0<=a.indexOf("Pacific")&&(this.fg=1.7),0<=a.indexOf("Quest")&&(this.fg=1.5))}this.Sa.xr.setFramebufferScaleFactor(this.fg);f.Uc("Enter VR - scaled "+this.fg)}else this.Li(),this.o.H("entervr",{session:null})};v.prototype.xt=function(){if(THREE&&this.Sa){var f=this.o;f.le=!0;f.$.style.display=
"none";f.bb.style.display="none";this.Sa.domElement.style.display="inline";f.H("vrchanged",{});f.H("playerstatechanged",{})}};v.prototype.Ik=function(){if(THREE&&this.Sa){var f=this.o;f.le=!1;f.$.style.display="inline";f.bb.style.display="inline";this.Sa.domElement.style.display="none";f.zg(0);f.hc();f.update();f.H("vrchanged",{});f.H("playerstatechanged",{});this.o.H("exitvr",{session:null});this.Gk()}};v.prototype.Zf=function(){null!=this.session&&this.session.end()};v.prototype.eq=function(){this.mg()?
this.Zf():this.Yf()};v.prototype.ur=function(){var f=0,e=this.o,a=e.L.M;var b=1536;this.Sa&&e.N("Canvas: "+b);b*=Math.pow(2,0);if(0<a.levels.length){for(;a.levels.length>=f+2&&!a.levels[f+1].Cf&&a.levels[f+1].width>b;)f++;e.N("Level "+f+" - width: "+a.levels[f].width);e.N(a.levels)}return f};v.prototype.oo=function(f){var e=this.o,a=e.L.M,b=e.Ue[f];f="";if(b){b=b.firstChild;for(var c;b;)"input"==b.nodeName&&(c=b)&&(c=0<a.levels.length?c.getAttributeNode("leveltileurl"):c.getAttributeNode("tilevrurl"))&&
(f=c.nodeValue),b=b.nextSibling}else f=0<a.levels.length?a.Gl:e.Nk;a=f;f=e.vp;for(b=0;3>b;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 e.gb(a)};v.prototype.ceilPowerOfTwo=function(f){return Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))};v.prototype.loadTexture=function(f,e,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.o.crossOrigin);var c=this;b.load(e,function(m){var h=c.ceilPowerOfTwo(m.width),n=c.ceilPowerOfTwo(m.height);
f.encoding=THREE.sRGBEncoding;if(h==m.width&&n==m.height||!a)f.image=m;else{c.o.N("resizing "+m.width+"/"+m.height+" -> "+h+"/"+n);var p=document.createElement("canvas");p.width=h;p.height=n;p.getContext("2d").drawImage(m,0,0,h,n);f.image=p}f.needsUpdate=!0;f.uo=!0;f.ze&&f.ze.uo&&(f.Dh.visible=!0,f.ze.Dh.visible=!0)});this.nj.push(f)};v.prototype.Li=function(){if(THREE){var f=this.o;if(this.Bk)f.N("vr panorama aleady added!");else{var e=this.sf,a=this;f.N("add vr panorama");this.Df();this.camera.layers.enable(1);
e.setRotationFromEuler(this.ap);e.rotateX(f.Ya.pitch*Math.PI/180);e.rotateZ(-f.Ya.W*Math.PI/180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),c=new THREE.Texture,m=new THREE.ImageLoader;m.setCrossOrigin(this.o.crossOrigin);m.load(this.oo(f.dj()),function(h){c.encoding=THREE.sRGBEncoding;c.image=h;c.needsUpdate=!0});m=new THREE.MeshBasicMaterial({map:c,side:THREE.DoubleSide});b=new THREE.Mesh(b,m);b.scale.x=-1;b.rotateZ(f.Ya.W*Math.PI/180);b.rotateX(-f.Ya.pitch*Math.PI/180);b.rotateY(-90*
Math.PI/180);e.add(b);a.Mj=b;a.Bk=!0;setTimeout(function(){f.N("Adding Main Pano");a.Bk=!1;a.Mq();f.A.j?a.Pq():a.Nq();a.Kq()});this.Qt();this.am=!0}}};v.prototype.Pq=function(){var f=this.o,e=this.sf,a=2E4/3;if(f.Fd){var b=new THREE.VideoTexture(f.A.j);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping;b.minFilter=THREE.LinearFilter;b.encoding=THREE.sRGBEncoding;var c=new THREE.SphereBufferGeometry(a,60,40);c.scale(-1,1,1);for(var m=c.attributes.uv.array,h=1;h<m.length;h+=2)m[h]*=
.5;m=new THREE.MeshBasicMaterial({map:b});c=new THREE.Mesh(c,m);c.rotateY(-90*Math.PI/180);c.layers.set(f.Eg?1:2);e.add(c);c=new THREE.SphereBufferGeometry(a,60,40);c.scale(-1,1,1);m=c.attributes.uv.array;for(h=1;h<m.length;h+=2)m[h]*=.5,m[h]+=.5;m=new THREE.MeshBasicMaterial({map:b});c=new THREE.Mesh(c,m);c.rotateY(-90*Math.PI/180);c.layers.set(f.Eg?2:1)}else c=new THREE.SphereBufferGeometry(a,60,40),c.scale(-1,1,1),b=new THREE.VideoTexture(f.A.j),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,
b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,m=new THREE.MeshBasicMaterial({map:b}),c=new THREE.Mesh(c,m),c.rotateY(-90*Math.PI/180);e.add(c);try{f.A.j.play()}catch(n){f.Uc(n)}};v.prototype.Nq=function(){var f=this.o,e=this.o.L.M,a=[],b=this.ur(),c=this.sf,m=2E4/3,h=f.Fd?2:1;if(e.levels.length>b)for(var n=e.levels[b],p=0;6>p;p++){a[p]=new THREE.Group;for(var r=0;r<n.ta;r++)for(var t=0;t<n.Y;t++)for(var w=0;w<h;w++){var z=new THREE.Texture;z.encoding=THREE.sRGBEncoding;this.loadTexture(z,
f.L.Ig(p,b,t,r,1==w),!0);z.wrapS=THREE.ClampToEdgeWrapping;z.wrapT=THREE.ClampToEdgeWrapping;z.minFilter=THREE.LinearMipMapLinearFilter;z.anisotropy=1;var C=e.V+2*e.ib,F=e.V+2*e.ib;t==n.Y-1&&(C=n.width-e.V*(n.Y-1)+2*e.ib);r==n.ta-1&&(F=n.width-e.V*(n.ta-1)+2*e.ib);var E=new THREE.PlaneBufferGeometry(m*C/n.width,m*F/n.width,8),D=new THREE.MeshBasicMaterial({map:z});E=new THREE.Mesh(E,D);D.transparent=!0;D.side=THREE.FrontSide;D=1*e.V;E.position.x=m*(t*D+C/2-e.ib-n.width/2)/n.width;E.position.y=m*-(r*
D+F/2-e.ib-n.width/2)/n.width;E.position.z=-.5*m;if(f.Fd)if(E.visible=!1,E.layers.set(1==w?1:2),z.Dh=E,0==w)var A=E;else C=A.material.map,z.ze=C,C.ze=z;a[p].add(E);E.frustumCulled=this.frustumCulled}4>p?a[p].rotation.y=-p*Math.PI/2:a[p].rotation.x=(4==p?1:-1)*Math.PI/2;c.add(a[p])}else for(e=f.Jg,p=0;6>p;p++)for(a[p]=new THREE.Group,w=0;w<h;w++)b=p,f.Fd&&(b=p+(1==w?6:0)),z=new THREE.Texture,z.encoding=THREE.sRGBEncoding,this.loadTexture(z,f.gb(f.kh[b]),!1),z.wrapS=THREE.ClampToEdgeWrapping,z.wrapT=
THREE.ClampToEdgeWrapping,z.minFilter=THREE.LinearFilter,E=new THREE.PlaneBufferGeometry(e*m/2,e*m/2,64),D=new THREE.MeshBasicMaterial({map:z}),E=new THREE.Mesh(E,D),D.transparent=!0,D.side=THREE.FrontSide,E.position.x=0,E.position.y=0,E.position.z=-.25*m,f.Fd&&(E.layers.set(1==w?1:2),E.visible=!1,z.Dh=E,0==w?A=E:(C=A.material.map,z.ze=C,C.ze=z)),a[p].add(E),4>p?a[p].rotation.y=-p*Math.PI/2:a[p].rotation.x=(4==p?1:-1)*Math.PI/2,c.add(a[p])};v.prototype.Mq=function(){var f=this.o,e=this.Ed;new y.Ua(0,
0,-100);for(var a=f.K.ck,b=0;b<f.J.length;b++){var c=f.J[b];if("poly"!=c.type){var m=null,h=c.Ou(),n=c.Jf?100:5;if(f.Ji&&f.Ji.addSkinHotspot)(m=f.Ji.addSkinHotspot(c))&&m.userData.xv&&(n=100);else{var p=.2;if(!1!==h){n=!c.distance||0>=c.distance?5:1>c.distance?1:5>c.distance?c.distance:5;if(c.gd){h=.005;var r=(new THREE.TextureLoader).load(c.gd);r.encoding=THREE.sRGBEncoding;var t=new THREE.MeshBasicMaterial({map:r});if(c.Jf){m=2*n*Math.tan(c.fov/2*Math.PI/180);var w=new THREE.PlaneBufferGeometry(m,
m*c.yd/c.ff,1,1);t.transparent=!0;t.opacity=1}else w=new THREE.PlaneBufferGeometry(h*c.ff,h*c.yd,1,1),t.transparent=!0,t.opacity=.25;p=h*c.yd/2;t.side=THREE.DoubleSide}else w=new THREE.SphereBufferGeometry(.2,16,16),r=(new THREE.TextureLoader).load(this.oo(h)),r.encoding=THREE.sRGBEncoding,t=new THREE.MeshBasicMaterial({map:r}),t.transparent=!0,t.opacity=.25;m=new THREE.Mesh(w,t);h=c.title;if(a.enabled&&""!=h){w=document.createElement("canvas");w.width=256;w.height=32;r=w.getContext("2d");this.Ci||
(this.Ci=document.createElement("canvas"),this.Ci.width=w.width,this.Ci.height=w.height);var z=this.Ci.getContext("2d");z.clearRect(0,0,w.width,w.height);z.font="16px Helvetica";z.textAlign="center";z.textBaseline="top";t=z.measureText(h);var C=t.width;0<a.height&&(C=Math.min(a.width,w.width-6),C=Math.max(C,t.width));t=C+6;a.background&&(z.fillStyle=this.o.oa(a.Wb,a.Vb),z.fillRect((w.width-C)/2-3,2,C+6,24));0<a.Pi&&(z.strokeStyle=this.o.oa(a.Yb,a.Xb),z.strokeRect((w.width-C)/2-3,2,C+6,24));z.fillStyle=
this.o.oa(a.dk,a.bk);z.fillText(h,w.width/2,5,w.width-6);r.drawImage(this.Ci,(w.width-t)/2,2,t,24,0,0,w.width,w.height);r=new THREE.Texture(w);r.encoding=THREE.sRGBEncoding;r.needsUpdate=!0;h=1.5;w=new THREE.PlaneBufferGeometry(1*h*t/w.width,3*h/w.height,1,1);t=new THREE.MeshBasicMaterial({map:r,side:THREE.DoubleSide});w=new THREE.Mesh(w,t);w.translateY(-p-.125*h/2);w.frustumCulled=this.frustumCulled;m.add(w);t.transparent=!0;t.opacity=.5}m.userData={P:c}}}m&&(m.rotateY(c.pan*Math.PI/180),m.rotateX(c.u*
Math.PI/180),m.translateZ(-n),m.castShadow=!1,m.receiveShadow=!1,m.frustumCulled=this.frustumCulled,e.add(m))}}};v.prototype.Kq=function(){for(var f=this.o,e=0;e<f.Xa.length;e++){var a=f.Xa[e];if(a.j){var b=(new THREE.TextureLoader).load(a.j.src);this.un(a,b)}}for(e=0;e<f.U.length;e++)a=f.U[e],a.j&&"_videopanorama"!=a.id&&!a.od&&(a.j.play(),b=new THREE.VideoTexture(a.j),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,
this.un(a,b))};v.prototype.un=function(f,e){var a=this.$i,b=5E3*Math.tan(f.fov*Math.PI/360);var c=0<f.qc?b*f.Pc/f.qc:b;f.Jc&&1!=f.Jc&&(c*=f.Jc);b=new THREE.PlaneBufferGeometry(b,c,5,5);e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide,transparent:!0});e=new THREE.Mesh(b,e);e.rotateY(f.pan*Math.PI/180);e.rotateX(f.u*Math.PI/180);e.translateY(-0);e.translateZ(-2500);e.rotateZ(-f.zb*Math.PI/180);e.rotateY(-f.Oa*Math.PI/180);e.rotateX(-f.Ka*Math.PI/180);e.userData=f;e.castShadow=!1;e.receiveShadow=
!1;a.add(e)};v.prototype.qh=function(f){for(var e=f.children.length-1;0<=e;e--){var a=f.children[e];this.qh(a);f.remove(a)}f.geometry&&f.geometry.dispose();f.material&&(f.material.texture&&(f.material.texture.dispose(),f.material.texture.ze=null,f.material.texture.Dh=null),f.material.map&&(f.material.map.dispose(),f.material.map.ze=null,f.material.map.Dh=null),f.material.dispose())};v.prototype.Df=function(){THREE&&(this.nj=[],this.qh(this.sf),this.qh(this.Ed),this.qh(this.$i),10<this.Sa.info.memory.textures&&
this.o.Pm(this.Sa.info.memory))};v.prototype.wt=function(){if(THREE){var f=this.camera;f.aspect=window.innerWidth/window.innerHeight;f.updateProjectionMatrix();this.Sa.setSize(window.innerWidth,window.innerHeight)}};v.prototype.cp=function(f){if(THREE){f=f.target;this.Gk();var e=this.fl(f);0<e.length&&(this.$g(e,f.userData.Tf),0<this.wb.length&&(f=this.wb[0],e=f.userData,e.P&&!e.fromSkin?(f=e.P,this.o.pd(f.url,f.target)):(this.qe(f,"onclick"),this.qe(f,"onmousedown"))))}};v.prototype.bp=function(f){if(THREE){f=
f.target;var e=this.fl(f);0<e.length&&this.$g(e,f.userData.Tf)}};v.prototype.fl=function(f){this.ym.identity().extractRotation(f.matrixWorld);this.li.ray.origin.setFromMatrixPosition(f.matrixWorld);this.li.ray.direction.set(0,0,-1).applyMatrix4(this.ym);return this.wl(this.li)};v.prototype.wl=function(f){var e=[];if(this.Ed.visible){var a=f.intersectObjects(this.Ed.children,!0);e=e.concat(a)}this.Qe.visible&&(a=f.intersectObjects(this.Qe.children,!0),e=e.concat(a));a=f.intersectObjects(this.Bm.children,
!0);return e=e.concat(a)};v.prototype.$g=function(f,e){void 0===e&&(e=-1);for(var a=0;a<f.length;a++)if(void 0!==f[a].object.userData.isVisible&&f[a].object.userData.isVisible()||void 0===f[a].object.userData.isVisible&&f[a].object.visible||f[a].object.userData.tv){var b=f[a].object;b.selected=!0;b.distance=f[a].distance;b.Tf=e;this.wb.push(b)}};v.prototype.intersectObjects=function(f){var e=f.getObjectByName("line"),a=this.fl(f);0<a.length&&this.$g(a,f.userData.Tf);e.scale.z=0<this.wb.length?this.wb[0].distance:
5};v.prototype.Gk=function(){for(;this.wb.length;)this.wb.pop().selected=!1};v.prototype.rt=function(f){f.preventDefault();var e=this.ca,a=this.Sa;e.x=f.clientX/a.domElement.clientWidth*2-1;e.y=2*-(f.clientY/a.domElement.clientHeight)+1;1==f.buttons&&(this.Zh=this.Wc.x-e.x)};v.prototype.Ss=function(){var f=this.li;f.setFromCamera(this.ca,this.camera);f=this.wl(f);0<f.length&&this.$g(f)};v.prototype.Ts=function(){var f=this.li;f.setFromCamera({x:0,y:0},this.camera);f=this.wl(f);0<f.length&&this.$g(f)};
v.prototype.st=function(){this.Zh=0;if(0<this.wb.length){var f=this.wb[0];f.userData.P||this.qe(f,"onmouseup")}};v.prototype.qe=function(f,e,a){void 0===a&&(a=!1);var b=f;do if(b.userData[e])if(a){var c=f.Tf;0<=c&&this.Hc&&this.Hc[c]&&(c=this.Hc[c],c.hapticActuators&&0<c.hapticActuators.length&&c.hapticActuators[0].pulse(.8,5))}else b.userData[e]();while(!b.userData.stopPropagation&&(b=b.parent))};v.prototype.hn=function(f,e){do if(f.userData.onclick||f.userData.P&&!f.userData.fromSkin)e?f.userData.vi=
-1:f.userData.vi&&-1!=f.userData.vi?Date.now()>f.userData.vi+1E3&&(f.userData.onclick?(f.userData.onclick(),f.userData.vi=-1):f.userData.P&&f.userData.P.url&&this.o.pd(f.userData.P.url,f.userData.P.target)):f.userData.vi=Date.now();while(!f.userData.stopPropagation&&(f=f.parent))};v.prototype.qt=function(f){50>f.clientX&&50>f.clientY&&this.o.Zf();if(0<this.wb.length){f=this.wb[0];for(var e=1;e<this.wb.length;e++)this.wb[e].position.z>f.position.z&&(f=this.wb[e]);e=f.userData;e.P?(f=e.P,this.o.pd(f.url,
f.target)):(this.qe(f,"onclick"),this.qe(f,"onmousedown"))}else this.Wc.x=this.ca.x,this.Wc.y=this.ca.y};v.prototype.animate=function(){var f=this.To=this;this.Sa&&this.Sa.setAnimationLoop(function(){f.render()})};v.prototype.render=function(){if(THREE){var f=null;try{f=this.Sa.xr.getCamera(this.camera)}catch(t){}this.Mm=f;0==this.Gh&&f&&(this.Gh=f.position.y,this.Ed.translateY(this.Gh));var e=this.To,a=e.o;if(a.le){e.Qg=e.Jk.visible||e.Kk.visible?!1:!0;var b=this.Js();this.Ks();this.Mj&&0<this.nj.length&&
this.nj.every(function(t){return t.uo})&&(this.qh(this.Mj),this.sf.remove(this.Mj),this.Mj=null,a.N("unload Preview Sphere"));for(var c=this.Ed,m=c.children.length-1;0<=m;m--){var h=c.children[m],n=1,p=1;h.selected?(n=1.5,p=1):b?(n=.6,p=.7):(n=.4,p=.5);var r=h.scale.x;r+=.1*(n-r);h.userData.fromSkin?h.userData.ggUse3d&&(r=10):(h.material.opacity+=.1*(p-h.material.opacity),h.userData&&h.userData.P&&h.userData.P.gd?(h.userData.P.Jf&&(r=1,h.material.opacity=1),0<h.children.length&&(h.children[0].material.opacity=
h.material.opacity)):(h.rotateY(1*Math.PI/180),0<h.children.length&&(h.children[0].rotateY(-1*Math.PI/180),h.children[0].material.opacity=h.material.opacity)));h.scale.x=h.scale.y=h.scale.z=r}b=e.camera.rotation.clone();b.reorder("YXZ");this.Nm=180*b.y/Math.PI;this.Om=180*b.x/Math.PI;a.Ji&&!this.Qe.visible&&this.Cn&&(10<this.Om?this.Bj||(this.Bj=!0,this.Zs=new Date):(this.Bj=!1,!this.cg&&!this.Tb.visible||this.aj||(this.aj=!0,this.Xk=new Date),this.cg=!1),!this.Bj||this.cg||this.Tb.visible||(c=new Date,
500<c.getTime()-this.Zs.getTime()&&(this.cg=!0,this.Xk=new Date)),this.cg?(this.Tb.visible=!0,c=new Date,c=(c.getTime()-this.Xk.getTime())/5,100<=c?(this.Tb.material.opacity=1,this.cg=!1):this.Tb.material.opacity=c/100):this.aj&&(c=new Date,c=(c.getTime()-this.Xk.getTime())/5,100<=c?(this.Tb.material.opacity=0,this.aj=this.Tb.visible=!1):this.Tb.material.opacity=1-c/100));this.am&&(this.ni(this.Nm-a.pan.m),this.am=!1);a.Kp(this.Nm-this.yf,this.Om,180*b.z/Math.PI);a=this.eh;e.Qg?f&&(a.setRotationFromEuler(f.rotation),
a.visible=!0):a.visible=!1;a=this.Bm;f&&!this.Qe.visible&&(a.translateZ(-(this.Cg+.1)),a.rotateY(-this.Cm),b=new THREE.Vector3(0,0,1),b.applyEuler(f.rotation),this.Cm=Math.atan2(b.x,b.z),a.rotateY(this.Cm),a.translateZ(this.Cg+.1));e.Sa.autoClear=!0;e.Sa.render(e.Wt,e.camera);e.Sa.autoClear=!1;e.Sa.clearDepth();e.Sa.render(e.Cu,e.camera);0==this.Zh||isNaN(this.Zh)||this.ni(this.Zh)}}};v.prototype.Js=function(){var f=this,e=this;this.Hc=[];var a=!0;this.session?this.session.inputSources.forEach(function(p){var r=
p.profiles;"gaze"==p.targetRayMode?e.Qg=!0:(f.Hc.push(p.gamepad),0<=r.indexOf("oculus-go")&&(a=!1),0<=r.indexOf("generic-trigger-squeeze-thumbstick")&&(a=!0),0<=r.indexOf("oculus-touch")&&(a=!0))}):this.Hc=navigator.getGamepads&&navigator.getGamepads();var b=!1;if(this.Hc)for(var c=0;c<this.Hc.length;c++){var m=this.Hc[c];if(m&&0<m.buttons.length)if(2<=m.axes.length&&2<m.buttons.length&&!a)if(m.buttons[2].pressed)this.uf[c]||(this.uf[c]=!0,this.oi());else if(m.buttons[2].touched){b=!0;this.uf[c]=
!1;var h=m.axes[0],n=m.axes[1];-1==this.Ee[c]?this.Ee[c]=h:(m=this.Ee[c]-h,-.3>m&&(this.ni(20),this.Ee[c]=h,this.Fe[c]=n),.3<m&&(this.ni(-20),this.Ee[c]=h,this.Fe[c]=n));-1==this.Fe[c]?this.Fe[c]=n:(m=this.Fe[c]-n,-.5>m&&(this.oi(!0),this.Fe[c]=n,this.Ee[c]=h),.5<m&&(this.oi(!1),this.Fe[c]=n,this.Ee[c]=h))}else this.Ee[c]=-1,this.Fe[c]=-1,this.uf[c]=!1;else 4<=m.axes.length&&(h=m.axes[2],n=m.axes[3],.8<h?(b=!0,1!=this.tf[c]&&(this.tf[c]=1,this.wj[c]=Date.now()-1E4)):-.8>h?(b=!0,-1!=this.tf[c]&&(this.tf[c]=
-1,this.wj[c]=Date.now()-1E4)):this.tf[c]=0,0!=this.tf[c]&&400<Date.now()-this.wj[c]&&(this.wj[c]=Date.now(),this.ni(20*this.tf[c])),m.buttons[1].pressed?this.uf[c]||(this.uf[c]=!0,this.oi()):this.uf[c]=!1)}e.Lk.visible==(!this.Hc||0==this.Hc.length)&&(e.Lk.visible=!e.Lk.visible);return b};v.prototype.ip=function(f){for(f=f.parent;f;){if(f.selected)return!0;f=f.parent}return!1};v.prototype.Ks=function(){var f=this.To;f.Ij=f.wb.slice();f.Gk();f.Jk.visible&&f.intersectObjects(f.Jk);f.Kk.visible&&f.intersectObjects(f.Kk);
f.$k||f.Ss();f.Qg&&f.Ts();for(var e=0;e<f.wb.length;e++){var a=f.wb[e];f.Qg&&this.hn(a,!1);-1!=f.Ij.indexOf(a)||this.ip(a)||(this.qe(a,"onmouseover"),this.Hc&&0<this.Hc.length&&this.qe(a,"onclick",!0))}for(e=0;e<f.Ij.length;e++)a=f.Ij[e],-1==f.wb.indexOf(a)&&(this.ip(a)||this.qe(a,"onmouseout"),f.Qg&&this.hn(a,!0))};v.prototype.oi=function(f){var e=this.Qe;void 0===f&&(f=!e.visible);var a=this.Mm;f?(e.translateZ(-this.Cg),e.rotateY(-this.om),a&&(f=new THREE.Vector3(0,0,1),f.applyEuler(a.rotation),
this.om=Math.atan2(f.x,f.z)),e.rotateY(this.om),e.translateZ(this.Cg),this.Qe.visible=!0,this.Tb.material=this.Tb.userData.bt,this.Tb.visible=!0,this.Tb.material.opacity=1):(this.Qe.visible=!1,this.Tb.material=this.Tb.userData.ct,this.Tb.visible=!1)};v.prototype.Qt=function(){this.yf=0;this.Je.setRotationFromEuler(this.ap)};v.prototype.ni=function(f){this.yf+=f;this.Je.rotateY(f*Math.PI/180)};return v}();y.Iq=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){return function(){this.fov=this.u=this.pan=0}}();y.qv=x;var v=function(){function f(e){this.pan={m:0,Ha:0,min:0,max:360,d:0,Gj:0,$b:0,open:0};this.u={m:0,Ha:0,min:-90,max:90,d:0,$b:0,open:0};this.W={m:0,Ha:0,min:-180,max:180,d:0,open:0};this.oc={pan:0,u:-90,W:0,fov:170,pb:9};this.fov={m:70,Ha:70,min:1,Yh:0,max:170,Il:360,Jl:270,prev:0,d:0,Oc:{enabled:!1,x:0,y:0},mode:0,Vp:0,yn:0,open:0};this.cube=new y.Dq;this.sa=null;this.Ya={W:0,pitch:0};this.Eg=this.Fd=!1;this.Jj=
this.fp=4;this.ep=this.Nl=0;this.M=new y.Bq;this.rg=200;this.Bi=0;this.Am=5;this.ie=0;this.bq=50;this.Os=0;this.A={src:[],cf:4,width:640,height:480,Tc:!1,ng:!1,Yj:!0,sm:!1,ue:"loop",ak:"",j:HTMLVideoElement=null,zm:!1,texture:WebGLTexture=null,lk:WebGLBuffer=null,Ai:WebGLBuffer=null,pj:WebGLBuffer=null,format:1,Eh:0,flipY:1,tb:function(){return 0},dm:function(){},loop:function(){return!1}};this.vf={pan:-1,u:-1,fov:-1};this.Dl=0;this.kh=[];this.Nk="";this.lh=[];this.Jg=this.Se=1;this.Ql=new x;this.o=
e}f.prototype.ma=function(){this.o.ma(!1)};f.prototype.update=function(){this.o.update()};f.prototype.mf=function(){return this.pan.m};f.prototype.hj=function(){var e=this.pan.m;if(!this.hb()){for(;-180>e;)e+=360;for(;180<e;)e-=360}return e};f.prototype.Vd=function(){var e=this.pan.m-this.pan.Gj;if(!this.hb()){for(;-180>e;)e+=360;for(;180<e;)e-=360}return e};f.prototype.de=function(e){this.ma();isNaN(e)||(this.pan.m=Number(e));this.update()};f.prototype.Vj=function(e){this.ma();isNaN(e)||(this.pan.m=
Number(e)+this.pan.Gj);this.update()};f.prototype.Ri=function(e,a){isNaN(e)||(this.de(this.mf()+e),a&&(this.pan.d=e))};f.prototype.ln=function(e,a){this.Ri(e*this.kf(),a)};f.prototype.kf=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};f.prototype.gg=function(){return this.u.m};f.prototype.ee=function(e){this.ma();isNaN(e)||(this.u.m=Number(e));this.update()};f.prototype.Si=function(e,a){this.ee(this.gg()+e);a&&(this.u.d=e)};f.prototype.nn=function(e,a){this.Si(e*this.kf(),
a)};f.prototype.zg=function(e){this.ma();isNaN(e)||(this.W.m=Number(e));this.update()};f.prototype.kj=function(){return this.W.m};f.prototype.Dd=function(){return this.fov.m};f.prototype.Ab=function(e){this.ma();switch(this.Z()){case 4:var a=170;break;case 12:a=360;break;case 9:a=355;break;default:a=170}this.hb()&&(a=9999999999);return!isNaN(e)&&0<e&&e<a&&(a=this.fov.m,this.fov.m=1*e,this.df(),a!=this.fov.m)?(this.update(),!0):!1};f.prototype.gm=function(e){0<=e&&4>e&&(this.fov.mode=Number(e),this.df(),
this.update())};f.prototype.hb=function(){return 2==this.o.Kd};f.prototype.Dk=function(e,a){this.Ab(this.Dd()+e);a&&(this.fov.d=e)};f.prototype.Qi=function(e,a){if(!isNaN(e)){var b=e/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);b=this.fov.m*Math.exp(b);this.Ab(b);a&&(this.fov.d=e)}};f.prototype.lm=function(e,a){this.ma();isNaN(e)||(this.pan.m=e);isNaN(a)||(this.u.m=a);this.update()};f.prototype.Kp=function(e,a,b){this.ma();!isNaN(e)&&1E7>e&&-1E7<e&&(this.pan.m=e);!isNaN(a)&&1E7>a&&-1E7<a&&(this.u.m=
a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.W.m=b);this.update()};f.prototype.yg=function(e,a,b){this.ma();isNaN(e)||(this.pan.m=e);isNaN(a)||(this.u.m=a);isNaN(b)||this.Ab(b);this.update()};f.prototype.Bp=function(){this.yg(this.pan.Ha,this.u.Ha,this.fov.Ha)};f.prototype.rb=function(e,a,b){var c=a?Number(a):0;if(0!=e&&4!=e&&12!=e&&9!=e)this.o.Uc("Unsupported projection type: "+e);else if(a&&0!==c&&4!==c&&12!==c&&9!==c)this.o.Uc("Unsupported projection2 type: "+c);else if(e==c&&(c=0),this.ep=b?Number(b):1,
this.Jj!=e||this.Nl!=c)this.Jj=e,this.Nl=c,this.sa.qj()};f.prototype.Z=function(){return 0==this.Jj?4:this.Jj};f.prototype.Ic=function(){return this.Nl};f.prototype.Bh=function(){return this.fp};f.prototype.jj=function(){return this.ep};f.prototype.aspect=function(){return this.o.C.width/this.o.C.height};f.prototype.Go=function(){return 4==this.Z()&&0==this.Ic()};f.prototype.Nb=function(e,a){e||(e=this.fov.m);a||(a=this.Z());return this.Uf(a,1/this.Ln(this.o.C),e)};f.prototype.Uf=function(e,a,b){return this.hb()?
a*b:4==e?360*Math.atan(a*Math.tan(b/2*Math.PI/180))/Math.PI:9==e?720*Math.atan(a*Math.tan(b/4*Math.PI/180))/Math.PI:a*b};f.prototype.dl=function(e,a){e||(e=this.Nb());a||(a=this.Z());return this.Uf(a,this.aspect(),e)};f.prototype.cl=function(e,a){e||(e=this.Nb());a||(a=this.Z());var b=this.aspect();b=Math.sqrt(1+b*b);return this.Uf(a,b,e)};f.prototype.jn=function(e){var a;a||(a=this.Z());return this.Uf(a,this.Ln(this.o.C),e)};f.prototype.Ln=function(e){var a=1;switch(this.fov.mode){case 0:a=1;break;
case 1:a=e.width/e.height;break;case 2:a=Math.sqrt(e.width*e.width+e.height*e.height)/e.height;break;case 3:a=4*e.height/3>e.width?1:3*e.width/(4*e.height)}return a};f.prototype.si=function(e){this.Ab(this.jn(e))};f.prototype.hm=function(e){var a=this.Z(),b=1/this.aspect();this.si(this.Uf(a,b,e))};f.prototype.em=function(e){var a=this.Z(),b=this.aspect();b=1/Math.sqrt(1+b*b);this.si(this.Uf(a,b,e))};f.prototype.df=function(){if(!this.o.le){var e=this.Ql;e.pan=this.pan.m;e.u=this.u.m;e.fov=this.fov.m;
this.Sf(e);this.Sf(e);this.Sf(e);this.pan.m=e.pan;this.u.m=e.u;this.fov.m!=e.fov&&(this.fov.m=e.fov)}};f.prototype.Sf=function(e){var a=this.aspect();var b=this.o.C;var c=this.o,m=c.v;if(this.hb()){if(0<this.fov.Yh){var h=this.Se;this.M.levels&&0<this.M.levels.length&&(h=this.M.levels[0].height);10<h&&(this.fov.min=100*b.height/(h*this.fov.Yh))}h=e.fov/2;b=h*a;var n=this.M.width/this.M.height*50;a=c.I.Ap?2*Math.min(50,n/a):2*Math.max(50,n/a);e.fov<this.fov.min&&(e.fov=this.fov.min);e.fov>a&&(e.fov=
a);50<h?e.u=0:(50<e.u+h&&(e.u=50-h),-50>e.u-h&&(e.u=-50+h));b>n?e.pan=0:(e.pan+b>n&&(e.pan=n-b,c.v.active&&(c.v.speed=-c.v.speed,this.pan.d=0)),e.pan-b<-n&&(e.pan=-n+b,m.active&&(m.speed=-m.speed,this.pan.d=0)))}else{0<this.fov.Yh&&(h=this.Se,this.M.levels&&0<this.M.levels.length&&(h=this.M.levels[0].height),10<h&&(this.fov.min=360*Math.atan2(b.height/2,h/2*this.fov.Yh)/Math.PI));e.fov<this.fov.min&&(e.fov=this.fov.min);n=this.fov.max;var p=179;h=this.Nb()/2;b=a*h;4==this.Z()?b=180*Math.atan(a*Math.tan(h*
Math.PI/180))/Math.PI:9==this.Z()?(n=this.fov.Jl,p=355):12==this.Z()&&(n=this.fov.Il,p=360);c.na||(n=Math.max(160,n));e.fov>n&&(e.fov=n);12==this.Z()&&(2*b>p&&(e.fov=p/a),h=this.Nb()/2,2*h>p&&(e.fov=p),h=this.Nb()/2,b=a*h);2*h>this.u.max-this.u.min&&180>this.u.max-this.u.min&&(h=(this.u.max-this.u.min)/2,e.fov=this.jn(2*h));90>this.u.max?e.u+h>this.u.max&&(e.u=this.u.max-h):e.u>this.u.max&&(e.u=this.u.max);-90<this.u.min?e.u-h<this.u.min&&(e.u=this.u.min+h):e.u<this.u.min&&(e.u=this.u.min);c=this.pan.max-
this.pan.min;359.99>c&&(e.pan<this.pan.min&&e.pan+360<this.pan.max&&(e.pan+=360),this.pan.m>this.pan.max&&e.pan-360>this.pan.min&&(e.pan-=360),a=90,n=Math.tan(h*Math.PI/180),p=Math.tan((Math.abs(e.u)+h)*Math.PI/180),p=Math.sqrt(p*p+1)/Math.sqrt(n*n+1),h=180*Math.atan(p*Math.tan(b*Math.PI/180))/Math.PI,2*h>c&&(p=Math.tan(c*Math.PI/360)/Math.tan(b*Math.PI/180),c=p*Math.sqrt(n*n+1),p=Math.sqrt(c*c-1),a=180/Math.PI*Math.atan(p)),e.pan+h>this.pan.max&&(e.pan=this.pan.max-h,m.active&&(m.speed=-m.speed,
this.pan.d=0)),e.pan-h<this.pan.min&&(e.pan=this.pan.min+h,m.active&&(m.speed=-m.speed,this.pan.d=0)),e.u+b>a&&(e.u=a-b),e.u-b<-a&&(e.u=-a+b))}};f.prototype.Ig=function(e,a,b,c,m){var h=this.M.Fl-1-a,n=this.M.Gl,p="x";switch(e){case 0:p="f";break;case 1:p="r";break;case 2:p="b";break;case 3:p="l";break;case 4:p="u";break;case 5:p="d";break;case "vr":p="vr"}m&&(e+="l",p+="l");m=this.o.vp;for(var r=0;3>r;r++)n=m(n,"c",e),n=m(n,"s",p),n=m(n,"r",a),n=m(n,"l",h),n=m(n,"x",b),n=m(n,"y",c),n=m(n,"v",c),
n=m(n,"h",b);return this.o.gb(n)};f.prototype.rs=function(e,a,b){b.fx=e.width/this.M.V*a.xh;b.fy=e.height/this.M.V*a.yh;b.Id=e.width/this.M.V*a.Vh;b.Jd=e.height/this.M.V*a.Wh;b.fx=Math.min(Math.max(0,Math.floor(b.fx)),e.Y-1);b.fy=Math.min(Math.max(0,Math.floor(b.fy)),e.ta-1);b.Id=Math.min(Math.max(0,Math.floor(b.Id)),e.Y-1);b.Jd=Math.min(Math.max(0,Math.floor(b.Jd)),e.ta-1)};f.prototype.av=function(){if(!(6>this.cube.bg.length))for(var e=0;6>e;e++){var a=this.cube.bg[e];var b=[];b.push(new y.Ua(-1,
-1,-1,0,0));b.push(new y.Ua(1,-1,-1,1,0));b.push(new y.Ua(1,1,-1,1,1));b.push(new y.Ua(-1,1,-1,0,1));for(var c=0;4>c;c++)4>e?b[c].Oa(-Math.PI/2*e):b[c].Ka(Math.PI/2*(4==e?-1:1)),this.Ya&&(b[c].zb(this.Ya.W*Math.PI/180),b[c].Ka(-this.Ya.pitch*Math.PI/180)),b[c].Ef(-this.pan.m),b[c].ce(this.u.m),b[c].Ff(this.W.m);b=this.o.Hk(b);a.pc=0<b.length;if(a.pc){a=a.ei;a.xh=b[0].Nd;a.Vh=b[0].Nd;a.yh=b[0].ic;a.Wh=b[0].ic;for(c=1;c<b.length;c++)a.xh=Math.min(a.xh,b[c].Nd),a.Vh=Math.max(a.Vh,b[c].Nd),a.yh=Math.min(a.yh,
b[c].ic),a.Wh=Math.max(a.Wh,b[c].ic);a.Ii=a.Vh-a.xh;a.pk=a.Wh-a.yh;a.scale=Math.max(a.Ii,a.pk)}else a.ei.Ii=-1,a.ei.pk=-1}};f.prototype.So=function(){for(var e=0;e<this.M.levels.length;e++){var a=this.M.levels[e],b;for(b in a.Ma)a.Ma.hasOwnProperty(b)&&(a.Ma[b].visible=!1)}};f.prototype.Jn=function(){var e=0,a=this.o.C,b=Math.tan(Math.min(this.Nb(),175)*Math.PI/360),c=a.height/(2*b);c*=1+a.width/a.height*b/2;for(c*=Math.pow(2,1<this.o.devicePixelRatio?this.M.Ro:this.M.Qo);this.M.levels.length>=e+
2&&!this.M.levels[e+1].Cf&&this.M.levels[e+1].width>c;)e++;return e};f.prototype.Et=function(){if(this.o.I.zp&&this.o.I.Zd){var e=this.Ql;e.pan=this.pan.m;e.u=this.u.m;e.fov=this.fov.m;this.Sf(e);this.Sf(e);this.Sf(e);var a=e.pan-this.pan.m,b=e.u-this.u.m;e=e.fov-this.fov.m;if(0!=a||0!=b||0!=e){var c=.2+.9*Math.min((Math.abs(a)+Math.abs(b)+Math.abs(e))/Math.abs(Math.min(this.fov.m,90))*.3,1);this.pan.m+=a*c;this.u.m+=b*c;this.fov.m+=e*c;this.o.ka.bm=.3;this.update()}else this.o.ka.bm=0}else this.df();
if(isNaN(this.pan.m)||1E7<this.pan.m||-1E7>this.pan.m)this.pan.m=0;if(isNaN(this.u.m)||1E7<this.u.m||-1E7>this.u.m)this.u.m=0;if(isNaN(this.W.m)||1E7<this.W.m||-1E7>this.W.m)this.W.m=0;if(!this.hb()){for(;360<this.pan.m;)this.pan.m-=360;for(;-360>this.pan.m;)this.pan.m+=360}};return f}();y.Cq=v})(ggP2VR||(ggP2VR={}));var Y=!1;
(function(y){var x=function(){return function(){this.fov=this.u=this.pan=0}}(),v=function(){return function(){this.sn=-1E7;this.zo=!1}}(),f=function(){function e(a,b){this.Xs="TGljZW5zZTogRGF2aWQgRyBNZWhhcw==";this.L=new y.Cq(this);this.pan=this.L.pan;this.u=this.L.u;this.W=this.L.W;this.oc=this.L.oc;this.fov=this.L.fov;this.Kd=0;this.Ya=this.L.Ya;this.C={width:10,height:10};this.Pk=new y.Ua;this.crossOrigin="anonymous";this.Wd=this.Lf=0;this.fd=1;this.tq={};this.Eg=this.Fd=!1;this.Ra={};this.hi=this.mh="";this.Rl=[];this.Cl=
!1;this.ia={start:{x:0,y:0},pa:{x:0,y:0},$d:{x:0,y:0},m:{x:0,y:0},ha:{x:0,y:0}};this.T={Wc:!1,hd:!1,sj:function(){return this.hd||this.Wc},Kn:0,startTime:0,start:{x:0,y:0},pa:{x:0,y:0},$d:{x:0,y:0},m:{x:0,y:0},ha:{x:0,y:0},fi:!1,Fg:HTMLElement=null};this.jf=this.ve=!0;this.ka={enabled:!0,pa:{x:0,y:0},ha:{x:0,y:0},bm:0,fov:{active:!1,nc:0,center:{enabled:!1,x:0,y:0}}};this.nb={alpha:0,beta:0,gamma:0,orientation:0,yf:0,mi:!0,fadeIn:0};this.Fh={alpha:0,beta:0,gamma:0,orientation:0};this.A={src:[],cf:4,
width:640,height:480,Tc:!1,ng:!1,Yj:!0,sm:!1,level:1,ue:"loop",ak:"",j:HTMLVideoElement=null,zm:!1,texture:WebGLTexture=null,lk:WebGLBuffer=null,Ai:WebGLBuffer=null,pj:WebGLBuffer=null,format:1,Eh:0,flipY:1,tb:function(){return 0},dm:function(){},loop:function(){return!1}};this.vj=0;this.control=this.sb=this.Ia=this.$=this.Gc=this.bb=this.ea=null;this.wd=[];this.ub=!1;this.oh=1;this.ua=null;this.ne=this.We=this.pf=!1;this.ah=0;this.Qd=.02;this.wk=0;this.xk=!1;this.vk=this.Mi=this.bh=this.Ve=this.cn=
0;this.an=-1;this.xc="";this.$l=this.Ne=!1;this.di=0;this.kh=[];this.Nk="";this.lh=[];this.Jg=this.Se=1;this.wg=!1;this.v={enabled:!1,timeout:5,active:!1,Dg:!1,speed:.4,ek:0,yo:!1,Fj:0,$o:!0,tg:"",Zo:!1,Rg:!1,sd:!1,Ni:"",qn:!1,Rd:"Animation01",Of:!1,Cj:!1,vm:!1,startTime:0,ld:0,wh:!1,Wi:!1,yj:0,Hd:0,Rh:0,Sh:0,Qh:0,No:0};this.F={active:!1,aborted:!1,speed:.1,pan:0,u:0,W:0,fov:70,zi:70,Rh:0,Sh:0,Oo:0,Qh:0,pb:0,ii:0,El:0,Jm:!1,sg:!1,$m:0,Zm:0,oj:!1};this.mk=null;this.vf={pan:-1,u:-1,fov:-1};this.Dl=
0;this.Ji=this.ga=null;this.Sg={};this.Tg={};this.Kf={};this.ob={};this.Ga={};this.se=[];this.bn={};this.sc={};this.Vc={};this.qg={};this.K={mode:1,Oh:-1,Ca:0,kb:0,ud:.05,Yb:255,Xb:1,Wb:255,Vb:.3,Ce:!0,ck:{enabled:!0,width:180,height:20,dk:0,bk:1,background:!0,Wb:16777215,Vb:1,Yb:0,Xb:1,zk:3,Pi:1,qk:!0},Rb:[],Bc:[],rd:[],Wj:[]};this.Fa=null;this.J=[];this.Qp=!1;this.X=[];this.U=[];this.Xa=[];this.Ub=[];this.Ue=[];this.$a=[];this.xa=[];this.Hf=[];this.Xd=this.qd=!1;this.ui=-1;this.ba=1;this.sa=this.Ke=
this.Zb=this.mc=null;this.th={};this.Sb={};this.$p=this.Gg="";this.Zp=-1;this.yt={target:0,current:0,ud:.01,delay:2,Uk:0,Xi:!1,Uq:!1};this.margin={left:0,top:0,right:0,bottom:0};this.I={Uh:!1,Ys:!1,rc:!1,Ge:!1,Zd:!0,Co:!1,rm:1,zp:!1,Mf:!0,Rk:!0,ih:!0,jh:!0,Ui:!1,kg:!1,Ap:!0,sensitivity:8};this.Xh=[];this.ph=!0;this.ca={x:0,y:0};this.Hi=this.Og=this.Ng=this.le=this.na=!1;this.kk=this.gv=!0;this.sl=!1;this.we=!0;this.Pg=this.pl=this.rl=!1;this.oq=!0;this.ul=!1;this.lb=this.pe="";this.ac="transition";
this.Bd="transform";this.Wf="perspective";this.qr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.Cb={width:0,height:0};this.Pn=new y.Ua;this.On=new y.Ua;this.Qn=new y.Ua;this.Rn=new y.Ua;this.Nn=new y.Ua;this.Gd=!1;this.fc=this.Mo=this.ra="";this.nk=[];this.Ll=[];this.Lh=this.Do=this.Jh=this.Eo=this.zl=this.kd=this.Ho=this.xl=this.cm=this.Sc=this.tj=this.lg=this.yl=this.Fo=
this.Al=this.Jo=this.nl=!1;this.Gi=!0;this.Qj=this.rj=!1;this.Hh=[];this.devicePixelRatio=1;this.fa=this.D=null;this.fh=!1;this.Za=null;this.Ea={enabled:!1,speed:1,running:!1,finished:!0,Ad:{pan:0,u:0,fov:0,pb:0,nq:!1}};this.Kl=!1;this.Aj="<<LOG>>";this.Im=!1;this.hh=function(m,h){if(0==m.length)return m;var n;var p=[];var r=h.Nj(m[0])-0;for(n=0;n<m.length;n++){var t=n;var w=n+1;w==m.length&&(w=0);var z=h.Nj(m[w])-0;if(0<=r&&0<=z)p.push(m[t]);else if(0<=r||0<=z){var C=z/(z-r);0>C&&(C=0);1<C&&(C=1);
var F=new y.Ua;F.Yd(m[t],m[w],C);0>r||p.push(m[t]);p.push(F)}r=z}return p};this.Ql=new x;this.qm=0;this.ki="";this.yc=!1;this.xj=-1;this.Yr=function(m){return m?this.Kh()&&(m.clientX||m.clientY)?{x:m.clientX,y:m.clientY}:m.pageX||m.pageY?{x:m.pageX,y:m.pageY}:m.clientX||m.clientY?{x:m.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:m.clientY+document.body.scrollTop+document.documentElement.scrollTop}:m.touches&&m.touches[0]?{x:m.touches[0].pageX,y:m.touches[0].pageY}:{x:0,y:0}:
{x:0,y:0}};this.xe=function(m){m=this.Yr(m);var h=this.Ch();return{x:m.x-h.x,y:m.y-h.y}};this.Ej=1;this.cj=this.Ko=this.Vk=this.Wl=this.Oj=0;this.Lo=!1;this.Cd=!0;this.rn=[5,0,0];this.fb=new y.Ki(this);this.fb.Ce=!1;this.Bn();if(7<this.Aj.length){var c=e.nh("bG9n");window[e.nh("Y29uc29sZQ==")][c](e.zn(this.Aj))}this.Oe(this.fb);this.checkLoaded=this.wd;this.isLoaded=!1;b&&b.hasOwnProperty("webGLFlags")&&b.webGLFlags&&(this.tq=b.webGLFlags);this.ma(!1);this.Qa=new y.yq(this);this.vn(a);this.Tq();this.userdata=
this.Sg=this.ag();this.emptyHotspot=this.fb;this.mouse=this.ca;this.D=new y.zq(this);this.Za=new y.Aq(this);this.sa=new y.Hq(this);this.L.sa=this.sa;this.Da=new y.Iq(this);this.hc()}e.prototype.so=function(a){return-99991===a?this.Xs:"7.0.5/19996"};e.prototype.Ar=function(){return this.fd};e.prototype.Xt=function(a){0<a&&(this.fd=a)};e.prototype.Zg=function(a){if(""!=a)try{var b=void 0;b="object"===typeof a?a:JSON.parse(a);if("object"===typeof b)for(var c in b)if("translations"==c&&this.Ra.hasOwnProperty("translations")){var m=
b[c],h;for(h in m)if(this.Ra.translations.hasOwnProperty(h))for(a=0;a<m[h].length-1;a++)""!=m[h][a]&&(this.Ra.translations[h][a]=m[h][a]);else this.Ra.translations[h]=m[h]}else this.Ra[c]=b[c];this.Ra.hasOwnProperty("projectLanguage")&&(this.hi=this.Ra.projectLanguage);this.H("languagechanged",{language:this.mh})}catch(n){console.error(n)}};e.prototype.Va=function(a,b){var c=a;if(""!=c&&"object"===typeof this.Ra&&this.Ra.hasOwnProperty("languages")&&this.Ra.hasOwnProperty("translations")){var m=this.Ra.languages.indexOf(this.mh);
-1!=m&&this.Ra.translations.hasOwnProperty(a)&&(a=this.Ra.translations[a],Array.isArray(a)&&a.length>m&&""!=a[m]&&(c=a[m]))}if(b&&0<b.length)for(m=b.length-1;0<=m;m--)c=c.replace(new RegExp("%"+String(m+1),"g"),b[m]);return c};e.prototype.jm=function(a){this.Cl=!0;a=a.replace("_","-");if("object"===typeof this.Ra&&this.Ra.hasOwnProperty("languages")&&this.Ra.hasOwnProperty("translations")&&this.hi!=a){for(var b=-1,c=-1,m="",h=-1,n=-1,p=a.substring(0,2).toUpperCase(),r=0;r<this.Ra.languages.length;r++)if(this.Ra.languages[r].toUpperCase()==
a.toUpperCase()){b=r;break}else if(!this.hi.toUpperCase().startsWith(p)&&this.Ra.languages[r].toUpperCase().startsWith(p)){if(""==m||-1!=m.indexOf("-"))c=r,m=this.Ra.languages[r]}else for(var t=window.navigator.languages,w=0;w<t.length;w++)!this.hi.toUpperCase().startsWith(p)&&this.Ra.languages[r].toUpperCase().startsWith(t[w].substring(0,2).toUpperCase())&&(-1==n||w<n)&&(h=r,n=w);a=-1!=b?b:-1!=c?c:h;a=-1!=a?this.Ra.languages[a]:this.hi}this.mh!=a&&(this.mh=a,this.Zq(),this.$q(),this.$.setAttribute("lang",
a),this.H("languagechanged",{language:a}))};e.prototype.Pr=function(){return this.mh};e.prototype.ns=function(){return this.Rl};e.prototype.Mk=function(){this.D.enabled=this.fa.enabled;this.D.type=this.fa.type;this.D.da=this.fa.zoomin;this.D.dd=this.fa.zoomout;this.D.dh=this.fa.blendtime;this.D.Wg=this.fa.zoomoutpause;this.D.tk=this.fa.zoomfov;this.D.rk=this.fa.zoomafterinfov;this.D.sk=this.fa.zoomafteroutfov;this.D.Xg=this.fa.zoomspeed;this.D.Pf=this.fa.blendcolor;this.D.Yc=this.fa.softedge;this.fa=
null};e.prototype.ru=function(a){this.fa={};this.fa.enabled=!0;this.fa.type=this.D.type;this.fa.zoomin=this.D.da;this.fa.zoomout=this.D.dd;this.fa.blendtime=this.D.dh;this.fa.zoomoutpause=this.D.Wg;this.fa.zoomfov=this.D.tk;this.fa.zoomafterinfov=this.D.rk;this.fa.zoomafteroutfov=this.D.sk;this.fa.zoomspeed=this.D.Xg;this.fa.blendcolor=this.D.Pf;this.fa.softedge=this.D.Yc;if(a.hasOwnProperty("type")){var b=a.type;if("cut"==b||"crossdissolve"==b||"diptocolor"==b||"irisround"==b||"irisroundcenter"==
b||"irisrectangular"==b||"irisrectangularcenter"==b||"wipeleftright"==b||"wiperightleft"==b||"wipetopbottom"==b||"wipebottomtop"==b||"wiperandom"==b)this.fa.type=b}a.hasOwnProperty("before")&&(b=Number(a.before),0==b||2==b)&&(this.fa.zoomin=b);a.hasOwnProperty("after")&&(b=Number(a.after),0==b||2==b||3==b||4==b)&&(this.fa.zoomout=b);a.hasOwnProperty("transitiontime")&&(b=Number(a.transitiontime),0<=b&&50>=b&&(this.fa.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.fa.zoomoutpause=1==a.waitfortransition);
a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.fa.zoomfov=b));a.hasOwnProperty("zoomafterinfov")&&(b=Number(a.zoomafterinfov),70<=b&&120>=b&&(this.fa.zoomafterinfov=b));a.hasOwnProperty("zoomafteroutoutfov")&&(b=Number(a.zoomafteroutfov),.01<=b&&70>=b&&(this.fa.zoomafteroutfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.fa.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.fa.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),
0<=a&&1E3>=a&&(this.fa.softedge=a));this.fh||this.Mk()};e.prototype.rb=function(a,b,c){this.L.rb(a,b,c)};e.prototype.Z=function(){return this.L.Z()};e.prototype.Bh=function(){return this.L.Bh()};e.prototype.Ic=function(){return this.L.Ic()};e.prototype.jj=function(){return this.L.jj()};e.prototype.Ek=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Uc("Unsupported projection type: "+a);else if(this.na||0==a||4==a||this.Uc("Projection changes require WebGL!"),this.Z()!=a){var c={};c.pan=this.pan.m;c.tilt=
this.u.m;c.fov=this.fov.m;c.projection=a;c.timingFunction=3;c.speed=b;a=this.zh(a);c.fov=Math.min(a,c.fov);this.Dj(c)}};e.prototype.addListener=function(a,b){(this.th[a]=this.th[a]||[]).push(b)};e.prototype.H=function(a,b){if(a=this.th[a])for(var c=a.length,m=0;m<c;m++)try{a[m].apply(null,[b])}catch(h){this.Uc(h)}};e.prototype.removeEventListener=function(a,b){var c=this.th[a];if(c){var m;var h=0;for(m=c.length;h<m;h++)if(c[h]===b){1===m?delete this.th[a]:c.splice(h,1);break}}};e.prototype.Pt=function(){this.ub=
!0};e.prototype.Cs=function(){return this.S};e.prototype.Oq=function(a,b,c,m){if(!this.Sb.hasOwnProperty(a)){var h=new v;this.Sb[a]=h;h.type=b;"undefined"!==typeof c&&this.Pe(a,c);"object"===typeof m&&this.Lp(a,m);return!0}return!1};e.Yn=function(a){var b=document.cookie.indexOf(a+"="),c="";-1!=b&&(b=b+a.length+1,a=document.cookie.indexOf(";",b),-1==a&&(a=document.cookie.length),c=decodeURIComponent(document.cookie.substring(b,a)));return c};e.uu=function(a,b){0==a.type?a.value="string"===typeof b?
b:b.toString():1==a.type?a.value="string"===typeof b?parseFloat(b):"number"===typeof b?b:b?1:0:2==a.type&&(a.value="string"===typeof b?"false"!==b&&""!==b&&"0"!==b:"number"===typeof b?0!=b:!!b)};e.prototype.Lp=function(a,b){if(this.Sb.hasOwnProperty(a)&&"object"===typeof b){var c=this.Sb[a];b.hasOwnProperty("cookiePath")&&(c.tn=String(b.cookiePath));b.hasOwnProperty("cookieExpireDays")&&(c.sn=parseFloat(b.cookieExpireDays));if(b.hasOwnProperty("keep")&&(c.Bl=!!b.keep,c.Bl&&0<document.cookie.length))if(""!=
this.Gg){if(-1!=document.cookie.indexOf(this.Gg+"=")){var m=JSON.parse(y.jc.Yn(this.Gg));m.hasOwnProperty(a)&&this.Pe(a,m[a])}}else m="ggvar_"+a,-1!=document.cookie.indexOf(m+"=")&&(m=y.jc.Yn(m),this.Pe(a,m));b.hasOwnProperty("ignoreInState")&&(c.zo=b.ignoreInState);b.hasOwnProperty("customProperty")&&"object"===typeof b.customProperty&&(b=b.customProperty,this.Ga.hasOwnProperty(a)?(this.Ga[a].variabletype!=b.variableType||this.Ga[a].propertytype!=b.propertyType)&&console.log("Custom property added as variable has different types than custom property from project."):
this.Ga[a]={Od:b.variableType,ji:b.propertyType,Tk:b.defaultValue});return!0}return!1};e.prototype.qu=function(a,b){this.Gg=a;b&&"object"===typeof b&&(b.hasOwnProperty("cookiePath")&&(this.$p=String(b.cookiePath)),b.hasOwnProperty("cookieExpireDays")&&(this.Zp=parseFloat(b.cookieExpireDays)))};e.dn=function(a,b,c){-1<=b&&(a+="; max-age="+86400*b);""!=c&&(a+="; path="+c);return a};e.Zn=function(a,b){switch(b){case 0:return a;case 1:return a.toString();case 2:return a?"true":"false"}};e.bl=function(a,
b){switch(b){case 0:return a;case 1:return Number(a);case 2:return"true"==a}};e.prototype.Pe=function(a,b,c){void 0===c&&(c=!0);if(void 0===b)return!1;var m=!1;this.Ga.hasOwnProperty(a)&&(0==this.Ga[a].ji?(this.Jp(this.ra,a,b),m=!0):1==this.Ga[a].ji&&this.P&&(this.im(this.ra,this.P.id,a,b),m=!0));if(this.Sb.hasOwnProperty(a)){var h=this.Sb[a];if(h.value!=b){y.jc.uu(h,b);if(h.Bl&&c){if(""!=this.Gg){h={};for(var n=0,p=Object.keys(this.Sb);n<p.length;n++)c=p[n],this.Sb[c].Bl&&(h[c]=encodeURIComponent(this.Sb[c].value.toString()));
c=this.Gg+"="+JSON.stringify(h);c=y.jc.dn(c,this.Zp,this.$p)}else c="ggvar_"+a+"="+encodeURIComponent(b.toString()),c=y.jc.dn(c,h.sn,h.tn?h.tn:"");document.cookie=c}m||this.H("varchanged_"+a,{value:b})}return!0}return!1};e.prototype.lj=function(a,b){return 0==b?this.Va(a):a};e.prototype.ll=function(a,b){void 0===b&&(b="");if(this.Ga.hasOwnProperty(a)){if(0==this.Ga[a].ji)return this.ko(this.ra,a);if(1==this.Ga[a].ji){if(""!=b||this.P&&this.P!=this.fb)return this.el(this.ra,""!=b?b:this.P.id,a);switch(this.Ga[a].Od){case 0:return"";
case 1:return 0;case 2:return!1}}}if(this.Sb.hasOwnProperty(a))return this.lj(this.Sb[a].value,this.Sb[a].type)};e.nh=function(a){var b="",c=0;a=a.replace(/[^A-Za-z0-9+\/=]/g,"");do{var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));
m=m<<2|h>>4;h=(h&15)<<4|n>>2;var r=(n&3)<<6|p;b+=String.fromCharCode(m);64!=n&&(b+=String.fromCharCode(h));64!=p&&(b+=String.fromCharCode(r))}while(c<a.length);return b};e.Nu=function(a){for(var b=[1,1,1,1,2,2,3,0],c=a.length,m="",h=0;h<c;){var n=a.charCodeAt(h++);if(n&128){var p=b[n>>3&7];if(!(n&64&&p)||h+p>c)return null;for(n&=63>>p;0<p;--p){var r=a.charCodeAt(h++);if(128!=(r&192))return null;n=n<<6|r&63}}m+=String.fromCharCode(n)}return m};e.zn=function(a){return e.Nu(e.nh(a))};e.prototype.Bn=
function(){this.devicePixelRatio=window.devicePixelRatio||1;this.Jo=!!navigator.userAgent.match(/(Windows|Win)/g);this.Al=!!navigator.userAgent.match(/(Mac|Macintosh|Mac_powerpc)/g)&&!navigator.userAgent.match(/(like Mac)/g);this.Fo=!!navigator.userAgent.match(/(Linux|Ubuntu)/g);this.yl=!!navigator.userAgent.match(/(MSIE)/g);this.lg=!!navigator.userAgent.match(/(Edge|EdgA|Edg)/g);this.tj=!!navigator.userAgent.match(/(Firefox)/g);if(this.Sc=!!navigator.userAgent.match(/(Safari)/g)){var a=navigator.userAgent.indexOf("Safari");
this.Xc=navigator.userAgent.substring(a+7);a=navigator.userAgent.indexOf("Version");-1!=a&&(this.Xc=navigator.userAgent.substring(a+8));this.Xc=this.Xc.substring(0,this.Xc.indexOf(" "));this.Xc=this.Xc.substring(0,this.Xc.indexOf("."));this.cm=!0}this.Ho=!!navigator.userAgent.match(/(SamsungBrowser)/g);if(this.xl=!!navigator.userAgent.match(/(Chrome|CriOS)/g))this.Sc=!1;this.kd=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);this.zl=!!navigator.userAgent.match(/(iPad)/g)||this.Al&&2<navigator.maxTouchPoints;
this.Eo=!!navigator.userAgent.match(/(iPhone|iPod)/g);this.Jh=!!navigator.userAgent.match(/(android)/i);this.Do=!!navigator.userAgent.match(/(IEMobile)/i);this.Lh=this.kd||this.Jh||this.Do||this.zl;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.Hh=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);this.rj=!window.requestAnimationFrame;a=["Webkit","Moz","O","ms","Ms"];this.lb="";this.ac="transition";this.Bd="transform";this.Wf="perspective";
for(var b=0;b<a.length;b++)"undefined"!==typeof document.documentElement.style[a[b]+"Transform"]&&(this.lb="-"+a[b].toLowerCase()+"-",this.ac=a[b]+"Transition",this.Bd=a[b]+"Transform",this.Wf=a[b]+"Perspective");this.sl=O();this.na=X();this.Ng=this.sl;this.na&&(this.Ng=!1);this.Ne=!0;this.$l=!1;if(this.kd||this.Jh)this.Hp(80),this.L.Am=2;this.Uc("Pano2VR player "+this.so()+" - Prefix:  "+this.lb+", "+(this.sl?"CSS 3D available":"CSS 3D not available")+", "+(this.na?"WebGL available":"WebGL not available"));
Y&&this.N("Pano2VR Debug version!");try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.qa=new AudioContext}catch(c){this.qa=null}this.Sc&&(!this.cm||9>Number(this.Xc))&&(this.qa=null);this.Sc&&!this.kd&&12<=Number(this.Xc)&&13>Number(this.Xc)&&(this.qa=null);this.Sc&&this.kd&&13==Number(this.Hh[0])&&(1==Number(this.Hh[1])||2<=Number(this.Hh[1]))&&(this.qa=null);this.Gi=this.Eo?this.Sc&&this.cm&&10<=Number(this.Xc)?!0:!1:!0};e.prototype.N=function(a){if(Y){var b=document.getElementById("gg_debug");
b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.log(a)}};e.prototype.Pm=function(a){if(Y){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.warn(a)}};e.prototype.Uc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"<br />");window.console&&window.console.log(a)};e.prototype.Hp=function(a){this.L.rg=a};e.prototype.setCrossOrigin=function(a){this.crossOrigin=a};e.prototype.au=function(a){this.De=
a};e.prototype.hs=function(){return this.di};e.prototype.Zt=function(a){this.pe=a};e.prototype.Xn=function(){return this.pe};e.prototype.hl=function(){return this.Lh};e.prototype.ao=function(){return this.ul};e.prototype.Or=function(){return this.Gd};e.prototype.es=function(){return this.Gd?this.jo().length:1};e.prototype.Lr=function(){return this.v.active};e.prototype.cu=function(a){this.Lh=!!a};e.prototype.fj=function(){return this.isLoaded};e.prototype.Nr=function(){return!this.isLoaded};e.prototype.lf=
function(){return Number(this.C.height)/(2*Math.tan(Math.PI/180*(this.Nb()/2)))};e.prototype.Mp=function(a,b){try{this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var c=a-this.margin.left-this.margin.right,m=b-this.margin.top-this.margin.bottom;if(!(10>c||10>m)){var h=window.devicePixelRatio||1;this.wg&&(h=1);this.ea.style.width=c+"px";this.ea.style.height=m+"px";this.ea.style.left=this.margin.left+"px";this.ea.style.top=this.margin.top+"px";if(this.na)try{this.bb&&(this.bb.style.position=
"absolute",this.bb.style.display="inline",this.bb.style.width=c+"px",this.bb.style.height=m+"px",this.bb.width=c*h,this.bb.height=m*h),this.S&&(this.Cb.width=c*h,this.Cb.height=m*h,this.S.viewport(0,0,this.S.drawingBufferWidth,this.S.drawingBufferHeight))}catch(t){alert(t)}this.Gc&&(this.Gc.style.width=a+"px",this.Gc.style.height=b+"px",this.Gc.width=a,this.Gc.height=b);this.Ia&&(this.Ia.style.width=a+"px",this.Ia.style.height=b+"px",this.sb.style.width=a+"px",this.sb.style.height=b+"px",this.sb.width=
a,this.sb.height=b,this.sb.style.left=this.margin.left+"px",this.sb.style.top=this.margin.top+"px",this.ua&&this.ua!=this.Ia&&(this.ua.style.width=a+"px",this.ua.style.height=b+"px"));if(this.Qa){var n=this.Qa.vd;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.pf&&(this.ub=!0);var p=this.ea.offsetWidth,r=this.ea.offsetHeight;if(this.C.width!=p||this.C.height!=r)this.C.width=p,this.C.height=r;this.fv();this.ua&&
this.ua.ggUpdateSize&&this.ua.ggUpdateSize(a,b);this.H("sizechanged",{w:a,h:b});this.H("playerstatechanged",{})}}catch(t){this.Pm(t)}};e.prototype.ke=function(){this.Im=!0};e.prototype.hc=function(){this.Mp(this.mc.offsetWidth,this.mc.offsetHeight)};e.prototype.Bs=function(){var a={width:0,height:0};a.width=this.C.width;a.height=this.C.height;return a};e.prototype.Ch=function(){var a={x:0,y:0},b=this.ea.getBoundingClientRect();a.x=b.left;a.y=b.top;this.Sc&&14>Number(this.Xc)&&(a.x=b.left+window.scrollX,
a.y=b.top+window.scrollY);return a};e.prototype.pu=function(a){this.ga=a};e.prototype.du=function(a,b,c,m){this.margin.left=a;this.margin.top=b;this.margin.right=c;this.margin.bottom=m;this.ga=this.skinObj;this.Ji=this.vrSkinObj;this.ke()};e.prototype.cr=function(a){0==a&&(this.I.Zd=!1);1==a&&(this.I.Zd=!0);2==a&&(this.I.Zd=!this.I.Zd);this.H("viewmodechanged",{});this.H("playerstatechanged",{})};e.prototype.zs=function(){return 1==this.I.Zd?1:0};e.prototype.mn=function(a,b){this.K.mode=1==b&&0<this.K.mode?
0:Math.round(a);this.update();this.H("polymodechanged",{})};e.prototype.uh=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var c=0;c<this.J.length;c++)"poly"==this.J[c].type&&a.test(this.J[c].id)&&b.push(this.J[c]);return b};e.prototype.Op=function(a){a=this.uh(a);for(var b=0;b<a.length;b++){var c=this.K.Rb.indexOf(a[b].id);-1==c?(this.K.Rb.push(a[b].id),this.K.Bc.push(0),this.K.rd.push(1)):this.K.rd[c]=1}this.update()};e.prototype.wo=function(a){a=this.uh(a);
for(var b=0;b<a.length;b++){var c=this.K.Rb.indexOf(a[b].id);-1!=c&&(this.K.rd[c]=0,this.K.Wj.push(a[b].id),this.update())}};e.prototype.Su=function(a){a=this.uh(a);for(var b=0;b<a.length;b++){var c=this.K.Rb.indexOf(a[b].id);-1==c||-1!=c&&0==this.K.rd[c]?this.Op(a[b].id):this.wo(a[b].id);this.update()}};e.prototype.br=function(a,b,c,m,h){var n=""==a?this.J:this.uh(a);for(var p=0;p<n.length;p++){var r=n[p];"poly"==r.type&&(r.Wb=b,r.Vb=c,r.Yb=m,r.Xb=h)}""==a&&(this.K.Wb=b,this.K.Vb=c,this.K.Yb=m,this.K.Xb=
h);this.update()};e.prototype.gu=function(a,b){var c=""==a?this.J:this.uh(a);for(var m=0;m<c.length;m++){var h=c[m];"poly"==h.type&&(h.Ce=b)}""==a&&(this.K.Ce=b);this.update()};e.prototype.ar=function(a){this.Qa&&(this.Qa.nm=0==a?!0:1==a?!1:!this.Qa.nm,this.update())};e.prototype.ls=function(){return this.K.mode};e.prototype.dr=function(){this.H("viewstatechanged",{})};e.prototype.As=function(){return 0};e.prototype.Vr=function(a){return"_firstmap"==a?"web":"_firstfloorplan"==a?"file":(a=this.sc[a])?
a.type:"web"};e.prototype.Ur=function(a){"_firstmap"==a?a=this.$n():"_firstfloorplan"==a&&(a=this.ej());return(a=this.sc[a])?a:{}};e.prototype.$n=function(){var a="",b;for(b in this.sc){var c=this.sc[b];"web"==c.type&&1E4>c.index&&(a=b)}return a};e.prototype.ej=function(){var a="",b;for(b in this.sc){var c=this.sc[b];"file"==c.type&&1E4>c.index&&(a=b)}return a};e.prototype.bs=function(a,b){"_firstfloorplan"==b&&(b=this.ej());var c=[];a||(a=this.ra);var m=this.se[a];m&&(a=m);""===a&&0<Object.keys(this.Vc).length&&
(a=Object.keys(this.Vc)[0]);this.Vc[a]&&this.Vc[a][b]&&(c.push(this.Vc[a][b].y),c.push(this.Vc[a][b].x));return c};e.prototype.cs=function(a,b){"_firstfloorplan"==b&&(b=this.ej());var c=[];a||(a=this.ra);var m=this.se[a];m&&(a=m);""===a&&0<Object.keys(this.Vc).length&&(a=Object.keys(this.Vc)[0]);this.qg[a]&&this.qg[a][b]&&(c.push(this.qg[a][b].x),c.push(this.qg[a][b].y));return c};e.prototype.fo=function(a){var b=this.se[a];b&&(a=b);b=this.eo();for(var c=[],m=0;m<b.length;m++)this.Vc[a][b[m]]&&c.push(b[m]);
return c};e.prototype.Tr=function(a){a=this.fo(a);return 0<a.length?a[0]:""};e.prototype.eo=function(){var a=[],b;for(b in this.sc)a.push(b);return a};e.prototype.Fr=function(){var a=[],b;for(b in this.sc)"file"==this.sc[b].type&&a.push(b);return a};e.prototype.Ms=function(){for(var a in this.sc)if("web"==this.sc[a].type)return!0;return!1};e.prototype.Ls=function(){for(var a in this.sc)if("file"==this.sc[a].type)return!0;return!1};e.prototype.vp=function(a,b,c){var m=(new RegExp("%0*"+b,"i")).exec(a.toString());
if(m){m=m.toString();var h=c.toString();m.charAt(m.length-1)!=b&&(h=(1+c).toString());if(!isNaN(parseFloat(c)))for(;h.length<m.length-1;)h="0"+h;a=a.replace(m,h)}return a};e.prototype.Qs=function(a,b,c){a=Math.atan2(a+1,c);var m=Math.atan2(b+1,c);b=Math.sin(a);c=Math.sin(m);a=Math.cos(a);m=Math.cos(m);this.Pn.init(0,0,-1);this.On.init(a,0,-b);this.Qn.init(-a,0,-b);this.Rn.init(0,m,-c);this.Nn.init(0,-m,-c)};e.prototype.Hk=function(a){a=this.hh(a,this.Pn);a=this.hh(a,this.On);a=this.hh(a,this.Qn);
a=this.hh(a,this.Rn);return a=this.hh(a,this.Nn)};e.prototype.kq=function(a){if(!this.Ne&&this.Ws!=a){this.Ws=a;var b=this.margin.left+this.C.width/2+"px ";b+=this.margin.top+this.C.height/2+"px ";this.Ia.style[this.Wf]=a+"px";this.Ia.style[this.Wf+"Origin"]=b;this.ea.style[this.Wf]=a+"px";this.ea.style[this.Wf+"Origin"]=b}};e.prototype.el=function(a,b,c){""!==a||this.Gd||(a="node1");a||(a=this.ra);return this.ob.hasOwnProperty(a)&&this.ob[a].hasOwnProperty(b)&&this.ob[a][b].hasOwnProperty(c)?this.lj(y.jc.bl(this.ob[a][b][c],
this.Ga[c].Od),this.Ga[c].Od):this.Ga.hasOwnProperty(c)?this.lj(y.jc.bl(this.Ga[c].Tk,this.Ga[c].Od),this.Ga[c].Od):null};e.prototype.im=function(a,b,c,m){""!==a||this.Gd||(a="node1");a||(a=this.ra);m="string"===typeof m?m:y.jc.Zn(m,this.Ga[c].Od);this.ob.hasOwnProperty(a)||(this.ob[a]={});this.ob[a].hasOwnProperty(b)||(this.ob[a][b]={});this.ob[a][b].hasOwnProperty(c)&&this.ob[a][b][c]==m||(this.ob[a][b][c]=m,this.H("varchanged_"+c,{}))};e.prototype.Er=function(a){return this.Ga.hasOwnProperty(a)?
this.Ga[a].Tk:null};e.prototype.bo=function(){return this.D.je||this.D.Md||this.na&&(4!=this.Z()||0!=this.Ic())?!1:!0};e.prototype.Em=function(){var a=new y.Ua(0,0,-100),b=this.lf(),c=this.L.M;var m=100/this.fov.m;var h=c.width/c.height;c=this.C.height*m*h;m*=this.C.height;for(var n=this.bo(),p=0;p<this.J.length;p++){var r=this.J[p];if("point"==r.type){var t=!1;if(this.hb()){var w=(this.pan.m-r.pan)/100/h*c;var z=(this.u.m-r.u)/100*m;Math.abs(w)<this.C.width/2+500&&Math.abs(z)<this.C.height/2+500&&
(t=!0)}else a.init(0,0,-100),a.Ka(-r.u*Math.PI/180),a.Oa(r.pan*Math.PI/180),a.Oa(-this.pan.m*Math.PI/180),a.Ka(this.u.m*Math.PI/180),a.zb(this.W.m*Math.PI/180),.01>a.z?(z=-b/a.z,w=a.x*z,z*=a.y,Math.abs(w)<this.C.width/2+5E3&&Math.abs(z)<this.C.height/2+5E3&&(t=!0)):z=w=-1E4;r.ec=w+this.C.width/2;r.Qb=z+this.C.height/2;r.Sl=r.ec/this.C.width*100;r.Tl=r.Qb/this.C.height*100;r.visible=t;r.px=r.ec;r.py=r.Qb;r.pxp=r.Sl;r.pyp=r.Tl;r.visible=r.visible;if(r.j&&r.j.onUpdatePosition)r.j.onUpdatePosition(this,
r);else r.j&&r.j.__div&&("none"!=r.j.__div.style[this.ac]&&(r.j.__div.style[this.ac]="none"),t&&n?(r.j.ggUse3d?(this.Ne||this.kq(b),this.hb()?(r.j.__div.style[this.Bd]="scale("+(100/this.fov.m*500/r.j.gg3dDistance).toFixed(10)+")",r.j.__div.style.left=this.margin.left+w+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+z+this.C.height/2+"px"):(r.j.__div.style.width="1px",r.j.__div.style.height="1px",w="",this.Ne&&(w+="perspective("+b+"px) "),w+="translate3d(0px,0px,"+b+"px) ",w+="rotateZ("+
this.W.m.toFixed(10)+"deg) ",w+="rotateX("+this.u.m.toFixed(10)+"deg) ",w+="rotateY("+(-this.pan.m).toFixed(10)+"deg) ",w+="rotateY("+r.pan.toFixed(10)+"deg) ",w+="rotateX("+(-r.u).toFixed(10)+"deg) ",w+="translate3d(0px,0px,"+(-1*r.j.gg3dDistance).toFixed(10)+"px) ",r.j.__div.style[this.Bd+"Origin"]="0% 0%",r.j.__div.style[this.Bd]=w,r.j.__div.style.left=this.margin.left+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+this.C.height/2+"px")):this.Qp?(r.j.__div.style.left=this.margin.left+
this.C.width/2+"px",r.j.__div.style.top=this.margin.top+this.C.height/2+"px",r.j.__div.style[this.Bd]="translate3d(0px,0px,-1000px) rotateY(0.1deg) translate3d("+w+"px,"+z+"px, 0.5px)",r.j.__div.style["transform-style"]="preserve-3d"):(r.j.__div.style.left=this.margin.left+w+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+z+this.C.height/2+"px"),r.j.__div.ggVisible&&(r.j.__div.style.visibility="visible")):(r.j.ggUse3d&&(r.j.__div.style[this.Bd]=""),r.j.__div.style.left="-1000px",r.j.__div.style.top=
"-1000px",r.j.__div.style.visibility="hidden"))}if("poly"==r.type){var C=[];if(this.hb())for(r.Af=[],t=0;t<r.vertices.length;t++)z=r.vertices[t],w=(this.pan.m-z.pan)/100/h*c,z=(this.u.m-z.u)/100*m,w+=this.margin.left+this.C.width/2,z+=this.margin.top+this.C.height/2,r.Af.push({ec:w,Qb:z});else{for(t=0;t<r.vertices.length;t++)z=r.vertices[t],a.init(0,0,-100),a.Ka(-z.u*Math.PI/180),a.Oa(z.pan*Math.PI/180),a.Oa(-this.pan.m*Math.PI/180),a.Ka(this.u.m*Math.PI/180),a.zb(this.W.m*Math.PI/180),C.push(a.clone());
C=this.Hk(C);if(0<C.length)for(t=0;t<C.length;t++)a=C[t],.1>a.z?(z=-b/a.z,w=this.C.width/2+a.x*z,z=this.C.height/2+a.y*z):z=w=0,a.ec=w,a.Qb=z;r.Af=C}}}this.H("hotspotsupdated",{})};e.prototype.Dr=function(){for(var a=[],b=0;b<this.J.length;b++){var c=this.J[b];"point"==c.type&&c.j&&c.j.__div&&a.push(c.j.__div)}return a};e.prototype.oa=function(a,b){a=Number(a);isNaN(b)&&(b=0);0>b&&(b=0);1<b&&(b=1);return"rgba("+(a>>16&255)+","+(a>>8&255)+","+(a&255)+","+b+")"};e.prototype.At=function(){var a;if(this.sb&&
(this.K.Oh!=this.K.mode&&(this.K.Oh=this.K.mode,this.sb.style.visibility=0<this.K.mode?"inherit":"hidden"),0<=this.K.mode||0<this.K.Rb.length)){this.Ib||(this.Ib=this.sb.getContext("2d"));if(this.Ib.width!=this.C.width||this.Ib.height!=this.C.height)this.Ib.width=this.C.width,this.Ib.height=this.C.height;this.Ib.clear?this.Ib.clear():this.Ib.clearRect(0,0,this.sb.width,this.sb.height);var b=1;0>=this.K.mode&&(b=0);3==this.K.mode&&(b=this.K.Ca);for(a=0;a<this.J.length;a++){var c=this.J[a];var m=b;
if("poly"==c.type){var h=c.Af;2==this.K.mode&&(m=c.Ca);var n=this.K.Rb.indexOf(c.id);-1!=n&&(m=this.K.Bc[n]);this.Ib.fillStyle=this.oa(c.Wb,c.Vb*m);this.Ib.strokeStyle=this.oa(c.Yb,c.Xb*m);if(0<h.length){this.Ib.beginPath();for(c=0;c<h.length;c++)m=h[c],0==c?this.Ib.moveTo(m.ec,m.Qb):this.Ib.lineTo(m.ec,m.Qb);this.Ib.closePath();this.Ib.stroke();this.Ib.fill()}}}}};e.xo=function(a,b,c){var m,h=!1;var n=0;for(m=a.length-1;n<a.length;m=n++){var p=a[n];m=a[m];p.Qb>c!=m.Qb>c&&b<(m.ec-p.ec)*(c-p.Qb)/(m.Qb-
p.Qb)+p.ec&&(h=!h)}return h};e.prototype.Ti=function(a,b){var c=-1;if((0<=this.K.mode||0<this.K.Rb.length)&&this.Go())for(var m=0;m<this.J.length;m++){var h=this.J[m];"poly"==h.type&&h.Af&&0<h.Af.length&&(-1!=this.K.mode||-1!=this.K.Rb.indexOf(h.id))&&y.jc.xo(h.Af,a,b)&&(c=m,h.ec=a,h.Qb=b)}return 0<=c?this.J[c]:!1};e.prototype.Go=function(){return 4==this.Z()&&0==this.Ic()};e.prototype.aspect=function(){return this.C.width/this.C.height};e.prototype.df=function(){this.L.df()};e.prototype.update=function(a){void 0===
a&&(a=0);this.ub=!0;a&&(this.oh=Math.max(1*a,this.oh))};e.prototype.co=function(){return 0<this.L.Bi||0<this.L.ie};e.prototype.Fi=function(){var a=Date.now();if(this.hb())this.Em(),this.na&&(this.sa.bv(),this.sa.gp());else if(0===this.Kd)if(!this.na||4==this.Z()&&0==this.Ic()){var b=this.lf();this.Qs(this.C.width/2,this.C.height/2,b);this.Em();this.Hi?this.sa.ev():this.gv&&this.mq();this.Fm();this.na?(this.A.Tc?14==this.A.format?this.sa.dv():this.sa.uq():0<this.L.M.levels.length?this.sa.mv():this.sa.ov(),
this.sa.gp()):(this.Og&&this.Zu(),this.At());this.Qa&&this.Qa.zt()}else this.sa.uq(),this.Em(),this.Ns();b=Date.now();50<b-a?(this.N("Time between frames: "+(b-a)),this.wg||(2<this.qm?(this.wg=!0,this.N("disabling HighDPI rendering"),this.hc()):this.qm++)):this.qm=0;this.pf&&this.L.M.tp++;this.na&&(a=this.S,a.disable(a.BLEND),a.disable(a.STENCIL_TEST),a.disable(a.DEPTH_TEST),a.disable(a.CULL_FACE))};e.prototype.Zu=function(){this.df();var a;this.Gc&&(a=this.Gc.getContext("2d"));if(this.C.width!==
this.ea.offsetWidth||this.C.height!==this.ea.offsetHeight)this.C.width=this.ea.offsetWidth,this.C.height=this.ea.offsetHeight;if(a){var b=a.canvas.width/2,c=a.canvas.height/2,m=a.createRadialGradient(b,c,5,b,c,Math.max(b,c));m.addColorStop(0,"#333");m.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);a.fillStyle=m;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.m.toFixed(1),b,c-60);a.fillText("Tilt: "+this.u.m.toFixed(1),b,c-30);
a.fillText("Fov: "+this.fov.m.toFixed(1),b,c+0);a.fillText("Node: "+this.dj(),b,c+30);a.fillText("Title: "+this.Sg.title,b,c+60)}};e.prototype.iu=function(a){a=Math.round(a);this.Ne=0<(a&1);this.$l=0<(a&2);this.kk=0<(a&4);this.wg=0<(a&8);4096<=a&&(this.Ng=0<(a&4096),this.na=0<(a&8192),this.Og=0<(a&32768))};e.prototype.os=function(){var a=0;this.Ne&&(a|=1);this.$l&&(a|=2);this.kk&&(a|=4);this.Ng&&(a|=4096);this.na&&(a|=8192);this.Og&&(a|=32768);return a};e.prototype.Fm=function(){var a=Math.round(this.lf());
this.Ne||this.kq(a);for(var b=0;b<this.Xa.length;b++){var c=this.Xa[b];c.Gm(a);c.j.hidden=!1}for(b=0;b<this.Ub.length;b++)c=this.Ub[b],c.Gm(a),c.j.hidden=!1};e.prototype.mq=function(){for(var a=Math.round(this.lf()),b=0;b<this.U.length;b++){var c=this.U[b];c.od||(c.Gm(a),c.j.hidden=!1)}};e.prototype.Ns=function(){for(var a=0;a<this.Xa.length;a++){var b=this.Xa[a];b.Gf(!1)}for(a=0;a<this.U.length;a++)b=this.U[a],b.od||b.Gf(!1);for(a=0;a<this.Ub.length;a++)b=this.Ub[a],b.Gf(!1)};e.prototype.fv=function(){try{for(var a=
0;a<this.mj();a++){var b=this.ml(a);b.od||b.ke()}}catch(c){this.Pm(c)}};e.prototype.Rc=function(a){this.we=!1;try{this.bb=a?a:document.createElement("canvas");var b=this.mc.offsetWidth-this.margin.left-this.margin.right,c=this.mc.offsetHeight-this.margin.top-this.margin.bottom;if(100>b||100>c)c=b=100;var m=window.devicePixelRatio||1;this.wg&&(m=1);this.ea.style.width=b+"px";this.ea.style.height=c+"px";this.bb.style.width=b+"px";this.bb.style.height=c+"px";this.bb.width=b*m;this.bb.height=c*m;this.bb.style.display=
"none";this.bb.style.touchAction="none";this.ea.insertBefore(this.bb,this.ea.firstChild);var h=this.tq;h.stencil=!0;h.depth=!0;h.powerPreference="high-performance";h.alpha=this.Sc?!0:!1;this.kd&&10<=this.Hh[0]&&(h.antialias=!1,h.alpha=!1);a={};a.flags=h;a.canvas=this.bb;this.H("beforewebglcontext",a);this.S=this.bb.getContext("webgl",h);this.S||(this.S=this.bb.getContext("experimental-webgl",h));if(this.S){var n=this.S;this.Cb.width=b*m;this.Cb.height=c*m;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.Lh&&(this.L.rg=1<m?4*this.L.rg:2*this.L.rg);this.N("Max tile cnt: "+this.L.rg);this.sa.Ih();this.sa.qj();this.sa.Ao(this.Jg);this.sa.Bo();this.D&&(this.D.Ih(),this.D.Rc());this.Qa&&(this.Qa.Ih(),this.Qa.Rc())}}catch(p){this.N(p)}this.S?(this.na=!0,this.H("webglready",{gl:this.S})):alert("Could not initialise WebGL!")};e.prototype.hu=function(a){this.ki=a};e.prototype.getQueryParameter=
function(){return this.ki};e.prototype.gb=function(a){if(a){if("{"==a.charAt(0)||"/"==a.charAt(0)||0<a.indexOf("://")||0==a.indexOf("javascript:"))return a;""!=this.ki&&(a=-1==a.indexOf("?")?a+("?"+this.ki):a+("&"+this.ki));return this.pe+a}return this.pe};e.prototype.mf=function(){return this.pan.m};e.prototype.gs=function(){return this.F.pan};e.prototype.hj=function(){return this.L.hj()};e.prototype.Vd=function(){return this.L.Vd()};e.prototype.hb=function(){return this.L.hb()};e.prototype.de=function(a){this.ma(!1);
isNaN(a)||(this.pan.m=Number(a));this.update()};e.prototype.Vj=function(a){this.ma(!1);isNaN(a)||(this.pan.m=Number(a)+this.pan.Gj);this.update()};e.prototype.Ri=function(a,b){isNaN(a)||(this.de(this.mf()+a),b&&(this.pan.d=a))};e.prototype.ln=function(a,b){this.Ri(a*this.kf(),b)};e.prototype.gg=function(){return this.u.m};e.prototype.ss=function(){return this.F.u};e.prototype.ee=function(a){this.ma(!1);isNaN(a)||(this.u.m=Number(a));this.update()};e.prototype.Si=function(a,b){this.ee(this.gg()+a);
b&&(this.u.d=a)};e.prototype.nn=function(a,b){this.Si(a*this.kf(),b)};e.prototype.zg=function(a){this.L.zg(a)};e.prototype.kj=function(){return this.L.kj()};e.prototype.Dd=function(){return this.L.Dd()};e.prototype.Nb=function(){return this.L.Nb()};e.prototype.dl=function(a,b){return this.L.dl(a,b)};e.prototype.cl=function(a,b){return this.L.cl(a,b)};e.prototype.Gr=function(){return this.F.zi};e.prototype.Ab=function(a){return this.L.Ab(a)};e.prototype.gm=function(a){this.L.gm(a)};e.prototype.si=
function(a){this.L.si(a)};e.prototype.hm=function(a){this.L.hm(a)};e.prototype.em=function(a){this.L.em(a)};e.prototype.fm=function(a,b){if(120<this.Dd())this.Ab(a);else{var c=this.ij(b.x,b.y,!0);if(this.Ab(a)){b=this.ij(b.x,b.y,!0);a=c.pan-b.pan;b=c.tilt-b.tilt;if(15<Math.abs(a)||10<Math.abs(b))b=a=0;a=this.hb()?-a:a*Math.cos(c.tilt*Math.PI/180);this.pan.$b-=a;this.u.$b+=b;this.lm(this.pan.m-a,this.u.m+b)}}};e.prototype.Dk=function(a,b){return this.Ab(this.Dd()+a)?(b&&(this.fov.d=a),!0):!1};e.prototype.Yq=
function(a,b){this.fm(this.Dd()+a,b)};e.prototype.Qi=function(a,b){if(!isNaN(a)){var c=a/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);c=this.fov.m*Math.exp(c);this.Ab(c);b&&(this.fov.d=a)}};e.prototype.kn=function(a,b,c){if(!isNaN(a)){var m=a/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);m=this.fov.m*Math.exp(m);this.fm(m,b);c&&(this.fov.d=a,this.fov.Oc.enabled=!0,this.fov.Oc.x=b.x,this.fov.Oc.y=b.y)}};e.prototype.lm=function(a,b){this.ma(!1);isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);
this.update()};e.prototype.Kp=function(a,b,c){this.ma(!1);!isNaN(a)&&1E7>a&&-1E7<a&&(this.pan.m=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.u.m=b);!isNaN(c)&&1E7>c&&-1E7<c&&(this.W.m=c);this.update()};e.prototype.yg=function(a,b,c){this.ma(!1);isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);isNaN(c)||this.Ab(c);this.update()};e.prototype.Bp=function(){this.yg(this.pan.Ha,this.u.Ha,this.fov.Ha)};e.prototype.setLocked=function(a){this.Fp(a);this.Gp(a);this.Ep(a)};e.prototype.Fp=function(a){this.I.rc=!!a};e.prototype.Ep=
function(a){this.I.Uh=!!a};e.prototype.Sr=function(){return this.I.Uh};e.prototype.Gp=function(a){this.I.Ge=!!a};e.prototype.Kr=function(){return this.ka.enabled};e.prototype.bu=function(a){var b=this.ka;a&&(b.ha.x=0,b.ha.y=0);b.enabled=!!a};e.prototype.Ds=function(){return this.I.Mf};e.prototype.xu=function(a){this.I.Mf=a};e.prototype.Tj=function(a){this.yc=!!a};e.prototype.Hr=function(){return this.tl()?!0:this.pl};e.prototype.su=function(a,b){void 0===b&&(b=!0);this.oq=b;this.Pg==!a&&(a&&this.tl()?
this.wp():((this.Pg=!!a)?this.nb.mi=!0:this.W.m=0,this.H("gyrochanged",{}),this.H("playerstatechanged",{})))};e.prototype.tl=function(){return window.hasOwnProperty("DeviceOrientationEvent")&&DeviceOrientationEvent.hasOwnProperty("requestPermission")&&"function"===typeof DeviceOrientationEvent.requestPermission?!0:!1};e.prototype.wp=function(){var a=this;if(this.tl())try{DeviceOrientationEvent.requestPermission().then(function(b){"granted"===b&&(a.nb.mi=!0,a.Pg=!0,a.H("gyrochanged",{}),a.H("playerstatechanged",
{}))})["catch"](console.error)}catch(b){console.log(b)}};e.prototype.ts=function(){return this.Pg};e.prototype.fs=function(){return this.Jh?5:this.zl?6:this.kd?4:this.Jo?1:this.Al?2:this.Fo?3:0};e.prototype.Br=function(){return this.yl?5:this.lg?4:this.tj?2:this.Sc?3:this.xl?1:0};e.prototype.Cr=function(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?1:0};e.prototype.moveTo=function(a,b,c,m,h,n){this.ma(!1);if("_blank"!==a&&""!==a){this.F.active=!0;this.F.aborted=
!1;this.F.Jm=!1;var p=a.toString().split("/");1<p.length&&(a=Number(p[0]),m=Number(b),b=Number(p[1]),2<p.length&&(c=Number(p[2])));this.F.pan=isNaN(a)?this.pan.m:Number(a);this.F.u=isNaN(b)?this.u.m:Number(b);this.F.fov=!isNaN(c)&&0<c&&180>c?Number(c):this.fov.m;this.F.speed=!isNaN(m)&&0<m?Number(m):1;this.F.W=isNaN(h)?this.W.m:Number(h);void 0!==n?!a||4!=n&&12!=n&&9!=n||(this.F.pb=n):this.F.pb=this.Z()}};e.prototype.Dj=function(a){this.ma(!1);var b=0,c=0,m=70,h=4,n=0,p=1;a.hasOwnProperty("pan")&&
(b=Number(a.pan),this.F.pan=b);a.hasOwnProperty("tilt")&&(c=Number(a.tilt),this.F.u=c);a.hasOwnProperty("fov")&&(m=Number(a.fov),this.F.fov=m);a.hasOwnProperty("projection")&&(h=Number(a.projection),this.F.pb=h);a.hasOwnProperty("timingFunction")&&(n=Number(a.timingFunction));a.hasOwnProperty("speed")&&(p=Number(a.speed));0>=p?(this.yg(b,c,m),this.rb(h)):(a=new y.Rm,a.cb="__AutoMove",a.Re=this.hj(),a.xi=this.u.m,a.fe=this.fov.m,a.wi=this.Z(),a.Ld=b,a.he=c,a.Hg=m,a.ge=h,a.Xf=!1,a.gf=!1,a.hf=!1,0==
n&&(a.gf=!0),1==n&&(a.Xf=!0,a.gf=!0),2==n&&(a.hf=!0),a.speed=p,this.F.Zm=this.R,this.R=this.Sn(a),this.F.$m=(new Date).getTime(),this.F.Jm=!0,this.F.active=!0,this.F.aborted=!1,this.F.pan=b,this.F.u=c,this.F.fov=m,this.ne=!1)};e.prototype.gt=function(a){this.moveTo(this.pan.Ha,this.u.Ha,this.fov.Ha,a)};e.prototype.ht=function(a,b){var c={};c.pan=this.pan.Ha;c.tilt=this.u.Ha;c.fov=this.fov.Ha;c.projection=this.Bh();c.timingFunction=b;c.speed=a;this.Dj(c)};e.prototype.Lq=function(a,b,c,m){var h=new y.Ki(this);
h.type="point";h.pan=b;h.u=c;h.id=a;h.j={};h.j.player=this;h.$f();h.j.hotspot=h;h.j.__div=document.createElement("div");h.j.__div.appendChild(m);this.J.push(h);h.j.__div.style.position="absolute";h.j.__div.style.left="-1000px";h.j.__div.style.top="-1000px";h.j.__div.ggVisible=!0;this.Ia.insertBefore(h.j.__div,this.Ia.firstChild);this.ub=!0};e.prototype.$u=function(a,b,c){for(var m=0;m<this.J.length;m++){var h=this.J[m];h.id==a&&(h.pan=b,h.u=c,h.$f())}this.ub=!0};e.prototype.Nt=function(a){for(var b=
-1,c,m=0;m<this.J.length;m++)c=this.J[m],c.id==a&&(b=m);-1<b&&(c=this.J.splice(b,1).pop(),c.j&&c.j.__div&&this.Ia.removeChild(c.j.__div))};e.prototype.ks=function(){for(var a=[],b=0;b<this.J.length;b++){var c=this.J[b];"point"==c.type&&a.push(String(c.id))}return a};e.prototype.Jr=function(a){for(var b=0;b<this.J.length;b++){var c=this.J[b];if(c.id==a)return b={},b.id=a,b.pan=c.pan,b.tilt=c.u,b.pxp=c.Sl,b.pyp=c.Tl,b.url=c.url,b.target=c.target,b.distance=c.distance,b.title=c.title,b.description=c.description,
b.skinid=c.pm,c.gd&&(b.customimage=c.gd,b.customimagewidth=c.ff,b.customimageheight=c.yd,b.use3D=c.Jf,b.distance3D=c.Yi),c.j&&c.j.__div&&(b.div=c.j.__div),b}};e.prototype.rq=function(a,b){this.ia.start.x=a;this.ia.start.y=b;this.ia.pa.x=a;this.ia.pa.y=b;this.ka.pa.x=a;this.ka.pa.y=b;this.Wl++;this.pan.$b=this.pan.m;this.u.$b=this.u.m};e.prototype.pq=function(a,b){var c=this.Nb();this.pan.$b+=a*c/this.C.height;this.u.$b+=b*c/this.C.height;this.pan.m=this.pan.$b;this.u.m=this.u.$b};e.prototype.qq=function(a,
b){this.ia.m.x=a;this.ia.m.y=b;this.ia.ha.x=this.ia.m.x-this.ia.pa.x;this.ia.ha.y=this.ia.m.y-this.ia.pa.y;this.I.Zd&&(this.ia.pa.x=this.ia.m.x,this.ia.pa.y=this.ia.m.y,this.update())};e.prototype.ma=function(a){this.v.active&&(this.v.active=!1,this.H("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Oc.enabled=!1);this.F.active&&(this.F.active=!1,this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Oc.enabled=!1);this.We=this.F.aborted=!1;this.v.Cj=!1;this.Qd=.02;this.ah=0;this.v.sd&&
(this.v.enabled=this.v.Of,a&&(this.v.sd=this.v.Rg));this.og=(new Date).getTime()};e.prototype.Qr=function(){return this.og};e.prototype.mo=function(a,b){a||(a=this.ca.x,b=this.ca.y);var c=this.C.height/(2*Math.tan(this.Nb()*Math.PI/360));a-=this.C.width/2;b-=this.C.height/2;var m={};m.pan=180*Math.atan(a/c)/Math.PI;m.tilt=180*Math.atan(-b/Math.sqrt(a*a+c*c))/Math.PI;return m};e.prototype.ij=function(a,b,c){a||(a=this.ca.x,b=this.ca.y);if(this.hb()){var m=this.fov.m/this.C.height;a=-(a-this.C.width/
2)*m+this.pan.m;b=-(b-this.C.height/2)*m+this.u.m}else{m=new y.Ua(0,0,1);b=this.mo(a,b);m.ce(-b.tilt);m.Ef(b.pan);m.ce(-this.u.m);m.Ef(-this.pan.m);c||(m.ce(-this.Ya.pitch),m.Ff(this.Ya.W));for(a=m.Rq()-180;-180>a;)a+=360;b=m.Sq()}m={};m.pan=a;m.tilt=b;return m};e.prototype.Kc=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};e.prototype.Fk=
function(a,b){var c=this.lf(),m,h;for(m=0;m<this.mj();m++){var n=this.ml(m);if(n.Na)return n}for(m=0;m<this.mj();m++)if(n=this.ml(m),!n.od){var p=[],r=new y.Ua,t;var w=h=void 0;0<n.fov&&(h=Math.tan(n.fov/2*Math.PI/180),w=0<n.qc?h*n.Pc/n.qc:h,n.Jc&&1!=n.Jc&&(w*=n.Jc));for(t=0;4>t;t++){switch(t){case 0:r.init(-h,-w,0);break;case 1:r.init(h,-w,0);break;case 2:r.init(h,w,0);break;case 3:r.init(-h,w,0)}r.Ka(n.Ka*Math.PI/180);r.Oa(-n.Oa*Math.PI/180);r.zb(n.zb*Math.PI/180);--r.z;r.Ka(-n.u*Math.PI/180);r.Oa(n.pan*
Math.PI/180);r.Oa(-this.pan.m*Math.PI/180);r.Ka(this.u.m*Math.PI/180);r.zb(this.W.m*Math.PI/180);p.push(r.clone())}p=this.Hk(p);if(0<p.length){for(t=0;t<p.length;t++)r=p[t],.1>r.z?(w=-c/r.z,h=this.C.width/2+r.x*w,w=this.C.height/2+r.y*w):w=h=0,r.ec=h,r.Qb=w;if(y.jc.xo(p,a,b))return n}}return null};e.prototype.mj=function(){return this.U.length+this.Xa.length+this.Ub.length};e.prototype.ml=function(a){return a<this.U.length?this.U[a]:a<this.U.length+this.Xa.length?this.Xa[a-this.U.length]:this.Ub[a-
(this.U.length+this.Xa.length)]};e.prototype.Kh=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};e.prototype.ft=function(a){this.lq(a);window.focus();if(this.zd)this.zd.onclick();(this.ve||this.jf&&this.lg)&&7>this.fd&&this.eg();this.Zb=null;if(!this.I.rc&&!this.yc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=(new Date).getTime();if(this.Ke){this.Zb=this.Ke;this.T.Wc=!0;this.T.startTime=
b;a.stopPropagation();return}if(this.Kc(a.target)){var c;if((c=this.Fk(this.ca.x,this.ca.y))&&c.Ae&&(this.Zb=c,void 0!==c.code&&""!==c.code&&c.pc))return;this.rq(a.pageX,a.pageY);this.T.Wc=!0;this.T.startTime=b;a.preventDefault();this.ma(!0)}}this.ia.ha.x=0;this.ia.ha.y=0}};e.prototype.Mg=function(a,b,c){var m=this.K.ck;m.enabled&&(this.P!=this.fb&&0<=a&&0<=b&&""!=this.P.title?(this.Fa.innerHTML=this.Va(this.P.title),this.Fa.style.color=this.oa(m.dk,m.bk),this.Fa.style.backgroundColor=m.background?
this.oa(m.Wb,m.Vb):"transparent",this.Fa.style.border="solid "+this.oa(m.Yb,m.Xb)+" "+m.Pi+"px",this.Fa.style.borderRadius=m.zk+"px",this.Fa.style.textAlign="center",0<m.width?(this.Fa.style.left=a-m.width/2+this.margin.left+"px",this.Fa.style.width=m.width+"px"):(this.Fa.style.width="auto",this.Fa.style.left=a-this.Fa.offsetWidth/2+this.margin.left+"px"),this.Fa.style.height=0<m.height?m.height+"px":"auto",this.Fa.style.top=b+(c?-60:25)+this.margin.top+"px",this.Fa.style.visibility="inherit",this.Fa.style.overflow=
"hidden"):(this.Fa.style.visibility="hidden",this.Fa.innerHTML=""))};e.prototype.lq=function(a){var b=this.Ch();this.Kh()?(this.ca.x=a.clientX-this.margin.left,this.ca.y=a.clientY-this.margin.top):(this.ca.x=a.clientX-b.x,this.ca.y=a.clientY-b.y)};e.prototype.Oe=function(a){if("string"==typeof a)for(var b=0;b<this.J.length;b++)if(this.J[b].id==a){a=this.J[b];break}this.P=a&&null!==a&&"object"==typeof a?a:this.fb;this.P==this.fb&&(a=this.Ti(this.ca.x,this.ca.y))&&(a.kb=0);this.P.$f&&this.P.$f();this.hotspot=
this.P;this.H("activehotspotchanged",{hotspot:this.P})};e.prototype.et=function(a){a=a?a:window.event;this.lq(a);if(!this.I.rc&&!this.yc&&!this.Ke){this.v.active&&(this.v.yj=(new Date).getTime());0==a.buttons&&(this.T.Wc=!1);this.T.Wc&&(a.preventDefault(),(a.which||0==a.which||1==a.which)&&this.qq(a.pageX,a.pageY),this.ma(!0));var b=!1;if(this.P==this.fb||"poly"==this.P.type){var c=this.fb;0<this.J.length&&this.Kc(a.target)&&(c=this.Ti(this.ca.x,this.ca.y));this.Rj(c);this.Mg(this.ca.x,this.ca.y,
!1);0!=c&&c!=this.fb&&(b=!0)}c=null;!b&&this.Kc(a.target)&&(c=this.Fk(this.ca.x,this.ca.y));this.v.Wi&&(this.v.Wi=!1);this.Ia.style.cursor=this.P!=this.fb&&this.P.Ce&&b||c&&c.jg?"pointer":"default"}};e.prototype.Rj=function(a){!1===a&&(a=this.fb);this.P!=a&&(this.P!=this.fb&&(0<this.K.mode&&(this.P.kb=0),this.ga&&this.ga.hotspotProxyOut&&this.ga.hotspotProxyOut(this.P.id,this.P.url),this.H("hsproxyout",{id:this.P.id,url:this.P.url})),a!=this.fb?(this.Oe(a),this.ga&&this.ga.hotspotProxyOver&&this.ga.hotspotProxyOver(this.P.id,
this.P.url),this.H("hsproxyover",{id:this.P.id,url:this.P.url}),0<this.K.mode&&(this.K.kb=1,this.P.kb=1)):(this.Oe(this.fb),0<this.K.mode&&(this.K.kb=0)))};e.prototype.dt=function(a){a=a?a:window.event;this.xj=-1;if(this.ve||this.jf&&this.lg)7<=this.fd?this.Up():this.eg();if(!this.I.rc&&!this.yc&&(this.Zb&&(this.Zb.Ae(),this.Ke=this.Zb.Na?this.Zb:null),this.T.Wc)){this.ma(!0);a.preventDefault();this.T.Wc=!1;a=(new Date).getTime();var b=Math.abs(this.ia.start.x-this.ia.pa.x)+Math.abs(this.ia.start.y-
this.ia.pa.y);if(400>a-this.T.startTime&&0<=b&&20>b){var c=this.Ti(this.ca.x,this.ca.y);c&&this.gq(c);b=Math.abs(this.ia.$d.x-this.ia.pa.x)+Math.abs(this.ia.$d.y-this.ia.pa.y);var m=this.ij(this.ca.x,this.ca.y,!0);700>a-this.Nh&&0<=b&&20>b?(c?this.hq(c):this.I.Rk&&this.fk(),this.H("doubleclick",{pan:-Math.round(100*m.pan)/100,tilt:Math.round(100*m.tilt)/100}),this.Nh=0):(this.H("panoclick",{pan:-Math.round(100*m.pan)/100,tilt:Math.round(100*m.tilt)/100}),this.Nh=a);this.ia.$d.x=this.ia.pa.x;this.ia.$d.y=
this.ia.pa.y}}};e.prototype.Uo=function(a){if(!this.I.Ge&&!this.yc&&(a=a?a:window.event,this.Kc(a.target))){var b=a.detail?-1*a.detail:a.wheelDelta/40;this.I.Co&&(b=-b);a.axis&&(-1==this.xj?this.xj=a.axis:this.xj!=a.axis&&(b=0));var c=0<b?1:-1;a.wheelDeltaX&&a.wheelDeltaY&&Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)&&(b=0);0!=b&&(this.I.Mf?this.kn(c*this.I.rm,this.xe(a),!0):this.Qi(c*this.I.rm,!0),this.update());a.preventDefault();this.ma(!0)}};e.prototype.Wu=function(a){a||(a=window.event);var b=
a.touches,c=this.Ch();this.ca.x=b[0].clientX-c.x;this.ca.y=b[0].clientY-c.y;this.Te=this.Zb=null;window.focus();this.ul||(this.ul=!0,this.H("hastouch",{}),this.H("playerstatechanged",{}));!this.Ho&&(this.ve||this.jf&&this.lg)&&7>this.fd&&this.eg();if(!this.I.rc&&!this.yc)if(c=(new Date).getTime(),this.Ke)this.Zb=this.Ke,this.T.hd=!0,this.T.startTime=c,a.preventDefault(),this.T.fi=!0,b[0]&&(this.Bb=b[0].target);else{if(!this.T.hd&&b[0]){this.T.startTime=c;this.T.start.x=b[0].pageX;this.T.start.y=b[0].pageY;
this.T.pa.x=b[0].pageX;this.T.pa.y=b[0].pageY;c=this.Bb=b[0].target;if(this.Kc(c)){var m;(m=this.Fk(this.ca.x,this.ca.y))&&m.Ae&&(this.Zb=m);if(m=this.Ti(this.ca.x,this.ca.y))this.N(m),this.Te=m,this.Rj(m),this.xe(a),this.Mg(this.ca.x,this.ca.y,!0);this.rq(b[0].pageX,b[0].pageY);this.T.Kn=b[0].identifier;this.T.hd=!0;a.preventDefault();this.T.fi=!0;this.ma(!0)}if(c){m=!1;if(null!=this.T.Fg)for(var h=this.T.Fg;h&&h!=this.control;){if(h.onmouseout)h.onmouseout(a);h=h.parentNode}h=c;for(var n=!0;h&&
h!=this.control;)c!=this.T.Fg&&h.onmouseover&&(h.onmouseover(a),7<=this.fd&&this.Kc(a)&&(m=!0)),h.onmousedown&&(h.onmousedown(a),n=!1,m=!0),h.onclick&&(n=!1),h=h.parentNode;this.T.Fg=n&&7<=this.fd&&c!=this.T.Fg?c:null;m&&(a.preventDefault(),this.T.fi=!0)}}1<b.length&&(this.T.hd=!1);!this.rl&&2==b.length&&b[0]&&b[1]&&this.Kc(this.Bb)&&(a=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.Vp=Math.sqrt(a*a+b*b),this.fov.prev=this.fov.m);this.ia.ha.x=0;this.ia.ha.y=0}};e.prototype.eg=function(){try{this.Gi&&
this.A.j&&(!this.A.Tc&&this.A.Yj&&this.A.j.play(),this.A.j.muted=!1);if(this.qa&&(this.qa.resume(),"suspended"==this.qa.state))return;if(this.kd&&this.qa&&this.qa.createOscillator){var a=this.qa.createOscillator(),b=this.qa.createGain();a.frequency.value=30;a.type="sine";a.connect(b);b.connect(this.qa.destination);b.gain.value=.01;a.start(0);setTimeout(function(){a.stop()},1E4)}for(b=0;b<this.X.length;b++){var c=this.X[b];(!this.isPlaying(c.id)||c.wa)&&0<=c.loop&&c.autoplay&&!this.qd&&(c.wa&&c.Rf(),
this.ae(c.id,c.loop))}for(b=0;b<this.U.length;b++){var m=this.U[b];!this.isPlaying(m.id)&&m.autoplay&&this.Gi&&!this.qd&&this.ae(m.id,m.loop);this.isPlaying(m.id)&&m.autoplay&&this.Gi&&!this.qd&&(m.Pd&&m.Nf(),m.j.muted=!1)}this.jf=this.ve=!1}catch(h){this.N(h)}};e.prototype.Vu=function(a){a||(a=window.event);var b=a.touches,c=this.Ch();this.ca.x=b[0].clientX-c.x;this.ca.y=b[0].clientY-c.y;if(this.I.rc||this.yc)(this.D.Md||this.D.je||this.D.Zc)&&a.preventDefault();else{b[0]&&(this.T.pa.x=b[0].pageX,
this.T.pa.y=b[0].pageY);if(this.Bb){c=this.Bb;for(var m=!1;c&&c!=this.control&&!m;)"scrollarea"==c.ggType&&(m=!0),"map"==c.ggType&&(m=!0),"text"==c.ggType&&(m=!0),c=c.parentNode;m||a.preventDefault()}if(this.T.hd){a.preventDefault();for(c=0;c<b.length;c++)if(b[c].identifier==this.T.Kn){this.qq(b[c].pageX,b[c].pageY);break}this.Te&&(this.xe(a),this.Mg(this.ca.x,this.ca.y,!0));this.ma(!0)}2==b.length&&b[0]&&b[1]&&(this.T.hd=!1,!this.rl&&this.Kc(this.Bb)&&(this.I.Ge||(c=b[0].pageX-b[1].pageX,m=b[0].pageY-
b[1].pageY,this.fov.yn=Math.sqrt(c*c+m*m),this.ka.fov.active=!0,this.ka.fov.center.enabled=!0,this.ka.fov.center.x=(b[0].pageX+b[1].pageX)/2,this.ka.fov.center.y=(b[0].pageY+b[1].pageY)/2,this.ka.fov.nc=this.fov.prev*Math.sqrt(this.fov.Vp/this.fov.yn),4==this.Z()&&!this.hb()&&this.ka.fov.nc>this.fov.max&&(this.ka.fov.nc=this.fov.max),this.ka.fov.nc<this.fov.min&&(this.ka.fov.nc=this.fov.min)),this.ma(!0),a.preventDefault()))}};e.prototype.Uu=function(a){this.T.fi&&(this.T.fi=!1,a.preventDefault());
var b=!1;if(this.ve||this.jf&&this.lg)7<=this.fd?this.Up():this.eg();if(!this.I.rc&&!this.yc){this.T.hd&&(a.preventDefault(),this.ma(!0));var c=(new Date).getTime(),m=void 0,h=!1;this.Kc(this.Bb)&&(a.preventDefault(),this.Zb&&(this.Zb.Ae(),this.Ke=this.Zb.Na?this.Zb:null));m=Math.abs(this.T.start.x-this.T.pa.x)+Math.abs(this.T.start.y-this.T.pa.y);if(0<=m&&20>m){b=!0;if(this.Bb){var n=this.Bb;for(m=function(){if(n.onclick){var r=n;setTimeout(function(){r.onclick(a)},0);"hotspot"!=n.wv&&(h=!0);b=!1}n=
n.parentNode};n&&n!=this.control;)m()}m=Math.abs(this.T.$d.x-this.T.pa.x)+Math.abs(this.T.$d.y-this.T.pa.y);if(700>c-this.Nh&&0<=m&&20>m){if(this.Kc(this.Bb))if(a.preventDefault(),this.Te)this.hq(this.Te);else if(this.I.Rk){var p=this;setTimeout(function(){p.fk()},1)}if(this.Bb)for(n=this.Bb;n&&n!=this.control;)n.ondblclick&&(n.ondblclick(),h=!0,b=!1),n=n.parentNode;this.Nh=0}else this.Nh=c;this.T.$d.x=this.T.pa.x;this.T.$d.y=this.T.pa.y}if(this.Bb)for(n=this.Bb;n&&n!=this.control;)this.T.Fg!=this.Bb&&
n.onmouseout&&(n.onmouseout(a),7<=this.fd&&(h=!0)),n.onmouseup&&(n.onmouseup(a),7<=this.fd&&(h=!0)),n=n.parentNode;h&&a.preventDefault();this.xe(a);this.Te&&(this.Mg(-1,-1,!0),b&&this.gq(this.Te));this.Bb=null;this.T.hd=!1;this.Rj(this.fb);this.Te=null}};e.prototype.Tu=function(a){this.I.rc||this.yc||(this.T.hd=!1);this.Te=null;this.Rj(this.fb);this.xe(a);this.Mg(-1,-1,!0)};e.prototype.Io=function(){return null!=this.Bb||this.T.hd||this.T.Wc};e.prototype.Vo=function(a){if(!this.xf&&window.MSGesture){var b=
window.MSGesture;this.N("setup gesture");this.xf=new b;this.xf.target=this.control}this.xf&&this.xf.addPointer(a.pointerId)};e.prototype.Un=function(a){this.rl=!0;this.Ej=1;this.I.rc||this.I.Ge||this.yc||(a.touches?(this.Bb=a.touches.target,this.Kc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.m,this.ma(!0))):(a.preventDefault(),this.fov.prev=this.fov.m,this.ma(!0)))};e.prototype.yr=function(a){if(!this.I.rc&&!this.I.Ge&&!this.yc&&this.Kc(a.target)){a.preventDefault();this.ka.fov.active=!0;
this.ka.fov.center.enabled=!0;var b=this.xe(a);this.ka.fov.center.x=b.x;this.ka.fov.center.y=b.y;this.ka.fov.nc=this.fov.prev/Math.sqrt(a.scale);4==this.Z()&&2!=this.Kd&&this.ka.fov.nc>this.fov.max&&(this.ka.fov.nc=this.fov.max);this.update();this.ma(!0)}};e.prototype.it=function(a){this.I.rc||this.I.Ge||this.yc||(a.preventDefault(),1!=a.scale&&(this.ka.fov.active=!0,this.Ej*=a.scale,this.ka.fov.center.enabled=!0,a=this.xe(a),this.ka.fov.center.x=a.x,this.ka.fov.center.y=a.y,this.ka.fov.nc=this.fov.prev/
Math.sqrt(this.Ej),4==this.Z()&&2!=this.Kd&&this.ka.fov.nc>this.fov.max&&(this.ka.fov.nc=this.fov.max),this.update(),this.ma(!0)))};e.prototype.Tn=function(a){this.I.rc||this.I.Ge||this.yc||(this.ka.fov.active=!1,a.preventDefault(),this.ma(!0),this.xf&&this.xf.reset&&this.xf.reset())};e.prototype.Us=function(a){this.I.Uh||this.yc||(this.isFullscreen&&a.preventDefault(),this.vj=a.keyCode,this.ma(!0))};e.prototype.Vs=function(a){this.vj&&(this.vj=0,a.preventDefault())};e.prototype.pt=function(){this.vj=
0};e.prototype.ai=function(){this.isFullscreen&&(this.Kh()||this.exitFullscreen(),this.Kh()&&(this.$.style.left="0px",this.$.style.top="0px"))};e.prototype.vt=function(a,b,c,m){m?(this.Fh.alpha=a,this.Fh.beta=b,this.Fh.gamma=c,this.Fh.gamma+=90):(this.nb.alpha=a,this.nb.beta=b,this.nb.gamma=c,this.nb.gamma+=90);this.nb.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;c=new y.Tm;a=this.nb;c.Ef(-a.alpha);c.Ff(-a.beta);c.ce(-a.gamma);c.Ff(90-a.orientation);1>c.Pb?-1<c.Pb?(b=180/
Math.PI*Math.asin(-c.Pb),a=180/Math.PI*Math.atan2(c.wc,c.vc),c=180/Math.PI*Math.atan2(c.uc,c.tc)):(b=0,a=90,c=-180/Math.PI*Math.atan2(-c.cc,c.dc)):(b=0,a=-90,c=180/Math.PI*Math.atan2(-c.cc,c.dc));if(this.Pg)if(this.Io()||this.F.oj||this.nb.mi)this.nb.yf=this.mf()+c,this.nb.fadeIn=0,this.nb.mi=!1;else{m=this.F.active;var h=1;10>this.nb.fadeIn&&(this.nb.fadeIn+=1,h=.1*this.nb.fadeIn);c=-c+this.nb.yf;this.de(h*c+(1-h)*this.mf());this.ee(h*a+(1-h)*this.gg());this.oq?this.zg(h*b+(1-h)*this.kj()):this.zg(0);
this.df();this.F.active=m}};e.prototype.gq=function(a){this.ga&&this.ga.hotspotProxyClick&&this.ga.hotspotProxyClick(a.id,a.url);this.H("hsproxyclick",{id:this.P.id,url:this.P.url});""!=a.url&&(this.Ml(a.url,a.target),this.Mg(-1,-1,!1))};e.prototype.hq=function(a){this.ga&&this.ga.hotspotProxyDoubleClick&&this.ga.hotspotProxyDoubleClick(a.id,a.url);this.H("hsproxydblclick",{id:this.P.id,url:this.P.url})};e.prototype.kf=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};
e.prototype.hp=function(){var a=this;setTimeout(function(){a.hp()},100);9!=a.Oj||a.rj||window.requestAnimationFrame(function(){a.bi();a.N("restart recover timer")});10<a.Oj&&1<a.Wl&&(a.Uc("recover timer - disabling requestAnimationFrame"),a.rj=!0,a.bi());a.Oj++};e.prototype.ti=function(a){if("__VideoPano"!=this.R.cb){var b={PAN:{value:0,name:"pan"},sv:{value:1,name:"tilt"},pv:{value:2,name:"fov"}},c=0,m=0,h=0;a=Math.max(a,0);for(var n in b){var p=b[n],r=this.bc(this.no(a,p.value,""),p.value,"");var t=
(t=this.io(r))?this.Vn(r,t,a):r.value;switch(p.value){case 0:p=this.pan.m;if(this.ne&&3!=r.type){if(!this.hb()){for(;360<t;)t-=360;for(;-360>t;)t+=360}c=t-p;this.hb()||(180<c&&(c-=360),-180>c&&(c+=360));this.pan.m+=c*this.Qd}else this.pan.m=t;this.v.Rh=this.pan.m;break;case 1:p=this.u.m;this.ne&&3!=r.type?(m=t-p,this.u.m+=m*this.Qd):this.u.m=t;this.v.Sh=this.u.m;break;case 2:p=this.fov.m,this.ne&&3!=r.type?(h=t-p,this.fov.m+=h*this.Qd):this.fov.m=t,this.v.Qh=this.fov.m}}t=this.Z();for(b=Math.floor(a);!this.bc(b,
3)&&0<b;)b--;b=this.bc(b,3);n=a-b.time;this.ne&&-1!=this.bh&&this.Mi+this.vk>a?(t=this.zh(this.bh),this.fov.m>t?this.Mi=a:(n=(a-this.Mi)/this.vk,n=Math.min(1,n),this.rb(this.Z(),this.bh,1-n))):(0==b.Gb||n>b.Gb-.3?this.rb(b.value):(n/=b.Gb,this.rb(t,b.value,1-n)),this.v.No=b.value);this.ne&&(t=Math.sqrt(c*c+m*m+h*h),.3>t&&(this.ne=!1,this.Qd=.02,this.ah=0),0<this.ah&&t>this.ah&&(this.Qd+=.01,this.Qd=Math.min(this.Qd,1)),this.ah=t)}c=Math.floor(a);m=this.zr(c);for(h=0;h<m.length;h++)if(n=m[h],3>n.Ym)c!=
this.an&&(t=n.td,this.Sb.hasOwnProperty(t)&&(b=this.Sb[t].type,0==b?this.Pe(t,n.Km):1==b?this.Pe(t,n.value):2==b&&this.Pe(t,"true"==n.Km)));else if(b=this.bc(this.no(a,n.qb,n.td),n.qb,n.td),t=(t=this.io(b))?this.Vn(b,t,a):b.value,n=n.td.split("|"),2==n.length)for(b=n[0],n=n[1],r=0;r<this.J.length;r++)p=this.J[r],p.id==b&&("pan"==n?p.pan=t:"tilt"==n&&(p.u=t));this.an=c;this.update()};e.prototype.Wn=function(){if(""!=this.v.tg){var a=this.lo(this.v.tg);if(0==a.length||1==a.length&&a[0]==this.ra)return this.ra}a=
this.ra;do if(this.v.$o){var b=1E3;do a=this.$a[Math.floor(Math.random()*this.$a.length)];while(b--&&a==this.ra)}else b=this.$a.indexOf(a),b++,b>=this.$a.length&&(b=0),a=this.$a[b];while(""!=this.v.tg&&!this.Ah(a).tags.includes(this.v.tg)&&a!=this.ra);return a};e.prototype.Dt=function(a){var b=this.F.speed;this.F.El&&(b=b*(a.getTime()-this.F.El)/60);this.F.El=a.getTime();this.v.wh&&(this.sa.ready()||4==this.Z())&&this.fj()&&(this.v.wh=!1,this.v.active=!0,this.Ea.running=!0,this.Ea.finished=!1);if(this.F.active||
0!=this.F.pb&&this.sa.ready()){if(this.F.Jm&&"__AutoMove"==this.R.cb){var c=a.getTime()-this.F.$m;b=c/100;if(b>=this.R.length){if(this.ti(this.R.length),this.xa.splice(this.xa.indexOf(this.R),1),this.F.active=!1,this.R=this.F.Zm,this.F.pb=0,this.yg(this.F.pan,this.F.u,this.F.fov),this.pan.$b=this.F.pan,this.u.$b=this.F.u,this.F.sg&&(this.F.sg=!1,this.v.Cj=!0,this.v.sd=!0,this.v.active=!0,this.H("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.ti(b)}else{this.pan.d=this.F.pan-
this.pan.m;if(!this.hb()&&360==this.pan.max-this.pan.min){for(;-180>this.pan.d;)this.pan.d+=360;for(;180<this.pan.d;)this.pan.d-=360}this.u.d=this.F.u-this.u.m;this.W.d=this.F.W-this.W.m;this.fov.d=this.F.fov-this.fov.m;c=b*this.kf();var m=Math.sqrt(this.pan.d*this.pan.d+this.u.d*this.u.d+this.W.d*this.W.d+this.fov.d*this.fov.d),h=this.pan.m-this.F.Rh,n=this.u.m-this.F.Sh,p=this.W.m-this.F.Oo,r=this.fov.m-this.F.Qh;100*Math.sqrt(h*h+n*n+p*p+r*r)<c&&0==this.F.pb&&(this.F.aborted=!0);this.F.Rh=this.pan.m;
this.F.Sh=this.u.m;this.F.Oo=this.W.m;this.F.Qh=this.fov.m;if(100*m<c||this.F.aborted){if(this.pan.d=0,this.u.d=0,this.W.d=0,this.fov.d=0,this.fov.Oc.enabled=!1,this.F.active&&(this.F.active=!1,this.pan.m=this.F.pan,this.u.m=this.F.u,this.W.m=this.F.W,this.fov.m=this.F.fov,this.onMoveComplete))this.onMoveComplete()}else m=m>5*c?c/m:.2,this.pan.d*=m,this.u.d*=m,this.fov.d*=m;this.pan.m+=this.pan.d;this.u.m+=this.u.d;this.W.m+=this.W.d;this.I.Mf&&this.fov.Oc.enabled?this.fm(this.fov.m+this.fov.d,this.fov.Oc):
this.fov.m+=this.fov.d;0!=this.F.pb&&(this.F.pb!=this.Z()?(b=this.zh(this.F.pb),this.Dd()>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.W.d*this.W.d)/c,1))*c,this.fov.d)-this.fov.d,this.F.fov=this.fov.m):(this.rb(this.F.pb,this.Z(),0),this.N("New projection from Target:"+this.Z()),this.F.ii=0,this.sa.qj())):1>this.F.ii?(this.F.ii=Math.min(1,this.F.ii+.05*b),this.rb(this.Z(),this.Ic(),this.F.ii)):(this.rb(this.Z(),0,0),this.F.pb=0,this.sa.qj()))}this.og=
a.getTime();this.update()}else if(this.v.active&&!this.D.je){c=a.getTime()-this.v.startTime;this.v.yj<this.v.startTime&&(this.v.yj=this.v.startTime);if((this.v.sd||this.Ea.running)&&0<this.xa.length){b=c/100;m=!1;if(this.xc!=this.R.cb||""!=this.R.Xe&&this.v.Rd!=this.R.Xe){for(c=0;c<this.xa.length;c++)if(""==this.xc&&this.xa[c].Xe==this.v.Rd||""!=this.xc&&this.xa[c].cb==this.xc&&this.xa[c].Xe==this.v.Rd){m=!0;this.R=this.xa[c];this.xc=this.R.cb;break}!m&&0<this.xa.length&&this.xa[0].Xe==this.v.Rd&&
(m=!0,this.R=this.xa[0],this.xc=this.R.cb)}else m=!0;if(m)if(c=(h=this.A.j&&this.A.Tc)&&this.v.vm&&!this.Ea.running,this.We){m=b;if(c){if(0==this.Ve&&0!=this.A.j.duration)for(;this.Ve<this.R.length/10;)this.Ve+=this.A.j.duration;this.A.j.currentTime<this.cn&&this.xk&&(this.wk++,this.xk=!1);m=10*(this.wk*this.A.j.duration+this.A.j.currentTime);this.cn=this.A.j.currentTime;.05>this.A.j.duration-this.A.j.currentTime&&(this.xk=!0);for(;m>=10*this.Ve;)m-=10*this.Ve}if(!h&&b>=this.R.length||h&&!c&&b>=this.R.length||
h&&c&&(this.R.cb!=this.R.Xo||this.R.Wo!=this.ra)&&b>=this.R.length){this.ti(this.R.length);this.v.Hd=0;this.We=!1;if(this.Ea.running){this.Cp();return}if(this.v.qn){c=0;do b=this.bn[this.R.Xe],m=Math.floor(Math.random()*Object.keys(b).length),m=b[m],this.xc=m.cliptitle,b=m.nodeid,m=m.startview,c++;while(b==this.ra&&10>c)}else this.xc=this.R.Xo,b=this.R.Wo,m=this.R.mt;this.xc==this.R.cb&&this.ra==b?1<this.$a.length&&0<this.v.Fj&&(this.v.startTime=a.getTime(),(c=this.Wn())&&c!=this.ra&&(this.pd("{"+
c+"}"),this.We=!1,this.v.active=!0,this.D.oe=!0,this.D.Ye=!0)):(this.Gd&&b!=this.ra&&(this.pd("{"+b+"}",m),this.D.enabled?(this.v.active=!1,this.D.oe=!0,this.D.Ye=!0):this.v.active=!0),this.v.startTime=a.getTime())}else this.ti(m),this.v.Hd=m}else if(b=this.bc(0,0),m=this.bc(0,1),h=this.bc(0,2),n=this.bc(0,3),3!=n.qb&&(n=0),this.v.Cj||this.F.aborted||this.Ea.running||c){if(this.We=!0,this.v.startTime=0<this.v.Hd?a.getTime()-100*this.v.Hd:a.getTime(),this.ne=c){this.Ve=this.wk=0;m=10*this.A.j.currentTime;
for(c=Math.floor(m);!this.bc(c,3)&&0<c;)c--;c=this.bc(c,3);c.value==this.Z()?this.bh=-1:(this.bh=c.value,this.Mi=m,this.vk=Math.max(5,c.time+c.Gb-m))}}else{c={};if(0<this.v.Hd)c.pan=this.v.Rh,c.tilt=this.v.Sh,c.fov=this.v.Qh,c.projection=this.v.No;else{c.pan=b.value;if(!this.hb()){for(;360<c.pan;)c.pan-=360;for(;-360>c.pan;)c.pan+=360}c.tilt=m.value;c.fov=h.value;c.projection=n?n.value:4}c.timingFunction=3;c.speed=1;this.F.sg=!0;this.Dj(c);this.v.active=!0}}else 0<this.v.Fj&&this.Gd&&c>=1E3*this.v.Fj?
1<this.$a.length&&(this.v.startTime=a.getTime(),(c=this.Wn())&&c!=this.ra&&(this.v.ld=a.getTime(),this.v.timeout=0,this.pd("{"+c+"}"),this.v.active=!0,this.D.oe=!0)):(c=a.getTime(),m=b=1E3/60,0!=this.v.ld&&(m=c-this.v.ld),this.u.d=this.v.ek*((this.v.yo?this.u.Ha:0)-this.u.m)/100,this.fov.d=this.v.ek*(this.fov.Ha-this.fov.m)/100,this.pan.d=.95*this.pan.d+-this.v.speed*this.kf()*.05,b=m/b,this.pan.m+=this.pan.d*b,this.u.m+=this.u.d*b,this.fov.m+=this.fov.d*b,this.v.ld=c,this.update());3E3<a.getTime()-
this.v.yj&&!this.v.Wi&&(this.Ia.style.cursor="none",this.v.Wi=!0)}else!this.Ea.finished&&1E3<a.getTime()-this.og&&(this.xa.splice(this.xa.indexOf(this.R),1),this.R=this.al(!1),this.xc=this.R.cb,this.v.active=!1,this.v.wh=!0),this.v.enabled&&!this.T.sj()&&a.getTime()-this.og>1E3*this.v.timeout&&!this.v.wh&&(this.v.Dg&&this.fj()||!this.v.Dg)&&(this.v.active=!0,this.v.startTime=a.getTime(),this.v.ld=0,this.H("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Oc.enabled=!1),!this.ka.enabled||
this.T.sj()||0==this.pan.d&&0==this.u.d&&0==this.fov.d||(this.F.oj=!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.Mf&&this.fov.Oc.enabled?this.kn(this.fov.d,this.fov.Oc):this.Qi(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.Oc.enabled=!1),this.update())};e.prototype.iq=function(a){var b=this.D;b.Zc=!1;"previewtrack"==b.delay&&2!=this.Kd||"videopano"==b.delay&&!this.A.j?
0<this.L.M.levels.length?this.L.M.levels[this.L.M.levels.length-1].loaded||(b.Zc=!0):this.sa.kp()||(b.Zc=!0):"videopano"==b.delay&&this.A.j&&!this.A.ng&&(b.Zc=!0);b.Zc||this.Zj(a)};e.prototype.Zj=function(a){a||(a=new Date);var b=this.D;b.Zc=!1;b.je=!0;b.Yp=a.getTime()+100;0==b.dd||b.Wg||this.tm()};e.prototype.tm=function(){var a=this.D;4==a.dd?(this.R=this.al(!0,a.wm,a.xm,a.zi),this.xc=this.R.cb,this.v.active=!0,this.Ea.running=!0):this.moveTo(a.wm,a.xm,a.zi,a.Xg,0,a.ge)};e.prototype.Ft=function(a){var b=
this.D;if(!b.Np){if(b.Md){var c=a.getTime()-b.wq;c/=1E3*b.vq;1<=c?(b.Ol(1),b.Md=!1,this.In(),this.Xp(),this.iq(a)):0<=c&&b.Ol(c)}else b.je&&(c=a.getTime()-b.Yp,c/=1E3*b.dh,1<=c?(b.je=!1,this.og=a.getTime(),this.update(),0!=b.dd&&b.Wg&&this.tm(),4!=b.dd&&(this.Tj(!1),this.v.active=b.oe,this.v.sd=b.Ye,this.H("autorotatechanged",{}),b.oe=!1,b.Ye=!1),this.v.ld=0,this.fa&&this.Mk(),this.fh=!1):0<=c&&b.Ol(c));b=this.yt;b.Uq&&(b.Xi?a.getTime()-b.Uk>=1E3*b.delay&&(b.Xi=!1):(b.current+=b.ud,0>b.current&&(b.current=
0,b.ud=-b.ud,b.Xi=!0,b.Uk=a.getTime()),1<b.current&&(b.current=1,b.ud=-b.ud,b.Xi=!0,b.Uk=a.getTime())))}};e.prototype.It=function(){var a,b=this.K;if(0<b.Rb.length){for(a=0;a<b.Rb.length;a++)b.rd[a]!=b.Bc[a]&&(b.rd[a]>b.Bc[a]?(b.Bc[a]+=.05,b.rd[a]<b.Bc[a]&&(b.Bc[a]=b.rd[a])):(b.Bc[a]-=.05,b.rd[a]>b.Bc[a]&&(b.Bc[a]=b.rd[a],-1!=b.Wj.indexOf(b.Rb[a])&&(b.Wj.splice(b.Wj.indexOf(b.Rb[a]),1),b.Rb.splice(a,1),b.rd.splice(a,1),b.Bc.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.J.length;a++){var c=
this.J[a];"poly"==c.type&&c.kb!=c.Ca&&(c.kb>c.Ca?(c.Ca+=b.ud,c.kb<c.Ca&&(c.Ca=c.kb)):(c.Ca-=b.ud,c.kb>c.Ca&&(c.Ca=c.kb)),this.update())}3==b.mode&&b.kb!=b.Ca&&(b.kb>b.Ca?(b.Ca+=b.ud,b.kb<b.Ca&&(b.Ca=b.kb)):(b.Ca-=b.ud,b.kb>b.Ca&&(b.Ca=b.kb)),this.update())};e.prototype.Ht=function(){var a=this.ka;this.T.sj()&&(this.I.Zd?(a.ha.x=.4*(this.ia.pa.x-a.pa.x),a.ha.y=.4*(this.ia.pa.y-a.pa.y),a.pa.x+=a.ha.x,a.pa.y+=a.ha.y):(a.ha.x=.1*-this.ia.ha.x*this.I.sensitivity/8,a.ha.y=.1*-this.ia.ha.y*this.I.sensitivity/
8),this.pq(a.ha.x,a.ha.y),this.update());a.fov.active&&(this.I.Mf&&a.fov.center.enabled?this.Yq(.4*(a.fov.nc-this.fov.m),a.fov.center):this.Dk(.4*(a.fov.nc-this.fov.m)),.001>Math.abs(a.fov.nc-this.fov.m)/this.fov.m&&(a.fov.active=!1),this.update());if(a.enabled&&(0!=a.ha.x||0!=a.ha.y)&&!this.T.sj()){var b=.9*(1-a.bm);a.ha.x*=b;a.ha.y*=b;this.F.oj=!0;.01>a.ha.x*a.ha.x+a.ha.y*a.ha.y?(a.ha.x=0,a.ha.y=0):(this.pq(a.ha.x,a.ha.y),this.update())}};e.prototype.Gt=function(){if(!this.fj()&&this.pf&&5<this.L.M.tp){var a,
b=0,c=this.wd.length;if(this.Og)c=50,this.Vk<c&&this.Vk++,b=this.Vk;else for(a=0;a<c;a++)(this.wd[a].complete&&this.wd[a].src!=this.qr||""==this.wd[a].src)&&b++;b==c?(this.di=1,this.isLoaded=!0,this.ua&&this.ua.ggLoaded&&this.ua.ggLoaded(),this.H("imagesready",{}),this.v.Dg&&this.v.enabled&&!this.F.active&&!this.D.Md&&(this.v.active=!0,this.v.Dg=!1,this.v.startTime=(new Date).getTime(),this.v.ld=0)):this.di=b/(1*c);this.H("downloadprogress",{percentLoaded:this.di})}};e.prototype.bi=function(){var a=
this;a.Qj||(a.rj?setTimeout(function(){a.Qj=!1;a.bi()},1E3/60):window.requestAnimationFrame(function(){a.Qj=!1;a.bi()}));a.Qj=!0;this.Wl=this.Oj=0;a.F.oj=!1;var b=new Date;this.cj++;120<=this.cj&&(this.N("F/s: "+Math.round(1E3*this.cj/(b.getTime()-this.Ko))),this.Ko=b.getTime(),this.cj=0);this.H("timer",{});this.na&&this.sa.nr();this.Im&&(this.hc(),this.Im=!1);this.Ht();this.Gt();this.A.j&&this.A.Tc&&!this.We&&!this.F.sg&&this.mk&&(this.R=this.mk,this.ti(10*this.A.j.currentTime));this.Dt(b);this.L.Et();
this.Ft(b);this.sa.cv();(0<=this.K.mode||0<this.K.Rb.length)&&this.It();this.ik();if(this.vf.pan!=this.pan.m||this.vf.u!=this.u.m||this.vf.fov!=this.fov.m)this.vf.pan=this.pan.m,this.vf.u=this.u.m,this.vf.fov=this.fov.m,this.H("positionchanged",{});this.Dl!=this.Z()&&(this.Dl=this.Z(),this.H("projectionchanged",{}));this.ub&&(0<this.oh?this.oh--:(this.ub=!1,this.oh=0),this.D.je||this.D.Md||this.D.Zc||this.le||(this.Fi(),this.H("renderframe",{})),this.H("repaint",{}));b=this.co();b!=this.Lo&&(b?(this.ua&&
this.ua.ggReLoadedLevels&&this.ua.ggReLoadedLevels(),this.H("tilesrequested",{})):(a.ua&&a.ua.ggLoadedLevels&&a.ua.ggLoadedLevels(),this.H("tilesready",{})),this.Lo=b)};e.prototype.zh=function(a){switch(a){case 4:a=Math.min(110,this.fov.max);break;case 12:a=Math.min(270,this.fov.Il);a=Math.min(360*this.aspect(),a);a=Math.min(360/this.aspect(),a);break;case 9:a=Math.min(270,this.fov.Jl);break;default:a=90}return a};e.prototype.ik=function(){this.Pk.Mn(this.pan.m,this.u.m);for(var a=0;a<this.X.length+
this.U.length;a++){if(a<this.X.length)var b=this.X[a];else if(b=this.U[a-this.X.length],b.od)continue;b.ik()}};e.prototype.Au=function(a,b){var c=this;var m="<<U>>"+String(c.lb);m=m.toUpperCase();"U"!=m.charAt(2)&&(c.I.kg=!1);if(0!=c.Xh.length||!c.I.kg||c.I.ih||c.I.jh&&c.qf()||c.I.Ui)if(c.zd)c.$.removeChild(c.zd),c.zd=null;else{c.zd=document.createElement("div");var h=c.zd;m="left: "+a+"px;top:\t "+(b+"px;z-index: 32000;");m+="position:relative;";m+="display: table;";m+="color: black;";m+="background-color: white;";
m+="border: 1px solid lightgray;";m+="box-shadow: 1px 1px 3px #333;";m+="font-family: Verdana, Arial, Helvetica, sans-serif;";m+="font-size: 9pt;";m+="opacity : 0.95;";h.setAttribute("style",m);h.setAttribute("class","gg_contextmenu");m=document.createElement("style");a=document.createTextNode(".gg_context_row:hover { background-color: #3399FF }");m.type="text/css";m.styleSheet?m.styleSheet.cssText=a.nodeValue:m.appendChild(a);h.appendChild(m);for(a=0;a<c.Xh.length;a++)if(b=c.Xh[a],""!=b.text){var n=
document.createElement("div");m="text-align: left;";m+="margin: 0;";m+="padding: 5px 20px;";m+="vertical-align: left;";n.setAttribute("style",m);n.setAttribute("class","gg_context_row");""!=b.url?(m=document.createElement("a"),m.href=b.url,m.target="_blank",m.innerHTML=this.Va(b.text),m.setAttribute("style","color: black; text-decoration: none;"),n.appendChild(m)):(m=document.createElement("span"),m.innerHTML=this.Va(b.text),m.setAttribute("style","color: black; text-decoration: none;"),n.appendChild(m));
h.appendChild(n)}0<c.Xh.length&&(!c.I.kg||c.I.ih||c.I.jh&&c.qf()||c.I.Ui)&&h.appendChild(document.createElement("hr"));if(c.I.Ui&&c.na){b=[];b.push({text:this.Va("Rectilinear Projection"),gi:4});b.push({text:this.Va("Stereographic Projection"),gi:9});b.push({text:this.Va("Fisheye Projection"),gi:12});for(a=0;a<b.length;a++){n=b[a];var p=document.createElement("div");p.setAttribute("class","gg_context_row");m="text-align: left;";m+="margin: 0;";m=c.Z()==n.gi?m+"padding: 5px 20px 5px 7px;":m+"padding: 5px 20px;";
m+="vertical-align: left;";m+="cursor: pointer;";p.setAttribute("style",m);p.onclick=function(r){return function(){c.Ek(r,1);c.update()}}(n.gi);p.innerHTML=c.Z()==n.gi?"&#10687; "+n.text:n.text;h.appendChild(p)}(!c.I.kg||c.I.ih||c.I.jh&&c.qf())&&h.appendChild(document.createElement("hr"))}c.I.ih&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),m="text-align: left;margin: 0;padding: 5px 20px;",m+="vertical-align: left;",m+="cursor: pointer;",a.setAttribute("style",m),a.onclick=
function(){c.fk()},a.innerHTML=c.Kh()?this.Va("Exit Fullscreen"):this.Va("Enter Fullscreen"),h.appendChild(a));c.I.jh&&c.qf()&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),m="text-align: left;margin: 0;padding: 5px 20px;",m+="vertical-align: left;",m+="cursor: pointer;",a.setAttribute("style",m),a.onclick=function(){c.Yf()},a.innerHTML="Enter VR",h.appendChild(a));c.I.kg||(a=document.createElement("div"),m="text-align: left;margin: 0;padding: 5px 20px;",m+="vertical-align: left;",
a.setAttribute("style",m),a.setAttribute("class","gg_context_row"),m=document.createElement("a"),m.href=e.nh("aHR0cDovL3Bhbm8ydnIuY29tLw=="),m.target="_blank",m.innerHTML=e.nh("Q3JlYXRlZCB3aXRoIFBhbm8yVlI="),7<this.Aj.length&&(m.innerHTML+="<br/>"+e.zn(this.Aj).replace(/./gm,function(r){return"&#"+r.charCodeAt(0)+";"})),m.setAttribute("style","color: black; text-decoration: none;"),a.appendChild(m),h.appendChild(a));c.$.insertBefore(c.zd,c.$.firstChild);h.onclick=function(){c.zd&&(c.$.removeChild(c.zd),
c.zd=null)};h.oncontextmenu=h.onclick}};e.prototype.Tq=function(){var a=this;var b=a.Ia;a.control=b;a.control=b;setTimeout(function(){a.bi()},10);setTimeout(function(){a.hp()},200);setTimeout(function(){a.ke();a.Fi()},10);b.addEventListener&&(b.addEventListener("touchstart",function(c){a.Wu(c)},!1),b.addEventListener("touchmove",function(c){a.Vu(c)},!1),b.addEventListener("touchend",function(c){a.Uu(c)},!1),b.addEventListener("touchcancel",function(c){a.Tu(c)},!1),b.addEventListener("pointerdown",
function(c){a.Vo(c)},!1),b.addEventListener("MSPointerDown",function(c){a.Vo(c)},!1),b.addEventListener("MSGestureStart",function(c){a.Un(c)},!1),b.addEventListener("MSGestureEnd",function(c){a.Tn(c)},!1),b.addEventListener("MSGestureChange",function(c){a.it(c)},!1),b.addEventListener("gesturestart",function(c){a.Un(c)},!1),b.addEventListener("gesturechange",function(c){a.yr(c)},!1),b.addEventListener("gestureend",function(c){a.Tn(c)},!1),b.addEventListener("mousedown",function(c){a.ft(c)},!1),b.addEventListener("mousemove",
function(c){a.et(c)},!1),document.addEventListener("mouseup",function(c){a.dt(c)},!1),b.addEventListener("mousewheel",function(c){a.Uo(c)},!1),b.addEventListener("DOMMouseScroll",function(c){a.Uo(c)},!1),document.addEventListener("keydown",function(c){a.Us(c)},!1),document.addEventListener("keyup",function(c){a.Vs(c)},!1),window.addEventListener("resize",function(){a.ke()},!1),a.mc.addEventListener("resize",function(){a.ke()},!1),window.addEventListener("blur",function(){a.pt()},!1),a.$.addEventListener("webkitfullscreenchange",
function(){a.ai()},!1),document.addEventListener("mozfullscreenchange",function(){a.ai()},!1),window.addEventListener("webkitfullscreenchange",function(){a.ai()},!1),document.addEventListener("MSFullscreenChange",function(){a.ai()},!1),document.addEventListener("fullscreenchange",function(){a.ai()},!1));b.oncontextmenu=function(c){void 0===c&&(c=window.event);return c.target&&!a.Kc(c.target)?!0:c.ctrlKey?!0:(c=a.xe(c),a.Au(c.x,c.y),!1)};window.addEventListener("deviceorientation",function(c){a.vt(c.alpha,
c.beta,c.gamma,c.absolute);null!=c.alpha&&null!=c.beta&&null!=c.gamma&&0==a.pl&&(a.pl=!0,a.H("gyroavailable",{available:!0}),a.H("playerstatechanged",{}))})};e.prototype.Xm=function(){for(var a=0;a<this.J.length;a++)if("point"==this.J[a].type&&(this.ga&&this.ga.addSkinHotspot?(this.J[a].$f(),this.J[a].j=this.ga.addSkinHotspot(this.J[a])):(this.J[a].j=new y.xq(this,this.J[a]),this.J[a].gd&&this.J[a].Jf&&(this.J[a].j.ggUse3d=!0,this.J[a].j.gg3dDistance=this.J[a].Yi)),this.J[a].j.__div.style.left="-1000px",
this.J[a].j.__div.style.top="-1000px",this.J[a].j&&this.J[a].j.__div)){var b=this.Ia.firstChild;b?this.Ia.insertBefore(this.J[a].j.__div,b):this.Ia.appendChild(this.J[a].j.__div)}};e.prototype.Zq=function(){if(!this.ga||!this.ga.addSkinHotspot)for(var a=0;a<this.J.length;a++)"point"==this.J[a].type&&this.J[a].j&&this.J[a].j.Fs()};e.prototype.$q=function(){for(var a=0;a<this.Xa.length;a++)this.Xa[a].Sd();for(a=0;a<this.Ub.length;a++)this.Ub[a].Sd();for(a=0;a<this.X.length;a++)this.X[a].Sd();for(a=
0;a<this.U.length;a++)this.U[a].Sd()};e.prototype.Qm=function(){var a,b=document.createElement("fakeelement"),c={OTransition:"oTransitionEnd",MSTransition:"msTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd",transition:"transitionEnd"};for(a in c)if(void 0!==b.style[a])return c[a]};e.prototype.Wa=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var c=0;c<this.X.length;c++)a.test(this.X[c].id)&&b.push(this.X[c]);for(c=0;c<this.U.length;c++)a.test(this.U[c].id)&&
b.push(this.U[c]);for(c=0;c<this.Xa.length;c++)a.test(this.Xa[c].id)&&b.push(this.Xa[c]);for(c=0;c<this.Ub.length;c++)a.test(this.Ub[c].id)&&b.push(this.Ub[c]);return b};e.prototype.Xr=function(a){if("_videopanorama"==a)return this.A.j;a=this.Wa(a);return 0<a.length?a[0].j:null};e.prototype.Wr=function(a){a=this.Wa(a);return 0<a.length&&a[0].wa?a[0]:null};e.prototype.op=function(a,b){var c=this;b.addEventListener("ended",function(h){c.H("videoended",{video:h.target})});b.addEventListener("pause",
function(h){c.H("videopaused",{video:h.target})});b.addEventListener("play",function(h){c.H("videostarted",{video:h.target})});for(var m=0;m<this.U.length;m++)if(this.U[m].id==a)return this.U[m].j=b,this.U[m];m=new y.Wm(this);m.registerElement(a,b);return m};e.prototype.isPlaying=function(a){if("_main"===a)return!0;a=this.Wa(a);return 0<a.length?a[0].wa?a[0].ug:!a[0].j.ended&&!a[0].j.paused:!1};e.prototype.ae=function(a,b){var c=this,m=null;if(!this.qd)try{for(var h=this.Wa(a),n=0;n<h.length;n++){var p=
h[n];if(p instanceof y.me){p.tb=b&&!isNaN(Number(b))?Number(b)-1:p.loop-1;-1==p.tb&&(p.tb=1E7);this.N(p.j);this.isPlaying(a)&&this.$j(a);if(p.wa)p.re();else{m=p.j.play();if(void 0!==m)m.then(function(){c.Ag(!0)})["catch"](function(){c.Ag(!1)});p.Pd&&p.Nf()}this.ri(p.id,!1)}}}catch(r){this.N(r)}return m};e.prototype.jp=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var m=a[c];this.isPlaying(m.id)?this.ci(m.id):this.ae(m.id,b)}};e.prototype.Kt=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var m=
a[c];m instanceof y.me&&(this.isPlaying(m.id)?this.$j(m.id):this.ae(m.id,b))}};e.prototype.ci=function(a){try{var b=void 0;if("_main"==a){this.ri(a,!0);for(b=0;b<this.X.length;b++)this.X[b].wa?this.X[b].Ak():this.X[b].j.pause();for(b=0;b<this.U.length;b++)this.U[b].j.pause()}else{var c=this.Wa(a);for(b=0;b<c.length;b++){var m=c[b];m instanceof y.me&&(this.ri(m.id,!0),m.wa?m.Ak():m.j.pause())}}}catch(h){this.N(h)}};e.prototype.Jq=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var m=a[c];0==
b||1==b?m.nf&&m.nf(1==b):2==b&&m.Ae&&m.Ae();!m.Na||-1==this.Xa.indexOf(m)&&-1==this.U.indexOf(m)&&-1==this.Ub.indexOf(m)||(this.Zb=this.Ke=m)}};e.prototype.$j=function(a){var b;try{if("_main"===a){this.ri(a,!0);for(b=0;b<this.X.length;b++)this.X[b].wa?this.X[b].Rf():(this.X[b].j.pause(),this.X[b].j.currentTime=0);for(b=0;b<this.U.length;b++)this.U[b].j.pause(),this.U[b].j.currentTime=0}else{var c=this.Wa(a);for(b=0;b<c.length;b++){var m=c[b];m instanceof y.me&&(this.ri(m.id,!0),m.wa?m.Rf():m.j&&m.j.pause&&
(m.j.pause(),m.j.currentTime=0))}}}catch(h){this.N(h)}};e.prototype.ri=function(a,b){a=this.Wa("_main"===a?".*":a);for(var c=0;c<a.length;c++)a[c].stopped=b};e.prototype.Du=function(a){a=this.Wa(a);return 0<a.length?(a=a[0],a instanceof y.me?a.wa?a.Wq():a.j?a.j.currentTime:0:0):0};e.prototype.Fu=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var m=a[c];m instanceof y.me&&(m.wa?(0>b&&(b=0),b>m.Oi.duration&&(b=m.Oi.duration-.1),m.Xq(b)):m.j&&(0>b&&(b=0),b>m.j.duration&&(b=m.j.duration-.1),m.j.currentTime=
b))}};e.prototype.Eu=function(a,b){a=this.Wa(a);0<a.length&&(a=a[0],a.j&&(a.j.playbackRate=b))};e.prototype.setVolume=function(a,b){try{var c=void 0,m=Number(b);1<m&&(m=1);0>m&&(m=0);"_videopanorama"===a&&this.A.j&&(this.A.j.volume=m,this.A.level=m);if("_main"===a){this.ba=m;for(c=0;c<this.X.length;c++)this.X[c].j.volume=this.X[c].level*this.ba;for(c=0;c<this.U.length;c++)this.U[c].j.volume=this.U[c].level*this.ba;this.A.j&&(this.A.j.volume=this.ba*this.A.level)}else{var h=this.Wa(a);this.N(h);for(c=
0;c<h.length;c++){var n=h[c];n.j&&null!=n.j.volume&&(n.j.volume=m*this.ba);n.level=m}}}catch(p){this.N(p)}};e.prototype.er=function(a,b){try{var c=void 0,m=void 0;"_videopanorama"===a&&this.A.j&&(this.A.j.volume+=Number(b));if("_main"===a){c=this.ba;c+=Number(b);1<c&&(c=1);0>c&&(c=0);this.ba=c;for(m=0;m<this.X.length;m++)this.X[m].j.volume=this.X[m].level*this.ba;for(m=0;m<this.U.length;m++)this.U[m].j.volume=this.U[m].level*this.ba;this.A.j&&(this.A.j.volume=this.ba*this.A.level)}else{var h=this.Wa(a);
for(m=0;m<h.length;m++){var n=h[m];n instanceof y.me&&(c=n.level,c+=Number(b),1<c&&(c=1),0>c&&(c=0),n.level=c,n.j&&null!=n.j.volume&&(n.j.volume=c*this.ba))}}}catch(p){this.N(p)}};e.prototype.km=function(a,b){if("_main"===a||"_all"===a||"_videopanorama"===a)"_all"===a&&(b=(this.qd=1==b||-1==b&&!this.qd?!0:!1)?1:0),this.A.j&&(this.A.j.muted=-1==b?!this.A.j.muted:1==b);a=this.Wa("_main"===a||"_all"===a?".*":a);for(var c=0;c<a.length;c++){var m=a[c];m.Ip&&m.Ip(b)}};e.prototype.lt=function(a){this.km(a,
1)};e.prototype.Yu=function(a){this.km(a,0)};e.prototype.Ru=function(a){this.km(a,-1)};e.prototype.Ir=function(){return this.Xd};e.prototype.Ps=function(){this.en=document.createElement("audio");this.en.src="./media/testsound.mp3"};e.prototype.Tp=function(){var a=this;this.qa&&"suspended"===this.qa.state&&this.qa.resume();var b=a.en.play();if(void 0!==b)b.then(function(){a.Ag(!0)})["catch"](function(){a.Ag(!1)})};e.prototype.Up=function(){this.Xd&&1!=this.ui?this.Tp():this.ve=this.jf=!1};e.prototype.ps=
function(){return this.ui};e.prototype.Ag=function(a){if(1!=this.ui){var b=a?1:0;this.ui!=b&&(this.ui=b,this.H("soundspermittedchanged",{permitted:a}))}};e.prototype.Iu=function(){var a=this;this.eg();this.ve&&setTimeout(function(){a.eg()},500)};e.prototype.Uj=function(a,b,c){a.j.style.opacity=0==b?1:0;a.j.style[this.ac]="opacity "+c+"ms";a.j.style.opacity=0==b?0:1};e.prototype.eu=function(a,b,c){function m(){var r=h[p];if(!r.j)return"continue";0==b?(n.Uj(r,b,c),setTimeout(function(){0==r.j.style.opacity&&
r.Gf(!1)},c+10),r.pc=!1):1==b?(n.Uj(r,b,c),r.Gf(!0),r.pc=!0):2==b&&("visible"==r.j.style.visibility?(n.Uj(r,0,c),setTimeout(function(){0==r.j.style.opacity&&r.Gf(!1)},c+10),r.pc=!1):(n.Uj(r,1,c),r.Gf(!0),r.pc=!0))}for(var h=this.Wa(a),n=this,p=0;p<h.length;p++)m()};e.prototype.Xp=function(){var a=this;try{for(var b=this,c=!1,m=!1,h=0;h<this.X.length;h++){var n=this.X[h];if(-1!=n.loop&&!this.isPlaying(n.id)&&!n.stopped){var p=void 0;this.qa&&this.Za.enabled&&4!=n.mode&&6!=n.mode&&!this.qd?this.Za.wn?
(n.wa?n.re():(p=n.j.play(),n.Pd&&n.Nf(),n.j.currentTime=0),n.va=0,m=!0):c=!0:4==n.mode||6==n.mode||"_background"==n.id&&this.isPlaying(n.id)||this.qd||(n.wa?n.re():(p=n.j.play(),n.j.currentTime&&(n.j.currentTime=0)));if(void 0!==p)p.then(function(){a.Ag(!0)})["catch"](function(){a.Ag(!1)})}}c&&setTimeout(function(){b.Za.Lu()},1E3*this.Za.Gb);m&&(this.Za.Hu=this.qa.currentTime,this.Za.Gu=setInterval(function(){b.Za.tr()},10))}catch(r){this.N(r)}};e.prototype.In=function(){for(var a=0;a<this.Za.Ei.length;a++)this.Za.Hn(this.Za.Ei[a])};
e.prototype.sp=function(){if(this.P&&this.P!=this.fb&&this.P.div&&this.P.div.onmouseout)this.P.div.onmouseout();for(var a;0<this.J.length;)a=this.J.pop(),a.j&&(this.Ia.removeChild(a.j.__div),delete a.j),a.j=null;this.K.Ca=0;this.K.kb=0;this.H("hotspotsremoved",{})};e.prototype.mm=function(a){this.Lf=a;this.$.style.zIndex=0!=a?a.toString():"auto";this.Qa&&this.Qa.vd&&(this.Qa.vd.zIndex=(a+4).toString());this.Ia.style.zIndex=(a+4).toString();this.sb.style.zIndex=(a+3).toString();this.Fa.style.zIndex=
(a+5).toString();for(var b=0;b<this.mj();b++){var c=b<this.U.length?this.U[b]:this.Xa[b-this.U.length];c.j&&(c.j.style.zIndex=(a+(c.Na?8E4:0)).toString())}};e.prototype.Sj=function(a){var b=this.isFullscreen!==a;this.isFullscreen!==a&&(this.isFullscreen=a,this.update(100));if(this.isFullscreen){if(this.kk)try{this.$.webkitRequestFullScreen?this.$.webkitRequestFullScreen():this.$.mozRequestFullScreen?this.$.mozRequestFullScreen():this.$.msRequestFullscreen?this.$.msRequestFullscreen():this.$.requestFullScreen?
this.$.requestFullScreen():this.$.requestFullscreen&&this.$.requestFullscreen()}catch(c){this.N(c)}this.$.style.position="absolute";a=this.Ch();this.$.style.left=window.pageXOffset-a.x+this.margin.left+"px";this.$.style.top=window.pageYOffset-a.y+this.margin.top+"px";this.mm(10);document.body.style.overflow="hidden";b&&(this.ua&&this.ua.ggEnterFullscreen&&this.ua.ggEnterFullscreen(),this.H("fullscreenenter",{}),this.H("playerstatechanged",{}))}else{if(this.kk)try{document.webkitIsFullScreen?document.webkitCancelFullScreen():
document.mozFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.fullScreen&&(document.cancelFullScreen?document.cancelFullScreen():document.exitFullscreen&&document.exitFullscreen())}catch(c){this.N(c)}this.$.style.position="relative";this.$.style.left="0px";this.$.style.top="0px";this.mm(0);document.body.style.overflow="";b&&(this.ua&&this.ua.ggExitFullscreen&&this.ua.ggExitFullscreen(),this.H("fullscreenexit",{}),this.H("playerstatechanged",{}))}this.ke()};
e.prototype.fk=function(){this.Sj(!this.isFullscreen)};e.prototype.rr=function(){this.Sj(!0)};e.prototype.exitFullscreen=function(){this.Sj(!1)};e.prototype.Mr=function(){return this.isFullscreen};e.prototype.Yf=function(){this.Da.jr();this.wp();this.Da.Yf();this.Da.xt();return!0};e.prototype.vs=function(){return"N/A"};e.prototype.us=function(){if(this.Da)return this.Da.mg()?this.Da.Mm:this.Da.camera};e.prototype.ws=function(){if(this.Da)return this.Da.Sa};e.prototype.tu=function(a){this.Da&&(this.Da.fg=
a)};e.prototype.Zf=function(){this.Da&&(this.Da.Zf(),this.Da.Df(),this.Da.Ik());return!0};e.prototype.eq=function(){this.Da&&(this.Da.mg()?this.Zf():this.Yf());return!0};e.prototype.mg=function(){return this.Da&&this.Da.mg()?!0:!1};e.prototype.qf=function(){return this.Da&&this.Da.qf()?!0:!1};e.prototype.kl=function(){return this.Da?this.Da.kl():!1};e.prototype.Ju=function(a,b,c){this.v.Rd=this.v.Ni;this.v.sd=this.v.Rg;this.v.enabled=!0;this.v.Of=this.v.enabled;this.v.active=!0;this.v.ld=0;var m=
new Date;this.v.Hd=0;this.v.startTime=m.getTime();void 0!==a&&0!=a&&(this.v.speed=a);void 0!==b&&(this.v.timeout=b);void 0!==c&&(this.v.ek=c);this.H("autorotatechanged",{})};e.prototype.Mu=function(){this.v.active=!1;this.v.enabled=!1;this.v.Of=this.v.enabled;this.We=this.v.Cj=!1;this.F.active&&this.F.sg&&(this.F.active=!1,this.F.sg=!1,this.F.pb=0);this.H("autorotatechanged",{})};e.prototype.Qu=function(){this.v.enabled=!this.v.active;this.v.Of=this.v.enabled;this.v.active=this.v.enabled;this.v.ld=
0;if(this.v.enabled){var a=new Date;this.v.Hd=0;this.v.startTime=a.getTime();this.v.Rd=this.v.Ni;this.v.sd=this.v.Rg}this.H("autorotatechanged",{})};e.prototype.Jt=function(){this.ma(!1)};e.prototype.St=function(){this.v.enabled&&(this.v.active=!0,this.v.ld=0)};e.prototype.Yt=function(a){this.v.tg=a;this.v.Zo=!0};e.prototype.Sp=function(a){this.Ea.running&&this.Cp();this.xc="";a&&""!=a&&(this.v.Rd=a);this.v.Of=this.v.enabled;this.v.sd=!0;this.v.enabled=!0;this.v.active=!0;this.v.ld=0;this.D.je&&(this.D.Ye=
!0,this.D.oe=!0);a=new Date;this.v.Hd=0;this.v.startTime=a.getTime();this.H("autorotatechanged",{})};e.prototype.Rt=function(a){a&&""!=a&&this.v.Rd!=a||0==this.v.Hd?this.Sp(a):(this.v.sd=!0,this.v.enabled=!0,this.v.active=!0,this.H("autorotatechanged",{}))};e.prototype.Cp=function(){this.Ea.running=!1;this.Ea.finished=!0;this.v.active=this.D.oe;this.v.sd=this.D.Ye;this.xa.splice(this.xa.indexOf(this.R),1);0<this.xa.length&&(this.R=this.xa[0]);this.xc="";this.Tj(!1);this.D.oe=!1;this.D.Ye=!1;this.og=
(new Date).getTime()};e.prototype.pn=function(a){if(this.mc=document.getElementById(a))return this.mc.innerHTML="",!0;alert("container not found!");return!1};e.prototype.$t=function(a){var b=this;b.mc.removeEventListener("resize",function(){b.ke()});b.pn(a)&&(b.mc.appendChild(b.$),b.mc.addEventListener("resize",function(){b.ke()},!1))};e.prototype.vn=function(a){this.pn(a)&&(this.$=document.createElement("div"),this.$.onselectstart=function(){return!1},Y&&this.$.setAttribute("id","viewport"),this.$.setAttribute("role",
"application"),a="top:\t0px;left: 0px;position:relative;-ms-touch-action: none;touch-action: none;text-align: left;"+(this.lb+"user-select: none;"),this.$.setAttribute("style",a),this.mc.appendChild(this.$),this.ea=document.createElement("div"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+(this.lb+"user-select: none;"),Y&&this.ea.setAttribute("id","viewer"),this.ea.setAttribute("style",a),this.$.appendChild(this.ea),
this.Qa&&(this.Qa.vd=document.createElement("canvas"),Y&&this.Qa.vd.setAttribute("id","lensflarecanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+(this.lb+"user-select: none;"),a+=this.lb+"pointer-events: none;",this.Qa.vd.setAttribute("style",a),this.$.appendChild(this.Qa.vd)),this.Ia=document.createElement("div"),Y&&this.Ia.setAttribute("id","hotspots"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;",this.yl&&
(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);"),this.Sc&&!this.na&&(a+=this.lb+"transform: translateZ(9999999px);"),a+=this.lb+"user-select: none;",this.Ia.setAttribute("style",a),this.$.appendChild(this.Ia),this.sb=document.createElement("canvas"),Y&&this.sb.setAttribute("id","hotspotcanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+(this.lb+"user-select: none;"),a+=this.lb+"pointer-events: none;",
this.sb.setAttribute("style",a),this.$.appendChild(this.sb),this.Fa=document.createElement("div"),Y&&this.Fa.setAttribute("id","hotspottext"),this.Fa.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;"),this.Fa.classList.add("ggskin"),this.Fa.classList.add("ggdefaulthotspot"),this.Fa.innerHTML=" Hotspot text!",this.$.appendChild(this.Fa),this.divSkin=this.ua=this.Ia,this.mm(0))};e.prototype.Df=function(){var a;this.ka.ha.x=0;this.ka.ha.y=0;this.sa.Df();var b=
[];for(a=0;a<this.U.length;a++){var c=this.U[a];c.od?b.push(c):c.Me()}for(a=0;a<this.Xa.length;a++)this.Xa[a].Me();for(a=0;a<this.Ub.length;a++)this.Ub[a].Me();this.K.Oh=-1;this.sb.style.visibility="hidden";this.Kd=0;this.Hf=[];this.Za.Ei=[];for(a=0;a<this.X.length;a++)c=this.X[a],c.Yo||7>this.fd&&0==c.mode||this.Hf.push(c);this.U=b;this.Xa=[];this.Ub=[];this.A.j&&(this.$.removeChild(this.A.j),this.A.j=null,a=this.Wa("_videopanorama"),0<a.length&&(a[0].j=null));this.A.Tc=!1;this.A.ng=!1};e.prototype.qo=
function(){var a=1,b=-1!=navigator.userAgent.indexOf("Mac");window.devicePixelRatio&&b&&(a=window.devicePixelRatio);return{w:screen.width*a,h:screen.height*a}};e.prototype.ho=function(){var a=this.qo();return a.w>a.h?a.w:a.h};e.prototype.Vl=function(a,b){a=(new DOMParser).parseFromString(a,"text/xml");this.np(a,b)};e.prototype.mp=function(a,b,c){try{var m=void 0;m=new XMLHttpRequest;m.open("GET",a,!1);m.send(null);if(m.responseXML){var h=a.lastIndexOf("/");0<=h&&(this.pe=a.slice(0,h+1));2<=arguments.length&&
null!=b&&(this.pe=b);this.Vl(m.responseText,c)}else alert("Error loading panorama XML")}catch(n){alert("Error:"+n)}};e.prototype.Mt=function(a,b,c,m){var h=new XMLHttpRequest;var n=this;h.onload=function(p){if(4<=h.readyState)if(h.responseXML){var r=a.lastIndexOf("/");0<=r&&(n.pe=a.slice(0,r+1));3<=arguments.length&&null!=c&&(n.pe=c);n.Vl(h.responseText,m);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+h.statusText)};h.onerror=function(){console.error("Error loading XML:"+
h.statusText)};h.open("GET",a,!0);h.send(null)};e.prototype.Ck=function(a){var b="";"{"==a.charAt(0)&&(b=a.slice(1,a.length-1));(a=this.se[b])&&(b=a);a={oldNodeId:this.ra,nodeId:b};this.H("beforechangenodeid",a);this.nl?this.nl=!1:this.Ll.push(this.ra);""!=this.ra&&-1==this.nk.indexOf(this.ra)&&(this.nk.push(this.ra),this.H("changevisitednodes",{}));this.Mo=this.ra;this.ra=b;this.N("change active node: "+b);this.ga&&this.ga.changeActiveNode&&this.ga.changeActiveNode("{"+b+"}");this.H("changenodeid",
a);this.jf=!0};e.prototype.dj=function(){return this.ra};e.prototype.Zr=function(a){return 0<this.$a.length?(a||(a=this.ra),a=this.$a.indexOf(a),a++,a>=this.$a.length&&(a=0),this.$a[a]):""};e.prototype.ms=function(a){return 0<this.$a.length?(a||(a=this.ra),a=this.$a.indexOf(a),a--,0>a&&(a=this.$a.length-1),this.$a[a]):""};e.prototype.Rr=function(){return this.Mo};e.prototype.qs=function(){return this.fc};e.prototype.nt=function(a){return-1!=this.nk.indexOf(a)};e.prototype.gr=function(){this.nk=[];
this.H("changevisitednodes",{})};e.prototype.np=function(a,b){a=a.firstChild;this.Ue=[];this.$a=[];this.se=[];this.Xd=!1;var c;if(c=a.getAttributeNode("appversion")){if(c=c.nodeValue.toString().match(/(\d+)\.(\d+)\.?(\d+)?/))this.rn=[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||"0",10)];this.N(this.rn)}for(var m=a.firstChild;m;){if("map"==m.nodeName){var h={};(c=m.getAttributeNode("index"))&&(h.index=Number(c.nodeValue));(c=m.getAttributeNode("title"))&&(h.title=c.nodeValue.toString());c=m.getAttributeNode("type");
h.type=c.nodeValue.toString();"web"==h.type?(c=m.getAttributeNode("mapprovider"),h.mapprovider=c.nodeValue.toString(),(c=m.getAttributeNode("mapstyle"))&&(h.mapstyle=c.nodeValue.toString()),(c=m.getAttributeNode("googlecustomstylecode"))&&(h.googlecustomstylecode=c.nodeValue.toString()),(c=m.getAttributeNode("mapurltemplate"))&&(h.mapurltemplate=c.nodeValue.toString()),(c=m.getAttributeNode("mapmaxzoom"))&&(h.mapmaxzoom=Number(c.nodeValue)),(c=m.getAttributeNode("customlayernames"))&&(h.customlayernames=
c.nodeValue.toString().split("|")),(c=m.getAttributeNode("customlayerurltemplates"))&&(h.customlayerurltemplates=c.nodeValue.toString().split("|")),(c=m.getAttributeNode("customlayermaxzooms"))&&(h.customlayermaxzooms=c.nodeValue.toString().split("|")),(c=m.getAttributeNode("mapkey"))&&(h.mapkey=c.nodeValue.toString()),(c=m.getAttributeNode("styleurl"))&&(h.styleurl=c.nodeValue.toString()),(c=m.getAttributeNode("mapboxlayernames"))&&(h.mapboxlayernames=c.nodeValue.toString().split("|")),(c=m.getAttributeNode("mapboxlayerstyleurls"))&&
(h.mapboxlayerstyleurls=c.nodeValue.toString().split("|")),(c=m.getAttributeNode("googlelayernames"))&&(h.googlelayernames=c.nodeValue.toString().split("|")),(c=m.getAttributeNode("googlelayerstyles"))&&(h.googlelayerstyles=c.nodeValue.toString().split("|")),(c=m.getAttributeNode("maplimits"))&&(h.maplimits=c.nodeValue.toString().split("|"))):(c=m.getAttributeNode("width"),h.width=Number(c.nodeValue),c=m.getAttributeNode("height"),h.height=Number(c.nodeValue),c=m.getAttributeNode("zoomlevels"),h.zoomlevels=
Number(c.nodeValue),c=m.getAttributeNode("tileformat"),h.tileformat=c.nodeValue.toString(),c=m.getAttributeNode("bgcolor"),h.bgcolor=c.nodeValue.toString(),c=m.getAttributeNode("crispedges"),h.crispedges=1==c.nodeValue,c=m.getAttributeNode("transparent"),h.transparent=1==c.nodeValue,c=m.getAttributeNode("floorplannorth"),h.floorplannorth=Number(c.nodeValue));c=m.getAttributeNode("id");this.sc[c.nodeValue.toString()]=h}m=m.nextSibling}if("tour"==a.nodeName){this.Gd=!0;if(c=a.getAttributeNode("start"))this.fc=
c.nodeValue.toString();this.hasOwnProperty("startNode")&&this.startNode&&(this.fc=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=a.firstChild;for(a=h="";m;){if("panorama"==m.nodeName){if(c=m.getAttributeNode("id"))h=c.nodeValue.toString(),""==this.fc&&(this.fc=h),""==a&&(a=h),this.Ue[h]=m,this.$a.push(h);for(c=m.firstChild;c;){if("userdata"==
c.nodeName){var n=this.ag(c);this.Tg[h]=n;h==this.fc&&(this.Tg._first=n);n.customnodeid&&(this.se[n.customnodeid]=h);this.Vc[h]=this.En(c);this.qg[h]=this.Fn(c);this.Kf[h]=this.Gn(c)}if("hotspots"==c.nodeName)for(n=c.firstChild;n;)"hotspot"!=n.nodeName&&"polyhotspot"!=n.nodeName||this.Wk(h,c),n=n.nextSibling;if("sounds"==c.nodeName||"media"==c.nodeName)for(n=c.firstChild;n;){"sound"!=n.nodeName||this.Kl||(this.Xd=!0);if("video"==n.nodeName){var p;(p=n.getAttributeNode("level"))&&0<Number(p.nodeValue)&&
(this.Xd=!0)}n=n.nextSibling}c=c.nextSibling}}if("masternode"==m.nodeName)for(c=m.firstChild;c;){"userdata"==c.nodeName&&(n=this.ag(c),this.Tg._master=n);"animationsequences"==c.nodeName&&this.sr(c);if("translations"==c.nodeName){(p=c.getAttributeNode("json"))&&this.Zg(p.nodeValue.toString());for(n=c.firstChild;n;){"json"==n.nodeName&&this.Zg(n.textContent);if("projecttranslation"==n.nodeName){var r={};if(p=n.getAttributeNode("langcode"))r.langCode=p.nodeValue;if(p=n.getAttributeNode("langname"))r.langName=
p.nodeValue;this.Rl.push(r)}n=n.nextSibling}this.Cl||this.jm(window.navigator.language)}c=c.nextSibling}"customproperty"==m.nodeName&&this.Dn(m);m=m.nextSibling}!this.Ue.hasOwnProperty(this.fc)&&(m=this.se[this.fc])&&(this.fc=m);this.Ue.hasOwnProperty(this.fc)||(this.Uc("Start node "+this.fc+" not found!"),this.fc=a);this.Ul(this.Ue[this.fc],b);this.Ck("{"+this.fc+"}");this.ra=this.fc}else this.Gd=!1,this.Ul(a,b),this.Ck(""),this.$a.push("");this.le&&(this.N("add pano vr config"),this.Da.Li());this.Xd&&
(this.Ps(),this.Tp());this.H("configloaded",{});this.H("changenode",{});this.H("playerstatechanged",{})};e.prototype.Ul=function(a,b){var c=this;this.sp();this.Qa&&this.Qa.Ot();this.Oe(this.fb);this.Df();this.mk=0;for(var m=a.firstChild,h,n,p=0,r=this.L.M;m;){if("view"==m.nodeName){if(h=m.getAttributeNode("fovmode"))this.fov.mode=Number(h.nodeValue);h=m.getAttributeNode("pannorth");this.pan.Gj=1*(h?h.nodeValue:0);for(var t=m.firstChild;t;){"start"==t.nodeName&&(h=t.getAttributeNode("pan"),this.pan.m=
Number(h?h.nodeValue:0),this.pan.Ha=this.pan.m,h=t.getAttributeNode("tilt"),this.u.m=Number(h?h.nodeValue:0),this.u.Ha=this.u.m,h=t.getAttributeNode("roll"),this.W.m=Number(h?h.nodeValue:0),this.W.Ha=this.W.m,h=t.getAttributeNode("fov"),this.fov.m=Number(h?h.nodeValue:70),this.fov.Ha=this.fov.m,h=t.getAttributeNode("projection"),this.L.fp=Number(h?h.nodeValue:4),this.rb(this.Bh()));"min"==t.nodeName&&(h=t.getAttributeNode("pan"),this.pan.min=1*(h?h.nodeValue:0),h=t.getAttributeNode("tilt"),this.u.min=
1*(h?h.nodeValue:-90),h=t.getAttributeNode("fov"),this.fov.min=1*(h?h.nodeValue:5),1E-20>this.fov.min&&(this.fov.min=1E-20),h=t.getAttributeNode("fovpixel"),this.fov.Yh=1*(h?h.nodeValue:0));if("max"==t.nodeName){h=t.getAttributeNode("pan");this.pan.max=1*(h?h.nodeValue:0);h=t.getAttributeNode("tilt");this.u.max=1*(h?h.nodeValue:90);h=t.getAttributeNode("fov");this.fov.max=1*(h?h.nodeValue:120);180<=this.fov.max&&(this.fov.max=179.9);if(h=t.getAttributeNode("fovstereographic"))this.fov.Jl=1*h.nodeValue;
if(h=t.getAttributeNode("fovfisheye"))this.fov.Il=1*h.nodeValue;if(h=t.getAttributeNode("scaletofit"))this.I.Ap=1==h.nodeValue}if("flyin"==t.nodeName){if(h=t.getAttributeNode("projection"))this.oc.pb=Number(h.nodeValue);if(h=t.getAttributeNode("pan"))this.oc.pan=parseFloat(h.nodeValue);if(h=t.getAttributeNode("tilt"))this.oc.u=parseFloat(h.nodeValue);if(h=t.getAttributeNode("fov"))this.oc.fov=parseFloat(h.nodeValue)}t=t.nextSibling}}if("autorotate"==m.nodeName){if(h=m.getAttributeNode("speed"))this.v.speed=
1*h.nodeValue;if(h=m.getAttributeNode("delay"))this.v.timeout=1*h.nodeValue;if(h=m.getAttributeNode("returntohorizon"))this.v.ek=1*h.nodeValue;if(h=m.getAttributeNode("horizonfromdefview"))this.v.yo=1==h.nodeValue;if(h=m.getAttributeNode("nodedelay"))this.v.Fj=1*h.nodeValue;if(h=m.getAttributeNode("noderandom"))this.v.$o=1==h.nodeValue;(h=m.getAttributeNode("nodefilter"))&&!this.v.Zo&&(this.v.tg=h.nodeValue);this.Cd&&(this.v.enabled=!0,this.v.Of=!0,this.v.active=!1);(h=m.getAttributeNode("startloaded"))&&
this.Cd&&(this.v.Dg=1==h.nodeValue,this.v.Dg&&(this.v.active=!1));if(h=m.getAttributeNode("useanimation"))this.v.Rg=1==h.nodeValue,this.v.sd=this.v.Rg;if(h=m.getAttributeNode("syncanimationwithvideo"))this.v.vm=1==h.nodeValue}if("animation"==m.nodeName){if(h=m.getAttributeNode("syncanimationwithvideo"))this.v.vm=1==h.nodeValue;if(h=m.getAttributeNode("useinautorotation"))this.v.Rg=1==h.nodeValue;if(h=m.getAttributeNode("animsequence"))this.v.Ni=h.nodeValue,this.Cd&&(this.v.Rd=this.v.Ni);if(h=m.getAttributeNode("clipsrandom"))this.v.qn=
1==h.nodeValue;this.xa=[];for(t=m.firstChild;t;){if("clip"==t.nodeName){this.R=new y.Sm;if(h=t.getAttributeNode("animtitle"))this.R.Xe=h.nodeValue.toString();if(h=t.getAttributeNode("cliptitle"))this.R.cb=h.nodeValue.toString();if(h=t.getAttributeNode("nodeid"))this.R.yv=h.nodeValue.toString();if(h=t.getAttributeNode("length"))this.R.length=Number(h.nodeValue);if(h=t.getAttributeNode("animtype"))this.R.Qq=Number(h.nodeValue);if(h=t.getAttributeNode("nextcliptitle"))this.R.Xo=h.nodeValue.toString();
if(h=t.getAttributeNode("nextclipnodeid"))this.R.Wo=h.nodeValue.toString();if(h=t.getAttributeNode("nextclipstartview"))this.R.mt=h.nodeValue.toString();if(h=t.getAttributeNode("transitiontype"))this.R.Xu=Number(h.nodeValue);var w=t.firstChild;for(this.R.Ja=[];w;){if("keyframe"==w.nodeName){var z=new y.ed;if(h=w.getAttributeNode("time"))z.time=Number(h.nodeValue);if(h=w.getAttributeNode("value"))z.value=Number(h.nodeValue);if(h=w.getAttributeNode("valuestring"))z.Km=h.nodeValue.toString();if(h=w.getAttributeNode("transitiontime"))z.Gb=
Number(h.nodeValue);h=w.getAttributeNode("type");var C=0;h&&(z.type=Number(h.nodeValue),C=Number(h.nodeValue));if(h=w.getAttributeNode("property"))z.qb=Number(h.nodeValue);if(h=w.getAttributeNode("additionaltrackid"))z.td=h.nodeValue.toString();if(h=w.getAttributeNode("additionaltracktype"))z.Ym=Number(h.nodeValue);if(1==C||2==C){if(h=w.getAttributeNode("bezierintime"))z.Ze=Number(h.nodeValue);if(h=w.getAttributeNode("bezierinvalue"))z.$e=Number(h.nodeValue);if(h=w.getAttributeNode("bezierouttime"))z.af=
Number(h.nodeValue);if(h=w.getAttributeNode("bezieroutvalue"))z.bf=Number(h.nodeValue)}this.R.Ja.push(z)}w=w.nextSibling}this.xa.push(this.R);"__VideoPano"==this.R.cb&&(this.mk=this.R)}t=t.nextSibling}}"input"==m.nodeName&&(n||(n=m));if(n)for(w=0;6>w;w++)h=n.getAttributeNode("prev"+w+"url"),this.lh[w]=h?String(h.nodeValue):"";"altinput"==m.nodeName&&(t=0,(h=m.getAttributeNode("screensize"))&&(t=1*h.nodeValue),0<t&&t<=this.ho()&&t>p&&(p=t,n=m));if("control"==m.nodeName&&this.Cd){if(h=m.getAttributeNode("simulatemass"))this.ka.enabled=
1==h.nodeValue;if(h=m.getAttributeNode("rubberband"))this.I.zp=1==h.nodeValue;if(h=m.getAttributeNode("zoomcentercursor"))this.I.Mf=1==h.nodeValue;if(h=m.getAttributeNode("locked"))this.I.rc=1==h.nodeValue;h&&(this.I.Uh=1==h.nodeValue);if(h=m.getAttributeNode("lockedmouse"))this.I.rc=1==h.nodeValue;if(h=m.getAttributeNode("lockedkeyboard"))this.I.Uh=1==h.nodeValue;if(h=m.getAttributeNode("lockedkeyboardzoom"))this.I.Ys=1==h.nodeValue;if(h=m.getAttributeNode("lockedwheel"))this.I.Ge=1==h.nodeValue;
if(h=m.getAttributeNode("invertwheel"))this.I.Co=1==h.nodeValue;if(h=m.getAttributeNode("speedwheel"))this.I.rm=1*h.nodeValue;if(h=m.getAttributeNode("invertcontrol"))this.I.Zd=1==h.nodeValue;if(h=m.getAttributeNode("sensitivity"))this.I.sensitivity=1*h.nodeValue,1>this.I.sensitivity&&(this.I.sensitivity=1);if(h=m.getAttributeNode("dblclickfullscreen"))this.I.Rk=1==h.nodeValue;if(h=m.getAttributeNode("contextfullscreen"))this.I.ih=1==h.nodeValue;if(h=m.getAttributeNode("contextvr"))this.I.jh=1==h.nodeValue;
if(h=m.getAttributeNode("contextprojections"))this.I.Ui=1==h.nodeValue;if(h=m.getAttributeNode("hideabout"))this.I.kg=1==h.nodeValue;for(t=m.firstChild;t;)"menulink"==t.nodeName&&(w={text:"",url:""},h=t.getAttributeNode("text"),w.text=h.nodeValue,h=t.getAttributeNode("url"),w.url=h.nodeValue,this.Xh.push(w)),t=t.nextSibling}"vr"==m.nodeName&&this.Cd&&(h=m.getAttributeNode("toggleskinbutton"))&&(this.Da.Cn=1==h.nodeValue);if("transition"==m.nodeName&&this.Cd){if(h=m.getAttributeNode("enabled"))this.D.enabled=
1==h.nodeValue;if(h=m.getAttributeNode("blendtime"))this.D.dh=1*h.nodeValue;if(h=m.getAttributeNode("blendcolor"))this.D.Pf=h.nodeValue.toString();if(h=m.getAttributeNode("type"))this.D.type=h.nodeValue.toString();if(h=m.getAttributeNode("delay"))this.D.delay=h.nodeValue.toString();if(h=m.getAttributeNode("softedge"))this.D.Yc=1*h.nodeValue;if(h=m.getAttributeNode("zoomin"))this.D.da=1*h.nodeValue;if(h=m.getAttributeNode("zoomout"))this.D.dd=1*h.nodeValue;if(h=m.getAttributeNode("zoomfov"))this.D.tk=
1*h.nodeValue;if(h=m.getAttributeNode("zoomafterinfov"))this.D.rk=1*h.nodeValue;if(h=m.getAttributeNode("zoomafteroutfov"))this.D.sk=1*h.nodeValue;if(h=m.getAttributeNode("zoomspeed"))this.D.Xg=1*h.nodeValue;if(h=m.getAttributeNode("zoomoutpause"))this.D.Wg=1==h.nodeValue;"cut"==this.D.type&&(this.D.dh=0)}if("soundstransition"==m.nodeName){if(h=m.getAttributeNode("enabled"))this.Za.enabled=1==h.nodeValue;if(h=m.getAttributeNode("transitiontime"))this.Za.Gb=1*h.nodeValue;if(h=m.getAttributeNode("crossfade"))this.Za.wn=
1==h.nodeValue}if("flyintransition"==m.nodeName){if(h=m.getAttributeNode("enabled"))this.Ea.enabled=1==h.nodeValue&&this.na;if(h=m.getAttributeNode("speed"))this.Ea.speed=1*h.nodeValue}"userdata"==m.nodeName&&(this.userdata=this.Sg=this.ag(m),this.Vc[a.id]||(this.Vc[a.id]=this.En(m),this.qg[a.id]=this.Fn(m),this.Kf[a.id]=this.Gn(m)));"projectuserdata"==m.nodeName&&(this.Tg._master=this.ag(m));"customproperty"==m.nodeName&&this.Dn(m);if("translations"==m.nodeName)for((h=m.getAttributeNode("json"))&&
this.Zg(h.nodeValue.toString()),this.Cl||this.jm(window.navigator.language),t=m.firstChild;t;){"json"==t.nodeName&&this.Zg(t.textContent);if("projecttranslation"==t.nodeName){w={};if(h=t.getAttributeNode("langcode"))w.langCode=h.nodeValue;if(h=t.getAttributeNode("langname"))w.langName=h.nodeValue;this.Rl.push(w)}t=t.nextSibling}if("hotspots"==m.nodeName){if(h=m.getAttributeNode("smoothmovement"))this.Qp=1==h.nodeValue;for(t=m.firstChild;t;){if("label"==t.nodeName&&this.Cd){w=this.K.ck;if(h=t.getAttributeNode("enabled"))w.enabled=
1==h.nodeValue;if(h=t.getAttributeNode("width"))w.width=1*h.nodeValue;if(h=t.getAttributeNode("height"))w.height=1*h.nodeValue;if(h=t.getAttributeNode("textcolor"))w.dk=1*h.nodeValue;if(h=t.getAttributeNode("textalpha"))w.bk=1*h.nodeValue;if(h=t.getAttributeNode("background"))w.background=1==h.nodeValue;if(h=t.getAttributeNode("backgroundalpha"))w.Vb=1*h.nodeValue;if(h=t.getAttributeNode("backgroundcolor"))w.Wb=1*h.nodeValue;if(h=t.getAttributeNode("border"))w.Pi=1*h.nodeValue;if(h=t.getAttributeNode("bordercolor"))w.Yb=
1*h.nodeValue;if(h=t.getAttributeNode("borderalpha"))w.Xb=1*h.nodeValue;if(h=t.getAttributeNode("borderradius"))w.zk=1*h.nodeValue;if(h=t.getAttributeNode("wordwrap"))w.qk=1==h.nodeValue}if("polystyle"==t.nodeName&&this.Cd){if(h=t.getAttributeNode("mode"))this.K.mode=1*h.nodeValue;if(h=t.getAttributeNode("bordercolor"))this.K.Yb=1*h.nodeValue;if(h=t.getAttributeNode("backgroundcolor"))this.K.Wb=1*h.nodeValue;if(h=t.getAttributeNode("borderalpha"))this.K.Xb=1*h.nodeValue;if(h=t.getAttributeNode("backgroundalpha"))this.K.Vb=
1*h.nodeValue;if(h=t.getAttributeNode("handcursor"))this.K.Ce=1==h.nodeValue}h=void 0;"hotspot"==t.nodeName&&(h=new y.Ki(this),h.type="point",h.yb(t),this.J.push(h),this.Wk(a.id,t));"polyhotspot"==t.nodeName&&(h=new y.Ki(this),h.type="poly",h.yb(t),this.J.push(h),this.Wk(a.id,t));t=t.nextSibling}}if("sounds"==m.nodeName||"media"==m.nodeName)for(t=m.firstChild;t;){if("sound"==t.nodeName&&!this.Kl)for(this.Xd=!0,h=new y.me(this),h.yb(t),h.addElement(),w=0;w<this.Hf.length;w++)h.id==this.Hf[w].id&&(this.Hf.splice(w,
1),w--);"video"==t.nodeName&&(h=new y.Wm(this),h.yb(t),h.addElement(),0<h.level&&(this.Xd=!0));"image"==t.nodeName&&(h=new y.Eq(this),h.yb(t),h.addElement());"webelement"==t.nodeName&&(h=new y.Gq(this),h.yb(t),h.addElement());"lensflare"==t.nodeName&&this.Qa&&(h=new y.Fq(this),h.yb(t),this.Qa.Th.push(h));t=t.nextSibling}m=m.nextSibling}for(w=this.v.Hd=0;w<this.Hf.length;w++){a=this.Hf[w];if(this.qa&&this.Za.enabled&&this.isPlaying(a.id))this.Za.Ei.push(a);else{try{a.wa?a.Rf():a.j.pause()}catch(E){this.N(E)}a.Me()}this.X.splice(this.X.indexOf(a),
1)}1!=this.D.da&&2!=this.D.da&&6!=this.D.da&&7!=this.D.da&&this.In();this.le||(this.nb.mi=!0);b&&("object"===typeof b&&null!==b?(b.hasOwnProperty("pan")&&this.de(Number(b.pan)),b.hasOwnProperty("tilt")&&this.ee(Number(b.tilt)),b.hasOwnProperty("projection")&&this.rb(Number(b.projection)),b.hasOwnProperty("fov")&&this.Ab(Number(b.fov))):""!=b&&(b=b.toString().split("/"),4<b.length&&this.rb(Number(b[4])),0<b.length&&(h=String(b[0]),"N"==h.charAt(0)?this.Vj(Number(h.substr(1))):"S"==h.charAt(0)?this.Vj(-180+
Number(h.substr(1))):this.de(Number(h))),1<b.length&&this.ee(Number(b[1])),2<b.length&&this.Ab(Number(b[2]))),this.pan.open=this.pan.m,this.Ea.Ad.pan=this.pan.m,this.Ea.Ad.u=this.u.m,this.Ea.Ad.fov=this.fov.m,this.Ea.Ad.pb=this.Z(),this.Ea.Ad.nq=!0);if(n){h=n.getAttributeNode("stereo");this.Fd=!1;h&&1==h.nodeValue&&(this.Fd=!0);h=n.getAttributeNode("fliplr");this.Eg=!1;h&&1==h.nodeValue&&(this.Eg=!0);for(w=0;w<(this.Fd?12:6);w++)(h=n.getAttributeNode("tile"+w+"url"))&&(this.kh[w]=String(h.nodeValue));
for(w=0;6>w;w++)(h=n.getAttributeNode("prev"+w+"url"))&&(this.lh[w]=String(h.nodeValue));if(h=n.getAttributeNode("tilevrurl"))this.Nk=String(h.nodeValue);if(h=n.getAttributeNode("tilesize"))this.Se=1*h.nodeValue;h=n.getAttributeNode("canvassize");if(h=n.getAttributeNode("tilescale"))this.Jg=1*h.nodeValue;if(h=n.getAttributeNode("leveltileurl"))r.Gl=h.nodeValue;if(h=n.getAttributeNode("leveltilesize"))r.V=Number(h.nodeValue);if(h=n.getAttributeNode("levelbias"))r.Qo=Number(h.nodeValue);if(h=n.getAttributeNode("levelbiashidpi"))r.Ro=
Number(h.nodeValue);h=n.getAttributeNode("overlap");this.Ya.W=0;this.Ya.pitch=0;h&&(r.ib=Number(h.nodeValue));if(h=n.getAttributeNode("levelingroll"))this.Ya.W=Number(h.nodeValue);if(h=n.getAttributeNode("levelingpitch"))this.Ya.pitch=Number(h.nodeValue);this.Kd=0;(h=n.getAttributeNode("flat"))&&1==h.nodeValue&&(this.Kd=2);h=n.getAttributeNode("width");r.width=1*(h?h.nodeValue:1);h=n.getAttributeNode("height");r.height=1*(h?h.nodeValue:r.width);this.A.src=[];r.levels=[];for(t=n.firstChild;t;){if("preview"==
t.nodeName){if(h=t.getAttributeNode("color"))r.Lj=h.nodeValue;if(h=t.getAttributeNode("strip"))r.lp=1==h.nodeValue}if("video"==t.nodeName){if(h=t.getAttributeNode("format"))"3x2"==h.nodeValue&&(this.A.format=14),"equirectangular"==h.nodeValue&&(this.A.format=1);if(h=t.getAttributeNode("flipy"))this.A.flipY=Number(h.nodeValue);if(h=t.getAttributeNode("startonload"))this.A.Yj=1==h.nodeValue;if(h=t.getAttributeNode("startmutedmobile"))this.A.sm=1==h.nodeValue;if(h=t.getAttributeNode("level"))this.A.level=
Number(h.nodeValue);if(h=t.getAttributeNode("bleed"))this.A.cf=Number(h.nodeValue);if(h=t.getAttributeNode("endaction"))this.A.ue=String(h.nodeValue);if(h=t.getAttributeNode("targetview"))this.A.ak=String(h.nodeValue);if(h=t.getAttributeNode("width"))this.A.width=Number(h.nodeValue);if(h=t.getAttributeNode("height"))this.A.height=Number(h.nodeValue);for(w=t.firstChild;w;)"source"==w.nodeName&&(h=w.getAttributeNode("url"))&&this.A.src.push(h.nodeValue.toString()),w=w.nextSibling;0<this.A.src.length&&
""!=this.A.src[0]&&0<this.A.level&&(this.Xd=!0)}if("level"==t.nodeName){n=new y.Vm;h=t.getAttributeNode("width");n.width=1*(h?h.nodeValue:1);h=t.getAttributeNode("height");n.height=1*(h?h.nodeValue:n.width);if(h=t.getAttributeNode("preload"))n.cache=1==h.nodeValue;if(h=t.getAttributeNode("preview"))n.Cf=1==h.nodeValue;n.Y=Math.floor((n.width+r.V-1)/r.V);n.ta=Math.floor((n.height+r.V-1)/r.V);r.levels.push(n)}t=t.nextSibling}r.Fl=r.levels.length}this.pf=!0;this.Og&&(this.na=this.Ng=!1,this.Gc||(this.N("dummy rendering"),
this.Gc=document.createElement("canvas"),this.Gc.width=100,this.Gc.height=100,this.Gc.id="dummycanvas",this.ea.appendChild(this.Gc)),this.hc());this.na&&this.S&&(this.sa.Ao(this.Jg),this.sa.Bo());var F=this;0<r.levels.length&&r.lp&&0==this.Kd&&(b=new Image,n=new y.Vm,n.Cf=!0,n.cache=!0,n.Y=n.ta=0,n.height=n.width=0,r.levels.push(n),b.crossOrigin=this.crossOrigin,b.onload=this.sa.kt(b),b.setAttribute("src",this.L.Ig(6,r.Fl-1,0,0)));if(0<this.A.src.length&&this.na)if(this.Gi){this.A.j=document.createElement("video");
this.A.j.crossOrigin=this.crossOrigin;this.A.j.setAttribute("style","display:none; max-width:none;");this.A.j.setAttribute("playsinline","playsinline");this.A.j.preload=!0;this.A.j.volume=this.ba*this.A.level;this.$.appendChild(this.A.j);this.A.Tc=!1;this.A.zm=!1;this.A.j.oncanplay=function(){if(!F.A.Tc){F.A.ng=!0;var E,D,A=[],G=new y.Ua,J=F.S,H=F.A.j.videoWidth/3;F.A.width=F.A.j.videoWidth;F.A.height=F.A.j.videoHeight;for(E=0;6>E;E++){var I=E%3*H+F.A.cf;var L=I+H-2*F.A.cf;var K=4;3>E&&(K+=H);var M=
K+H-2*F.A.cf;for(D=0;4>D;D++){G.x=-1;G.y=-1;G.z=1;for(var Q=0;Q<D;Q++)G.yp();A.push((0<G.x?I:L)/(3*H),(0<G.y?M:K)/(2*H))}}J.bindBuffer(J.ARRAY_BUFFER,F.A.Ai);J.bufferData(J.ARRAY_BUFFER,new Float32Array(A),J.STATIC_DRAW);F.D.Zc&&"videopano"==F.D.delay&&F.Zj(null)}};this.A.tb=function(){var E=F.Wa("_videopanorama");return 0<E.length&&E[0].tb?E[0].tb:0};this.A.dm=function(E){var D=F.Wa("_videopanorama");0<D.length&&(D[0].tb=E)};this.A.loop=function(){return 0<F.A.tb()?(F.A.dm(F.A.tb()-1),F.A.j.play(),
!0):!1};"exit"==this.A.ue?this.A.j.onended=function(){F.A.ng=!1;F.A.Tc=!1;F.$.removeChild(F.A.j);F.A.j=null;F.update()}:"stop"==this.A.ue?F.A.j.onended=function(){F.A.loop()||F.update()}:"{"==this.A.ue.charAt(0)?this.A.j.onended=function(){F.pd(F.A.ue,F.A.ak)}:this.A.j.loop=!0;for(w=0;w<this.A.src.length;w++)r=document.createElement("source"),r.setAttribute("src",this.gb(this.A.src[w])),this.A.j.appendChild(r);r=this.Wa("_videopanorama");0<r.length?r[0].j=this.A.j:this.op("_videopanorama",this.A.j);
if(this.A.Yj&&(r=this.A.j.play(),void 0!==r))r.then(function(){})["catch"](function(){c.A.sm&&(c.A.j.muted=!0,c.A.j.play())})}else"{"==this.A.ue.charAt(0)&&F.pd(F.A.ue,F.A.ak);this.Xm();this.D.Md||this.Xp();this.update();this.Cd&&(this.Cd=!1,this.H("viewerinit",{}),this.ua&&this.ua.ggViewerInit&&this.ua.ggViewerInit(),this.Ea.enabled&&0==this.Kd&&this.na&&(this.rb(9),this.pan.m=this.oc.pan,this.u.m=this.oc.u,this.fov.m=this.oc.fov,this.rb(this.oc.pb),this.R=this.al(!1),this.pan.m=this.bc(0,0).value,
this.u.m=this.bc(0,1).value,this.fov.m=this.bc(0,2).value,r=this.bc(0,3).value,3==r&&this.rb(r),this.xc=this.R.cb,this.Tj(!0),this.v.active=!1,this.v.wh=!0));this.hc()};e.prototype.Ml=function(a,b){0<a.length&&(".xml"==a.slice(-4)||".swf"==a.slice(-4)||"{"==a.charAt(0)?this.pd(this.gb(a),b):window.open(this.gb(a),b))};e.prototype.Ku=function(){this.pf=this.isLoaded=!1;this.checkLoaded=this.wd=[];this.di=0;this.ua&&this.ua.ggReLoaded&&this.ua.ggReLoaded();this.H("beforechangenode",{})};e.prototype.Gs=
function(a){var b="";0<this.Ll.length&&(b=this.Ll.pop());""!=b&&(this.nl=!0);this.pd("{"+b+"}",a)};e.prototype.pd=function(a,b){if(""!=a&&"{}"!=a){this.Ku();this.we&&!this.Og&&(this.Rc(0),this.hc());this.ga&&this.ga.hotspotProxyOut&&this.ga.hotspotProxyOut(this.P.id,this.P.url);this.H("hsproxyout",{id:this.P.id,url:this.P.url});".swf"==a.substr(a.length-4)&&(a=a.substr(0,a.length-4)+".xml");var c="",m=null;"object"===typeof b&&null!==b?m=b:b&&(c=b.toString());b="/"+this.u.m+"/"+this.fov.m+"//"+this.Z();
c=c.replace("$cur",this.pan.m+b);c=c.replace("$(cur)",this.pan.m+b);c=c.replace("$fwd","N"+this.Vd()+b);c=c.replace("$(fwd)","N"+this.Vd()+b);c=c.replace("$bwd","S"+this.Vd()+b);c=c.replace("$(bwd)","S"+this.Vd()+b);c=c.replace("$ap",String(this.pan.m));c=c.replace("$(ap)",String(this.pan.m));c=c.replace("$an",String(this.Vd()));c=c.replace("$(an)",String(this.Vd()));c=c.replace("$at",String(this.u.m));c=c.replace("$(at)",String(this.u.m));c=c.replace("$af",String(this.fov.m));c=c.replace("$(af)",
String(this.fov.m));c=c.replace("$ar",String(this.Z()));c=c.replace("$(ar)",String(this.Z()));""!=c&&(b=c.split("/"),3<b.length&&""!=b[3]&&(this.startNode=b[3]));m=null!==m?m:c;this.ma(!1);if("{"==a.charAt(0)){b=a.substr(1,a.length-2);if(this.ra==b&&this.fh){this.pf=this.isLoaded=!0;return}(c=this.se[b])&&(b=c);c=this.D;var h=this.S;if(this.Ue[b]){this.fh=!0;if(this.D.enabled&&this.na&&this.D.Cc){c.Np=!0;c.je||c.Md||c.Zc||this.Tj(!0);var n=void 0;"wipeleftright"==c.type?n=1:"wiperightleft"==c.type?
n=2:"wipetopbottom"==c.type?n=3:"wipebottomtop"==c.type?n=4:"wiperandom"==c.type&&(n=Math.ceil(4*Math.random()));c.Qk=n;h.bindFramebuffer(h.FRAMEBUFFER,c.Cc);h.viewport(0,0,c.Cc.width,c.Cc.height);h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT);c.Di=!0;this.Fi();c.Di=!1;h.bindFramebuffer(h.FRAMEBUFFER,null);h.viewport(0,0,this.Cb.width,this.Cb.height);h=new Date;this.P!=this.fb&&6!=c.da?7==c.da?(c.Ug=this.P.ec/this.C.width,c.Vg=.5):(c.Ug=this.P.ec/this.C.width,c.Vg=1-this.P.Qb/this.C.height):(c.Ug=
.5,c.Vg=.5);if(1==c.da||2==c.da||6==c.da||7==c.da)c.wq=h.getTime()+100,c.Md=!0,c.Hb=Math.sin(this.Dd()/2*Math.PI/180)/Math.sin(c.tk/2*Math.PI/180),c.Hb=Math.max(c.Hb,1),c.vq=1/c.Xg*c.Hb*.3}this.Ul(this.Ue[b],m);this.Ck(a);if(c.enabled&&this.na&&(this.iq(null),0!=c.dd)){c.wm=this.mf();c.xm=this.gg();c.zi=this.Dd();c.ge=this.Z();if(1==c.dd||3==c.dd)this.Ab(c.sk);else if(2==c.dd)this.Ab(c.rk);else if(4==c.dd){for(m=a=0;m<this.xa.length;m++)this.xa[m].cb&&0==this.xa[m].cb.indexOf("__FlyIn")&&(a=this.xa[m]);
0!=a?(this.rb(this.gj(3,a).value),this.de(this.gj(0,a).value),this.ee(this.gj(1,a).value),this.Ab(this.gj(2,a).value)):(this.rb(this.oc.pb),this.de(this.oc.pan),this.ee(this.oc.u),this.Ab(this.oc.fov))}c.Wg||1==c.da||2==c.da||6==c.da||7==c.da||this.tm()}c.Np=!1;this.le&&(this.N("add pano opennext"),this.Da.Li());this.D.Md||this.D.je||this.D.Zc||(this.fa&&this.Mk(),this.fh=!1)}else{this.Uc("invalid node id: "+b);return}}else this.mp(a,null,m);this.H("changenode",{});this.update(5)}};e.prototype.jo=
function(){return this.pf?this.Gd?this.$a.slice(0):[""]:[]};e.prototype.ag=function(a){var b;var c={title:"",description:"",author:"",datetime:"",copyright:"",source:"",information:"",comment:"",latitude:0,longitude:0,altitude:-1E4,heading:0,customnodeid:"",streetviewlink:"",tags:[]};if(a&&((b=a.getAttributeNode("title"))&&(c.title=b.nodeValue.toString()),(b=a.getAttributeNode("description"))&&(c.description=b.nodeValue.toString()),(b=a.getAttributeNode("author"))&&(c.author=b.nodeValue.toString()),
(b=a.getAttributeNode("datetime"))&&(c.datetime=b.nodeValue.toString()),(b=a.getAttributeNode("copyright"))&&(c.copyright=b.nodeValue.toString()),(b=a.getAttributeNode("source"))&&(c.source=b.nodeValue.toString()),(b=a.getAttributeNode("info"))&&(c.information=b.nodeValue.toString()),(b=a.getAttributeNode("comment"))&&(c.comment=b.nodeValue.toString()),(b=a.getAttributeNode("latitude"))&&(c.latitude=Number(b.nodeValue)),(b=a.getAttributeNode("longitude"))&&(c.longitude=Number(b.nodeValue)),(b=a.getAttributeNode("nodeid"))&&
(c.nodeid=b.nodeValue.toString()),(b=a.getAttributeNode("altitude"))&&(c.altitude=Number(b.nodeValue)),(b=a.getAttributeNode("heading"))&&(c.heading=Number(b.nodeValue)),(b=a.getAttributeNode("customnodeid"))&&(c.customnodeid=b.nodeValue.toString()),(b=a.getAttributeNode("streetviewlink"))&&(c.streetviewlink=b.nodeValue.toString()),b=a.getAttributeNode("tags"))){a=b.nodeValue.toString().split("|");for(b=0;b<a.length;b++)""==a[b]&&(a.splice(b,1),b--);c.tags=a}return c};e.prototype.sr=function(a){for(var b=
"",c=a.firstChild;c;){if("sequence"==c.nodeName){if(a=c.getAttributeNode("title"))b=a.nodeValue;for(var m=[],h=c.firstChild;h;){if("sequenceelement"==h.nodeName){var n={};if(a=h.getAttributeNode("index"))n.index=a.nodeValue;if(a=h.getAttributeNode("nodeid"))n.nodeid=a.nodeValue;if(a=h.getAttributeNode("cliptitle"))n.cliptitle=a.nodeValue;if(a=h.getAttributeNode("startview"))n.startview=a.nodeValue;m.push(n)}h=h.nextSibling}this.bn[b]=m}c=c.nextSibling}};e.prototype.En=function(a){for(var b={},c=a.firstChild;c;){if("mapcoords"==
c.nodeName){var m={x:0,y:0};a=c.getAttributeNode("x");m.x=Number(a.nodeValue);a=c.getAttributeNode("y");m.y=Number(a.nodeValue);a=c.getAttributeNode("mapid");b[a.nodeValue.toString()]=m}c=c.nextSibling}return b};e.prototype.Fn=function(a){for(var b={},c=a.firstChild;c;){if("mapcoords"==c.nodeName){var m={x:0,y:0};a=c.getAttributeNode("x_floorplan_percent");m.x=Number(a.nodeValue);a=c.getAttributeNode("y_floorplan_percent");m.y=Number(a.nodeValue);a=c.getAttributeNode("mapid");b[a.nodeValue.toString()]=
m}c=c.nextSibling}return b};e.prototype.Gn=function(a){for(var b={},c=a.firstChild;c;){if("custompropertyvalue"==c.nodeName){a=c.getAttributeNode("value");var m=a.nodeValue.toString();a=c.getAttributeNode("variablename");b[a.nodeValue.toString()]=m}c=c.nextSibling}return b};e.prototype.Wk=function(a,b){var c,m="";(c=b.getAttributeNode("id"))&&(m=c.nodeValue.toString());if(!this.ob.hasOwnProperty(a)||!this.ob[a].hasOwnProperty(m)){var h={};for(b=b.firstChild;b;){if("custompropertyvalue"==b.nodeName){c=
b.getAttributeNode("variablename");var n=c.nodeValue;c=b.getAttributeNode("value");h[n]=c.nodeValue}b=b.nextSibling}this.ob[a]||(this.ob[a]={});this.ob[a][m]=h}};e.prototype.Dn=function(a){var b=a.getAttributeNode("variablename"),c=b.nodeValue.toString();b=a.getAttributeNode("variabletype");var m=Number(b.nodeValue);b=a.getAttributeNode("propertytype");var h=Number(b.nodeValue);b=a.getAttributeNode("defaultvalue");var n;b&&(n=b.nodeValue.toString());this.Ga[c]={Od:m,ji:h,Tk:n}};e.prototype.Ah=function(a){return a?
this.Tg[a]?this.Tg[a]:this.ag():this.Sg};e.prototype.ko=function(a,b){""!==a||this.Gd||(a="node1");a||(a=this.ra);return this.Kf.hasOwnProperty(a)&&this.Kf[a].hasOwnProperty(b)?this.lj(y.jc.bl(this.Kf[a][b],this.Ga[b].Od),this.Ga[b].Od):null};e.prototype.Jp=function(a,b,c){c="string"===typeof c?c:y.jc.Zn(c,this.Ga[b].Od);this.Kf[a][b]!=c&&(this.Kf[a][b]=c,this.H("varchanged_"+b,{}))};e.prototype.il=function(a){a=this.Ah(a);var b=[];""!=a.latitude&&0!=a.latitude&&0!=a.longitude&&(b.push(a.latitude),
b.push(a.longitude));return b};e.prototype.lo=function(a){for(var b=[],c=0;c<this.$a.length;c++){var m=this.$a[c],h=this.Ah(m);h&&h.tags.includes(a)&&b.push(m)}return b};e.prototype.ds=function(a){return this.Ah(a).title};e.prototype.$r=function(a,b){var c=-1;a=this.il(a);b=this.il(b);if(2==a.length&&2==b.length){c=Math.PI/180*(b[0]-a[0]);var m=Math.PI/180*(b[1]-a[1]);a=Math.sin(c/2)*Math.sin(c/2)+Math.sin(m/2)*Math.sin(m/2)*Math.cos(Math.PI/180*a[0])*Math.cos(Math.PI/180*b[0]);c=12742E3*Math.atan2(Math.sqrt(a),
Math.sqrt(1-a))}return c};e.prototype.bc=function(a,b,c){var m;for(m=0;m<this.R.Ja.length;m++){var h=this.R.Ja[m];if(h.time==a&&h.qb==b&&(!c||h.td==c))return h}return!1};e.prototype.gj=function(a,b){var c;for(c=0;c<b.Ja.length;c++)if(0==b.Ja[c].time&&b.Ja[c].qb==a)return b.Ja[c];return!1};e.prototype.no=function(a,b,c){for(a=Math.floor(a);!this.bc(a,b,c)&&0<a;)a--;return a};e.prototype.io=function(a){var b,c=1E5,m=a,h=!1;for(b=0;b<this.R.Ja.length;b++){var n=this.R.Ja[b];n.qb==a.qb&&n.td==a.td&&n.time>
a.time&&n.time<c&&(m=this.R.Ja[b],c=m.time,h=!0)}return h?m:!1};e.prototype.zr=function(a){for(var b=[],c=0;c<this.R.Ja.length;c++){var m=this.R.Ja[c];if(m.time<=a&&4==m.qb){for(var h=!1,n=0;n<b.length;n++)if(b[n].td==this.R.Ja[c].td){b[n].time<m.time?b.splice(n,1):h=!0;break}h||b.push(m)}}return b};e.prototype.Vn=function(a,b,c){var m=new y.Nc(a.time,a.value),h=new y.Nc(b.time,b.value),n=(c-a.time)/(b.time-a.time);if(0!=a.type||0!=b.type&&3!=b.type)if(3==a.type)c=a.value;else{n=new y.Nc;var p=new y.Nc,
r=b.time-a.time;0==a.type?p.init(a.time+.3*r,a.value):p.init(a.af,a.bf);0==b.type||3==b.type?n.init(b.time-.3*r,b.value):n.init(b.Ze,b.$e);a=new y.Nc;a.yk(m,h,p,n,c);c=a.y}else a=new y.Nc,a.Yd(m,h,n),c=a.y;return c};e.prototype.al=function(a,b,c,m){for(var h=0;h<this.xa.length;h++)if(this.xa[h].cb&&0==this.xa[h].cb.indexOf("__FlyIn"))return this.xa[h];h=new y.Rm;h.cb="__FlyIn";h.Re=this.pan.m;h.xi=this.u.m;h.fe=this.fov.m;h.wi=this.Z();h.ge=this.Bh();a?(h.Xf=!1,h.gf=!1,h.speed=this.D.Xg,h.Ld=b,h.he=
c,h.Hg=m):(h.Xf=!0,h.gf=!0,h.speed=this.Ea.speed,this.Ea.Ad.nq?(h.Ld=this.Ea.Ad.pan,h.he=this.Ea.Ad.u,h.Hg=this.Ea.Ad.fov,h.ge=this.Ea.Ad.pb):(h.Ld=this.pan.Ha,h.he=this.u.Ha,h.Hg=this.fov.Ha));return this.Sn(h)};e.prototype.Sn=function(a){var b=new y.Sm;b.cb=a.cb;b.Xe="";b.Ja=[];for(var c=a.wi!=a.ge&&-1!=a.ge;-180>a.Ld;)a.Ld+=360;for(;180<a.Ld;)a.Ld-=360;var m=a.Ld-a.Re;if(360==this.pan.max-this.pan.min&&!this.hb()){for(;-180>m;)m+=360;for(;180<m;)m-=360}var h=a.he-a.xi,n=a.Hg-a.fe,p=Math.round(Math.sqrt(m*
m+h*h+n*n)/a.speed*.33);c&&(p=Math.max(10,p));b.length=p;if(a.hf){var r=Math.ceil(.7*p);r=Math.min(15,r);r=Math.max(5,r);b.length=p+r;var t=.33*r}var w=a.Hg,z=p,C=0,F=p-1;if(c){var E=a.fe;var D=4==a.ge?120:this.zh(a.ge);n=w-a.fe;var A=new y.Nc(0,a.fe),G=new y.Nc(p,w),J=new y.Nc,H=new y.Nc;H.init(p/3,a.fe+n/3);J.init(2*p/3,w-n/3);if(E>D)for(;C<=p&&E>D;)E=new y.Nc,E.yk(A,G,H,J,C),E=E.y,C++;else C=1;C>=.8*p&&(z=C=Math.round(.8*p));0==C&&(C=1);D=4==a.wi?120:this.zh(a.wi);E=a.Hg;if(E>D)for(;F>C&&E>D;)E=
new y.Nc,E.yk(A,G,H,J,F),E=E.y,F--}A=new y.ed;A.time=0;A.qb=0;A.value=a.Re;A.type=1;A.af=p/3;A.bf=a.Xf?a.Re:a.Re+m/3;b.Ja.push(A);A=new y.ed;A.time=0;A.qb=1;A.value=a.xi;A.type=1;A.af=p/3;A.bf=a.Xf?a.xi:a.xi+h/3;b.Ja.push(A);A=new y.ed;A.time=0;A.qb=2;A.value=a.fe;A.type=1;A.af=p/3;A.bf=a.Xf?a.fe:a.fe+n/3;b.Ja.push(A);A=new y.ed;A.time=0;A.qb=3;A.value=a.wi;A.type=0;A.Gb=0;b.Ja.push(A);c&&(A=new y.ed,A.time=C,A.qb=3,A.value=a.ge,A.type=0,A.Gb=F-C,b.Ja.push(A));A=new y.ed;A.time=p;A.qb=0;A.value=a.Re+
m;A.type=1;A.Ze=2*p/3;A.$e=a.gf&&!a.hf?A.value:A.value-m/3;a.hf&&(A.af=p+t,A.bf=A.value+t/p*m);b.Ja.push(A);A=new y.ed;A.time=p;A.qb=1;A.value=a.he;A.type=1;A.Ze=2*p/3;A.$e=a.gf&&!a.hf?a.he:a.he-h/3;a.hf&&(A.af=p+t,A.bf=A.value+t/p*h);b.Ja.push(A);A=new y.ed;A.time=z;A.qb=2;A.value=w;A.type=1;A.Ze=2*z/3;A.$e=a.gf?w:w-n/3;b.Ja.push(A);a.hf&&(A=new y.ed,A.time=p+r,A.qb=0,A.value=a.Re+m,A.type=1,A.Ze=p+r-t,A.$e=a.Re+m,b.Ja.push(A),A=new y.ed,A.time=p+r,A.qb=1,A.value=a.he,A.type=1,A.Ze=p+r-t,A.$e=a.he,
b.Ja.push(A));this.xa.push(b);return b};e.prototype.kv=function(){this.A.j&&this.A.j.play()};e.prototype.lv=function(){this.A.j&&(this.A.j.pause(),this.A.j.currentTime=0)};e.prototype.jv=function(){this.A.j&&this.A.j.pause()};e.prototype.wu=function(a){this.A.j&&(0>a&&(a=0),a>this.A.j.duration&&(a=this.A.j.duration-.1),this.A.j.currentTime=a,this.update())};e.prototype.ys=function(){return this.A.j?this.A.j.currentTime:0};e.prototype.xs=function(){if(this.A.j)return this.A.j};e.prototype.vu=function(a){if(this.A.j){var b=
!this.A.j.paused&&!this.A.j.ended,c=this.A.j.currentTime;this.A.j.pause();this.A.j.src=isNaN(parseInt(a,10))?String(a):this.A.src[parseInt(a,10)];b&&(this.A.j.onloadedmetadata=function(){this.currentTime=c;this.play();this.onloadedmetadata=null});this.A.j.currentTime=c}};e.prototype.pr=function(){this.Kl=!0};e.prototype.js=function(){var a={};a.currentNode=this.dj();a.position={pan:this.pan.m,tilt:this.u.m,fov:this.fov.m,projection:this.Z()};for(var b=a.variables={},c=0,m=Object.keys(this.Sb);c<m.length;c++){var h=
m[c];this.Sb[h].zo||"undefined"!==this.ll(h)&&((b[h]={}).value=this.ll(h))}b=a.hsprops={};c=0;for(m=Object.keys(this.ob);c<m.length;c++){h=m[c];for(var n=b[h]={},p=0,r=Object.keys(this.ob[h]);p<r.length;p++)for(var t=r[p],w=n[t]={},z=0,C=Object.keys(this.ob[h][t]);z<C.length;z++){var F=C[z];w[F]=this.el(h,t,F)}}b=a.polyhotspots=[];for(c=0;c<this.J.length;c++)"poly"==this.J[c].type&&(m=this.J[c],h={},h.id=m.id,h.bordercolor=m.Yb,h.borderalpha=m.Xb,h.backgroundcolor=m.Wb,h.backgroundalpha=m.Vb,b.push(h));
return a};e.prototype.fu=function(a){if(a.hasOwnProperty("position")){var b=a.position;this.pan.m=b.pan;this.u.m=b.tilt;this.fov.m=b.fov;this.rb(b.projection)}b=0;for(var c=Object.keys(a.variables);b<c.length;b++){var m=c[b];this.Pe(m,a.variables[m].value)}b=0;for(c=Object.keys(a.hsprops);b<c.length;b++){m=c[b];for(var h=a.hsprops[m],n=0,p=Object.keys(h);n<p.length;n++)for(var r=p[n],t=h[r],w=0,z=Object.keys(t);w<z.length;w++){var C=z[w];this.im(m,r,C,t[C])}}for(b=0;b<a.polyhotspots.length;b++)for(c=
a.polyhotspots[b],m=0;m<this.J.length;m++)"poly"==this.J[m].type&&this.J[m].id==c.id&&(this.J[m].Yb=c.bordercolor,this.J[m].Xb=c.borderalpha,this.J[m].Vb=c.backgroundalpha,this.J[m].Wb=c.backgroundcolor);return this.ub=!0};return e}();y.jc=f})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=O;window.ggHasWebGL=X;window.pano2vrPlayer=ggP2VR.jc;var Z=ggP2VR.jc.prototype;Z._=Z.Va;Z.setContainer=Z.$t;Z.setLanguage=Z.jm;Z.getLanguage=Z.Pr;Z.addTranslations=Z.Zg;Z.getProjectTranslations=Z.ns;Z.getVersion=Z.so;
Z.readConfigString=Z.Vl;Z.readConfigUrl=Z.mp;Z.readConfigUrlAsync=Z.Mt;Z.readConfigXml=Z.np;Z.openUrl=Z.Ml;Z.openNext=Z.pd;Z.goBack=Z.Gs;Z.setMargins=Z.du;Z.addListener=Z.addListener;Z.on=Z.addListener;Z.removeEventListener=Z.removeEventListener;Z.off=Z.removeEventListener;Z.detectBrowser=Z.Bn;Z.initWebGL=Z.Rc;Z.getPercentLoaded=Z.hs;Z.setBasePath=Z.Zt;Z.getBasePath=Z.Xn;Z.setViewerSize=Z.Mp;Z.getViewerSize=Z.Bs;Z.updateViewerSizeNow=Z.hc;Z.setSkinObject=Z.pu;Z.changeViewMode=Z.cr;Z.getViewMode=Z.zs;
Z.changePolygonMode=Z.mn;Z.setPolygonMode=Z.mn;Z.getPolygonMode=Z.ls;Z.showOnePolyHotspot=Z.Op;Z.hideOnePolyHotspot=Z.wo;Z.changePolyHotspotColor=Z.br;Z.setPolyHotspotHandcursor=Z.gu;Z.toggleOnePolyHotspot=Z.Su;Z.changeViewState=Z.dr;Z.getViewState=Z.As;Z.setRenderFlags=Z.iu;Z.getRenderFlags=Z.os;Z.setMaxTileCount=Z.Hp;Z.updatePanorama=Z.Fi;Z.isTouching=Z.Io;Z.getIsMobile=Z.hl;Z.setIsMobile=Z.cu;Z.getHasTouch=Z.ao;Z.getIsTour=Z.Or;Z.getNodesCount=Z.es;Z.getIsAutorotating=Z.Lr;Z.getIsLoading=Z.Nr;
Z.getIsLoaded=Z.fj;Z.getIsTileLoading=Z.co;Z.getLastActivity=Z.Qr;Z.getPan=Z.mf;Z.getPanNorth=Z.Vd;Z.getPanDest=Z.gs;Z.getPanN=Z.hj;Z.setPan=Z.de;Z.setPanNorth=Z.Vj;Z.changePan=Z.Ri;Z.changePanLog=Z.ln;Z.getTilt=Z.gg;Z.getTiltDest=Z.ss;Z.setTilt=Z.ee;Z.changeTilt=Z.Si;Z.changeTiltLog=Z.nn;Z.getFov=Z.Dd;Z.getFovDest=Z.Gr;Z.setFov=Z.Ab;Z.setFovMode=Z.gm;Z.changeFov=Z.Dk;Z.changeFovLog=Z.Qi;Z.getVFov=Z.Nb;Z.setVFov=Z.si;Z.getHFov=Z.dl;Z.setHFov=Z.hm;Z.getDFov=Z.cl;Z.setDFov=Z.em;Z.getRoll=Z.kj;
Z.setRoll=Z.zg;Z.setPanTilt=Z.lm;Z.setPanTiltFov=Z.yg;Z.setDefaultView=Z.Bp;Z.setLocked=Z.setLocked;Z.setLockedMouse=Z.Fp;Z.setLockedKeyboard=Z.Ep;Z.getLockedKeyboard=Z.Sr;Z.setLockedWheel=Z.Gp;Z.moveTo=Z.moveTo;Z.moveToEx=Z.Dj;Z.moveToDefaultView=Z.gt;Z.moveToDefaultViewEx=Z.ht;Z.addHotspotElements=Z.Xm;Z.playSound=Z.ae;Z.playPauseSound=Z.jp;Z.playStopSound=Z.Kt;Z.pauseSound=Z.ci;Z.activateSound=Z.Jq;Z.soundGetTime=Z.Du;Z.soundSetTime=Z.Fu;Z.soundSetPlaybackRate=Z.Eu;Z.setMediaVisibility=Z.eu;
Z.isPlaying=Z.isPlaying;Z.stopSound=Z.$j;Z.setVolume=Z.setVolume;Z.changeVolume=Z.er;Z.mute=Z.lt;Z.unmute=Z.Yu;Z.toggleMuted=Z.Ru;Z.getHasSounds=Z.Ir;Z.getSoundsPermitted=Z.ps;Z.startAutoplayMedia=Z.Iu;Z.removeHotspots=Z.sp;Z.getHotspotsVisible=Z.bo;Z.getHotspotPropValue=Z.el;Z.setHotspotPropValue=Z.im;Z.getCustomPropertyDefaultValue=Z.Er;Z.getCurrentPerspective=Z.lf;Z.addHotspot=Z.Lq;Z.updateHotspot=Z.$u;Z.removeHotspot=Z.Nt;Z.setActiveHotspot=Z.Oe;Z.getPointHotspotIds=Z.ks;Z.getHotspot=Z.Jr;
Z.setFullscreen=Z.Sj;Z.toggleFullscreen=Z.fk;Z.enterFullscreen=Z.rr;Z.exitFullscreen=Z.exitFullscreen;Z.getIsFullscreen=Z.Mr;Z.startAutorotate=Z.Ju;Z.stopAutorotate=Z.Mu;Z.toggleAutorotate=Z.Qu;Z.pauseAutorotate=Z.Jt;Z.resumeAutorotate=Z.St;Z.setAutorotateNodeFilter=Z.Yt;Z.startAnimation=Z.Sp;Z.resumeAnimation=Z.Rt;Z.createLayers=Z.vn;Z.removePanorama=Z.Df;Z.getScreenResolution=Z.qo;Z.getMaxScreenResolution=Z.ho;Z.getNodeIds=Z.jo;Z.getNodeUserdata=Z.Ah;Z.getNodeUserdataPropValue=Z.ko;
Z.setNodeUserdataPropValue=Z.Jp;Z.getNodeLatLng=Z.il;Z.getNodeTitle=Z.ds;Z.getNodeDistance=Z.$r;Z.getCurrentNode=Z.dj;Z.getNextNode=Z.Zr;Z.getPrevNode=Z.ms;Z.getLastVisitedNode=Z.Rr;Z.getStartNode=Z.qs;Z.getNodesWithTag=Z.lo;Z.getCurrentPointHotspots=Z.Dr;Z.getPositionAngles=Z.ij;Z.getPositionRawAngles=Z.mo;Z.nodeVisited=Z.nt;Z.clearVisitedNodes=Z.gr;Z.setElementIdPrefix=Z.au;Z.videoPanoPlay=Z.kv;Z.videoPanoStop=Z.lv;Z.videoPanoPause=Z.jv;Z.getVideoPanoTime=Z.ys;Z.setVideoPanoTime=Z.wu;
Z.getVideoPanoObject=Z.xs;Z.setVideoPanoSource=Z.vu;Z.getMediaObject=Z.Xr;Z.getMediaBufferSourceObject=Z.Wr;Z.registerVideoElement=Z.op;Z.disableSoundLoading=Z.pr;Z.setCrossOrigin=Z.setCrossOrigin;Z.setProjection=Z.rb;Z.getProjection=Z.Z;Z.changeProjection=Z.Ek;Z.changeProjectionEx=Z.Ek;Z.changeLensflares=Z.ar;Z.setTransition=Z.ru;Z.getMapType=Z.Vr;Z.getMapDetails=Z.Ur;Z.getNodeMapCoords=Z.bs;Z.getNodeMapCoordsInPercent=Z.cs;Z.getMapContainingNode=Z.Tr;Z.getMapsContainingNode=Z.fo;Z.getMapIDs=Z.eo;
Z.getFloorplanIDs=Z.Fr;Z.getFirstMap=Z.$n;Z.getFirstFloorplan=Z.ej;Z.hasMap=Z.Ms;Z.hasFloorplan=Z.Ls;Z.addVariable=Z.Oq;Z.setVariableOptions=Z.Lp;Z.setVariableValue=Z.Pe;Z.getVariableValue=Z.ll;Z.setSuperCookie=Z.qu;Z.getGyroAvailable=Z.Hr;Z.setUseGyro=Z.su;Z.getUseGyro=Z.ts;Z.getOS=Z.fs;Z.getBrowser=Z.Br;Z.getBrowserTheme=Z.Cr;Z.triggerEvent=Z.H;Z.requestRedraw=Z.Pt;Z.getWebGlContext=Z.Cs;Z.getHasTouch=Z.ao;Z.updateViewerSizeNow=Z.hc;Z.getApiVersion=Z.Ar;Z.setApiVersion=Z.Xt;Z.getInertia=Z.Kr;
Z.setInertia=Z.bu;Z.getZoomCenterCursor=Z.Ds;Z.setZoomCenterCursor=Z.xu;Z.getPlayerState=Z.js;Z.setPlayerState=Z.fu;Z.getQueryParameter=Z.getQueryParameter;Z.setQueryParameter=Z.hu;Z.enterVR=Z.Yf;Z.exitVR=Z.Zf;Z.toggleVR=Z.eq;Z.isInVR=Z.mg;Z.hasVR=Z.qf;Z.getVRDisplayName=Z.vs;Z.getVRCamera=Z.us;Z.getVRRenderer=Z.ws;Z.setVRFrameBufferScaleFactor=Z.tu;Z.getSkinGroup=Z.kl;
