//////////////////////////////////////////////////////////////////////
// Pano2VR 7.0.10/20025 HTML5/CSS3 & WebGL Panorama Player          //
// License: Dimitrios Chiotis                                       //
// (c) 2024, Garden Gnome Software, https://ggnome.com              //
//////////////////////////////////////////////////////////////////////

var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(z,x,v){if(z==Array.prototype||z==Object.prototype)return z;z[x]=v.value;return z};function ba(z){z=["object"==typeof globalThis&&globalThis,z,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var x=0;x<z.length;++x){var v=z[x];if(v&&v.Math==Math)return v}throw Error("Cannot find global object");}var ca=ba(this);
function da(z,x){if(x)a:{var v=ca;z=z.split(".");for(var f=0;f<z.length-1;f++){var e=z[f];if(!(e in v))break a;v=v[e]}z=z[z.length-1];f=v[z];x=x(f);x!=f&&null!=x&&aa(v,z,{configurable:!0,writable:!0,value:x})}}da("Array.prototype.includes",function(z){return z?z: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 z(x,v){z=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 z(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");z(x,v);x.prototype=null===v?Object.create(v):(f.prototype=v.prototype,new f)}}();
function p(){var z="perspective",x=["Webkit","Moz","O","ms","Ms"],v;for(v=0;v<x.length;v++)"undefined"!==typeof document.documentElement.style[x[v]+"Perspective"]&&(z=x[v]+"Perspective");"undefined"!==typeof document.documentElement.style[z]?"webkitPerspective"in document.documentElement.style?(z=document.createElement("style"),x=document.createElement("div"),v=document.head||document.getElementsByTagName("head")[0],z.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",v.appendChild(z),
x.id="ggswhtml5",document.documentElement.appendChild(x),v=5===x.offsetHeight,z.parentNode.removeChild(z),x.parentNode.removeChild(x)):v=!0:v=!1;return v}function O(){var z;if(z=!!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"));z=!!v}catch(f){z=!1}return z}var ggP2VR;
(function(z){var x=function(){function e(a){this.o=null;this.ze=this.wo=this.Na=!1;this.pc=!0;this.qd=!1;this.zb=this.Oa=this.Ka=0;this.fov=70;this.Kj=this.Ba=0;this.autoplay=this.jg=this.sf=!1;this.id="";this.u=this.pan=0;this.o=a;this.Qc=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.Jm=function(a){var b=
"",c=this.o,h=!0;if(c.uj){var m=new z.Ua(0,0,-100);m.Ka(-this.u*Math.PI/180);m.Oa(this.pan*Math.PI/180);m.Oa(-c.pan.m*Math.PI/180);m.Ka(c.u.m*Math.PI/180);m.zb(c.W.m*Math.PI/180);.01<=m.z&&(h=!1)}c.Oe&&(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;m=this.j.videoWidth;
var n=this.j.videoHeight;if(0==m||0==n)m=640,n=480;0<this.qc&&(m=this.qc);0<this.Qc&&(n=this.Qc);0<m&&0<n&&(this.j.width=m,this.j.height=n,this.j.style.width=m+"px",this.j.style.height=n+"px");0<this.fov&&(a=m/(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("+-m/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/m,c.C.height/n)+") "),b+="translate3d("+-m/2+"px,"+-n/2+"px,0px) ");this.Hs!=b&&(this.Hs=b,this.j.style[c.Bd]=b,this.j.style.visibility=h&&this.pc&&(!this.sf||this.ze||this.Na)?"visible":"hidden",this.ze&&this.wo==this.Na&&(this.j.style[c.bc]="all 0s linear 0s"),this.wo=this.Na)};e.prototype.Hf=function(a){this.j&&(this.j.style.visibility=a?"visible":"hidden")};e.prototype.le=function(){var a=
this.o;a.oa?(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.Ne=function(){this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=null};e.prototype.Td=function(){};return e}();z.vv=x;var v=function(e){function a(b){b=e.call(this,b)||this;b.ua=!1;b.jk=[];b.$p=!1;b.stopped=!1;b.muted=!1;b.ap=!1;b.Mg=!1;b.Zk=!1;b.Rl=!1;b.Pd=!1;b.Zb=null;b.eh=null;b.zi=0;b.Af=
0;b.vg=!1;b.Ql=!1;b.j=null;b.url=[];b.loop=0;b.level=1;b.Dc=0;b.mode=1;b.bj=10;b.Eb=0;b.Lg=0;b.wa=1;b.bd=0;b.cd=0;b.dd=0;b.ed=0;b.ug=-1;return b}__extends(a,e);a.prototype.Gm=function(){var b=this,c=b.j.play();if(void 0!==c)c.then(function(){b.We()})["catch"](function(){b.j.pause();b.$p&&(b.j.muted=!0,b.j.play())})};a.prototype.Vp=function(){this.ua&&this.stopped?this.stopped=!1:0==this.loop?this.ua?(this.Zb=null,this.Sd()):this.j.play():0<this.fb?(this.fb--,this.ua||(this.j.currentTime=0),this.Zk&&
(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.ua?(this.Zb=null,this.Sd()):this.j.play())):this.ua&&(this.Zb=null,this.vg=!1)};a.prototype.We=function(){var b=this.o;b.G("Sound: Add WebAudio "+this.id);this.Pd=!1;var c=b.ga;c&&(this.ua||7==this.mode||(b.G("Sound: Create source element "+this.id),this.source=c.createMediaElementSource(this.j)),2==this.mode||3==this.mode||5==this.mode?(b.G("Sound: Create directional "+
this.id),this.Ud=c.createChannelSplitter(2),this.vb=c.createGain(),this.Kb=c.createGain(),this.Lb=c.createGain(),this.Mb=c.createGain(),this.ih=c.createChannelMerger(2),this.ua||this.source.connect(this.Ud),this.Ud.connect(this.vb,0),this.Ud.connect(this.Kb,0),this.Ud.connect(this.Lb,1),this.Ud.connect(this.Mb,1),this.vb.connect(this.ih,0,0),this.Kb.connect(this.ih,0,1),this.Lb.connect(this.ih,0,0),this.Mb.connect(this.ih,0,1),this.ih.connect(c.destination),1==this.ug&&(b.G("Sound: Switch to Mono"+
this.id),this.xm())):7!=this.mode&&(b.G("Create gain Node "+this.id),this.Jb=c.createGain(),this.ua||this.source.connect(this.Jb),this.Jb.connect(c.destination)))};a.prototype.xm=function(){1!=this.ug||this.Pd||!this.Ud||2!=this.mode&&3!=this.mode&&5!=this.mode||(this.Ud.connect(this.Lb,0),this.Ud.connect(this.Mb,0))};a.prototype.ri=function(){var b=this.o.ga;this.Na||this.Rl||(this.vb?(this.vb.gain.setValueAtTime(this.bd,b.currentTime),this.Mb.gain.setValueAtTime(this.ed,b.currentTime),this.Kb.gain.setValueAtTime(this.cd,
b.currentTime),this.Lb.gain.setValueAtTime(this.dd,b.currentTime)):this.Jb&&this.Jb.gain.setValueAtTime((this.bd+this.ed)/2,b.currentTime+1))};a.prototype.Mp=function(b){var c=this.o.ga;(-1==b?this.muted:1!=b)?this.muted&&(this.muted=this.j.muted=!1,this instanceof f||!(this.fb&&0<this.fb||0==this.loop)||this.o.be(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.di(this.id)))};a.prototype.ik=function(){if(!this.Pd||4==this.mode||6==this.mode){var b=this.o,c=this.o.ga;if((this.j||this.ua)&&!this.muted){var h,m=this.pan-b.pan.m;for(h=this.u-b.u.m;-180>m;)m+=360;for(;180<m;)m-=360;var n=this.Dc,q=this.bj;0==q&&(q=.01);0>q&&(q=b.fov.m);this.jc||(this.jc=new z.Ua,this.jc.Pn(this.pan,this.u));0!=this.mode&&1!=this.mode||
!c||this.Jb&&this.Jb.gain.setValueAtTime(this.level*b.ba*this.wa,c.currentTime);if(2==this.mode&&c){var r=.5*Math.cos(m*Math.PI/180)+.5;this.bd=Math.sqrt(r)*this.wa*this.level*b.ba;this.ed=Math.sqrt(r)*this.wa*this.level*b.ba;this.cd=Math.sqrt(1-r)*this.wa*this.level*b.ba;this.dd=Math.sqrt(1-r)*this.wa*this.level*b.ba;this.ri()}if(3==this.mode){m=0>m?m<-this.Eb?m+this.Eb:0:m>this.Eb?m-this.Eb:0;var t=this.level;h=Math.abs(h);h=h<this.Lg?0:h-this.Lg;var w=1-h/q;if(Math.abs(m)>q||0>w)r=t*n*b.ba,c?(this.bd=
r*this.wa,this.ed=r*this.wa,this.dd=this.cd=0,this.ri()):this.j.volume=t*n*b.ba;else if(r=1-Math.abs(m/q),c){var y=t*(n+(1-n)*w*r)*b.ba;r=t*n*b.ba;0<=m?(this.bd=y*this.wa,this.ed=r*this.wa):(this.bd=r*this.wa,this.ed=y*this.wa);2*Math.abs(m)<q?(r=1-Math.abs(2*m)/q,y=t*(n+(1-n)*w*r)*b.ba,r=.5*t*(1-n)*w*(1-r)*b.ba,0<=m?(this.ed=y*this.wa,this.dd=r*this.wa,this.cd=0):(this.bd=y*this.wa,this.cd=r*this.wa,this.dd=0)):(r=1-(Math.abs(2*m)-q)/q,y=.5*t*(1-n)*w*r*b.ba,0<=m?(this.dd=y*this.wa,this.cd=0):(this.cd=
y*this.wa,this.dd=0));this.ri()}else this.j.volume=t*(n+(1-n)*w*r)*b.ba}4==this.mode&&(Math.abs(m)<this.Eb&&Math.abs(h)<this.Lg?this.Mg||(this.Mg=!0,this.fb=this.loop-1,b.we||(this.j.play(),this.Pd&&this.We())):this.Mg=!1);5==this.mode&&(h=180*Math.acos(b.Qk.Nj(this.jc))/Math.PI,h<this.Eb?c?(this.bd=this.level*b.ba*this.wa,this.ed=this.level*b.ba*this.wa,this.dd=this.cd=0,this.ri()):this.j.volume=this.level*b.ba:c?(h<this.Eb+q?(m=0>m?m>-this.Eb?0:m+this.Eb:m<this.Eb?0:m-this.Eb,y=1-Math.max(h-this.Eb,
0)/q,r=Math.max(1-Math.abs(m)*Math.cos(this.u*Math.PI/180)/q,0),0<m?(this.bd=this.level*(y*(1-this.Dc)+this.Dc)*b.ba*this.wa,this.ed=this.level*(y*r*(1-this.Dc)+this.Dc)*b.ba*this.wa,this.cd=0,this.dd=this.level*y*(1-r)*b.ba*this.wa):(this.bd=this.level*(y*r*(1-this.Dc)+this.Dc)*b.ba*this.wa,this.ed=this.level*(y*(1-this.Dc)+this.Dc)*b.ba*this.wa,this.cd=this.level*y*(1-r)*b.ba*this.wa,this.dd=0)):(y=this.level*this.Dc*b.ba,this.bd=y*this.wa,this.ed=y*this.wa,this.dd=this.cd=0),this.ri()):(h-=this.Eb,
h<q&&0<q?(r=1-Math.abs(h/q),this.j.volume=this.level*(n+(1-n)*r)*b.ba):this.j.volume=n*b.ba));6==this.mode&&(h=180*Math.acos(b.Qk.Nj(this.jc))/Math.PI,Math.abs(h)<this.Eb?this.Mg||(this.Mg=!0,this.fb=this.loop-1,this.ua?this.vg||this.Sd():this.j.play()):this.Mg=!1)}}};a.prototype.xn=function(){var b=this;b.Zb=this.o.ga.createBufferSource();b.Zb.addEventListener("ended",function(){b.Vp()},!1);2==b.mode||3==b.mode||5==b.mode?b.Zb.connect(b.Ud):b.Zb.connect(b.Jb)};a.prototype.Ot=function(b){var c=this,
h=this.o.ga;c.xn();this.o.G("createBufferSoundSource()");h.decodeAudioData(b,function(m){c.ug=m.numberOfChannels;1==c.ug&&c.xm();c.eh=m;c.Zb.buffer=m;c.o.G("audio Data decoded");c.Ql&&(c.Sd(),c.Ql=!1)})};a.prototype.Sd=function(){this.o.G("play buffer sound: "+this.id);var b=this.o.ga,c=this.Af;this.eh?(null==this.Zb&&(this.xn(),this.Zb.buffer=this.eh),this.zi=b.currentTime-c,this.Af=0,this.vg=!0,this.stopped=!1,this.Zb.start(0,c),this.o.G("buffer Source started")):(this.o.G("bufferSoundPlay() -> no audio buffer -> playWhenReady"),
this.Ql=!0)};a.prototype.Bk=function(){var b=this.o.ga.currentTime-this.zi;this.Rf();this.Af=b};a.prototype.Rf=function(){this.Zb&&this.vg&&(this.stopped=!0,this.Zb.disconnect(),this.Zb.stop(0),this.Zb=null);this.zi=this.Af=0;this.vg=!1};a.prototype.Zq=function(){var b=this.o.ga;return this.Af?this.Af:this.zi?b.currentTime-this.zi:0};a.prototype.$q=function(b){this.Rf();this.Af=b;this.Sd()};a.prototype.addElement=function(){var b=-1,c=this,h=this.o,m=this.o.ga;try{for(var n=!1,q=0;q<h.X.length;q++)h.X[q].id==
c.id&&(b=q,null==h.X[q].j&&!h.X[q].ua||h.X[q].url.join()!=c.url.join()||h.X[q].loop!=c.loop||h.X[q].mode!=c.mode||(n=!0,h.X[q].pan=c.pan,h.X[q].u=c.u,h.X[q].level=c.level,h.X[q].Dc=c.Dc,h.X[q].bj=c.bj,h.X[q].Eb=c.Eb,h.X[q].Lg=c.Lg));if(n)h.G("Keep playing "+c.id);else{if(0<=b){var r=h.X[b];if(null!=r.j||r.ua)if(m&&h.Za.enabled)h.Za.Fi.push(r),1!=h.D.da&&2!=h.D.da&&6!=h.D.da&&h.Za.Kn(r);else{try{r.ua?r.Bk():r.j.pause()}catch(y){h.G(y)}try{r.Ne()}catch(y){h.G(y)}}}m&&(this.Pd=!0);c.j=document.createElement("audio");
c.j.crossOrigin=h.crossOrigin;c.j.setAttribute("class","ggmedia");h.Ee&&c.j.setAttribute("id",h.Ee+c.id);for(q=0;q<c.url.length;q++)if(n=void 0,n=document.createElement("source"),""!=c.url[q]&&"#"!=c.url[q]){n.crossOrigin=h.crossOrigin;var t=h.hb(h.Va(c.url[q]));n.setAttribute("src",t);c.j.appendChild(n);c.jk.push(t)}c.j.volume=c.level*h.ba;if(0<c.j.childNodes.length&&(h.$.appendChild(c.j),c.j.addEventListener("ended",function(){c.Vp()},!1),m&&(c.Zk=!1,0==c.loop&&c.source&&c.source.mediaElement&&
(c.source.mediaElement.loop=!0),h.kv))){var w=new XMLHttpRequest;w.open("GET",h.hb(c.url[0]),!0);w.responseType="arraybuffer";w.onload=function(){var y=w.response;m.decodeAudioData(y,function(C){c.ug=C.numberOfChannels;c.ua=!0;c.We();c.Ot(y);1==c.ug&&c.xm()})};w.send()}1<=c.loop&&(c.fb=c.loop-1);0<=b?h.X[b]=c:h.X.push(c);c.ik();this.o.Xc||(1!=c.mode&&2!=c.mode&&3!=c.mode&&5!=c.mode||!(0<=c.loop)||m&&h.Za.enabled||(c.ua||(c.j.autoplay=!0,c.Gm()),c.autoplay=!0),0==c.mode&&0<=c.loop&&(c.autoplay=!0,
c.Gm()))}}catch(y){this.o.G(y)}};a.prototype.Td=function(){for(var b=this.o.isPlaying(this.id),c=0,h=!1,m=0;m<this.j.children.length&&!(this.url.length<=c);m++){var n=this.j.children[m];if("SOURCE"==n.nodeName){var q=this.o.hb(this.o.Va(this.url[c]));this.jk[c]!=q&&(b&&!h&&this.o.di(this.id),n.setAttribute("src",q),this.jk[c]=q,h=!0);c++}}h&&(this.j.load(),b&&this.o.be(this.id))};a.prototype.Ne=function(){try{this.o.G("Remove Snd:"+this.id),this.ua||(this.o.$.removeChild(this.j),this.j=null)}catch(b){this.o.G(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.ap=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.Lg=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);z.ne=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.sf=!1;b.jg=!1;return b}__extends(a,e);a.prototype.Be=function(){1!=this.Ba&&4!=this.Ba||this.pf(!this.Na);2==this.Ba&&
this.o.mp(this.id)};a.prototype.pf=function(b){var c=this.o,h=c.ga;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.Mf+8E4).toString(),this.j.style[this.o.bc]="all 1s ease 0s",this.j.muted=!1,this.o.isPlaying(this.id)||c.be(this.id);else{this.j.style.pointerEvents="none";this.j.style.cursor="default";this.j.style.zIndex=c.Mf.toString();this.j.style[this.o.bc]="all 1s ease 0s";this.o.isPlaying(this.id)&&(0==this.Kj?c.$j(this.id):
2==this.Kj&&(this.j.muted=!0));this.Rl=!0;var m=this;setTimeout(function(){m.Rl=!1},1E3)}if(h&&(2==this.mode||3==this.mode||5==this.mode)&&(h=h.currentTime,this.vb&&this.Mb&&this.Kb.gain&&this.Kb&&this.Lb)){var n=this.vb.gain.value,q=this.Mb.gain.value,r=this.Kb.gain.value,t=this.Lb.gain.value;this.Na?(this.vb.gain.linearRampToValueAtTime(n,h),this.vb.gain.linearRampToValueAtTime(this.level*c.ba,h+1),this.Mb.gain.linearRampToValueAtTime(q,h),this.Mb.gain.linearRampToValueAtTime(this.level*c.ba,h+
1),this.Kb.gain.linearRampToValueAtTime(r,h),this.Kb.gain.linearRampToValueAtTime(0,h+1),this.Lb.gain.linearRampToValueAtTime(t,h),this.Lb.gain.linearRampToValueAtTime(0,h+1)):(this.vb.gain.linearRampToValueAtTime(n,h),this.vb.gain.linearRampToValueAtTime(this.bd,h+1),this.Mb.gain.linearRampToValueAtTime(q,h),this.Mb.gain.linearRampToValueAtTime(this.ed,h+1),this.Kb.gain.linearRampToValueAtTime(r,h),this.Kb.gain.linearRampToValueAtTime(this.cd,h+1),this.Lb.gain.linearRampToValueAtTime(t,h),this.Lb.gain.linearRampToValueAtTime(this.dd,
h+1))}this.ze=!0;this.o.pq()}2==this.Ba&&(b?this.o.be(this.id):this.o.di(this.id))};a.prototype.Ce=function(){this.ze=!1;this.j.style[this.o.bc]="none"};a.prototype.lv=function(){0==this.loop?this.j.play():0<this.fb?(this.fb--,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.pd=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.Qc=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.$p=1==Number(c.nodeValue)};a.prototype.addElement=function(){var b=this,c=this.o,h=this.o.ga;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.Ee&&b.j.setAttribute("id",c.Ee+b.id);if(c.Ii)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.Sm(),function(){b.Ce()},!1),b.j.addEventListener("transitionend",function(){b.Ce()},!1);var m=void 0;for(m=0;m<b.url.length;m++){var n=void 0;n=document.createElement("source");n.crossOrigin=c.crossOrigin;var q=c.hb(c.Va(b.url[m]));n.setAttribute("src",q);b.j.appendChild(n);b.jk.push(q)}""!=b.poster&&(b.j.poster=
c.hb(c.Va(b.poster)),0>b.loop&&(b.j.preload="none"));b.pd&&""!=b.pd&&(b.j.style.pd="url('"+c.hb(b.pd)+"')",b.j.style.webkitMaskImage="url('"+c.hb(b.pd)+"')",b.j.style.maskSize="100% 100%",b.j.style.webkitMaskSize="100% 100%");b.j.volume=b.level*c.ba;1<=b.loop&&(b.fb=b.loop-1);h&&(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.Xc&&(b.j.muted=!0),b.Gm());c.U.push(this);c.Ii?c.$.appendChild(b.j):(b.j.style.position="absolute",
b.qc&&(b.j.width=b.qc),b.Qc&&(b.j.height=b.Qc),c.ea.appendChild(b.j));b.j.addEventListener("ended",function(){b.lv()},!1)}catch(r){c.G(r)}};a.prototype.Td=function(){this.j.poster=this.o.hb(this.o.Va(this.poster));e.prototype.Td.call(this)};a.prototype.registerElement=function(b,c){this.qd=!0;this.j=c;this.id=b;this.level=1;this.o.U.push(this)};a.prototype.Ne=function(){var b=this.o;b.Ii&&(b.S.deleteTexture(this.texture),this.texture=0);this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=
null};return a}(v);z.Ym=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.Qc=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.pd=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.Qc=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.sf=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.Ce=function(){this.ze=!1;this.j.style[this.o.bc]="none";this.sf&&!this.Na&&(this.j.style.visibility="hidden")};a.prototype.Be=function(){1!==this.Ba&&4!==this.Ba||this.pf(!this.Na)};a.prototype.pf=function(b){var c=this.o;if(1===this.Ba||4===this.Ba)this.Na=b,this.sf&&(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.Mf+8E4).toString(),this.j.style[c.bc]="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.Mf.toString(),this.j.style[c.bc]="all 1s ease 0s",this.sf&&(this.j.style.opacity="0.0")),this.ze=!0,c.Im()};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(h){h.stopPropagation()});c.Ee&&b.j.setAttribute("id",c.Ee+b.id);b.j.ondragstart=function(){return!1};if(1===b.Ba||4===b.Ba)b.j.addEventListener(c.Sm(),function(){b.Ce()},!1),b.j.addEventListener("transitionend",function(){b.Ce()},!1);b.j.setAttribute("src",c.hb(c.Va(b.url)));b.qc&&(b.j.width=b.qc);b.Qc&&(b.j.height=b.Qc);c.Xa.push(b);b.j.style.position="absolute";b.pd&&""!=b.pd&&(b.j.style.pd="url('"+c.hb(b.pd)+"')",b.j.style.webkitMaskImage=
"url('"+c.hb(b.pd)+"')",b.j.style.maskSize="100% 100%",b.j.style.webkitMaskSize="100% 100%");c.ea.appendChild(b.j)}catch(h){c.G("Error addimage:"+h)}};a.prototype.Td=function(){this.j.setAttribute("src",this.o.hb(this.o.Va(this.url)))};return a}(x);z.Hq=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.Qc=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.Ce=function(){this.ze=!1;this.j.style[this.o.bc]="none"};a.prototype.Be=function(){1!==this.Ba&&4!==this.Ba||this.pf(!this.Na)};a.prototype.pf=function(b){var c=this.o;if(1===this.Ba||4===this.Ba)this.Na=b,this.sf&&(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.Mf+8E4).toString(),this.j.style[c.bc]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.cursor="default",
this.j.style.zIndex=c.Mf.toString(),this.j.style[c.bc]="all 1s ease 0s"),this.ze=!0,c.Im()};a.prototype.addElement=function(){var b=this,c=this.o;try{b.j=document.createElement("div");this.mq();b.j.setAttribute("style","max-width:none;");b.j.setAttribute("class","ggmedia");c.Ee&&b.j.setAttribute("id",c.Ee+b.id);if(1===b.Ba||4===b.Ba)b.j.addEventListener(c.Sm(),function(){b.Ce()},!1),b.j.addEventListener("transitionend",function(){b.Ce()},!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(h){c.G("Error addwebelement:"+h)}};a.prototype.mq=function(){var b=this.j.innerHTML,c=this.o.Va(this.code);c!=b&&(this.j.innerHTML=c)};a.prototype.Td=function(){this.mq()};return a}(x);z.Jq=v;x=function(e){function a(b){b=e.call(this,b)||this;b.jn=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.jn=
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);z.Iq=x;x=function(){function e(a){this.o=a;this.type="empty";this.rm=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.rk=!1;this.j=null;this.Vl=this.Ul=this.Qb=this.fc=this.lb=this.Ca=this.distance=this.u=this.pan=0;this.visible=!0;this.Yb=
a.L.Yb;this.Wb=a.L.Wb;this.Xb=a.L.Xb;this.Vb=a.L.Vb;this.De=a.L.De;this.jd="";this.yd=this.gf=0;this.Kf=!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.rm;this.obj=this.j;this.customimage=this.jd;this.customimagewidth=this.gf;this.customimageheight=this.yd;this.use3D=this.Kf;this.distance3D=this.Yi;
this.j&&this.j.__div&&(this.div=this.j.__div)};e.prototype.Qu=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.rm=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.rk=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.De=1==Number(b.nodeValue);if(b=a.getAttributeNode("customimage"))this.jd=this.o.$n()+b.nodeValue;if(b=a.getAttributeNode("customimagewidth"))this.gf=Number(b.nodeValue);if(b=
a.getAttributeNode("customimageheight"))this.yd=Number(b.nodeValue);if(b=a.getAttributeNode("use3D"))this.Kf=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 h=b[c].split("/");if(2==h.length){var m={pan:0,u:0};m.pan=Number(h[0]);m.u=Number(h[1]);this.vertices.push(m)}}}"vertex"==a.nodeName&&(m={pan:0,u:0},b=a.getAttributeNode("pan"),m.pan=
1*(b?Number(b.nodeValue):0),b=a.getAttributeNode("tilt"),m.u=1*(b?Number(b.nodeValue):0),this.vertices.push(m));a=a.nextSibling}this.$f()};return e}();z.Li=x})(ggP2VR||(ggP2VR={}));
(function(z){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.Zd=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.Yq=function(f,e,a,b,c){var h=new v;h.Zd(f,a,c);f=new v;f.Zd(a,b,c);a=new v;a.Zd(b,e,c);e=new v;e.Zd(h,f,c);h=new v;h.Zd(f,a,c);f=new v;f.Zd(e,h,c);this.x=f.x;this.y=f.y};v.prototype.zk=function(f,e,a,b,c){var h=new v,m=.5,n=.25;do{h.Yq(f,e,a,b,m);var q=h.x-c;m=0<q?m-n:m+n;n/=2}while(.01<Math.abs(q));
this.x=h.x;this.y=h.y};return v}();z.Oc=x})(ggP2VR||(ggP2VR={}));
(function(z){var x=function(){function v(f,e,a,b,c){this.x=f;this.y=e;this.z=a;this.Nd=b;this.jc=c}v.prototype.init=function(f,e,a,b,c){this.x=f;this.y=e;this.z=a;this.Nd=b;this.jc=c};v.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+") - ("+this.Nd+","+this.jc+")"};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.Xt=function(){var f=this.y;this.y=-this.z;this.z=f};v.prototype.Wt=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.Yt=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.Bp=function(){var f=this.x;this.x=-this.y;this.y=f};v.prototype.de=function(f){this.Ka(f*Math.PI/180)};v.prototype.Ff=function(f){this.Oa(f*Math.PI/180)};v.prototype.Gf=function(f){this.zb(f*
Math.PI/180)};v.prototype.clone=function(){return new v(this.x,this.y,this.z,this.Nd,this.jc)};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.Pn=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.Uq=function(){return 180*Math.atan2(-this.x,-this.z)/Math.PI};v.prototype.Vq=function(){return 180*Math.asin(this.y/this.length())/Math.PI};v.prototype.Zd=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.jc=f.jc*a+e.jc*(1-a)};return v}();z.Ua=x})(ggP2VR||(ggP2VR={}));
(function(z){var x=function(){function v(){this.Hp()}v.prototype.Hp=function(){this.tc=1;this.Mc=this.uc=this.Pb=0;this.vc=1;this.wc=this.dc=this.Nc=0;this.ec=1};v.prototype.clone=function(f){this.tc=f.tc;this.Pb=f.Pb;this.uc=f.uc;this.Mc=f.Mc;this.vc=f.vc;this.Nc=f.Nc;this.dc=f.dc;this.wc=f.wc;this.ec=f.ec};v.prototype.ou=function(f){var e=Math.cos(f);f=Math.sin(f);this.tc=1;this.Mc=this.uc=this.Pb=0;this.vc=e;this.Nc=-f;this.dc=0;this.wc=f;this.ec=e};v.prototype.pu=function(f){var e=Math.cos(f);
f=Math.sin(f);this.tc=e;this.Pb=0;this.uc=f;this.Mc=0;this.vc=1;this.Nc=0;this.dc=-f;this.wc=0;this.ec=e};v.prototype.qu=function(f){var e=Math.cos(f);f=Math.sin(f);this.tc=e;this.Pb=-f;this.uc=0;this.Mc=f;this.vc=e;this.wc=this.dc=this.Nc=0;this.ec=1};v.prototype.lu=function(f){this.ou(f*Math.PI/180)};v.prototype.mu=function(f){this.pu(f*Math.PI/180)};v.prototype.nu=function(f){this.qu(f*Math.PI/180)};v.prototype.de=function(f){this.od||(this.od=new v,this.Ie=new v);this.od.lu(f);this.Ie.clone(this);
this.multiply(this.od,this.Ie)};v.prototype.Ff=function(f){this.od||(this.od=new v,this.Ie=new v);this.od.mu(f);this.Ie.clone(this);this.multiply(this.od,this.Ie)};v.prototype.Gf=function(f){this.od||(this.od=new v,this.Ie=new v);this.od.nu(f);this.Ie.clone(this);this.multiply(this.od,this.Ie)};v.prototype.multiply=function(f,e){this.tc=f.tc*e.tc+f.Pb*e.Mc+f.uc*e.dc;this.Pb=f.tc*e.Pb+f.Pb*e.vc+f.uc*e.wc;this.uc=f.tc*e.uc+f.Pb*e.Nc+f.uc*e.ec;this.Mc=f.Mc*e.tc+f.vc*e.Mc+f.Nc*e.dc;this.vc=f.Mc*e.Pb+
f.vc*e.vc+f.Nc*e.wc;this.Nc=f.Mc*e.uc+f.vc*e.Nc+f.Nc*e.ec;this.dc=f.dc*e.tc+f.wc*e.Mc+f.ec*e.dc;this.wc=f.dc*e.Pb+f.wc*e.vc+f.ec*e.wc;this.ec=f.dc*e.uc+f.wc*e.Nc+f.ec*e.ec};v.prototype.mt=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.Mc+a*this.vc+b*this.Nc;f.z=e*this.dc+a*this.wc+b*this.ec};return v}();z.Vm=x})(ggP2VR||(ggP2VR={}));
(function(z){z.ma={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],h=x[4],m=x[5],n=x[6],q=x[7],r=x[8],t=x[9],w=x[10],y=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],V=v[12],W=v[13],X=v[14];v=v[15];f[0]=D*e+A*h+G*r+J*C;f[1]=D*a+A*m+G*t+J*F;f[2]=D*b+A*n+G*w+J*E;f[3]=D*c+A*q+G*y+J*x;f[4]=H*e+I*h+L*r+
K*C;f[5]=H*a+I*m+L*t+K*F;f[6]=H*b+I*n+L*w+K*E;f[7]=H*c+I*q+L*y+K*x;f[8]=M*e+Q*h+R*r+S*C;f[9]=M*a+Q*m+R*t+S*F;f[10]=M*b+Q*n+R*w+S*E;f[11]=M*c+Q*q+R*y+S*x;f[12]=V*e+W*h+X*r+v*C;f[13]=V*a+W*m+X*t+v*F;f[14]=V*b+W*n+X*w+v*E;f[15]=V*c+W*q+X*y+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],h=x[2],m=x[3],n=x[4],q=x[5],
r=x[6],t=x[7],w=x[8],y=x[9],C=x[10],F=x[11];f[0]=b;f[1]=c;f[2]=h;f[3]=m;f[4]=n;f[5]=q;f[6]=r;f[7]=t;f[8]=w;f[9]=y;f[10]=C;f[11]=F;f[12]=b*e+n*a+w*v+x[12];f[13]=c*e+q*a+y*v+x[13];f[14]=h*e+r*a+C*v+x[14];f[15]=m*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 h=Math.sin(v),m=Math.cos(v),n=1-m;v=x[0];c=x[1];var q=x[2],r=x[3],t=x[4],w=x[5],y=x[6],C=x[7],F=x[8],E=x[9],D=x[10],A=x[11],G=a*a*n+m,J=b*a*n+f*h,H=f*a*n-b*h,I=a*b*n-f*h,L=b*b*n+m,K=f*b*n+a*h,M=a*f*n+b*h;a=b*f*n-a*h;b=f*f*n+m;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]=q*G+y*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]=q*I+y*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]=q*M+y*a+D*b;e[11]=r*M+C*a+A*b;return e},Ar:function(x,v,f,e,a,b,c){c||(c=z.ma.create());var h=v-x,m=e-f,n=b-a;c[0]=2*a/h;c[1]=0;c[2]=0;c[3]=0;c[4]=0;c[5]=2*a/m;c[6]=0;c[7]=0;c[8]=(v+x)/h;c[9]=(e+f)/m;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 z.ma.Ar(-v,v,-x,x,f,e,a)},Bv:function(x,v,f,e,a,b,c){c||(c=z.ma.create());var h=v-x,m=e-f,n=b-a;c[0]=2/h;c[1]=0;c[2]=0;c[3]=0;c[4]=0;c[5]=2/m;c[6]=0;c[7]=0;c[8]=0;c[9]=0;c[10]=-2/n;c[11]=0;c[12]=-(x+v)/h;c[13]=-(e+f)/m;c[14]=-(b+a)/n;c[15]=1;return c}}})(ggP2VR||(ggP2VR={}));
(function(z){var x=function(){function v(f){this.ya=z.ma.create();this.Db=z.ma.create();this.Xd=0;this.eb=[];this.Nh=!1;this.wm=this.$k=this.Zl=1;this.Vf=1E6;this.Vi=[!1,!1,!1,!1,!1,!1];this.Xj=!1;this.Tk=[];this.uh=!1;this.Wm=8;this.dt=new z.Vm;this.ue=[];this.Om=null;this.o=f;this.M=f.M;if(f.md||f.Kh)f.M.Dm=2}v.prototype.Jh=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.ld(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.ka=f.getAttribLocation(this.O,"aVertexPosition");f.enableVertexAttribArray(this.O.ka);this.O.La=f.getAttribLocation(this.O,"aTextureCoord");f.enableVertexAttribArray(this.O.La);this.O.Je=f.getUniformLocation(this.O,"uPMatrix");this.O.ai=f.getUniformLocation(this.O,"uMVMatrix");this.O.yg=f.getUniformLocation(this.O,"uSampler");this.O.vk=f.getUniformLocation(this.O,"uZoffset");e=f.createShader(f.VERTEX_SHADER);this.ld(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.ld(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.ce=f.createProgram();this.pg(this.ce,e,a);this.ce.ka=f.getAttribLocation(this.ce,"aVertexPosition");f.enableVertexAttribArray(this.ce.ka);a=f.createShader(f.VERTEX_SHADER);this.ld(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.ld(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.xh=f.createProgram();this.pg(this.xh,a,e)}};v.prototype.rj=function(){var f=this.o,e=f.S;if(e){var a=e.createShader(e.FRAGMENT_SHADER);var b=this.kl(13);this.ld(a,b);b=e.createShader(e.VERTEX_SHADER);
this.ld(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.sp=e.createProgram();this.pg(this.sp,b,a);a=e.createShader(e.FRAGMENT_SHADER);b=this.kl(4);this.ld(a,b);b=e.createShader(e.VERTEX_SHADER);this.ld(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.tp=e.createProgram();this.pg(this.tp,b,a);a=e.createShader(e.FRAGMENT_SHADER);b=this.kl(f.A.format);this.ld(a,b);b=e.createShader(e.VERTEX_SHADER);this.ld(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.vp=e.createProgram();this.pg(this.vp,b,a);this.Pj||(this.Pj=e.createBuffer())}else this.o.G("No WebGL to initRemapShader!")};v.prototype.ld=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)),U&&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.kl=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.uo(e.Z());e.Z()!=e.Ic()&&0!=e.Ic()?(e=this.uo(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.uh?a+" gl_FragColor = vec4(0.5,0.5,0,1);\n":a+"  gl_FragColor = texture2D(tileTexture, texc);\n",a+="} else {\n",a=this.uh?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.uo=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.Do=function(f){var e,a,b=this.o,c=this.o.S;this.Pk=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.Pk);var h=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];for(e=0;12>e;e++)2>e%3&&(h[e]*=f);c.bufferData(c.ARRAY_BUFFER,new Float32Array(h),c.STATIC_DRAW);this.ff=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.ff);var m=[1,0,0,0,0,1,1,1];c.bufferData(c.ARRAY_BUFFER,new Float32Array(m),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);h=[];n=[];m=[];var q=new z.Ua;for(f=0;6>f;f++){var r=f%3;var t=3>f?1:0;for(a=0;4>a;a++){q.x=-1;q.y=-1;q.z=1;for(e=0;e<a;e++)q.Bp();m.push((0>q.x?.33:0)+.33*r,(0>q.y?0:.5)+.5*t);if(4>f)for(e=0;e<f;e++)q.Yt();else 5==f?q.Xt():q.Wt();h.push(q.x,q.y,q.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(h),c.STATIC_DRAW);
b.A.Bi=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,b.A.Bi);c.bufferData(c.ARRAY_BUFFER,new Float32Array(m),c.STATIC_DRAW);b.A.qj=c.createBuffer();c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,b.A.qj);c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(n),c.STATIC_DRAW);this.Ls=c.createBuffer();this.Ks=c.createBuffer()};v.prototype.rl=function(f){var e=this;return function(){try{if(f.rt)return;var a=e.o.S;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);var b=!1;null!=f.xf&&f.xf.complete?f.yo||(a.bindTexture(a.TEXTURE_2D,
f),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f.xf),b=f.yo=!0):null!=f.Cf&&f.Cf.complete&&(a.bindTexture(a.TEXTURE_2D,f),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f.Cf),b=!0);b&&(f.loaded=!0,e.o.D.$c&&("previewtrack"==e.o.D.delay||"videopano"==e.o.D.delay&&!e.o.A.j)&&e.np()&&e.o.Zj(null));a.bindTexture(a.TEXTURE_2D,null);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,0)}catch(c){e.o.G(c)}e.o.update(2)}};v.prototype.Eo=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.Xd++;b.Cf=null;b.xf=null;b.yo=!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.nh[a]){var c=new Image;c.crossOrigin=f.crossOrigin;c.src=f.hb(f.nh[a]);b.Cf=c;c.addEventListener&&c.addEventListener("load",
this.rl(b),!1);f.wd.push(c)}this.eb.push(b)}for(a=0;6>a;a++)f.mh[a]&&(c=new Image,c.crossOrigin=f.crossOrigin,c.src=f.hb(f.mh[a]),c.addEventListener?c.addEventListener("load",this.rl(this.eb[a]),!1):c.onload=this.rl(this.eb[a]),this.eb[a].xf=c,f.wd.push(c));for(a=0;a<f.U.length;a++)f.U[a].qd||(f.U[a].texture=e.createTexture(),f.Xd++,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.Xd++;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.rv=
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.xe&&(f.Sc(0),f.ic());if(f.S){var e=f.S;this.gk();e.clear(e.DEPTH_BUFFER_BIT);e.useProgram(this.O);this.Cg(0);e.uniform1i(this.O.yg,0);e.enableVertexAttribArray(this.O.ka);e.enableVertexAttribArray(this.O.La);e.bindBuffer(e.ARRAY_BUFFER,this.ff);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.vk,1E-4);e.vertexAttribPointer(this.O.ka,3,e.FLOAT,!1,0,0);z.ma.identity(this.Db);z.ma.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);e.uniformMatrix4fv(this.O.Je,!1,this.Db);for(f=0;6>f;f++)this.Cg(f),e.bindBuffer(e.ARRAY_BUFFER,this.Pk),e.vertexAttribPointer(this.O.ka,3,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.ff),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.yg,0),e.uniformMatrix4fv(this.O.ai,!1,this.ya),e.uniformMatrix4fv(this.O.Je,!1,this.Db),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0))}};v.prototype.gk=function(){var f=this.o,e=this.M;e.N.Lj&&6<e.N.Lj.length&&(e=parseInt(e.N.Lj),f.S.clearColor((e>>16&255)/255,(e>>8&255)/255,(e>>0&255)/255,1))};v.prototype.Cg=function(f,e){void 0===e&&(e=1);var a=this.o;z.ma.identity(this.ya);z.ma.rotate(this.ya,e*-a.W.m*Math.PI/180,[0,
0,1]);z.ma.rotate(this.ya,e*-a.u.m*Math.PI/180,[1,0,0]);-1==e?z.ma.rotate(this.ya,-a.pan.m*Math.PI/180,[0,1,0]):z.ma.rotate(this.ya,(180-a.pan.m)*Math.PI/180,[0,1,0]);a.Ya&&(z.ma.rotate(this.ya,-a.Ya.pitch*Math.PI/180,[1,0,0]),z.ma.rotate(this.ya,a.Ya.W*Math.PI/180,[0,0,1]));4>f?z.ma.rotate(this.ya,-Math.PI/2*f,[0,1,0]):z.ma.rotate(this.ya,Math.PI/2*(5==f?1:-1),[1,0,0])};v.prototype.Ru=function(f){var e=this;return function(){e.Tk.push(f)}};v.prototype.qr=function(f){this.o.ub=!0;this.o.rh=!0;f.loaded=
!0;f.$l=0;f.Me=0;var e=this.o.S;this.Dn();e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);if(null!=f.N&&f.N.complete){f.Ob=e.createTexture();this.o.Xd++;e.bindTexture(e.TEXTURE_2D,f.Ob);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,f.N)}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.G(a)}}this.o.update(2)};v.prototype.Dn=function(){this.o.M.Ci&&this.o.M.Ci--};v.prototype.rr=function(){if(0<this.Tk.length){var f=this.Tk.shift();
this.qr(f)}};v.prototype.nt=function(f){var e=this;return function(){e.o.ub=!0;e.o.rh=!0;var a=e.M.N;try{if(null!=f&&f.complete){var b=a.levels[a.levels.length-1],c=a.jb;b.height=b.width=f.width-2*c;b.Y=b.ta=1;for(var h=0;6>h;h++){var m=new z.Zg;m.Fc=document.createElement("canvas");e.o.oa?(m.Fc.width=b.width+2*c,m.Fc.height=b.height+2*c):(m.Fc.width=a.V+2*c,m.Fc.height=a.V+2*c);m.An=m.Fc.getContext("2d");m.Fc.style[e.o.Bd+"Origin"]="0% 0%";m.Fc.style.overflow="hidden";m.Fc.style.position="absolute";
m.N=f;var n=b.width+2*c,q=b.height+2*c;m.An&&m.An.drawImage(f,0,h*q,n,q,0,0,n,q);if(e.o.oa&&e.o.S){var r=e.o.S;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1);m.Ob=r.createTexture();e.o.Xd++;r.bindTexture(r.TEXTURE_2D,m.Ob);try{r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,m.Fc)}catch(t){e.o.G(t)}r.bindTexture(r.TEXTURE_2D,null);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,0)}e.o.Og&&(m.Fc.xv=-1,e.o.ea.insertBefore(m.Fc,e.o.ea.firstChild));b.Ma[h]=m}b.loaded=!0;e.o.D.$c&&("previewtrack"==e.o.D.delay||"videopano"==
e.o.D.delay&&!e.o.A.j)&&e.o.Zj(null)}}catch(t){e.o.G(t)}e.o.update(2)}};v.prototype.gq=function(f){var e=this;return function(){e.o.ub=!0;e.o.rh=!0;e.Dn();f.N=null}};v.prototype.pv=function(){var f=this.o,e=this.M,a=e.N,b=a.levels;f.xe&&(f.Sc(0),f.ic());if(f.S){var c=f.S;c.useProgram(this.O);this.gk();c.clear(c.DEPTH_BUFFER_BIT);c.enable(c.DEPTH_TEST);z.ma.identity(this.Db);z.ma.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);c.uniformMatrix4fv(this.O.Je,!1,this.Db);e.cv();e.Vo();var h=
e.Mn();var m=b.length-1;for(e.je=0;m>=h;){var n=b[m],q=1;m==b.length-1&&0==a.jb&&(q=a.V/(a.V-.5));for(var r=0;6>r;r++){var t=e.cube.bg[r];var w=t.fi;if(t.pc&&0<w.Ji&&0<w.qk&&0<w.scale||n.cache){t.ub=!1;t.Qf[m]||(t.Qf[m]={fx:0,fy:0,Id:0,Jd:0});var y=t.Qf[m];n.cache?(y.fx=0,y.fy=0,y.Id=n.Y-1,y.Jd=n.ta-1):e.us(n,w,y);w=!0;for(var C=y.fy;C<=y.Jd;C++)for(var F=y.fx;F<=y.Id;F++){var E=F+C*n.Y+r*n.Y*n.ta,D=n.Ma[E];D||(D=n.Ma[E]=new z.Zg,f.G("create simple "+m+", <"+E+">"));this.Zi()?D.N||(D.Me?D.Me--:(this.Aj(D,
n,e.Jg(r,m,F,C)),f.ub=!0)):e.je++;if(D.Ob){if(!D.hg){E=.5*m+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.jb;A[0]=Math.min((F+1)*a.V,n.width)+a.jb;A[7]=C*a.V-a.jb;A[1]=Math.min((C+1)*a.V,n.height)+a.jb;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?q*E*(-2*A[G]/n.width+1):1==G%3?q*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}y.So=w}}m--}for(r=
0;6>r;r++)if(t=e.cube.bg[r],t.pc)for(w=t.fi,this.Cg(r),c.uniform1i(this.O.yg,0),c.uniformMatrix4fv(this.O.Je,!1,this.Db),c.uniformMatrix4fv(this.O.ai,!1,this.ya),c.enableVertexAttribArray(this.O.ka),c.enableVertexAttribArray(this.O.La),c.bindBuffer(c.ARRAY_BUFFER,this.ff),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),m=h;m<=b.length-1;){n=b[m];if(t.pc&&0<w.Ji&&t.Qf[m]&&0<=t.Qf[m].fx){y=t.Qf[m];for(C=
y.fy;C<=y.Jd;C++)for(F=y.fx;F<=y.Id;F++)E=F+C*n.Y+r*n.Y*n.ta,(D=n.Ma[E])&&D.Ob&&(c.uniform1f(this.O.vk,1E-4*(F%2+C%2*2)),c.bindBuffer(c.ARRAY_BUFFER,D.hg),c.vertexAttribPointer(this.O.ka,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;y.So&&(m=b.length)}m++}this.am();f.rh=!1}};v.prototype.Zi=function(){return this.M.Ci<this.M.Dm};v.prototype.Aj=function(f,e,a){var b=this.M,c=this.o;b.Rs++;f.N=new Image;f.$l++;f.Me=1<<f.$l;f.N.onload=this.Ru(f);f.N.onerror=this.gq(f);f.N.onabort=this.gq(f);f.N.crossOrigin=c.crossOrigin;f.N.setAttribute("src",a);c.G("load "+a);e.cache&&c.wd.push(f.N);b.Ci++};v.prototype.xq=function(){var f=this.o,e=this.M,a=e.N;f.xe&&(f.Sc(0),f.ic());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.je=0;if(!this.Rc||this.Nh)0<a.levels.length?this.nr():this.pr();f.A.Tc?this.Ft():(b.enable(b.DEPTH_TEST),b.depthRange(0,1),b.depthFunc(b.LESS),this.Xj=!1,0<a.levels.length&&this.qv(),this.Rc&&!this.Xj&&this.Et())}};v.prototype.Au=function(f,e,a,b,c,h,m){var n=
this.o;c=this.M.N;var q=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;m&&(c=.2);this.uh&&(c=0);b=(t-r)*c;1<t&&(t=1);1<e&&(e=1);r-=b;a-=b;c=this.Wm;m=(t+b-r)/c;t=(e+b-a)/c;e={x:0,y:0};b={x:0,y:0};f.pl=0;var w=n.jj(),y=new z.Ua,C=this.dt;C.Hp();4>h?C.Ff(-90*h):C.de(5==h?90:-90);n.Ya&&(C.Gf(n.Ya.W),C.de(-n.Ya.pitch));C.Ff(-n.pan.m);C.de(n.u.m);C.Gf(n.W.m);for(h=0;h<=c;h++)for(var F=0;F<=c;F++){var E=2*(r+F*m)-1;var D=2*(a+h*t)-1;y.x=1*E;y.y=1*D;y.z=-1;y.normalize();
C.mt(y);E=this.so(y,e,n.Z());0!=n.Ic()&&1>w&&(D=this.so(y,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.pl++]=q.width/2+e.x*q.width/2;f.ig[f.pl++]=q.height/2-e.y*q.width/2}this.Bu(f,c)};v.prototype.so=function(f,e,a){var b=!0;switch(a){case 0:case 4:a=1/(f.z*this.Zl);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.wm);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.$k*Math.acos(-f.z)/a;if(2<a)return!1;e.x=c*f.x;e.y=-c*f.y}}return b};v.prototype.Bu=function(f,e){for(var a=this.o,b=[],c,h=f.Pa=0;h<e;h++)for(var m=0;m<e;m++){b[0]=h+m*(e+1);b[1]=h+1+m*(e+1);b[2]=h+(m+1)*(e+1);b[3]=h+1+(m+1)*(e+1);c=!0;for(var n=0;4>n;n++)isNaN(f.ig[2*b[0]])&&(c=!1);if(c){var q=!1,r=!1,t=!1,w=!1;for(n=0;4>n;n++){var y=f.ig[2*b[n]];y<a.C.width&&(r=!0);0<=y&&(q=!0);y=f.ig[2*b[n]+1];y<a.C.height&&(t=!0);0<=y&&(w=!0)}if(c=c&&r&&q&&t&&w)this.uh?(f.nb[f.Pa++]=b[0],f.nb[f.Pa++]=
b[1],f.nb[f.Pa++]=b[1],f.nb[f.Pa++]=b[3],f.nb[f.Pa++]=b[3],f.nb[f.Pa++]=b[2],f.nb[f.Pa++]=b[2],f.nb[f.Pa++]=b[0],f.nb[f.Pa++]=b[3],f.nb[f.Pa++]=b[0],f.nb[f.Pa++]=b[1],f.nb[f.Pa++]=b[2]):(f.nb[f.Pa++]=b[0],f.nb[f.Pa++]=b[3],f.nb[f.Pa++]=b[2],f.nb[f.Pa++]=b[0],f.nb[f.Pa++]=b[1],f.nb[f.Pa++]=b[3])}}};v.prototype.qv=function(){var f=this.o,e=this.M,a=e.N,b=a.levels;f.xe&&(f.Sc(0),f.ic());if(f.S){var c=f.S,h=this.tp;c.useProgram(h);this.Km(h);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);z.ma.identity(this.Db);z.ma.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);c.uniformMatrix4fv(c.getUniformLocation(h,"uPMatrix"),!1,this.Db);e.je=0;e.Vo();var m=e.Mn(),n=0;var q=b.length-1;for(var r={},t=b[q];t.Df&&0<q;)q--,t=b[q];for(var w=q,y=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(;q>=m;){var A={};t=b[q];var G=null;0<q&&(G=b[q-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 z.Zg,f.G("create "+ +q+", <"+D+">"));this.Au(I,t,E,F,Math.max(1,this.Wm>>w-q),C,0!=f.Ic());I.visible=0<I.Pa||t.cache;I.vj=3;I.Qh=Date.now();I.visible&&!I.Ob&&(J=!1,this.Zi()?I.N||(I.Me?I.Me--:(this.Aj(I,t,e.Jg(C,q,E,F)),f.ub=!0)):this.M.je++);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.G("Grrrr");R++;Q+=D}while(Q<E);K++;M+=L}while(M<F)}}}J&&(y=q,20>f.fov.m&&q<this.Vf&&(this.Xj=!0));r=A;q--}this.am();c.uniform1i(c.getUniformLocation(h,"tileTexture"),0);c.activeTexture(c.TEXTURE0);q=m;for(m=-1;q<=Math.min(y,this.Vf-1);){t=b[q];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));m!=C&&(m=C,this.hk(C,h));if(n>e.rg){f.G("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.jb)/a.V,w=(w+2*a.jb)/a.V,c.bindTexture(c.TEXTURE_2D,I.Ob),c.uniform2f(c.getUniformLocation(h,"uCanvasDimensions"),f.C.width,f.C.height),A=c.getUniformLocation(h,"srcScale"),c.uniform2f(A,.5*t.width/a.V/r,.5*t.height/a.V/w),
A=c.getUniformLocation(h,"srcOffset"),c.uniform2f(A,(.5*t.width+a.jb-a.V*E)/a.V/r,-(.5*t.height+a.jb-a.V*F)/a.V/w+1),A=c.getUniformLocation(h,"zOffset"),c.uniform1f(A,(q+1)/(b.length+5)),r=c.getAttribLocation(h,"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.Ls),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.Ks),c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(I.nb),c.DYNAMIC_DRAW),this.uh?0==q&&0==C&&c.drawElements(c.LINES,I.Pa,c.UNSIGNED_SHORT,0):c.drawElements(c.TRIANGLES,I.Pa,c.UNSIGNED_SHORT,0),n++)}q++}c.disable(c.CULL_FACE);
c.cullFace(c.FRONT_AND_BACK);f.rh=!1;c.disable(c.STENCIL_TEST)}};v.prototype.hk=function(f,e){var a=this.o.S;z.ma.identity(this.ya);this.Cg(f,-1);a.uniformMatrix4fv(a.getUniformLocation(e,"matRotate"),!1,this.ya)};v.prototype.Ft=function(){var f=this.o;if(f.S){var e=f.S,a=this.vp;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.Fg?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.df/(f.A.width/3),1-2*f.A.df/(f.A.height/2)));this.Km(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.Km=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.Zl=Math.tan(Math.min(e.fov.m,179)/2*Math.PI/180)*c;a.uniform1f(b,this.Zl);b=a.getUniformLocation(f,"fisheyeDistance");this.$k=180/(e.fov.m*Math.PI*c);a.uniform1f(b,this.$k);b=a.getUniformLocation(f,"stereoDistance");
this.wm=Math.tan(Math.min(e.fov.m,359)/4*Math.PI/180)*c;a.uniform1f(b,this.wm);b=a.getUniformLocation(f,"directionBlend");a.uniform1f(b,e.jj())};v.prototype.Et=function(){var f=this.o,e=f.S,a=this.sp;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.Km(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.Rc);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.pr=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,h=!1,m=0;6>m;m++)this.eb[m].xf.complete?
this.Vi[m]||(h=!0):b=!1,this.eb[m].Cf.complete||(c=!1);if(c||b)if(!c||b||!this.Rc||h){m=Math.round(f.Te/f.Kg);c=(f.Te-m)/2;f.G("paint cube single - isMain: "+b+" overlap: "+c);this.Vf=0;this.Rc||(this.Rc=e.createTexture());f.Xd++;e.bindTexture(e.TEXTURE_CUBE_MAP,this.Rc);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);h=document.createElement("canvas");h.width=m;h.height=
m;var n=h.getContext("2d");for(m=0;6>m;m++){var q=a[m];this.eb[q].xf.complete?this.Vi[q]||(n.drawImage(this.eb[q].xf,-c,-c),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,h),this.Vi[q]=!0):(n.drawImage(this.eb[q].Cf,-c,-c,f.Te,f.Te),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,h))}this.Nh=!b}};v.prototype.nr=function(){var f=this.o,e=this.M.N,a=e.levels,b=f.S,c;var h=a.length-1;if(!(0>h)){a[h].Df&&h--;var m=512;f.Mh&&(m=256);!f.xg&&2<=
f.devicePixelRatio&&(m=512);for((c=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&c<m&&(m=c);0<h&&a[h-1].width<=m;)h--;m=a[h];if(0!=m.Y){c=h;var n=this.ir(h);this.Nh&&n&&(this.Nh=!1);n||(h=a.length-1,m=a[h],n||(m.Df?(n=m.loaded,this.Il(h-1)&&(--h,n=!0)):n=this.Il(h)),this.Nh=!0);this.Il(c);if(n&&this.Vf>h){m=a[h];f.G("paint cube level "+h);this.Vf=h;a=e.jb;h=0<a||1<m.Y||1<m.ta;n=c=void 0;h&&(n=document.createElement("canvas"),n.width=m.width,n.height=m.height,2048>m.width&&(1500<m.width?(n.width=2048,
n.height=2048):700<m.width?(n.width=1024,n.height=1024):(n.width=512,n.height=512)),c=n.getContext("2d"));this.Rc=b.createTexture();f.Xd++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.Rc);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 q=[1,3,5,4,0,2];e=e.V;for(var r=0;6>r;r++){for(var t=0;t<m.ta;t++)for(var w=0;w<m.Y;w++){var y=w+t*m.Y+q[r]*m.Y*m.ta,C=m.Ma[y],F=C.N;C.Fc&&
(F=C.Fc);F?h?(y=n.width/m.width,c.drawImage(F,y*(w*e-a),y*(t*e-a),y*F.width,y*F.height)):b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,F):(f.G("WTF?!"),f.G(y),f.G(C))}h&&b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,n)}}}}};v.prototype.Il=function(f){var e=this.o,a=this.M,b=a.N.levels[f];if(0==b.Y)return!1;var c=!0;b.cache=!0;for(var h=0;6>h;h++)for(var m=0;m<b.ta;m++)for(var n=0;n<b.Y;n++){var q=n+m*b.Y+h*b.Y*b.ta,r=b.Ma[q];r||(r=b.Ma[q]=
new z.Zg);this.Zi()?r.N||(r.Me?r.Me--:(this.Aj(r,b,a.Jg(h,f,n,m)),e.ub=!0)):a.je++;r.Ob||(c=!1,e.ub=!0)}c&&(b.loaded=!0);return c};v.prototype.ir=function(f){f=this.M.N.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.Rc};v.prototype.np=function(){for(var f=0;6>f;f++)if(!this.eb[f].Cf.complete)return!1;return!0};v.prototype.am=function(){for(var f=
this.o,e=this.M,a=e.N.levels,b=f.S,c=Date.now(),h=a.length-1;0<=h;h--){var m=a[h];if(!m.cache)for(var n in m.Ma)if(m.Ma.hasOwnProperty(n)){var q=m.Ma[n];0<q.vj&&q.vj--;q.visible||0<q.vj?(q.visible&&(q.Qh=c),q=this.ue.indexOf(q),-1!==q&&this.ue.splice(q,1)):-1===this.ue.indexOf(q)&&(q.level=m,this.ue.push(q))}}if(this.ue.length>1.1*e.fq)for(this.ue.sort(function(r,t){return t.Qh-r.Qh});this.ue.length>e.fq;)q=this.ue.pop(),q.Ob&&(b.deleteTexture(q.Ob),f.Xd--,q.Ob=0),q.N=null,q.hg&&(b.deleteBuffer(q.hg),
q.hg=0),n=q.level.Ma.indexOf(q),f.G("delete <"+n+"> "+(c-q.Qh)),delete q.level.Ma[n]};v.prototype.gv=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.qd){z.ma.identity(this.ya);z.ma.rotate(this.ya,-f.W.m*Math.PI/180,[0,0,1]);z.ma.rotate(this.ya,-f.u.m*Math.PI/180,[1,0,0]);z.ma.rotate(this.ya,(180-f.pan.m)*Math.PI/180,[0,1,0]);z.ma.rotate(this.ya,b.pan*Math.PI/180,[0,1,0]);z.ma.rotate(this.ya,-b.u*Math.PI/180,[1,0,0]);z.ma.translate(this.ya,[0,0,1]);z.ma.rotate(this.ya,
b.zb*Math.PI/180,[0,0,1]);z.ma.rotate(this.ya,-b.Oa*Math.PI/180,[0,1,0]);z.ma.rotate(this.ya,b.Ka*Math.PI/180,[1,0,0]);var c=Math.tan(b.fov/2*Math.PI/180),h=b.aspect;h||(h=16/9);z.ma.scale(this.ya,[c,c/h,1]);z.ma.translate(this.ya,[0,0,-1]);e.bindBuffer(e.ARRAY_BUFFER,this.Pk);e.vertexAttribPointer(this.O.ka,3,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.ff);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.yg,0);e.uniformMatrix4fv(this.O.ai,!1,this.ya);e.uniformMatrix4fv(this.O.Je,!1,this.Db);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0)}}}};v.prototype.fv=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.xe&&(f.Sc(0),f.ic());if(f.S){var a=f.S;a.useProgram(this.O);z.ma.identity(this.Db);z.ma.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);a.uniformMatrix4fv(this.O.Je,!1,this.Db);this.Cg(0);a.uniform1i(this.O.yg,0);a.uniformMatrix4fv(this.O.Je,!1,this.Db);a.uniformMatrix4fv(this.O.ai,!1,this.ya);a.enableVertexAttribArray(this.O.ka);a.enableVertexAttribArray(this.O.La);a.bindBuffer(a.ARRAY_BUFFER,this.ff);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.vk,1E-4);a.vertexAttribPointer(this.O.ka,3,a.FLOAT,!1,0,0);a.bindTexture(a.TEXTURE_2D,f.A.texture);for(e=0;1>e;e++)this.Cg(0),a.bindBuffer(a.ARRAY_BUFFER,f.A.lk),a.vertexAttribPointer(this.O.ka,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,f.A.Bi),a.vertexAttribPointer(this.O.La,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,f.A.qj),a.uniform1i(this.O.yg,
0),a.uniformMatrix4fv(this.O.ai,!1,this.ya),a.uniformMatrix4fv(this.O.Je,!1,this.Db),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};v.prototype.ev=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.qd&&c.isRunning&&c.Gh!=c.j.currentTime&&(c.Gh=c.j.currentTime,!c.aspect&&0<c.j.videoHeight&&(c.aspect=c.j.videoWidth/c.j.videoHeight),f.Ii))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(m){f.G(m)}}if(a.j&&(b=Number(a.j.currentTime),a.Gh!=b)){a.Gh=b;try{var h=0<a.j.readyState;f.uj&&a.Tc&&(h=h&&0<a.j.currentTime);a.texture&&a.ng&&h&&(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.Cm=!0,f.update())}catch(m){f.G(m)}}};v.prototype.jp=function(){var f,e,a=this.o,b=this.o.S;a.tb.style.visibility="hidden";a.L.Ph!=
a.L.mode&&(a.L.Ph=a.L.mode);if((0<=a.L.mode||0<a.L.Rb.length)&&!a.D.Ei){var c=1;0>=a.L.mode&&(c=0);3==a.L.mode&&(c=a.L.Ca);for(f=0;f<a.K.length;f++){var h=a.K[f];if("poly"==h.type){var m=h.Bf,n=c;2==a.L.mode&&(n=h.Ca);var q=a.L.Rb.indexOf(h.id);-1!=q&&(n=a.L.Bc[q]);if(0<m.length){q=[];for(e=0;e<m.length;e++)q.push(m[e].fc),q.push(m[e].Qb),q.push(0);b.useProgram(this.ce);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.Om||(this.Om=
b.createBuffer());b.bindBuffer(b.ARRAY_BUFFER,this.Om);b.bufferData(b.ARRAY_BUFFER,new Float32Array(q),b.STATIC_DRAW);b.uniform2f(b.getUniformLocation(this.ce,"uCanvasDimensions"),a.C.width,a.C.height);m=b.getUniformLocation(this.ce,"uColor");e=h.Yb;b.uniform3f(m,(e>>16&255)/255,(e>>8&255)/255,(e&255)/255);var r=b.getUniformLocation(this.ce,"uAlpha");b.uniform1f(r,h.Xb*n);b.vertexAttribPointer(this.ce.ka,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,q.length/3);e=h.Wb;b.uniform3f(m,(e>>16&255)/255,
(e>>8&255)/255,(e&255)/255);b.uniform1f(r,h.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,q.length/3);b.colorMask(!0,!0,!0,!0);b.stencilFunc(b.EQUAL,1,1);b.stencilOp(b.ZERO,b.ZERO,b.ZERO);b.drawArrays(b.TRIANGLE_FAN,0,q.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.O)}}}}};v.prototype.dv=function(){var f=
this.o,e=this.M,a=e.N;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.xe&&(f.Sc(0),f.ic());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.xh);var c=b.getUniformLocation(this.xh,"uRect");b.uniform2f(b.getUniformLocation(this.xh,"uCanvasDimensions"),f.C.width,f.C.height);b.activeTexture(b.TEXTURE0);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,
this.xd);var h=b.getAttribLocation(this.xh,"aVertexPosition");b.disableVertexAttribArray(0);b.disableVertexAttribArray(1);b.disableVertexAttribArray(2);b.enableVertexAttribArray(h);b.bindBuffer(b.ARRAY_BUFFER,this.ff);b.vertexAttribPointer(h,2,b.FLOAT,!1,0,0);e.je=0;var m=100/f.fov.m;var n=a.width/a.height;h=f.C.height*m*n;m*=f.C.height;n=(f.pan.m/100/n-.5)*h+f.C.width/2;for(var q=(f.u.m/100-.5)*m+f.C.height/2,r,t,w,y=0;a.levels.length>=y+2&&a.levels[y+1].width>h;)y++;var C;var F=[];for(C=a.levels.length-
1;C>=y;){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=-q/m*(E.height/a.V);t=(-n+f.C.width)/h*(E.width/a.V);var A=(-q+f.C.height)/m*(E.height/a.V);D.fx=Math.min(Math.max(0,Math.floor(-n/h*(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 z.Zg,E.Ma[w]=A),this.Zi()?
A.N||(this.Aj(A,E,e.Jg(0,C,r,t)),f.ub=!0):e.je++,A.N&&A.N.complete||(G=!1),A.visible=!0;D.So=G;C--}for(C=a.levels.length-1;C>=y;){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.N&&A.N.complete&&(f=n+(-a.jb+a.V*r)*h/E.width,b.uniform4f(c,f,q+(-a.jb+a.V*t)*m/E.height,A.N.width*h/E.width,A.N.height*m/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.am()}};v.prototype.Ef=function(){var f=this.o.S;if(f&&this.eb)for(;0<this.eb.length;){var e=this.eb.pop();e.rt=!0;f.deleteTexture(e)}this.Rc&&(f.deleteTexture(this.Rc),this.Rc=null);this.Vf=1E6;this.Vi=[!1,!1,!1,!1,!1,!1]};return v}();z.Kq=x})(ggP2VR||
(ggP2VR={}));(function(z){var x=function(){return function(){this.fi={zh:1,Ah:1,Wh:0,Xh:0,Ji:0,qk:0,scale:1};this.pc=!0;this.Qf=[]}}();z.Gq=function(){return function(){var v;this.bg=Array(6);for(v=0;6>v;v++)this.bg[v]=new x}}()})(ggP2VR||(ggP2VR={}));
(function(z){z.Eq=function(){return function(){this.levels=[];this.Lj="0x000000";this.op=!1;this.Uo=this.To=.4;this.V=512;this.jb=1;this.Gl=0;this.Hl="";this.xp=this.height=this.width=0}}();z.Xm=function(){return function(){this.height=this.width=0;this.Df=this.cache=!1;this.ta=this.Y=0;this.loaded=!1;this.Ma=[]}}();z.Zg=function(){return function(){this.loaded=this.visible=!1;this.Me=this.$l=0;this.ig=[];this.pl=0;this.nb=[];this.vj=this.Qh=this.Pa=0}}()})(ggP2VR||(ggP2VR={}));
(function(z){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.jd){var c=e.jd;b.setAttribute("style","position: absolute; width: "+e.gf+"px; height: "+e.yd+"px; top: -"+e.yd/2+"px; left: -"+e.gf/2+"px; cursor: pointer; "+f.mb+"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.mb+"user-select: none; max-width: none;");b.setAttribute("src",c);b.ondragstart=function(){return!1};a.appendChild(b);c="position:absolute;"+(f.mb+"user-select: none;");c+=f.mb+"touch-callout: none;";c+=f.mb+"tap-highlight-color: rgba(0,0,0,0);";f.Lc&&!f.oa&&(c+=f.mb+"transform: translateZ(9999999px);");a.setAttribute("style",c);a.onclick=function(){f.Pe(e);f.Nl(f.Va(e.url),e.target);
f.ha&&f.ha.hotspotProxyClick&&f.ha.hotspotProxyClick(e.id,e.url);f.I("hsproxyclick",{id:e.id,url:e.url})};a.ondblclick=function(){f.ha&&f.ha.hotspotProxyDoubleClick&&f.ha.hotspotProxyDoubleClick(e.id,e.url);f.I("hsproxydblclick",{id:e.id,url:e.url})};var h=f.L.ck;if(h.enabled&&""!=e.title){var m=document.createElement("div");c="position:absolute;";c=e.jd?f.il()?c+("top: -"+(e.yd/2+20)+"px;"):c+("top: "+e.yd/2+"px;"):f.il()?c+"top:\t -50px;":c+"top:\t 20px;";c=h.rk?c+"white-space: pre-wrap;":c+"white-space: nowrap;";
c+=f.mb+"transform-origin: 50% 50%;";m.setAttribute("style",c+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;");m.style.color=this.o.pa(h.dk,h.bk);m.style.backgroundColor=h.background?this.o.pa(h.Wb,h.Vb):"transparent";m.style.border="solid "+this.o.pa(h.Yb,h.Xb)+" "+h.Pi+"px";m.style.borderRadius=h.Ak+"px";m.style.textAlign="center";0<h.width?(m.style.left=-h.width/2+"px",m.style.width=h.width+"px"):m.style.width="auto";m.style.height=0<h.height?h.height+"px":"auto";m.style.overflow=
"hidden";m.innerHTML=f.Va(e.title);m.classList.add("ggskin");m.classList.add("ggdefaulthotspot");a.addEventListener("mouseover",function(){0==h.width&&(m.style.left=-m.offsetWidth/2+"px");m.style.visibility="inherit";f.ha&&f.ha.hotspotProxyOver&&f.ha.hotspotProxyOver(e.id,e.url);f.I("hsproxyover",{id:e.id,url:e.url})});a.addEventListener("mouseout",function(){m.style.visibility="hidden";f.ha&&f.ha.hotspotProxyOut&&f.ha.hotspotProxyOut(e.id,e.url);f.I("hsproxyout",{id:e.id,url:e.url})});a.appendChild(m);
this.iq=m}a.addEventListener("mouseover",function(){f.Pe(e)});a.addEventListener("mouseout",function(){f.Pe(null)})}v.prototype.Is=function(){this.iq&&(this.iq.innerHTML=this.o.Va(this.P.title))};return v}();z.Aq=x})(ggP2VR||(ggP2VR={}));
(function(z){z.gd=function(){return function(){this.value=this.time=0;this.Nm="";this.cf=this.bf=this.af=this.$e=this.rb=this.type=this.Gb=0;this.td="";this.$m=0}}();z.Um=function(){return function(){this.Zu=this.Tq=this.length=0}}();z.Tm=function(){return function(){}}()})(ggP2VR||(ggP2VR={}));
(function(z){var x=function(){function v(f){this.o=f;this.enabled=!1;this.fh=1;this.Pf=0;this.type="crossdissolve";this.fd=this.da=this.Zc=0;this.uk=20;this.sk=90;this.tk=20;this.Yg=1;this.Xg=!1;this.Am=this.zm=this.bq=0;this.Ai=70;this.zq=0;this.Hb=this.yq=1;this.Wg=this.Vg=.5;this.pe=this.qe=!1;this.Rk=1}v.prototype.Jh=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.ka=f.getAttribLocation(this.za,"aVertexPosition");f.enableVertexAttribArray(this.za.ka);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.kb=f.createProgram();f.attachShader(this.kb,e);f.attachShader(this.kb,a);f.linkProgram(this.kb);f.getProgramParameter(this.kb,f.LINK_STATUS)||alert("Could not initialise shaders");this.kb.ka=f.getAttribLocation(this.kb,"aVertexPosition");f.enableVertexAttribArray(this.kb.ka);this.kb.La=f.getAttribLocation(this.kb,"aTextureCoord");f.enableVertexAttribArray(this.kb.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.ka=f.getAttribLocation(this.Ta,"aVertexPosition");f.enableVertexAttribArray(this.Ta.ka);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.ka=f.getAttribLocation(this.ab,"aVertexPosition");f.enableVertexAttribArray(this.ab.ka);this.ab.La=f.getAttribLocation(this.ab,"aTextureCoord");f.enableVertexAttribArray(this.ab.La)};v.prototype.Sc=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.Jf=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.Jf);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.Jf,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.wg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.wg);f.bufferData(f.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),f.STATIC_DRAW);return!0}return!1};v.prototype.Pl=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.ka,this.xb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.wg);e.vertexAttribPointer(this.za.La,2,e.FLOAT,!1,0,0);e.enableVertexAttribArray(this.za.ka);e.enableVertexAttribArray(this.za.La);
e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.Jf);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.Vg-.5)*Math.sqrt(f),h=.5+(this.Wg-.5)*Math.sqrt(f);0>c-.5/a&&(c=.5/a);0>h-.5/a&&(h=.5/a);1<c+.5/a&&(c=1-.5/a);1<h+.5/a&&(h=1-.5/a);e.uniform2f(b,c,h);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.Gi();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.Vg-.5);h=.5+(this.Wg-.5);0>c-.5/this.Hb&&(c=.5/this.Hb);0>h-.5/this.Hb&&(h=.5/this.Hb);1<c+.5/this.Hb&&(c=1-.5/this.Hb);1<h+.5/this.Hb&&(h=1-.5/this.Hb);if("crossdissolve"==this.type)e.useProgram(this.za),e.bindBuffer(e.ARRAY_BUFFER,this.xb),e.vertexAttribPointer(this.za.ka,
this.xb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.wg),e.vertexAttribPointer(this.za.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.Jf),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,h),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.kb),e.bindBuffer(e.ARRAY_BUFFER,this.xb),e.vertexAttribPointer(this.kb.ka,this.xb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.wg),e.vertexAttribPointer(this.kb.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.Jf),e.uniform1f(e.getUniformLocation(this.kb,"uColorPercent"),Math.min(2*f,1)),b=e.getUniformLocation(this.kb,"uAlpha"),e.uniform1f(b,1-Math.max(2*(f-.5),0)),e.uniform3f(e.getUniformLocation(this.kb,
"uDipColor"),(this.Pf>>16&255)/255,(this.Pf>>8&255)/255,(this.Pf&255)/255),b=e.getUniformLocation(this.kb,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.kb,"uZoomCenter"),e.uniform2f(b,c,h),c=e.getUniformLocation(this.kb,"uZoomFactor"),e.uniform1f(c,this.Hb),e.uniform1i(e.getUniformLocation(this.kb,"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.ka,this.xb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.wg);e.vertexAttribPointer(this.Ta.La,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.Jf);if(1==this.da||2==this.da||6==this.da||7==this.da||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var m=b=.5;else b=this.Vg,m=this.Wg;var n=b*a.width,q=m*a.height;n=Math.max(n,a.width-n);q=Math.max(q,a.height-q);"irisround"==this.type||
"irisroundcenter"==this.type?e.uniform1f(e.getUniformLocation(this.Ta,"uRadius"),(Math.sqrt(n*n+q*q)+this.Zc)*f):(n>q?(q=a.height/a.width*n+this.Zc,n+=this.Zc):(n=a.width/a.height*q+this.Zc,q+=this.Zc),e.uniform2f(e.getUniformLocation(this.Ta,"uRectDim"),n*f,q*f));f=e.getUniformLocation(this.Ta,"uSoftEdge");e.uniform1f(f,this.Zc);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,
m*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,h);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.ka,this.xb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.wg),e.vertexAttribPointer(this.ab.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.Jf),e.uniform1f(e.getUniformLocation(this.ab,"uPercent"),3>this.Rk?f*(a.width+this.Zc):f*(a.height+this.Zc)),f=e.getUniformLocation(this.ab,"uSoftEdge"),e.uniform1f(f,this.Zc),e.uniform1i(e.getUniformLocation(this.ab,"uDirection"),this.Rk),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,h),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}();z.Cq=x})(ggP2VR||(ggP2VR={}));
(function(z){var x=function(){function v(f){this.Fi=[];this.o=f;this.enabled=!1;this.Gb=2;this.zn=!1}v.prototype.Kn=function(f){if(2==f.mode||3==f.mode||5==f.mode){var e=this.o.ga.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.ga.currentTime,f.Jb&&f.Jb.gain&&(f.Jb.gain.linearRampToValueAtTime(f.Jb.gain.value,e),f.Jb.gain.linearRampToValueAtTime(0,e+this.Gb));f.Zk=!0;setTimeout(function(){f.Ne()},1E3*this.Gb+5)};v.prototype.Nu=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.ua?e.Sd():
(e.Pd&&e.We(),e.j.play(),e.j.currentTime=0))}};v.prototype.yr=function(){var f=(this.o.ga.currentTime-this.Ju)/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.wa&&(a.wa=f)}1==f&&clearInterval(this.Iu)};return v}();z.Dq=x})(ggP2VR||(ggP2VR={}));
(function(z){var x=function(){function v(f){this.Uh=[];this.vd=null;this.zc=[];this.lc=[];this.Ac=[];this.pm=!0;this.o=f;this.lr()}v.prototype.Jh=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.ka=f.getAttribLocation(this.Ec,"aVertexPosition");f.enableVertexAttribArray(this.Ec.ka);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.ka=f.getAttribLocation(this.Aa,"aVertexPosition");f.enableVertexAttribArray(this.Aa.ka);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.ka=f.getAttribLocation(this.Fb,"aVertexPosition")};v.prototype.Sc=function(){var f=this.o.S;this.Vd=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.Vd);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,
-1,0,1,1,0,-1,1,0]),f.STATIC_DRAW);this.Vd.itemSize=3;this.Vd.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,h=b;h<=b+2*Math.PI;h+=a)e.push(Math.sin(h)),e.push(-Math.cos(h)),e.push(0),c++;f.bufferData(f.ARRAY_BUFFER,new Float32Array(e),f.STATIC_DRAW);this.dg.itemSize=3;this.dg.numberOfItems=c;this.Ap=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.Ap);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.pa(0,0));b.addColorStop(.88,this.o.pa(0,0));b.addColorStop(.9,this.o.pa(16654848,1));b.addColorStop(.92,this.o.pa(16776448,1));b.addColorStop(.94,this.o.pa(4849466,1));b.addColorStop(.96,
this.o.pa(131071,1));b.addColorStop(.98,this.o.pa(8190,1));b.addColorStop(1,this.o.pa(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.Rt=function(){for(;0<this.Uh.length;)this.Uh.pop()};v.prototype.lr=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,H:.8,B:.7};e.push(b);b={radius:7,alpha:.4,color:12575203,H:.5,B:1.6};e.push(b);b={radius:5,alpha:.4,color:12575203,H:.6,B:.9};e.push(b);b={radius:8,alpha:.3,color:12575203,H:.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,H:.8,B:.7};e.push(b);b={radius:20,alpha:.5,color:15506856,H:.5,B:1.6};e.push(b);b={radius:5,alpha:.5,color:15506856,H:.6,B:.9};e.push(b);b={radius:60,alpha:.4,color:15506856,H:.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,H:.8,B:.7};e.push(b);b={radius:7,alpha:.5,color:15465727,H:.4,B:.9};e.push(b);b={radius:40,alpha:.4,color:15465727,H:.3,B:.38};e.push(b);b={radius:50,alpha:.4,color:15465727,H:.5,B:1.25};
e.push(b);b={radius:18,alpha:.2,color:15465727,H:.5,B:1.25};e.push(b);b={radius:10,alpha:.34,color:15726842,H:.8,B:1.5};e.push(b);b={radius:38,alpha:.37,color:15465727,H:.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,H:.45,B:.2};e.push(b);b={radius:8,alpha:.25,color:16434209,H:.7,B:.33};e.push(b);b={radius:9,alpha:.25,color:16091819,H:.4,B:.7};e.push(b);b={radius:7,alpha:.2,color:16091819,H:.4,B:.85};e.push(b);b={radius:60,alpha:.23,color:16091819,H:.55,B:1.05};e.push(b);b={radius:37,alpha:.1,color:16091819,H:.55,B:1.22};e.push(b);b={radius:10,alpha:.25,color:16363159,H:.65,B:1.38};e.push(b);b={radius:7,
alpha:.2,color:16434209,H:.5,B:1.45};e.push(b);b={radius:3,alpha:.2,color:16416033,H:.5,B:1.78};e.push(b);b={radius:6,alpha:.18,color:16434209,H:.45,B:1.9};e.push(b);b={radius:4,alpha:.14,color:16766514,H:.45,B:2.04};e.push(b);b={radius:30,alpha:.14,color:16766514,H:.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,H:.3,B:.3};e.push(b);b={radius:5,alpha:.5,color:14148072,H:.8,B:.6};e.push(b);b={radius:3,alpha:.37,color:14346999,
H:.66,B:.8};e.push(b);b={radius:45,alpha:.2,color:14346999,H:.36,B:1.2};e.push(b);b={radius:13,alpha:.2,color:14346999,H:.36,B:1.23};e.push(b);b={radius:11,alpha:.2,color:14148072,H:.36,B:1.28};e.push(b);b={radius:27,alpha:.16,color:14346999,H:.36,B:1.55};e.push(b);b={radius:6,alpha:.36,color:14148072,H:.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,H:.45,B:.22};e.push(b);b={radius:3,alpha:.3,color:15451904,H:.25,B:.4};e.push(b);b={radius:4,alpha:.2,color:15451904,H:.25,B:.45};e.push(b);b={radius:65,alpha:.17,color:15186464,H:.25,B:.5};e.push(b);b={radius:5,alpha:.45,color:15579138,H:.45,B:.88};e.push(b);
b={radius:140,alpha:.18,color:15579138,H:.32,B:.95};e.push(b);b={radius:12,alpha:.22,color:15579138,H:.32,B:1.1};e.push(b);b={radius:8,alpha:.32,color:15451904,H:.72,B:1.2};e.push(b);b={radius:55,alpha:.2,color:15451904,H:.45,B:1.33};e.push(b);b={radius:4,alpha:.3,color:15451904,H:.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,H:.45,B:.175};e.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:.46};e.push(b);b={radius:3,alpha:.3,color:10867450,H:.35,
B:.5};e.push(b);b={radius:60,alpha:.37,color:4031699,H:.75,B:.75};e.push(b);b={radius:3,alpha:.25,color:4031699,H:.25,B:.75};e.push(b);b={radius:3,alpha:.2,color:6158332,H:.25,B:.9};e.push(b);b={radius:7,alpha:.45,color:8835068,H:.45,B:1.3};e.push(b);b={radius:32,alpha:.22,color:8835068,H:.75,B:1.62};e.push(b);b={radius:9,alpha:.45,color:4031699,H:.65,B:1.6};e.push(b);b={radius:8,alpha:.25,color:4031699,H:.65,B:1.83};e.push(b);b={radius:7,alpha:.4,color:12574715,H:.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,H:.22,B:1.45};e.push(b);b={radius:7,
alpha:.5,color:15628151,H:.3,B:1.5};e.push(b);b={radius:3,alpha:.5,color:15628151,H:.3,B:1.52};e.push(b);b={radius:4,alpha:.5,color:16389120,H:.3,B:1.745};e.push(b);b={radius:9,alpha:.22,color:16389120,H:.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,H:.45,B:.175};e.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:.46};e.push(b);b={radius:3,alpha:.3,color:10867450,H:.35,B:.5};e.push(b);b={radius:60,alpha:.37,color:4031699,H:.75,B:.75};e.push(b);
b={radius:3,alpha:.25,color:4031699,H:.25,B:.75};e.push(b);b={radius:3,alpha:.2,color:6158332,H:.25,B:.9};e.push(b);b={radius:7,alpha:.45,color:8835068,H:.45,B:1.3};e.push(b);b={radius:32,alpha:.22,color:8835068,H:.75,B:1.62};e.push(b);b={radius:9,alpha:.45,color:4031699,H:.65,B:1.6};e.push(b);b={radius:8,alpha:.25,color:4031699,H:.65,B:1.83};e.push(b);b={radius:7,alpha:.4,color:12574715,H:.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,H:.22,B:1.45};e.push(b);b={radius:7,alpha:.5,color:15628151,H:.3,B:1.5};e.push(b);b={radius:3,alpha:.5,color:15628151,
H:.3,B:1.52};e.push(b);b={radius:4,alpha:.5,color:16389120,H:.3,B:1.745};e.push(b);b={radius:9,alpha:.22,color:16389120,H:.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,H:.45,B:.22};e.push(b);b={radius:3,alpha:.3,color:15451904,H:.25,B:.4};e.push(b);b={radius:4,alpha:.2,color:15451904,H:.25,B:.45};e.push(b);b={radius:65,alpha:.17,color:15186464,H:.25,B:.5};e.push(b);b={radius:5,alpha:.45,color:15579138,H:.45,B:.88};e.push(b);b={radius:140,alpha:.18,color:15579138,H:.32,B:.95};e.push(b);b={radius:12,alpha:.22,color:15579138,H:.32,B:1.1};e.push(b);b={radius:8,alpha:.32,color:15451904,H:.72,B:1.2};e.push(b);b={radius:55,
alpha:.2,color:15451904,H:.45,B:1.33};e.push(b);b={radius:4,alpha:.3,color:15451904,H:.25,B:1.42};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a)};v.prototype.Ct=function(){if(this.pm){var f=this.o.S,e,a=new z.Ua(0,0,-100),b=this.o.mf(),c=0,h=0,m=!1;if(this.o.oa){var n=this.o.Cb.width;var q=this.o.Cb.height;this.o.D.Ei&&(n=this.o.D.Cc.width,q=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;q=this.aa.height}var r=Math.sqrt(n*n+q*q),t=r/800;for(e=0;e<this.Uh.length;e++){var w=this.Uh[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){h=-b/a.z;c=a.x*h;h*=a.y;var y=Math.max(n,q);Math.abs(c)<y/2+100&&Math.abs(h)<y/2+100&&(m=!0,c+=
n/2,h+=q/2)}if(m){this.o.oa&&(f.blendFunc(f.SRC_ALPHA,f.ONE),f.enable(f.BLEND),f.disable(f.DEPTH_TEST));y=n/2;var C=q/2;var F=Math.sqrt((y-c)*(y-c)+(C-h)*(C-h));var E=r/2;C=n>q?n:q;y=w.jn/100*((E-F)/E);0>y&&(y=0);if(this.o.oa){f.useProgram(this.Ec);f.bindBuffer(f.ARRAY_BUFFER,this.o.D.xb);f.vertexAttribPointer(this.Ec.ka,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,q-f.drawingBufferHeight/q*h);f.uniform1f(f.getUniformLocation(this.Ec,"uBlindingValue"),y);D=f.getUniformLocation(this.Ec,"uAspectRatio");f.uniform1f(D,this.o.D.Ei?f.drawingBufferWidth/f.drawingBufferHeight:f.drawingBufferWidth/f.drawingBufferHeight/(n/q));f.drawArrays(f.TRIANGLE_STRIP,0,this.o.D.xb.numberOfItems)}else D=this.aa.createRadialGradient(c,h,1,c,h,C),D.addColorStop(0,"rgba(255, 255, 255, "+y+")"),D.addColorStop(.5,"rgba(255, 255, 255, "+
.8*y+")"),D.addColorStop(1,"rgba(255, 255, 255, "+.6*y+")"),this.aa.fillStyle=D,this.aa.fillRect(0,0,this.aa.width,this.aa.height);if(0!=Number(w.type)&&!this.o.D.Ei){y=n/2-c;C=q/2-h;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.oa)f.useProgram(this.Aa),f.bindBuffer(f.ARRAY_BUFFER,
this.dg),f.vertexAttribPointer(this.Aa.ka,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+y*J.B),f.drawingBufferWidth/n*(q-(h+C*J.B))),f.uniform2f(f.getUniformLocation(this.Aa,"uCircleTexturePosition"),f.drawingBufferWidth/n*(c+y*J.B),q-(h+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/q)),f.drawArrays(f.TRIANGLE_FAN,0,this.dg.numberOfItems);else{this.aa.save();this.aa.translate(c+y*J.B,h+C*J.B);D=this.aa.createRadialGradient(0,0,1,0,0,1.1*E);D.addColorStop(0,this.o.pa(I,H));D.addColorStop(.65,
this.o.pa(I,.9*H));D.addColorStop(.8,this.o.pa(I,.7*H));D.addColorStop(1,this.o.pa(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.oa?
(f.useProgram(this.Aa),f.bindBuffer(f.ARRAY_BUFFER,this.Vd),f.vertexAttribPointer(this.Aa.ka,this.Vd.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+y*J.B),f.drawingBufferWidth/n*(q-(h+C*J.B))),D=f.getUniformLocation(this.Aa,"uCircleTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+y*J.B),q-(h+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.H),D=f.getUniformLocation(this.Aa,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.drawArrays(f.TRIANGLE_FAN,0,this.Vd.numberOfItems)):(this.aa.save(),this.aa.translate(c+y*J.B,h+C*J.B),D=this.aa.createRadialGradient(0,
0,1,0,0,E),D.addColorStop(0,this.o.pa(I,H)),D.addColorStop(1-J.H,this.o.pa(I,.8*H)),D.addColorStop(1,this.o.pa(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.oa?(f.useProgram(this.Fb),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,this.Ap),f.bindBuffer(f.ARRAY_BUFFER,this.Vd),f.vertexAttribPointer(this.Fb.ka,
this.Vd.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Fb,"uCanvasDimensions2"),f.uniform2f(D,n,q),D=f.getUniformLocation(this.Fb,"uCirclePosition"),f.uniform2f(D,c+y*w.B,q-(h+C*w.B)),D=f.getUniformLocation(this.Fb,"uRingTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+y*w.B),q-(h+C*w.B)),D=f.getUniformLocation(this.Fb,"uCircleRadius"),f.uniform1f(D,E),f.uniform2f(f.getUniformLocation(this.Fb,"uRingPosition"),c+y*w.B,q-(h+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/q)),f.uniform1i(f.getUniformLocation(this.Fb,"uSampler"),0),f.drawArrays(f.TRIANGLE_FAN,0,this.Vd.numberOfItems)):(this.aa.save(),this.aa.translate(c+y*w.B,h+C*w.B),D=this.aa.createRadialGradient(0,0,0,0,0,E),D.addColorStop(0,this.o.pa(16777215,0)),D.addColorStop(.88,this.o.pa(0,0)),D.addColorStop(.9,this.o.pa(16654848,H)),D.addColorStop(.92,
this.o.pa(16776448,H)),D.addColorStop(.94,this.o.pa(4849466,H)),D.addColorStop(.96,this.o.pa(131071,H)),D.addColorStop(.98,this.o.pa(8190,H)),D.addColorStop(1,this.o.pa(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.oa&&(f.useProgram(this.o.sa.O),f.disable(f.BLEND),f.enable(f.DEPTH_TEST))}}}};return v}();z.Bq=x})(ggP2VR||(ggP2VR={}));var THREE,Y=2E4;
(function(z){var x=function(){function v(f){this.wb=[];this.Ij=[];this.ca={x:0,y:0};this.Wc={x:0,y:0};this.$h=0;this.session=null;this.al=!1;this.Qm=this.Pm=this.zf=0;this.wl=this.Rg=!1;this.qm=0;this.Dg=-5;this.Fm=0;this.aj=this.cg=this.Cj=!1;this.o=null;this.cm=!0;this.fg=1;this.oj=[];this.frustumCulled=!1;this.nj=0;this.pk=null;this.Fn=!0;this.Ck=this.vq=!1;this.Fe=[-1,-1,-1,-1];this.Ge=[-1,-1,-1,-1];this.vf=[!1,!1,!1,!1];this.Hc=[];this.xj=[];this.uf=[];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.G("WebXR Polyfill loaded!")}catch(b){f.Uc(b)}}e.Us()},0);THREE?this.hn():console.log("Three.js not available!")}v.prototype.mr=function(){this.init();this.animate()};v.prototype.hn=function(){this.Bm=new THREE.Matrix4;this.ep=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.Bm||this.hn();var f=this,e=this.o,
a=this.mc=e.mc,b=this.Ep=new THREE.Scene,c=this.Eu=new THREE.Scene,h=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,Y);b.add(h);108>THREE.REVISION&&(this.frustumCulled=!0);h.position.z=-.01;h.position.y=0;h.position.x=0;this.Sa=h=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!1});h.setClearColor(new THREE.Color(0),1);h.setPixelRatio(window.devicePixelRatio);h.setSize(window.innerWidth,window.innerHeight);h.outputEncoding=
THREE.sRGBEncoding;h.shadowMap.enabled=!1;a.appendChild(h.domElement);"xr"in navigator&&(h.xr.enabled=!0,h.xr.setReferenceSpaceType("local"));var m=this.Mk=new THREE.Group;m.name="controllerGroup";m.renderOrder=3E3;a=this.Kk=h.xr.getController(0);a.addEventListener("selectstart",function(y){f.gp(y)});a.addEventListener("selectend",function(y){f.fp(y)});a.visible=!0;a.userData.Tf=0;m.add(a);var n=this.Lk=h.xr.getController(1);n.addEventListener("selectstart",function(y){f.gp(y)});n.addEventListener("selectend",
function(y){f.fp(y)});n.visible=!0;n.userData.Tf=1;m.add(n);m.visible=!1;var q=this.Re=new THREE.Group;q.name="skinGroup";q.translateZ(this.Dg);q.visible=!1;q.renderOrder=1E3;c.add(q);q=this.Em=new THREE.Group;q.name="toggleSkinGroup";q.translateZ(this.Dg+.1);q.renderOrder=1100;c.add(q);c.add(m);q=(new THREE.TextureLoader).load("webxr/vrSkinShow.svg");var r=(new THREE.TextureLoader).load("webxr/vrSkinHide.svg");m=new THREE.PlaneBufferGeometry(.3,.3);q=new THREE.MeshBasicMaterial({map:q});q.transparent=
!0;r=new THREE.MeshBasicMaterial({map:r});r.transparent=!0;m=new THREE.Mesh(m,q);m.name="SkinToggleButton";m.position.y=3.12;m.Cv=!1;m.userData.ft=q;m.userData.et=r;m.userData.onclick=function(){f.pi()};this.Tb=m;this.Tb.visible=!1;this.Em.add(m);m=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);q=new THREE.LineBasicMaterial({color:14737632});m=new THREE.Line(m,q);m.name="line";m.scale.z=5;a.add(m.clone());n.add(m.clone());this.mi=new THREE.Raycaster;
this.ca=new THREE.Vector2;this.Ke=new THREE.Group;this.Ke.name="panoGroup";e.md||(this.Ke.renderOrder=1);this.tf=new THREE.Group;this.tf.name="imageGroup";this.Ed=new THREE.Group;this.Ed.name="hotspotGroup";this.$i=new THREE.Group;this.$i.name="elementGroup";this.gh=new THREE.Group;this.gh.name="centerGroup";e.md||(this.gh.renderOrder=2E3);this.Ke.add(this.$i);this.Ke.add(this.Ed);this.Ke.add(this.tf);b.add(this.Ke);m=new THREE.BufferGeometry;e=[];a=[];for(n=0;20>n;n++)q=2*n*Math.PI/20,r=Math.cos(q),
q=Math.sin(q),a.push(.03*r,.03*q,0),a.push(.05*r,.05*q,0);for(n=0;20>n;n++){q=2*n;r=2*n+1;var t=(n+1)%20*2+1,w=(n+1)%20*2;e.push(q,r,w);e.push(r,t,w)}m.setIndex(e);m.setAttribute("position",new THREE.Float32BufferAttribute(a,3));e=new THREE.MeshBasicMaterial({color:"black",side:THREE.DoubleSide});e=new THREE.Mesh(m,e);e.position.z=-5;this.gh.add(e);window.addEventListener("resize",function(){f.zt()},!1);document.addEventListener("mouseup",function(){f.vt()},!1);document.addEventListener("mousedown",
function(y){f.tt(y)},!1);document.addEventListener("mousemove",function(y){f.ut(y)},!1);U&&"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:h})))}else console.log("Three.js not available!")};v.prototype.Tp=function(){var f=this.o;f.G("VR not found");f.I("vrchanged",{});f.I("playerstatechanged",{})};
v.prototype.Du=function(){this.wl=!0;var f=this.o;f.G("XR found");f.I("vrchanged",{});f.I("playerstatechanged",{})};v.prototype.Us=function(){if(!this.vq){this.vq=!0;var f=this;if("xr"in navigator)navigator.xr.isSessionSupported("immersive-vr").then(function(e){e?f.Du():f.Tp()})["catch"](f.Tp)}};v.prototype.ll=function(){return this.Re};v.prototype.mg=function(){return null!=this.session?this.Sa.xr.isPresenting:this.o.me?!0:!1};v.prototype.rf=function(){return this.wl&&THREE};v.prototype.xt=function(f){var e=
this;this.Mi();f.addEventListener("end",function(){e.wt()});console.log("XR Session started.");this.Sa.xr.setSession(f);this.al=!0;this.session=f;e.o.I("entervr",{session:f})};v.prototype.wt=function(){console.log("XR Session ended.");this.al=!1;this.session=null;this.Jk()};v.prototype.Yf=function(){var f=this.o;if(this.wl){if(null===this.session){var e=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor"]}).then(function(b){e.xt(b)})["catch"](function(b){console.log(b);
console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!");e.Jk()})}this.Ed&&this.Ed.translateY(-this.nj);this.nj=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.Mi(),this.o.I("entervr",{session:null})};v.prototype.At=function(){if(THREE&&this.Sa){var f=this.o;f.me=!0;f.Lc&&(Y=2E3);
f.$.style.display="none";f.bb.style.display="none";this.Sa.domElement.style.display="inline";f.I("vrchanged",{});f.I("playerstatechanged",{})}};v.prototype.Jk=function(){if(THREE&&this.Sa){var f=this.o;f.me=!1;f.$.style.display="inline";f.bb.style.display="inline";this.Sa.domElement.style.display="none";f.Ag(0);f.ic();f.update();f.I("vrchanged",{});f.I("playerstatechanged",{});this.o.I("exitvr",{session:null});this.Hk()}};v.prototype.Zf=function(){null!=this.session&&this.session.end()};v.prototype.hq=
function(){this.mg()?this.Zf():this.Yf()};v.prototype.zr=function(){var f=0,e=this.o,a=e.M.N;var b=1536;this.Sa&&e.G("Canvas: "+b);b*=Math.pow(2,0);if(0<a.levels.length){for(;a.levels.length>=f+2&&!a.levels[f+1].Df&&a.levels[f+1].width>b;)f++;e.G("Level "+f+" - width: "+a.levels[f].width);e.G(a.levels)}return f};v.prototype.ro=function(f){var e=this.o,a=e.M.N,b=e.Ve[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.Hl:e.Ok;a=f;f=e.yp;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.hb(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(h){var m=c.ceilPowerOfTwo(h.width),n=c.ceilPowerOfTwo(h.height);
f.encoding=THREE.sRGBEncoding;if(m==h.width&&n==h.height||!a)f.image=h;else{c.o.G("resizing "+h.width+"/"+h.height+" -> "+m+"/"+n);var q=document.createElement("canvas");q.width=m;q.height=n;q.getContext("2d").drawImage(h,0,0,m,n);f.image=q}f.needsUpdate=!0;f.xo=!0;f.Ae&&f.Ae.xo&&(f.Fh.visible=!0,f.Ae.Fh.visible=!0)});this.oj.push(f)};v.prototype.Mi=function(){if(THREE){var f=this.o;if(this.Ck)f.G("vr panorama aleady added!");else{var e=this.tf,a=this;f.G("add vr panorama");this.Ef();this.camera.layers.enable(1);
e.setRotationFromEuler(this.ep);e.rotateX(f.Ya.pitch*Math.PI/180);e.rotateZ(-f.Ya.W*Math.PI/180);var b=new THREE.SphereBufferGeometry(Y/3*1.5,16,16),c=new THREE.Texture,h=new THREE.ImageLoader;h.setCrossOrigin(this.o.crossOrigin);h.load(this.ro(f.dj()),function(m){c.encoding=THREE.sRGBEncoding;c.image=m;c.needsUpdate=!0});h=new THREE.MeshBasicMaterial({map:c,side:THREE.DoubleSide});b=new THREE.Mesh(b,h);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.Ck=!0;setTimeout(function(){f.G("Adding Main Pano");a.Ck=!1;a.Pq();f.A.j?a.Sq():a.Qq();a.Nq()});this.Tt();this.cm=!0}}};v.prototype.Sq=function(){var f=this.o,e=this.tf,a=Y/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 h=c.attributes.uv.array,m=1;m<h.length;m+=2)h[m]*=.5;h=new THREE.MeshBasicMaterial({map:b});
c=new THREE.Mesh(c,h);c.rotateY(-90*Math.PI/180);c.layers.set(f.Fg?1:2);e.add(c);c=new THREE.SphereBufferGeometry(a,60,40);c.scale(-1,1,1);h=c.attributes.uv.array;for(m=1;m<h.length;m+=2)h[m]*=.5,h[m]+=.5;h=new THREE.MeshBasicMaterial({map:b});c=new THREE.Mesh(c,h);c.rotateY(-90*Math.PI/180);c.layers.set(f.Fg?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,h=new THREE.MeshBasicMaterial({map:b}),c=new THREE.Mesh(c,h),c.rotateY(-90*Math.PI/180);e.add(c);try{f.A.j.play()}catch(n){f.Uc(n)}};v.prototype.Qq=function(){var f=this.o,e=this.o.M.N,a=[],b=this.zr(),c=this.tf,h=Y/3,m=f.Fd?2:1;if(e.levels.length>b)for(var n=e.levels[b],q=0;6>q;q++){a[q]=new THREE.Group;for(var r=0;r<n.ta;r++)for(var t=0;t<n.Y;t++)for(var w=0;w<m;w++){var y=new THREE.Texture;y.encoding=THREE.sRGBEncoding;this.loadTexture(y,f.M.Jg(q,b,t,r,1==w),!0);
y.wrapS=THREE.ClampToEdgeWrapping;y.wrapT=THREE.ClampToEdgeWrapping;y.minFilter=THREE.LinearMipMapLinearFilter;y.anisotropy=1;var C=e.V+2*e.jb,F=e.V+2*e.jb;t==n.Y-1&&(C=n.width-e.V*(n.Y-1)+2*e.jb);r==n.ta-1&&(F=n.width-e.V*(n.ta-1)+2*e.jb);var E=new THREE.PlaneBufferGeometry(h*C/n.width,h*F/n.width,8),D=new THREE.MeshBasicMaterial({map:y});E=new THREE.Mesh(E,D);D.transparent=!0;D.side=THREE.FrontSide;D=1*e.V;E.position.x=h*(t*D+C/2-e.jb-n.width/2)/n.width;E.position.y=h*-(r*D+F/2-e.jb-n.width/2)/
n.width;E.position.z=-.5*h;if(f.Fd)if(E.visible=!1,E.layers.set(1==w?1:2),y.Fh=E,0==w)var A=E;else C=A.material.map,y.Ae=C,C.Ae=y;a[q].add(E);E.frustumCulled=this.frustumCulled}4>q?a[q].rotation.y=-q*Math.PI/2:a[q].rotation.x=(4==q?1:-1)*Math.PI/2;c.add(a[q])}else for(e=f.Kg,q=0;6>q;q++)for(a[q]=new THREE.Group,w=0;w<m;w++)b=q,f.Fd&&(b=q+(1==w?6:0)),y=new THREE.Texture,y.encoding=THREE.sRGBEncoding,this.loadTexture(y,f.hb(f.mh[b]),!1),y.wrapS=THREE.ClampToEdgeWrapping,y.wrapT=THREE.ClampToEdgeWrapping,
y.minFilter=THREE.LinearFilter,E=new THREE.PlaneBufferGeometry(e*h/2,e*h/2,64),D=new THREE.MeshBasicMaterial({map:y}),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*h,f.Fd&&(E.layers.set(1==w?1:2),E.visible=!1,y.Fh=E,0==w?A=E:(C=A.material.map,y.Ae=C,C.Ae=y)),a[q].add(E),4>q?a[q].rotation.y=-q*Math.PI/2:a[q].rotation.x=(4==q?1:-1)*Math.PI/2,c.add(a[q])};v.prototype.Pq=function(){var f=this.o,e=this.Ed;new z.Ua(0,0,-100);for(var a=f.L.ck,
b=0;b<f.K.length;b++){var c=f.K[b];if("poly"!=c.type){var h=null,m=c.Qu(),n=c.Kf?100:5;if(f.Ki&&f.Ki.addSkinHotspot)(h=f.Ki.addSkinHotspot(c))&&h.userData.zv&&(n=100);else{var q=.2;if(!1!==m){n=!c.distance||0>=c.distance?5:1>c.distance?1:5>c.distance?c.distance:5;if(c.jd){m=.005;var r=(new THREE.TextureLoader).load(c.jd);r.encoding=THREE.sRGBEncoding;var t=new THREE.MeshBasicMaterial({map:r});if(c.Kf){h=2*n*Math.tan(c.fov/2*Math.PI/180);var w=new THREE.PlaneBufferGeometry(h,h*c.yd/c.gf,1,1);t.transparent=
!0;t.opacity=1}else w=new THREE.PlaneBufferGeometry(m*c.gf,m*c.yd,1,1),t.transparent=!0,t.opacity=.25;q=m*c.yd/2;t.side=THREE.DoubleSide}else w=new THREE.SphereBufferGeometry(.2,16,16),r=(new THREE.TextureLoader).load(this.ro(m)),r.encoding=THREE.sRGBEncoding,t=new THREE.MeshBasicMaterial({map:r}),t.transparent=!0,t.opacity=.25;h=new THREE.Mesh(w,t);m=c.title;if(a.enabled&&""!=m){w=document.createElement("canvas");w.width=256;w.height=32;r=w.getContext("2d");this.Di||(this.Di=document.createElement("canvas"),
this.Di.width=w.width,this.Di.height=w.height);var y=this.Di.getContext("2d");y.clearRect(0,0,w.width,w.height);y.font="16px Helvetica";y.textAlign="center";y.textBaseline="top";t=y.measureText(m);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&&(y.fillStyle=this.o.pa(a.Wb,a.Vb),y.fillRect((w.width-C)/2-3,2,C+6,24));0<a.Pi&&(y.strokeStyle=this.o.pa(a.Yb,a.Xb),y.strokeRect((w.width-C)/2-3,2,C+6,24));y.fillStyle=this.o.pa(a.dk,a.bk);y.fillText(m,w.width/
2,5,w.width-6);r.drawImage(this.Di,(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;m=1.5;w=new THREE.PlaneBufferGeometry(1*m*t/w.width,3*m/w.height,1,1);t=new THREE.MeshBasicMaterial({map:r,side:THREE.DoubleSide});w=new THREE.Mesh(w,t);w.translateY(-q-.125*m/2);w.frustumCulled=this.frustumCulled;h.add(w);t.transparent=!0;t.opacity=.5}h.userData={P:c}}}h&&(h.rotateY(c.pan*Math.PI/180),h.rotateX(c.u*Math.PI/180),h.translateZ(-n),h.castShadow=
!1,h.receiveShadow=!1,h.frustumCulled=this.frustumCulled,e.add(h))}}};v.prototype.Nq=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.wn(a,b)}}for(e=0;e<f.U.length;e++)a=f.U[e],a.j&&"_videopanorama"!=a.id&&!a.qd&&(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.wn(a,b))};v.prototype.wn=function(f,e){var a=
this.$i,b=Y/8,c=2*Math.tan(f.fov*Math.PI/360)*b;var h=0<f.qc?c*f.Qc/f.qc:c;f.Jc&&1!=f.Jc&&(h*=f.Jc);c=new THREE.PlaneBufferGeometry(c,h,5,5);e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide,transparent:!0});e=new THREE.Mesh(c,e);e.rotateY(f.pan*Math.PI/180);e.rotateX(f.u*Math.PI/180);e.translateY(-0);e.translateZ(-b);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.th=function(f){for(var e=
f.children.length-1;0<=e;e--){var a=f.children[e];this.th(a);f.remove(a)}f.geometry&&f.geometry.dispose();f.material&&(f.material.texture&&(f.material.texture.dispose(),f.material.texture.Ae=null,f.material.texture.Fh=null),f.material.map&&(f.material.map.dispose(),f.material.map.Ae=null,f.material.map.Fh=null),f.material.dispose())};v.prototype.Ef=function(){THREE&&(this.oj=[],this.th(this.tf),this.th(this.Ed),this.th(this.$i),10<this.Sa.info.memory.textures&&this.o.Rm(this.Sa.info.memory))};v.prototype.zt=
function(){if(THREE){var f=this.camera;f.aspect=window.innerWidth/window.innerHeight;f.updateProjectionMatrix();this.Sa.setSize(window.innerWidth,window.innerHeight)}};v.prototype.gp=function(f){if(THREE){f=f.target;this.Hk();var e=this.hl(f);0<e.length&&(this.ah(e,f.userData.Tf),0<this.wb.length&&(f=this.wb[0],e=f.userData,e.P&&!e.fromSkin?(f=e.P,this.o.rd(f.url,f.target)):(this.se(f,"onclick"),this.se(f,"onmousedown"))))}};v.prototype.fp=function(f){if(THREE){f=f.target;var e=this.hl(f);0<e.length&&
this.ah(e,f.userData.Tf)}};v.prototype.hl=function(f){this.Bm.identity().extractRotation(f.matrixWorld);this.mi.ray.origin.setFromMatrixPosition(f.matrixWorld);this.mi.ray.direction.set(0,0,-1).applyMatrix4(this.Bm);return this.xl(this.mi)};v.prototype.xl=function(f){var e=[];if(this.Ed.visible){var a=f.intersectObjects(this.Ed.children,!0);e=e.concat(a)}this.Re.visible&&(a=f.intersectObjects(this.Re.children,!0),e=e.concat(a));a=f.intersectObjects(this.Em.children,!0);return e=e.concat(a)};v.prototype.ah=
function(f,e){void 0===e&&(e=-1);for(var a=0;a<f.length;a++){var b=f[a].object;if(void 0!==b.userData.isVisible&&b.userData.isVisible()||void 0===b.userData.isVisible&&b.visible||b.userData.clickInvisible)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.hl(f);0<a.length&&this.ah(a,f.userData.Tf);e.scale.z=0<this.wb.length?this.wb[0].distance:5};v.prototype.Hk=function(){for(;this.wb.length;)this.wb.pop().selected=
!1};v.prototype.ut=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.$h=this.Wc.x-e.x)};v.prototype.Vs=function(){var f=this.mi;f.setFromCamera(this.ca,this.camera);f=this.xl(f);0<f.length&&this.ah(f)};v.prototype.Ws=function(){var f=this.mi;this.camera.updateProjectionMatrix();f.setFromCamera({x:0,y:0},this.camera);f=this.xl(f);0<f.length&&this.ah(f)};v.prototype.vt=function(){this.$h=
0;if(0<this.wb.length){var f=this.wb[0];f.userData.P||this.se(f,"onmouseup")}};v.prototype.se=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.kn=function(f,e){do if(f.userData.onclick||f.userData.P&&!f.userData.fromSkin)e?f.userData.wi=-1:f.userData.wi&&-1!=f.userData.wi?
Date.now()>f.userData.wi+1E3&&(f.userData.onclick?(f.userData.onclick(),f.userData.wi=-1):f.userData.P&&f.userData.P.url&&this.o.rd(f.userData.P.url,f.userData.P.target)):f.userData.wi=Date.now();while(!f.userData.stopPropagation&&(f=f.parent))};v.prototype.tt=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.rd(f.url,f.target)):(this.se(f,"onclick"),
this.se(f,"onmousedown"))}else this.Wc.x=this.ca.x,this.Wc.y=this.ca.y};v.prototype.animate=function(){var f=this.Wo=this;this.Sa&&this.Sa.setAnimationLoop(function(){f.render()})};v.prototype.render=function(){if(THREE){var f=null;try{f=this.Sa.xr.getCamera()}catch(t){}!this.pk&&f&&(f.add(this.gh),this.Ep.add(f));if(this.pk=f)this.Ed.translateY(f.position.y-this.nj),this.nj=f.position.y;var e=this.Wo,a=e.o;if(a.me){e.Rg=e.Kk.visible||e.Lk.visible?!1:!0;var b=this.Ms();this.Ns();this.Mj&&0<this.oj.length&&
this.oj.every(function(t){return t.xo})&&(this.th(this.Mj),this.tf.remove(this.Mj),this.Mj=null,a.G("unload Preview Sphere"));for(var c=this.Ed,h=c.children.length-1;0<=h;h--){var m=c.children[h],n=1,q=1;m.selected?(n=1.5,q=1):b?(n=.6,q=.7):(n=.4,q=.5);var r=m.scale.x;r+=.1*(n-r);m.userData.fromSkin?m.userData.ggUse3d&&(r=10):(m.material.opacity+=.1*(q-m.material.opacity),m.userData&&m.userData.P&&m.userData.P.jd?(m.userData.P.Kf&&(r=1,m.material.opacity=1),0<m.children.length&&(m.children[0].material.opacity=
m.material.opacity)):(m.rotateY(1*Math.PI/180),0<m.children.length&&(m.children[0].rotateY(-1*Math.PI/180),m.children[0].material.opacity=m.material.opacity)));m.scale.x=m.scale.y=m.scale.z=r}b=e.camera.rotation.clone();b.reorder("YXZ");this.Pm=180*b.y/Math.PI;this.Qm=180*b.x/Math.PI;a.Ki&&!this.Re.visible&&this.Fn&&(10<this.Qm?this.Cj||(this.Cj=!0,this.ct=new Date):(this.Cj=!1,!this.cg&&!this.Tb.visible||this.aj||(this.aj=!0,this.Yk=new Date),this.cg=!1),!this.Cj||this.cg||this.Tb.visible||(c=new Date,
500<c.getTime()-this.ct.getTime()&&(this.cg=!0,this.Yk=new Date)),this.cg?(this.Tb.visible=!0,c=new Date,c=(c.getTime()-this.Yk.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.Yk.getTime())/5,100<=c?(this.Tb.material.opacity=0,this.aj=this.Tb.visible=!1):this.Tb.material.opacity=1-c/100));this.cm&&(this.oi(this.Pm-a.pan.m),this.cm=!1);a.Op(this.Pm-this.zf,this.Qm,180*b.z/Math.PI);a=this.gh;e.Rg?f&&(a.visible=!0):
a.visible=!1;a=this.Em;f&&!this.Re.visible&&(a.translateZ(-(this.Dg+.1)),a.rotateY(-this.Fm),b=new THREE.Vector3(0,0,1),b.applyEuler(f.rotation),this.Fm=Math.atan2(b.x,b.z),a.rotateY(this.Fm),a.translateZ(this.Dg+.1));e.Sa.autoClear=!0;e.Sa.render(e.Ep,e.camera);e.Sa.autoClear=!1;e.Sa.clearDepth();e.Sa.render(e.Eu,e.camera);0==this.$h||isNaN(this.$h)||this.oi(this.$h)}}};v.prototype.Ms=function(){var f=this,e=this;this.Hc=[];var a=!0;this.session?this.session.inputSources.forEach(function(q){var r=
q.profiles;"gaze"==q.targetRayMode?e.Rg=!0:(f.Hc.push(q.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 h=this.Hc[c];if(h&&0<h.buttons.length)if(2<=h.axes.length&&2<h.buttons.length&&!a)if(h.buttons[2].pressed)this.vf[c]||(this.vf[c]=!0,this.pi());else if(h.buttons[2].touched){b=!0;this.vf[c]=
!1;var m=h.axes[0],n=h.axes[1];-1==this.Fe[c]?this.Fe[c]=m:(h=this.Fe[c]-m,-.3>h&&(this.oi(20),this.Fe[c]=m,this.Ge[c]=n),.3<h&&(this.oi(-20),this.Fe[c]=m,this.Ge[c]=n));-1==this.Ge[c]?this.Ge[c]=n:(h=this.Ge[c]-n,-.5>h&&(this.pi(!0),this.Ge[c]=n,this.Fe[c]=m),.5<h&&(this.pi(!1),this.Ge[c]=n,this.Fe[c]=m))}else this.Fe[c]=-1,this.Ge[c]=-1,this.vf[c]=!1;else 4<=h.axes.length&&(m=h.axes[2],n=h.axes[3],.8<m?(b=!0,1!=this.uf[c]&&(this.uf[c]=1,this.xj[c]=Date.now()-1E4)):-.8>m?(b=!0,-1!=this.uf[c]&&(this.uf[c]=
-1,this.xj[c]=Date.now()-1E4)):this.uf[c]=0,0!=this.uf[c]&&400<Date.now()-this.xj[c]&&(this.xj[c]=Date.now(),this.oi(20*this.uf[c])),h.buttons[1].pressed?this.vf[c]||(this.vf[c]=!0,this.pi()):this.vf[c]=!1)}e.Mk.visible==(!this.Hc||0==this.Hc.length)&&(e.Mk.visible=!e.Mk.visible);return b};v.prototype.lp=function(f){for(f=f.parent;f;){if(f.selected)return!0;f=f.parent}return!1};v.prototype.Ns=function(){var f=this.Wo;f.Ij=f.wb.slice();f.Hk();f.Kk.visible&&f.intersectObjects(f.Kk);f.Lk.visible&&f.intersectObjects(f.Lk);
f.al||f.Vs();f.Rg&&f.Ws();for(var e=0;e<f.wb.length;e++){var a=f.wb[e];f.Rg&&this.kn(a,!1);-1!=f.Ij.indexOf(a)||this.lp(a)||(this.se(a,"onmouseover"),this.Hc&&0<this.Hc.length&&this.se(a,"onclick",!0))}for(e=0;e<f.Ij.length;e++)a=f.Ij[e],-1==f.wb.indexOf(a)&&(this.lp(a)||this.se(a,"onmouseout"),f.Rg&&this.kn(a,!0))};v.prototype.pi=function(f){var e=this.Re;void 0===f&&(f=!e.visible);var a=this.pk;f?(e.translateZ(-this.Dg),e.rotateY(-this.qm),a&&(f=new THREE.Vector3(0,0,1),f.applyEuler(a.rotation),
this.qm=Math.atan2(f.x,f.z)),e.rotateY(this.qm),e.translateZ(this.Dg),this.Re.visible=!0,this.Tb.material=this.Tb.userData.et,this.Tb.visible=!0,this.Tb.material.opacity=1):(this.Re.visible=!1,this.Tb.material=this.Tb.userData.ft,this.Tb.visible=!1)};v.prototype.Tt=function(){this.zf=0;this.Ke.setRotationFromEuler(this.ep)};v.prototype.oi=function(f){this.zf+=f;this.Ke.rotateY(f*Math.PI/180)};return v}();z.Lq=x})(ggP2VR||(ggP2VR={}));
(function(z){var x=function(){return function(){this.fov=this.u=this.pan=0}}();z.tv=x;var v=function(){function f(e){this.pan={m:0,Ha:0,min:0,max:360,d:0,Hj:0,ac:0,open:0};this.u={m:0,Ha:0,min:-90,max:90,d:0,ac: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,qb:9};this.fov={m:70,Ha:70,min:1,Zh:0,max:170,Jl:360,Kl:270,prev:0,d:0,Pc:{enabled:!1,x:0,y:0},mode:0,Zp:0,Bn:0,open:0};this.cube=new z.Gq;this.sa=null;this.Ya={W:0,pitch:0};this.Fg=this.Fd=!1;this.Jj=
this.ip=4;this.hp=this.Ol=0;this.N=new z.Eq;this.rg=200;this.Ci=0;this.Dm=5;this.je=0;this.fq=50;this.Rs=0;this.A={src:[],df:4,width:640,height:480,Tc:!1,ng:!1,Yj:!0,um:!1,ve:"loop",ak:"",j:null,Cm:!1,texture:null,lk:null,Bi:null,qj:null,format:1,Gh:0,flipY:1,fb:function(){return 0},fm:function(){},loop:function(){return!1}};this.wf={pan:-1,u:-1,fov:-1};this.El=0;this.mh=[];this.Ok="";this.nh=[];this.Kg=this.Te=1;this.Sl=new x;this.o=e}f.prototype.na=function(){this.o.na(!1)};f.prototype.update=function(){this.o.update()};
f.prototype.nf=function(){return this.pan.m};f.prototype.hj=function(){var e=this.pan.m;if(!this.ib()){for(;-180>e;)e+=360;for(;180<e;)e-=360}return e};f.prototype.Wd=function(){var e=this.pan.m-this.pan.Hj;if(!this.ib()){for(;-180>e;)e+=360;for(;180<e;)e-=360}return e};f.prototype.ee=function(e){this.na();isNaN(e)||(this.pan.m=Number(e));this.update()};f.prototype.Vj=function(e){this.na();isNaN(e)||(this.pan.m=Number(e)+this.pan.Hj);this.update()};f.prototype.Ri=function(e,a){isNaN(e)||(this.ee(this.nf()+
e),a&&(this.pan.d=e))};f.prototype.nn=function(e,a){this.Ri(e*this.lf(),a)};f.prototype.lf=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.fe=function(e){this.na();isNaN(e)||(this.u.m=Number(e));this.update()};f.prototype.Si=function(e,a){this.fe(this.gg()+e);a&&(this.u.d=e)};f.prototype.qn=function(e,a){this.Si(e*this.lf(),a)};f.prototype.Ag=function(e){this.na();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.na();switch(this.Z()){case 4:var a=170;break;case 12:a=360;break;case 9:a=355;break;default:a=170}this.ib()&&(a=9999999999);return!isNaN(e)&&0<e&&e<a&&(a=this.fov.m,this.fov.m=1*e,this.ef(),a!=this.fov.m)?(this.update(),!0):!1};f.prototype.im=function(e){0<=e&&4>e&&(this.fov.mode=Number(e),this.ef(),this.update())};f.prototype.ib=function(){return 2==this.o.Kd};f.prototype.Ek=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.nm=function(e,a){this.na();isNaN(e)||(this.pan.m=e);isNaN(a)||(this.u.m=a);this.update()};f.prototype.Op=function(e,a,b){this.na();!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.zg=function(e,a,b){this.na();isNaN(e)||
(this.pan.m=e);isNaN(a)||(this.u.m=a);isNaN(b)||this.Ab(b);this.update()};f.prototype.Fp=function(){this.zg(this.pan.Ha,this.u.Ha,this.fov.Ha)};f.prototype.sb=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.hp=b?Number(b):1,this.Jj!=e||this.Ol!=c)this.Jj=e,this.Ol=c,this.sa.rj()};f.prototype.Z=function(){return 0==this.Jj?4:this.Jj};
f.prototype.Ic=function(){return this.Ol};f.prototype.Dh=function(){return this.ip};f.prototype.jj=function(){return this.hp};f.prototype.aspect=function(){return this.o.C.width/this.o.C.height};f.prototype.Jo=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.On(this.o.C),e)};f.prototype.Uf=function(e,a,b){return this.ib()?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.el=function(e,a){e||(e=this.Nb());a||(a=this.Z());return this.Uf(a,this.aspect(),e)};f.prototype.dl=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.ln=function(e){var a;a||(a=this.Z());return this.Uf(a,this.On(this.o.C),e)};f.prototype.On=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.ti=function(e){this.Ab(this.ln(e))};f.prototype.jm=function(e){var a=this.Z(),b=1/this.aspect();this.ti(this.Uf(a,b,e))};f.prototype.gm=function(e){var a=this.Z(),b=this.aspect();b=1/Math.sqrt(1+b*b);this.ti(this.Uf(a,b,e))};f.prototype.ef=function(){if(!this.o.me){var e=this.Sl;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,h=c.v;if(this.ib()){if(0<this.fov.Zh){var m=this.Te;this.N.levels&&0<this.N.levels.length&&(m=this.N.levels[0].height);10<m&&(this.fov.min=100*b.height/(m*this.fov.Zh))}m=e.fov/2;b=m*a;var n=this.N.width/this.N.height*50;a=c.J.Dp?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<m?e.u=0:(50<e.u+m&&(e.u=50-m),-50>e.u-m&&(e.u=-50+m));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,h.active&&(h.speed=-h.speed,this.pan.d=0)))}else{0<this.fov.Zh&&(m=this.Te,this.N.levels&&0<this.N.levels.length&&(m=this.N.levels[0].height),10<m&&(this.fov.min=360*Math.atan2(b.height/2,m/2*this.fov.Zh)/Math.PI));e.fov<this.fov.min&&(e.fov=this.fov.min);n=this.fov.max;var q=179;m=this.Nb()/2;b=a*m;4==this.Z()?b=180*Math.atan(a*Math.tan(m*Math.PI/180))/Math.PI:9==this.Z()?(n=this.fov.Kl,q=355):12==this.Z()&&(n=this.fov.Jl,
q=360);c.oa||(n=Math.max(160,n));e.fov>n&&(e.fov=n);12==this.Z()&&(2*b>q&&(e.fov=q/a),m=this.Nb()/2,2*m>q&&(e.fov=q),m=this.Nb()/2,b=a*m);2*m>this.u.max-this.u.min&&180>this.u.max-this.u.min&&(m=(this.u.max-this.u.min)/2,e.fov=this.ln(2*m));90>this.u.max?e.u+m>this.u.max&&(e.u=this.u.max-m):e.u>this.u.max&&(e.u=this.u.max);-90<this.u.min?e.u-m<this.u.min&&(e.u=this.u.min+m):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(m*Math.PI/180),q=Math.tan((Math.abs(e.u)+m)*Math.PI/180),q=Math.sqrt(q*q+1)/Math.sqrt(n*n+1),m=180*Math.atan(q*Math.tan(b*Math.PI/180))/Math.PI,2*m>c&&(q=Math.tan(c*Math.PI/360)/Math.tan(b*Math.PI/180),c=q*Math.sqrt(n*n+1),q=Math.sqrt(c*c-1),a=180/Math.PI*Math.atan(q)),e.pan+m>this.pan.max&&(e.pan=this.pan.max-m,h.active&&(h.speed=-h.speed,this.pan.d=0)),e.pan-m<this.pan.min&&(e.pan=this.pan.min+m,h.active&&(h.speed=
-h.speed,this.pan.d=0)),e.u+b>a&&(e.u=a-b),e.u-b<-a&&(e.u=-a+b))}};f.prototype.Jg=function(e,a,b,c,h){var m=this.N.Gl-1-a,n=this.N.Hl,q="x";switch(e){case 0:q="f";break;case 1:q="r";break;case 2:q="b";break;case 3:q="l";break;case 4:q="u";break;case 5:q="d";break;case "vr":q="vr"}h&&(e+="l",q+="l");h=this.o.yp;for(var r=0;3>r;r++)n=h(n,"c",e),n=h(n,"s",q),n=h(n,"r",a),n=h(n,"l",m),n=h(n,"x",b),n=h(n,"y",c),n=h(n,"v",c),n=h(n,"h",b);return this.o.hb(n)};f.prototype.us=function(e,a,b){b.fx=e.width/
this.N.V*a.zh;b.fy=e.height/this.N.V*a.Ah;b.Id=e.width/this.N.V*a.Wh;b.Jd=e.height/this.N.V*a.Xh;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.cv=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 z.Ua(-1,-1,-1,0,0));b.push(new z.Ua(1,-1,-1,1,0));b.push(new z.Ua(1,1,-1,1,1));b.push(new z.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].Ff(-this.pan.m),b[c].de(this.u.m),b[c].Gf(this.W.m);b=this.o.Ik(b);a.pc=0<b.length;if(a.pc){a=a.fi;a.zh=b[0].Nd;a.Wh=b[0].Nd;a.Ah=b[0].jc;a.Xh=b[0].jc;for(c=1;c<b.length;c++)a.zh=Math.min(a.zh,b[c].Nd),a.Wh=Math.max(a.Wh,b[c].Nd),a.Ah=Math.min(a.Ah,b[c].jc),a.Xh=Math.max(a.Xh,b[c].jc);a.Ji=a.Wh-a.zh;a.qk=a.Xh-a.Ah;a.scale=Math.max(a.Ji,
a.qk)}else a.fi.Ji=-1,a.fi.qk=-1}};f.prototype.Vo=function(){for(var e=0;e<this.N.levels.length;e++){var a=this.N.levels[e],b;for(b in a.Ma)a.Ma.hasOwnProperty(b)&&(a.Ma[b].visible=!1)}};f.prototype.Mn=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.N.Uo:this.N.To);this.N.levels.length>=e+2&&!this.N.levels[e+1].Df&&this.N.levels[e+1].width>c;)e++;return e};f.prototype.Ht=function(){if(this.o.J.Cp&&
this.o.J.$d){var e=this.Sl;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.la.dm=.3;this.update()}else this.o.la.dm=0}else this.ef();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.ib()){for(;360<this.pan.m;)this.pan.m-=360;for(;-360>this.pan.m;)this.pan.m+=360}};return f}();z.Fq=v})(ggP2VR||(ggP2VR={}));var U=!1;
(function(z){var x=function(){return function(){this.fov=this.u=this.pan=0}}(),v=function(){return function(){this.un=-1E7;this.Co=!1}}(),f=function(){function e(a,b){this.$s="TGljZW5zZTogRGltaXRyaW9zIENoaW90aXM=";this.M=new z.Fq(this);this.pan=this.M.pan;this.u=this.M.u;this.W=this.M.W;this.oc=this.M.oc;this.fov=this.M.fov;this.Kd=0;this.Ya=this.M.Ya;this.C={width:10,height:10};this.Qk=new z.Ua;this.crossOrigin="anonymous";this.Xd=this.Mf=0;this.hd=1;this.wq={};this.Fg=this.Fd=!1;this.Ra={};this.ii=this.oh="";this.Tl=[];this.Dl=
!1;this.ja={start:{x:0,y:0},qa:{x:0,y:0},ae:{x:0,y:0},m:{x:0,y:0},ia:{x:0,y:0}};this.T={Wc:!1,kd:!1,tj:function(){return this.kd||this.Wc},Nn:0,startTime:0,start:{x:0,y:0},qa:{x:0,y:0},ae:{x:0,y:0},m:{x:0,y:0},ia:{x:0,y:0},gi:!1,Gg:null};this.kf=this.we=!0;this.la={enabled:!0,qa:{x:0,y:0},ia:{x:0,y:0},dm:0,fov:{active:!1,nc:0,center:{enabled:!1,x:0,y:0}}};this.ob={alpha:0,beta:0,gamma:0,orientation:0,zf:0,ni:!0,fadeIn:0};this.Hh={alpha:0,beta:0,gamma:0,orientation:0};this.A={src:[],df:4,width:640,
height:480,Tc:!1,ng:!1,Yj:!0,um:!1,level:1,ve:"loop",ak:"",j:null,Cm:!1,texture:null,lk:null,Bi:null,qj:null,format:1,Gh:0,flipY:1,fb:function(){return 0},fm:function(){},loop:function(){return!1}};this.wj=0;this.control=this.tb=this.Ia=this.$=this.Gc=this.bb=this.ea=null;this.wd=[];this.ub=!1;this.qh=1;this.va=null;this.oe=this.Ye=this.qf=!1;this.bh=0;this.Qd=.02;this.xk=0;this.yk=!1;this.wk=this.Ni=this.dh=this.Xe=this.en=0;this.cn=-1;this.xc="";this.bm=this.Oe=!1;this.ei=0;this.mh=[];this.Ok="";
this.nh=[];this.Kg=this.Te=1;this.xg=!1;this.v={enabled:!1,timeout:5,active:!1,Eg:!1,speed:.4,ek:0,Bo:!1,Gj:0,cp:!0,tg:"",bp:!1,Sg:!1,ad:!1,Oi:"",sn:!1,Rd:"Animation01",Of:!1,Dj:!1,ym:!1,startTime:0,nd:0,yh:!1,Wi:!1,zj:0,Hd:0,Sh:0,Th:0,Rh:0,Qo:0};this.F={active:!1,aborted:!1,speed:.1,pan:0,u:0,W:0,fov:70,Ai:70,Sh:0,Th:0,Ro:0,Rh:0,qb:0,ji:0,Fl:0,Mm:!1,sg:!1,bn:0,an:0,pj:!1};this.mk=null;this.wf={pan:-1,u:-1,fov:-1};this.El=0;this.Ki=this.ha=null;this.Tg={};this.Ug={};this.Lf={};this.pb={};this.Ga=
{};this.te=[];this.dn={};this.sc={};this.Vc={};this.qg={};this.L={mode:1,Ph:-1,Ca:0,lb:0,ud:.05,Yb:255,Xb:1,Wb:255,Vb:.3,De:!0,ck:{enabled:!0,width:180,height:20,dk:0,bk:1,background:!0,Wb:16777215,Vb:1,Yb:0,Xb:1,Ak:3,Pi:1,rk:!0},Rb:[],Bc:[],sd:[],Wj:[]};this.Fa=null;this.K=[];this.Up=!1;this.X=[];this.U=[];this.Xa=[];this.Ub=[];this.Ve=[];this.$a=[];this.xa=[];this.If=[];this.Yd=this.Xc=!1;this.vi=-1;this.ba=1;this.sa=this.Le=this.$b=this.mc=null;this.vh={};this.Sb={};this.eq=this.Hg="";this.cq=
-1;this.ga=null;this.Bt={target:0,current:0,ud:.01,delay:2,Vk:0,Xi:!1,Xq:!1};this.margin={left:0,top:0,right:0,bottom:0};this.J={Vh:!1,bt:!1,rc:!1,He:!1,$d:!0,Fo:!1,tm:1,Cp:!1,Nf:!0,Sk:!0,kh:!0,lh:!0,Ui:!1,kg:!1,Dp:!0,sensitivity:8};this.Yh=[];this.rh=!0;this.ca={x:0,y:0};this.Ii=this.Pg=this.Og=this.me=this.oa=!1;this.kk=this.jv=!0;this.tl=this.kv=!1;this.xe=!0;this.Qg=this.ql=this.sl=!1;this.rq=!0;this.vl=!1;this.mb=this.re="";this.bc="transition";this.Bd="transform";this.Wf="perspective";this.tr=
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.Cb={width:0,height:0};this.Sn=new z.Ua;this.Rn=new z.Ua;this.Tn=new z.Ua;this.Un=new z.Ua;this.Qn=new z.Ua;this.Gd=!1;this.hc=this.Po=this.ra="";this.nk=[];this.Ml=[];this.Mh=this.Go=this.Kh=this.Ho=this.Al=this.md=this.Ko=this.yl=this.em=this.Lc=this.uj=this.lg=this.zl=this.Io=this.Bl=this.Mo=this.ol=!1;this.Hi=!0;this.Qj=this.sj=
!1;this.Ih=[15,0,0];this.devicePixelRatio=1;this.fa=this.D=null;this.hh=!1;this.Za=null;this.Ea={enabled:!1,speed:1,running:!1,finished:!0,Ad:{pan:0,u:0,fov:0,qb:0,qq:!1}};this.Ll=!1;this.Bj="<<LOG>>";this.Lm=!1;this.jh=function(h,m){if(0==h.length)return h;var n;var q=[];var r=m.Nj(h[0])-0;for(n=0;n<h.length;n++){var t=n;var w=n+1;w==h.length&&(w=0);var y=m.Nj(h[w])-0;if(0<=r&&0<=y)q.push(h[t]);else if(0<=r||0<=y){var C=y/(y-r);0>C&&(C=0);1<C&&(C=1);var F=new z.Ua;F.Zd(h[t],h[w],C);0>r||q.push(h[t]);
q.push(F)}r=y}return q};this.Sl=new x;this.sm=0;this.li="";this.yc=!1;this.yj=-1;this.bs=function(h){return h?this.Lh()&&(h.clientX||h.clientY)?{x:h.clientX,y:h.clientY}:h.pageX||h.pageY?{x:h.pageX,y:h.pageY}:h.clientX||h.clientY?{x:h.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:h.clientY+document.body.scrollTop+document.documentElement.scrollTop}:h.touches&&h.touches[0]?{x:h.touches[0].pageX,y:h.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.ye=function(h){h=this.bs(h);var m=
this.Eh();return{x:h.x-m.x,y:h.y-m.y}};this.Fj=1;this.cj=this.No=this.Wk=this.Yl=this.Oj=0;this.Oo=!1;this.Cd=!0;this.tn=[5,0,0];this.gb=new z.Li(this);this.gb.De=!1;this.En();if(7<this.Bj.length){var c=e.ph("bG9n");window[e.ph("Y29uc29sZQ==")][c](e.Cn(this.Bj))}this.Pe(this.gb);this.checkLoaded=this.wd;this.isLoaded=!1;b&&b.hasOwnProperty("webGLFlags")&&b.webGLFlags&&(this.wq=b.webGLFlags);this.na(!1);this.Qa=new z.Bq(this);this.yn(a);this.Wq();this.userdata=this.Tg=this.ag();this.emptyHotspot=this.gb;
this.mouse=this.ca;this.D=new z.Cq(this);this.Za=new z.Dq(this);this.sa=new z.Kq(this);this.M.sa=this.sa;this.Da=new z.Lq(this);this.ic()}e.prototype.vo=function(a){return-99991===a?this.$s:"7.0.10/20025"};e.prototype.Dr=function(){return this.hd};e.prototype.Zt=function(a){0<a&&(this.hd=a)};e.prototype.$g=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 h=b[c],
m;for(m in h)if(this.Ra.translations.hasOwnProperty(m))for(a=0;a<h[m].length-1;a++)""!=h[m][a]&&(this.Ra.translations[m][a]=h[m][a]);else this.Ra.translations[m]=h[m]}else this.Ra[c]=b[c];this.Ra.hasOwnProperty("projectLanguage")&&(this.ii=this.Ra.projectLanguage);this.I("languagechanged",{language:this.oh})}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 h=this.Ra.languages.indexOf(this.oh);
-1!=h&&this.Ra.translations.hasOwnProperty(a)&&(a=this.Ra.translations[a],Array.isArray(a)&&a.length>h&&""!=a[h]&&(c=a[h]))}if(b&&0<b.length)for(h=b.length-1;0<=h;h--)c=c.replace(new RegExp("%"+String(h+1),"g"),b[h]);return c};e.prototype.lm=function(a){this.Dl=!0;a=a.replace("_","-");if("object"===typeof this.Ra&&this.Ra.hasOwnProperty("languages")&&this.Ra.hasOwnProperty("translations")&&this.ii!=a){for(var b=-1,c=-1,h="",m=-1,n=-1,q=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.ii.toUpperCase().startsWith(q)&&this.Ra.languages[r].toUpperCase().startsWith(q)){if(""==h||-1!=h.indexOf("-"))c=r,h=this.Ra.languages[r]}else for(var t=window.navigator.languages,w=0;w<t.length;w++)!this.ii.toUpperCase().startsWith(q)&&this.Ra.languages[r].toUpperCase().startsWith(t[w].substring(0,2).toUpperCase())&&(-1==n||w<n)&&(m=r,n=w);a=-1!=b?b:-1!=c?c:m;a=-1!=a?this.Ra.languages[a]:this.ii}this.oh!=a&&(this.oh=a,this.br(),this.cr(),this.$.setAttribute("lang",
a),this.I("languagechanged",{language:a}))};e.prototype.Sr=function(){return this.oh};e.prototype.qs=function(){return this.Tl};e.prototype.Nk=function(){this.D.enabled=this.fa.enabled;this.D.type=this.fa.type;this.D.da=this.fa.zoomin;this.D.fd=this.fa.zoomout;this.D.fh=this.fa.blendtime;this.D.Xg=this.fa.zoomoutpause;this.D.uk=this.fa.zoomfov;this.D.sk=this.fa.zoomafterinfov;this.D.tk=this.fa.zoomafteroutfov;this.D.Yg=this.fa.zoomspeed;this.D.Pf=this.fa.blendcolor;this.D.Zc=this.fa.softedge;this.fa=
null};e.prototype.tu=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.fd;this.fa.blendtime=this.D.fh;this.fa.zoomoutpause=this.D.Xg;this.fa.zoomfov=this.D.uk;this.fa.zoomafterinfov=this.D.sk;this.fa.zoomafteroutfov=this.D.tk;this.fa.zoomspeed=this.D.Yg;this.fa.blendcolor=this.D.Pf;this.fa.softedge=this.D.Zc;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.hh||this.Nk()};e.prototype.sb=function(a,b,c){this.M.sb(a,b,c)};e.prototype.Z=function(){return this.M.Z()};e.prototype.Dh=function(){return this.M.Dh()};e.prototype.Ic=function(){return this.M.Ic()};e.prototype.jj=function(){return this.M.jj()};e.prototype.Fk=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Uc("Unsupported projection type: "+a);else if(this.oa||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.Bh(a);c.fov=Math.min(a,c.fov);this.Ej(c)}};e.prototype.addListener=function(a,b){(this.vh[a]=this.vh[a]||[]).push(b)};e.prototype.I=function(a,b){if(a=this.vh[a])for(var c=a.length,h=0;h<c;h++)try{a[h].apply(null,[b])}catch(m){this.Uc(m)}};e.prototype.removeEventListener=function(a,b){var c=this.vh[a];if(c){var h;var m=0;for(h=c.length;m<h;m++)if(c[m]===b){1===h?delete this.vh[a]:c.splice(m,1);break}}};e.prototype.St=function(){this.ub=
!0};e.prototype.Fs=function(){return this.S};e.prototype.Rq=function(a,b,c,h){if(!this.Sb.hasOwnProperty(a)){var m=new v;this.Sb[a]=m;m.type=b;"undefined"!==typeof c&&this.Qe(a,c);"object"===typeof h&&this.Pp(a,h);return!0}return!1};e.ao=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.wu=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.Pp=function(a,b){if(this.Sb.hasOwnProperty(a)&&"object"===typeof b){var c=this.Sb[a];b.hasOwnProperty("cookiePath")&&(c.vn=String(b.cookiePath));b.hasOwnProperty("cookieExpireDays")&&(c.un=parseFloat(b.cookieExpireDays));if(b.hasOwnProperty("keep")&&(c.Cl=!!b.keep,c.Cl&&0<document.cookie.length))if(""!=
this.Hg){if(-1!=document.cookie.indexOf(this.Hg+"=")){var h=JSON.parse(z.kc.ao(this.Hg));h.hasOwnProperty(a)&&this.Qe(a,h[a])}}else h="ggvar_"+a,-1!=document.cookie.indexOf(h+"=")&&(h=z.kc.ao(h),this.Qe(a,h));b.hasOwnProperty("ignoreInState")&&(c.Co=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,ki:b.propertyType,Uk:b.defaultValue});return!0}return!1};e.prototype.su=function(a,b){this.Hg=a;b&&"object"===typeof b&&(b.hasOwnProperty("cookiePath")&&(this.eq=String(b.cookiePath)),b.hasOwnProperty("cookieExpireDays")&&(this.cq=parseFloat(b.cookieExpireDays)))};e.fn=function(a,b,c){-1<=b&&(a+="; max-age="+86400*b);""!=c&&(a+="; path="+c);return a};e.bo=function(a,b){switch(b){case 0:return a;case 1:return a.toString();case 2:return a?"true":"false"}};e.cl=function(a,
b){switch(b){case 0:return a;case 1:return Number(a);case 2:return"true"==a}};e.prototype.Qe=function(a,b,c){void 0===c&&(c=!0);if(void 0===b)return!1;var h=!1;this.Ga.hasOwnProperty(a)&&(0==this.Ga[a].ki?(this.Np(this.ra,a,b),h=!0):1==this.Ga[a].ki&&this.P&&(this.km(this.ra,this.P.id,a,b),h=!0));if(this.Sb.hasOwnProperty(a)){var m=this.Sb[a];if(m.value!=b){z.kc.wu(m,b);if(m.Cl&&c){if(""!=this.Hg){m={};for(var n=0,q=Object.keys(this.Sb);n<q.length;n++)c=q[n],this.Sb[c].Cl&&(m[c]=encodeURIComponent(this.Sb[c].value.toString()));
c=this.Hg+"="+JSON.stringify(m);c=z.kc.fn(c,this.cq,this.eq)}else c="ggvar_"+a+"="+encodeURIComponent(b.toString()),c=z.kc.fn(c,m.un,m.vn?m.vn:"");document.cookie=c}h||this.I("varchanged_"+a,{value:b})}return!0}return!1};e.prototype.lj=function(a,b){return 0==b?this.Va(a):a};e.prototype.ml=function(a,b){void 0===b&&(b="");if(this.Ga.hasOwnProperty(a)){if(0==this.Ga[a].ki)return this.no(this.ra,a);if(1==this.Ga[a].ki){if(""!=b||this.P&&this.P!=this.gb)return this.fl(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.ph=function(a){var b="",c=0;a=a.replace(/[^A-Za-z0-9+\/=]/g,"");do{var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));
h=h<<2|m>>4;m=(m&15)<<4|n>>2;var r=(n&3)<<6|q;b+=String.fromCharCode(h);64!=n&&(b+=String.fromCharCode(m));64!=q&&(b+=String.fromCharCode(r))}while(c<a.length);return b};e.Pu=function(a){for(var b=[1,1,1,1,2,2,3,0],c=a.length,h="",m=0;m<c;){var n=a.charCodeAt(m++);if(n&128){var q=b[n>>3&7];if(!(n&64&&q)||m+q>c)return null;for(n&=63>>q;0<q;--q){var r=a.charCodeAt(m++);if(128!=(r&192))return null;n=n<<6|r&63}}h+=String.fromCharCode(n)}return h};e.Cn=function(a){return e.Pu(e.ph(a))};e.prototype.En=
function(){this.devicePixelRatio=window.devicePixelRatio||1;this.Mo=!!navigator.userAgent.match(/(Windows|Win)/g);this.Bl=!!navigator.userAgent.match(/(Mac|Macintosh|Mac_powerpc)/g)&&!navigator.userAgent.match(/(like Mac)/g);this.Io=!!navigator.userAgent.match(/(Linux|Ubuntu)/g);this.zl=!!navigator.userAgent.match(/(MSIE)/g);this.lg=!!navigator.userAgent.match(/(Edge|EdgA|Edg)/g);this.uj=!!navigator.userAgent.match(/(Firefox)/g);if(this.Lc=!!navigator.userAgent.match(/(Safari)/g)){var a=navigator.userAgent.indexOf("Safari");
this.Yc=navigator.userAgent.substring(a+7);a=navigator.userAgent.indexOf("Version");-1!=a&&(this.Yc=navigator.userAgent.substring(a+8));this.Yc=this.Yc.substring(0,this.Yc.indexOf(" "));this.Yc=this.Yc.substring(0,this.Yc.indexOf("."));this.em=!0}this.Ko=!!navigator.userAgent.match(/(SamsungBrowser)/g);if(this.yl=!!navigator.userAgent.match(/(Chrome|CriOS)/g))this.Lc=!1;this.md=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);this.Al=!!navigator.userAgent.match(/(iPad)/g)||this.Bl&&2<navigator.maxTouchPoints;
this.Ho=!!navigator.userAgent.match(/(iPhone|iPod)/g);this.Kh=!!navigator.userAgent.match(/(android)/i);this.Go=!!navigator.userAgent.match(/(IEMobile)/i);this.Mh=this.md||this.Kh||this.Go||this.Al;navigator.platform&&/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion)&&(a=a.match(/OS (\d+)_(\d+)_?(\d+)?/))&&3<a.length&&(this.Ih=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);this.sj=!window.requestAnimationFrame;a=["Webkit","Moz","O","ms","Ms"];this.mb="";this.bc="transition";
this.Bd="transform";this.Wf="perspective";for(var b=0;b<a.length;b++)"undefined"!==typeof document.documentElement.style[a[b]+"Transform"]&&(this.mb="-"+a[b].toLowerCase()+"-",this.bc=a[b]+"Transition",this.Bd=a[b]+"Transform",this.Wf=a[b]+"Perspective");this.tl=p();this.oa=O();this.Og=this.tl;this.oa&&(this.Og=!1);this.Oe=!0;this.bm=!1;if(this.md||this.Kh)this.Lp(80),this.M.Dm=2;this.Uc("Pano2VR player "+this.vo()+" - Prefix:  "+this.mb+", "+(this.tl?"CSS 3D available":"CSS 3D not available")+", "+
(this.oa?"WebGL available":"WebGL not available"));U&&this.G("Pano2VR Debug version!");this.kr();this.Hi=this.Ho?this.Lc&&this.em&&10<=Number(this.Yc)?!0:!1:!0};e.prototype.kr=function(){if(!this.ga){this.G("Create Audio Context!");try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.ga=new AudioContext}catch(a){this.ga=null}this.Lc&&(!this.em||9>Number(this.Yc))&&(this.ga=null);this.Lc&&!this.md&&12<=Number(this.Yc)&&13>Number(this.Yc)&&(this.ga=null);this.Lc&&this.md&&13==
Number(this.Ih[0])&&(1==Number(this.Ih[1])||2<=Number(this.Ih[1]))&&(this.ga=null)}};e.prototype.G=function(a){if(U){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.log(a)}};e.prototype.Rm=function(a){if(U){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.Lp=function(a){this.M.rg=a};e.prototype.setCrossOrigin=function(a){this.crossOrigin=a};e.prototype.cu=function(a){this.Ee=a};e.prototype.ls=function(){return this.ei};e.prototype.au=function(a){this.re=a};e.prototype.$n=function(){return this.re};e.prototype.il=function(){return this.Mh};e.prototype.eo=function(){return this.vl};e.prototype.Rr=function(){return this.Gd};e.prototype.hs=function(){return this.Gd?this.mo().length:1};e.prototype.Or=function(){return this.v.active};
e.prototype.eu=function(a){this.Mh=!!a};e.prototype.fj=function(){return this.isLoaded};e.prototype.Qr=function(){return!this.isLoaded};e.prototype.mf=function(){return Number(this.C.height)/(2*Math.tan(Math.PI/180*(this.Nb()/2)))};e.prototype.Qp=function(a,b){try{this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var c=a-this.margin.left-this.margin.right,h=b-this.margin.top-this.margin.bottom;if(!(10>c||10>h)){var m=window.devicePixelRatio||1;this.xg&&(m=1);this.ea.style.width=c+"px";
this.ea.style.height=h+"px";this.ea.style.left=this.margin.left+"px";this.ea.style.top=this.margin.top+"px";if(this.oa)try{this.bb&&(this.bb.style.position="absolute",this.bb.style.display="inline",this.bb.style.width=c+"px",this.bb.style.height=h+"px",this.bb.width=c*m,this.bb.height=h*m),this.S&&(this.Cb.width=c*m,this.Cb.height=h*m,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.tb.style.width=a+"px",this.tb.style.height=b+"px",this.tb.width=a,this.tb.height=b,this.tb.style.left=this.margin.left+"px",this.tb.style.top=this.margin.top+"px",this.va&&this.va!=this.Ia&&(this.va.style.width=a+"px",this.va.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.qf&&
(this.ub=!0);var q=this.ea.offsetWidth,r=this.ea.offsetHeight;if(this.C.width!=q||this.C.height!=r)this.C.width=q,this.C.height=r;this.hv();this.va&&this.va.ggUpdateSize&&this.va.ggUpdateSize(a,b);this.I("sizechanged",{w:a,h:b});this.I("playerstatechanged",{})}}catch(t){this.Rm(t)}};e.prototype.le=function(){this.Lm=!0};e.prototype.ic=function(){this.Qp(this.mc.offsetWidth,this.mc.offsetHeight)};e.prototype.Es=function(){var a={width:0,height:0};a.width=this.C.width;a.height=this.C.height;return a};
e.prototype.Eh=function(){var a={x:0,y:0},b=this.ea.getBoundingClientRect();a.x=b.left;a.y=b.top;this.Lc&&14>Number(this.Yc)&&(a.x=b.left+window.scrollX,a.y=b.top+window.scrollY);return a};e.prototype.ru=function(a){this.ha=a};e.prototype.fu=function(a,b,c,h){this.margin.left=a;this.margin.top=b;this.margin.right=c;this.margin.bottom=h;this.ha=this.skinObj;this.Ki=this.vrSkinObj;this.le()};e.prototype.fr=function(a){0==a&&(this.J.$d=!1);1==a&&(this.J.$d=!0);2==a&&(this.J.$d=!this.J.$d);this.I("viewmodechanged",
{});this.I("playerstatechanged",{})};e.prototype.Cs=function(){return 1==this.J.$d?1:0};e.prototype.pn=function(a,b){this.L.mode=1==b&&0<this.L.mode?0:Math.round(a);this.update();this.I("polymodechanged",{})};e.prototype.wh=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var c=0;c<this.K.length;c++)"poly"==this.K[c].type&&a.test(this.K[c].id)&&b.push(this.K[c]);return b};e.prototype.Sp=function(a){a=this.wh(a);for(var b=0;b<a.length;b++){var c=this.L.Rb.indexOf(a[b].id);
-1==c?(this.L.Rb.push(a[b].id),this.L.Bc.push(0),this.L.sd.push(1)):this.L.sd[c]=1}this.update()};e.prototype.zo=function(a){a=this.wh(a);for(var b=0;b<a.length;b++){var c=this.L.Rb.indexOf(a[b].id);-1!=c&&(this.L.sd[c]=0,this.L.Wj.push(a[b].id),this.update())}};e.prototype.Uu=function(a){a=this.wh(a);for(var b=0;b<a.length;b++){var c=this.L.Rb.indexOf(a[b].id);-1==c||-1!=c&&0==this.L.sd[c]?this.Sp(a[b].id):this.zo(a[b].id);this.update()}};e.prototype.er=function(a,b,c,h,m){var n=""==a?this.K:this.wh(a);
for(var q=0;q<n.length;q++){var r=n[q];"poly"==r.type&&(r.Wb=b,r.Vb=c,r.Yb=h,r.Xb=m)}""==a&&(this.L.Wb=b,this.L.Vb=c,this.L.Yb=h,this.L.Xb=m);this.update()};e.prototype.iu=function(a,b){var c=""==a?this.K:this.wh(a);for(var h=0;h<c.length;h++){var m=c[h];"poly"==m.type&&(m.De=b)}""==a&&(this.L.De=b);this.update()};e.prototype.dr=function(a){this.Qa&&(this.Qa.pm=0==a?!0:1==a?!1:!this.Qa.pm,this.update())};e.prototype.os=function(){return this.L.mode};e.prototype.gr=function(){this.I("viewstatechanged",
{})};e.prototype.Ds=function(){return 0};e.prototype.Yr=function(a){return"_firstmap"==a?"web":"_firstfloorplan"==a?"file":(a=this.sc[a])?a.type:"web"};e.prototype.Xr=function(a){"_firstmap"==a?a=this.co():"_firstfloorplan"==a&&(a=this.ej());return(a=this.sc[a])?a:{}};e.prototype.co=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.es=function(a,b){"_firstfloorplan"==b&&(b=this.ej());var c=[];a||(a=this.ra);var h=this.te[a];h&&(a=h);""===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.fs=function(a,b){"_firstfloorplan"==b&&(b=this.ej());var c=[];a||(a=this.ra);var h=this.te[a];h&&(a=h);""===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.jo=function(a){var b=this.te[a];b&&(a=b);b=this.io();for(var c=[],h=0;h<b.length;h++)this.Vc[a][b[h]]&&c.push(b[h]);return c};e.prototype.Wr=function(a){a=this.jo(a);return 0<a.length?a[0]:""};e.prototype.io=function(){var a=[],b;for(b in this.sc)a.push(b);return a};e.prototype.Ir=function(){var a=[],b;for(b in this.sc)"file"==this.sc[b].type&&a.push(b);return a};e.prototype.Ps=function(){for(var a in this.sc)if("web"==this.sc[a].type)return!0;return!1};
e.prototype.Os=function(){for(var a in this.sc)if("file"==this.sc[a].type)return!0;return!1};e.prototype.yp=function(a,b,c){var h=(new RegExp("%0*"+b,"i")).exec(a.toString());if(h){h=h.toString();var m=c.toString();h.charAt(h.length-1)!=b&&(m=(1+c).toString());if(!isNaN(parseFloat(c)))for(;m.length<h.length-1;)m="0"+m;a=a.replace(h,m)}return a};e.prototype.Ts=function(a,b,c){a=Math.atan2(a+1,c);var h=Math.atan2(b+1,c);b=Math.sin(a);c=Math.sin(h);a=Math.cos(a);h=Math.cos(h);this.Sn.init(0,0,-1);this.Rn.init(a,
0,-b);this.Tn.init(-a,0,-b);this.Un.init(0,h,-c);this.Qn.init(0,-h,-c)};e.prototype.Ik=function(a){a=this.jh(a,this.Sn);a=this.jh(a,this.Rn);a=this.jh(a,this.Tn);a=this.jh(a,this.Un);return a=this.jh(a,this.Qn)};e.prototype.nq=function(a){if(!this.Oe&&this.Zs!=a){this.Zs=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.fl=
function(a,b,c){""!==a||this.Gd||(a="node1");a||(a=this.ra);return this.pb.hasOwnProperty(a)&&this.pb[a].hasOwnProperty(b)&&this.pb[a][b].hasOwnProperty(c)?this.lj(z.kc.cl(this.pb[a][b][c],this.Ga[c].Od),this.Ga[c].Od):this.Ga.hasOwnProperty(c)?this.lj(z.kc.cl(this.Ga[c].Uk,this.Ga[c].Od),this.Ga[c].Od):null};e.prototype.km=function(a,b,c,h){""!==a||this.Gd||(a="node1");a||(a=this.ra);h="string"===typeof h?h:z.kc.bo(h,this.Ga[c].Od);this.pb.hasOwnProperty(a)||(this.pb[a]={});this.pb[a].hasOwnProperty(b)||
(this.pb[a][b]={});this.pb[a][b].hasOwnProperty(c)&&this.pb[a][b][c]==h||(this.pb[a][b][c]=h,this.I("varchanged_"+c,{}))};e.prototype.Hr=function(a){return this.Ga.hasOwnProperty(a)?this.Ga[a].Uk:null};e.prototype.fo=function(){return this.D.ke||this.D.Md||this.oa&&(4!=this.Z()||0!=this.Ic())?!1:!0};e.prototype.Hm=function(){var a=new z.Ua(0,0,-100),b=this.mf(),c=this.M.N;var h=100/this.fov.m;var m=c.width/c.height;c=this.C.height*h*m;h*=this.C.height;for(var n=this.fo(),q=0;q<this.K.length;q++){var r=
this.K[q];if("point"==r.type){var t=!1;if(this.ib()){var w=(this.pan.m-r.pan)/100/m*c;var y=(this.u.m-r.u)/100*h;Math.abs(w)<this.C.width/2+500&&Math.abs(y)<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?(y=-b/a.z,w=a.x*y,y*=a.y,Math.abs(w)<this.C.width/2+5E3&&Math.abs(y)<this.C.height/2+5E3&&(t=!0)):y=w=-1E4;r.fc=w+this.C.width/2;r.Qb=y+this.C.height/2;r.Ul=
r.fc/this.C.width*100;r.Vl=r.Qb/this.C.height*100;r.visible=t;r.px=r.fc;r.py=r.Qb;r.pxp=r.Ul;r.pyp=r.Vl;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.bc]&&(r.j.__div.style[this.bc]="none"),t&&n?(r.j.ggUse3d?(this.Oe||this.nq(b),this.ib()?(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+
y+this.C.height/2+"px"):(r.j.__div.style.width="1px",r.j.__div.style.height="1px",w="",this.Oe&&(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.Up?(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,"+y+"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+y+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.ib())for(r.Bf=[],t=0;t<r.vertices.length;t++)y=r.vertices[t],w=(this.pan.m-y.pan)/100/m*c,y=(this.u.m-y.u)/100*h,w+=this.margin.left+this.C.width/2,y+=this.margin.top+this.C.height/2,r.Bf.push({fc:w,Qb:y});else{for(t=0;t<r.vertices.length;t++)y=r.vertices[t],
a.init(0,0,-100),a.Ka(-y.u*Math.PI/180),a.Oa(y.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.Ik(C);if(0<C.length)for(t=0;t<C.length;t++)a=C[t],.1>a.z?(y=-b/a.z,w=this.C.width/2+a.x*y,y=this.C.height/2+a.y*y):y=w=0,a.fc=w,a.Qb=y;r.Bf=C}}}this.I("hotspotsupdated",{})};e.prototype.Gr=function(){for(var a=[],b=0;b<this.K.length;b++){var c=this.K[b];"point"==c.type&&c.j&&c.j.__div&&a.push(c.j.__div)}return a};e.prototype.pa=
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.Dt=function(){var a;if(this.tb&&(this.L.Ph!=this.L.mode&&(this.L.Ph=this.L.mode,this.tb.style.visibility=0<this.L.mode?"inherit":"hidden"),0<=this.L.mode||0<this.L.Rb.length)){this.Ib||(this.Ib=this.tb.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.tb.width,this.tb.height);var b=1;0>=this.L.mode&&(b=0);3==this.L.mode&&(b=this.L.Ca);for(a=0;a<this.K.length;a++){var c=this.K[a];var h=b;if("poly"==c.type){var m=c.Bf;2==this.L.mode&&(h=c.Ca);var n=this.L.Rb.indexOf(c.id);-1!=n&&(h=this.L.Bc[n]);this.Ib.fillStyle=this.pa(c.Wb,c.Vb*h);this.Ib.strokeStyle=this.pa(c.Yb,c.Xb*h);if(0<m.length){this.Ib.beginPath();for(c=0;c<m.length;c++)h=m[c],0==c?this.Ib.moveTo(h.fc,h.Qb):this.Ib.lineTo(h.fc,h.Qb);this.Ib.closePath();this.Ib.stroke();
this.Ib.fill()}}}}};e.Ao=function(a,b,c){var h,m=!1;var n=0;for(h=a.length-1;n<a.length;h=n++){var q=a[n];h=a[h];q.Qb>c!=h.Qb>c&&b<(h.fc-q.fc)*(c-q.Qb)/(h.Qb-q.Qb)+q.fc&&(m=!m)}return m};e.prototype.Ti=function(a,b){var c=-1;if((0<=this.L.mode||0<this.L.Rb.length)&&this.Jo())for(var h=0;h<this.K.length;h++){var m=this.K[h];"poly"==m.type&&m.Bf&&0<m.Bf.length&&(-1!=this.L.mode||-1!=this.L.Rb.indexOf(m.id))&&z.kc.Ao(m.Bf,a,b)&&(c=h,m.fc=a,m.Qb=b)}return 0<=c?this.K[c]:!1};e.prototype.Jo=function(){return 4==
this.Z()&&0==this.Ic()};e.prototype.aspect=function(){return this.C.width/this.C.height};e.prototype.ef=function(){this.M.ef()};e.prototype.update=function(a){void 0===a&&(a=0);this.ub=!0;a&&(this.qh=Math.max(1*a,this.qh))};e.prototype.ho=function(){return 0<this.M.Ci||0<this.M.je};e.prototype.Gi=function(){var a=Date.now();if(this.ib())this.Hm(),this.oa&&(this.sa.dv(),this.sa.jp());else if(0===this.Kd)if(!this.oa||4==this.Z()&&0==this.Ic()){var b=this.mf();this.Ts(this.C.width/2,this.C.height/2,
b);this.Hm();this.Ii?this.sa.gv():this.jv&&this.pq();this.Im();this.oa?(this.A.Tc?14==this.A.format?this.sa.fv():this.sa.xq():0<this.M.N.levels.length?this.sa.pv():this.sa.rv(),this.sa.jp()):(this.Pg&&this.av(),this.Dt());this.Qa&&this.Qa.Ct()}else this.sa.xq(),this.Hm(),this.Qs();b=Date.now();50<b-a?(this.G("Time between frames: "+(b-a)),this.xg||(2<this.sm?(this.xg=!0,this.G("disabling HighDPI rendering"),this.ic()):this.sm++)):this.sm=0;this.qf&&this.M.N.xp++;this.oa&&(a=this.S,a.disable(a.BLEND),
a.disable(a.STENCIL_TEST),a.disable(a.DEPTH_TEST),a.disable(a.CULL_FACE))};e.prototype.av=function(){this.ef();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,h=a.createRadialGradient(b,c,5,b,c,Math.max(b,c));h.addColorStop(0,"#333");h.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);a.fillStyle=
h;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.Tg.title,b,c+60)}};e.prototype.ku=function(a){a=Math.round(a);this.Oe=0<(a&1);this.bm=0<(a&2);this.kk=0<(a&4);this.xg=0<(a&8);4096<=a&&(this.Og=0<(a&4096),this.oa=0<(a&8192),this.Pg=0<(a&32768))};e.prototype.rs=function(){var a=
0;this.Oe&&(a|=1);this.bm&&(a|=2);this.kk&&(a|=4);this.Og&&(a|=4096);this.oa&&(a|=8192);this.Pg&&(a|=32768);return a};e.prototype.Im=function(){var a=Math.round(this.mf());this.Oe||this.nq(a);for(var b=0;b<this.Xa.length;b++){var c=this.Xa[b];c.Jm(a);c.j.hidden=!1}for(b=0;b<this.Ub.length;b++)c=this.Ub[b],c.Jm(a),c.j.hidden=!1};e.prototype.pq=function(){for(var a=Math.round(this.mf()),b=0;b<this.U.length;b++){var c=this.U[b];c.qd||(c.Jm(a),c.j.hidden=!1)}};e.prototype.Qs=function(){for(var a=0;a<
this.Xa.length;a++){var b=this.Xa[a];b.Hf(!1)}for(a=0;a<this.U.length;a++)b=this.U[a],b.qd||b.Hf(!1);for(a=0;a<this.Ub.length;a++)b=this.Ub[a],b.Hf(!1)};e.prototype.hv=function(){try{for(var a=0;a<this.mj();a++){var b=this.nl(a);b.qd||b.le()}}catch(c){this.Rm(c)}};e.prototype.Sc=function(a){this.xe=!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 h=
window.devicePixelRatio||1;this.xg&&(h=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*h;this.bb.height=c*h;this.bb.style.display="none";this.bb.style.touchAction="none";this.ea.insertBefore(this.bb,this.ea.firstChild);var m=this.wq;m.stencil=!0;m.depth=!0;m.powerPreference="high-performance";m.alpha=this.Lc?!0:!1;this.md&&10<=this.Ih[0]&&(m.antialias=!1,m.alpha=!1);a={};a.flags=m;a.canvas=this.bb;this.I("beforewebglcontext",
a);this.S=this.bb.getContext("webgl",m);this.S||(this.S=this.bb.getContext("experimental-webgl",m));if(this.S){var n=this.S;this.Cb.width=b*h;this.Cb.height=c*h;n.clearColor(0,0,0,0);n.enable(this.S.DEPTH_TEST);n.viewport(0,0,500,500);n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT);4096<=n.getParameter(n.MAX_TEXTURE_SIZE)&&!this.Mh&&(this.M.rg=1<h?4*this.M.rg:2*this.M.rg);this.G("Max tile cnt: "+this.M.rg);this.sa.Jh();this.sa.rj();this.sa.Do(this.Kg);this.sa.Eo();this.D&&(this.D.Jh(),this.D.Sc());
this.Qa&&(this.Qa.Jh(),this.Qa.Sc())}}catch(q){this.G(q)}this.S?(this.oa=!0,this.I("webglready",{gl:this.S})):alert("Could not initialise WebGL!")};e.prototype.ju=function(a){this.li=a};e.prototype.getQueryParameter=function(){return this.li};e.prototype.hb=function(a){if(a){if("{"==a.charAt(0)||"/"==a.charAt(0)||0<a.indexOf(":"))return a;""!=this.li&&(a=-1==a.indexOf("?")?a+("?"+this.li):a+("&"+this.li));return this.re+a}return this.re};e.prototype.nf=function(){return this.pan.m};e.prototype.ks=
function(){return this.F.pan};e.prototype.hj=function(){return this.M.hj()};e.prototype.Wd=function(){return this.M.Wd()};e.prototype.ib=function(){return this.M.ib()};e.prototype.ee=function(a){this.na(!1);isNaN(a)||(this.pan.m=Number(a));this.update()};e.prototype.Vj=function(a){this.na(!1);isNaN(a)||(this.pan.m=Number(a)+this.pan.Hj);this.update()};e.prototype.Ri=function(a,b){isNaN(a)||(this.ee(this.nf()+a),b&&(this.pan.d=a))};e.prototype.nn=function(a,b){this.Ri(a*this.lf(),b)};e.prototype.gg=
function(){return this.u.m};e.prototype.vs=function(){return this.F.u};e.prototype.fe=function(a){this.na(!1);isNaN(a)||(this.u.m=Number(a));this.update()};e.prototype.Si=function(a,b){this.fe(this.gg()+a);b&&(this.u.d=a)};e.prototype.qn=function(a,b){this.Si(a*this.lf(),b)};e.prototype.Ag=function(a){this.M.Ag(a)};e.prototype.kj=function(){return this.M.kj()};e.prototype.Dd=function(){return this.M.Dd()};e.prototype.Nb=function(){return this.M.Nb()};e.prototype.el=function(a,b){return this.M.el(a,
b)};e.prototype.dl=function(a,b){return this.M.dl(a,b)};e.prototype.Jr=function(){return this.F.Ai};e.prototype.Ab=function(a){return this.M.Ab(a)};e.prototype.im=function(a){this.M.im(a)};e.prototype.ti=function(a){this.M.ti(a)};e.prototype.jm=function(a){this.M.jm(a)};e.prototype.gm=function(a){this.M.gm(a)};e.prototype.hm=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.ib()?-a:a*Math.cos(c.tilt*Math.PI/180);this.pan.ac-=a;this.u.ac+=b;this.nm(this.pan.m-a,this.u.m+b)}}};e.prototype.Ek=function(a,b){return this.Ab(this.Dd()+a)?(b&&(this.fov.d=a),!0):!1};e.prototype.ar=function(a,b){this.hm(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.mn=function(a,b,c){if(!isNaN(a)){var h=a/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/
360);h=this.fov.m*Math.exp(h);this.hm(h,b);c&&(this.fov.d=a,this.fov.Pc.enabled=!0,this.fov.Pc.x=b.x,this.fov.Pc.y=b.y)}};e.prototype.nm=function(a,b){this.na(!1);isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);this.update()};e.prototype.Op=function(a,b,c){this.na(!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.zg=function(a,b,c){this.na(!1);isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);isNaN(c)||
this.Ab(c);this.update()};e.prototype.Fp=function(){this.zg(this.pan.Ha,this.u.Ha,this.fov.Ha)};e.prototype.setLocked=function(a){this.Jp(a);this.Kp(a);this.Ip(a)};e.prototype.Jp=function(a){this.J.rc=!!a};e.prototype.Ip=function(a){this.J.Vh=!!a};e.prototype.Vr=function(){return this.J.Vh};e.prototype.Kp=function(a){this.J.He=!!a};e.prototype.Nr=function(){return this.la.enabled};e.prototype.du=function(a){var b=this.la;a&&(b.ia.x=0,b.ia.y=0);b.enabled=!!a};e.prototype.Gs=function(){return this.J.Nf};
e.prototype.zu=function(a){this.J.Nf=a};e.prototype.Tj=function(a){this.yc=!!a};e.prototype.Kr=function(){return this.ul()?!0:this.ql};e.prototype.uu=function(a,b){void 0===b&&(b=!0);this.rq=b;this.Qg==!a&&(a&&this.ul()?this.zp():((this.Qg=!!a)?this.ob.ni=!0:this.W.m=0,this.I("gyrochanged",{}),this.I("playerstatechanged",{})))};e.prototype.ul=function(){return window.hasOwnProperty("DeviceOrientationEvent")&&DeviceOrientationEvent.hasOwnProperty("requestPermission")&&"function"===typeof DeviceOrientationEvent.requestPermission?
!0:!1};e.prototype.zp=function(){var a=this;if(this.ul())try{DeviceOrientationEvent.requestPermission().then(function(b){"granted"===b&&(a.ob.ni=!0,a.Qg=!0,a.I("gyrochanged",{}),a.I("playerstatechanged",{}))})["catch"](console.error)}catch(b){console.log(b)}};e.prototype.ws=function(){return this.Qg};e.prototype.js=function(){return this.Kh?5:this.Al?6:this.md?4:this.Mo?1:this.Bl?2:this.Io?3:0};e.prototype.Er=function(){return this.zl?5:this.lg?4:this.uj?2:this.Lc?3:this.yl?1:0};e.prototype.Fr=function(){return window.matchMedia&&
window.matchMedia("(prefers-color-scheme: dark)").matches?1:0};e.prototype.moveTo=function(a,b,c,h,m,n){this.na(!1);if("_blank"!==a&&""!==a){this.F.active=!0;this.F.aborted=!1;this.F.Mm=!1;var q=a.toString().split("/");1<q.length&&(a=Number(q[0]),h=Number(b),b=Number(q[1]),2<q.length&&(c=Number(q[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(h)&&0<h?Number(h):1;this.F.W=isNaN(m)?this.W.m:
Number(m);void 0!==n?!a||4!=n&&12!=n&&9!=n||(this.F.qb=n):this.F.qb=this.Z()}};e.prototype.Ej=function(a){this.na(!1);var b=0,c=0,h=70,m=4,n=0,q=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")&&(h=Number(a.fov),this.F.fov=h);a.hasOwnProperty("projection")&&(m=Number(a.projection),this.F.qb=m);a.hasOwnProperty("timingFunction")&&(n=Number(a.timingFunction));a.hasOwnProperty("speed")&&(q=Number(a.speed));0>=q?
(this.zg(b,c,h),this.sb(m)):(a=new z.Tm,a.cb="__AutoMove",a.Se=this.hj(),a.yi=this.u.m,a.ge=this.fov.m,a.xi=this.Z(),a.Ld=b,a.ie=c,a.Ig=h,a.he=m,a.Xf=!1,a.hf=!1,a.jf=!1,0==n&&(a.hf=!0),1==n&&(a.Xf=!0,a.hf=!0),2==n&&(a.jf=!0),a.speed=q,this.F.an=this.R,this.R=this.Vn(a),this.F.bn=(new Date).getTime(),this.F.Mm=!0,this.F.active=!0,this.F.aborted=!1,this.F.pan=b,this.F.u=c,this.F.fov=h,this.oe=!1)};e.prototype.jt=function(a){this.moveTo(this.pan.Ha,this.u.Ha,this.fov.Ha,a)};e.prototype.kt=function(a,
b){var c={};c.pan=this.pan.Ha;c.tilt=this.u.Ha;c.fov=this.fov.Ha;c.projection=this.Dh();c.timingFunction=b;c.speed=a;this.Ej(c)};e.prototype.Oq=function(a,b,c,h){var m=new z.Li(this);m.type="point";m.pan=b;m.u=c;m.id=a;m.j={};m.j.player=this;m.$f();m.j.hotspot=m;m.j.__div=document.createElement("div");m.j.__div.appendChild(h);this.K.push(m);m.j.__div.style.position="absolute";m.j.__div.style.left="-1000px";m.j.__div.style.top="-1000px";m.j.__div.ggVisible=!0;this.Ia.insertBefore(m.j.__div,this.Ia.firstChild);
this.ub=!0};e.prototype.bv=function(a,b,c){for(var h=0;h<this.K.length;h++){var m=this.K[h];m.id==a&&(m.pan=b,m.u=c,m.$f())}this.ub=!0};e.prototype.Qt=function(a){for(var b=-1,c,h=0;h<this.K.length;h++)c=this.K[h],c.id==a&&(b=h);-1<b&&(c=this.K.splice(b,1).pop(),c.j&&c.j.__div&&this.Ia.removeChild(c.j.__div))};e.prototype.ns=function(){for(var a=[],b=0;b<this.K.length;b++){var c=this.K[b];"point"==c.type&&a.push(String(c.id))}return a};e.prototype.Mr=function(a){for(var b=0;b<this.K.length;b++){var c=
this.K[b];if(c.id==a)return b={},b.id=a,b.pan=c.pan,b.tilt=c.u,b.pxp=c.Ul,b.pyp=c.Vl,b.url=c.url,b.target=c.target,b.distance=c.distance,b.title=c.title,b.description=c.description,b.skinid=c.rm,c.jd&&(b.customimage=c.jd,b.customimagewidth=c.gf,b.customimageheight=c.yd,b.use3D=c.Kf,b.distance3D=c.Yi),c.j&&c.j.__div&&(b.div=c.j.__div),b}};e.prototype.uq=function(a,b){this.ja.start.x=a;this.ja.start.y=b;this.ja.qa.x=a;this.ja.qa.y=b;this.la.qa.x=a;this.la.qa.y=b;this.Yl++;this.pan.ac=this.pan.m;this.u.ac=
this.u.m};e.prototype.sq=function(a,b){var c=this.Nb();this.pan.ac+=a*c/this.C.height;this.u.ac+=b*c/this.C.height;this.pan.m=this.pan.ac;this.u.m=this.u.ac};e.prototype.tq=function(a,b){this.ja.m.x=a;this.ja.m.y=b;this.ja.ia.x=this.ja.m.x-this.ja.qa.x;this.ja.ia.y=this.ja.m.y-this.ja.qa.y;this.J.$d&&(this.ja.qa.x=this.ja.m.x,this.ja.qa.y=this.ja.m.y,this.update())};e.prototype.na=function(a){this.v.active&&(this.v.active=!1,this.I("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Pc.enabled=
!1);this.F.active&&(this.F.active=!1,this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Pc.enabled=!1);this.Ye=this.F.aborted=!1;this.v.Dj=!1;this.Qd=.02;this.bh=0;this.v.ad&&(this.v.enabled=this.v.Of,a&&(this.v.ad=this.v.Sg));this.og=(new Date).getTime()};e.prototype.Tr=function(){return this.og};e.prototype.po=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 h={};h.pan=180*Math.atan(a/c)/Math.PI;h.tilt=180*Math.atan(-b/
Math.sqrt(a*a+c*c))/Math.PI;return h};e.prototype.ij=function(a,b,c){a||(a=this.ca.x,b=this.ca.y);if(this.ib()){var h=this.fov.m/this.C.height;a=-(a-this.C.width/2)*h+this.pan.m;b=-(b-this.C.height/2)*h+this.u.m}else{h=new z.Ua(0,0,1);b=this.po(a,b);h.de(-b.tilt);h.Ff(b.pan);h.de(-this.u.m);h.Ff(-this.pan.m);c||(h.de(-this.Ya.pitch),h.Gf(this.Ya.W));for(a=h.Uq()-180;-180>a;)a+=360;b=h.Vq()}h={};h.pan=a;h.tilt=b;return h};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.Gk=function(a,b){var c=this.mf(),h,m;for(h=0;h<this.mj();h++){var n=this.nl(h);if(n.Na)return n}for(h=0;h<this.mj();h++)if(n=this.nl(h),!n.qd){var q=[],r=new z.Ua,t;var w=m=void 0;0<n.fov&&(m=Math.tan(n.fov/2*Math.PI/180),w=0<n.qc?m*n.Qc/n.qc:m,n.Jc&&1!=n.Jc&&(w*=n.Jc));for(t=0;4>t;t++){switch(t){case 0:r.init(-m,-w,0);break;case 1:r.init(m,
-w,0);break;case 2:r.init(m,w,0);break;case 3:r.init(-m,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);q.push(r.clone())}q=this.Ik(q);if(0<q.length){for(t=0;t<q.length;t++)r=q[t],.1>r.z?(w=-c/r.z,m=this.C.width/2+r.x*w,w=this.C.height/2+r.y*w):w=m=0,r.fc=m,r.Qb=w;if(z.kc.Ao(q,a,b))return n}}return null};e.prototype.mj=function(){return this.U.length+
this.Xa.length+this.Ub.length};e.prototype.nl=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.Lh=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};e.prototype.it=function(a){this.oq(a);window.focus();if(this.zd)this.zd.onclick();(this.we||this.kf&&this.lg)&&7>this.hd&&this.eg();this.$b=
null;if(!this.J.rc&&!this.yc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=(new Date).getTime();if(this.Le){this.$b=this.Le;this.T.Wc=!0;this.T.startTime=b;a.stopPropagation();return}if(this.Kc(a.target)){var c;if((c=this.Gk(this.ca.x,this.ca.y))&&c.Be&&(this.$b=c,void 0!==c.code&&""!==c.code&&c.pc))return;this.uq(a.pageX,a.pageY);this.T.Wc=!0;this.T.startTime=b;a.preventDefault();this.na(!0)}}this.ja.ia.x=0;this.ja.ia.y=0}};e.prototype.Ng=function(a,b,c){var h=this.L.ck;h.enabled&&
(this.P!=this.gb&&0<=a&&0<=b&&""!=this.P.title?(this.Fa.innerHTML=this.Va(this.P.title),this.Fa.style.color=this.pa(h.dk,h.bk),this.Fa.style.backgroundColor=h.background?this.pa(h.Wb,h.Vb):"transparent",this.Fa.style.border="solid "+this.pa(h.Yb,h.Xb)+" "+h.Pi+"px",this.Fa.style.borderRadius=h.Ak+"px",this.Fa.style.textAlign="center",0<h.width?(this.Fa.style.left=a-h.width/2+this.margin.left+"px",this.Fa.style.width=h.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<h.height?h.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.oq=function(a){var b=this.Eh();this.Lh()?(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.Pe=function(a){if("string"==typeof a)for(var b=0;b<this.K.length;b++)if(this.K[b].id==
a){a=this.K[b];break}this.P=a&&null!==a&&"object"==typeof a?a:this.gb;this.P==this.gb&&(a=this.Ti(this.ca.x,this.ca.y))&&(a.lb=0);this.P.$f&&this.P.$f();this.hotspot=this.P;this.I("activehotspotchanged",{hotspot:this.P})};e.prototype.ht=function(a){a=a?a:window.event;this.oq(a);if(!this.J.rc&&!this.yc&&!this.Le){this.v.active&&(this.v.zj=(new Date).getTime());0==a.buttons&&(this.T.Wc=!1);this.T.Wc&&(a.preventDefault(),(a.which||0==a.which||1==a.which)&&this.tq(a.pageX,a.pageY),this.na(!0));var b=
!1;if(this.P==this.gb||"poly"==this.P.type){var c=this.gb;0<this.K.length&&this.Kc(a.target)&&(c=this.Ti(this.ca.x,this.ca.y));this.Rj(c);this.Ng(this.ca.x,this.ca.y,!1);0!=c&&c!=this.gb&&(b=!0)}c=null;!b&&this.Kc(a.target)&&(c=this.Gk(this.ca.x,this.ca.y));this.v.Wi&&(this.v.Wi=!1);this.Ia.style.cursor=this.P!=this.gb&&this.P.De&&b||c&&c.jg?"pointer":"default"}};e.prototype.Rj=function(a){!1===a&&(a=this.gb);this.P!=a&&(this.P!=this.gb&&(0<this.L.mode&&(this.P.lb=0),this.ha&&this.ha.hotspotProxyOut&&
this.ha.hotspotProxyOut(this.P.id,this.P.url),this.I("hsproxyout",{id:this.P.id,url:this.P.url})),a!=this.gb?(this.Pe(a),this.ha&&this.ha.hotspotProxyOver&&this.ha.hotspotProxyOver(this.P.id,this.P.url),this.I("hsproxyover",{id:this.P.id,url:this.P.url}),0<this.L.mode&&(this.L.lb=1,this.P.lb=1)):(this.Pe(this.gb),0<this.L.mode&&(this.L.lb=0)))};e.prototype.gt=function(a){a=a?a:window.event;this.yj=-1;if(this.we||this.kf&&this.lg)7<=this.hd?this.Yp():this.eg();if(!this.J.rc&&!this.yc&&(this.$b&&(this.$b.Be(),
this.Le=this.$b.Na?this.$b:null),this.T.Wc)){this.na(!0);a.preventDefault();this.T.Wc=!1;a=(new Date).getTime();var b=Math.abs(this.ja.start.x-this.ja.qa.x)+Math.abs(this.ja.start.y-this.ja.qa.y);if(400>a-this.T.startTime&&0<=b&&20>b){var c=this.Ti(this.ca.x,this.ca.y);c&&this.jq(c);b=Math.abs(this.ja.ae.x-this.ja.qa.x)+Math.abs(this.ja.ae.y-this.ja.qa.y);var h=this.ij(this.ca.x,this.ca.y,!0);700>a-this.Oh&&0<=b&&20>b?(c?this.kq(c):this.J.Sk&&this.fk(),this.I("doubleclick",{pan:-Math.round(100*h.pan)/
100,tilt:Math.round(100*h.tilt)/100}),this.Oh=0):(this.I("panoclick",{pan:-Math.round(100*h.pan)/100,tilt:Math.round(100*h.tilt)/100}),this.Oh=a);this.ja.ae.x=this.ja.qa.x;this.ja.ae.y=this.ja.qa.y}}};e.prototype.Xo=function(a){if(!this.J.He&&!this.yc&&(a=a?a:window.event,this.Kc(a.target))){var b=a.detail?-1*a.detail:a.wheelDelta/40;this.J.Fo&&(b=-b);a.axis&&(-1==this.yj?this.yj=a.axis:this.yj!=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.J.Nf?this.mn(c*this.J.tm,this.ye(a),!0):this.Qi(c*this.J.tm,!0),this.update());a.preventDefault();this.na(!0)}};e.prototype.Yu=function(a){a||(a=window.event);var b=a.touches,c=this.Eh();this.ca.x=b[0].clientX-c.x;this.ca.y=b[0].clientY-c.y;this.Ue=this.$b=null;window.focus();this.vl||(this.vl=!0,this.I("hastouch",{}),this.I("playerstatechanged",{}));!this.Ko&&(this.we||this.kf&&this.lg)&&7>this.hd&&this.eg();if(!this.J.rc&&!this.yc)if(c=(new Date).getTime(),this.Le)this.$b=this.Le,
this.T.kd=!0,this.T.startTime=c,a.preventDefault(),this.T.gi=!0,b[0]&&(this.Bb=b[0].target);else{if(!this.T.kd&&b[0]){this.T.startTime=c;this.T.start.x=b[0].pageX;this.T.start.y=b[0].pageY;this.T.qa.x=b[0].pageX;this.T.qa.y=b[0].pageY;c=this.Bb=b[0].target;if(this.Kc(c)){var h;(h=this.Gk(this.ca.x,this.ca.y))&&h.Be&&(this.$b=h);if(h=this.Ti(this.ca.x,this.ca.y))this.G(h),this.Ue=h,this.Rj(h),this.ye(a),this.Ng(this.ca.x,this.ca.y,!0);this.uq(b[0].pageX,b[0].pageY);this.T.Nn=b[0].identifier;this.T.kd=
!0;a.preventDefault();this.T.gi=!0;this.na(!0)}if(c){h=!1;if(null!=this.T.Gg)for(var m=this.T.Gg;m&&m!=this.control;){if(m.onmouseout)m.onmouseout(a);m=m.parentNode}m=c;for(var n=!0;m&&m!=this.control;)c!=this.T.Gg&&m.onmouseover&&(m.onmouseover(a),7<=this.hd&&this.Kc(a)&&(h=!0)),m.onmousedown&&(m.onmousedown(a),n=!1,h=!0),m.onclick&&(n=!1),m=m.parentNode;this.T.Gg=n&&7<=this.hd&&c!=this.T.Gg?c:null;h&&(a.preventDefault(),this.T.gi=!0)}}1<b.length&&(this.T.kd=!1);!this.sl&&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.Zp=Math.sqrt(a*a+b*b),this.fov.prev=this.fov.m);this.ja.ia.x=0;this.ja.ia.y=0}};e.prototype.eg=function(){this.G("froce start sound!");try{this.Hi&&this.A.j&&(!this.A.Tc&&this.A.Yj&&this.A.j.play(),this.A.j.muted=!1);if(this.ga&&(this.G("resume!"),this.G(this.ga.state),this.ga.resume(),"suspended"==this.ga.state)){this.G("audio context suspended");return}if(this.md&&this.ga&&this.ga.createOscillator){var a=this.ga.createOscillator(),
b=this.ga.createGain();a.frequency.value=30;a.type="sine";a.connect(b);b.connect(this.ga.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.G(c);(!this.isPlaying(c.id)||c.ua)&&0<=c.loop&&c.autoplay&&!this.Xc&&(this.G("start "+c.id),c.ua&&(this.G("from buffer"),c.Rf()),this.be(c.id,c.loop))}for(b=0;b<this.U.length;b++){var h=this.U[b];!this.isPlaying(h.id)&&h.autoplay&&this.Hi&&!this.Xc&&this.be(h.id,h.loop);this.isPlaying(h.id)&&
h.autoplay&&this.Hi&&!this.Xc&&(h.Pd&&h.We(),h.j.muted=!1)}this.kf=this.we=!1}catch(m){this.G(m)}};e.prototype.Xu=function(a){a||(a=window.event);var b=a.touches,c=this.Eh();this.ca.x=b[0].clientX-c.x;this.ca.y=b[0].clientY-c.y;if(this.J.rc||this.yc)(this.D.Md||this.D.ke||this.D.$c)&&a.preventDefault();else{b[0]&&(this.T.qa.x=b[0].pageX,this.T.qa.y=b[0].pageY);if(this.Bb){c=this.Bb;for(var h=!1;c&&c!=this.control&&!h;)"scrollarea"==c.ggType&&(h=!0),"map"==c.ggType&&(h=!0),"text"==c.ggType&&(h=!0),
c=c.parentNode;h||a.preventDefault()}if(this.T.kd){a.preventDefault();for(c=0;c<b.length;c++)if(b[c].identifier==this.T.Nn){this.tq(b[c].pageX,b[c].pageY);break}this.Ue&&(this.ye(a),this.Ng(this.ca.x,this.ca.y,!0));this.na(!0)}2==b.length&&b[0]&&b[1]&&(this.T.kd=!1,!this.sl&&this.Kc(this.Bb)&&(this.J.He||(c=b[0].pageX-b[1].pageX,h=b[0].pageY-b[1].pageY,this.fov.Bn=Math.sqrt(c*c+h*h),this.la.fov.active=!0,this.la.fov.center.enabled=!0,this.la.fov.center.x=(b[0].pageX+b[1].pageX)/2,this.la.fov.center.y=
(b[0].pageY+b[1].pageY)/2,this.la.fov.nc=this.fov.prev*Math.sqrt(this.fov.Zp/this.fov.Bn),4==this.Z()&&!this.ib()&&this.la.fov.nc>this.fov.max&&(this.la.fov.nc=this.fov.max),this.la.fov.nc<this.fov.min&&(this.la.fov.nc=this.fov.min)),this.na(!0),a.preventDefault()))}};e.prototype.Wu=function(a){this.T.gi&&(this.T.gi=!1,a.preventDefault());var b=!1;if(this.we||this.kf&&this.lg)7<=this.hd?this.Yp():this.eg();if(!this.J.rc&&!this.yc){this.T.kd&&(a.preventDefault(),this.na(!0));var c=(new Date).getTime(),
h=void 0,m=!1;this.Kc(this.Bb)&&(a.preventDefault(),this.$b&&(this.$b.Be(),this.Le=this.$b.Na?this.$b:null));h=Math.abs(this.T.start.x-this.T.qa.x)+Math.abs(this.T.start.y-this.T.qa.y);if(0<=h&&20>h){b=!0;if(this.Bb){var n=this.Bb;for(h=function(){if(n.onclick){var r=n;setTimeout(function(){r.onclick(a)},0);"hotspot"!=n.yv&&(m=!0);b=!1}n=n.parentNode};n&&n!=this.control;)h()}h=Math.abs(this.T.ae.x-this.T.qa.x)+Math.abs(this.T.ae.y-this.T.qa.y);if(700>c-this.Oh&&0<=h&&20>h){if(this.Kc(this.Bb))if(a.preventDefault(),
this.Ue)this.kq(this.Ue);else if(this.J.Sk){var q=this;setTimeout(function(){q.fk()},1)}if(this.Bb)for(n=this.Bb;n&&n!=this.control;)n.ondblclick&&(n.ondblclick(),m=!0,b=!1),n=n.parentNode;this.Oh=0}else this.Oh=c;this.T.ae.x=this.T.qa.x;this.T.ae.y=this.T.qa.y}if(this.Bb)for(n=this.Bb;n&&n!=this.control;)this.T.Gg!=this.Bb&&n.onmouseout&&(n.onmouseout(a),7<=this.hd&&(m=!0)),n.onmouseup&&(n.onmouseup(a),7<=this.hd&&(m=!0)),n=n.parentNode;m&&a.preventDefault();this.ye(a);this.Ue&&(this.Ng(-1,-1,!0),
b&&this.jq(this.Ue));this.Bb=null;this.T.kd=!1;this.Rj(this.gb);this.Ue=null}};e.prototype.Vu=function(a){this.J.rc||this.yc||(this.T.kd=!1);this.Ue=null;this.Rj(this.gb);this.ye(a);this.Ng(-1,-1,!0)};e.prototype.Lo=function(){return null!=this.Bb||this.T.kd||this.T.Wc};e.prototype.Yo=function(a){if(!this.yf&&window.MSGesture){var b=window.MSGesture;this.G("setup gesture");this.yf=new b;this.yf.target=this.control}this.yf&&this.yf.addPointer(a.pointerId)};e.prototype.Xn=function(a){this.sl=!0;this.Fj=
1;this.J.rc||this.J.He||this.yc||(a.touches?(this.Bb=a.touches.target,this.Kc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.m,this.na(!0))):(a.preventDefault(),this.fov.prev=this.fov.m,this.na(!0)))};e.prototype.Br=function(a){if(!this.J.rc&&!this.J.He&&!this.yc&&this.Kc(a.target)){a.preventDefault();this.la.fov.active=!0;this.la.fov.center.enabled=!0;var b=this.ye(a);this.la.fov.center.x=b.x;this.la.fov.center.y=b.y;this.la.fov.nc=this.fov.prev/Math.sqrt(a.scale);4==this.Z()&&2!=this.Kd&&
this.la.fov.nc>this.fov.max&&(this.la.fov.nc=this.fov.max);this.update();this.na(!0)}};e.prototype.lt=function(a){this.J.rc||this.J.He||this.yc||(a.preventDefault(),1!=a.scale&&(this.la.fov.active=!0,this.Fj*=a.scale,this.la.fov.center.enabled=!0,a=this.ye(a),this.la.fov.center.x=a.x,this.la.fov.center.y=a.y,this.la.fov.nc=this.fov.prev/Math.sqrt(this.Fj),4==this.Z()&&2!=this.Kd&&this.la.fov.nc>this.fov.max&&(this.la.fov.nc=this.fov.max),this.update(),this.na(!0)))};e.prototype.Wn=function(a){this.J.rc||
this.J.He||this.yc||(this.la.fov.active=!1,a.preventDefault(),this.na(!0),this.yf&&this.yf.reset&&this.yf.reset())};e.prototype.Xs=function(a){this.J.Vh||this.yc||(this.isFullscreen&&a.preventDefault(),this.wj=a.keyCode,this.na(!0))};e.prototype.Ys=function(a){this.wj&&(this.wj=0,a.preventDefault())};e.prototype.st=function(){this.wj=0};e.prototype.bi=function(){this.isFullscreen&&(this.Lh()||this.exitFullscreen(),this.Lh()&&(this.$.style.left="0px",this.$.style.top="0px"))};e.prototype.yt=function(a,
b,c,h){h?(this.Hh.alpha=a,this.Hh.beta=b,this.Hh.gamma=c,this.Hh.gamma+=90):(this.ob.alpha=a,this.ob.beta=b,this.ob.gamma=c,this.ob.gamma+=90);this.ob.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;c=new z.Vm;a=this.ob;c.Ff(-a.alpha);c.Gf(-a.beta);c.de(-a.gamma);c.Gf(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.dc,c.ec)):(b=0,a=-90,c=180/Math.PI*
Math.atan2(-c.dc,c.ec));if(this.Qg)if(this.Lo()||this.F.pj||this.ob.ni)this.ob.zf=this.nf()+c,this.ob.fadeIn=0,this.ob.ni=!1;else{h=this.F.active;var m=1;10>this.ob.fadeIn&&(this.ob.fadeIn+=1,m=.1*this.ob.fadeIn);c=-c+this.ob.zf;this.ee(m*c+(1-m)*this.nf());this.fe(m*a+(1-m)*this.gg());this.rq?this.Ag(m*b+(1-m)*this.kj()):this.Ag(0);this.ef();this.F.active=h}};e.prototype.jq=function(a){this.ha&&this.ha.hotspotProxyClick&&this.ha.hotspotProxyClick(a.id,a.url);this.I("hsproxyclick",{id:this.P.id,url:this.P.url});
""!=a.url&&(this.Nl(a.url,a.target),this.Ng(-1,-1,!1))};e.prototype.kq=function(a){this.ha&&this.ha.hotspotProxyDoubleClick&&this.ha.hotspotProxyDoubleClick(a.id,a.url);this.I("hsproxydblclick",{id:this.P.id,url:this.P.url})};e.prototype.lf=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};e.prototype.kp=function(){var a=this;setTimeout(function(){a.kp()},100);9!=a.Oj||a.sj||window.requestAnimationFrame(function(){a.ci();a.G("restart recover timer")});10<a.Oj&&1<a.Yl&&
(a.Uc("recover timer - disabling requestAnimationFrame"),a.sj=!0,a.ci());a.Oj++};e.prototype.ui=function(a){if("__VideoPano"!=this.R.cb){var b={PAN:{value:0,name:"pan"},wv:{value:1,name:"tilt"},sv:{value:2,name:"fov"}},c=0,h=0,m=0;a=Math.max(a,0);for(var n in b){var q=b[n],r=this.cc(this.qo(a,q.value,""),q.value,"");var t=(t=this.lo(r))?this.Yn(r,t,a):r.value;switch(q.value){case 0:q=this.pan.m;if(this.oe&&3!=r.type){if(!this.ib()){for(;360<t;)t-=360;for(;-360>t;)t+=360}c=t-q;this.ib()||(180<c&&(c-=
360),-180>c&&(c+=360));this.pan.m+=c*this.Qd}else this.pan.m=t;this.v.Sh=this.pan.m;break;case 1:q=this.u.m;this.oe&&3!=r.type?(h=t-q,this.u.m+=h*this.Qd):this.u.m=t;this.v.Th=this.u.m;break;case 2:q=this.fov.m,this.oe&&3!=r.type?(m=t-q,this.fov.m+=m*this.Qd):this.fov.m=t,this.v.Rh=this.fov.m}}t=this.Z();for(b=Math.floor(a);!this.cc(b,3)&&0<b;)b--;b=this.cc(b,3);n=a-b.time;this.oe&&-1!=this.dh&&this.Ni+this.wk>a?(t=this.Bh(this.dh),this.fov.m>t?this.Ni=a:(n=(a-this.Ni)/this.wk,n=Math.min(1,n),this.sb(this.Z(),
this.dh,1-n))):(0==b.Gb||n>b.Gb-.3?this.sb(b.value):(n/=b.Gb,this.sb(t,b.value,1-n)),this.v.Qo=b.value);this.oe&&(t=Math.sqrt(c*c+h*h+m*m),.3>t&&(this.oe=!1,this.Qd=.02,this.bh=0),0<this.bh&&t>this.bh&&(this.Qd+=.01,this.Qd=Math.min(this.Qd,1)),this.bh=t)}c=Math.floor(a);h=this.Cr(c);for(m=0;m<h.length;m++)if(n=h[m],3>n.$m)c!=this.cn&&(t=n.td,this.Sb.hasOwnProperty(t)&&(b=this.Sb[t].type,0==b?this.Qe(t,n.Nm):1==b?this.Qe(t,n.value):2==b&&this.Qe(t,"true"==n.Nm)));else if(b=this.cc(this.qo(a,n.rb,
n.td),n.rb,n.td),t=(t=this.lo(b))?this.Yn(b,t,a):b.value,n=n.td.split("|"),2==n.length)for(b=n[0],n=n[1],r=0;r<this.K.length;r++)q=this.K[r],q.id==b&&("pan"==n?q.pan=t:"tilt"==n&&(q.u=t));this.cn=c;this.update()};e.prototype.Zn=function(){if(""!=this.v.tg){var a=this.oo(this.v.tg);if(0==a.length||1==a.length&&a[0]==this.ra)return this.ra}a=this.ra;do if(this.v.cp){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.Ch(a).tags.includes(this.v.tg)&&a!=this.ra);return a};e.prototype.Gt=function(a){var b=this.F.speed;this.F.Fl&&(b=b*(a.getTime()-this.F.Fl)/60);this.F.Fl=a.getTime();this.v.yh&&(this.sa.ready()||4==this.Z())&&this.fj()&&(this.v.yh=!1,this.v.active=!0,this.Ea.running=!0,this.Ea.finished=!1);if(this.F.active||0!=this.F.qb&&this.sa.ready()){if(this.F.Mm&&"__AutoMove"==this.R.cb){var c=a.getTime()-this.F.bn;b=c/100;if(b>=this.R.length){if(this.ui(this.R.length),
this.xa.splice(this.xa.indexOf(this.R),1),this.F.active=!1,this.R=this.F.an,this.F.qb=0,this.zg(this.F.pan,this.F.u,this.F.fov),this.pan.ac=this.F.pan,this.u.ac=this.F.u,this.F.sg&&(this.F.sg=!1,this.v.Dj=!0,this.v.ad=!0,this.v.active=!0,this.I("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.ui(b)}else{this.pan.d=this.F.pan-this.pan.m;if(!this.ib()&&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.lf();var h=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),m=this.pan.m-this.F.Sh,n=this.u.m-this.F.Th,q=this.W.m-this.F.Ro,r=this.fov.m-this.F.Rh;100*Math.sqrt(m*m+n*n+q*q+r*r)<c&&0==this.F.qb&&(this.F.aborted=!0);this.F.Sh=this.pan.m;this.F.Th=this.u.m;this.F.Ro=this.W.m;this.F.Rh=this.fov.m;if(100*h<c||this.F.aborted){if(this.pan.d=0,this.u.d=0,this.W.d=0,this.fov.d=0,this.fov.Pc.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 h=h>5*c?c/h:.2,this.pan.d*=h,this.u.d*=h,this.fov.d*=h;this.pan.m+=this.pan.d;this.u.m+=this.u.d;this.W.m+=this.W.d;this.J.Nf&&this.fov.Pc.enabled?this.hm(this.fov.m+this.fov.d,this.fov.Pc):this.fov.m+=this.fov.d;0!=this.F.qb&&(this.F.qb!=this.Z()?(b=this.Bh(this.F.qb),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.sb(this.F.qb,this.Z(),0),this.G("New projection from Target:"+this.Z()),this.F.ji=0,this.sa.rj())):1>this.F.ji?(this.F.ji=Math.min(1,this.F.ji+.05*b),this.sb(this.Z(),this.Ic(),this.F.ji)):(this.sb(this.Z(),0,0),this.F.qb=0,this.sa.rj()))}this.og=a.getTime();this.update()}else if(this.v.active&&!this.D.ke){c=a.getTime()-this.v.startTime;this.v.zj<this.v.startTime&&(this.v.zj=this.v.startTime);
if((this.v.ad||this.Ea.running)&&0<this.xa.length){b=c/100;h=!1;if(this.xc!=this.R.cb||""!=this.R.Ze&&this.v.Rd!=this.R.Ze){for(c=0;c<this.xa.length;c++)if(""==this.xc&&this.xa[c].Ze==this.v.Rd||""!=this.xc&&this.xa[c].cb==this.xc&&this.xa[c].Ze==this.v.Rd){h=!0;this.R=this.xa[c];this.xc=this.R.cb;break}!h&&0<this.xa.length&&this.xa[0].Ze==this.v.Rd&&(h=!0,this.R=this.xa[0],this.xc=this.R.cb)}else h=!0;if(h)if(c=(m=this.A.j&&this.A.Tc)&&this.v.ym&&!this.Ea.running,this.Ye){h=b;if(c){if(0==this.Xe&&
0!=this.A.j.duration)for(;this.Xe<this.R.length/10;)this.Xe+=this.A.j.duration;this.A.j.currentTime<this.en&&this.yk&&(this.xk++,this.yk=!1);h=10*(this.xk*this.A.j.duration+this.A.j.currentTime);this.en=this.A.j.currentTime;.05>this.A.j.duration-this.A.j.currentTime&&(this.yk=!0);for(;h>=10*this.Xe;)h-=10*this.Xe}if(!m&&b>=this.R.length||m&&!c&&b>=this.R.length||m&&c&&(this.R.cb!=this.R.$o||this.R.Zo!=this.ra)&&b>=this.R.length){this.ui(this.R.length);this.v.Hd=0;this.Ye=!1;if(this.Ea.running){this.Gp();
return}if(this.v.sn){c=0;do b=this.dn[this.R.Ze],h=Math.floor(Math.random()*Object.keys(b).length),h=b[h],this.xc=h.cliptitle,b=h.nodeid,h=h.startview,c++;while(b==this.ra&&10>c)}else this.xc=this.R.$o,b=this.R.Zo,h=this.R.pt;this.xc==this.R.cb&&this.ra==b?1<this.$a.length&&0<this.v.Gj&&(this.v.startTime=a.getTime(),(c=this.Zn())&&c!=this.ra&&(this.rd("{"+c+"}"),this.Ye=!1,this.v.active=!0,this.D.qe=!0,this.D.pe=!0)):(this.Gd&&b!=this.ra&&(this.rd("{"+b+"}",h),this.D.enabled?(this.v.active=!1,this.D.qe=
!0,this.D.pe=!0):this.v.active=!0),this.v.startTime=a.getTime())}else this.ui(h),this.v.Hd=h}else if(b=this.cc(0,0),h=this.cc(0,1),m=this.cc(0,2),n=this.cc(0,3),3!=n.rb&&(n=0),this.v.Dj||this.F.aborted||this.Ea.running||c){if(this.Ye=!0,this.v.startTime=0<this.v.Hd?a.getTime()-100*this.v.Hd:a.getTime(),this.oe=c){this.Xe=this.xk=0;h=10*this.A.j.currentTime;for(c=Math.floor(h);!this.cc(c,3)&&0<c;)c--;c=this.cc(c,3);c.value==this.Z()?this.dh=-1:(this.dh=c.value,this.Ni=h,this.wk=Math.max(5,c.time+c.Gb-
h))}}else{c={};if(0<this.v.Hd)c.pan=this.v.Sh,c.tilt=this.v.Th,c.fov=this.v.Rh,c.projection=this.v.Qo;else{c.pan=b.value;if(!this.ib()){for(;360<c.pan;)c.pan-=360;for(;-360>c.pan;)c.pan+=360}c.tilt=h.value;c.fov=m.value;c.projection=n?n.value:4}c.timingFunction=3;c.speed=1;this.F.sg=!0;this.Ej(c);this.v.active=!0}}else 0<this.v.Gj&&this.Gd&&c>=1E3*this.v.Gj?1<this.$a.length&&(this.v.startTime=a.getTime(),(c=this.Zn())&&c!=this.ra&&(this.v.nd=a.getTime(),this.v.timeout=0,this.rd("{"+c+"}"),this.v.active=
!0,this.D.qe=!0)):(c=a.getTime(),h=b=1E3/60,0!=this.v.nd&&(h=c-this.v.nd),this.u.d=this.v.ek*((this.v.Bo?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.lf()*.05,b=h/b,this.pan.m+=this.pan.d*b,this.u.m+=this.u.d*b,this.fov.m+=this.fov.d*b,this.v.nd=c,this.update());3E3<a.getTime()-this.v.zj&&!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.bl(!1),this.xc=this.R.cb,this.v.active=!1,this.v.yh=!0),this.v.enabled&&!this.T.tj()&&a.getTime()-this.og>1E3*this.v.timeout&&!this.v.yh&&(this.v.Eg&&this.fj()||!this.v.Eg)&&(this.v.active=!0,this.v.startTime=a.getTime(),this.v.nd=0,this.I("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Pc.enabled=!1),!this.la.enabled||this.T.tj()||0==this.pan.d&&0==this.u.d&&0==this.fov.d||(this.F.pj=!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.J.Nf&&this.fov.Pc.enabled?this.mn(this.fov.d,this.fov.Pc):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.Pc.enabled=!1),this.update())};e.prototype.lq=function(a){var b=this.D;b.$c=!1;"previewtrack"==b.delay&&2!=this.Kd||"videopano"==b.delay&&!this.A.j?0<this.M.N.levels.length?this.M.N.levels[this.M.N.levels.length-1].loaded||(b.$c=!0):this.sa.np()||(b.$c=!0):"videopano"==b.delay&&this.A.j&&!this.A.ng&&
(b.$c=!0);b.$c||this.Zj(a)};e.prototype.Zj=function(a){a||(a=new Date);var b=this.D;b.$c=!1;b.ke=!0;b.pe=this.v.ad;b.bq=a.getTime()+100;0==b.fd||b.Xg||this.vm()};e.prototype.vm=function(){var a=this.D;4==a.fd?(this.R=this.bl(!0,a.zm,a.Am,a.Ai),this.xc=this.R.cb,this.v.active=!0,this.Ea.running=!0):this.moveTo(a.zm,a.Am,a.Ai,a.Yg,0,a.he)};e.prototype.It=function(a){var b=this.D;if(!b.Rp){if(b.Md){var c=a.getTime()-b.zq;c/=1E3*b.yq;1<=c?(b.Pl(1),b.Md=!1,this.Ln(),this.aq(),this.lq(a)):0<=c&&b.Pl(c)}else b.ke&&
(c=a.getTime()-b.bq,c/=1E3*b.fh,1<=c?(b.ke=!1,this.og=a.getTime(),this.update(),0!=b.fd&&b.Xg&&this.vm(),4!=b.fd&&(this.Tj(!1),this.v.active=b.qe,this.v.ad=b.pe,this.I("autorotatechanged",{}),b.qe=!1,b.pe=!1),this.v.nd=0,this.fa&&this.Nk(),this.hh=!1):0<=c&&b.Pl(c));b=this.Bt;b.Xq&&(b.Xi?a.getTime()-b.Vk>=1E3*b.delay&&(b.Xi=!1):(b.current+=b.ud,0>b.current&&(b.current=0,b.ud=-b.ud,b.Xi=!0,b.Vk=a.getTime()),1<b.current&&(b.current=1,b.ud=-b.ud,b.Xi=!0,b.Vk=a.getTime())))}};e.prototype.Lt=function(){var a,
b=this.L;if(0<b.Rb.length){for(a=0;a<b.Rb.length;a++)b.sd[a]!=b.Bc[a]&&(b.sd[a]>b.Bc[a]?(b.Bc[a]+=.05,b.sd[a]<b.Bc[a]&&(b.Bc[a]=b.sd[a])):(b.Bc[a]-=.05,b.sd[a]>b.Bc[a]&&(b.Bc[a]=b.sd[a],-1!=b.Wj.indexOf(b.Rb[a])&&(b.Wj.splice(b.Wj.indexOf(b.Rb[a]),1),b.Rb.splice(a,1),b.sd.splice(a,1),b.Bc.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.K.length;a++){var c=this.K[a];"poly"==c.type&&c.lb!=c.Ca&&(c.lb>c.Ca?(c.Ca+=b.ud,c.lb<c.Ca&&(c.Ca=c.lb)):(c.Ca-=b.ud,c.lb>c.Ca&&(c.Ca=c.lb)),this.update())}3==
b.mode&&b.lb!=b.Ca&&(b.lb>b.Ca?(b.Ca+=b.ud,b.lb<b.Ca&&(b.Ca=b.lb)):(b.Ca-=b.ud,b.lb>b.Ca&&(b.Ca=b.lb)),this.update())};e.prototype.Kt=function(){var a=this.la;this.T.tj()&&(this.J.$d?(a.ia.x=.4*(this.ja.qa.x-a.qa.x),a.ia.y=.4*(this.ja.qa.y-a.qa.y),a.qa.x+=a.ia.x,a.qa.y+=a.ia.y):(a.ia.x=.1*-this.ja.ia.x*this.J.sensitivity/8,a.ia.y=.1*-this.ja.ia.y*this.J.sensitivity/8),this.sq(a.ia.x,a.ia.y),this.update());a.fov.active&&(this.J.Nf&&a.fov.center.enabled?this.ar(.4*(a.fov.nc-this.fov.m),a.fov.center):
this.Ek(.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.ia.x||0!=a.ia.y)&&!this.T.tj()){var b=.9*(1-a.dm);a.ia.x*=b;a.ia.y*=b;this.F.pj=!0;.01>a.ia.x*a.ia.x+a.ia.y*a.ia.y?(a.ia.x=0,a.ia.y=0):(this.sq(a.ia.x,a.ia.y),this.update())}};e.prototype.Jt=function(){if(!this.fj()&&this.qf&&5<this.M.N.xp){var a,b=0,c=this.wd.length;if(this.Pg)c=50,this.Wk<c&&this.Wk++,b=this.Wk;else for(a=0;a<c;a++)(this.wd[a].complete&&this.wd[a].src!=
this.tr||""==this.wd[a].src)&&b++;b==c?(this.ei=1,this.isLoaded=!0,this.va&&this.va.ggLoaded&&this.va.ggLoaded(),this.I("imagesready",{}),this.v.Eg&&this.v.enabled&&!this.F.active&&!this.D.Md&&(this.v.active=!0,this.v.Eg=!1,this.v.startTime=(new Date).getTime(),this.v.nd=0)):this.ei=b/(1*c);this.I("downloadprogress",{percentLoaded:this.ei})}};e.prototype.ci=function(){var a=this;a.Qj||(a.sj?setTimeout(function(){a.Qj=!1;a.ci()},1E3/60):window.requestAnimationFrame(function(){a.Qj=!1;a.ci()}));a.Qj=
!0;this.Yl=this.Oj=0;a.F.pj=!1;var b=new Date;this.cj++;120<=this.cj&&(this.G("F/s: "+Math.round(1E3*this.cj/(b.getTime()-this.No))),this.No=b.getTime(),this.cj=0);this.I("timer",{});this.oa&&this.sa.rr();this.Lm&&(this.ic(),this.Lm=!1);this.Kt();this.Jt();this.A.j&&this.A.Tc&&!this.Ye&&!this.F.sg&&this.mk&&(this.R=this.mk,this.ui(10*this.A.j.currentTime));this.Gt(b);this.M.Ht();this.It(b);this.sa.ev();(0<=this.L.mode||0<this.L.Rb.length)&&this.Lt();this.ik();if(this.wf.pan!=this.pan.m||this.wf.u!=
this.u.m||this.wf.fov!=this.fov.m)this.wf.pan=this.pan.m,this.wf.u=this.u.m,this.wf.fov=this.fov.m,this.I("positionchanged",{});this.El!=this.Z()&&(this.El=this.Z(),this.I("projectionchanged",{}));this.ub&&(0<this.qh?this.qh--:(this.ub=!1,this.qh=0),this.D.ke||this.D.Md||this.D.$c||this.me||(this.Gi(),this.I("renderframe",{})),this.I("repaint",{}));b=this.ho();b!=this.Oo&&(b?(this.va&&this.va.ggReLoadedLevels&&this.va.ggReLoadedLevels(),this.I("tilesrequested",{})):(a.va&&a.va.ggLoadedLevels&&a.va.ggLoadedLevels(),
this.I("tilesready",{})),this.Oo=b)};e.prototype.Bh=function(a){switch(a){case 4:a=Math.min(110,this.fov.max);break;case 12:a=Math.min(270,this.fov.Jl);a=Math.min(360*this.aspect(),a);a=Math.min(360/this.aspect(),a);break;case 9:a=Math.min(270,this.fov.Kl);break;default:a=90}return a};e.prototype.ik=function(){this.Qk.Pn(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.qd)continue;b.ik()}};e.prototype.Cu=function(a,
b){var c=this;var h="<<U>>"+String(c.mb);h=h.toUpperCase();"U"!=h.charAt(2)&&(c.J.kg=!1);if(0!=c.Yh.length||!c.J.kg||c.J.kh||c.J.lh&&c.rf()||c.J.Ui)if(c.zd)c.$.removeChild(c.zd),c.zd=null;else{c.zd=document.createElement("div");var m=c.zd;h="left: "+a+"px;top:\t "+(b+"px;z-index: 32000;");h+="position:relative;";h+="display: table;";h+="color: black;";h+="background-color: white;";h+="border: 1px solid lightgray;";h+="box-shadow: 1px 1px 3px #333;";h+="font-family: Verdana, Arial, Helvetica, sans-serif;";
h+="font-size: 9pt;";h+="opacity : 0.95;";m.setAttribute("style",h);m.setAttribute("class","gg_contextmenu");h=document.createElement("style");a=document.createTextNode(".gg_context_row:hover { background-color: #3399FF }");h.type="text/css";h.styleSheet?h.styleSheet.cssText=a.nodeValue:h.appendChild(a);m.appendChild(h);for(a=0;a<c.Yh.length;a++)if(b=c.Yh[a],""!=b.text){var n=document.createElement("div");h="text-align: left;";h+="margin: 0;";h+="padding: 5px 20px;";h+="vertical-align: left;";n.setAttribute("style",
h);n.setAttribute("class","gg_context_row");""!=b.url?(h=document.createElement("a"),h.href=b.url,h.target="_blank",h.innerHTML=this.Va(b.text),h.setAttribute("style","color: black; text-decoration: none;"),n.appendChild(h)):(h=document.createElement("span"),h.innerHTML=this.Va(b.text),h.setAttribute("style","color: black; text-decoration: none;"),n.appendChild(h));m.appendChild(n)}0<c.Yh.length&&(!c.J.kg||c.J.kh||c.J.lh&&c.rf()||c.J.Ui)&&m.appendChild(document.createElement("hr"));if(c.J.Ui&&c.oa){b=
[];b.push({text:this.Va("Rectilinear Projection"),hi:4});b.push({text:this.Va("Stereographic Projection"),hi:9});b.push({text:this.Va("Fisheye Projection"),hi:12});for(a=0;a<b.length;a++){n=b[a];var q=document.createElement("div");q.setAttribute("class","gg_context_row");h="text-align: left;";h+="margin: 0;";h=c.Z()==n.hi?h+"padding: 5px 20px 5px 7px;":h+"padding: 5px 20px;";h+="vertical-align: left;";h+="cursor: pointer;";q.setAttribute("style",h);q.onclick=function(r){return function(){c.Fk(r,1);
c.update()}}(n.hi);q.innerHTML=c.Z()==n.hi?"&#10687; "+n.text:n.text;m.appendChild(q)}(!c.J.kg||c.J.kh||c.J.lh&&c.rf())&&m.appendChild(document.createElement("hr"))}c.J.kh&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),h="text-align: left;margin: 0;padding: 5px 20px;",h+="vertical-align: left;",h+="cursor: pointer;",a.setAttribute("style",h),a.onclick=function(){c.fk()},a.innerHTML=c.Lh()?this.Va("Exit Fullscreen"):this.Va("Enter Fullscreen"),m.appendChild(a));c.J.lh&&
c.rf()&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),h="text-align: left;margin: 0;padding: 5px 20px;",h+="vertical-align: left;",h+="cursor: pointer;",a.setAttribute("style",h),a.onclick=function(){c.Yf()},a.innerHTML="Enter VR",m.appendChild(a));c.J.kg||(a=document.createElement("div"),h="text-align: left;margin: 0;padding: 5px 20px;",h+="vertical-align: left;",a.setAttribute("style",h),a.setAttribute("class","gg_context_row"),h=document.createElement("a"),h.href=e.ph("aHR0cDovL3Bhbm8ydnIuY29tLw=="),
h.target="_blank",h.innerHTML=e.ph("Q3JlYXRlZCB3aXRoIFBhbm8yVlI="),7<this.Bj.length&&(h.innerHTML+="<br/>"+e.Cn(this.Bj).replace(/./gm,function(r){return"&#"+r.charCodeAt(0)+";"})),h.setAttribute("style","color: black; text-decoration: none;"),a.appendChild(h),m.appendChild(a));c.$.insertBefore(c.zd,c.$.firstChild);m.onclick=function(){c.zd&&(c.$.removeChild(c.zd),c.zd=null)};m.oncontextmenu=m.onclick}};e.prototype.Wq=function(){var a=this;var b=a.Ia;a.control=b;a.control=b;setTimeout(function(){a.ci()},
10);setTimeout(function(){a.kp()},200);setTimeout(function(){a.le();a.Gi()},10);b.addEventListener&&(b.addEventListener("touchstart",function(c){a.Yu(c)},!1),b.addEventListener("touchmove",function(c){a.Xu(c)},!1),b.addEventListener("touchend",function(c){a.Wu(c)},!1),b.addEventListener("touchcancel",function(c){a.Vu(c)},!1),b.addEventListener("pointerdown",function(c){a.Yo(c)},!1),b.addEventListener("MSPointerDown",function(c){a.Yo(c)},!1),b.addEventListener("MSGestureStart",function(c){a.Xn(c)},
!1),b.addEventListener("MSGestureEnd",function(c){a.Wn(c)},!1),b.addEventListener("MSGestureChange",function(c){a.lt(c)},!1),b.addEventListener("gesturestart",function(c){a.Xn(c)},!1),b.addEventListener("gesturechange",function(c){a.Br(c)},!1),b.addEventListener("gestureend",function(c){a.Wn(c)},!1),b.addEventListener("mousedown",function(c){a.it(c)},!1),b.addEventListener("mousemove",function(c){a.ht(c)},!1),document.addEventListener("mouseup",function(c){a.gt(c)},!1),b.addEventListener("mousewheel",
function(c){a.Xo(c)},!1),b.addEventListener("DOMMouseScroll",function(c){a.Xo(c)},!1),document.addEventListener("keydown",function(c){a.Xs(c)},!1),document.addEventListener("keyup",function(c){a.Ys(c)},!1),window.addEventListener("resize",function(){a.le()},!1),a.mc.addEventListener("resize",function(){a.le()},!1),window.addEventListener("blur",function(){a.st()},!1),a.$.addEventListener("webkitfullscreenchange",function(){a.bi()},!1),document.addEventListener("mozfullscreenchange",function(){a.bi()},
!1),window.addEventListener("webkitfullscreenchange",function(){a.bi()},!1),document.addEventListener("MSFullscreenChange",function(){a.bi()},!1),document.addEventListener("fullscreenchange",function(){a.bi()},!1));b.oncontextmenu=function(c){void 0===c&&(c=window.event);return c.target&&!a.Kc(c.target)?!0:c.ctrlKey?!0:(c=a.ye(c),a.Cu(c.x,c.y),!1)};window.addEventListener("deviceorientation",function(c){a.yt(c.alpha,c.beta,c.gamma,c.absolute);null!=c.alpha&&null!=c.beta&&null!=c.gamma&&0==a.ql&&(a.ql=
!0,a.I("gyroavailable",{available:!0}),a.I("playerstatechanged",{}))})};e.prototype.Zm=function(){for(var a=0;a<this.K.length;a++)if("point"==this.K[a].type&&(this.ha&&this.ha.addSkinHotspot?(this.K[a].$f(),this.K[a].j=this.ha.addSkinHotspot(this.K[a])):(this.K[a].j=new z.Aq(this,this.K[a]),this.K[a].jd&&this.K[a].Kf&&(this.K[a].j.ggUse3d=!0,this.K[a].j.gg3dDistance=this.K[a].Yi)),this.K[a].j.__div.style.left="-1000px",this.K[a].j.__div.style.top="-1000px",this.K[a].j&&this.K[a].j.__div)){var b=this.Ia.firstChild;
b?this.Ia.insertBefore(this.K[a].j.__div,b):this.Ia.appendChild(this.K[a].j.__div)}};e.prototype.br=function(){if(!this.ha||!this.ha.addSkinHotspot)for(var a=0;a<this.K.length;a++)"point"==this.K[a].type&&this.K[a].j&&this.K[a].j.Is()};e.prototype.cr=function(){for(var a=0;a<this.Xa.length;a++)this.Xa[a].Td();for(a=0;a<this.Ub.length;a++)this.Ub[a].Td();for(a=0;a<this.X.length;a++)this.X[a].Td();for(a=0;a<this.U.length;a++)this.U[a].Td()};e.prototype.Sm=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.$r=function(a){if("_videopanorama"==a)return this.A.j;a=this.Wa(a);return 0<a.length?a[0].j:null};e.prototype.Zr=function(a){a=this.Wa(a);return 0<a.length&&a[0].ua?a[0]:null};e.prototype.rp=function(a,b){var c=this;b.addEventListener("ended",function(m){c.I("videoended",{video:m.target})});b.addEventListener("pause",function(m){c.I("videopaused",{video:m.target})});b.addEventListener("play",function(m){c.I("videostarted",
{video:m.target})});for(var h=0;h<this.U.length;h++)if(this.U[h].id==a)return this.U[h].j=b,this.U[h];h=new z.Ym(this);h.registerElement(a,b);return h};e.prototype.isPlaying=function(a){if("_main"===a)return!0;a=this.Wa(a);return 0<a.length?a[0].ua?a[0].vg:!a[0].j.ended&&!a[0].j.paused:!1};e.prototype.be=function(a,b){var c=this,h=null,m=this;this.G("Play Sound: "+a+" loop:"+b);this.G("playerMuted: "+this.Xc);if(!this.Xc)try{for(var n=this.Wa(a),q=0;q<n.length;q++){var r=n[q];if(r instanceof z.ne){r.fb=
b&&!isNaN(Number(b))?Number(b)-1:r.loop-1;-1==r.fb&&(r.fb=1E7);this.G(r.j);this.isPlaying(a)&&this.$j(a);if(r.ua)r.Sd();else{h=r.j.play();if(void 0!==h)h.then(function(){c.Bg(!0);c.G("Sound permitted! "+m.ga.state)})["catch"](function(t){c.G(t);c.Bg(!1)});r.Pd&&(this.G("waitingForWebAudioNodesToBeAdded?"),r.We())}this.si(r.id,!1)}}}catch(t){this.G(t)}return h};e.prototype.mp=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var h=a[c];this.isPlaying(h.id)?this.di(h.id):this.be(h.id,b)}};e.prototype.Nt=
function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var h=a[c];h instanceof z.ne&&(this.isPlaying(h.id)?this.$j(h.id):this.be(h.id,b))}};e.prototype.di=function(a){try{var b=void 0;if("_main"==a){this.si(a,!0);for(b=0;b<this.X.length;b++)this.X[b].ua?this.X[b].Bk():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 h=c[b];h instanceof z.ne&&(this.si(h.id,!0),h.ua?h.Bk():h.j.pause())}}}catch(m){this.G(m)}};e.prototype.Mq=function(a,
b){a=this.Wa(a);for(var c=0;c<a.length;c++){var h=a[c];0==b||1==b?h.pf&&h.pf(1==b):2==b&&h.Be&&h.Be();!h.Na||-1==this.Xa.indexOf(h)&&-1==this.U.indexOf(h)&&-1==this.Ub.indexOf(h)||(this.$b=this.Le=h)}};e.prototype.$j=function(a){var b;this.G("Stop Sound: "+a);try{if("_main"===a){this.si(a,!0);for(b=0;b<this.X.length;b++)this.X[b].ua?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 h=c[b];h instanceof z.ne&&(this.si(h.id,!0),h.ua?h.Rf():h.j&&h.j.pause&&(h.j.pause(),h.j.currentTime=0))}}}catch(m){this.G(m)}};e.prototype.si=function(a,b){a=this.Wa("_main"===a?".*":a);for(var c=0;c<a.length;c++)a[c].stopped=b};e.prototype.Fu=function(a){a=this.Wa(a);return 0<a.length?(a=a[0],a instanceof z.ne?a.ua?a.Zq():a.j?a.j.currentTime:0:0):0};e.prototype.Hu=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var h=a[c];h instanceof z.ne&&(h.ua?(0>b&&(b=0),b>h.eh.duration&&
(b=h.eh.duration-.1),h.$q(b)):h.j&&(0>b&&(b=0),b>h.j.duration&&(b=h.j.duration-.1),h.j.currentTime=b))}};e.prototype.Gu=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,h=Number(b);1<h&&(h=1);0>h&&(h=0);"_videopanorama"===a&&this.A.j&&(this.A.j.volume=h,this.A.level=h);if("_main"===a){this.ba=h;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 m=this.Wa(a);this.G(m);for(c=0;c<m.length;c++){var n=m[c];n.j&&null!=n.j.volume&&(n.j.volume=h*this.ba);n.level=h}}}catch(q){this.G(q)}};e.prototype.hr=function(a,b){try{var c=void 0,h=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(h=0;h<this.X.length;h++)this.X[h].j.volume=this.X[h].level*this.ba;for(h=0;h<this.U.length;h++)this.U[h].j.volume=
this.U[h].level*this.ba;this.A.j&&(this.A.j.volume=this.ba*this.A.level)}else{var m=this.Wa(a);for(h=0;h<m.length;h++){var n=m[h];n instanceof z.ne&&(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(q){this.G(q)}};e.prototype.mm=function(a,b){if("_main"===a||"_all"===a||"_videopanorama"===a)"_all"===a&&(b=(this.Xc=1==b||-1==b&&!this.Xc?!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 h=a[c];h.Mp&&h.Mp(b)}};e.prototype.ot=function(a){this.mm(a,1)};e.prototype.$u=function(a){this.mm(a,0)};e.prototype.Tu=function(a){this.mm(a,-1)};e.prototype.Lr=function(){return this.Yd};e.prototype.Ss=function(){this.gn=document.createElement("audio");this.gn.src="./media/testsound.mp3"};e.prototype.Xp=function(){var a=this;this.ga&&"suspended"===this.ga.state&&this.ga.resume();var b=a.gn.play();if(void 0!==b)b.then(function(){a.Bg(!0)})["catch"](function(){a.Bg(!1)})};
e.prototype.Yp=function(){this.Yd&&1!=this.vi?this.Xp():this.we=this.kf=!1};e.prototype.ss=function(){return this.vi};e.prototype.Bg=function(a){if(1!=this.vi){var b=a?1:0;this.vi!=b&&(this.vi=b,this.I("soundspermittedchanged",{permitted:a}))}};e.prototype.Ku=function(){var a=this;this.eg();this.we&&setTimeout(function(){a.eg()},500)};e.prototype.Uj=function(a,b,c){a.j.style.opacity=0==b?1:0;a.j.style[this.bc]="opacity "+c+"ms";a.j.style.opacity=0==b?0:1};e.prototype.gu=function(a,b,c){function h(){var r=
m[q];if(!r.j)return"continue";0==b?(n.Uj(r,b,c),setTimeout(function(){0==r.j.style.opacity&&r.Hf(!1)},c+10),r.pc=!1):1==b?(n.Uj(r,b,c),r.Hf(!0),r.pc=!0):2==b&&("visible"==r.j.style.visibility?(n.Uj(r,0,c),setTimeout(function(){0==r.j.style.opacity&&r.Hf(!1)},c+10),r.pc=!1):(n.Uj(r,1,c),r.Hf(!0),r.pc=!0))}for(var m=this.Wa(a),n=this,q=0;q<m.length;q++)h()};e.prototype.aq=function(){var a=this;try{for(var b=this,c=!1,h=!1,m=0;m<this.X.length;m++){var n=this.X[m];if(-1!=n.loop&&!this.isPlaying(n.id)&&
!n.stopped){var q=void 0;this.ga&&this.Za.enabled&&4!=n.mode&&6!=n.mode&&!this.Xc?this.Za.zn?(n.ua?n.Sd():(q=n.j.play(),n.Pd&&n.We(),n.j.currentTime=0),n.wa=0,h=!0):c=!0:4==n.mode||6==n.mode||"_background"==n.id&&this.isPlaying(n.id)||this.Xc||(n.ua?n.Sd():(q=n.j.play(),n.j.currentTime&&(n.j.currentTime=0)));if(void 0!==q)q.then(function(){a.Bg(!0)})["catch"](function(){a.Bg(!1)})}}c&&setTimeout(function(){b.Za.Nu()},1E3*this.Za.Gb);h&&(this.Za.Ju=this.ga.currentTime,this.Za.Iu=setInterval(function(){b.Za.yr()},
10))}catch(r){this.G(r)}};e.prototype.Ln=function(){for(var a=0;a<this.Za.Fi.length;a++)this.Za.Kn(this.Za.Fi[a])};e.prototype.wp=function(){if(this.P&&this.P!=this.gb&&this.P.div&&this.P.div.onmouseout)this.P.div.onmouseout();for(var a;0<this.K.length;)a=this.K.pop(),a.j&&(this.Ia.removeChild(a.j.__div),delete a.j),a.j=null;this.L.Ca=0;this.L.lb=0;this.I("hotspotsremoved",{})};e.prototype.om=function(a){this.Mf=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.tb.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.G(c)}this.$.style.position="absolute";a=this.Eh();this.$.style.left=window.pageXOffset-a.x+this.margin.left+"px";this.$.style.top=window.pageYOffset-a.y+this.margin.top+"px";this.om(10);document.body.style.overflow="hidden";b&&(this.va&&this.va.ggEnterFullscreen&&this.va.ggEnterFullscreen(),this.I("fullscreenenter",
{}),this.I("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.G(c)}this.$.style.position="relative";this.$.style.left="0px";this.$.style.top="0px";this.om(0);document.body.style.overflow="";b&&(this.va&&
this.va.ggExitFullscreen&&this.va.ggExitFullscreen(),this.I("fullscreenexit",{}),this.I("playerstatechanged",{}))}this.le()};e.prototype.fk=function(){this.Sj(!this.isFullscreen)};e.prototype.ur=function(){this.Sj(!0)};e.prototype.exitFullscreen=function(){this.Sj(!1)};e.prototype.Pr=function(){return this.isFullscreen};e.prototype.Yf=function(){this.Da.mr();this.zp();this.Da.Yf();this.Da.At();return!0};e.prototype.ys=function(){return"N/A"};e.prototype.xs=function(){if(this.Da)return this.Da.mg()?
this.Da.pk:this.Da.camera};e.prototype.zs=function(){if(this.Da)return this.Da.Sa};e.prototype.vu=function(a){this.Da&&(this.Da.fg=a)};e.prototype.Zf=function(){this.Da&&(this.Da.Zf(),this.Da.Ef(),this.Da.Jk());return!0};e.prototype.hq=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.rf=function(){return this.Da&&this.Da.rf()?!0:!1};e.prototype.ll=function(){return this.Da?this.Da.ll():!1};e.prototype.Lu=function(a,
b,c){this.v.Rd=this.v.Oi;this.v.ad=this.v.Sg;this.v.enabled=!0;this.v.Of=this.v.enabled;this.v.active=!0;this.v.nd=0;var h=new Date;this.v.Hd=0;this.v.startTime=h.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.I("autorotatechanged",{})};e.prototype.Ou=function(){this.v.active=!1;this.v.enabled=!1;this.v.Of=this.v.enabled;this.Ye=this.v.Dj=!1;this.F.active&&this.F.sg&&(this.F.active=!1,this.F.sg=!1,this.F.qb=0);this.I("autorotatechanged",
{})};e.prototype.Su=function(){this.v.enabled=!this.v.active;this.v.Of=this.v.enabled;this.v.active=this.v.enabled;this.v.nd=0;if(this.v.enabled){var a=new Date;this.v.Hd=0;this.v.startTime=a.getTime();this.v.Rd=this.v.Oi;this.v.ad=this.v.Sg}this.I("autorotatechanged",{})};e.prototype.Mt=function(){this.na(!1)};e.prototype.Vt=function(){this.v.enabled&&(this.v.active=!0,this.v.nd=0)};e.prototype.$t=function(a){this.v.tg=a;this.v.bp=!0};e.prototype.Wp=function(a){this.Ea.running&&this.Gp();this.xc=
"";a&&""!=a&&(this.v.Rd=a);this.v.Of=this.v.enabled;this.v.ad=!0;this.v.enabled=!0;this.v.active=!0;this.v.nd=0;this.D.ke&&(this.D.pe=!0,this.D.qe=!0);a=new Date;this.v.Hd=0;this.v.startTime=a.getTime();this.I("autorotatechanged",{})};e.prototype.Ut=function(a){a&&""!=a&&this.v.Rd!=a||0==this.v.Hd?this.Wp(a):(this.v.ad=!0,this.v.enabled=!0,this.v.active=!0,this.I("autorotatechanged",{}))};e.prototype.Gp=function(){this.Ea.running=!1;this.Ea.finished=!0;this.v.active=this.D.qe;this.v.ad=this.D.pe;
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.qe=!1;this.D.pe=!1;this.og=(new Date).getTime()};e.prototype.rn=function(a){if(this.mc=document.getElementById(a))return this.mc.innerHTML="",!0;alert("container not found!");return!1};e.prototype.bu=function(a){var b=this;b.mc.removeEventListener("resize",function(){b.le()});b.rn(a)&&(b.mc.appendChild(b.$),b.mc.addEventListener("resize",function(){b.le()},!1))};e.prototype.yn=function(a){this.rn(a)&&
(this.$=document.createElement("div"),this.$.onselectstart=function(){return!1},U&&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.mb+"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.mb+"user-select: none;"),U&&this.ea.setAttribute("id","viewer"),this.ea.setAttribute("style",a),this.$.appendChild(this.ea),this.Qa&&(this.Qa.vd=document.createElement("canvas"),U&&this.Qa.vd.setAttribute("id","lensflarecanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+(this.mb+"user-select: none;"),a+=this.mb+"pointer-events: none;",this.Qa.vd.setAttribute("style",a),this.$.appendChild(this.Qa.vd)),this.Ia=document.createElement("div"),U&&this.Ia.setAttribute("id",
"hotspots"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;",this.zl&&(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);"),this.Lc&&!this.oa&&(a+=this.mb+"transform: translateZ(9999999px);"),a+=this.mb+"user-select: none;",this.Ia.setAttribute("style",a),this.$.appendChild(this.Ia),this.tb=document.createElement("canvas"),U&&this.tb.setAttribute("id","hotspotcanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+
(this.mb+"user-select: none;"),a+=this.mb+"pointer-events: none;",this.tb.setAttribute("style",a),this.$.appendChild(this.tb),this.Fa=document.createElement("div"),U&&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.va=this.Ia,this.om(0))};e.prototype.Ef=
function(){var a;this.la.ia.x=0;this.la.ia.y=0;this.sa.Ef();var b=[];for(a=0;a<this.U.length;a++){var c=this.U[a];c.qd?"_videopanorama"!=c.id&&b.push(c):c.Ne()}for(a=0;a<this.Xa.length;a++)this.Xa[a].Ne();for(a=0;a<this.Ub.length;a++)this.Ub[a].Ne();this.L.Ph=-1;this.tb.style.visibility="hidden";this.Kd=0;this.If=[];this.Za.Fi=[];for(a=0;a<this.X.length;a++)c=this.X[a],c.ap||7>this.hd&&0==c.mode||this.If.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.to=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.ko=function(){var a=this.to();return a.w>a.h?a.w:a.h};e.prototype.Xl=function(a,b){a=(new DOMParser).parseFromString(a,"text/xml");this.qp(a,b)};e.prototype.pp=function(a,b,c){try{var h=void 0;h=new XMLHttpRequest;h.open("GET",a,!1);
h.send(null);if(h.responseXML){var m=a.lastIndexOf("/");0<=m&&(this.re=a.slice(0,m+1));2<=arguments.length&&null!=b&&(this.re=b);this.Xl(h.responseText,c)}else alert("Error loading panorama XML")}catch(n){alert("Error:"+n)}};e.prototype.Pt=function(a,b,c,h){var m=new XMLHttpRequest;var n=this;m.onload=function(q){if(4<=m.readyState)if(m.responseXML){var r=a.lastIndexOf("/");0<=r&&(n.re=a.slice(0,r+1));3<=arguments.length&&null!=c&&(n.re=c);n.Xl(m.responseText,h);b&&b()}else alert("Error loading panorama XML");
else console.error("Wrong state loading XML:"+m.statusText)};m.onerror=function(){console.error("Error loading XML:"+m.statusText)};m.open("GET",a,!0);m.send(null)};e.prototype.Dk=function(a){var b="";"{"==a.charAt(0)&&(b=a.slice(1,a.length-1));(a=this.te[b])&&(b=a);a={oldNodeId:this.ra,nodeId:b};this.I("beforechangenodeid",a);this.ol?this.ol=!1:this.Ml.push(this.ra);""!=this.ra&&-1==this.nk.indexOf(this.ra)&&(this.nk.push(this.ra),this.I("changevisitednodes",{}));this.Po=this.ra;this.ra=b;this.G("change active node: "+
b);this.ha&&this.ha.changeActiveNode&&this.ha.changeActiveNode("{"+b+"}");this.I("changenodeid",a);this.kf=!0};e.prototype.dj=function(){return this.ra};e.prototype.cs=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.ps=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.Ur=function(){return this.Po};e.prototype.ts=function(){return this.hc};
e.prototype.qt=function(a){return-1!=this.nk.indexOf(a)};e.prototype.jr=function(){this.nk=[];this.I("changevisitednodes",{})};e.prototype.qp=function(a,b){a=a.firstChild;this.Ve=[];this.$a=[];this.te=[];this.Yd=!1;var c;if(c=a.getAttributeNode("appversion")){if(c=c.nodeValue.toString().match(/(\d+)\.(\d+)\.?(\d+)?/))this.tn=[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||"0",10)];this.G(this.tn)}for(var h=a.firstChild;h;){if("map"==h.nodeName){var m={};(c=h.getAttributeNode("index"))&&(m.index=
Number(c.nodeValue));(c=h.getAttributeNode("title"))&&(m.title=c.nodeValue.toString());c=h.getAttributeNode("type");m.type=c.nodeValue.toString();"web"==m.type?(c=h.getAttributeNode("mapprovider"),m.mapprovider=c.nodeValue.toString(),(c=h.getAttributeNode("mapstyle"))&&(m.mapstyle=c.nodeValue.toString()),(c=h.getAttributeNode("googlecustomstylecode"))&&(m.googlecustomstylecode=c.nodeValue.toString()),(c=h.getAttributeNode("mapurltemplate"))&&(m.mapurltemplate=c.nodeValue.toString()),(c=h.getAttributeNode("mapmaxzoom"))&&
(m.mapmaxzoom=Number(c.nodeValue)),(c=h.getAttributeNode("customlayernames"))&&(m.customlayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("customlayerurltemplates"))&&(m.customlayerurltemplates=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("customlayermaxzooms"))&&(m.customlayermaxzooms=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("mapkey"))&&(m.mapkey=c.nodeValue.toString()),(c=h.getAttributeNode("styleurl"))&&(m.styleurl=c.nodeValue.toString()),(c=h.getAttributeNode("mapboxlayernames"))&&
(m.mapboxlayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("mapboxlayerstyleurls"))&&(m.mapboxlayerstyleurls=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("googlelayernames"))&&(m.googlelayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("googlelayerstyles"))&&(m.googlelayerstyles=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("maplimits"))&&(m.maplimits=c.nodeValue.toString().split("|"))):(c=h.getAttributeNode("width"),m.width=Number(c.nodeValue),
c=h.getAttributeNode("height"),m.height=Number(c.nodeValue),c=h.getAttributeNode("zoomlevels"),m.zoomlevels=Number(c.nodeValue),c=h.getAttributeNode("tileformat"),m.tileformat=c.nodeValue.toString(),c=h.getAttributeNode("bgcolor"),m.bgcolor=c.nodeValue.toString(),c=h.getAttributeNode("crispedges"),m.crispedges=1==c.nodeValue,c=h.getAttributeNode("transparent"),m.transparent=1==c.nodeValue,c=h.getAttributeNode("floorplannorth"),m.floorplannorth=Number(c.nodeValue));c=h.getAttributeNode("id");this.sc[c.nodeValue.toString()]=
m}h=h.nextSibling}if("tour"==a.nodeName){this.Gd=!0;if(c=a.getAttributeNode("start"))this.hc=c.nodeValue.toString();this.hasOwnProperty("startNode")&&this.startNode&&(this.hc=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="");h=a.firstChild;for(a=m="";h;){if("panorama"==h.nodeName){if(c=h.getAttributeNode("id"))m=c.nodeValue.toString(),
""==this.hc&&(this.hc=m),""==a&&(a=m),this.Ve[m]=h,this.$a.push(m);for(c=h.firstChild;c;){if("userdata"==c.nodeName){var n=this.ag(c);this.Ug[m]=n;m==this.hc&&(this.Ug._first=n);n.customnodeid&&(this.te[n.customnodeid]=m);this.Vc[m]=this.Hn(c);this.qg[m]=this.In(c);this.Lf[m]=this.Jn(c)}if("hotspots"==c.nodeName)for(n=c.firstChild;n;)"hotspot"!=n.nodeName&&"polyhotspot"!=n.nodeName||this.Xk(m,c),n=n.nextSibling;if("sounds"==c.nodeName||"media"==c.nodeName)for(n=c.firstChild;n;){"sound"!=n.nodeName||
this.Ll||(this.Yd=!0);if("video"==n.nodeName){var q;(q=n.getAttributeNode("level"))&&0<Number(q.nodeValue)&&(this.Yd=!0)}n=n.nextSibling}c=c.nextSibling}}if("masternode"==h.nodeName)for(c=h.firstChild;c;){"userdata"==c.nodeName&&(n=this.ag(c),this.Ug._master=n);"animationsequences"==c.nodeName&&this.wr(c);if("translations"==c.nodeName){(q=c.getAttributeNode("json"))&&this.$g(q.nodeValue.toString());for(n=c.firstChild;n;){"json"==n.nodeName&&this.$g(n.textContent);if("projecttranslation"==n.nodeName){var r=
{};if(q=n.getAttributeNode("langcode"))r.langCode=q.nodeValue;if(q=n.getAttributeNode("langname"))r.langName=q.nodeValue;this.Tl.push(r)}n=n.nextSibling}this.Dl||this.lm(window.navigator.language)}c=c.nextSibling}"customproperty"==h.nodeName&&this.Gn(h);h=h.nextSibling}!this.Ve.hasOwnProperty(this.hc)&&(h=this.te[this.hc])&&(this.hc=h);this.Ve.hasOwnProperty(this.hc)||(this.Uc("Start node "+this.hc+" not found!"),this.hc=a);this.Wl(this.Ve[this.hc],b);this.Dk("{"+this.hc+"}");this.ra=this.hc}else this.Gd=
!1,this.Wl(a,b),this.Dk(""),this.$a.push("");this.me&&(this.G("add pano vr config"),this.Da.Mi());this.Yd&&(this.Ss(),this.Xp());this.I("configloaded",{});this.I("changenode",{});this.I("playerstatechanged",{})};e.prototype.Wl=function(a,b){var c=this;this.wp();this.Qa&&this.Qa.Rt();this.Pe(this.gb);this.Ef();this.mk=0;for(var h=a.firstChild,m,n,q=0,r=this.M.N;h;){if("view"==h.nodeName){if(m=h.getAttributeNode("fovmode"))this.fov.mode=Number(m.nodeValue);m=h.getAttributeNode("pannorth");this.pan.Hj=
1*(m?m.nodeValue:0);for(var t=h.firstChild;t;){"start"==t.nodeName&&(m=t.getAttributeNode("pan"),this.pan.m=Number(m?m.nodeValue:0),this.pan.Ha=this.pan.m,m=t.getAttributeNode("tilt"),this.u.m=Number(m?m.nodeValue:0),this.u.Ha=this.u.m,m=t.getAttributeNode("roll"),this.W.m=Number(m?m.nodeValue:0),this.W.Ha=this.W.m,m=t.getAttributeNode("fov"),this.fov.m=Number(m?m.nodeValue:70),this.fov.Ha=this.fov.m,m=t.getAttributeNode("projection"),this.M.ip=Number(m?m.nodeValue:4),this.sb(this.Dh()));"min"==t.nodeName&&
(m=t.getAttributeNode("pan"),this.pan.min=1*(m?m.nodeValue:0),m=t.getAttributeNode("tilt"),this.u.min=1*(m?m.nodeValue:-90),m=t.getAttributeNode("fov"),this.fov.min=1*(m?m.nodeValue:5),1E-20>this.fov.min&&(this.fov.min=1E-20),m=t.getAttributeNode("fovpixel"),this.fov.Zh=1*(m?m.nodeValue:0));if("max"==t.nodeName){m=t.getAttributeNode("pan");this.pan.max=1*(m?m.nodeValue:0);m=t.getAttributeNode("tilt");this.u.max=1*(m?m.nodeValue:90);m=t.getAttributeNode("fov");this.fov.max=1*(m?m.nodeValue:120);180<=
this.fov.max&&(this.fov.max=179.9);if(m=t.getAttributeNode("fovstereographic"))this.fov.Kl=1*m.nodeValue;if(m=t.getAttributeNode("fovfisheye"))this.fov.Jl=1*m.nodeValue;if(m=t.getAttributeNode("scaletofit"))this.J.Dp=1==m.nodeValue}if("flyin"==t.nodeName){if(m=t.getAttributeNode("projection"))this.oc.qb=Number(m.nodeValue);if(m=t.getAttributeNode("pan"))this.oc.pan=parseFloat(m.nodeValue);if(m=t.getAttributeNode("tilt"))this.oc.u=parseFloat(m.nodeValue);if(m=t.getAttributeNode("fov"))this.oc.fov=
parseFloat(m.nodeValue)}t=t.nextSibling}}if("autorotate"==h.nodeName){if(m=h.getAttributeNode("speed"))this.v.speed=1*m.nodeValue;if(m=h.getAttributeNode("delay"))this.v.timeout=1*m.nodeValue;if(m=h.getAttributeNode("returntohorizon"))this.v.ek=1*m.nodeValue;if(m=h.getAttributeNode("horizonfromdefview"))this.v.Bo=1==m.nodeValue;if(m=h.getAttributeNode("nodedelay"))this.v.Gj=1*m.nodeValue;if(m=h.getAttributeNode("noderandom"))this.v.cp=1==m.nodeValue;(m=h.getAttributeNode("nodefilter"))&&!this.v.bp&&
(this.v.tg=m.nodeValue);this.Cd&&(this.v.enabled=!0,this.v.Of=!0,this.v.active=!1);(m=h.getAttributeNode("startloaded"))&&this.Cd&&(this.v.Eg=1==m.nodeValue,this.v.Eg&&(this.v.active=!1));if(m=h.getAttributeNode("useanimation"))this.v.Sg=1==m.nodeValue,this.v.ad=this.v.Sg;if(m=h.getAttributeNode("syncanimationwithvideo"))this.v.ym=1==m.nodeValue}if("animation"==h.nodeName){if(m=h.getAttributeNode("syncanimationwithvideo"))this.v.ym=1==m.nodeValue;if(m=h.getAttributeNode("useinautorotation"))this.v.Sg=
1==m.nodeValue;if(m=h.getAttributeNode("animsequence"))this.v.Oi=m.nodeValue,this.Cd&&(this.v.Rd=this.v.Oi);if(m=h.getAttributeNode("clipsrandom"))this.v.sn=1==m.nodeValue;this.xa=[];for(t=h.firstChild;t;){if("clip"==t.nodeName){this.R=new z.Um;if(m=t.getAttributeNode("animtitle"))this.R.Ze=m.nodeValue.toString();if(m=t.getAttributeNode("cliptitle"))this.R.cb=m.nodeValue.toString();if(m=t.getAttributeNode("nodeid"))this.R.Av=m.nodeValue.toString();if(m=t.getAttributeNode("length"))this.R.length=Number(m.nodeValue);
if(m=t.getAttributeNode("animtype"))this.R.Tq=Number(m.nodeValue);if(m=t.getAttributeNode("nextcliptitle"))this.R.$o=m.nodeValue.toString();if(m=t.getAttributeNode("nextclipnodeid"))this.R.Zo=m.nodeValue.toString();if(m=t.getAttributeNode("nextclipstartview"))this.R.pt=m.nodeValue.toString();if(m=t.getAttributeNode("transitiontype"))this.R.Zu=Number(m.nodeValue);var w=t.firstChild;for(this.R.Ja=[];w;){if("keyframe"==w.nodeName){var y=new z.gd;if(m=w.getAttributeNode("time"))y.time=Number(m.nodeValue);
if(m=w.getAttributeNode("value"))y.value=Number(m.nodeValue);if(m=w.getAttributeNode("valuestring"))y.Nm=m.nodeValue.toString();if(m=w.getAttributeNode("transitiontime"))y.Gb=Number(m.nodeValue);m=w.getAttributeNode("type");var C=0;m&&(y.type=Number(m.nodeValue),C=Number(m.nodeValue));if(m=w.getAttributeNode("property"))y.rb=Number(m.nodeValue);if(m=w.getAttributeNode("additionaltrackid"))y.td=m.nodeValue.toString();if(m=w.getAttributeNode("additionaltracktype"))y.$m=Number(m.nodeValue);if(1==C||
2==C){if(m=w.getAttributeNode("bezierintime"))y.$e=Number(m.nodeValue);if(m=w.getAttributeNode("bezierinvalue"))y.af=Number(m.nodeValue);if(m=w.getAttributeNode("bezierouttime"))y.bf=Number(m.nodeValue);if(m=w.getAttributeNode("bezieroutvalue"))y.cf=Number(m.nodeValue)}this.R.Ja.push(y)}w=w.nextSibling}this.xa.push(this.R);"__VideoPano"==this.R.cb&&(this.mk=this.R)}t=t.nextSibling}}"input"==h.nodeName&&(n||(n=h));if(n)for(w=0;6>w;w++)m=n.getAttributeNode("prev"+w+"url"),this.nh[w]=m?String(m.nodeValue):
"";"altinput"==h.nodeName&&(t=0,(m=h.getAttributeNode("screensize"))&&(t=1*m.nodeValue),0<t&&t<=this.ko()&&t>q&&(q=t,n=h));if("control"==h.nodeName&&this.Cd){if(m=h.getAttributeNode("simulatemass"))this.la.enabled=1==m.nodeValue;if(m=h.getAttributeNode("rubberband"))this.J.Cp=1==m.nodeValue;if(m=h.getAttributeNode("zoomcentercursor"))this.J.Nf=1==m.nodeValue;if(m=h.getAttributeNode("locked"))this.J.rc=1==m.nodeValue;m&&(this.J.Vh=1==m.nodeValue);if(m=h.getAttributeNode("lockedmouse"))this.J.rc=1==
m.nodeValue;if(m=h.getAttributeNode("lockedkeyboard"))this.J.Vh=1==m.nodeValue;if(m=h.getAttributeNode("lockedkeyboardzoom"))this.J.bt=1==m.nodeValue;if(m=h.getAttributeNode("lockedwheel"))this.J.He=1==m.nodeValue;if(m=h.getAttributeNode("invertwheel"))this.J.Fo=1==m.nodeValue;if(m=h.getAttributeNode("speedwheel"))this.J.tm=1*m.nodeValue;if(m=h.getAttributeNode("invertcontrol"))this.J.$d=1==m.nodeValue;if(m=h.getAttributeNode("sensitivity"))this.J.sensitivity=1*m.nodeValue,1>this.J.sensitivity&&(this.J.sensitivity=
1);if(m=h.getAttributeNode("dblclickfullscreen"))this.J.Sk=1==m.nodeValue;if(m=h.getAttributeNode("contextfullscreen"))this.J.kh=1==m.nodeValue;if(m=h.getAttributeNode("contextvr"))this.J.lh=1==m.nodeValue;if(m=h.getAttributeNode("contextprojections"))this.J.Ui=1==m.nodeValue;if(m=h.getAttributeNode("hideabout"))this.J.kg=1==m.nodeValue;for(t=h.firstChild;t;)"menulink"==t.nodeName&&(w={text:"",url:""},m=t.getAttributeNode("text"),w.text=m.nodeValue,m=t.getAttributeNode("url"),w.url=m.nodeValue,this.Yh.push(w)),
t=t.nextSibling}"vr"==h.nodeName&&this.Cd&&(m=h.getAttributeNode("toggleskinbutton"))&&(this.Da.Fn=1==m.nodeValue);if("transition"==h.nodeName&&this.Cd){if(m=h.getAttributeNode("enabled"))this.D.enabled=1==m.nodeValue;if(m=h.getAttributeNode("blendtime"))this.D.fh=1*m.nodeValue;if(m=h.getAttributeNode("blendcolor"))this.D.Pf=m.nodeValue.toString();if(m=h.getAttributeNode("type"))this.D.type=m.nodeValue.toString();if(m=h.getAttributeNode("delay"))this.D.delay=m.nodeValue.toString();if(m=h.getAttributeNode("softedge"))this.D.Zc=
1*m.nodeValue;if(m=h.getAttributeNode("zoomin"))this.D.da=1*m.nodeValue;if(m=h.getAttributeNode("zoomout"))this.D.fd=1*m.nodeValue;if(m=h.getAttributeNode("zoomfov"))this.D.uk=1*m.nodeValue;if(m=h.getAttributeNode("zoomafterinfov"))this.D.sk=1*m.nodeValue;if(m=h.getAttributeNode("zoomafteroutfov"))this.D.tk=1*m.nodeValue;if(m=h.getAttributeNode("zoomspeed"))this.D.Yg=1*m.nodeValue;if(m=h.getAttributeNode("zoomoutpause"))this.D.Xg=1==m.nodeValue;"cut"==this.D.type&&(this.D.fh=0)}if("soundstransition"==
h.nodeName){if(m=h.getAttributeNode("enabled"))this.Za.enabled=1==m.nodeValue;if(m=h.getAttributeNode("transitiontime"))this.Za.Gb=1*m.nodeValue;if(m=h.getAttributeNode("crossfade"))this.Za.zn=1==m.nodeValue}if("flyintransition"==h.nodeName){if(m=h.getAttributeNode("enabled"))this.Ea.enabled=1==m.nodeValue&&this.oa;if(m=h.getAttributeNode("speed"))this.Ea.speed=1*m.nodeValue}"userdata"==h.nodeName&&(this.userdata=this.Tg=this.ag(h),this.Vc[a.id]||(this.Vc[a.id]=this.Hn(h),this.qg[a.id]=this.In(h),
this.Lf[a.id]=this.Jn(h)));"projectuserdata"==h.nodeName&&(this.Ug._master=this.ag(h));"customproperty"==h.nodeName&&this.Gn(h);if("translations"==h.nodeName)for((m=h.getAttributeNode("json"))&&this.$g(m.nodeValue.toString()),this.Dl||this.lm(window.navigator.language),t=h.firstChild;t;){"json"==t.nodeName&&this.$g(t.textContent);if("projecttranslation"==t.nodeName){w={};if(m=t.getAttributeNode("langcode"))w.langCode=m.nodeValue;if(m=t.getAttributeNode("langname"))w.langName=m.nodeValue;this.Tl.push(w)}t=
t.nextSibling}if("hotspots"==h.nodeName){if(m=h.getAttributeNode("smoothmovement"))this.Up=1==m.nodeValue;for(t=h.firstChild;t;){if("label"==t.nodeName&&this.Cd){w=this.L.ck;if(m=t.getAttributeNode("enabled"))w.enabled=1==m.nodeValue;if(m=t.getAttributeNode("width"))w.width=1*m.nodeValue;if(m=t.getAttributeNode("height"))w.height=1*m.nodeValue;if(m=t.getAttributeNode("textcolor"))w.dk=1*m.nodeValue;if(m=t.getAttributeNode("textalpha"))w.bk=1*m.nodeValue;if(m=t.getAttributeNode("background"))w.background=
1==m.nodeValue;if(m=t.getAttributeNode("backgroundalpha"))w.Vb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundcolor"))w.Wb=1*m.nodeValue;if(m=t.getAttributeNode("border"))w.Pi=1*m.nodeValue;if(m=t.getAttributeNode("bordercolor"))w.Yb=1*m.nodeValue;if(m=t.getAttributeNode("borderalpha"))w.Xb=1*m.nodeValue;if(m=t.getAttributeNode("borderradius"))w.Ak=1*m.nodeValue;if(m=t.getAttributeNode("wordwrap"))w.rk=1==m.nodeValue}if("polystyle"==t.nodeName&&this.Cd){if(m=t.getAttributeNode("mode"))this.L.mode=
1*m.nodeValue;if(m=t.getAttributeNode("bordercolor"))this.L.Yb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundcolor"))this.L.Wb=1*m.nodeValue;if(m=t.getAttributeNode("borderalpha"))this.L.Xb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundalpha"))this.L.Vb=1*m.nodeValue;if(m=t.getAttributeNode("handcursor"))this.L.De=1==m.nodeValue}m=void 0;"hotspot"==t.nodeName&&(m=new z.Li(this),m.type="point",m.yb(t),this.K.push(m),this.Xk(a.id,t));"polyhotspot"==t.nodeName&&(m=new z.Li(this),m.type="poly",
m.yb(t),this.K.push(m),this.Xk(a.id,t));t=t.nextSibling}}if("sounds"==h.nodeName||"media"==h.nodeName)for(t=h.firstChild;t;){if("sound"==t.nodeName&&!this.Ll)for(this.Yd=!0,m=new z.ne(this),m.yb(t),m.addElement(),w=0;w<this.If.length;w++)m.id==this.If[w].id&&(this.If.splice(w,1),w--);"video"==t.nodeName&&(m=new z.Ym(this),m.yb(t),m.addElement(),0<m.level&&(this.Yd=!0));"image"==t.nodeName&&(m=new z.Hq(this),m.yb(t),m.addElement());"webelement"==t.nodeName&&(m=new z.Jq(this),m.yb(t),m.addElement());
"lensflare"==t.nodeName&&this.Qa&&(m=new z.Iq(this),m.yb(t),this.Qa.Uh.push(m));t=t.nextSibling}h=h.nextSibling}for(w=this.v.Hd=0;w<this.If.length;w++){a=this.If[w];if(this.ga&&this.Za.enabled&&this.isPlaying(a.id))this.Za.Fi.push(a);else{try{a.ua?a.Rf():a.j.pause()}catch(E){this.G(E)}a.Ne()}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.Ln();this.me||(this.ob.ni=!0);b&&("object"===typeof b&&null!==b?(b.hasOwnProperty("pan")&&this.ee(Number(b.pan)),
b.hasOwnProperty("tilt")&&this.fe(Number(b.tilt)),b.hasOwnProperty("projection")&&this.sb(Number(b.projection)),b.hasOwnProperty("fov")&&this.Ab(Number(b.fov))):""!=b&&(b=b.toString().split("/"),4<b.length&&this.sb(Number(b[4])),0<b.length&&(m=String(b[0]),"N"==m.charAt(0)?this.Vj(Number(m.substr(1))):"S"==m.charAt(0)?this.Vj(-180+Number(m.substr(1))):this.ee(Number(m))),1<b.length&&this.fe(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.qb=this.Z(),this.Ea.Ad.qq=!0);if(n){m=n.getAttributeNode("stereo");this.Fd=!1;m&&1==m.nodeValue&&(this.Fd=!0);m=n.getAttributeNode("fliplr");this.Fg=!1;m&&1==m.nodeValue&&(this.Fg=!0);for(w=0;w<(this.Fd?12:6);w++)(m=n.getAttributeNode("tile"+w+"url"))&&(this.mh[w]=String(m.nodeValue));for(w=0;6>w;w++)(m=n.getAttributeNode("prev"+w+"url"))&&(this.nh[w]=String(m.nodeValue));if(m=n.getAttributeNode("tilevrurl"))this.Ok=String(m.nodeValue);if(m=n.getAttributeNode("tilesize"))this.Te=
1*m.nodeValue;m=n.getAttributeNode("canvassize");if(m=n.getAttributeNode("tilescale"))this.Kg=1*m.nodeValue;if(m=n.getAttributeNode("leveltileurl"))r.Hl=m.nodeValue;if(m=n.getAttributeNode("leveltilesize"))r.V=Number(m.nodeValue);if(m=n.getAttributeNode("levelbias"))r.To=Number(m.nodeValue);if(m=n.getAttributeNode("levelbiashidpi"))r.Uo=Number(m.nodeValue);m=n.getAttributeNode("overlap");this.Ya.W=0;this.Ya.pitch=0;m&&(r.jb=Number(m.nodeValue));if(m=n.getAttributeNode("levelingroll"))this.Ya.W=Number(m.nodeValue);
if(m=n.getAttributeNode("levelingpitch"))this.Ya.pitch=Number(m.nodeValue);this.Kd=0;(m=n.getAttributeNode("flat"))&&1==m.nodeValue&&(this.Kd=2);m=n.getAttributeNode("width");r.width=1*(m?m.nodeValue:1);m=n.getAttributeNode("height");r.height=1*(m?m.nodeValue:r.width);this.A.src=[];r.levels=[];for(t=n.firstChild;t;){if("preview"==t.nodeName){if(m=t.getAttributeNode("color"))r.Lj=m.nodeValue;if(m=t.getAttributeNode("strip"))r.op=1==m.nodeValue}if("video"==t.nodeName){if(m=t.getAttributeNode("format"))"3x2"==
m.nodeValue&&(this.A.format=14),"equirectangular"==m.nodeValue&&(this.A.format=1);if(m=t.getAttributeNode("flipy"))this.A.flipY=Number(m.nodeValue);if(m=t.getAttributeNode("startonload"))this.A.Yj=1==m.nodeValue;if(m=t.getAttributeNode("startmutedmobile"))this.A.um=1==m.nodeValue;if(m=t.getAttributeNode("level"))this.A.level=Number(m.nodeValue);if(m=t.getAttributeNode("bleed"))this.A.df=Number(m.nodeValue);if(m=t.getAttributeNode("endaction"))this.A.ve=String(m.nodeValue);if(m=t.getAttributeNode("targetview"))this.A.ak=
String(m.nodeValue);if(m=t.getAttributeNode("width"))this.A.width=Number(m.nodeValue);if(m=t.getAttributeNode("height"))this.A.height=Number(m.nodeValue);for(w=t.firstChild;w;)"source"==w.nodeName&&(m=w.getAttributeNode("url"))&&this.A.src.push(m.nodeValue.toString()),w=w.nextSibling;0<this.A.src.length&&""!=this.A.src[0]&&0<this.A.level&&(this.Yd=!0)}if("level"==t.nodeName){n=new z.Xm;m=t.getAttributeNode("width");n.width=1*(m?m.nodeValue:1);m=t.getAttributeNode("height");n.height=1*(m?m.nodeValue:
n.width);if(m=t.getAttributeNode("preload"))n.cache=1==m.nodeValue;if(m=t.getAttributeNode("preview"))n.Df=1==m.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.Gl=r.levels.length}this.qf=!0;this.Pg&&(this.oa=this.Og=!1,this.Gc||(this.G("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.ic());this.oa&&this.S&&(this.sa.Do(this.Kg),
this.sa.Eo());var F=this;0<r.levels.length&&r.op&&0==this.Kd&&(b=new Image,n=new z.Xm,n.Df=!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.nt(b),b.setAttribute("src",this.M.Jg(6,r.Gl-1,0,0)));if(0<this.A.src.length&&this.oa)if(this.Hi){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.Cm=!1;this.A.j.oncanplay=function(){if(!F.A.Tc){F.A.ng=!0;var E,D,A=[],G=new z.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.df;var L=I+H-2*F.A.df;var K=4;3>E&&(K+=H);var M=K+H-2*F.A.df;for(D=0;4>D;D++){G.x=-1;G.y=-1;G.z=1;for(var Q=0;Q<D;Q++)G.Bp();A.push((0<G.x?I:L)/(3*H),(0<G.y?M:K)/(2*H))}}J.bindBuffer(J.ARRAY_BUFFER,F.A.Bi);J.bufferData(J.ARRAY_BUFFER,
new Float32Array(A),J.STATIC_DRAW);F.D.$c&&"videopano"==F.D.delay&&F.Zj(null)}};this.A.fb=function(){var E=F.Wa("_videopanorama");return 0<E.length&&E[0].fb?E[0].fb:0};this.A.fm=function(E){var D=F.Wa("_videopanorama");0<D.length&&(D[0].fb=E)};this.A.loop=function(){return 0<F.A.fb()?(F.A.fm(F.A.fb()-1),F.A.j.play(),!0):!1};"exit"==this.A.ve?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.ve?F.A.j.onended=function(){F.A.loop()||F.update()}:
"{"==this.A.ve.charAt(0)?this.A.j.onended=function(){F.rd(F.A.ve,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.hb(this.A.src[w])),this.A.j.appendChild(r);r=this.Wa("_videopanorama");0<r.length?r[0].j=this.A.j:this.rp("_videopanorama",this.A.j);if(this.A.Yj&&(r=this.A.j.play(),void 0!==r))r.then(function(){})["catch"](function(){c.A.um&&(c.A.j.muted=!0,c.A.j.play())})}else"{"==this.A.ve.charAt(0)&&F.rd(F.A.ve,F.A.ak);this.Zm();
this.D.Md||this.aq();this.update();this.Cd&&(this.Cd=!1,this.I("viewerinit",{}),this.va&&this.va.ggViewerInit&&this.va.ggViewerInit(),this.Ea.enabled&&0==this.Kd&&this.oa&&(this.sb(9),this.pan.m=this.oc.pan,this.u.m=this.oc.u,this.fov.m=this.oc.fov,this.sb(this.oc.qb),this.R=this.bl(!1),this.pan.m=this.cc(0,0).value,this.u.m=this.cc(0,1).value,this.fov.m=this.cc(0,2).value,r=this.cc(0,3).value,3==r&&this.sb(r),this.xc=this.R.cb,this.Tj(!0),this.v.active=!1,this.v.yh=!0));this.ic()};e.prototype.Nl=
function(a,b){0<a.length&&(".xml"==a.slice(-4)||".swf"==a.slice(-4)||"{"==a.charAt(0)?this.rd(this.hb(a),b):window.open(this.hb(a),b))};e.prototype.Mu=function(){this.qf=this.isLoaded=!1;this.checkLoaded=this.wd=[];this.ei=0;this.va&&this.va.ggReLoaded&&this.va.ggReLoaded();this.I("beforechangenode",{})};e.prototype.Js=function(a){var b="";0<this.Ml.length&&(b=this.Ml.pop());""!=b&&(this.ol=!0);this.rd("{"+b+"}",a)};e.prototype.rd=function(a,b){if(""!=a&&"{}"!=a){this.Mu();this.xe&&!this.Pg&&(this.Sc(0),
this.ic());this.ha&&this.ha.hotspotProxyOut&&this.ha.hotspotProxyOut(this.P.id,this.P.url);this.I("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="",h=null;"object"===typeof b&&null!==b?h=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.Wd()+b);c=c.replace("$(fwd)","N"+this.Wd()+b);c=c.replace("$bwd","S"+this.Wd()+b);c=c.replace("$(bwd)",
"S"+this.Wd()+b);c=c.replace("$ap",String(this.pan.m));c=c.replace("$(ap)",String(this.pan.m));c=c.replace("$an",String(this.Wd()));c=c.replace("$(an)",String(this.Wd()));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]));h=null!==h?h:c;this.na(!1);if("{"==a.charAt(0)){b=
a.substr(1,a.length-2);if(this.ra==b&&this.hh){this.qf=this.isLoaded=!0;return}(c=this.te[b])&&(b=c);c=this.D;var m=this.S;if(this.Ve[b]){this.hh=!0;if(this.D.enabled&&this.oa&&this.D.Cc){c.Rp=!0;c.ke||c.Md||c.$c||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.Rk=n;m.bindFramebuffer(m.FRAMEBUFFER,c.Cc);m.viewport(0,0,c.Cc.width,c.Cc.height);m.clear(m.COLOR_BUFFER_BIT|
m.DEPTH_BUFFER_BIT);c.Ei=!0;this.Gi();c.Ei=!1;m.bindFramebuffer(m.FRAMEBUFFER,null);m.viewport(0,0,this.Cb.width,this.Cb.height);m=new Date;this.P!=this.gb&&6!=c.da?7==c.da?(c.Vg=this.P.fc/this.C.width,c.Wg=.5):(c.Vg=this.P.fc/this.C.width,c.Wg=1-this.P.Qb/this.C.height):(c.Vg=.5,c.Wg=.5);if(1==c.da||2==c.da||6==c.da||7==c.da)c.zq=m.getTime()+100,c.Md=!0,c.Hb=Math.sin(this.Dd()/2*Math.PI/180)/Math.sin(c.uk/2*Math.PI/180),c.Hb=Math.max(c.Hb,1),c.yq=1/c.Yg*c.Hb*.3}this.Wl(this.Ve[b],h);this.Dk(a);if(c.enabled&&
this.oa&&(this.lq(null),0!=c.fd)){c.zm=this.nf();c.Am=this.gg();c.Ai=this.Dd();c.he=this.Z();if(1==c.fd||3==c.fd)this.Ab(c.tk);else if(2==c.fd)this.Ab(c.sk);else if(4==c.fd){for(h=a=0;h<this.xa.length;h++)this.xa[h].cb&&0==this.xa[h].cb.indexOf("__FlyIn")&&(a=this.xa[h]);0!=a?(this.sb(this.gj(3,a).value),this.ee(this.gj(0,a).value),this.fe(this.gj(1,a).value),this.Ab(this.gj(2,a).value)):(this.sb(this.oc.qb),this.ee(this.oc.pan),this.fe(this.oc.u),this.Ab(this.oc.fov))}c.Xg||1==c.da||2==c.da||6==
c.da||7==c.da||this.vm()}c.Rp=!1;this.me&&(this.G("add pano opennext"),this.Da.Mi());this.D.Md||this.D.ke||this.D.$c||(this.fa&&this.Nk(),this.hh=!1)}else{this.Uc("invalid node id: "+b);return}}else this.pp(a,null,h);this.I("changenode",{});this.update(5)}};e.prototype.mo=function(){return this.qf?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.wr=function(a){for(var b="",c=a.firstChild;c;){if("sequence"==c.nodeName){if(a=c.getAttributeNode("title"))b=a.nodeValue;for(var h=[],m=c.firstChild;m;){if("sequenceelement"==m.nodeName){var n={};if(a=m.getAttributeNode("index"))n.index=a.nodeValue;
if(a=m.getAttributeNode("nodeid"))n.nodeid=a.nodeValue;if(a=m.getAttributeNode("cliptitle"))n.cliptitle=a.nodeValue;if(a=m.getAttributeNode("startview"))n.startview=a.nodeValue;h.push(n)}m=m.nextSibling}this.dn[b]=h}c=c.nextSibling}};e.prototype.Hn=function(a){for(var b={},c=a.firstChild;c;){if("mapcoords"==c.nodeName){var h={x:0,y:0};a=c.getAttributeNode("x");h.x=Number(a.nodeValue);a=c.getAttributeNode("y");h.y=Number(a.nodeValue);a=c.getAttributeNode("mapid");b[a.nodeValue.toString()]=h}c=c.nextSibling}return b};
e.prototype.In=function(a){for(var b={},c=a.firstChild;c;){if("mapcoords"==c.nodeName){var h={x:0,y:0};a=c.getAttributeNode("x_floorplan_percent");h.x=Number(a.nodeValue);a=c.getAttributeNode("y_floorplan_percent");h.y=Number(a.nodeValue);a=c.getAttributeNode("mapid");b[a.nodeValue.toString()]=h}c=c.nextSibling}return b};e.prototype.Jn=function(a){for(var b={},c=a.firstChild;c;){if("custompropertyvalue"==c.nodeName){a=c.getAttributeNode("value");var h=a.nodeValue.toString();a=c.getAttributeNode("variablename");
b[a.nodeValue.toString()]=h}c=c.nextSibling}return b};e.prototype.Xk=function(a,b){var c,h="";(c=b.getAttributeNode("id"))&&(h=c.nodeValue.toString());if(!this.pb.hasOwnProperty(a)||!this.pb[a].hasOwnProperty(h)){var m={};for(b=b.firstChild;b;){if("custompropertyvalue"==b.nodeName){c=b.getAttributeNode("variablename");var n=c.nodeValue;c=b.getAttributeNode("value");m[n]=c.nodeValue}b=b.nextSibling}this.pb[a]||(this.pb[a]={});this.pb[a][h]=m}};e.prototype.Gn=function(a){var b=a.getAttributeNode("variablename"),
c=b.nodeValue.toString();b=a.getAttributeNode("variabletype");var h=Number(b.nodeValue);b=a.getAttributeNode("propertytype");var m=Number(b.nodeValue);b=a.getAttributeNode("defaultvalue");var n;b&&(n=b.nodeValue.toString());this.Ga[c]={Od:h,ki:m,Uk:n}};e.prototype.Ch=function(a){return a?this.Ug[a]?this.Ug[a]:this.ag():this.Tg};e.prototype.no=function(a,b){""!==a||this.Gd||(a="node1");a||(a=this.ra);return this.Lf.hasOwnProperty(a)&&this.Lf[a].hasOwnProperty(b)?this.lj(z.kc.cl(this.Lf[a][b],this.Ga[b].Od),
this.Ga[b].Od):null};e.prototype.Np=function(a,b,c){c="string"===typeof c?c:z.kc.bo(c,this.Ga[b].Od);this.Lf[a][b]!=c&&(this.Lf[a][b]=c,this.I("varchanged_"+b,{}))};e.prototype.jl=function(a){a=this.Ch(a);var b=[];""!=a.latitude&&0!=a.latitude&&0!=a.longitude&&(b.push(a.latitude),b.push(a.longitude));return b};e.prototype.oo=function(a){for(var b=[],c=0;c<this.$a.length;c++){var h=this.$a[c],m=this.Ch(h);m&&m.tags.includes(a)&&b.push(h)}return b};e.prototype.gs=function(a){return this.Ch(a).title};
e.prototype.ds=function(a,b){var c=-1;a=this.jl(a);b=this.jl(b);if(2==a.length&&2==b.length){c=Math.PI/180*(b[0]-a[0]);var h=Math.PI/180*(b[1]-a[1]);a=Math.sin(c/2)*Math.sin(c/2)+Math.sin(h/2)*Math.sin(h/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.cc=function(a,b,c){var h;for(h=0;h<this.R.Ja.length;h++){var m=this.R.Ja[h];if(m.time==a&&m.rb==b&&(!c||m.td==c))return m}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].rb==a)return b.Ja[c];return!1};e.prototype.qo=function(a,b,c){for(a=Math.floor(a);!this.cc(a,b,c)&&0<a;)a--;return a};e.prototype.lo=function(a){var b,c=1E5,h=a,m=!1;for(b=0;b<this.R.Ja.length;b++){var n=this.R.Ja[b];n.rb==a.rb&&n.td==a.td&&n.time>a.time&&n.time<c&&(h=this.R.Ja[b],c=h.time,m=!0)}return m?h:!1};e.prototype.Cr=function(a){for(var b=[],c=0;c<this.R.Ja.length;c++){var h=this.R.Ja[c];if(h.time<=a&&4==h.rb){for(var m=!1,n=0;n<b.length;n++)if(b[n].td==
this.R.Ja[c].td){b[n].time<h.time?b.splice(n,1):m=!0;break}m||b.push(h)}}return b};e.prototype.Yn=function(a,b,c){var h=new z.Oc(a.time,a.value),m=new z.Oc(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 z.Oc;var q=new z.Oc,r=b.time-a.time;0==a.type?q.init(a.time+.3*r,a.value):q.init(a.bf,a.cf);0==b.type||3==b.type?n.init(b.time-.3*r,b.value):n.init(b.$e,b.af);a=new z.Oc;a.zk(h,m,q,n,c);c=a.y}else a=new z.Oc,a.Zd(h,m,n),c=a.y;return c};
e.prototype.bl=function(a,b,c,h){for(var m=0;m<this.xa.length;m++)if(this.xa[m].cb&&0==this.xa[m].cb.indexOf("__FlyIn"))return this.xa[m];m=new z.Tm;m.cb="__FlyIn";m.Se=this.pan.m;m.yi=this.u.m;m.ge=this.fov.m;m.xi=this.Z();m.he=this.Dh();a?(m.Xf=!1,m.hf=!1,m.speed=this.D.Yg,m.Ld=b,m.ie=c,m.Ig=h):(m.Xf=!0,m.hf=!0,m.speed=this.Ea.speed,this.Ea.Ad.qq?(m.Ld=this.Ea.Ad.pan,m.ie=this.Ea.Ad.u,m.Ig=this.Ea.Ad.fov,m.he=this.Ea.Ad.qb):(m.Ld=this.pan.Ha,m.ie=this.u.Ha,m.Ig=this.fov.Ha));return this.Vn(m)};
e.prototype.Vn=function(a){var b=new z.Um;b.cb=a.cb;b.Ze="";b.Ja=[];for(var c=a.xi!=a.he&&-1!=a.he;-180>a.Ld;)a.Ld+=360;for(;180<a.Ld;)a.Ld-=360;var h=a.Ld-a.Se;if(360==this.pan.max-this.pan.min&&!this.ib()){for(;-180>h;)h+=360;for(;180<h;)h-=360}var m=a.ie-a.yi,n=a.Ig-a.ge,q=Math.round(Math.sqrt(h*h+m*m+n*n)/a.speed*.33);c&&(q=Math.max(10,q));b.length=q;if(a.jf){var r=Math.ceil(.7*q);r=Math.min(15,r);r=Math.max(5,r);b.length=q+r;var t=.33*r}var w=a.Ig,y=q,C=0,F=q-1;if(c){var E=a.ge;var D=4==a.he?
120:this.Bh(a.he);n=w-a.ge;var A=new z.Oc(0,a.ge),G=new z.Oc(q,w),J=new z.Oc,H=new z.Oc;H.init(q/3,a.ge+n/3);J.init(2*q/3,w-n/3);if(E>D)for(;C<=q&&E>D;)E=new z.Oc,E.zk(A,G,H,J,C),E=E.y,C++;else C=1;C>=.8*q&&(y=C=Math.round(.8*q));0==C&&(C=1);D=4==a.xi?120:this.Bh(a.xi);E=a.Ig;if(E>D)for(;F>C&&E>D;)E=new z.Oc,E.zk(A,G,H,J,F),E=E.y,F--}A=new z.gd;A.time=0;A.rb=0;A.value=a.Se;A.type=1;A.bf=q/3;A.cf=a.Xf?a.Se:a.Se+h/3;b.Ja.push(A);A=new z.gd;A.time=0;A.rb=1;A.value=a.yi;A.type=1;A.bf=q/3;A.cf=a.Xf?a.yi:
a.yi+m/3;b.Ja.push(A);A=new z.gd;A.time=0;A.rb=2;A.value=a.ge;A.type=1;A.bf=q/3;A.cf=a.Xf?a.ge:a.ge+n/3;b.Ja.push(A);A=new z.gd;A.time=0;A.rb=3;A.value=a.xi;A.type=0;A.Gb=0;b.Ja.push(A);c&&(A=new z.gd,A.time=C,A.rb=3,A.value=a.he,A.type=0,A.Gb=F-C,b.Ja.push(A));A=new z.gd;A.time=q;A.rb=0;A.value=a.Se+h;A.type=1;A.$e=2*q/3;A.af=a.hf&&!a.jf?A.value:A.value-h/3;a.jf&&(A.bf=q+t,A.cf=A.value+t/q*h);b.Ja.push(A);A=new z.gd;A.time=q;A.rb=1;A.value=a.ie;A.type=1;A.$e=2*q/3;A.af=a.hf&&!a.jf?a.ie:a.ie-m/3;
a.jf&&(A.bf=q+t,A.cf=A.value+t/q*m);b.Ja.push(A);A=new z.gd;A.time=y;A.rb=2;A.value=w;A.type=1;A.$e=2*y/3;A.af=a.hf?w:w-n/3;b.Ja.push(A);a.jf&&(A=new z.gd,A.time=q+r,A.rb=0,A.value=a.Se+h,A.type=1,A.$e=q+r-t,A.af=a.Se+h,b.Ja.push(A),A=new z.gd,A.time=q+r,A.rb=1,A.value=a.ie,A.type=1,A.$e=q+r-t,A.af=a.ie,b.Ja.push(A));this.xa.push(b);return b};e.prototype.nv=function(){this.A.j&&this.A.j.play()};e.prototype.ov=function(){this.A.j&&(this.A.j.pause(),this.A.j.currentTime=0)};e.prototype.mv=function(){this.A.j&&
this.A.j.pause()};e.prototype.yu=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.Bs=function(){return this.A.j?this.A.j.currentTime:0};e.prototype.As=function(){if(this.A.j)return this.A.j};e.prototype.xu=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.sr=function(){this.Ll=!0};e.prototype.ms=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,h=Object.keys(this.Sb);c<h.length;c++){var m=h[c];this.Sb[m].Co||"undefined"!==this.ml(m)&&((b[m]={}).value=this.ml(m))}b=a.hsprops={};c=0;for(h=Object.keys(this.pb);c<h.length;c++){m=h[c];for(var n=b[m]={},q=0,r=Object.keys(this.pb[m]);q<
r.length;q++)for(var t=r[q],w=n[t]={},y=0,C=Object.keys(this.pb[m][t]);y<C.length;y++){var F=C[y];w[F]=this.fl(m,t,F)}}b=a.polyhotspots=[];for(c=0;c<this.K.length;c++)"poly"==this.K[c].type&&(h=this.K[c],m={},m.id=h.id,m.bordercolor=h.Yb,m.borderalpha=h.Xb,m.backgroundcolor=h.Wb,m.backgroundalpha=h.Vb,b.push(m));return a};e.prototype.hu=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.sb(b.projection)}b=0;for(var c=Object.keys(a.variables);b<
c.length;b++){var h=c[b];this.Qe(h,a.variables[h].value)}b=0;for(c=Object.keys(a.hsprops);b<c.length;b++){h=c[b];for(var m=a.hsprops[h],n=0,q=Object.keys(m);n<q.length;n++)for(var r=q[n],t=m[r],w=0,y=Object.keys(t);w<y.length;w++){var C=y[w];this.km(h,r,C,t[C])}}for(b=0;b<a.polyhotspots.length;b++)for(c=a.polyhotspots[b],h=0;h<this.K.length;h++)"poly"==this.K[h].type&&this.K[h].id==c.id&&(this.K[h].Yb=c.bordercolor,this.K[h].Xb=c.borderalpha,this.K[h].Vb=c.backgroundalpha,this.K[h].Wb=c.backgroundcolor);
return this.ub=!0};return e}();z.kc=f})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=p;window.ggHasWebGL=O;window.pano2vrPlayer=ggP2VR.kc;var Z=ggP2VR.kc.prototype;Z._=Z.Va;Z.setContainer=Z.bu;Z.setLanguage=Z.lm;Z.getLanguage=Z.Sr;Z.addTranslations=Z.$g;Z.getProjectTranslations=Z.qs;Z.getVersion=Z.vo;Z.readConfigString=Z.Xl;Z.readConfigUrl=Z.pp;Z.readConfigUrlAsync=Z.Pt;Z.readConfigXml=Z.qp;Z.openUrl=Z.Nl;Z.openNext=Z.rd;Z.goBack=Z.Js;Z.setMargins=Z.fu;Z.addListener=Z.addListener;Z.on=Z.addListener;
Z.removeEventListener=Z.removeEventListener;Z.off=Z.removeEventListener;Z.detectBrowser=Z.En;Z.initWebGL=Z.Sc;Z.getPercentLoaded=Z.ls;Z.setBasePath=Z.au;Z.getBasePath=Z.$n;Z.setViewerSize=Z.Qp;Z.getViewerSize=Z.Es;Z.updateViewerSizeNow=Z.ic;Z.setSkinObject=Z.ru;Z.changeViewMode=Z.fr;Z.getViewMode=Z.Cs;Z.changePolygonMode=Z.pn;Z.setPolygonMode=Z.pn;Z.getPolygonMode=Z.os;Z.showOnePolyHotspot=Z.Sp;Z.hideOnePolyHotspot=Z.zo;Z.changePolyHotspotColor=Z.er;Z.setPolyHotspotHandcursor=Z.iu;
Z.toggleOnePolyHotspot=Z.Uu;Z.changeViewState=Z.gr;Z.getViewState=Z.Ds;Z.setRenderFlags=Z.ku;Z.getRenderFlags=Z.rs;Z.setMaxTileCount=Z.Lp;Z.updatePanorama=Z.Gi;Z.isTouching=Z.Lo;Z.getIsMobile=Z.il;Z.setIsMobile=Z.eu;Z.getHasTouch=Z.eo;Z.getIsTour=Z.Rr;Z.getNodesCount=Z.hs;Z.getIsAutorotating=Z.Or;Z.getIsLoading=Z.Qr;Z.getIsLoaded=Z.fj;Z.getIsTileLoading=Z.ho;Z.getLastActivity=Z.Tr;Z.getPan=Z.nf;Z.getPanNorth=Z.Wd;Z.getPanDest=Z.ks;Z.getPanN=Z.hj;Z.setPan=Z.ee;Z.setPanNorth=Z.Vj;Z.changePan=Z.Ri;
Z.changePanLog=Z.nn;Z.getTilt=Z.gg;Z.getTiltDest=Z.vs;Z.setTilt=Z.fe;Z.changeTilt=Z.Si;Z.changeTiltLog=Z.qn;Z.getFov=Z.Dd;Z.getFovDest=Z.Jr;Z.setFov=Z.Ab;Z.setFovMode=Z.im;Z.changeFov=Z.Ek;Z.changeFovLog=Z.Qi;Z.getVFov=Z.Nb;Z.setVFov=Z.ti;Z.getHFov=Z.el;Z.setHFov=Z.jm;Z.getDFov=Z.dl;Z.setDFov=Z.gm;Z.getRoll=Z.kj;Z.setRoll=Z.Ag;Z.setPanTilt=Z.nm;Z.setPanTiltFov=Z.zg;Z.setDefaultView=Z.Fp;Z.setLocked=Z.setLocked;Z.setLockedMouse=Z.Jp;Z.setLockedKeyboard=Z.Ip;Z.getLockedKeyboard=Z.Vr;
Z.setLockedWheel=Z.Kp;Z.moveTo=Z.moveTo;Z.moveToEx=Z.Ej;Z.moveToDefaultView=Z.jt;Z.moveToDefaultViewEx=Z.kt;Z.addHotspotElements=Z.Zm;Z.playSound=Z.be;Z.playPauseSound=Z.mp;Z.playStopSound=Z.Nt;Z.pauseSound=Z.di;Z.activateSound=Z.Mq;Z.soundGetTime=Z.Fu;Z.soundSetTime=Z.Hu;Z.soundSetPlaybackRate=Z.Gu;Z.setMediaVisibility=Z.gu;Z.isPlaying=Z.isPlaying;Z.stopSound=Z.$j;Z.setVolume=Z.setVolume;Z.changeVolume=Z.hr;Z.mute=Z.ot;Z.unmute=Z.$u;Z.toggleMuted=Z.Tu;Z.getHasSounds=Z.Lr;Z.getSoundsPermitted=Z.ss;
Z.startAutoplayMedia=Z.Ku;Z.removeHotspots=Z.wp;Z.getHotspotsVisible=Z.fo;Z.getHotspotPropValue=Z.fl;Z.setHotspotPropValue=Z.km;Z.getCustomPropertyDefaultValue=Z.Hr;Z.getCurrentPerspective=Z.mf;Z.addHotspot=Z.Oq;Z.updateHotspot=Z.bv;Z.removeHotspot=Z.Qt;Z.setActiveHotspot=Z.Pe;Z.getPointHotspotIds=Z.ns;Z.getHotspot=Z.Mr;Z.setFullscreen=Z.Sj;Z.toggleFullscreen=Z.fk;Z.enterFullscreen=Z.ur;Z.exitFullscreen=Z.exitFullscreen;Z.getIsFullscreen=Z.Pr;Z.startAutorotate=Z.Lu;Z.stopAutorotate=Z.Ou;
Z.toggleAutorotate=Z.Su;Z.pauseAutorotate=Z.Mt;Z.resumeAutorotate=Z.Vt;Z.setAutorotateNodeFilter=Z.$t;Z.startAnimation=Z.Wp;Z.resumeAnimation=Z.Ut;Z.createLayers=Z.yn;Z.removePanorama=Z.Ef;Z.getScreenResolution=Z.to;Z.getMaxScreenResolution=Z.ko;Z.getNodeIds=Z.mo;Z.getNodeUserdata=Z.Ch;Z.getNodeUserdataPropValue=Z.no;Z.setNodeUserdataPropValue=Z.Np;Z.getNodeLatLng=Z.jl;Z.getNodeTitle=Z.gs;Z.getNodeDistance=Z.ds;Z.getCurrentNode=Z.dj;Z.getNextNode=Z.cs;Z.getPrevNode=Z.ps;Z.getLastVisitedNode=Z.Ur;
Z.getStartNode=Z.ts;Z.getNodesWithTag=Z.oo;Z.getCurrentPointHotspots=Z.Gr;Z.getPositionAngles=Z.ij;Z.getPositionRawAngles=Z.po;Z.nodeVisited=Z.qt;Z.clearVisitedNodes=Z.jr;Z.setElementIdPrefix=Z.cu;Z.videoPanoPlay=Z.nv;Z.videoPanoStop=Z.ov;Z.videoPanoPause=Z.mv;Z.getVideoPanoTime=Z.Bs;Z.setVideoPanoTime=Z.yu;Z.getVideoPanoObject=Z.As;Z.setVideoPanoSource=Z.xu;Z.getMediaObject=Z.$r;Z.getMediaBufferSourceObject=Z.Zr;Z.registerVideoElement=Z.rp;Z.disableSoundLoading=Z.sr;Z.setCrossOrigin=Z.setCrossOrigin;
Z.setProjection=Z.sb;Z.getProjection=Z.Z;Z.changeProjection=Z.Fk;Z.changeProjectionEx=Z.Fk;Z.changeLensflares=Z.dr;Z.setTransition=Z.tu;Z.getMapType=Z.Yr;Z.getMapDetails=Z.Xr;Z.getNodeMapCoords=Z.es;Z.getNodeMapCoordsInPercent=Z.fs;Z.getMapContainingNode=Z.Wr;Z.getMapsContainingNode=Z.jo;Z.getMapIDs=Z.io;Z.getFloorplanIDs=Z.Ir;Z.getFirstMap=Z.co;Z.getFirstFloorplan=Z.ej;Z.hasMap=Z.Ps;Z.hasFloorplan=Z.Os;Z.addVariable=Z.Rq;Z.setVariableOptions=Z.Pp;Z.setVariableValue=Z.Qe;Z.getVariableValue=Z.ml;
Z.setSuperCookie=Z.su;Z.getGyroAvailable=Z.Kr;Z.setUseGyro=Z.uu;Z.getUseGyro=Z.ws;Z.getOS=Z.js;Z.getBrowser=Z.Er;Z.getBrowserTheme=Z.Fr;Z.triggerEvent=Z.I;Z.requestRedraw=Z.St;Z.getWebGlContext=Z.Fs;Z.getHasTouch=Z.eo;Z.updateViewerSizeNow=Z.ic;Z.getApiVersion=Z.Dr;Z.setApiVersion=Z.Zt;Z.getInertia=Z.Nr;Z.setInertia=Z.du;Z.getZoomCenterCursor=Z.Gs;Z.setZoomCenterCursor=Z.zu;Z.getPlayerState=Z.ms;Z.setPlayerState=Z.hu;Z.getQueryParameter=Z.getQueryParameter;Z.setQueryParameter=Z.ju;Z.enterVR=Z.Yf;
Z.exitVR=Z.Zf;Z.toggleVR=Z.hq;Z.isInVR=Z.mg;Z.hasVR=Z.rf;Z.getVRDisplayName=Z.ys;Z.getVRCamera=Z.xs;Z.getVRRenderer=Z.zs;Z.setVRFrameBufferScaleFactor=Z.vu;Z.getSkinGroup=Z.ll;
